diff --git a/.gitignore b/.gitignore index e9fe331cb316..37e7c688e71e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,164 +1,4 @@ -# NOTE: if you modify this file, you probably need to modify the file set that -# is an input to 'maven-assembly-plugin' that generates source distribution. -# This is typically in files named 'src.xml' throughout this repository. - -# Ignore IDE files -.codex/ -.trae/ -.cursor/ -.windsurf/ -.claude/ - -# Ignore any offline repositories the user may have created. -**/offline-repository/**/* - -# Ignore files generated by the Gradle build process. -**/.gradle/**/* -**/.gogradle/**/* -**/.nb-gradle/**/* -**/gogradle.lock -**/build/**/* -.test-infra/**/vendor/**/* -sdks/**/vendor/**/* -runners/**/vendor/**/* -**/.gradletasknamecache -**/generated/* -/go.mod -/go.sum - -# Ignore sources generated into the main tree -**/src/main/generated/** -**/src/test/generated_tests/** - -# Ignore files generated by the Maven build process. -**/bin/**/* -**/dependency-reduced-pom.xml -**/target/**/* - -# Ignore generated archetypes -sdks/java/maven-archetypes/examples/src/main/resources/archetype-resources/src/ -sdks/java/maven-archetypes/examples-java8/src/main/resources/archetype-resources/src/ -sdks/java/maven-archetypes/gcp-bom-examples/src/main/resources/archetype-resources/src/ -sdks/java/maven-archetypes/examples/src/main/resources/archetype-resources/sample.txt - -# Ignore files generated by the Python build process. -**/*.pyc -**/*.pyo -**/*.pyd -**/*.egg-info/ -**/.eggs/ -**/nose-*.egg/ -**/.tox/**/* -**/dist/**/* -**/distribute-*/**/* -**/env/**/* -**/.mypy_cache -**/.dmypy.json -**/.hypothesis -sdks/python/**/*.c -sdks/python/**/*.so -sdks/python/**/*.egg -sdks/python/LICENSE -sdks/python/NOTICE -sdks/python/README.md -sdks/python/apache_beam/transforms/xlang/* -sdks/python/apache_beam/portability/api/* -sdks/python/apache_beam/yaml/docs/* -sdks/python/nosetests*.xml -sdks/python/pytest*.xml -sdks/python/postcommit_requirements.txt -sdks/python/.coverage -sdks/python/coverage.xml - -# Ignore IntelliJ files. -**/.idea/**/* -**/*.iml -**/*.ipr -**/*.iws -**/out/**/* - -# Ignore Eclipse files. -**/.classpath -**/.project -**/.factorypath -**/.checkstyle -**/.fbExcludeFilterFile -**/.apt_generated/**/* -**/.settings/**/* -**/.gitignore - -# Ignore Visual Studio Code files. -**/.vscode/**/* - -# Hotspot VM leaves this log in a non-target directory when java crashes -**/hs_err_pid*.log - -# Ignore files that end with '~', since they are most likely auto-save files -# produced by a text editor. -**/*~ - -# Ignore MacOSX files. -**/.DS_Store/**/* -**/.DS_Store - -# Ignore Jupyter notebook checkpoints. -**/.ipynb_checkpoints/**/* - -# Ignore python venv -**/venv - -# pyenv -.python-version - -# NOTE: if you modify this file, you probably need to modify the file set that -# is an input to 'maven-assembly-plugin' that generates source distribution. -# This is typically in files named 'src.xml' throughout this repository. - -# JetBrains Education files -!**/study_project.xml -**/.coursecreator/**/* - -.pytest_cache -.pytest_cache/**/* - -# Hugo -website/www/node_modules -website/www/dist -website/www/site/resources -website/www/site/github_samples -website/www/site/code_samples -website/www/site/_config_branch_repo.toml -website/www/yarn-error.log -!website/www/site/content - -# Node -**/node_modules - -# Dart/Flutter -**/.dart_tool -**/.flutter-plugins -**/.flutter-plugins-dependencies -**/.packages -**/generated_plugin_registrant.dart -playground/frontend/playground_components/pubspec.lock -playground/frontend/playground_components/test/tools/extract_symbols_java/dependencies -playground/frontend/playground_components_dev/pubspec.lock - -# Ignore Beam Playground Terraform -playground/cloudfunction.zip - -# Ignore Terraform related -**/.terraform/ -**/*.tfstate -**/*.tfstate.* - -# Ignore Katas auto-generated files -**/*-remote-info.yaml - -# Ignore .test-infra/mock-apis related files -.test-infra/mock-apis/**/charts/ - -# Ignore .test-infra/metrics/github_runs_prefetcher/code.zip -# as its generated with terraform -.test-infra/metrics/sync/github/github_runs_prefetcher/code.zip -.venv/ +beam-env/ +venv/ +__pycache__/ +*.pyc diff --git a/.gradle/8.14.3/checksums/checksums.lock b/.gradle/8.14.3/checksums/checksums.lock new file mode 100644 index 000000000000..604b4c262f91 Binary files /dev/null and b/.gradle/8.14.3/checksums/checksums.lock differ diff --git a/.gradle/8.14.3/checksums/md5-checksums.bin b/.gradle/8.14.3/checksums/md5-checksums.bin new file mode 100644 index 000000000000..4e7eb649410b Binary files /dev/null and b/.gradle/8.14.3/checksums/md5-checksums.bin differ diff --git a/.gradle/8.14.3/checksums/sha1-checksums.bin b/.gradle/8.14.3/checksums/sha1-checksums.bin new file mode 100644 index 000000000000..626461220b95 Binary files /dev/null and b/.gradle/8.14.3/checksums/sha1-checksums.bin differ diff --git a/.gradle/8.14.3/executionHistory/executionHistory.lock b/.gradle/8.14.3/executionHistory/executionHistory.lock new file mode 100644 index 000000000000..474550a45f33 Binary files /dev/null and b/.gradle/8.14.3/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.14.3/fileChanges/last-build.bin b/.gradle/8.14.3/fileChanges/last-build.bin new file mode 100644 index 000000000000..f76dd238ade0 Binary files /dev/null and b/.gradle/8.14.3/fileChanges/last-build.bin differ diff --git a/.gradle/8.14.3/fileHashes/fileHashes.bin b/.gradle/8.14.3/fileHashes/fileHashes.bin new file mode 100644 index 000000000000..859ef69c83a7 Binary files /dev/null and b/.gradle/8.14.3/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.14.3/fileHashes/fileHashes.lock b/.gradle/8.14.3/fileHashes/fileHashes.lock new file mode 100644 index 000000000000..682dc49a7161 Binary files /dev/null and b/.gradle/8.14.3/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.14.3/fileHashes/resourceHashesCache.bin b/.gradle/8.14.3/fileHashes/resourceHashesCache.bin new file mode 100644 index 000000000000..347d000bd093 Binary files /dev/null and b/.gradle/8.14.3/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/8.14.3/gc.properties b/.gradle/8.14.3/gc.properties new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 000000000000..f85947913bce Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 000000000000..ed398dd8591f --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sun Mar 22 21:58:46 IST 2026 +gradle.version=8.14.3 diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe new file mode 100644 index 000000000000..f80f354deb1b Binary files /dev/null and b/.gradle/file-system.probe differ diff --git a/.gradle/noVersion/buildLogic.lock b/.gradle/noVersion/buildLogic.lock new file mode 100644 index 000000000000..80f7af97343e Binary files /dev/null and b/.gradle/noVersion/buildLogic.lock differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.gradle/workspace-id.txt b/.gradle/workspace-id.txt new file mode 100644 index 000000000000..87d7b2d65960 Binary files /dev/null and b/.gradle/workspace-id.txt differ diff --git a/.gradle/workspace-id.txt.lock b/.gradle/workspace-id.txt.lock new file mode 100644 index 000000000000..7cc2f57a0832 Binary files /dev/null and b/.gradle/workspace-id.txt.lock differ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000000..26d33521af10 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 000000000000..e77e5a322480 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000000..6ed36dd36d45 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000000..35eb1ddfbbc0 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/build/reports/problems/problems-report.html b/build/reports/problems/problems-report.html new file mode 100644 index 000000000000..075a4f77f022 --- /dev/null +++ b/build/reports/problems/problems-report.html @@ -0,0 +1,663 @@ + + + + + + + + + + + + + Gradle Configuration Cache + + + +
+ +
+ Loading... +
+ + + + + + diff --git a/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.bin b/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.bin new file mode 100644 index 000000000000..de46a89c9a43 Binary files /dev/null and b/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.bin differ diff --git a/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.lock b/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.lock new file mode 100644 index 000000000000..6b977ceb5b33 Binary files /dev/null and b/buildSrc/.gradle/8.14.3/executionHistory/executionHistory.lock differ diff --git a/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 000000000000..654eb12153b1 Binary files /dev/null and b/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/buildSrc/.gradle/buildOutputCleanup/cache.properties b/buildSrc/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 000000000000..ed398dd8591f --- /dev/null +++ b/buildSrc/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sun Mar 22 21:58:46 IST 2026 +gradle.version=8.14.3 diff --git a/buildSrc/.gradle/buildOutputCleanup/outputFiles.bin b/buildSrc/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 000000000000..5a97ab708d40 Binary files /dev/null and b/buildSrc/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/buildSrc/.gradle/file-system.probe b/buildSrc/.gradle/file-system.probe new file mode 100644 index 000000000000..9148c3651d80 Binary files /dev/null and b/buildSrc/.gradle/file-system.probe differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$DockerExtension.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$DockerExtension.class new file mode 100644 index 000000000000..f10f8d628bd4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$DockerExtension.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure1.class new file mode 100644 index 000000000000..38af8072223e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure2.class new file mode 100644 index 000000000000..f7fae6b2dda1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure3.class new file mode 100644 index 000000000000..f41bc0b11004 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure4.class new file mode 100644 index 000000000000..71c348057294 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure5.class new file mode 100644 index 000000000000..a7f37be147a2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure6.class new file mode 100644 index 000000000000..ba5c6c92244e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure10.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure10.class new file mode 100644 index 000000000000..ca4213235efb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure10.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11$_closure16.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11$_closure16.class new file mode 100644 index 000000000000..2d3a8ec6dc9d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11$_closure16.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11.class new file mode 100644 index 000000000000..8acdd184ffd2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure11.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12$_closure17.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12$_closure17.class new file mode 100644 index 000000000000..2f13e8e161f6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12$_closure17.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12.class new file mode 100644 index 000000000000..9a8710ef7e12 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure12.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure20.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure20.class new file mode 100644 index 000000000000..5bc4f0c39975 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure20.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure21.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure21.class new file mode 100644 index 000000000000..480ef879dd10 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18$_closure21.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18.class new file mode 100644 index 000000000000..d4e8289252dd Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure18.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19$_closure22.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19$_closure22.class new file mode 100644 index 000000000000..730aae426920 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19$_closure22.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19.class new file mode 100644 index 000000000000..b4de394fc76a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13$_closure19.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13.class new file mode 100644 index 000000000000..cd787f49d84a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure13.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14$_closure15.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14$_closure15.class new file mode 100644 index 000000000000..c8a08ae346d8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14$_closure15.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14.class new file mode 100644 index 000000000000..4a557ccd9b75 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9$_closure14.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9.class new file mode 100644 index 000000000000..e1472d497e51 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7$_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7.class new file mode 100644 index 000000000000..8f5b25a21466 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_apply_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_buildCommandLine_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_buildCommandLine_closure8.class new file mode 100644 index 000000000000..0daf53f12341 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin$_buildCommandLine_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin.class new file mode 100644 index 000000000000..0d33f5deddd8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerPlugin.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$DockerRunExtension.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$DockerRunExtension.class new file mode 100644 index 000000000000..42b9c5cb6c6c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$DockerRunExtension.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure1.class new file mode 100644 index 000000000000..efdbab6e11b9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure2.class new file mode 100644 index 000000000000..147ef1623db1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure3.class new file mode 100644 index 000000000000..e0b362c5c2e0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure4.class new file mode 100644 index 000000000000..4d8938a9abe2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6$_closure10.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6$_closure10.class new file mode 100644 index 000000000000..429fcf3a5b3e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6$_closure10.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6.class new file mode 100644 index 000000000000..e099ecc46574 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7$_closure11.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7$_closure11.class new file mode 100644 index 000000000000..c3044d94ef29 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7$_closure11.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7.class new file mode 100644 index 000000000000..9462076e0dc2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure8.class new file mode 100644 index 000000000000..3a2a15ada49c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure9.class new file mode 100644 index 000000000000..950e230f7cff Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5$_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5.class new file mode 100644 index 000000000000..8ea3b0771924 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin$_apply_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin.class new file mode 100644 index 000000000000..82a02d172a89 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamDockerRunPlugin.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$ContainerImageNameConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$ContainerImageNameConfiguration.class new file mode 100644 index 000000000000..ff54c002509e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$ContainerImageNameConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageTask.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageTask.class new file mode 100644 index 000000000000..0a1bc0dff6b6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageTask.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageUsingJavaExpansionConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageUsingJavaExpansionConfiguration.class new file mode 100644 index 000000000000..cf57aa1c3f0b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageUsingJavaExpansionConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageValidatesRunnerConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageValidatesRunnerConfiguration.class new file mode 100644 index 000000000000..366507d31349 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$CrossLanguageValidatesRunnerConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaExamplesArchetypeValidationConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaExamplesArchetypeValidationConfiguration.class new file mode 100644 index 000000000000..741fc38c9961 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaExamplesArchetypeValidationConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaNatureConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaNatureConfiguration.class new file mode 100644 index 000000000000..3065280b8914 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaNatureConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaPerformanceTestConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaPerformanceTestConfiguration.class new file mode 100644 index 000000000000..3fda368ef188 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$JavaPerformanceTestConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortabilityNatureConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortabilityNatureConfiguration.class new file mode 100644 index 000000000000..1ec4036a987e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortabilityNatureConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$Environment.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$Environment.class new file mode 100644 index 000000000000..82f9e62d6922 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$Environment.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure1.class new file mode 100644 index 000000000000..683b9332ffc5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure2.class new file mode 100644 index 000000000000..9df2d278bfdf Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration$_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration.class new file mode 100644 index 000000000000..0e2b96cd9906 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PortableValidatesRunnerConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PythonPerformanceTestConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PythonPerformanceTestConfiguration.class new file mode 100644 index 000000000000..c099670044c5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$PythonPerformanceTestConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$TransformServiceConfiguration.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$TransformServiceConfiguration.class new file mode 100644 index 000000000000..32c0539906ac Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$TransformServiceConfiguration.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure38.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure38.class new file mode 100644 index 000000000000..b32502f7ef99 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure38.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure39.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure39.class new file mode 100644 index 000000000000..f83e11ae3afe Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10$_closure39.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10.class new file mode 100644 index 000000000000..93a016f97649 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure10.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure40.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure40.class new file mode 100644 index 000000000000..1176914bd2a3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure40.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure41.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure41.class new file mode 100644 index 000000000000..c4c66715defe Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure41.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42$_closure94.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42$_closure94.class new file mode 100644 index 000000000000..5c84ea93efe2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42$_closure94.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42.class new file mode 100644 index 000000000000..d96686584600 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure42.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43$_closure95.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43$_closure95.class new file mode 100644 index 000000000000..c922b7cc4766 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43$_closure95.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43.class new file mode 100644 index 000000000000..e1053df71147 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure43.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure44.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure44.class new file mode 100644 index 000000000000..16511cad74e6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure44.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure45.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure45.class new file mode 100644 index 000000000000..ba293369de4c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure45.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure96.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure96.class new file mode 100644 index 000000000000..ff26ad6c023a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure96.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure97.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure97.class new file mode 100644 index 000000000000..e9123ed5123c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46$_closure97.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46.class new file mode 100644 index 000000000000..322fa7fe48c2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure46.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure47.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure47.class new file mode 100644 index 000000000000..d5d21b32c1bc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure47.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98$_closure99.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98$_closure99.class new file mode 100644 index 000000000000..a7e6a1187d11 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98$_closure99.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98.class new file mode 100644 index 000000000000..5e6ed63c7c38 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48$_closure98.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48.class new file mode 100644 index 000000000000..0d411b7e3ca6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure48.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure49.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure49.class new file mode 100644 index 000000000000..eab862c910d0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure49.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50$_closure100.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50$_closure100.class new file mode 100644 index 000000000000..6f51efa3f298 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50$_closure100.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50.class new file mode 100644 index 000000000000..f6b3a1bedb2b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure50.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51$_closure101.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51$_closure101.class new file mode 100644 index 000000000000..4813d3cc17e9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51$_closure101.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51.class new file mode 100644 index 000000000000..a2c815a1cd24 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure51.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure52.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure52.class new file mode 100644 index 000000000000..764e9b8baf20 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure52.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure102.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure102.class new file mode 100644 index 000000000000..923a16a04e3d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure102.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure103.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure103.class new file mode 100644 index 000000000000..32645d384873 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53$_closure103.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53.class new file mode 100644 index 000000000000..fdbacd15f155 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure53.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure54.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure54.class new file mode 100644 index 000000000000..aa4b9a680b91 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure54.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure55.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure55.class new file mode 100644 index 000000000000..68a2de6bf4dc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure55.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure56.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure56.class new file mode 100644 index 000000000000..ea1444d9594b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure56.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104$_closure105.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104$_closure105.class new file mode 100644 index 000000000000..a5bc0a7ad4e7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104$_closure105.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104.class new file mode 100644 index 000000000000..71bfba1dbaed Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57$_closure104.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57.class new file mode 100644 index 000000000000..c04abe7be04e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure57.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure58.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure58.class new file mode 100644 index 000000000000..04239238e076 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure58.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59$_closure106.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59$_closure106.class new file mode 100644 index 000000000000..441fa8bc3f47 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59$_closure106.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59.class new file mode 100644 index 000000000000..614c466d0199 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure59.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure60.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure60.class new file mode 100644 index 000000000000..f73c728c2026 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure60.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61$_closure107.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61$_closure107.class new file mode 100644 index 000000000000..bed563edb3c7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61$_closure107.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61.class new file mode 100644 index 000000000000..55683e0a746f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure61.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62$_closure108.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62$_closure108.class new file mode 100644 index 000000000000..f85eeb60d377 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62$_closure108.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62.class new file mode 100644 index 000000000000..4f16558a0776 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure62.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure63.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure63.class new file mode 100644 index 000000000000..0c695f6f14eb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure63.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure64.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure64.class new file mode 100644 index 000000000000..42f99700dce9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure64.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65$_closure109.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65$_closure109.class new file mode 100644 index 000000000000..53ddefe8bf8a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65$_closure109.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65.class new file mode 100644 index 000000000000..a2d30cd4318e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure65.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66$_closure110.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66$_closure110.class new file mode 100644 index 000000000000..3dd1ae64f1e2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66$_closure110.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66.class new file mode 100644 index 000000000000..94c2f3799c8e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure66.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure67.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure67.class new file mode 100644 index 000000000000..37b8d487a65e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure67.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure68.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure68.class new file mode 100644 index 000000000000..52b66ca7c80b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure68.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure69.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure69.class new file mode 100644 index 000000000000..c3c5ee73a8ef Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure69.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure70.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure70.class new file mode 100644 index 000000000000..c2810c7ee6be Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure70.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure111.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure111.class new file mode 100644 index 000000000000..a0f375383504 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure111.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure112.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure112.class new file mode 100644 index 000000000000..168ee8d0c2e3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71$_closure112.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71.class new file mode 100644 index 000000000000..0f3cfb6053c3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure71.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure72.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure72.class new file mode 100644 index 000000000000..26bc194dc1c8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure72.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73$_closure113.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73$_closure113.class new file mode 100644 index 000000000000..8f64f7669e41 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73$_closure113.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73.class new file mode 100644 index 000000000000..bf6990324077 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure73.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure74.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure74.class new file mode 100644 index 000000000000..02d5a2fe01e5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure74.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75$_closure114.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75$_closure114.class new file mode 100644 index 000000000000..6793a8232276 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75$_closure114.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75.class new file mode 100644 index 000000000000..676620d2b7dc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure75.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure76.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure76.class new file mode 100644 index 000000000000..6d3ead5adc02 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure76.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure77.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure77.class new file mode 100644 index 000000000000..10a16f2a514d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure77.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure78.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure78.class new file mode 100644 index 000000000000..56116893f8f5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure78.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure79.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure79.class new file mode 100644 index 000000000000..efe29b49bb0d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure79.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117$_closure118.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117$_closure118.class new file mode 100644 index 000000000000..d9ce871563d4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117$_closure118.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117.class new file mode 100644 index 000000000000..ef256b2a10ba Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116$_closure117.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116.class new file mode 100644 index 000000000000..101ac0a5f03d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115$_closure116.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115.class new file mode 100644 index 000000000000..21f16ccd35e1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80$_closure115.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80.class new file mode 100644 index 000000000000..ca9050f0fe96 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure80.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure81.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure81.class new file mode 100644 index 000000000000..eec204c73036 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure81.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure82.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure82.class new file mode 100644 index 000000000000..966aa7f5d7cc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure82.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83$_closure119.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83$_closure119.class new file mode 100644 index 000000000000..1192275955ba Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83$_closure119.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83.class new file mode 100644 index 000000000000..b5204b0592ef Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure83.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure84.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure84.class new file mode 100644 index 000000000000..3b7bbddf5ac0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure84.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure85.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure85.class new file mode 100644 index 000000000000..936eb31063f8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure85.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure86.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure86.class new file mode 100644 index 000000000000..f5f6a7b107ef Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure86.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87$_closure120.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87$_closure120.class new file mode 100644 index 000000000000..abb9871cc641 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87$_closure120.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87.class new file mode 100644 index 000000000000..8b6bc8bb05ec Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure87.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure121.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure121.class new file mode 100644 index 000000000000..aa0f8533c07c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure121.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure122.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure122.class new file mode 100644 index 000000000000..9d9a48abad81 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure122.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure123.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure123.class new file mode 100644 index 000000000000..02df60d8d61f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88$_closure123.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88.class new file mode 100644 index 000000000000..a4308edd6bef Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure88.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure89.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure89.class new file mode 100644 index 000000000000..b8335ca4e777 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure89.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure90.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure90.class new file mode 100644 index 000000000000..e5e417068a1a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure90.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure91.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure91.class new file mode 100644 index 000000000000..c44e1cb7e6e2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure91.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128$_closure133.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128$_closure133.class new file mode 100644 index 000000000000..296d20ec1ea2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128$_closure133.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128.class new file mode 100644 index 000000000000..92ceee088b8e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure128.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure129.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure129.class new file mode 100644 index 000000000000..32c9892868cb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure129.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure130.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure130.class new file mode 100644 index 000000000000..438d1ff9bc50 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure130.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure134.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure134.class new file mode 100644 index 000000000000..c09b0d03a5bb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure134.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure135.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure135.class new file mode 100644 index 000000000000..2de67501153f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure135.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure136.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure136.class new file mode 100644 index 000000000000..735b99252f70 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131$_closure136.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131.class new file mode 100644 index 000000000000..9447188b66e4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure131.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132$_closure137.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132$_closure137.class new file mode 100644 index 000000000000..6dc8772b3f05 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132$_closure137.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132.class new file mode 100644 index 000000000000..ed8f9a442460 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126$_closure132.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126.class new file mode 100644 index 000000000000..adfabbb56b69 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure126.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure138.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure138.class new file mode 100644 index 000000000000..39036a9672a8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure138.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142$_closure144.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142$_closure144.class new file mode 100644 index 000000000000..74a216188eb2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142$_closure144.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142.class new file mode 100644 index 000000000000..f023650caf97 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure142.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure143.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure143.class new file mode 100644 index 000000000000..957a06225eda Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141$_closure143.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141.class new file mode 100644 index 000000000000..3dbb1f866cb8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139$_closure141.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139.class new file mode 100644 index 000000000000..959c73e5d27c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure139.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure140.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure140.class new file mode 100644 index 000000000000..ea6d4d3b94a0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127$_closure140.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127.class new file mode 100644 index 000000000000..d8458d7e2507 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125$_closure127.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125.class new file mode 100644 index 000000000000..b563cca6497a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124$_closure125.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124.class new file mode 100644 index 000000000000..217fedca6ac9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92$_closure124.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92.class new file mode 100644 index 000000000000..4005f6f143e1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure92.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure93.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure93.class new file mode 100644 index 000000000000..40ab6cc3fd32 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11$_closure93.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11.class new file mode 100644 index 000000000000..cc10e4131bce Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure11.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure12.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure12.class new file mode 100644 index 000000000000..a553eded0100 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure12.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure147.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure147.class new file mode 100644 index 000000000000..7d6319f8bfeb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure147.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148$_closure149.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148$_closure149.class new file mode 100644 index 000000000000..f1e71e73ccd6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148$_closure149.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148.class new file mode 100644 index 000000000000..a136314089ac Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145$_closure148.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145.class new file mode 100644 index 000000000000..1de5623db794 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure145.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146$_closure150.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146$_closure150.class new file mode 100644 index 000000000000..95686f3e2373 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146$_closure150.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146.class new file mode 100644 index 000000000000..591a7d676e22 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13$_closure146.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13.class new file mode 100644 index 000000000000..a730edd3b8a4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure13.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151$_closure152.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151$_closure152.class new file mode 100644 index 000000000000..fdc0b82a12ac Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151$_closure152.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151.class new file mode 100644 index 000000000000..d3bf8f8da281 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14$_closure151.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14.class new file mode 100644 index 000000000000..98d88070d773 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure14.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure153.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure153.class new file mode 100644 index 000000000000..d08f6e6538a1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure153.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154$_closure157.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154$_closure157.class new file mode 100644 index 000000000000..67a9703e2e83 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154$_closure157.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154.class new file mode 100644 index 000000000000..6ba5515a2f31 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure154.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158$_closure159.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158$_closure159.class new file mode 100644 index 000000000000..4a430729a498 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158$_closure159.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158.class new file mode 100644 index 000000000000..1c9c1f1863c0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155$_closure158.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155.class new file mode 100644 index 000000000000..aae7e5fc5863 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure155.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160$_closure161.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160$_closure161.class new file mode 100644 index 000000000000..d6e3b6afd076 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160$_closure161.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160.class new file mode 100644 index 000000000000..af3f075821e8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156$_closure160.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156.class new file mode 100644 index 000000000000..5fdb13c328f3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15$_closure156.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15.class new file mode 100644 index 000000000000..537a0b98dea6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure15.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure162.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure162.class new file mode 100644 index 000000000000..18bce5114c94 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure162.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure163.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure163.class new file mode 100644 index 000000000000..53403c4a8513 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16$_closure163.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16.class new file mode 100644 index 000000000000..b440041ad2d5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure16.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure17.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure17.class new file mode 100644 index 000000000000..efabe9e4080d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure17.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165$_closure167.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165$_closure167.class new file mode 100644 index 000000000000..b11eca2e9c50 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165$_closure167.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165.class new file mode 100644 index 000000000000..d4acc535f518 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure165.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure166.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure166.class new file mode 100644 index 000000000000..5d8a2fdd02de Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164$_closure166.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164.class new file mode 100644 index 000000000000..38fef7f73f24 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18$_closure164.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18.class new file mode 100644 index 000000000000..a40cf0c672b4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure18.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure19.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure19.class new file mode 100644 index 000000000000..88b6bbf3f79c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure19.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure32.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure32.class new file mode 100644 index 000000000000..e08cfad7ebae Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure32.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure33.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure33.class new file mode 100644 index 000000000000..0a6c9a5a5259 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2$_closure33.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2.class new file mode 100644 index 000000000000..797463e68195 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure20.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure20.class new file mode 100644 index 000000000000..886f22ec6a45 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure20.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure170.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure170.class new file mode 100644 index 000000000000..be28d96fe37c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure170.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171$_closure173.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171$_closure173.class new file mode 100644 index 000000000000..cf3f8c91b9f0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171$_closure173.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171.class new file mode 100644 index 000000000000..bf478061580a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure171.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174$_closure175.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174$_closure175.class new file mode 100644 index 000000000000..10cb8fe36f99 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174$_closure175.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174.class new file mode 100644 index 000000000000..45f43437371a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172$_closure174.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172.class new file mode 100644 index 000000000000..b2e0ec47f11c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168$_closure172.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168.class new file mode 100644 index 000000000000..a9672d21547a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure168.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169$_closure176.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169$_closure176.class new file mode 100644 index 000000000000..647f26a5d411 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169$_closure176.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169.class new file mode 100644 index 000000000000..53efb9e2f4c9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21$_closure169.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21.class new file mode 100644 index 000000000000..d5566f8c18b1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure21.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181$_closure182.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181$_closure182.class new file mode 100644 index 000000000000..ebd2059b01d0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181$_closure182.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181.class new file mode 100644 index 000000000000..1a93e07a441b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177$_closure181.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177.class new file mode 100644 index 000000000000..aa4db00e34ce Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure177.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178$_closure183.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178$_closure183.class new file mode 100644 index 000000000000..9153085a15c8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178$_closure183.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178.class new file mode 100644 index 000000000000..89df434086b1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure178.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure184.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure184.class new file mode 100644 index 000000000000..187d18c76898 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure184.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185$_closure187.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185$_closure187.class new file mode 100644 index 000000000000..b26d5fdaacf0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185$_closure187.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185.class new file mode 100644 index 000000000000..41faaecf664d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure185.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188$_closure189.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188$_closure189.class new file mode 100644 index 000000000000..82d7252d2f6d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188$_closure189.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188.class new file mode 100644 index 000000000000..fd4686049a8a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186$_closure188.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186.class new file mode 100644 index 000000000000..2ed043523f1f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179$_closure186.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179.class new file mode 100644 index 000000000000..2ea41298b5e3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure179.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure180.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure180.class new file mode 100644 index 000000000000..7a394a56e7cc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22$_closure180.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22.class new file mode 100644 index 000000000000..10fd6fd894a1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure22.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure23.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure23.class new file mode 100644 index 000000000000..41e7b06a1f86 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure23.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190$_closure191.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190$_closure191.class new file mode 100644 index 000000000000..bfca2fe061cd Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190$_closure191.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190.class new file mode 100644 index 000000000000..d83ff82a2d42 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24$_closure190.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24.class new file mode 100644 index 000000000000..98c5e0b2f08e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure24.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25$_closure192.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25$_closure192.class new file mode 100644 index 000000000000..dc6dafc17868 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25$_closure192.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25.class new file mode 100644 index 000000000000..0680670f8e2d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure25.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26$_closure193.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26$_closure193.class new file mode 100644 index 000000000000..2ee0b3e76a71 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26$_closure193.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26.class new file mode 100644 index 000000000000..e2c20a130cfc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure26.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195$_closure196.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195$_closure196.class new file mode 100644 index 000000000000..b40c8e39bff4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195$_closure196.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195.class new file mode 100644 index 000000000000..150b04cebb0d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194$_closure195.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194.class new file mode 100644 index 000000000000..e1a303b41e94 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27$_closure194.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27.class new file mode 100644 index 000000000000..d484abbb05db Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure27.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure197.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure197.class new file mode 100644 index 000000000000..f03754d30954 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure197.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure198.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure198.class new file mode 100644 index 000000000000..e73831a7a2e1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure198.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure199.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure199.class new file mode 100644 index 000000000000..fbb5e30cea26 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure199.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure200.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure200.class new file mode 100644 index 000000000000..26d7b57d86a5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure200.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure201.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure201.class new file mode 100644 index 000000000000..92ac83e92933 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure201.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure202.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure202.class new file mode 100644 index 000000000000..6445c8b9bd87 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure202.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure220.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure220.class new file mode 100644 index 000000000000..fa603c6cb2ca Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure220.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure221.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure221.class new file mode 100644 index 000000000000..ec1340ce82a2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212$_closure221.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212.class new file mode 100644 index 000000000000..133ef0803ada Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure212.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure213.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure213.class new file mode 100644 index 000000000000..43655b33cc73 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure213.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure214.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure214.class new file mode 100644 index 000000000000..c1040e9aee32 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure214.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure215.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure215.class new file mode 100644 index 000000000000..10a411120d05 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure215.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure216.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure216.class new file mode 100644 index 000000000000..fd0b1e45392a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure216.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure217.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure217.class new file mode 100644 index 000000000000..576b5ad479f2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure217.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure218.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure218.class new file mode 100644 index 000000000000..5f58736e25a5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure218.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure219.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure219.class new file mode 100644 index 000000000000..883dc03b6d39 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203$_closure219.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203.class new file mode 100644 index 000000000000..668ba5b6f86e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure203.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure204.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure204.class new file mode 100644 index 000000000000..8d9df08d223d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure204.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure205.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure205.class new file mode 100644 index 000000000000..64cc6384485a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure205.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure206.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure206.class new file mode 100644 index 000000000000..94f3bc09f027 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure206.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure207.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure207.class new file mode 100644 index 000000000000..83f69a86db17 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure207.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure208.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure208.class new file mode 100644 index 000000000000..39dff1c188fe Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure208.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure209.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure209.class new file mode 100644 index 000000000000..c965fb5c5454 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure209.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure210.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure210.class new file mode 100644 index 000000000000..6875ffb9090e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure210.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure211.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure211.class new file mode 100644 index 000000000000..0360cbd030e9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28$_closure211.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28.class new file mode 100644 index 000000000000..1d9bc5ac2059 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure28.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure222.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure222.class new file mode 100644 index 000000000000..a15461ca07e6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure222.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure223.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure223.class new file mode 100644 index 000000000000..3c7d82df01d4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure223.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230$_closure231.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230$_closure231.class new file mode 100644 index 000000000000..4a5449f89a63 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230$_closure231.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230.class new file mode 100644 index 000000000000..bd553ffb1ec5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224$_closure230.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224.class new file mode 100644 index 000000000000..c1b0b6c0ade3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure224.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure225.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure225.class new file mode 100644 index 000000000000..904e8e215a52 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure225.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure226.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure226.class new file mode 100644 index 000000000000..451e5eedf4b8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure226.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure227.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure227.class new file mode 100644 index 000000000000..f152d25c6ef1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure227.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure228.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure228.class new file mode 100644 index 000000000000..4b2b1cad9ec2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure228.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure229.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure229.class new file mode 100644 index 000000000000..a5e98980d8c0 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29$_closure229.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29.class new file mode 100644 index 000000000000..4b1e91e6a4fc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure29.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure3.class new file mode 100644 index 000000000000..975a78005901 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure232.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure232.class new file mode 100644 index 000000000000..bf61fb604973 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure232.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure246.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure246.class new file mode 100644 index 000000000000..08c38080d901 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure246.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure247.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure247.class new file mode 100644 index 000000000000..8ad2e023915b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244$_closure247.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244.class new file mode 100644 index 000000000000..a1362759c890 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure244.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure245.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure245.class new file mode 100644 index 000000000000..57d9085588e3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233$_closure245.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233.class new file mode 100644 index 000000000000..c59d584863ea Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure233.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure234.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure234.class new file mode 100644 index 000000000000..7cb02bb09948 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure234.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure249.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure249.class new file mode 100644 index 000000000000..29212388ca22 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure249.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure250.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure250.class new file mode 100644 index 000000000000..88ee7c621c19 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248$_closure250.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248.class new file mode 100644 index 000000000000..c272c311ca0d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235$_closure248.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235.class new file mode 100644 index 000000000000..bf317181361b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure235.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236$_closure251.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236$_closure251.class new file mode 100644 index 000000000000..2270d11a619d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236$_closure251.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236.class new file mode 100644 index 000000000000..e1b14e77ea06 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure236.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237$_closure252.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237$_closure252.class new file mode 100644 index 000000000000..890f8f972c61 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237$_closure252.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237.class new file mode 100644 index 000000000000..bdc275618f30 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure237.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure256.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure256.class new file mode 100644 index 000000000000..27ec853cab9b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure256.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure257.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure257.class new file mode 100644 index 000000000000..439d6cc9e1ef Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure257.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure258.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure258.class new file mode 100644 index 000000000000..15b196218fe7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254$_closure258.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254.class new file mode 100644 index 000000000000..c4cbf2a5a885 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure254.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure259.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure259.class new file mode 100644 index 000000000000..4fb3180b0650 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure259.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure260.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure260.class new file mode 100644 index 000000000000..5c20cbd3b0df Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255$_closure260.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255.class new file mode 100644 index 000000000000..c2253439f9e9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253$_closure255.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253.class new file mode 100644 index 000000000000..b34c6507d2bd Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238$_closure253.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238.class new file mode 100644 index 000000000000..5103734a986d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure238.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262$_closure263.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262$_closure263.class new file mode 100644 index 000000000000..97fc4241c4d7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262$_closure263.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262.class new file mode 100644 index 000000000000..9cdaeb43c095 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261$_closure262.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261.class new file mode 100644 index 000000000000..412294dc90bb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239$_closure261.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239.class new file mode 100644 index 000000000000..e735f58c97be Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure239.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265$_closure266.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265$_closure266.class new file mode 100644 index 000000000000..5d94b41e953e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265$_closure266.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265.class new file mode 100644 index 000000000000..92faeb8dfaee Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264$_closure265.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264.class new file mode 100644 index 000000000000..98b8396938f7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240$_closure264.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240.class new file mode 100644 index 000000000000..1e822020a81f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure240.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure241.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure241.class new file mode 100644 index 000000000000..e22ea9ac0ee3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure241.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure242.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure242.class new file mode 100644 index 000000000000..245d0c66125f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure242.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure243.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure243.class new file mode 100644 index 000000000000..f3b03614f64b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30$_closure243.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30.class new file mode 100644 index 000000000000..fe363c29f7ec Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure30.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure4.class new file mode 100644 index 000000000000..7fae1c056d35 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure5.class new file mode 100644 index 000000000000..7dc42a29c716 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6$_closure34.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6$_closure34.class new file mode 100644 index 000000000000..423b38b8ff37 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6$_closure34.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6.class new file mode 100644 index 000000000000..685375aa9a27 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure7.class new file mode 100644 index 000000000000..95947c5b7352 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure8.class new file mode 100644 index 000000000000..6fcd919f4c05 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure35.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure35.class new file mode 100644 index 000000000000..d703b14d99a6 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure35.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure36.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure36.class new file mode 100644 index 000000000000..f47d90e1dac8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure36.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure37.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure37.class new file mode 100644 index 000000000000..c9d7dbaa8915 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9$_closure37.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9.class new file mode 100644 index 000000000000..7256dd6e8646 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_apply_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_getRandomPort_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_getRandomPort_closure1.class new file mode 100644 index 000000000000..eafd56c3816d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_getRandomPort_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_setAutomaticModuleNameHeader_closure31.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_setAutomaticModuleNameHeader_closure31.class new file mode 100644 index 000000000000..6cc9e1c105b5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin$_setAutomaticModuleNameHeader_closure31.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin.class new file mode 100644 index 000000000000..2c55a73d114f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/BeamModulePlugin.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure4.class new file mode 100644 index 000000000000..bebbea70405b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure5.class new file mode 100644 index 000000000000..5579004d6684 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2$_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2.class new file mode 100644 index 000000000000..45a5e0c0ee02 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_dependenciesClosure_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_relocations_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_relocations_closure1.class new file mode 100644 index 000000000000..f9794ce12e3e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_relocations_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8$_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8$_closure9.class new file mode 100644 index 000000000000..61efcb0166ac Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8$_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8.class new file mode 100644 index 000000000000..fad3d3587a8a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6$_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6.class new file mode 100644 index 000000000000..04d162c656d4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure7.class new file mode 100644 index 000000000000..2279cb59f513 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3$_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3.class new file mode 100644 index 000000000000..26e1bea75660 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0$_shadowClosure_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0.class new file mode 100644 index 000000000000..a986da88318f Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/GrpcVendoring_1_69_0.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest$_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest$_closure1.class new file mode 100644 index 000000000000..c67d1311f25e Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest$_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest.class new file mode 100644 index 000000000000..4da8ecf1ffc5 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities$IoPerformanceTest.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities.class new file mode 100644 index 000000000000..cb530ad626ee Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/IoPerformanceTestUtilities.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure3.class new file mode 100644 index 000000000000..0cbfe4a48a89 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4$_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4$_closure7.class new file mode 100644 index 000000000000..c533a5ae2d4b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4$_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4.class new file mode 100644 index 000000000000..27f2ac209105 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5$_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5$_closure8.class new file mode 100644 index 000000000000..01b37c42d473 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5$_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5.class new file mode 100644 index 000000000000..1c1b1896eabc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure6.class new file mode 100644 index 000000000000..c2ea96929d30 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1$_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1.class new file mode 100644 index 000000000000..f4a5a48738db Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure10.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure10.class new file mode 100644 index 000000000000..ab7cab262fc2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure10.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure11.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure11.class new file mode 100644 index 000000000000..4622b4cb2771 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure11.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure12.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure12.class new file mode 100644 index 000000000000..72be5f808d46 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure12.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure13.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure13.class new file mode 100644 index 000000000000..040f849cfca9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9$_closure13.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9.class new file mode 100644 index 000000000000..0ed6314575b4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2$_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2.class new file mode 100644 index 000000000000..e4d9045a14ea Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories$_register_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories.class new file mode 100644 index 000000000000..f4c77f986479 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/Repositories.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$VendorJavaPluginConfig.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$VendorJavaPluginConfig.class new file mode 100644 index 000000000000..c7c8ec584452 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$VendorJavaPluginConfig.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure10.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure10.class new file mode 100644 index 000000000000..dde3812e5cdc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure10.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure11.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure11.class new file mode 100644 index 000000000000..43b381b13ce4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure11.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure9.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure9.class new file mode 100644 index 000000000000..5a49fb9e19a2 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2$_closure9.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2.class new file mode 100644 index 000000000000..1f86fd8f0020 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3$_closure12.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3$_closure12.class new file mode 100644 index 000000000000..83782b81acbc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3$_closure12.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3.class new file mode 100644 index 000000000000..103899249a74 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure3.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15$_closure16.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15$_closure16.class new file mode 100644 index 000000000000..8a0bdbc3119b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15$_closure16.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15.class new file mode 100644 index 000000000000..aa88eae5007d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13$_closure15.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13.class new file mode 100644 index 000000000000..68fd35e2138c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure13.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure14.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure14.class new file mode 100644 index 000000000000..38b1f9caeadc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4$_closure14.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4.class new file mode 100644 index 000000000000..25cb9ad00d80 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure4.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18$_closure19.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18$_closure19.class new file mode 100644 index 000000000000..97d6509c1804 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18$_closure19.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18.class new file mode 100644 index 000000000000..a006fa66b70c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17$_closure18.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17.class new file mode 100644 index 000000000000..ad553c8c3d39 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5$_closure17.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5.class new file mode 100644 index 000000000000..99f59af91c1b Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure5.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure20.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure20.class new file mode 100644 index 000000000000..4bc4c2d47962 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure20.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure21.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure21.class new file mode 100644 index 000000000000..bfea7ba9b8ec Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure21.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure22.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure22.class new file mode 100644 index 000000000000..71e31646b494 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6$_closure22.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6.class new file mode 100644 index 000000000000..a4a4e9bbd4eb Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure6.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure25.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure25.class new file mode 100644 index 000000000000..dad7d75ea729 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure25.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure26.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure26.class new file mode 100644 index 000000000000..bdc77aa193c1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23$_closure26.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23.class new file mode 100644 index 000000000000..d44d11af5323 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure23.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30$_closure35.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30$_closure35.class new file mode 100644 index 000000000000..489f55f10357 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30$_closure35.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30.class new file mode 100644 index 000000000000..6329a71427d9 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure30.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure31.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure31.class new file mode 100644 index 000000000000..261ea0242026 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure31.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure32.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure32.class new file mode 100644 index 000000000000..79ea55799085 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure32.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure36.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure36.class new file mode 100644 index 000000000000..e0394c578670 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure36.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure37.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure37.class new file mode 100644 index 000000000000..9a357afe4b22 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure37.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure38.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure38.class new file mode 100644 index 000000000000..fef9e45aa025 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33$_closure38.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33.class new file mode 100644 index 000000000000..317b50fa0ea8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure33.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34$_closure39.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34$_closure39.class new file mode 100644 index 000000000000..d9761c9390a1 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34$_closure39.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34.class new file mode 100644 index 000000000000..e5cc7d46f3a7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28$_closure34.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28.class new file mode 100644 index 000000000000..0c01c566d31a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure28.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42$_closure44.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42$_closure44.class new file mode 100644 index 000000000000..37d84bcffc4a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42$_closure44.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42.class new file mode 100644 index 000000000000..53b3aaa33bd7 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure42.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure43.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure43.class new file mode 100644 index 000000000000..4daefacff70d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41$_closure43.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41.class new file mode 100644 index 000000000000..6b22306845b8 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40$_closure41.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40.class new file mode 100644 index 000000000000..e462dd839616 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29$_closure40.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29.class new file mode 100644 index 000000000000..832bd10c676d Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27$_closure29.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27.class new file mode 100644 index 000000000000..04b184b924b3 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24$_closure27.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24.class new file mode 100644 index 000000000000..1ba65b53902a Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7$_closure24.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7.class new file mode 100644 index 000000000000..a6fbbe01e4f4 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure7.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure8.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure8.class new file mode 100644 index 000000000000..d48580c39593 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1$_closure8.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1.class new file mode 100644 index 000000000000..dd53d0ff498c Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin$_apply_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin.class new file mode 100644 index 000000000000..cf5591d3f3bc Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/VendorJavaPlugin.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure1.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure1.class new file mode 100644 index 000000000000..433a7b537550 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure1.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure2.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure2.class new file mode 100644 index 000000000000..7988ee6b4777 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT$_closure2.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT.class new file mode 100644 index 000000000000..22c4f20af367 Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities$KafkaBatchIT.class differ diff --git a/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities.class b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities.class new file mode 100644 index 000000000000..4f201d3981dd Binary files /dev/null and b/buildSrc/build/classes/groovy/main/org/apache/beam/gradle/kafka/KafkaTestUtilities.class differ diff --git a/buildSrc/build/libs/buildSrc.jar b/buildSrc/build/libs/buildSrc.jar new file mode 100644 index 000000000000..0625be515431 Binary files /dev/null and b/buildSrc/build/libs/buildSrc.jar differ diff --git a/buildSrc/build/pluginDescriptors/org.apache.beam.module.properties b/buildSrc/build/pluginDescriptors/org.apache.beam.module.properties new file mode 100644 index 000000000000..f1be41f28021 --- /dev/null +++ b/buildSrc/build/pluginDescriptors/org.apache.beam.module.properties @@ -0,0 +1 @@ +implementation-class=org.apache.beam.gradle.BeamModulePlugin diff --git a/buildSrc/build/pluginDescriptors/org.apache.beam.vendor-java.properties b/buildSrc/build/pluginDescriptors/org.apache.beam.vendor-java.properties new file mode 100644 index 000000000000..0cb488d49a0d --- /dev/null +++ b/buildSrc/build/pluginDescriptors/org.apache.beam.vendor-java.properties @@ -0,0 +1 @@ +implementation-class=org.apache.beam.gradle.VendorJavaPlugin diff --git a/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.module.properties b/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.module.properties new file mode 100644 index 000000000000..f1be41f28021 --- /dev/null +++ b/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.module.properties @@ -0,0 +1 @@ +implementation-class=org.apache.beam.gradle.BeamModulePlugin diff --git a/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.vendor-java.properties b/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.vendor-java.properties new file mode 100644 index 000000000000..0cb488d49a0d --- /dev/null +++ b/buildSrc/build/resources/main/META-INF/gradle-plugins/org.apache.beam.vendor-java.properties @@ -0,0 +1 @@ +implementation-class=org.apache.beam.gradle.VendorJavaPlugin diff --git a/buildSrc/build/tmp/jar/MANIFEST.MF b/buildSrc/build/tmp/jar/MANIFEST.MF new file mode 100644 index 000000000000..59499bce4a2b --- /dev/null +++ b/buildSrc/build/tmp/jar/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/playground/frontend/build/.metadata b/playground/frontend/build/.metadata new file mode 100644 index 000000000000..0f055bf16355 --- /dev/null +++ b/playground/frontend/build/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: ffb2ecea5223acdd139a5039be2f9c796962833d + channel: stable + +project_type: app diff --git a/playground/frontend/build/CONTRIBUTE.md b/playground/frontend/build/CONTRIBUTE.md new file mode 100644 index 000000000000..07bc63e1a22a --- /dev/null +++ b/playground/frontend/build/CONTRIBUTE.md @@ -0,0 +1,94 @@ + + +# Contribution Guide + +This guide consists of: + +- [Project Structure](#project-structure) +- [State Management](#state-management) +- [Example Loading](#example-loading) +- [Theming](#theming) +- [Adding a New Page](#adding-a-new-page) +- [Accessibility](#accessibility) + +## Project Structure + +The frontend consists of 3 projects: + +- `frontend` is the playground app itself. +- `frontend/playground_components` is the package with common code for Playground and Tour of Beam. +- `frontend/playground_components_dev` is common code for tests of Playground and Tour of Beam. + +## State Management + +Playground uses the [app_state](https://pub.dev/packages/app_state) package for state management. +The standalone playground and the embedded playground are two screens within the same app, +chosen by the URL at runtime. + +The main state object is `PlaygroundController`, created in both of those screens. +It is hung in the widget tree with the [provider](https://pub.dev/packages/provider) package +for historical reasons, and we aim to remove that if we do further refactoring. +New code should pass it directly from widget to widget for compile-time safety. + +## Example Loading + +A URL is parsed into one of the subclasses of `PagePath`, most of which contain +an `ExamplesLoadingDescriptor` object, which in turn may contain multiple `ExampleLoadingDescriptor` +objects. + +This is passed to the `ExamplesLoader` object. It constructs an `ExampleLoader` object +for each example's descriptor, and that loader performs the actual loading. + +To add a new source for examples: + +1. Subclass `ExampleLoadingDescriptor` with state and a method to parse it from a map of query string parameters. +2. Add it to `ExamplesLoadingDescriptorFactory`. +3. Subclass `ExampleLoader` and load an example there. +4. Add it to the `ExampleLoaderFactory` in `ExamplesLoader`. + +## Theming + +Playground app supports light and dark themes. Component themes are declared +in [theme.dart](playground_components/lib/src/theme/theme.dart) file. + +To use specific color inside component you can use helper `ThemeColors` utility: + +`ThemeColors.of(context).greyColor` + +[colors.dart](./lib/constants/colors.dart) contains color declarations. + +## Adding a New Page + +To add a new page, do the following steps: + +1. Read [the overview](https://pub.dev/packages/app_state) of the `app_state` package. +2. Create a new `PagePath` subclass that parses the new URL. +3. Create a new `ChangeNotifier with PageStateMixin` that holds the state of the page. +4. Create a new `StatelessWidget` as the main one for the page. +5. Create a new `StatefulMaterialPage` subclass that binds the three together. + +See the example in [lib/pages/standalone_playground](lib/pages/standalone_playground). + +## Accessibility + +Please, read the following guides about the accessibility: + +- [Flutter Doc](https://docs.flutter.dev/development/accessibility-and-localization/accessibility) +- [Medium Article](https://medium.com/flutter-community/a-deep-dive-into-flutters-accessibility-widgets-eb0ef9455bc) diff --git a/playground/frontend/build/README.md b/playground/frontend/build/README.md new file mode 100644 index 000000000000..bce5bb328172 --- /dev/null +++ b/playground/frontend/build/README.md @@ -0,0 +1,389 @@ + + +# Apache Beam Playground + +## About + +Beam Playground is an interactive environment to try out Beam transforms and examples. +The vision for the Playground is to be a web application where users can try out Beam +without having to install/initialize a Beam environment. + +## Getting Started + +### Run + +See [playground/README.md](../README.md) for details on requirements and setup. + +The following command is used to build and serve the frontend app locally: + +```bash +flutter run -d chrome +``` + +### Build + +Run the following command to generate a release build: + +```bash +flutter build web +``` + +This produces `build/web` directory with static files. Deploy them to your web server. + +### Backend Lookup + +The file [playground_components/lib/src/constants/backend_urls.dart](playground_components/lib/src/constants/backend_urls.dart) +is the location for backend-related constants. + +If the `backendUrlOverrides` map contains a URL for a server then only it will be attempted +for the given container. This is useful for running backend locally. + +Otherwise following patterns are tried when looking up the backend servers: +1. Prepending the frontend host with `router.`, `go.`, `java.`, `python.`, `scio.`. +2. Prepending the the default production frontend URL with the same. + +### Docker + +The app is deployed to production as a Docker container. +You can also run it in Docker locally. This is useful if: + +1. You do not have Flutter and do not want to install it. +2. You want to mimic the release environment in the closest way possible. + +To run the frontend app with Docker, run this in the frontend directory: + +```bash +docker build -t playground-frontend . +docker run -p 1234:8080 playground-frontend +``` + +The container sets up NGINX on port 8080. +This example exposes it as port 1234 on the host, +and the app can be accessed at http://localhost:1234 + +## Code Generation + +This project relies on generated code for some functionality: +deserializers, test mocks, constants for asset files, +extracted Beam symbols for the editor, etc. + +All generated files are version-controlled, so after checkout the project is immediately runnable. +However, after changes you may need to re-run code generation. + +### Standard Dart Code Generator + +Most of the generated files are produced by running the standard Dart code generator. +This only requires Flutter, but must be called on multiple locations. +For convenience, run this single command: + +```bash +./gradlew :playground:frontend:generateCode +``` + +### Generating Beam Symbols Dictionaries + +Requirements: + +- Python 3.8+ with packages: `ast`, `pyyaml`. + +Other SDKs will add more requirements as we add extraction scripts for them. + +To generate all project's generated files including symbol dictionaries, run: + +```bash +./gradlew :playground:frontend:generate +``` + +### Deleting Generated Files + +For consistency, it is recommended that you delete and re-generate all files before committing +if you have all required tools on your machine. To delete all generated files, run: + +```bash +./gradlew :playground:frontend:cleanGenerated +``` + +## Validation + +### Pre-commit Checks + +To run all pre-commit checks, execute this in the beam root: + +```bash +./gradlew :playground:frontend:precommit +``` + +This includes: + +- Tests. +- Linter. + +### Code Style + +Code can be automatically reformatted using: + +```bash +flutter format ./lib +``` + +### Unit Tests + +To delete all generated files and re-generate them again and then run tests: + +```bash +./gradlew :playground:frontend:playground_components:test +./gradlew :playground:frontend:test +``` + +To run tests without re-generating files: + +```bash +cd playground/frontend/playground_components +flutter test +cd .. +flutter test +``` + +### Integration Tests + +1. Install Google Chrome: https://www.google.com/chrome/ +2. Install Chrome Driver: https://chromedriver.chromium.org/downloads + - Note: This GitHub action installs both Chrome and Chrome Driver: + https://github.com/nanasess/setup-chromedriver/blob/a249caaaad10fd12103028fd509853c2229eb6e6/lib/setup-chromedriver.sh +3. Run it on port 4444: `chromedriver --port=4444` +4. Run: + +```bash +# To run in a visible Chrome window: +./gradlew :playground:frontend:integrationTest + +# Headless run without a browser window: +./gradlew :playground:frontend:integrationTest -PdeviceId=web-server +``` + +By default, tests do not expect specific code and output from most examples. +This is because we get the expected example files from GitHub itself at runtime. +Examples in the default GitHub branch may differ from the deployed ones, +and this will break the tests. + +To expect specific code and output, run tests like this using any repository owner/name +and commit reference to load the examples from: + +```bash +./gradlew :playground:frontend:integrationTest -PexamplesRepository=apache/beam -PexamplesRef=master +``` + +## Localization + +The project is in the process of migrating from +[the built-in Flutter localization](https://docs.flutter.dev/development/accessibility-and-localization/internationalization) +to [easy_localization](https://pub.dev/packages/easy_localization). +It temporarily uses both ways. + +### Flutter Built-in Localization + +To add a new localization, follow next steps: + +1. Create app_YOUR_LOCALE_CODE.arb file with your key-translation pairs, except description tags, in lib/l10n directory (use app_en.arb as example). + +2. Add Locale('YOUR_LOCALE_CODE') object to static const locales variable in lib/l10n/l10n.dart file. + +3. Run the following command to generate a build and localization files: + +```bash +flutter build web +``` + +### easy_localization + +To add a new localization (using `fr` as an example): + +1. Create `playground_components/assets/translations/fr.yaml`. + Fill it with content copied from an existing translation file in another language. + +2. Create `assets/translations/fr.yaml`. + Fill it with content copied from an existing translation file in another language. + +3. Add the locale to the list in `lib/l10n/l10n.dart`. + +## URLs and Embedding + +### Linking to a single example + +#### 1. Linking to a catalog example by path + +`https://play.beam.apache.org/?path=SDK_JAVA_AggregationMax&sdk=java` + +Handled by `StandardExampleLoader`. + +#### 2. Linking to the default catalog example + +`https://play.beam.apache.org/?sdk=python&default=true` + +Handled by `CatalogDefaultExampleLoader`. + +#### 3. Linking to a user-shared example + +`https://play.beam.apache.org/?sdk=java&shared=sdFdNV324HC` + +Handled by `UserSharedExampleLoader`. + +#### 4. Linking to an example by URL + +`https://play.beam.apache.org/?sdk=go&url=https://raw.githubusercontent.com/golang/go/master/src/fmt/format.go` + +Handled by `HttpExampleLoader`. The server with the example file must allow +the cross-origin access. GitHub is known to allow it. +Some servers may have different cross-origin policies when requested from localhost +and other domains. + +#### 5. Linking to an empty editor + +`https://play.beam.apache.org/?sdk=go&empty=true` + +Handled by `EmptyExampleLoader`. + +### Passing view options + +Additional options may be passed with any of the above URL patterns. +For them to work, the example must contain sections with the following syntax: + +``` +// [START section_name] +void method() { +... +} +// [END section_name] +``` + +See more on the syntax and limitations in the +[README of the editor](https://pub.dev/packages/flutter_code_editor) +that Playground uses. + +These options can be combined. + +#### Read-only sections + +Add `readonly` parameter with comma-separated section names: + +`https://play.beam.apache.org/?sdk=go&url=https://raw.githubusercontent.com/GoogleCloudPlatform/golang-samples/main/iam/snippets/roles_get.go&readonly=iam_get_role` + +#### Folding everything except sections + +Add `unfold` parameter with comma-separated section names: + +`https://play.beam.apache.org/?sdk=go&url=https://raw.githubusercontent.com/GoogleCloudPlatform/golang-samples/main/iam/snippets/roles_get.go&unfold=iam_get_role` + +This folds all foldable blocks that do not overlap with +any of the given sections. + +#### Hiding everything except a section + +Add `show` parameter with a single section name: + +`https://play.beam.apache.org/?sdk=go&url=https://raw.githubusercontent.com/GoogleCloudPlatform/golang-samples/main/iam/snippets/roles_get.go&show=iam_get_role` + +It is still the whole snippet that is sent for execution although only the given section +is visible. + +This also makes the editor read-only so the user cannot add code that conflicts +with the hidden text. + +### Linking to multiple examples + +With the above URLs, when the SDK is switched the following will be shown: + +- The catalog default example for the new SDK in the standalone playground. +- The empty editor for the new SDK in the embedded playground. + +This can be changed by linking to multiple examples, up to one per SDK. + +For this purpose, make a JSON array with any combination of parameters that +are allowed for loading single examples, for instance: + +```json +[ + { + "sdk": "java", + "path": "SDK_JAVA_AggregationMax" + }, + { + "sdk": "go", + "url": "https://raw.githubusercontent.com/GoogleCloudPlatform/golang-samples/main/iam/snippets/roles_get.go", + "readonly": "iam_get_role" + } +] +``` + +Then pass it in`examples` query parameter like this: + +`https://play.beam.apache.org/?sdk=go&examples=[{"sdk":"java","path":"SDK_JAVA_AggregationMax"},{"sdk":"go","url":"https://raw.githubusercontent.com/GoogleCloudPlatform/golang-samples/main/iam/snippets/roles_get.go","readonly":"iam_get_role"}]` + +This starts with the Go example loaded from the URL. +If SDK is then switched to Java, the `AggregationMax` catalog example is loaded for it. +If SDK is switched to any other one, the default example for that SDK is loaded +because no override was provided. + +### Embedded vs Standalone Playground URLs + +Embedded Playground is a simplified interface supporting all the same features +as the primary interface which is also known as the Standalone Playground. + +The embedded Playground URLs start with `https://play.beam.apache.org/embedded` +and use the same query string parameters as the standalone playground. + +Additionally the Embedded playground supports the following parameters: + +- `editable=0` to make the editor read-only. + +### Embedding into HTML + +Use the `'; + } + + static String _htmlEscape(String text) => const HtmlEscape().convert(text); +} diff --git a/playground/frontend/build/nginx_default.conf b/playground/frontend/build/nginx_default.conf new file mode 100644 index 000000000000..ef54dedf0fee --- /dev/null +++ b/playground/frontend/build/nginx_default.conf @@ -0,0 +1,41 @@ +############################################################################### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +server { + listen 8080; + server_name localhost; + + root /usr/share/nginx/html; + + gzip_static on; + + location / { + try_files $uri /index.html; + } + + location = /index.html { + expires 30s; + } + + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + +} diff --git a/playground/frontend/build/playground_components/.metadata b/playground/frontend/build/playground_components/.metadata new file mode 100644 index 000000000000..e7011f64f39d --- /dev/null +++ b/playground/frontend/build/playground_components/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: f1875d570e39de09040c8f79aa13cc56baab8db1 + channel: stable + +project_type: package diff --git a/playground/frontend/build/playground_components/README.md b/playground/frontend/build/playground_components/README.md new file mode 100644 index 000000000000..6a99b6b645ce --- /dev/null +++ b/playground/frontend/build/playground_components/README.md @@ -0,0 +1,23 @@ + + +# playground_components + +This is a non-pub.dev Flutter package that contains common components +for both Beam Playground app and Tour of Beam app. diff --git a/playground/frontend/build/playground_components/analysis_options.yaml b/playground/frontend/build/playground_components/analysis_options.yaml new file mode 100644 index 000000000000..fe2e0e8eb952 --- /dev/null +++ b/playground/frontend/build/playground_components/analysis_options.yaml @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +include: package:total_lints/app.yaml diff --git a/playground/frontend/build/playground_components/assets/buttons/reset.svg b/playground/frontend/build/playground_components/assets/buttons/reset.svg new file mode 100644 index 000000000000..5b355a07d372 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/buttons/reset.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/playground/frontend/build/playground_components/assets/buttons/theme-mode.svg b/playground/frontend/build/playground_components/assets/buttons/theme-mode.svg new file mode 100644 index 000000000000..fc1438aecf32 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/buttons/theme-mode.svg @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/playground/frontend/build/playground_components/assets/notification_icons/error.svg b/playground/frontend/build/playground_components/assets/notification_icons/error.svg new file mode 100644 index 000000000000..a347915da1e6 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/notification_icons/error.svg @@ -0,0 +1,27 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/notification_icons/info.svg b/playground/frontend/build/playground_components/assets/notification_icons/info.svg new file mode 100644 index 000000000000..6966b06d97be --- /dev/null +++ b/playground/frontend/build/playground_components/assets/notification_icons/info.svg @@ -0,0 +1,27 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/notification_icons/success.svg b/playground/frontend/build/playground_components/assets/notification_icons/success.svg new file mode 100644 index 000000000000..767b65cbcdd9 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/notification_icons/success.svg @@ -0,0 +1,27 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/notification_icons/warning.svg b/playground/frontend/build/playground_components/assets/notification_icons/warning.svg new file mode 100644 index 000000000000..a9f98a54adca --- /dev/null +++ b/playground/frontend/build/playground_components/assets/notification_icons/warning.svg @@ -0,0 +1,27 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/png/beam-logo.png b/playground/frontend/build/playground_components/assets/png/beam-logo.png new file mode 100644 index 000000000000..cb196949a8bc Binary files /dev/null and b/playground/frontend/build/playground_components/assets/png/beam-logo.png differ diff --git a/playground/frontend/build/playground_components/assets/svg/drag-horizontal.svg b/playground/frontend/build/playground_components/assets/svg/drag-horizontal.svg new file mode 100644 index 000000000000..f5e8dcda558a --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/drag-horizontal.svg @@ -0,0 +1,23 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/svg/drag-vertical.svg b/playground/frontend/build/playground_components/assets/svg/drag-vertical.svg new file mode 100644 index 000000000000..fea5377776ef --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/drag-vertical.svg @@ -0,0 +1,23 @@ + + + + + + diff --git a/playground/frontend/build/playground_components/assets/svg/thumb_down.svg b/playground/frontend/build/playground_components/assets/svg/thumb_down.svg new file mode 100644 index 000000000000..5abbc3e06fa5 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/thumb_down.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/playground/frontend/build/playground_components/assets/svg/thumb_down_filled.svg b/playground/frontend/build/playground_components/assets/svg/thumb_down_filled.svg new file mode 100644 index 000000000000..cfa675696a11 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/thumb_down_filled.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/playground/frontend/build/playground_components/assets/svg/thumb_up.svg b/playground/frontend/build/playground_components/assets/svg/thumb_up.svg new file mode 100644 index 000000000000..cf508c90c85e --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/thumb_up.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/playground/frontend/build/playground_components/assets/svg/thumb_up_filled.svg b/playground/frontend/build/playground_components/assets/svg/thumb_up_filled.svg new file mode 100644 index 000000000000..6540bceeaf4e --- /dev/null +++ b/playground/frontend/build/playground_components/assets/svg/thumb_up_filled.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/playground/frontend/build/playground_components/assets/symbols/go.g.yaml b/playground/frontend/build/playground_components/assets/symbols/go.g.yaml new file mode 100644 index 000000000000..2c156f4d2d77 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/symbols/go.g.yaml @@ -0,0 +1,6641 @@ +"": + methods: + - Accelerator + - AddClasspaths + - AddExtraPackages + - AddFakeImpulses + - AddFixedKey + - AfterAll + - AfterAny + - AfterCount + - AfterEach + - AfterEndOfWindow + - AfterProcessingTime + - AfterSynchronizedProcessingTime + - AllWithinBounds + - AllowedLateness + - Always + - ApplySdkImageOverrides + - ApproximateQuantiles + - ApproximateWeightedQuantiles + - AsCombineFn + - AsDoFn + - Bind + - BoolToBounded + - Bounded + - BucketExists + - BuildTempWorkerBinary + - BuildWorkerBinary + - CallNoPanic + - CheckConcrete + - ClassOf + - CleanupTopic + - CoGBKMainInput + - CoGroupByKey + - CoderFrom + - Combine + - CombinePerKey + - Combiner1 + - Combiner2 + - Combiner3 + - Commit + - CommitOffsetInFinalize + - Compile + - ConnectionInitSQLs + - ConnectionProperties + - ConsumerConfigs + - ContainerImages + - Convert + - ConvertFn + - Copy + - Count + - CountElms + - Create + - Create2 + - CreateBucket + - CreateDisposition + - CreateEnvironment + - CreateList + - CreateList2 + - CreateWithEndpoint + - CrossLanguage + - CrossLanguagePayload + - Debug + - Debugf + - Debugln + - Decode + - DecodeBase64 + - DecodeBool + - DecodeByte + - DecodeBytes + - DecodeCoder + - DecodeCoderRef + - DecodeCoderRefs + - DecodeDouble + - DecodeEventTime + - DecodeFn + - DecodeInt32 + - DecodeMultiEdge + - DecodePane + - DecodeSinglePrecisionFloat + - DecodeStringUTF8 + - DecodeStructPayload + - DecodeType + - DecodeUint32 + - DecodeUint64 + - DecodeVarInt + - DecodeVarUint64 + - DecodeWindowedValueHeader + - DecoderForSlice + - Default + - DefaultDial + - DefaultRunner + - DefaultSourceConfig + - DefaultStepConfig + - DefaultWindowingStrategy + - Deidentify + - DeserializeHooksFromOptions + - Dialect + - Diff + - DisableHook + - Discard + - Distinct + - DoFn0x0 + - DoFn0x1 + - DoFn0x2 + - DoFn0x3 + - DoFn0x4 + - DoFn0x5 + - DoFn10x0 + - DoFn10x1 + - DoFn10x2 + - DoFn10x3 + - DoFn10x4 + - DoFn10x5 + - DoFn1x0 + - DoFn1x1 + - DoFn1x2 + - DoFn1x3 + - DoFn1x4 + - DoFn1x5 + - DoFn2x0 + - DoFn2x1 + - DoFn2x2 + - DoFn2x3 + - DoFn2x4 + - DoFn2x5 + - DoFn3x0 + - DoFn3x1 + - DoFn3x2 + - DoFn3x3 + - DoFn3x4 + - DoFn3x5 + - DoFn4x0 + - DoFn4x1 + - DoFn4x2 + - DoFn4x3 + - DoFn4x4 + - DoFn4x5 + - DoFn5x0 + - DoFn5x1 + - DoFn5x2 + - DoFn5x3 + - DoFn5x4 + - DoFn5x5 + - DoFn6x0 + - DoFn6x1 + - DoFn6x2 + - DoFn6x3 + - DoFn6x4 + - DoFn6x5 + - DoFn7x0 + - DoFn7x1 + - DoFn7x2 + - DoFn7x3 + - DoFn7x4 + - DoFn7x5 + - DoFn8x0 + - DoFn8x1 + - DoFn8x2 + - DoFn8x3 + - DoFn8x4 + - DoFn8x5 + - DoFn9x0 + - DoFn9x1 + - DoFn9x2 + - DoFn9x3 + - DoFn9x4 + - DoFn9x5 + - DontUseFlagAsPipelineOption + - DropKey + - DropValue + - DumpToLog + - DumpToLogFromStore + - DumpToOutFromContext + - DumpToOutFromStore + - Emitter1 + - Emitter2 + - Emitter3 + - Empty + - EnableCaptureHook + - EnableHeapCaptureHook + - EnableHook + - EnableProfCaptureHook + - EnableTraceCaptureHook + - Encode + - EncodeBase64 + - EncodeBool + - EncodeByte + - EncodeBytes + - EncodeCoder + - EncodeCoderRef + - EncodeCoderRefs + - EncodeDouble + - EncodeElement + - EncodeEventTime + - EncodeFn + - EncodeInt32 + - EncodeMultiEdge + - EncodePane + - EncodePayload + - EncodeSinglePrecisionFloat + - EncodeStringUTF8 + - EncodeStructPayload + - EncodeType + - EncodeUint32 + - EncodeUint64 + - EncodeVarInt + - EncodeVarUint64 + - EncodeWindow + - EncodeWindowedValueHeader + - EncoderForSlice + - EnsureSubscription + - EnsureTopic + - Equals + - EqualsFloat + - EqualsList + - Error + - Errorf + - Errorln + - Evaluate + - Exclude + - Execute + - ExecuteBundles + - ExecuteEnv + - ExecutionMsecUrn + - Exit + - Exitf + - Exitln + - Expand + - ExpandedComponents + - ExpandedTransform + - ExpansionAddr + - ExpansionAddrRead + - ExpansionAddrWrite + - Explode + - External + - ExternalInputs + - ExternalOutputs + - ExternalTagged + - "False" + - Fatal + - Fatalf + - Fatalln + - FetchSize + - FieldIndexByTag + - File + - Flatten + - FreeDiskSpace + - FromDuration + - FromMetricUpdates + - FromMilliseconds + - FromMonitoringInfos + - FromQuery + - FromTable + - FromTime + - FromType + - FuncName + - Function0x0 + - Function0x1 + - Function0x2 + - Function0x3 + - Function0x4 + - Function0x5 + - Function10x0 + - Function10x1 + - Function10x2 + - Function10x3 + - Function10x4 + - Function10x5 + - Function1x0 + - Function1x1 + - Function1x2 + - Function1x3 + - Function1x4 + - Function1x5 + - Function2x0 + - Function2x1 + - Function2x2 + - Function2x3 + - Function2x4 + - Function2x5 + - Function3x0 + - Function3x1 + - Function3x2 + - Function3x3 + - Function3x4 + - Function3x5 + - Function4x0 + - Function4x1 + - Function4x2 + - Function4x3 + - Function4x4 + - Function4x5 + - Function5x0 + - Function5x1 + - Function5x2 + - Function5x3 + - Function5x4 + - Function5x5 + - Function6x0 + - Function6x1 + - Function6x2 + - Function6x3 + - Function6x4 + - Function6x5 + - Function7x0 + - Function7x1 + - Function7x2 + - Function7x3 + - Function7x4 + - Function7x5 + - Function8x0 + - Function8x1 + - Function8x2 + - Function8x3 + - Function8x4 + - Function8x5 + - Function9x0 + - Function9x1 + - Function9x2 + - Function9x3 + - Function9x4 + - Function9x5 + - FunctionName + - FunctionReg + - GetBeamJar + - GetDefaultRepositoryURL + - GetEndpoint + - GetEnvironmentConfig + - GetEnvironmentUrn + - GetExperiments + - GetJobName + - GetMetrics + - GetPipelineResourceHints + - GetProject + - GetProjectFromFlagOrEnvironment + - GetRegion + - GetRunningJobByName + - GetSdkImageOverrides + - GetStore + - GroupByKey + - Hash + - Head + - HeapDumpFrequency + - IDs + - Immediate + - Import + - Impulse + - ImpulseValue + - InboundTagToNode + - Include + - InferFieldNames + - Info + - Infof + - Infoln + - Init + - Initialize + - Initialized + - Input + - Int64Counter + - Int64Distribution + - Int64Latest + - Interface + - Invoke + - InvokeWithoutEventTime + - IsBound + - IsCoGBK + - IsComplex + - IsComposite + - IsConcrete + - IsContainer + - IsEmit + - IsEmitWithEventTime + - IsEmitterRegistered + - IsEnabled + - IsEqual + - IsEqualList + - IsFieldNil + - IsFloat + - IsInputRegistered + - IsInteger + - IsIter + - IsKV + - IsLifecycleMethod + - IsList + - IsLoopback + - IsMalformedEmit + - IsMalformedIter + - IsMalformedMultiMap + - IsMalformedReIter + - IsMultiMap + - IsNullable + - IsNumber + - IsReIter + - IsStructurallyAssignable + - IsUniversal + - IsW + - IsWorkerCompatibleBinary + - Iter1 + - Iter2 + - JSONToProto + - Join + - KvEmitFn + - KvFn + - Largest + - LargestPerKey + - LegacyMultiRetrieve + - LoadFunction + - LookupCustomCoder + - LookupType + - Main + - MainCalled + - MainRet + - MainRetWithDefault + - MainWithDefault + - MakeBagState + - MakeCombiningState + - MakeElementDecoder + - MakeElementEncoder + - MakeFunc + - MakeFunc0x0 + - MakeFunc0x1 + - MakeFunc0x2 + - MakeFunc0x3 + - MakeFunc0x4 + - MakeFunc1x0 + - MakeFunc1x1 + - MakeFunc1x2 + - MakeFunc1x3 + - MakeFunc1x4 + - MakeFunc2x0 + - MakeFunc2x1 + - MakeFunc2x2 + - MakeFunc2x3 + - MakeFunc2x4 + - MakeFunc3x0 + - MakeFunc3x1 + - MakeFunc3x2 + - MakeFunc3x3 + - MakeFunc3x4 + - MakeFunc4x0 + - MakeFunc4x1 + - MakeFunc4x2 + - MakeFunc4x3 + - MakeFunc4x4 + - MakeFunc5x0 + - MakeFunc5x1 + - MakeFunc5x2 + - MakeFunc5x3 + - MakeFunc5x4 + - MakeFunc6x0 + - MakeFunc6x1 + - MakeFunc6x2 + - MakeFunc6x3 + - MakeFunc6x4 + - MakeFunc7x0 + - MakeFunc7x1 + - MakeFunc7x2 + - MakeFunc7x3 + - MakeFunc7x4 + - MakeFunc8x0 + - MakeFunc8x1 + - MakeFunc8x2 + - MakeFunc8x3 + - MakeFunc8x4 + - MakeGBKUnionCoder + - MakeJar + - MakeKVUnionCoder + - MakeMapState + - MakeObject + - MakePredicate + - MakeQualifiedSubscriptionName + - MakeQualifiedTopicName + - MakeSetState + - MakeSlice + - MakeValueState + - MakeWindowDecoder + - MakeWindowEncoder + - Marshal + - MarshalCoders + - MarshalTo + - MarshalWindowingStrategy + - Materialize + - Max + - MaxNumRecords + - MaxPerKey + - MaxReadSecs + - MaxRecord + - Mean + - MeanPerKey + - MergeCounters + - MergeDistributions + - MergeGauges + - MergeMsecs + - MergePCols + - Min + - MinPerKey + - MinRAMBytes + - MultiFinishBundle + - MultiRetrieve + - MultiStage + - MultiStartBundle + - Must + - MustEncode + - MustEncodeBase64 + - MustEncodePayload + - MustExtractFilePayload + - MustN + - MustSatisfy + - MustTaggedN + - Name + - NameType + - NamedInboundLinks + - NamedOutboundLinks + - Never + - New + - NewArtifactRetrievalServiceClient + - NewArtifactStagingServiceClient + - NewBeamFnControlClient + - NewBeamFnDataClient + - NewBeamFnExternalWorkerPoolClient + - NewBeamFnLoggingClient + - NewBeamFnStateClient + - NewBeamFnWorkerStatusClient + - NewBool + - NewBytes + - NewClient + - NewCoGBK + - NewCoder + - NewCoderMarshaller + - NewCoderUnmarshaller + - NewCombine + - NewCombineFn + - NewConfig + - NewCounter + - NewCrossLanguage + - NewCustomCoder + - NewDistribution + - NewDoFn + - NewDouble + - NewElementDecoder + - NewElementEncoder + - NewExpansionServiceClient + - NewExpansionServiceRunner + - NewExternal + - NewExternalTransform + - NewExtractor + - NewFixedWindows + - NewFlatten + - NewFloat + - NewFn + - NewGauge + - NewGlobalWindow + - NewGlobalWindows + - NewGrowableTracker + - NewHints + - NewI + - NewImpulse + - NewIntervalWindow + - NewIntervalWindowCoder + - NewJobServiceClient + - NewKV + - NewLegacyArtifactRetrievalServiceClient + - NewLegacyArtifactStagingServiceClient + - NewLockRTracker + - NewMutation + - NewN + - NewNamespaceGenerator + - NewOptions + - NewPI + - NewPTransformState + - NewPW + - NewPane + - NewParDo + - NewPipeline + - NewPipelineWithRoot + - NewPlan + - NewProvisionServiceClient + - NewPyExpansionServiceRunner + - NewQualifiedTableName + - NewR + - NewRegistry + - NewReshuffle + - NewResults + - NewRetrievalServer + - NewSampler + - NewScopeTree + - NewScopedDataManager + - NewScopedStateReader + - NewScopedStateReaderWithCache + - NewSessions + - NewSideInputAdapter + - NewSlidingWindows + - NewStagingServer + - NewString + - NewT + - NewTaggedExternal + - NewTestStreamServiceClient + - NewTracker + - NewUnauthenticatedClient + - NewUserStateAdapter + - NewVarInt + - NewVarIntZ + - NewVarUintZ + - NewW + - NewWindowInto + - NewWrappedTracker + - NoFiringPane + - NodeTypes + - NonEmpty + - Normalize + - Now + - NullableDecoder + - NullableEncoder + - NumMainInputs + - OptionsToProto + - OrFinally + - OutboundTagToNode + - Output + - OutputParallelization + - OutputType + - PCollectionLabels + - PTransformLabels + - PackBase64Proto + - PackBytes + - PackProto + - PanesAccumulate + - PanesDiscard + - ParDo + - ParDo0 + - ParDo2 + - ParDo3 + - ParDo4 + - ParDo5 + - ParDo6 + - ParDo7 + - ParDoN + - ParseMinRAM + - ParseObject + - Partition + - Performant + - PhysicalMemorySize + - Prepare + - Print + - PrintJob + - Printf + - ProducerConfigs + - ProtoToJSON + - ProtoToOptions + - Publish + - Query + - QueryAutomatedExpansionService + - QueryExpansionService + - QueryPythonExpansionService + - Read + - ReadAll + - ReadAllSdf + - ReadClasspaths + - ReadConnectionInitSQLs + - ReadConnectionProperties + - ReadExpansionAddr + - ReadFromPostgres + - ReadN + - ReadNBufUnsafe + - ReadObject + - ReadProxyManifest + - ReadQuery + - ReadRowHeader + - ReadSdf + - ReadSimpleRowHeader + - ReadUnsafe + - ReadWorkerID + - Register + - RegisterArtifactRetrievalServiceServer + - RegisterArtifactStagingServiceServer + - RegisterBeamFnControlServer + - RegisterBeamFnDataServer + - RegisterBeamFnExternalWorkerPoolServer + - RegisterBeamFnLoggingServer + - RegisterBeamFnStateServer + - RegisterBeamFnWorkerStatusServer + - RegisterCaptureHook + - RegisterCoder + - RegisterDoFn + - RegisterEmitter + - RegisterExpansionServiceServer + - RegisterFunc + - RegisterFunction + - RegisterHandler + - RegisterHeapCaptureHook + - RegisterHook + - RegisterInit + - RegisterInput + - RegisterJobServiceServer + - RegisterLegacyArtifactRetrievalServiceServer + - RegisterLegacyArtifactStagingServiceServer + - RegisterLogicalType + - RegisterLogicalTypeProvider + - RegisterOverrideForUrn + - RegisterProfCaptureHook + - RegisterProvisionServiceServer + - RegisterRunner + - RegisterSchemaProvider + - RegisterSchemaProviderWithURN + - RegisterSchemaProviders + - RegisterStructWrapper + - RegisterTestStreamServiceServer + - RegisterTraceCaptureHook + - RegisterType + - Registered + - RemoveFakeImpulses + - Rename + - Render + - Repeat + - Replace + - Require + - RequireAllFieldsExported + - Reshuffle + - ResolveArtifacts + - ResolveArtifactsWithConfig + - ResolveFunction + - ResolveOutputIsBounded + - ResolveXLangArtifacts + - ResultsExtractor + - ResumeProcessingIn + - Retrieve + - RowDecoderForStruct + - RowEncoderForStruct + - Run + - RunAndValidate + - RunInitHooks + - RunRequestHooks + - RunResponseHooks + - RunWithMetrics + - SampleForHeapProfile + - SampleInterval + - Satisfy + - Search + - Seq + - SerializeHooksToOptions + - SetBundleID + - SetDefaultRepositoryURL + - SetLogger + - SetPTransformID + - SetProcessMemoryCeiling + - SetTopLevelMsg + - SetTopLevelMsgf + - SetUpPythonEnvironment + - ShallowClone + - ShallowClonePTransform + - ShimNeeded + - SideInputCacheCapacity + - SkipK + - SkipPtr + - SkipW + - SklearnModel + - Smallest + - SmallestPerKey + - Source + - SourceSingle + - Stage + - StageDir + - StageFile + - StageModel + - StageViaLegacyAPI + - StageViaPortableAPI + - StartLoopback + - StartReadTimestamp + - Step + - StopProcessing + - SubParams + - SubReturns + - Submit + - Substitute + - Sum + - SumPerKey + - SwapKV + - TimestampPolicy + - ToFunc0x0 + - ToFunc0x1 + - ToFunc0x2 + - ToFunc0x3 + - ToFunc0x4 + - ToFunc1x0 + - ToFunc1x1 + - ToFunc1x2 + - ToFunc1x3 + - ToFunc1x4 + - ToFunc2x0 + - ToFunc2x1 + - ToFunc2x2 + - ToFunc2x3 + - ToFunc2x4 + - ToFunc3x0 + - ToFunc3x1 + - ToFunc3x2 + - ToFunc3x3 + - ToFunc3x4 + - ToFunc4x0 + - ToFunc4x1 + - ToFunc4x2 + - ToFunc4x3 + - ToFunc4x4 + - ToFunc5x0 + - ToFunc5x1 + - ToFunc5x2 + - ToFunc5x3 + - ToFunc5x4 + - ToFunc6x0 + - ToFunc6x1 + - ToFunc6x2 + - ToFunc6x3 + - ToFunc6x4 + - ToFunc7x0 + - ToFunc7x1 + - ToFunc7x2 + - ToFunc7x3 + - ToFunc7x4 + - ToFunc8x0 + - ToFunc8x1 + - ToFunc8x2 + - ToFunc8x3 + - ToFunc8x4 + - ToLogicalType + - ToType + - TopologicalSort + - Transform + - Translate + - Trigger + - TrimCoders + - "True" + - TryCoGroupByKey + - TryCombine + - TryCombinePerKey + - TryCreate + - TryCreateList + - TryCrossLanguage + - TryEqualsFloat + - TryExternal + - TryExternalTagged + - TryFlatten + - TryGroupByKey + - TryParDo + - TryReshuffle + - TryWindowInto + - TypeKey + - TypeReg + - Types + - UnderlyingType + - UnfoldEmit + - UnfoldIter + - UnfoldMultiMap + - UnfoldReIter + - Unmarshal + - UnmarshalCoders + - UnmarshalFrom + - UnmarshalPlan + - UnnamedInput + - UnnamedOutput + - UnnamedOutputTag + - Unpack + - UnpackBase64Proto + - UnpackBytes + - UnpackProto + - Update + - UpdateArtifactTypeFromFileToURL + - UpdateDefaultEnvWorkerType + - UpdateGoEnvironmentWorker + - UpdateMap + - Upload + - UploadHeapProfile + - UrnToString + - UrnToType + - UseAutomatedJavaExpansionService + - UseAutomatedPythonExpansionService + - UseBatchSize + - UseStandardSQL + - UserLabels + - UserStateCoderID + - UserStateKeyCoderID + - VFloat64Fn + - VFn + - ValidateKVType + - ValidateNonCompositeType + - ValidateScheme + - ValueOf + - VerifyNamedOutputs + - WaitForCompletion + - Warn + - Warnf + - Warnln + - WindowInto + - WithArgs + - WithContext + - WithContextf + - WithExpansionAddr + - WithExtraPackages + - WithIndexes + - WithQueryLocation + - WithReadBucketAuto + - WithReadBundleSize + - WithReadFilter + - WithWriteBatchSize + - WithWriteOrdered + - Wrap + - WrapIterable + - WrapMethods + - WrapWindowed + - Wrapf + - Write + - WriteBatch + - WriteClasspaths + - WriteConnectionProperties + - WriteExpansionAddr + - WriteObject + - WriteRowHeader + - WriteSimpleRowHeader + - WriteStatement + - WriteToPostgres + - WriteUnsafe + - WriteWithBatchSize + - WriteWorkerID +AccumulationMode: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +AccumulationMode_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +AfterAllTrigger: + methods: + - String + - SubTriggers +AfterAnyTrigger: + methods: + - String + - SubTriggers +AfterCountTrigger: + methods: + - ElementCount + - String +AfterEachTrigger: + methods: + - String + - Subtriggers +AfterEndOfWindowTrigger: + methods: + - Early + - EarlyFiring + - Late + - LateFiring + - String +AfterProcessingTimeTrigger: + methods: + - AlignedTo + - PlusDelay + - String + - TimestampTransforms +AfterSynchronizedProcessingTimeTrigger: + methods: + - String +AlignToTransform: + methods: + - String + properties: + - Period +AlwaysTrigger: + methods: + - String +Annotation: + methods: + - Descriptor + - GetKey + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - Value +ApiServiceDescriptor: + methods: + - Descriptor + - GetAuthentication + - GetUrl + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Authentication + - Url +ArrayType: + methods: + - Descriptor + - GetElementType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementType +ArrayTypeValue: + methods: + - Descriptor + - GetElement + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Element +ArtifactChunk: + methods: + - Descriptor + - GetData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data +ArtifactFilePayload: + methods: + - Descriptor + - GetPath + - GetSha256 + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Path + - Sha256 +ArtifactInformation: + methods: + - Descriptor + - GetRolePayload + - GetRoleUrn + - GetTypePayload + - GetTypeUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - RolePayload + - RoleUrn + - TypePayload + - TypeUrn +ArtifactMetadata: + methods: + - Descriptor + - GetName + - GetPermissions + - GetSha256 + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - Permissions + - Sha256 +ArtifactRequestWrapper: + methods: + - Descriptor + - GetGetArtifact + - GetRequest + - GetResolveArtifact + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Request +ArtifactRequestWrapper_GetArtifact: + properties: + - GetArtifact +ArtifactRequestWrapper_ResolveArtifact: + properties: + - ResolveArtifact +ArtifactResponseWrapper: + methods: + - Descriptor + - GetGetArtifactResponse + - GetIsLast + - GetResolveArtifactResponse + - GetResponse + - GetStagingToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - IsLast + - Response + - StagingToken +ArtifactResponseWrapper_GetArtifactResponse: + properties: + - GetArtifactResponse +ArtifactResponseWrapper_ResolveArtifactResponse: + properties: + - ResolveArtifactResponse +ArtifactRetrievalService_GetArtifactClient: + methods: + - Recv +ArtifactRetrievalService_GetArtifactServer: + methods: + - Send +ArtifactRetrievalServiceClient: + methods: + - GetArtifact + - ResolveArtifacts +ArtifactRetrievalServiceServer: + methods: + - GetArtifact + - ResolveArtifacts +ArtifactStagingService_ReverseArtifactRetrievalServiceClient: + methods: + - Recv + - Send +ArtifactStagingService_ReverseArtifactRetrievalServiceServer: + methods: + - Recv + - Send +ArtifactStagingServiceClient: + methods: + - ReverseArtifactRetrievalService +ArtifactStagingServiceServer: + methods: + - ReverseArtifactRetrievalService +ArtifactStagingToRolePayload: + methods: + - Descriptor + - GetStagedName + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - StagedName +ArtifactUrlPayload: + methods: + - Descriptor + - GetSha256 + - GetUrl + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Sha256 + - Url +AtomicType: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +AtomicTypeValue: + methods: + - Descriptor + - GetBoolean + - GetByte + - GetBytes + - GetDouble + - GetFloat + - GetInt16 + - GetInt32 + - GetInt64 + - GetString_ + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Value +AtomicTypeValue_Boolean: + properties: + - Boolean +AtomicTypeValue_Byte: + properties: + - Byte +AtomicTypeValue_Bytes: + properties: + - Bytes +AtomicTypeValue_Double: + properties: + - Double +AtomicTypeValue_Float: + properties: + - Float +AtomicTypeValue_Int16: + properties: + - Int16 +AtomicTypeValue_Int32: + properties: + - Int32 +AtomicTypeValue_Int64: + properties: + - Int64 +AtomicTypeValue_String_: + properties: + - String_ +AuthenticationSpec: + methods: + - Descriptor + - GetPayload + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Payload + - Urn +Bag: + methods: + - Add + - Clear + - CoderType + - KeyCoderType + - Read + - StateKey + - StateType + properties: + - Key +BagStateSpec: + methods: + - Descriptor + - GetElementCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementCoderId +BeamConstants: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +BeamConstants_Constants: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +BeamFnControl_ControlClient: + methods: + - Recv + - Send +BeamFnControl_ControlServer: + methods: + - Recv + - Send +BeamFnControlClient: + methods: + - Control + - GetProcessBundleDescriptor +BeamFnControlServer: + methods: + - Control + - GetProcessBundleDescriptor +BeamFnData_DataClient: + methods: + - Recv + - Send +BeamFnData_DataServer: + methods: + - Recv + - Send +BeamFnDataClient: + methods: + - Data +BeamFnDataServer: + methods: + - Data +BeamFnExternalWorkerPoolClient: + methods: + - StartWorker + - StopWorker +BeamFnExternalWorkerPoolServer: + methods: + - StartWorker + - StopWorker +BeamFnLogging_LoggingClient: + methods: + - Recv + - Send +BeamFnLogging_LoggingServer: + methods: + - Recv + - Send +BeamFnLoggingClient: + methods: + - Logging +BeamFnLoggingServer: + methods: + - Logging +BeamFnState_StateClient: + methods: + - Recv + - Send +BeamFnState_StateServer: + methods: + - Recv + - Send +BeamFnStateClient: + methods: + - State +BeamFnStateServer: + methods: + - State +BeamFnWorkerStatus_WorkerStatusClient: + methods: + - Recv + - Send +BeamFnWorkerStatus_WorkerStatusServer: + methods: + - Recv + - Send +BeamFnWorkerStatusClient: + methods: + - WorkerStatus +BeamFnWorkerStatusServer: + methods: + - WorkerStatus +BoundableRTracker: + methods: + - IsBounded +BoundedQuery: + properties: + - End + - Start +BuilderMethod: + methods: + - Descriptor + - GetName + - GetPayload + - GetSchema + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - Payload + - Schema +BundleApplication: + methods: + - Descriptor + - GetElement + - GetInputId + - GetIsBounded + - GetOutputWatermarks + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Element + - InputId + - IsBounded + - OutputWatermarks + - TransformId +BundleFinalization: + methods: + - RegisterCallback +BundleState: + methods: + - String +CacheMetrics: + properties: + - Hits +CancelJobRequest: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +CancelJobResponse: + methods: + - Descriptor + - GetState + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - State +Checkpoint: + properties: + - Reapply + - SR +Class: + methods: + - String +ClosingBehavior: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +ClosingBehavior_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +CoGBK: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Edge + - Out + - UID +Coder: + methods: + - Descriptor + - Equals + - GetComponentCoderIds + - GetSpec + - IsValid + - ProtoMessage + - ProtoReflect + - Reset + - String + - Type + properties: + - ComponentCoderIds + - Components + - Custom + - ID + - Kind + - Spec + - T + - Window +CoderMarshaller: + methods: + - Add + - AddMulti + - AddWindowCoder + - Build + properties: + - Namespace +CoderRef: + properties: + - Components + - IsPairLike + - IsStreamLike + - IsWrapper + - PipelineProtoCoderID + - Type +CoderUnmarshaller: + methods: + - Coder + - Coders + - WindowCoder +Combine: + methods: + - Down + - FinishBundle + - GetPID + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - PID + - UID + - UsesKey +CombineFn: + methods: + - AddInputFn + - CompactFn + - CreateAccumulatorFn + - ExtractOutputFn + - MergeAccumulatorsFn + - Name + - SetupFn + - TeardownFn +CombinePayload: + methods: + - Descriptor + - GetAccumulatorCoderId + - GetCombineFn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AccumulatorCoderId + - CombineFn +Combining: + methods: + - Add + - Clear + - CoderType + - GetCombineFn + - KeyCoderType + - Read + - StateKey + - StateType + properties: + - Key +CombiningPipelineState: + methods: + - GetCombineFn +CombiningStateSpec: + methods: + - Descriptor + - GetAccumulatorCoderId + - GetCombineFn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AccumulatorCoderId + - CombineFn +CommitManifestRequest: + methods: + - Descriptor + - GetManifest + - GetStagingSessionToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Manifest + - StagingSessionToken +CommitManifestResponse: + methods: + - Descriptor + - GetRetrievalToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - RetrievalToken +CommitManifestResponse_Constants: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Components: + methods: + - Descriptor + - GetCoders + - GetEnvironments + - GetPcollections + - GetTransforms + - GetWindowingStrategies + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Coders + - Environments + - Pcollections + - Transforms + - WindowingStrategies +Config: + methods: + - AddElementList + - AddElements + - AdvanceProcessingTime + - AdvanceProcessingTimeToInfinity + - AdvanceWatermark + - AdvanceWatermarkToInfinity +ContentStructure: + methods: + - String +ConvertToAccumulators: + methods: + - ProcessElement + - String +Copier: + methods: + - Copy +Counter: + methods: + - Dec + - Inc + - String +CounterResult: + methods: + - Name + - Namespace + - Result + - Transform + properties: + - Attempted + - Key +CustomCoder: + methods: + - Descriptor + - Equals + - GetDec + - GetEnc + - GetName + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Dec + - Enc + - ID + - Name + - Type +DataChannel: + methods: + - OpenRead + - OpenWrite +DataChannelManager: + methods: + - Open +DataContext: + properties: + - Data + - State +DataManager: + methods: + - OpenRead + - OpenWrite +DataSink: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Coder + - PCol + - SID + - UID +DataSource: + methods: + - Down + - FinishBundle + - ID + - InitSplittable + - Process + - Progress + - Split + - StartBundle + - String + - Up + properties: + - Coder + - Name + - Out + - PCol + - SID + - UID +Decoder: + methods: + - Decode +DefaultTrigger: + methods: + - String +DeferredArtifactPayload: + methods: + - Descriptor + - GetData + - GetKey + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data + - Key +DelayTransform: + methods: + - String + properties: + - Delay +DelayedBundleApplication: + methods: + - Descriptor + - GetApplication + - GetRequestedTimeDelay + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Application + - RequestedTimeDelay +DescribePipelineOptionsRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +DescribePipelineOptionsResponse: + methods: + - Descriptor + - GetOptions + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Options +Discard: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - UID +DiscoverSchemaTransformRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +DiscoverSchemaTransformResponse: + methods: + - Descriptor + - GetError + - GetSchemaTransformConfigs + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error + - SchemaTransformConfigs +DisplayData: + methods: + - Descriptor + - GetPayload + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Payload + - Urn +Distribution: + methods: + - String + - Update +DistributionResult: + methods: + - Name + - Namespace + - Result + - Transform + properties: + - Attempted + - Key +DistributionValue: + properties: + - Count +DoFn: + methods: + - Annotations + - FinishBundleFn + - IsSplittable + - Name + - PipelineState + - ProcessElementFn + - SetupFn + - StartBundleFn + - TeardownFn +DockerPayload: + methods: + - Descriptor + - GetContainerImage + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ContainerImage +DynFn: + methods: + - Descriptor + - GetData + - GetGen + - GetName + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data + - Gen + - Name + - T + - Type +ElementDecoder: + methods: + - Decode + - DecodeTo +ElementEncoder: + methods: + - Encode +ElementProcessor: + methods: + - ProcessElement +Elements: + methods: + - Descriptor + - GetData + - GetTimers + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data + - Timers +Elements_Data: + methods: + - Descriptor + - GetData + - GetInstructionId + - GetIsLast + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data + - InstructionId + - IsLast + - TransformId +Elements_Timers: + methods: + - Descriptor + - GetInstructionId + - GetIsLast + - GetTimerFamilyId + - GetTimers + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - InstructionId + - IsLast + - TimerFamilyId + - Timers + - TransformId +EmbeddedFilePayload: + methods: + - Descriptor + - GetData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data +Emitter: + properties: + - Key + - Name + - Time +EncodedCoder: + methods: + - MarshalJSON + - UnmarshalJSON + properties: + - Coder +EncodedFunc: + methods: + - MarshalJSON + - UnmarshalJSON + properties: + - Fn +EncodedType: + methods: + - MarshalJSON + - UnmarshalJSON + properties: + - T +Encoder: + methods: + - Encode +Entry: + methods: + - Descriptor + - GetElems + - GetFooter + - GetHeader + - GetInstReq + - GetInstResp + - GetKind + - GetLogEntries + - GetMsg + - GetTimestamp + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Kind + - Msg + - Timestamp +Entry_Elems: + properties: + - Elems +Entry_Footer: + properties: + - Footer +Entry_Header: + properties: + - Header +Entry_InstReq: + properties: + - InstReq +Entry_InstResp: + properties: + - InstResp +Entry_LogEntries: + properties: + - LogEntries +EntryHeader: + methods: + - Descriptor + - GetKind + - GetLen + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Kind + - Len +Environment: + methods: + - Descriptor + - GetCapabilities + - GetDependencies + - GetDisplayData + - GetPayload + - GetResourceHints + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Capabilities + - Dependencies + - DisplayData + - Payload + - ResourceHints + - Urn +Eval: + methods: + - AllExported + - Bytes + - Generate + - Performant + - Print + - Printf + - RequiresRegistrations + - UsesDefaultReflectionShims +EventsRequest: + methods: + - Descriptor + - GetOutputIds + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - OutputIds +ExecutableStagePayload: + methods: + - Descriptor + - GetComponents + - GetEnvironment + - GetInput + - GetOutputs + - GetSideInputs + - GetTimerFamilies + - GetTimers + - GetTransforms + - GetUserStates + - GetWireCoderSettings + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Components + - Environment + - Input + - Outputs + - SideInputs + - TimerFamilies + - Timers + - Transforms + - UserStates + - WireCoderSettings +ExecutableStagePayload_SideInputId: + methods: + - Descriptor + - GetLocalName + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - LocalName + - TransformId +ExecutableStagePayload_TimerFamilyId: + methods: + - Descriptor + - GetLocalName + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - LocalName + - TransformId +ExecutableStagePayload_TimerId: + methods: + - Descriptor + - GetLocalName + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - LocalName + - TransformId +ExecutableStagePayload_UserStateId: + methods: + - Descriptor + - GetLocalName + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - LocalName + - TransformId +ExecutableStagePayload_WireCoderSetting: + methods: + - Descriptor + - GetInputOrOutputId + - GetPayload + - GetTarget + - GetTimer + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Payload + - Target + - Urn +ExecutableStagePayload_WireCoderSetting_InputOrOutputId: + properties: + - InputOrOutputId +ExecutableStagePayload_WireCoderSetting_Timer: + properties: + - Timer +ExecutionState: + methods: + - String + properties: + - IsProcessing + - State + - TotalTime +Expand: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Out + - UID + - ValueDecoders +ExpandedTransform: + properties: + - Components + - Requirements + - Transform +ExpansionMethods: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +ExpansionMethods_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +ExpansionPayload: + properties: + - Dialect + - Query +ExpansionRequest: + methods: + - Descriptor + - GetComponents + - GetNamespace + - GetOutputCoderRequests + - GetTransform + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Components + - Namespace + - OutputCoderRequests + - Transform +ExpansionResponse: + methods: + - Descriptor + - GetComponents + - GetError + - GetRequirements + - GetTransform + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Components + - Error + - Requirements + - Transform +ExpansionServiceClient: + methods: + - DiscoverSchemaTransform + - Expand +ExpansionServiceRunner: + methods: + - Endpoint + - StartService + - StopService + - String +ExpansionServiceServer: + methods: + - DiscoverSchemaTransform + - Expand +ExternalConfigurationPayload: + methods: + - Descriptor + - GetPayload + - GetSchema + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Payload + - Schema +ExternalPayload: + methods: + - Descriptor + - GetEndpoint + - GetParams + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Endpoint + - Params +ExternalTransform: + methods: + - WithNamedInputs + - WithNamedOutputs + properties: + - Expanded + - ExpansionAddr + - InputsMap + - Namespace + - OutputsMap + - Payload + - Urn +ExtractOutput: + methods: + - ProcessElement + - String +Extractor: + methods: + - Bytes + - ExtractFrom + - FromAsts + - Generate + - NameType + - Print + - Printf + - Summary + properties: + - Debug + - DistributionInt64 + - GaugeInt64 + - Ids + - LegacyIdentifiers + - MsecsInt64 + - Package + - SumInt64 +Field: + methods: + - Descriptor + - GetDescription + - GetEncodingPosition + - GetId + - GetName + - GetOptions + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Description + - EncodingPosition + - Id + - Name + - Options + - Type +FieldType: + methods: + - Descriptor + - GetArrayType + - GetAtomicType + - GetIterableType + - GetLogicalType + - GetMapType + - GetNullable + - GetRowType + - GetTypeInfo + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Nullable + - TypeInfo +FieldType_ArrayType: + properties: + - ArrayType +FieldType_AtomicType: + properties: + - AtomicType +FieldType_IterableType: + properties: + - IterableType +FieldType_LogicalType: + properties: + - LogicalType +FieldType_MapType: + properties: + - MapType +FieldType_RowType: + properties: + - RowType +FieldValue: + methods: + - Descriptor + - GetArrayValue + - GetAtomicValue + - GetFieldValue + - GetIterableValue + - GetLogicalTypeValue + - GetMapValue + - GetRowValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - FieldValue +FieldValue_ArrayValue: + properties: + - ArrayValue +FieldValue_AtomicValue: + properties: + - AtomicValue +FieldValue_IterableValue: + properties: + - IterableValue +FieldValue_LogicalTypeValue: + properties: + - LogicalTypeValue +FieldValue_MapValue: + properties: + - MapValue +FieldValue_RowValue: + properties: + - RowValue +FinalizeBundleRequest: + methods: + - Descriptor + - GetInstructionId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - InstructionId +FinalizeBundleResponse: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +FixedKey: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Key + - Out + - UID +FixedReStream: + methods: + - Open + properties: + - Buf +FixedStream: + methods: + - Close + - Read + properties: + - Buf +FixedWindowsPayload: + methods: + - Descriptor + - GetOffset + - GetSize + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Offset + - Size +FixedWindowsPayload_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Flatten: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - "N" + - Out + - UID +Fn: + methods: + - BundleFinalization + - Coder + - Context + - Descriptor + - Emits + - Equals + - Error + - EventTime + - GetDynfn + - GetFn + - GetOpt + - GetType + - Inputs + - Name + - OutEventTime + - Pane + - Params + - ProcessContinuation + - ProtoMessage + - ProtoReflect + - RTracker + - Reset + - Returns + - StateProvider + - String + - Type + - WatermarkEstimator + - Window + properties: + - DynFn + - Dynfn + - Fn + - Gap + - Kind + - Opt + - Param + - Period + - Recv + - Ret + - Size + - Type +FnParam: + properties: + - Kind + - T +FnParamKind: + methods: + - String +Footer: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +FullType: + methods: + - Class + - Components + - Descriptor + - GetComponents + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + - Type + properties: + - Components + - Type +FullValue: + methods: + - String + properties: + - Continuation + - Elm + - Elm2 + - Pane + - Timestamp + - Windows +Func: + methods: + - Call + - Name + - Type + properties: + - In + - Name +Func0x0: + methods: + - Call0x0 +Func0x1: + methods: + - Call0x1 +Func0x2: + methods: + - Call0x2 +Func0x3: + methods: + - Call0x3 +Func0x4: + methods: + - Call0x4 +Func1x0: + methods: + - Call1x0 +Func1x1: + methods: + - Call1x1 +Func1x2: + methods: + - Call1x2 +Func1x3: + methods: + - Call1x3 +Func1x4: + methods: + - Call1x4 +Func2x0: + methods: + - Call2x0 +Func2x1: + methods: + - Call2x1 +Func2x2: + methods: + - Call2x2 +Func2x3: + methods: + - Call2x3 +Func2x4: + methods: + - Call2x4 +Func3x0: + methods: + - Call3x0 +Func3x1: + methods: + - Call3x1 +Func3x2: + methods: + - Call3x2 +Func3x3: + methods: + - Call3x3 +Func3x4: + methods: + - Call3x4 +Func4x0: + methods: + - Call4x0 +Func4x1: + methods: + - Call4x1 +Func4x2: + methods: + - Call4x2 +Func4x3: + methods: + - Call4x3 +Func4x4: + methods: + - Call4x4 +Func5x0: + methods: + - Call5x0 +Func5x1: + methods: + - Call5x1 +Func5x2: + methods: + - Call5x2 +Func5x3: + methods: + - Call5x3 +Func5x4: + methods: + - Call5x4 +Func6x0: + methods: + - Call6x0 +Func6x1: + methods: + - Call6x1 +Func6x2: + methods: + - Call6x2 +Func6x3: + methods: + - Call6x3 +Func6x4: + methods: + - Call6x4 +Func7x0: + methods: + - Call7x0 +Func7x1: + methods: + - Call7x1 +Func7x2: + methods: + - Call7x2 +Func7x3: + methods: + - Call7x3 +Func7x4: + methods: + - Call7x4 +Func8x0: + methods: + - Call8x0 +Func8x1: + methods: + - Call8x1 +Func8x2: + methods: + - Call8x2 +Func8x3: + methods: + - Call8x3 +Func8x4: + methods: + - Call8x4 +FunctionSpec: + methods: + - Descriptor + - GetPayload + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Payload + - Urn +Gauge: + methods: + - Set + - String +GaugeResult: + methods: + - Name + - Namespace + - Result + - Transform + properties: + - Attempted + - Key +GaugeValue: + properties: + - Timestamp + - Value +GenID: + methods: + - New +GetArtifactRequest: + methods: + - Descriptor + - GetArtifact + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Artifact +GetArtifactResponse: + methods: + - Descriptor + - GetData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data +GetJobMetricsRequest: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +GetJobMetricsResponse: + methods: + - Descriptor + - GetMetrics + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Metrics +GetJobPipelineRequest: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +GetJobPipelineResponse: + methods: + - Descriptor + - GetPipeline + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Pipeline +GetJobStateRequest: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +GetJobsRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +GetJobsResponse: + methods: + - Descriptor + - GetJobInfo + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobInfo +GetManifestRequest: + methods: + - Descriptor + - GetRetrievalToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - RetrievalToken +GetManifestResponse: + methods: + - Descriptor + - GetManifest + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Manifest +GetProcessBundleDescriptorRequest: + methods: + - Descriptor + - GetProcessBundleDescriptorId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ProcessBundleDescriptorId +GetProvisionInfoRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +GetProvisionInfoResponse: + methods: + - Descriptor + - GetInfo + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Info +GlobalWindow: + methods: + - Equals + - MaxTimestamp + - String +GlobalWindowsPayload: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +GlobalWindowsPayload_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Graph: + methods: + - Build + - NewEdge + - NewNode + - NewScope + - Root + - String +GroupIntoBatchesPayload: + methods: + - Descriptor + - GetBatchSize + - GetBatchSizeBytes + - GetMaxBufferingDurationMillis + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - BatchSize + - BatchSizeBytes + - MaxBufferingDurationMillis +GrowableTracker: + methods: + - End + - GetProgress + - IsBounded + - Start + - TrySplit +GuardedError: + methods: + - Error + - TrySetError +HandlerParams: + methods: + - CoderMarshaller + - Inputs + - Outputs + properties: + - Config + - Req +HarnessMonitoringInfosRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +HarnessMonitoringInfosResponse: + methods: + - Descriptor + - GetMonitoringData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - MonitoringData +Header: + methods: + - Descriptor + - GetMaxMsgLen + - GetSdkVersion + - GetVersion + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - MaxMsgLen + - SdkVersion + - Version +Hint: + methods: + - MergeWithOuter + - Payload + - URN +Hints: + methods: + - Equal + - MergeWithOuter + - Payloads +Hook: + properties: + - Dialer + - Init + - Req + - Resp +Impulse: + methods: + - Down + - FinishBundle + - ID + - Process + - StartBundle + - String + - Up + properties: + - Out + - UID + - Value +Inbound: + methods: + - String + properties: + - From + - Kind + - Type +Inject: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - "N" + - Out + - UID + - ValueEncoder +InjectPayload: + methods: + - Descriptor + - GetN + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - "N" +Input: + properties: + - Key + - Name + - Time +InstructionRequest: + methods: + - Descriptor + - GetFinalizeBundle + - GetHarnessMonitoringInfos + - GetInstructionId + - GetMonitoringInfos + - GetProcessBundle + - GetProcessBundleProgress + - GetProcessBundleSplit + - GetRegister + - GetRequest + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - InstructionId + - Request +InstructionRequest_FinalizeBundle: + properties: + - FinalizeBundle +InstructionRequest_HarnessMonitoringInfos: + properties: + - HarnessMonitoringInfos +InstructionRequest_MonitoringInfos: + properties: + - MonitoringInfos +InstructionRequest_ProcessBundle: + properties: + - ProcessBundle +InstructionRequest_ProcessBundleProgress: + properties: + - ProcessBundleProgress +InstructionRequest_ProcessBundleSplit: + properties: + - ProcessBundleSplit +InstructionRequest_Register: + properties: + - Register +InstructionResponse: + methods: + - Descriptor + - GetError + - GetFinalizeBundle + - GetHarnessMonitoringInfos + - GetInstructionId + - GetMonitoringInfos + - GetProcessBundle + - GetProcessBundleProgress + - GetProcessBundleSplit + - GetRegister + - GetResponse + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error + - InstructionId + - Response +InstructionResponse_FinalizeBundle: + properties: + - FinalizeBundle +InstructionResponse_HarnessMonitoringInfos: + properties: + - HarnessMonitoringInfos +InstructionResponse_MonitoringInfos: + properties: + - MonitoringInfos +InstructionResponse_ProcessBundle: + properties: + - ProcessBundle +InstructionResponse_ProcessBundleProgress: + properties: + - ProcessBundleProgress +InstructionResponse_ProcessBundleSplit: + properties: + - ProcessBundleSplit +InstructionResponse_Register: + properties: + - Register +Interface: + methods: + - List + - OpenRead + - OpenWrite + - Size +IntervalWindow: + methods: + - Equals + - MaxTimestamp + - String + properties: + - Start +IsBounded: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +IsBounded_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +IterableType: + methods: + - Descriptor + - GetElementType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementType +IterableTypeValue: + methods: + - Descriptor + - GetElement + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Element +JavaClassLookupPayload: + methods: + - Descriptor + - GetBuilderMethods + - GetClassName + - GetConstructorMethod + - GetConstructorPayload + - GetConstructorSchema + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - BuilderMethods + - ClassName + - ConstructorMethod + - ConstructorPayload + - ConstructorSchema +JobInfo: + methods: + - Descriptor + - GetJobId + - GetJobName + - GetPipelineOptions + - GetState + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId + - JobName + - PipelineOptions + - State +JobMessage: + methods: + - Descriptor + - GetImportance + - GetMessageId + - GetMessageText + - GetTime + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Importance + - MessageId + - MessageText + - Time +JobMessage_MessageImportance: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +JobMessagesRequest: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +JobMessagesResponse: + methods: + - Descriptor + - GetMessageResponse + - GetResponse + - GetStateResponse + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Response +JobMessagesResponse_MessageResponse: + properties: + - MessageResponse +JobMessagesResponse_StateResponse: + properties: + - StateResponse +JobOptions: + properties: + - Algorithm + - ArtifactURLs + - ContainerImage + - DataflowServiceOptions + - DiskSizeGb + - DiskType + - EnableHotKeyLogging + - Experiments + - FlexRSGoal + - KmsKey + - Labels + - MachineType + - MaxNumWorkers + - Name + - Network + - NoUsePublicIPs + - NumWorkers + - Options + - Parallelism + - Project + - Region + - RetainDocker + - ServiceAccountEmail + - Streaming + - Subnetwork + - TeardownPolicy + - TempLocation + - TemplateLocation + - TransformNameMapping + - Update + - Worker + - WorkerHarnessThreads + - WorkerRegion + - WorkerZone + - Zone +JobService_GetMessageStreamClient: + methods: + - Recv +JobService_GetMessageStreamServer: + methods: + - Send +JobService_GetStateStreamClient: + methods: + - Recv +JobService_GetStateStreamServer: + methods: + - Send +JobServiceClient: + methods: + - Cancel + - DescribePipelineOptions + - GetJobMetrics + - GetJobs + - GetMessageStream + - GetPipeline + - GetState + - GetStateStream + - Prepare + - Run +JobServiceServer: + methods: + - Cancel + - DescribePipelineOptions + - GetJobMetrics + - GetJobs + - GetMessageStream + - GetPipeline + - GetState + - GetStateStream + - Prepare + - Run +JobState: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +JobState_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +JobStateEvent: + methods: + - Descriptor + - GetState + - GetTimestamp + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - State + - Timestamp +KV: {} +KeyedFile: + properties: + - Key +Kind: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +LabelledPayload: + methods: + - Descriptor + - GetBoolValue + - GetDoubleValue + - GetIntValue + - GetKey + - GetLabel + - GetNamespace + - GetStringValue + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - Label + - Namespace + - Value +LabelledPayload_BoolValue: + properties: + - BoolValue +LabelledPayload_DoubleValue: + properties: + - DoubleValue +LabelledPayload_IntValue: + properties: + - IntValue +LabelledPayload_StringValue: + properties: + - StringValue +Labels: + methods: + - Map + - Name + - Namespace + - PCollection + - Transform +LegacyArtifactRetrievalService_GetArtifactClient: + methods: + - Recv +LegacyArtifactRetrievalService_GetArtifactServer: + methods: + - Send +LegacyArtifactRetrievalServiceClient: + methods: + - GetArtifact + - GetManifest +LegacyArtifactRetrievalServiceServer: + methods: + - GetArtifact + - GetManifest +LegacyArtifactStagingService_PutArtifactClient: + methods: + - CloseAndRecv + - Send +LegacyArtifactStagingService_PutArtifactServer: + methods: + - Recv + - SendAndClose +LegacyArtifactStagingServiceClient: + methods: + - CommitManifest + - PutArtifact +LegacyArtifactStagingServiceServer: + methods: + - CommitManifest + - PutArtifact +LegacyGetArtifactRequest: + methods: + - Descriptor + - GetName + - GetRetrievalToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - RetrievalToken +LiftedCombine: + methods: + - Down + - FinishBundle + - ProcessElement + - StartBundle + - String + - Up + properties: + - KeyCoder + - WindowCoder +LockRTracker: + methods: + - GetError + - GetProgress + - GetRestriction + - IsBounded + - IsDone + - String + - TryClaim + - TrySplit + properties: + - Mu + - Rt +LogControl: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +LogEntry: + methods: + - Descriptor + - GetInstructionId + - GetLogLocation + - GetMessage + - GetSeverity + - GetThread + - GetTimestamp + - GetTrace + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - InstructionId + - LogLocation + - Message + - Severity + - Thread + - Timestamp + - Trace + - TransformId +LogEntry_List: + methods: + - Descriptor + - GetLogEntries + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - LogEntries +LogEntry_Severity: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +LogEntry_Severity_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Logger: + methods: + - Log +LogicalType: + methods: + - ArgumentType + - ArgumentValue + - Descriptor + - GetArgument + - GetArgumentType + - GetPayload + - GetRepresentation + - GetUrn + - GoType + - ID + - ProtoMessage + - ProtoReflect + - Reset + - StorageType + - String + properties: + - Argument + - ArgumentType + - Payload + - Representation + - Urn +LogicalTypeValue: + methods: + - Descriptor + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Value +LogicalTypes: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +LogicalTypes_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Loopback: + methods: + - EnvironmentConfig + - StartWorker + - Stop + - StopWorker +MainInput: + properties: + - Key + - RTracker + - Values +Manifest: + methods: + - Descriptor + - GetArtifact + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Artifact +ManualWatermarkEstimator: + methods: + - CurrentWatermark + - UpdateWatermark + properties: + - State +Map: + methods: + - Clear + - CoderType + - Get + - KeyCoderType + - Keys + - Put + - Remove + - StateKey + - StateType + properties: + - Key +MapLoader: + methods: + - LoadMap +MapStateSpec: + methods: + - Descriptor + - GetKeyCoderId + - GetValueCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - KeyCoderId + - ValueCoderId +MapType: + methods: + - Descriptor + - GetKeyType + - GetValueType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - KeyType + - ValueType +MapTypeEntry: + methods: + - Descriptor + - GetKey + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - Value +MapTypeValue: + methods: + - Descriptor + - GetEntries + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Entries +MapWindows: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - UID +MavenPayload: + methods: + - Descriptor + - GetArtifact + - GetRepositoryUrl + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Artifact + - RepositoryUrl +MergeAccumulators: + methods: + - ProcessElement + - String + - Up +MergeStatus: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +MergeStatus_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +MessageWithComponents: + methods: + - Descriptor + - GetCoder + - GetCombinePayload + - GetComponents + - GetFunctionSpec + - GetParDoPayload + - GetPcollection + - GetPtransform + - GetReadPayload + - GetRoot + - GetSideInput + - GetWindowIntoPayload + - GetWindowingStrategy + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Components + - Root +MessageWithComponents_Coder: + properties: + - Coder +MessageWithComponents_CombinePayload: + properties: + - CombinePayload +MessageWithComponents_FunctionSpec: + properties: + - FunctionSpec +MessageWithComponents_ParDoPayload: + properties: + - ParDoPayload +MessageWithComponents_Pcollection: + properties: + - Pcollection +MessageWithComponents_Ptransform: + properties: + - Ptransform +MessageWithComponents_ReadPayload: + properties: + - ReadPayload +MessageWithComponents_SideInput: + properties: + - SideInput +MessageWithComponents_WindowIntoPayload: + properties: + - WindowIntoPayload +MessageWithComponents_WindowingStrategy: + properties: + - WindowingStrategy +MetricResults: + methods: + - Descriptor + - GetAttempted + - GetCommitted + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Attempted + - Committed +MonitoringInfo: + methods: + - Descriptor + - GetLabels + - GetPayload + - GetStartTime + - GetType + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Labels + - Payload + - StartTime + - Type + - Urn +MonitoringInfo_MonitoringInfoLabels: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +MonitoringInfoLabelProps: + methods: + - Descriptor + - GetName + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name +MonitoringInfoSpec: + methods: + - Descriptor + - GetAnnotations + - GetRequiredLabels + - GetType + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Annotations + - RequiredLabels + - Type + - Urn +MonitoringInfoSpecs: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +MonitoringInfoSpecs_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +MonitoringInfoTypeUrns: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +MonitoringInfoTypeUrns_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +MonitoringInfosMetadataRequest: + methods: + - Descriptor + - GetMonitoringInfoId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - MonitoringInfoId +MonitoringInfosMetadataResponse: + methods: + - Descriptor + - GetMonitoringInfo + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - MonitoringInfo +MsecResult: + methods: + - Name + - Namespace + - Result + - Transform + properties: + - Attempted + - Key +MsecValue: + properties: + - Start +MultiEdge: + methods: + - Descriptor + - GetFn + - GetInbound + - GetOpcode + - GetOutbound + - GetWindowFn + - ID + - Name + - ProtoMessage + - ProtoReflect + - Reset + - Scope + - String + properties: + - AccumCoder + - CombineFn + - DoFn + - External + - Fn + - Inbound + - Input + - Op + - Opcode + - Outbound + - Output + - Payload + - RestrictionCoder + - StateCoders + - Value + - WindowFn +MultiEdge_Inbound: + methods: + - Descriptor + - GetKind + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Kind + - Type +MultiEdge_Inbound_InputKind: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +MultiEdge_Outbound: + methods: + - Descriptor + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Type +Multiplex: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Out + - UID +Mutation: + methods: + - Set + - WithGroupKey + properties: + - GroupKey + - Ops + - RowKey +NamedEdge: + properties: + - Edge + - Name +NamedScope: + properties: + - Name + - Scope +NeverTrigger: + methods: + - String +Node: + methods: + - Bounded + - ID + - String + - Type + - WindowingStrategy + properties: + - Coder +Nullable: {} +OnTimeBehavior: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +OnTimeBehavior_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Operation: + properties: + - Column + - Family + - Ts + - Value +Option: + methods: + - Descriptor + - GetName + - GetType + - GetValue + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - Payload + - Type + - Urn + - Value +Options: + methods: + - Add + - Export + - Get + - Import + - LoadOptionsFromFlags + - Set + properties: + - Environment + - PipelineResourceHints +Opts: + properties: + - InternalSharding + - K + - NumQuantiles +OrFinallyTrigger: + methods: + - Finally + - Main + - String +OrderedListStateSpec: + methods: + - Descriptor + - GetElementCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementCoderId +Outbound: + methods: + - String + properties: + - To + - Type +OutputTime: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +OutputTime_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +PCol: + methods: + - ID + - WSID + - WindowingStrategy + properties: + - Bounded + - Coder + - Index + - Local +PColResult: + methods: + - Name + - Namespace + - Result + - Transform + properties: + - Attempted + - Key +PColValue: + properties: + - ElementCount + - SampledByteSize +PCollection: + methods: + - Coder + - Descriptor + - Down + - FinishBundle + - GetCoderId + - GetDisplayData + - GetIsBounded + - GetUniqueName + - GetWindowingStrategyId + - ID + - IsValid + - ProcessElement + - ProtoMessage + - ProtoReflect + - Reset + - SetCoder + - StartBundle + - String + - Type + - Up + properties: + - Coder + - CoderId + - DisplayData + - IsBounded + - Out + - PColID + - Seed + - UID + - UniqueName + - WindowingStrategyId +PCollectionSnapshot: + properties: + - ElementCount + - ID + - SizeCount +PTransform: + methods: + - Descriptor + - GetAnnotations + - GetDisplayData + - GetEnvironmentId + - GetInputs + - GetOutputs + - GetSpec + - GetSubtransforms + - GetUniqueName + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Annotations + - DisplayData + - EnvironmentId + - Inputs + - Outputs + - Spec + - Subtransforms + - UniqueName +PTransformState: + methods: + - Set +PairWithRestriction: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - UID +PaneInfo: + properties: + - Index + - IsFirst + - Timing +ParDo: + methods: + - AttachFinalizer + - Down + - FinishBundle + - GetPID + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Inbound + - Out + - PID + - Side + - UID + - UState +ParDoPayload: + methods: + - Descriptor + - GetDoFn + - GetOnWindowExpirationTimerFamilySpec + - GetRequestsFinalization + - GetRequiresStableInput + - GetRequiresTimeSortedInput + - GetRestrictionCoderId + - GetSideInputs + - GetStateSpecs + - GetTimerFamilySpecs + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - DoFn + - OnWindowExpirationTimerFamilySpec + - RequestsFinalization + - RequiresStableInput + - RequiresTimeSortedInput + - RestrictionCoderId + - SideInputs + - StateSpecs + - TimerFamilySpecs +Payload: + properties: + - Config + - Data + - DataSchema + - InputsMap + - Location + - OutputsMap + - URN +Pipeline: + methods: + - Build + - Descriptor + - GetComponents + - GetDisplayData + - GetRequirements + - GetRootTransformIds + - ProtoMessage + - ProtoReflect + - Reset + - Root + - String + properties: + - Components + - DisplayData + - Requirements + - RootTransformIds +PipelineOptionDescriptor: + methods: + - Descriptor + - GetDefaultValue + - GetDescription + - GetGroup + - GetName + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - DefaultValue + - Description + - Group + - Name + - Type +PipelineOptionType: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +PipelineOptionType_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +PipelineResult: + methods: + - JobID + - Metrics +PipelineState: + methods: + - CoderType + - KeyCoderType + - StateKey + - StateType +Plan: + methods: + - Checkpoint + - Down + - Execute + - Finalize + - GetExpirationTime + - ID + - Progress + - SourcePTransformID + - Split + - String +PlanSnapshot: + properties: + - PCols + - Source +Port: + properties: + - URL +PredictionResult: + properties: + - Example + - Inference +PrepareJobRequest: + methods: + - Descriptor + - GetJobName + - GetPipeline + - GetPipelineOptions + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobName + - Pipeline + - PipelineOptions +PrepareJobResponse: + methods: + - Descriptor + - GetArtifactStagingEndpoint + - GetPreparationId + - GetStagingSessionToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ArtifactStagingEndpoint + - PreparationId + - StagingSessionToken +ProcessBundleDescriptor: + methods: + - Descriptor + - GetCoders + - GetEnvironments + - GetId + - GetPcollections + - GetStateApiServiceDescriptor + - GetTimerApiServiceDescriptor + - GetTransforms + - GetWindowingStrategies + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Coders + - Environments + - Id + - Pcollections + - StateApiServiceDescriptor + - TimerApiServiceDescriptor + - Transforms + - WindowingStrategies +ProcessBundleProgressRequest: + methods: + - Descriptor + - GetInstructionId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - InstructionId +ProcessBundleProgressResponse: + methods: + - Descriptor + - GetMonitoringData + - GetMonitoringInfos + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - MonitoringData + - MonitoringInfos +ProcessBundleRequest: + methods: + - Descriptor + - GetCacheTokens + - GetElements + - GetProcessBundleDescriptorId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - CacheTokens + - Elements + - ProcessBundleDescriptorId +ProcessBundleRequest_CacheToken: + methods: + - Descriptor + - GetSideInput + - GetToken + - GetType + - GetUserState + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Token + - Type +ProcessBundleRequest_CacheToken_SideInput: + methods: + - Descriptor + - GetSideInputId + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - SideInputId + - TransformId +ProcessBundleRequest_CacheToken_SideInput_: + properties: + - SideInput +ProcessBundleRequest_CacheToken_UserState: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +ProcessBundleRequest_CacheToken_UserState_: + properties: + - UserState +ProcessBundleResponse: + methods: + - Descriptor + - GetElements + - GetMonitoringData + - GetMonitoringInfos + - GetRequiresFinalization + - GetResidualRoots + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Elements + - MonitoringData + - MonitoringInfos + - RequiresFinalization + - ResidualRoots +ProcessBundleSplitRequest: + methods: + - Descriptor + - GetDesiredSplits + - GetInstructionId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - DesiredSplits + - InstructionId +ProcessBundleSplitRequest_DesiredSplit: + methods: + - Descriptor + - GetAllowedSplitPoints + - GetEstimatedInputElements + - GetFractionOfRemainder + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AllowedSplitPoints + - EstimatedInputElements + - FractionOfRemainder +ProcessBundleSplitResponse: + methods: + - Descriptor + - GetChannelSplits + - GetPrimaryRoots + - GetResidualRoots + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ChannelSplits + - PrimaryRoots + - ResidualRoots +ProcessBundleSplitResponse_ChannelSplit: + methods: + - Descriptor + - GetFirstResidualElement + - GetLastPrimaryElement + - GetTransformId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - FirstResidualElement + - LastPrimaryElement + - TransformId +ProcessContinuation: + methods: + - ResumeDelay + - ShouldResume +ProcessPayload: + methods: + - Descriptor + - GetArch + - GetCommand + - GetEnv + - GetOs + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Arch + - Command + - Env + - Os +ProcessSizedElementsAndRestrictions: + methods: + - AttachFinalizer + - Checkpoint + - Down + - FinishBundle + - GetInputId + - GetOutputWatermark + - GetProgress + - GetTransformId + - ID + - ProcessElement + - Split + - StartBundle + - String + - Up + properties: + - PDo + - SU + - TfId +ProgressReportSnapshot: + properties: + - Count + - ID +Provider: + methods: + - AddInputFn + - ClearBagState + - ClearMapState + - ClearMapStateKey + - ClearValueState + - CreateAccumulatorFn + - ExtractOutputFn + - MergeAccumulatorsFn + - ReadBagState + - ReadMapStateKeys + - ReadMapStateValue + - ReadValueState + - WriteBagState + - WriteMapState + - WriteValueState +ProvisionInfo: + methods: + - Descriptor + - GetArtifactEndpoint + - GetControlEndpoint + - GetDependencies + - GetLoggingEndpoint + - GetMetadata + - GetPipelineOptions + - GetRetrievalToken + - GetRunnerCapabilities + - GetSiblingWorkerIds + - GetStatusEndpoint + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ArtifactEndpoint + - ControlEndpoint + - Dependencies + - LoggingEndpoint + - Metadata + - PipelineOptions + - RetrievalToken + - RunnerCapabilities + - SiblingWorkerIds + - StatusEndpoint +ProvisionServiceClient: + methods: + - GetProvisionInfo +ProvisionServiceServer: + methods: + - GetProvisionInfo +ProxyManifest: + methods: + - Descriptor + - GetLocation + - GetManifest + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Location + - Manifest +ProxyManifest_Location: + methods: + - Descriptor + - GetName + - GetUri + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - Uri +PubSubReadPayload: + methods: + - Descriptor + - GetIdAttribute + - GetSubscription + - GetSubscriptionRuntimeOverridden + - GetTimestampAttribute + - GetTopic + - GetTopicRuntimeOverridden + - GetWithAttributes + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - IdAttribute + - Subscription + - SubscriptionRuntimeOverridden + - TimestampAttribute + - Topic + - TopicRuntimeOverridden + - WithAttributes +PubSubWritePayload: + methods: + - Descriptor + - GetIdAttribute + - GetTimestampAttribute + - GetTopic + - GetTopicRuntimeOverridden + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - IdAttribute + - TimestampAttribute + - Topic + - TopicRuntimeOverridden +PutArtifactMetadata: + methods: + - Descriptor + - GetMetadata + - GetStagingSessionToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Metadata + - StagingSessionToken +PutArtifactRequest: + methods: + - Descriptor + - GetContent + - GetData + - GetMetadata + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Content +PutArtifactRequest_Data: + properties: + - Data +PutArtifactRequest_Metadata: + properties: + - Metadata +PutArtifactResponse: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +PyPIPayload: + methods: + - Descriptor + - GetArtifactId + - GetVersion + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ArtifactId + - Version +QualifiedTableName: + methods: + - String + properties: + - Dataset + - Project + - Table +QueryOptions: + properties: + - UseStandardSQL +QueryResults: + methods: + - Counters + - Distributions + - Gauges + - Msecs + - PCols +RTracker: + methods: + - GetError + - GetProgress + - GetRestriction + - IsDone + - TryClaim + - TrySplit +RangeEndEstimator: + methods: + - Estimate +RawOptions: + properties: + - Options +RawOptionsWrapper: + properties: + - AppName + - Experiments + - Options + - Parallelism + - RetainDocker + - Runner +ReStream: + methods: + - Open +ReadModifyWriteStateSpec: + methods: + - Descriptor + - GetCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - CoderId +ReadOption: + properties: + - BucketAuto + - BundleSize + - Filter +ReadOptions: + properties: + - IDAttribute + - Subscription + - TimestampAttribute + - WithAttributes +ReadPayload: + methods: + - Descriptor + - GetIsBounded + - GetSource + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - IsBounded + - Source +RegisterRequest: + methods: + - Descriptor + - GetProcessBundleDescriptor + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ProcessBundleDescriptor +RegisterResponse: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +Registry: + methods: + - FromType + - RegisterLogicalType + - RegisterLogicalTypeProvider + - RegisterType + - Registered + - ToType +RemoteGrpcPort: + methods: + - Descriptor + - GetApiServiceDescriptor + - GetCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ApiServiceDescriptor + - CoderId +Remover: + methods: + - Remove +Renamer: + methods: + - Rename +RepeatTrigger: + methods: + - String + - SubTrigger +ReshuffleInput: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Coder + - Out + - SID + - Seed + - UID +ReshuffleOutput: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Coder + - Out + - SID + - UID +ReshufflePayload: + methods: + - Descriptor + - GetCoderId + - GetCoderPayloads + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - CoderId + - CoderPayloads +ResolveArtifactsRequest: + methods: + - Descriptor + - GetArtifacts + - GetPreferredUrns + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Artifacts + - PreferredUrns +ResolveArtifactsResponse: + methods: + - Descriptor + - GetReplacements + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Replacements +ResolveConfig: + properties: + - JoinFn + - SdkPath +Restriction: + methods: + - EvenSplits + - Size + - SizedSplits + properties: + - Start +Results: + methods: + - AllMetrics + - Query +RetrievalServer: + methods: + - GetArtifact + - GetManifest +ReturnKind: + methods: + - String +ReturnParam: + properties: + - Kind + - T +ReusableEmitter: + methods: + - Init + - Value +ReusableInput: + methods: + - Init + - Reset + - Value +ReusableTimestampObservingWatermarkEmitter: + methods: + - AttachEstimator +Root: + methods: + - Process +Row: + methods: + - Descriptor + - GetValues + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Values +RowDecoderBuilder: + methods: + - Build + - Register + properties: + - RequireAllFieldsExported +RowEncoderBuilder: + methods: + - Build + - Register + properties: + - RequireAllFieldsExported +RowType: + methods: + - Descriptor + - GetSchema + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Schema +RunJobRequest: + methods: + - Descriptor + - GetPreparationId + - GetRetrievalToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - PreparationId + - RetrievalToken +RunJobResponse: + methods: + - Descriptor + - GetJobId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - JobId +SCombine: + methods: + - MergeAccumulators +Schema: + methods: + - Descriptor + - GetEncodingPositionsSet + - GetFields + - GetId + - GetOptions + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - EncodingPositionsSet + - Fields + - Id + - Options +SchemaCoder: + methods: + - Register + - Validate + properties: + - CmpOptions +SchemaProvider: + methods: + - BuildDecoder + - BuildEncoder + - FromLogicalType +SchemaTransformConfig: + methods: + - Descriptor + - GetConfigSchema + - GetInputPcollectionNames + - GetOutputPcollectionNames + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ConfigSchema + - InputPcollectionNames + - OutputPcollectionNames +SchemaTransformPayload: + methods: + - Descriptor + - GetConfigurationRow + - GetConfigurationSchema + - GetIdentifier + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ConfigurationRow + - ConfigurationSchema + - Identifier +Scope: + methods: + - ID + - IsValid + - Scope + - String + properties: + - Label + - Parent +ScopeTree: + properties: + - Children + - Edges + - Scope +ScopedDataManager: + methods: + - Close + - OpenRead + - OpenWrite +ScopedStateReader: + methods: + - Close + - GetSideInputCache + - OpenBagUserStateAppender + - OpenBagUserStateClearer + - OpenBagUserStateReader + - OpenIterable + - OpenIterableSideInput + - OpenMultiMapSideInput + - OpenMultimapKeysUserStateClearer + - OpenMultimapKeysUserStateReader + - OpenMultimapUserStateAppender + - OpenMultimapUserStateClearer + - OpenMultimapUserStateReader +SdfFallback: + methods: + - AttachFinalizer + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - PDo +SearchQuery: + properties: + - Identifier + - Parameters + - ResourceType +SessionWindowsPayload: + methods: + - Descriptor + - GetGapSize + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - GapSize +SessionWindowsPayload_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Set: + methods: + - Add + - Clear + - CoderType + - Contains + - KeyCoderType + - Keys + - Remove + - StateKey + - StateType + properties: + - Key +SetStateSpec: + methods: + - Descriptor + - GetElementCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementCoderId +SideCache: + methods: + - QueryCache + - SetCache +SideInput: + methods: + - Descriptor + - GetAccessPattern + - GetViewFn + - GetWindowMappingFn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AccessPattern + - Input + - ViewFn + - WindowMappingFn +SideInputAdapter: + methods: + - NewIterable + - NewKeyedIterable +SideInputCache: + methods: + - CacheMetrics + - CompleteBundle + - Init + - QueryCache + - SetCache + - SetValidTokens +Signature: + methods: + - String + properties: + - Args + - OptArgs + - OptReturn + - Return +SingleResult: + methods: + - Name + - Namespace + - Transform +SliceLoader: + methods: + - LoadSlice +SlidingWindowsPayload: + methods: + - Descriptor + - GetOffset + - GetPeriod + - GetSize + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Offset + - Period + - Size +SlidingWindowsPayload_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +SourceConfig: + properties: + - HotKeyFraction + - InitialSplits + - KeySize + - NumElements + - NumHotKeys + - ValueSize +SourceConfigBuilder: + methods: + - Build + - BuildFromJSON + - HotKeyFraction + - InitialSplits + - KeySize + - NumElements + - NumHotKeys + - ValueSize +SplitAndSizeRestrictions: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - UID +SplitPoints: + properties: + - BufSize + - Frac + - Splits +SplitResult: + properties: + - InId + - OW + - PI + - PS + - RI + - RS + - TId + - Unsuccessful +SplittableDoFn: + methods: + - CreateInitialRestrictionFn + - CreateTrackerFn + - CreateWatermarkEstimatorFn + - HasTruncateRestriction + - InitialWatermarkEstimatorStateFn + - IsStatefulWatermarkEstimating + - IsWatermarkEstimating + - Name + - RestrictionSizeFn + - RestrictionT + - SplitRestrictionFn + - TruncateRestrictionFn + - WatermarkEstimatorStateFn + - WatermarkEstimatorStateT + - WatermarkEstimatorT +SplittableUnit: + methods: + - Checkpoint + - GetInputId + - GetOutputWatermark + - GetProgress + - GetTransformId + - Split +StagingServer: + methods: + - CommitManifest + - PutArtifact +Standard: + methods: + - Log + properties: + - Level +StandardArtifacts: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardArtifacts_Roles: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardArtifacts_Types: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardCoders: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardCoders_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardDisplayData: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardDisplayData_DisplayData: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardEnvironments: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardEnvironments_Environments: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardPTransforms_CombineComponents: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms_Composites: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms_DeprecatedPrimitives: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms_GroupIntoBatchesComponents: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms_Primitives: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardPTransforms_SplittableParDoComponents: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardProtocols: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardProtocols_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardRequirements: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardRequirements_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardResourceHints: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardResourceHints_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardRunnerProtocols: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardRunnerProtocols_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardSideInputTypes: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardSideInputTypes_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StandardUserStateTypes: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StandardUserStateTypes_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +StartWorkerRequest: + methods: + - Descriptor + - GetArtifactEndpoint + - GetControlEndpoint + - GetLoggingEndpoint + - GetParams + - GetProvisionEndpoint + - GetWorkerId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ArtifactEndpoint + - ControlEndpoint + - LoggingEndpoint + - Params + - ProvisionEndpoint + - WorkerId +StartWorkerResponse: + methods: + - Descriptor + - GetError + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error +StateAppendRequest: + methods: + - Descriptor + - GetData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Data +StateAppendResponse: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StateChannel: + methods: + - Send + properties: + - DoneCh +StateChannelManager: + methods: + - Open +StateClearRequest: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StateClearResponse: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +StateGetRequest: + methods: + - Descriptor + - GetContinuationToken + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ContinuationToken +StateGetResponse: + methods: + - Descriptor + - GetContinuationToken + - GetData + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ContinuationToken + - Data +StateKey: + methods: + - Descriptor + - GetBagUserState + - GetIterableSideInput + - GetMultimapKeysSideInput + - GetMultimapKeysUserState + - GetMultimapSideInput + - GetMultimapUserState + - GetRunner + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Type +StateKey_BagUserState: + methods: + - Descriptor + - GetKey + - GetTransformId + - GetUserStateId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - TransformId + - UserStateId + - Window +StateKey_BagUserState_: + properties: + - BagUserState +StateKey_IterableSideInput: + methods: + - Descriptor + - GetSideInputId + - GetTransformId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - SideInputId + - TransformId + - Window +StateKey_IterableSideInput_: + properties: + - IterableSideInput +StateKey_MultimapKeysSideInput: + methods: + - Descriptor + - GetSideInputId + - GetTransformId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - SideInputId + - TransformId + - Window +StateKey_MultimapKeysSideInput_: + properties: + - MultimapKeysSideInput +StateKey_MultimapKeysUserState: + methods: + - Descriptor + - GetKey + - GetTransformId + - GetUserStateId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - TransformId + - UserStateId + - Window +StateKey_MultimapKeysUserState_: + properties: + - MultimapKeysUserState +StateKey_MultimapSideInput: + methods: + - Descriptor + - GetKey + - GetSideInputId + - GetTransformId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - SideInputId + - TransformId + - Window +StateKey_MultimapSideInput_: + properties: + - MultimapSideInput +StateKey_MultimapUserState: + methods: + - Descriptor + - GetKey + - GetMapKey + - GetTransformId + - GetUserStateId + - GetWindow + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key + - MapKey + - TransformId + - UserStateId + - Window +StateKey_MultimapUserState_: + properties: + - MultimapUserState +StateKey_Runner: + methods: + - Descriptor + - GetKey + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Key +StateKey_Runner_: + properties: + - Runner +StateReader: + methods: + - GetSideInputCache + - OpenBagUserStateAppender + - OpenBagUserStateClearer + - OpenBagUserStateReader + - OpenIterable + - OpenIterableSideInput + - OpenMultiMapSideInput + - OpenMultimapKeysUserStateClearer + - OpenMultimapKeysUserStateReader + - OpenMultimapUserStateAppender + - OpenMultimapUserStateClearer + - OpenMultimapUserStateReader +StateRequest: + methods: + - Descriptor + - GetAppend + - GetClear + - GetGet + - GetId + - GetInstructionId + - GetRequest + - GetStateKey + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Id + - InstructionId + - Request + - StateKey +StateRequest_Append: + properties: + - Append +StateRequest_Clear: + properties: + - Clear +StateRequest_Get: + properties: + - Get +StateResponse: + methods: + - Descriptor + - GetAppend + - GetClear + - GetError + - GetGet + - GetId + - GetResponse + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error + - Id + - Response +StateResponse_Append: + properties: + - Append +StateResponse_Clear: + properties: + - Clear +StateResponse_Get: + properties: + - Get +StateSampler: + methods: + - Sample + - SetLogInterval +StateSpec: + methods: + - Descriptor + - GetBagSpec + - GetCombiningSpec + - GetMapSpec + - GetOrderedListSpec + - GetProtocol + - GetReadModifyWriteSpec + - GetSetSpec + - GetSpec + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Protocol + - Spec +StateSpec_BagSpec: + properties: + - BagSpec +StateSpec_CombiningSpec: + properties: + - CombiningSpec +StateSpec_MapSpec: + properties: + - MapSpec +StateSpec_OrderedListSpec: + properties: + - OrderedListSpec +StateSpec_ReadModifyWriteSpec: + properties: + - ReadModifyWriteSpec +StateSpec_SetSpec: + properties: + - SetSpec +Status: + methods: + - String +StepConfig: + properties: + - FilterRatio + - InitialSplits + - OutputPerInput + - Splittable +StepConfigBuilder: + methods: + - Build + - FilterRatio + - InitialSplits + - OutputPerInput + - Splittable +StepKey: + properties: + - Step +StopWorkerRequest: + methods: + - Descriptor + - GetWorkerId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - WorkerId +StopWorkerResponse: + methods: + - Descriptor + - GetError + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error +Store: + methods: + - BundleState + - StateRegistry +Stream: + methods: + - Read +StreamID: + methods: + - String + properties: + - Port + - PtransformID +SymbolResolver: + methods: + - Sym2Addr +SymbolTable: + methods: + - Addr2Sym + - Sym2Addr +T: + methods: + - Errorf + - FailNow + - Failed + - Helper + - Run +TestStreamPayload: + methods: + - Descriptor + - GetCoderId + - GetEndpoint + - GetEvents + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - CoderId + - Endpoint + - Events +TestStreamPayload_Event: + methods: + - Descriptor + - GetElementEvent + - GetEvent + - GetProcessingTimeEvent + - GetWatermarkEvent + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Event +TestStreamPayload_Event_AddElements: + methods: + - Descriptor + - GetElements + - GetTag + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Elements + - Tag +TestStreamPayload_Event_AdvanceProcessingTime: + methods: + - Descriptor + - GetAdvanceDuration + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AdvanceDuration +TestStreamPayload_Event_AdvanceWatermark: + methods: + - Descriptor + - GetNewWatermark + - GetTag + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - NewWatermark + - Tag +TestStreamPayload_Event_ElementEvent: + properties: + - ElementEvent +TestStreamPayload_Event_ProcessingTimeEvent: + properties: + - ProcessingTimeEvent +TestStreamPayload_Event_WatermarkEvent: + properties: + - WatermarkEvent +TestStreamPayload_TimestampedElement: + methods: + - Descriptor + - GetEncodedElement + - GetTimestamp + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - EncodedElement + - Timestamp +TestStreamService_EventsClient: + methods: + - Recv +TestStreamService_EventsServer: + methods: + - Send +TestStreamServiceClient: + methods: + - Events +TestStreamServiceServer: + methods: + - Events +Time: + methods: + - Add + - Milliseconds + - String + - Subtract + - ToTime +TimeDomain: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +TimeDomain_Enum: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +TimerFamilySpec: + methods: + - Descriptor + - GetTimeDomain + - GetTimerFamilyCoderId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - TimeDomain + - TimerFamilyCoderId +TimerMap: + properties: + - Clear + - FireTimestamp + - Key + - Pane + - Windows +Timers: + properties: + - Clear + - FireTimestamp + - Key + - Pane + - Tag + - Windows +TimestampObservingEstimator: + methods: + - ObserveTimestamp +TimestampObservingWatermarkEstimator: + methods: + - CurrentWatermark + - ObserveTimestamp + properties: + - State +TimestampTransform: + methods: + - Descriptor + - GetAlignTo + - GetDelay + - GetTimestampTransform + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - TimestampTransform +TimestampTransform_AlignTo: + methods: + - Descriptor + - GetOffset + - GetPeriod + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Offset + - Period +TimestampTransform_AlignTo_: + properties: + - AlignTo +TimestampTransform_Delay: + methods: + - Descriptor + - GetDelayMillis + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - DelayMillis +TimestampTransform_Delay_: + properties: + - Delay +Top: + properties: + - Emitters + - FileName + - Functions + - Imports + - Inputs + - Shims + - Types + - Wraps +Tracker: + methods: + - GetError + - GetProgress + - GetRestriction + - IsBounded + - IsDone + - String + - TryClaim + - TrySplit +Transaction: + properties: + - Key + - MapKey + - Type + - Val +TransformPayload: + methods: + - Descriptor + - GetEdge + - GetInject + - GetReshuffle + - GetUrn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Edge + - Inject + - Reshuffle + - Urn +Trigger: + methods: + - Descriptor + - GetAfterAll + - GetAfterAny + - GetAfterEach + - GetAfterEndOfWindow + - GetAfterProcessingTime + - GetAfterSynchronizedProcessingTime + - GetAlways + - GetDefault + - GetElementCount + - GetNever + - GetOrFinally + - GetRepeat + - GetTrigger + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Trigger +Trigger_AfterAll: + methods: + - Descriptor + - GetSubtriggers + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Subtriggers +Trigger_AfterAll_: + properties: + - AfterAll +Trigger_AfterAny: + methods: + - Descriptor + - GetSubtriggers + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Subtriggers +Trigger_AfterAny_: + properties: + - AfterAny +Trigger_AfterEach: + methods: + - Descriptor + - GetSubtriggers + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Subtriggers +Trigger_AfterEach_: + properties: + - AfterEach +Trigger_AfterEndOfWindow: + methods: + - Descriptor + - GetEarlyFirings + - GetLateFirings + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - EarlyFirings + - LateFirings +Trigger_AfterEndOfWindow_: + properties: + - AfterEndOfWindow +Trigger_AfterProcessingTime: + methods: + - Descriptor + - GetTimestampTransforms + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - TimestampTransforms +Trigger_AfterProcessingTime_: + properties: + - AfterProcessingTime +Trigger_AfterSynchronizedProcessingTime: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +Trigger_AfterSynchronizedProcessingTime_: + properties: + - AfterSynchronizedProcessingTime +Trigger_Always: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +Trigger_Always_: + properties: + - Always +Trigger_Default: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +Trigger_Default_: + properties: + - Default +Trigger_ElementCount: + methods: + - Descriptor + - GetElementCount + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ElementCount +Trigger_ElementCount_: + properties: + - ElementCount +Trigger_Never: + methods: + - Descriptor + - ProtoMessage + - ProtoReflect + - Reset + - String +Trigger_Never_: + properties: + - Never +Trigger_OrFinally: + methods: + - Descriptor + - GetFinally + - GetMain + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Finally + - Main +Trigger_OrFinally_: + properties: + - OrFinally +Trigger_Repeat: + methods: + - Descriptor + - GetSubtrigger + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Subtrigger +Trigger_Repeat_: + properties: + - Repeat +TruncateSizedRestriction: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - UID +Type: + methods: + - Descriptor + - GetChanDir + - GetElement + - GetExternalKey + - GetFields + - GetIsVariadic + - GetKind + - GetParameterTypes + - GetReturnTypes + - GetSpecial + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - ChanDir + - Element + - ExternalKey + - Fields + - IsVariadic + - Kind + - ParameterTypes + - ReturnTypes + - Special +Type_ChanDir: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Type_Kind: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Type_Special: + methods: + - Descriptor + - Enum + - EnumDescriptor + - Number + - String + - Type +Type_StructField: + methods: + - Descriptor + - GetAnonymous + - GetIndex + - GetName + - GetOffset + - GetPkgPath + - GetTag + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Anonymous + - Index + - Name + - Offset + - PkgPath + - Tag + - Type +TypeDefinition: + properties: + - T + - Var +TypeMismatchError: + methods: + - Error + properties: + - Got +UnimplementedArtifactRetrievalServiceServer: + methods: + - GetArtifact + - ResolveArtifacts +UnimplementedArtifactStagingServiceServer: + methods: + - ReverseArtifactRetrievalService +UnimplementedBeamFnControlServer: + methods: + - Control + - GetProcessBundleDescriptor +UnimplementedBeamFnDataServer: + methods: + - Data +UnimplementedBeamFnExternalWorkerPoolServer: + methods: + - StartWorker + - StopWorker +UnimplementedBeamFnLoggingServer: + methods: + - Logging +UnimplementedBeamFnStateServer: + methods: + - State +UnimplementedBeamFnWorkerStatusServer: + methods: + - WorkerStatus +UnimplementedExpansionServiceServer: + methods: + - DiscoverSchemaTransform + - Expand +UnimplementedJobServiceServer: + methods: + - Cancel + - DescribePipelineOptions + - GetJobMetrics + - GetJobs + - GetMessageStream + - GetPipeline + - GetState + - GetStateStream + - Prepare + - Run +UnimplementedLegacyArtifactRetrievalServiceServer: + methods: + - GetArtifact + - GetManifest +UnimplementedLegacyArtifactStagingServiceServer: + methods: + - CommitManifest + - PutArtifact +UnimplementedProvisionServiceServer: + methods: + - GetProvisionInfo +UnimplementedTestStreamServiceServer: + methods: + - Events +Unit: + methods: + - Down + - FinishBundle + - ID + - StartBundle + - Up +UnsafeArtifactRetrievalServiceServer: {} +UnsafeArtifactStagingServiceServer: {} +UnsafeBeamFnControlServer: {} +UnsafeBeamFnDataServer: {} +UnsafeBeamFnExternalWorkerPoolServer: {} +UnsafeBeamFnLoggingServer: {} +UnsafeBeamFnStateServer: {} +UnsafeBeamFnWorkerStatusServer: {} +UnsafeExpansionServiceServer: {} +UnsafeJobServiceServer: {} +UnsafeLegacyArtifactRetrievalServiceServer: {} +UnsafeLegacyArtifactStagingServiceServer: {} +UnsafeProvisionServiceServer: {} +UnsafeTestStreamServiceServer: {} +UserFn: + methods: + - Descriptor + - GetName + - GetType + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Name + - Type +UserStateAdapter: + methods: + - NewStateProvider +Value: + methods: + - Clear + - CoderType + - KeyCoderType + - Read + - StateKey + - StateType + - Write + properties: + - Key +WallTimeWatermarkEstimator: + methods: + - CurrentWatermark +WatermarkEstimator: + methods: + - CurrentWatermark +Window: + methods: + - Equals + - MaxTimestamp +WindowCoder: + methods: + - Equals + - String + properties: + - Kind + - Payload +WindowDecoder: + methods: + - Decode + - DecodeSingle +WindowEncoder: + methods: + - Encode + - EncodeSingle +WindowFn: + methods: + - Descriptor + - GetGapMs + - GetKind + - GetPeriodMs + - GetSizeMs + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - GapMs + - Kind + - PeriodMs + - SizeMs +WindowInto: + methods: + - Down + - FinishBundle + - ID + - ProcessElement + - StartBundle + - String + - Up + properties: + - Fn + - Out + - UID +WindowIntoOption: {} +WindowIntoPayload: + methods: + - Descriptor + - GetWindowFn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - WindowFn +WindowMapper: + methods: + - MapWindow +WindowedValue: {} +WindowingStrategy: + methods: + - Descriptor + - Equals + - GetAccumulationMode + - GetAllowedLateness + - GetAssignsToOneWindow + - GetClosingBehavior + - GetEnvironmentId + - GetMergeStatus + - GetOnTimeBehavior + - GetOutputTime + - GetTrigger + - GetWindowCoderId + - GetWindowFn + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - AccumulationMode + - AllowedLateness + - AssignsToOneWindow + - ClosingBehavior + - EnvironmentId + - Fn + - MergeStatus + - OnTimeBehavior + - OutputTime + - Trigger + - WindowCoderId + - WindowFn +WorkerStatusRequest: + methods: + - Descriptor + - GetId + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Id +WorkerStatusResponse: + methods: + - Descriptor + - GetError + - GetId + - GetStatusInfo + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - Error + - Id + - StatusInfo +Wrap: + properties: + - Methods + - Name +WrappedTracker: + methods: + - IsBounded +WriteFilesPayload: + methods: + - Descriptor + - GetFormatFunction + - GetRunnerDeterminedSharding + - GetSideInputs + - GetSink + - GetWindowedWrites + - ProtoMessage + - ProtoReflect + - Reset + - String + properties: + - FormatFunction + - RunnerDeterminedSharding + - SideInputs + - Sink + - WindowedWrites +WriteOption: + properties: + - BatchSize + - Ordered +Writer: + methods: + - SaveData diff --git a/playground/frontend/build/playground_components/assets/symbols/java.g.yaml b/playground/frontend/build/playground_components/assets/symbols/java.g.yaml new file mode 100644 index 000000000000..e0f2b1d15d14 --- /dev/null +++ b/playground/frontend/build/playground_components/assets/symbols/java.g.yaml @@ -0,0 +1,13665 @@ +AbstractBeamCalcRel: + methods: + - beamComputeSelfCost + - estimateNodeStats + - getLimitCountOfSortRel + - isInputSortRelAndLimitOnly +AbstractSimulator: + methods: + - hasNext + - next + - remove + - results + - resultsPerWindow +ActionFactory: + methods: + - childPartitionsRecordAction + - dataChangeRecordAction + - detectNewPartitionsAction + - heartbeatRecordAction + - queryChangeStreamAction +AdaptableCollector: + methods: + - asContext + - collect + - getCounter + - getHistogram + - getTimer + - setProcessContext +AddFields: + methods: + - create + - expand + - field + - processElement +AddHarnessIdInterceptor: + methods: + - create +AddUuidsTransform: + methods: + - expand +AdvancingPhaser: {} +AfterAll: + methods: + - getWatermarkThatGuaranteesFiring + - of + - toString +AfterEach: + methods: + - getWatermarkThatGuaranteesFiring + - inOrder + - mayFinish + - toString +AfterFirst: + methods: + - getWatermarkThatGuaranteesFiring + - of + - toString +AfterPane: + methods: + - elementCountAtLeast + - equals + - getElementCount + - getWatermarkThatGuaranteesFiring + - hashCode + - isCompatible + - toString +AfterProcessingTime: + methods: + - alignedTo + - equals + - getTimestampTransforms + - getWatermarkThatGuaranteesFiring + - hashCode + - isCompatible + - pastFirstElementInPane + - plusDelayOf + - toString +AfterSynchronizedProcessingTime: + methods: + - equals + - getWatermarkThatGuaranteesFiring + - hashCode + - ofFirstElement + - toString +AfterWatermark: + methods: + - equals + - getContinuationTrigger + - getEarlyTrigger + - getLateTrigger + - getWatermarkThatGuaranteesFiring + - hashCode + - mayFinish + - pastEndOfWindow + - toString + - withEarlyFirings + - withLateFirings +AggregationCombineFnAdapter: + methods: + - addInput + - createAccumulator + - createCombineFn + - createCombineFnAnalyticsFunctions + - createConstantCombineFn + - extractOutput + - getAccumulatorCoder + - getDefaultOutputCoder + - mergeAccumulators + properties: + - EMPTY_ROW + - EMPTY_SCHEMA + - INSTANCE +AggregationQuery: + methods: + - apply + - create + - withMongoDbPipeline +AmqpIO: + methods: + - advance + - close + - createReader + - expand + - finalizeCheckpoint + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getOutputCoder + - getWatermark + - populateDisplayData + - processElement + - read + - setup + - split + - start + - teardown + - withAddresses + - withMaxNumRecords + - withMaxReadTime + - write +AmqpMessageCoder: + methods: + - decode + - encode +AmqpMessageCoderProviderRegistrar: + methods: + - getCoderProviders +AnnotateText: + methods: + - build + - expand + - features + - languageHint + - newBuilder + - processElement + - setFeatures + - setLanguageHint +ApiSurface: + methods: + - classesInPackage + - containsOnlyClassesMatching + - containsOnlyPackages + - describeTo + - empty + - getAnyExposurePath + - getExposedClasses + - getRootClasses + - includingClass + - includingPackage + - ofClass + - ofPackage + - pruningClass + - pruningClassName + - pruningPattern + - pruningPrefix +AppliedCombineFn: + methods: + - getAccumulatorCoder + - getFn + - getKvCoder + - getSideInputViews + - getWindowingStrategy + - withAccumulatorCoder + - withInputCoder +AppliedPTransform: + methods: + - getFullName + - getInputs + - getMainInputs + - getOutputs + - getPipeline + - getResourceHints + - getTransform + - of +ApproximateCountDistinct: + methods: + - build + - expand + - getMapping + - getPrecision + - getUdaf + - globally + - perKey + - populateDisplayData + - setMapping + - setPrecision + - toBuilder + - via + - withPercision +ApproximateDistinct: + methods: + - addInput + - apply + - create + - createAccumulator + - decode + - encode + - expand + - extractOutput + - globally + - isRegisterByteSizeObserverCheap + - mergeAccumulators + - of + - perKey + - populateDisplayData + - precisionForRelativeError + - processElement + - relativeErrorForPrecision + - withPrecision + - withSparsePrecision + - withSparseRepresentation +ApproximateQuantiles: + methods: + - addInput + - create + - createAccumulator + - decode + - empty + - encode + - equals + - extractOutput + - getAccumulatorCoder + - globally + - hasNext + - hashCode + - isEmpty + - mergeAccumulator + - next + - perKey + - populateDisplayData + - registerByteSizeObserver + - singleton + - sizedIterator + - toString + - verifyDeterministic + - withEpsilon + - withMaxInputSize + properties: + - DEFAULT_MAX_NUM_ELEMENTS +ApproximateUnique: + methods: + - add + - addInput + - createAccumulator + - equals + - expand + - extractOutput + - getAccumulatorCoder + - globally + - hashCode + - mergeAccumulators + - perKey + - populateDisplayData +ArrayAgg: + methods: + - addInput + - createAccumulator + - extractOutput + - mergeAccumulators +ArrowConversion: + methods: + - arrowSchemaFromInput + - close + - create + - get + - hasNext + - name + - next + - rowsFromRecordBatch + - rowsFromSerializedRecordBatch + - toBeamSchema + - visit +AsJsons: + methods: + - apply + - exceptionsInto + - exceptionsVia + - expand + - of + - withMapper +AssignEventTime: + methods: + - expand + - getEventTimeExtractor + - named + - of + - output + - using +AtomicCoder: + methods: + - equals + - getCoderArguments + - getComponents + - hashCode + - verifyDeterministic +AttributeValueCoder: + methods: + - decode + - encode + - of +AttributeValueCoderProviderRegistrar: + methods: + - getCoderProviders +Auction: + methods: + - decode + - encode + - equals + - hasAnnotation + - hashCode + - sizeInBytes + - structuralValue + - toString + - withAnnotation + - withoutAnnotation + properties: + - CODER + - category + - dateTime + - description + - expires + - extra + - id + - initialBid + - itemName + - reserve + - seller +AuctionBid: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + properties: + - CODER + - auction + - bid +AuctionCount: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + properties: + - CODER + - auction + - num +AuctionGenerator: + methods: + - lastBase0AuctionId + - nextAuction + - nextBase0AuctionId +AuctionOrBid: + methods: + - apply +AuctionPrice: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + properties: + - CODER + - auction + - price +AutoValueSchema: + methods: + - fieldValueGetters + - fieldValueTypeInformations + - get + - schemaFor + - schemaTypeCreator + properties: + - INSTANCE +AutoValueUtils: + methods: + - appender + - getBaseAutoValueClass + - getBuilderCreator + - getConstructorCreator + - prepare +AvroCoder: + methods: + - check + - coderFor + - decode + - encode + - equals + - fromLong + - get + - getCoderProvider + - getConvertedType + - getEncodedTypeDescriptor + - getLogicalTypeName + - getSchema + - getType + - hashCode + - initialValue + - of + - toLong + - useReflectApi + - verifyDeterministic +AvroGenericCoder: + methods: + - of +AvroIO: + methods: + - apply + - constantDestinations + - expand + - flush + - from + - open + - parseAllGenericRecords + - parseFilesGenericRecords + - parseGenericRecords + - populateDisplayData + - read + - readAll + - readAllGenericRecords + - readFiles + - readFilesGenericRecords + - readGenericRecords + - sink + - sinkViaGenericRecords + - to + - toResource + - watchForNewFiles + - withBeamSchemas + - withCodec + - withCoder + - withDatumReaderFactory + - withDatumWriterFactory + - withEmptyMatchTreatment + - withFileExceptionHandler + - withFormatFunction + - withHintMatchesManyFiles + - withMatchConfiguration + - withMetadata + - withNoSpilling + - withNumShards + - withOutputFilenames + - withSchema + - withShardNameTemplate + - withSuffix + - withSyncInterval + - withTempDirectory + - withUsesReshuffle + - withWindowedWrites + - withoutSharding + - write + - writeCustomType + - writeCustomTypeToGenericRecords + - writeGenericRecords +AvroPayloadSerializerProvider: + methods: + - getSerializer + - identifier +AvroRecordSchema: + methods: + - fieldValueGetters + - fieldValueTypeInformations + - schemaFor + - schemaTypeCreator +AvroSchemaIOProvider: + methods: + - buildReader + - buildWriter + - configurationSchema + - expand + - from + - identifier + - isBounded + - requiresDataSchema + - schema +AvroSink: + methods: + - createWriteOperation + - createWriter + - getDynamicDestinations + - write +AvroSource: + methods: + - close + - createForSubrangeOfFile + - from + - getCodec + - getCurrentBlock + - getCurrentBlockOffset + - getCurrentBlockSize + - getCurrentRecord + - getCurrentSource + - getFractionOfBlockConsumed + - getOutputCoder + - getSchemaString + - getSplitPointsRemaining + - getSyncMarker + - length + - read + - readNextBlock + - readNextRecord + - seek + - tell + - validate + - withDatumReaderFactory + - withEmptyMatchTreatment + - withMinBundleSize + - withParseFn + - withSchema +AvroTableProvider: + methods: + - getSchemaIOProvider + - getTableType +AvroUtils: + methods: + - apply + - convertAvroFieldStrict + - createGetterConversions + - createSetterConversions + - createTypeConversion + - equals + - fromAvroType + - fromBeamFieldType + - get + - getAvroBytesToRowFunction + - getCreator + - getFieldTypes + - getFromRowFunction + - getGenericRecordToRowFunction + - getGetters + - getRowToAvroBytesFunction + - getRowToGenericRecordFunction + - getSchema + - getSize + - getToRowFunction + - hashCode + - schemaCoder + - toAvroField + - toAvroSchema + - toAvroType + - toBeamField + - toBeamRowStrict + - toBeamSchema + - toBeamType + - toGenericRecord + - withSize + properties: + - nullable + - type +AvroWriteRequest: + methods: + - getElement + - getSchema +AwsBuilderFactory: {} +AwsCoders: + methods: + - awsResponseMetadata + - decode + - encode + - of + - responseMetadata + - sdkHttpMetadata + - sdkHttpMetadataWithoutHeaders + - sdkHttpResponse + - sdkHttpResponseWithoutHeaders + - verifyDeterministic +AwsModule: + methods: + - canCreateUsingDefault + - createUsingDefault + - deserialize + - deserializeWithType + - serialize + - serializeWithType + - setupModule + properties: + - CLIENT_EXECUTION_TIMEOUT + - CONNECTION_MAX_IDLE_TIME + - CONNECTION_TIMEOUT + - CONNECTION_TIME_TO_LIVE + - MAX_CONNECTIONS + - PROXY_HOST + - PROXY_PASSWORD + - PROXY_PORT + - PROXY_USERNAME + - REQUEST_TIMEOUT + - SOCKET_TIMEOUT +AwsPipelineOptionsRegistrar: + methods: + - getPipelineOptions +AwsSchemaProvider: + methods: + - apply + - create + - equals + - fieldValueGetters + - fieldValueTypeInformations + - fromRowFunction + - hashCode + - schemaFor + - schemaTypeCreator +AwsSchemaRegistrar: + methods: + - getSchemaProviders +AwsSerializableUtils: + methods: + - deserialize + - deserializeAwsCredentialsProvider + - serialize + - serializeAwsCredentialsProvider +AwsTypes: {} +AzureBlobStoreFileSystemRegistrar: + methods: + - fromOptions +AzureModule: + methods: + - deserialize + - deserializeWithType + - serialize + - serializeWithType +AzurePipelineOptionsRegistrar: + methods: + - getPipelineOptions +BackOffAdapter: + methods: + - nextBackOffMillis + - reset + - toGcpBackOff +BackOffUtils: + methods: + - next +BagUserState: + methods: + - append + - asyncClose + - clear + - get +BaseBeamTable: + methods: + - buildIOReader + - constructFilter + - getTableStatistics + - supportsProjects +BasicDynamoDBProvider: + methods: + - createDynamoDB +BasicDynamoDbClientProvider: + methods: + - equals + - getDynamoDbClient + - hashCode +BatchContextImpl: + methods: + - addProperties + - addTags + - asMap + - createDataset + - datasetExists + - discardDataset + - get + - getArguments + - getDataset + - getFailureCollector + - getInputFormatProvider + - getInputSchema + - getInputSchemas + - getLogicalStartTime + - getMetadata + - getMetrics + - getNamespace + - getOutputFormatProvider + - getOutputPortSchemas + - getOutputSchema + - getPipelineName + - getPluginProperties + - getServiceURL + - getStageName + - has + - iterator + - loadPluginClass + - newPluginInstance + - provide + - record + - releaseDataset + - removeMetadata + - removeProperties + - removeTags + - set + properties: + - DEFAULT_SCHEMA_FIELD_NAME + - DEFAULT_SCHEMA_RECORD_NAME +BatchSinkContextImpl: + methods: + - addOutput + - isPreviewEnabled +BatchSourceContextImpl: + methods: + - getMaxPreviewRecords + - isPreviewEnabled + - setInput +BeamAccumulatorProvider: + methods: + - add + - create + - get + - getCounter + - getFactory + - getHistogram + - getName + - getNamespace + - getTimer + - increment +BeamAggregateProjectMergeRule: + methods: + - onMatch + properties: + - INSTANCE +BeamAggregationRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - explainTerms + - processElement +BeamAggregationRule: + methods: + - onMatch + properties: + - INSTANCE +BeamBasicAggregationRule: + methods: + - onMatch + properties: + - INSTANCE +BeamBigQuerySqlDialect: + methods: + - quoteIdentifier + - unparseCall + - unparseDateTimeLiteral + - unparseSqlIntervalLiteral + properties: + - DEFAULT + - DEFAULT_CONTEXT + - DOUBLE_NAN_WRAPPER + - DOUBLE_NEGATIVE_INF_WRAPPER + - DOUBLE_POSITIVE_INF_WRAPPER + - IN_ARRAY_OPERATOR + - NUMERIC_LITERAL_WRAPPER +BeamBuiltinAggregations: + methods: + - addInput + - apply + - create + - createAccumulator + - createBitXOr + - extractOutput + - getAccumulatorCoder + - identity + - mergeAccumulators + - toBigDecimal + properties: + - BUILTIN_AGGREGATOR_FACTORIES +BeamBuiltinAnalyticFunctions: + methods: + - addInput + - create + - createAccumulator + - extractOutput + - mergeAccumulators + - navigationFirstValue + - navigationLastValue + - numberingDenseRank + - numberingPercentRank + - numberingRank + - numberingRowNumber + properties: + - BUILTIN_ANALYTIC_FACTORIES +BeamBuiltinFunctionProvider: + methods: + - getBuiltinMethods +BeamBuiltinMethods: + properties: + - CHAR_LENGTH_METHOD + - CONCAT_METHOD + - DATE_METHOD + - ENDS_WITH_METHOD + - LIKE_METHOD + - LTRIM_METHOD + - REPLACE_METHOD + - REVERSE_METHOD + - RTRIM_METHOD + - STARTS_WITH_METHOD + - SUBSTR_METHOD + - TIMESTAMP_METHOD + - TRIM_METHOD +BeamCalcMergeRule: + methods: + - onMatch + properties: + - INSTANCE +BeamCalcRel: + methods: + - buildPTransform + - copy + - entrySet + - expand + - field + - get + - getQueryProvider + - getRootSchema + - getTypeFactory + - processElement + - setup + - size +BeamCalcRule: + methods: + - convert + - matches + properties: + - INSTANCE +BeamCalcSplittingRule: + methods: + - matches + - onMatch +BeamCalciteSchema: + methods: + - getExpression + - getFunctionNames + - getFunctions + - getPipelineOptions + - getSubSchema + - getSubSchemaNames + - getTable + - getTableNames + - getTableProvider + - getType + - getTypeNames + - isMutable + - removeAllPipelineOptions + - removePipelineOption + - setPipelineOption + - snapshot +BeamCalciteTable: + methods: + - asQueryable + - getModifiableCollection + - getRowType + - getStatistic + - of + - toModificationRel + - toRel +BeamCoGBKJoinRel: + methods: + - buildPTransform + - copy + - expand +BeamCoGBKJoinRule: + methods: + - matches + - onMatch + properties: + - INSTANCE +BeamCodegenUtils: + methods: + - toStringTimestamp + - toStringUTF8 +BeamCostModel: + methods: + - convertRelOptCost + - divideBy + - equals + - getCpu + - getCpuRate + - getIo + - getRows + - hashCode + - isEqWithEpsilon + - isInfinite + - isLe + - isLt + - makeCost + - makeHugeCost + - makeInfiniteCost + - makeTinyCost + - makeZeroCost + - minus + - multiplyBy + - plus + - toString + properties: + - FACTORY +BeamEnumerableConverter: + methods: + - computeSelfCost + - copy + - createPipelineOptions + - implement + - processElement + - startBundle + - toEnumerable + - toRowList + - visitValue +BeamEnumerableConverterRule: + methods: + - convert + properties: + - INSTANCE +BeamFnControlClient: + methods: + - delegateOnInstructionRequestType + - onCompleted + - onError + - onNext + - sendInstructionResponse + - waitForTermination +BeamFnDataGrpcClient: + methods: + - createOutboundAggregator + - registerReceiver + - unregisterReceiver +BeamFnDataGrpcMultiplexer: + methods: + - close + - getInboundObserver + - getOutboundObserver + - onCompleted + - onError + - onNext + - registerConsumer + - toString +BeamFnDataGrpcMultiplexer2: + methods: + - close + - getInboundObserver + - getOutboundObserver + - onCompleted + - onError + - onNext + - registerConsumer + - toString + - unregisterConsumer +BeamFnDataInboundObserver: + methods: + - accept + - awaitCompletion + - cancel + - complete + - fail + - forConsumer + - isDone + - runWhenComplete +BeamFnDataInboundObserver2: + methods: + - accept + - awaitCompletion + - close + - flush + - forConsumers + - getUnfinishedEndpoints + - multiplexElements + - reset + properties: + - INSTANCE +BeamFnDataOutboundAggregator: + methods: + - accept + - bufferedSize + - discard + - equals + - getByteCount + - getElementCount + - hashCode + - registerOutputDataLocation + - registerOutputTimersLocation + - resetStats + - sendElements + - sendOrCollectBufferedDataAndFinishOutboundStreams + - start + - toByteStringAndResetBuffer + - toString + properties: + - DATA_BUFFER_SIZE_LIMIT + - DATA_BUFFER_TIME_LIMIT_MS + - DEFAULT_BUFFER_LIMIT_BYTES + - DEFAULT_BUFFER_LIMIT_TIME_MS +BeamFnDataOutboundObserver: + methods: + - accept + - close + - flush +BeamFnDataReadRunner: + methods: + - blockTillReadFinishes + - createRunnerForPTransform + - forwardElementToConsumer + - getCache + - getCurrentInstructionId + - getPTransformRunnerFactories + - getStateClient + - reset + - trySplit + - updateFinalMonitoringData + - updateIntermediateMonitoringData +BeamFnDataWriteRunner: + methods: + - createRunnerForPTransform + - getCache + - getCurrentInstructionId + - getPTransformRunnerFactories + - getStateClient +BeamFnLoggingClient: + methods: + - beforeStart + - close + - flush + - onCompleted + - onError + - onNext + - publish + - run + - setProcessBundleHandler + - toString +BeamFnLoggingClientBenchmark: + methods: + - logging + - onCompleted + - onError + - onNext + - tearDown + - testLogging + - testLoggingWithAllOptionalParameters + - testSkippedLogging + properties: + - loggingClient + - loggingService + - server +BeamFnLoggingMDC: + methods: + - getInstructionId + - setInstructionId +BeamFnStateGrpcClientCache: + methods: + - forApiServiceDescriptor + - handle + - onCompleted + - onError + - onNext +BeamFnStatusClient: + methods: + - close + - equals + - getInstruction + - getTimeSinceTransition + - getTrackedThreadName + - hashCode + - onCompleted + - onError + - onNext +BeamIOPushDownRule: + methods: + - onMatch + properties: + - INSTANCE +BeamIOSinkRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - flattenRel + - getPipelineOptions + - register +BeamIOSinkRule: + methods: + - convert + properties: + - INSTANCE +BeamIOSourceRel: + methods: + - beamComputeSelfCost + - buildPTransform + - computeSelfCost + - createPushDownRel + - estimateNodeStats + - estimateRowCount + - expand + - getBeamSqlTable + - getPipelineOptions + - isBounded + properties: + - CONSTANT_WINDOW_SIZE +BeamIntersectRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats +BeamIntersectRule: + methods: + - convert + properties: + - INSTANCE +BeamJavaTypeFactory: + methods: + - getJavaClass + properties: + - INSTANCE +BeamJavaUdfCalcRule: + properties: + - INSTANCE +BeamJoinAssociateRule: + methods: + - onMatch + properties: + - INSTANCE +BeamJoinPushThroughJoinRule: + methods: + - onMatch + properties: + - LEFT + - RIGHT +BeamJoinRel: + methods: + - beamComputeSelfCost + - containsSeekableInput + - estimateNodeStats + - getBoundednessOfRelNode + - getPCollectionInputs + - isJoinLegal + - seekable +BeamJoinTransforms: + methods: + - expand + - getJoinColumns + - processElement + - setup + - teardown +BeamKafkaCSVTable: + methods: + - expand + - processElement +BeamKafkaTable: + methods: + - buildIOReader + - buildIOWriter + - getBootstrapServers + - getTableStatistics + - getTopics + - isBounded + - updateConsumerProperties +BeamMatchRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - processElement +BeamMatchRule: + methods: + - convert + properties: + - INSTANCE +BeamMinusRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats +BeamMinusRule: + methods: + - convert + properties: + - INSTANCE +BeamPCollectionTable: + methods: + - buildIOReader + - buildIOWriter + - isBounded +BeamPushDownIOSourceRel: + methods: + - beamComputeSelfCost + - buildPTransform + - expand + - explainTerms +BeamRelDataTypeSystem: + methods: + - getDefaultPrecision + - getMaxNumericPrecision + - getMaxNumericScale + - getMaxPrecision + - shouldConvertRaggedUnionTypesToVarying + properties: + - INSTANCE +BeamRelMetadataQuery: + methods: + - getNodeStats + - instance +BeamRowToBigtableMutation: + methods: + - apply + - expand +BeamRowToStorageApiProto: + methods: + - messageFromBeamRow +BeamRuleSets: + methods: + - getRuleSets +BeamSetOperatorRelBase: + methods: + - expand +BeamSetOperatorsTransforms: + methods: + - apply + - processElement +BeamSideInputJoinRel: + methods: + - buildPTransform + - copy + - expand + - sideInputJoin +BeamSideInputJoinRule: + methods: + - matches + - onMatch + properties: + - INSTANCE +BeamSideInputLookupJoinRel: + methods: + - buildPTransform + - copy + - expand +BeamSideInputLookupJoinRule: + methods: + - convert + - matches + properties: + - INSTANCE +BeamSortRel: + methods: + - beamComputeSelfCost + - buildPTransform + - compare + - copy + - estimateNodeStats + - expand + - getCount + - isLimitOnly + - processElement +BeamSortRule: + methods: + - convert + properties: + - INSTANCE +BeamSqlCli: + methods: + - execute + - explainQuery + - getMetaStore + - metaStore +BeamSqlDataCatalogExample: + methods: + - main +BeamSqlEnv: + methods: + - addSchema + - addUdaf + - addUdf + - autoLoadUserDefinedFunctions + - build + - builder + - executeDdl + - explain + - getContext + - getPipelineOptions + - inMemory + - isDdl + - parseQuery + - readOnly + - setCurrentSchema + - setPipelineOptions + - setQueryPlannerClassName + - setRuleSets + - withTableProvider +BeamSqlEnvRunner: + methods: + - runUsingBeamSqlEnv +BeamSqlLine: + methods: + - main +BeamSqlOutputToConsoleFn: + methods: + - processElement +BeamSqlParser: + methods: + - getDdlExecutor + - getParser + properties: + - DDL_EXECUTOR + - FACTORY +BeamSqlPipelineOptionsRegistrar: + methods: + - getPipelineOptions +BeamSqlRelUtils: + methods: + - explainLazily + - getBeamRelInput + - getErrorRowSchema + - getInput + - getNodeStats + - toPCollection + - toString + properties: + - ERROR + - ROW +BeamSqlUnparseContext: + methods: + - clone + - equals + - getNullParams + - hashCode + - implementor + - toSql + - unparse +BeamTableFunctionScanRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - processElement +BeamTableFunctionScanRule: + methods: + - convert + properties: + - INSTANCE +BeamTableStatistics: + methods: + - createBoundedTableStatistics + - createUnboundedTableStatistics + - getCollations + - getDistribution + - getKeys + - getRate + - getReferentialConstraints + - getRowCount + - isKey + - isUnknown + properties: + - BOUNDED_UNKNOWN + - UNBOUNDED_UNKNOWN +BeamTableUtils: + methods: + - autoCastField + - beamRow2CsvLine + - csvLines2BeamRows +BeamTpcds: + methods: + - main +BeamUncollectRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - process +BeamUncollectRule: + methods: + - convert + properties: + - INSTANCE +BeamUnionRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats +BeamUnionRule: + methods: + - convert + properties: + - INSTANCE +BeamUnnestRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - explainTerms + - process +BeamUnnestRule: + methods: + - onMatch + properties: + - INSTANCE +BeamValuesRel: + methods: + - beamComputeSelfCost + - buildPTransform + - estimateNodeStats + - expand + - getPipelineOptions +BeamValuesRule: + methods: + - convert + properties: + - INSTANCE +BeamWindowRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - processElement +BeamWindowRule: + methods: + - convert + properties: + - INSTANCE +BeamZetaSqlCalcMergeRule: + methods: + - onMatch + properties: + - INSTANCE +BeamZetaSqlCalcRel: + methods: + - buildPTransform + - copy + - expand + - finishBundle + - getAllowedTimestampSkew + - output + - outputWithTimestamp + - processElement + - setup + - startBundle + - teardown +BeamZetaSqlCalcRule: + properties: + - INSTANCE +BeamZetaSqlCalcSplittingRule: + properties: + - INSTANCE +BeamZetaSqlCatalog: + properties: + - PRE_DEFINED_WINDOW_FUNCTIONS + - USER_DEFINED_JAVA_AGGREGATE_FUNCTIONS + - USER_DEFINED_JAVA_SCALAR_FUNCTIONS + - USER_DEFINED_SQL_FUNCTIONS + - ZETASQL_FUNCTION_GROUP_NAME +BeamZetaSqlUncollectRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - process +BeamZetaSqlUncollectRule: + methods: + - convert + properties: + - INSTANCE +BeamZetaSqlUnnestRel: + methods: + - beamComputeSelfCost + - buildPTransform + - copy + - estimateNodeStats + - expand + - explainTerms + - process +BeamZetaSqlUnnestRule: + methods: + - onMatch + properties: + - INSTANCE +Bid: + methods: + - decode + - encode + - equals + - hasAnnotation + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + - withAnnotation + - withoutAnnotation + properties: + - ASCENDING_TIME_THEN_PRICE + - CODER + - PRICE_THEN_DESCENDING_TIME + - auction + - bidder + - dateTime + - extra + - price +BidGenerator: + methods: + - nextBid +BidsPerSession: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER +BigDecimalCoder: + methods: + - consistentWithEquals + - decode + - encode + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +BigDecimalConverter: + methods: + - forSqlType +BigEndianIntegerCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +BigEndianLongCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +BigEndianShortCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +BigIntegerCoder: + methods: + - consistentWithEquals + - decode + - encode + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +BigQueryClient: + methods: + - create + - createTableIfNotExists + - insertAll + - insertRow +BigQueryCoderProviderRegistrar: + methods: + - getCoderProviders +BigQueryDirectReadSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getQuery + - getRowRestriction + - getSelectedFields + - getTableSpec + - identifier + - inputCollectionNames + - outputCollectionNames + - setBigQueryServices + - setQuery + - setRowRestriction + - setSelectedFields + - setTableSpec + - validate +BigQueryDlqProvider: + methods: + - expand + - identifier + - newDlqTransform +BigQueryFilter: + methods: + - getNotSupported + - getSupported + - numSupported + - toString +BigQueryHelpers: + methods: + - apply + - fromJsonString + - getNumRows + - parseTableSpec + - parseTableUrn + - stripPartitionDecorator + - toJsonString + - toString + - toTableSpec + properties: + - jobId + - shouldRetry +BigQueryIO: + methods: + - actuateProjectionPushdown + - apply + - expand + - from + - fromQuery + - getTable + - getTableProvider + - ignoreInsertIds + - ignoreUnknownValues + - optimizedWrites + - populateDisplayData + - processElement + - read + - readTableRows + - readTableRowsWithSchema + - readWithDatumReader + - setSchema + - skipInvalidRows + - supportsProjectionPushdown + - to + - useAvroLogicalTypes + - useBeamSchema + - usingStandardSql + - validate + - withAutoSchemaUpdate + - withAutoSharding + - withAvroFormatFunction + - withAvroSchemaFactory + - withAvroWriter + - withBeamRowConverters + - withClustering + - withCoder + - withCreateDisposition + - withCustomGcsTempLocation + - withDeterministicRecordIdFn + - withExtendedErrorInfo + - withFailedInsertRetryPolicy + - withFormat + - withFormatFunction + - withFormatRecordOnFailureFunction + - withJsonSchema + - withJsonTimePartitioning + - withKmsKey + - withLoadJobProjectId + - withMaxBytesPerPartition + - withMaxFilesPerBundle + - withMethod + - withNumFileShards + - withNumStorageWriteApiStreams + - withQueryLocation + - withQueryPriority + - withQueryTempDataset + - withRowRestriction + - withSchema + - withSchemaFromView + - withSchemaUpdateOptions + - withSelectedFields + - withSuccessfulInsertsPropagation + - withTableDescription + - withTemplateCompatibility + - withTestServices + - withTimePartitioning + - withTriggeringFrequency + - withWriteDisposition + - withWriteTempDataset + - withoutResultFlattening + - withoutValidation + - write + - writeTableRows + properties: + - BIGQUERY_JOB_TEMPLATE + - INSTANCE +BigQueryInsertError: + methods: + - equals + - getError + - getRow + - getTable + - hashCode +BigQueryInsertErrorCoder: + methods: + - decode + - encode + - getEncodedTypeDescriptor + - of + - verifyDeterministic +BigQuerySchemaIOProvider: + methods: + - buildReader + - buildWriter + - configurationSchema + - expand + - from + - identifier + - isBounded + - requiresDataSchema + - schema +BigQuerySchemaRetrievalException: {} +BigQuerySchemaTransformReadConfiguration: + methods: + - build + - builder + - getQuery + - getQueryLocation + - getTableSpec + - getUseStandardSql + - setQuery + - setQueryLocation + - setTableSpec + - setUseStandardSql +BigQuerySchemaTransformReadProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames +BigQuerySchemaTransformWriteConfiguration: + methods: + - build + - builder + - getCreateDisposition + - getTableSpec + - getWriteDisposition + - setCreateDisposition + - setTableSpec + - setWriteDisposition +BigQuerySchemaTransformWriteProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames + - validate +BigQueryStorageApiInsertError: + methods: + - getErrorMessage + - getRow + - toString +BigQueryStorageApiInsertErrorCoder: + methods: + - decode + - encode + - of +BigQueryStorageTableSource: + methods: + - create + - getEstimatedSizeBytes + - populateDisplayData +BigQueryStorageWriteApiSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getCreateDisposition + - getTable + - getTriggeringFrequencySeconds + - getUseAtLeastOnceSemantics + - getWriteDisposition + - identifier + - inputCollectionNames + - outputCollectionNames + - setBigQueryServices + - setCreateDisposition + - setTable + - setTriggeringFrequencySeconds + - setUseAtLeastOnceSemantics + - setWriteDisposition + - validate +BigQueryTableProvider: + methods: + - buildBeamSqlTable + - getTableType +BigQueryUtils: + methods: + - apply + - build + - builder + - convertAvroFormat + - convertGenericRecordToTableRow + - fromTableSchema + - getInferMaps + - getTruncateTimestamps + - hashSchemaDescriptorDeterministic + - readCallMetric + - setInferMaps + - setTruncateTimestamps + - tableRowFromBeamRow + - tableRowToBeamRow + - toBeamRow + - toGenericAvroSchema + - toTableReference + - toTableRow + - toTableSchema + - writeCallMetric +BigqueryClient: + methods: + - createNewDataset + - createNewTable + - deleteDataset + - deleteTable + - getClient + - getNewBigqueryClient + - getTableResource + - insertDataToTable + - queryUnflattened + - queryWithRetries + - queryWithRetriesUsingStandardSql +BigqueryMatcher: + methods: + - create + - createQuery + - createQueryUsingStandardSql + - describeMismatchSafely + - describeTo + - getApplicationName + - getProjectId + - getQuery + - getUsingStandardSql + - queryResultHasChecksum +BigtableIO: + methods: + - advance + - close + - createReader + - expand + - finishBundle + - getBigtableOptions + - getCurrent + - getCurrentSource + - getEstimatedSizeBytes + - getFractionConsumed + - getMaxBufferElementCount + - getOutputCoder + - getRanges + - getRowFilter + - getSplitPointsConsumed + - getTableId + - populateDisplayData + - processElement + - read + - split + - splitAtFraction + - start + - startBundle + - tearDown + - toString + - validate + - withBigtableOptions + - withBigtableOptionsConfigurator + - withEmulator + - withInstanceId + - withKeyRange + - withKeyRanges + - withMaxBufferElementCount + - withProjectId + - withRowFilter + - withTableId + - withWriteResults + - withoutValidation + - write +BigtableRowToBeamRow: + methods: + - apply + - expand +BigtableRowToBeamRowFlat: + methods: + - apply + - expand +BigtableTable: + methods: + - buildIOReader + - buildIOWriter + - constructFilter + - isBounded +BigtableTableProvider: + methods: + - buildBeamSqlTable + - getTableType +BigtableUtils: + methods: + - booleanToByteArray + - byteString + - byteStringUtf8 + - doubleToByteArray + - floatToByteArray + - longToByteArray +BigtableWriteResult: + methods: + - create + - getRowsWritten +BigtableWriteResultCoder: + methods: + - decode + - encode + - getCoderProvider + - of +BitSetCoder: + methods: + - consistentWithEquals + - decode + - encode + - of + - verifyDeterministic +BlockBasedSource: + methods: + - getCurrent + - getCurrentBlock + - getCurrentBlockOffset + - getCurrentBlockSize + - getCurrentRecord + - getFractionConsumed + - getFractionOfBlockConsumed + - isAtSplitPoint + - readNextBlock + - readNextRecord +BlockingCommitterImpl: + methods: + - close + - commitOffset +BooleanCoder: + methods: + - consistentWithEquals + - decode + - encode + - isRegisterByteSizeObserverCheap + - of +BoundedEventSource: + methods: + - advance + - close + - createReader + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getDefaultOutputCoder + - getEstimatedSizeBytes + - getFractionConsumed + - split + - splitAtFraction + - start + - validate +BoundedReadFromUnboundedSource: + methods: + - expand + - getKindString + - populateDisplayData + - process + - withMaxNumRecords + - withMaxReadTime +BoundedSideInputJoin: + methods: + - expand + - needsSideInput + - processElement +BoundedSideInputJoinModel: + methods: + - simulator +BoundedSource: + methods: + - createReader + - getCurrentSource + - getCurrentTimestamp + - getEstimatedSizeBytes + - getFractionConsumed + - getSplitPointsConsumed + - getSplitPointsRemaining + - split + - splitAtFraction + properties: + - SPLIT_POINTS_UNKNOWN +BoundedWindow: + methods: + - formatTimestamp + - maxTimestamp + - validateTimestampBounds + properties: + - TIMESTAMP_MAX_VALUE + - TIMESTAMP_MIN_VALUE +BroadcastHashJoinTranslator: + methods: + - processElement +BucketingFunction: + methods: + - add + - get + - isSignificant + - remove +BufferedElementCountingOutputStream: + methods: + - close + - finish + - flush + - markElementStart + - write + properties: + - DEFAULT_BUFFER_SIZE +BufferedExternalSorter: + methods: + - add + - create + - getExternalSorterType + - getMemoryMB + - getTempLocation + - options + - sort + - withExternalSorterType + - withMemoryMB + - withTempLocation +BufferingStreamObserver: + methods: + - getBufferSize + - getCause + - onCompleted + - onError + - onNext +Builders: {} +BuiltinHashFunctions: + methods: + - md5Bytes + - md5String + - sha1Bytes + - sha1String + - sha256Bytes + - sha256String + - sha512Bytes + - sha512String +BuiltinStringFunctions: + methods: + - endsWith + - fromHex + - lengthBytes + - lengthString + - lpad + - reverseBytes + - reverseString + - rpad + - startsWith + - toHex +BuiltinTrigonometricFunctions: + methods: + - cosh + - sinh + - tanh +BundleSplitter: {} +ByteArrayCoder: + methods: + - decode + - encode + - encodeAndOwn + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - structuralValue + - verifyDeterministic +ByteBuddyUtils: + methods: + - appender + - apply + - clear + - containsKey + - containsValue + - convert + - createGetterConversions + - createSetterConversions + - createTypeConversion + - entrySet + - equals + - get + - getTransformingMap + - hashCode + - isEmpty + - isValid + - keySet + - prepare + - put + - putAll + - remove + - size + - subclassGetterInterface + - subclassSetterInterface + - toString + - transformContainer + - values +ByteCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +ByteKey: + methods: + - compareTo + - copyFrom + - equals + - getBytes + - getValue + - hashCode + - isEmpty + - of + - toString + properties: + - EMPTY +ByteKeyRange: + methods: + - containsKey + - equals + - estimateFractionForKey + - getEndKey + - getStartKey + - hashCode + - interpolateKey + - newTracker + - of + - overlaps + - split + - toString + - withEndKey + - withStartKey + properties: + - ALL_KEYS +ByteKeyRangeTracker: + methods: + - checkDone + - currentRestriction + - getFractionConsumed + - getProgress + - getRange + - getSplitPointsConsumed + - getStartPosition + - getStopPosition + - isBounded + - isDone + - markDone + - of + - toString + - tryClaim + - tryReturnRecordAt + - trySplit + - trySplitAtPosition +ByteMonitor: + methods: + - processElement +ByteStringCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +ByteStringOutputStream: + methods: + - size + - toByteString + - toByteStringAndReset + - toString + - write +ByteStringOutputStreamBenchmark: + methods: + - setup + - tearDown + - testCopyArray + - testNewArray + - testProtobufByteStringOutputStreamFewLargeWrites + - testProtobufByteStringOutputStreamFewMixedWritesWithReuse + - testProtobufByteStringOutputStreamFewMixedWritesWithoutReuse + - testProtobufByteStringOutputStreamFewSmallWrites + - testProtobufByteStringOutputStreamFewTinyWrites + - testProtobufByteStringOutputStreamManyLargeWrites + - testProtobufByteStringOutputStreamManyMixedWritesWithReuse + - testProtobufByteStringOutputStreamManyMixedWritesWithoutReuse + - testProtobufByteStringOutputStreamManySmallWrites + - testProtobufByteStringOutputStreamManyTinyWrites + - testSdkCoreByteStringOutputStreamFewLargeWrites + - testSdkCoreByteStringOutputStreamFewMixedWritesWithReuse + - testSdkCoreByteStringOutputStreamFewMixedWritesWithoutReuse + - testSdkCoreByteStringOutputStreamFewSmallWrites + - testSdkCoreByteStringOutputStreamFewTinyWrites + - testSdkCoreByteStringOutputStreamManyLargeWrites + - testSdkCoreByteStringOutputStreamManyMixedWritesWithReuse + - testSdkCoreByteStringOutputStreamManyMixedWritesWithoutReuse + - testSdkCoreByteStringOutputStreamManySmallWrites + - testSdkCoreByteStringOutputStreamManyTinyWrites + properties: + - src +BytesThroughputEstimator: + methods: + - addBytes + - get + - getBytes + - getFrom + - getSeconds + - getTimestamp + - update +CEPCall: + methods: + - getOperands + - getOperator + - of + - toString +CEPFieldRef: + methods: + - getAlpha + - getIndex + - of + - toString +CEPLiteral: + methods: + - compareTo + - equals + - getBoolean + - getByte + - getDateTime + - getDecimal + - getDouble + - getFloat + - getInt16 + - getInt32 + - getInt64 + - getString + - getTypeName + - hashCode + - of +CEPMeasure: + methods: + - getField + - getName + - getOperation + - getType +CEPOperation: + methods: + - of +CEPOperator: + methods: + - getCepKind + - of + - toString +CEPPattern: + methods: + - getPatternCondition + - getPatternVar + - getQuantifier + - of + - toString +CEPUtils: + methods: + - getCEPFieldRefFromParKeys + - getCEPPatternFromPattern + - getFieldRef + - getFieldType + - getRegexFromPattern + - makeOrderKeysFromCollation +Caches: + methods: + - clear + - computeIfAbsent + - describeStats + - equals + - eternal + - fromOptions + - getCache + - getWeight + - hashCode + - noop + - onRemoval + - peek + - put + - remove + - subCache + - toString + - weigh + properties: + - REFERENCE_SIZE + - ROOT +CachingFactory: + methods: + - create + - equals + - hashCode +CalcRelSplitter: + methods: + - canImplement + - execute + - getMaxUsingLevelOrdinals + - maxInputFor + - toString + - visitCall + - visitDynamicParam + - visitFieldAccess + - visitInputRef + - visitLiteral + - visitLocalRef +CalciteConnectionWrapper: + methods: + - abort + - clearWarnings + - close + - commit + - config + - createArrayOf + - createBlob + - createClob + - createNClob + - createPrepareContext + - createQuery + - createSQLXML + - createStatement + - createStruct + - execute + - executeQuery + - getAutoCommit + - getCatalog + - getClientInfo + - getHoldability + - getMetaData + - getNetworkTimeout + - getProperties + - getRootSchema + - getSchema + - getTransactionIsolation + - getTypeFactory + - getTypeMap + - getWarnings + - isClosed + - isReadOnly + - isValid + - isWrapperFor + - nativeSQL + - prepareCall + - prepareStatement + - releaseSavepoint + - rollback + - setAutoCommit + - setCatalog + - setClientInfo + - setHoldability + - setNetworkTimeout + - setReadOnly + - setSavepoint + - setSchema + - setTransactionIsolation + - setTypeMap + - unwrap +CalciteFactoryWrapper: + methods: + - newConnection + - newDatabaseMetaData + - newPreparedStatement + - newResultSet + - newResultSetMetaData + - newStatement +CalciteQueryPlanner: + methods: + - convertToBeamRel + - createPlanner + - defaultConfig + - getDef + - getNonCumulativeCost + - parse + properties: + - FACTORY + - SOURCE +CalciteUtils: + methods: + - isDateTimeType + - isStringType + - sqlTypeWithAutoCast + - toCalciteRowType + - toField + - toFieldType + - toRelDataType + - toSchema + - toSqlTypeName + properties: + - BIG_INT + - BOOLEAN + - CHAR + - DATE + - DECIMAL + - DOUBLE + - FLOAT + - IDENTIFIER + - INTEGER + - NULLABLE_DATE + - NULLABLE_TIME + - NULLABLE_TIMESTAMP + - NULLABLE_TIMESTAMP_WITH_LOCAL_TZ + - SMALL_INT + - TIME + - TIMESTAMP + - TIMESTAMP_WITH_LOCAL_TZ + - TIME_WITH_LOCAL_TZ + - TINY_INT + - VARBINARY + - VARCHAR +CalendarWindows: + methods: + - assignWindow + - beginningOnDay + - days + - getDayOfMonth + - getMonthOfYear + - getNumber + - getStartDate + - getTimeZone + - isCompatible + - months + - populateDisplayData + - verifyCompatibility + - weeks + - windowCoder + - withStartingDay + - withStartingMonth + - withStartingYear + - withTimeZone + - years +CancellableQueue: + methods: + - cancel + - put + - reset + - take +CannotProvideCoderException: + methods: + - getReason + - getRootCause +CassandraIO: + methods: + - build + - delete + - expand + - finishBundle + - process + - processElement + - read + - readAll + - setup + - teardown + - validate + - withCoder + - withConnectTimeout + - withConsistencyLevel + - withEntity + - withHosts + - withKeyspace + - withLocalDc + - withMapperFactoryFn + - withMinNumberOfSplits + - withPassword + - withPort + - withQuery + - withReadTimeout + - withRingRanges + - withTable + - withUsername + - write +Cast: + methods: + - accept + - accumulate + - apply + - castNumber + - castRow + - castValue + - create + - expand + - isDecimal + - isIntegral + - message + - narrowing + - of + - outputSchema + - path + - process + - toString + - validator + - verifyCompatibility + - widening +CastFunctionImpl: + methods: + - getImplementor + - getParameters + - implement +CategoryPrice: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER + - category + - isLast + - price +CdapIO: + methods: + - expand + - read + - withCdapPlugin + - withCdapPluginClass + - withKeyClass + - withLocksDirPath + - withPluginConfig + - withPullFrequencySec + - withStartOffset + - withValueClass + - write +ChangeStreamDao: + methods: + - changeStreamQuery +ChangeStreamMetrics: + methods: + - decActivePartitionReadCounter + - incActivePartitionReadCounter + - incDataRecordCounter + - incHeartbeatRecordCount + - incPartitionRecordCount + - incPartitionRecordMergeCount + - incPartitionRecordSplitCount + - incQueryCounter + - updateDataRecordCommittedToEmitted + - updatePartitionCreatedToScheduled + - updatePartitionScheduledToRunning + properties: + - ACTIVE_PARTITION_READ_COUNT + - DATA_RECORD_COMMITTED_TO_EMITTED_0MS_TO_1000MS_COUNT + - DATA_RECORD_COMMITTED_TO_EMITTED_1000MS_TO_3000MS_COUNT + - DATA_RECORD_COMMITTED_TO_EMITTED_3000MS_TO_INF_COUNT + - DATA_RECORD_COUNT + - HEARTBEAT_RECORD_COUNT + - PARTITION_CREATED_TO_SCHEDULED_MS + - PARTITION_RECORD_COUNT + - PARTITION_RECORD_MERGE_COUNT + - PARTITION_RECORD_SPLIT_COUNT + - PARTITION_SCHEDULED_TO_RUNNING_MS + - QUERY_COUNT +ChangeStreamRecordMapper: + methods: + - toChangeStreamRecords +ChangeStreamRecordMetadata: + methods: + - build + - equals + - getNumberOfRecordsRead + - getPartitionCreatedAt + - getPartitionEndTimestamp + - getPartitionRunningAt + - getPartitionScheduledAt + - getPartitionStartTimestamp + - getPartitionToken + - getQueryStartedAt + - getRecordReadAt + - getRecordStreamEndedAt + - getRecordStreamStartedAt + - getRecordTimestamp + - getTotalStreamTimeMillis + - hashCode + - newBuilder + - toString + - withNumberOfRecordsRead + - withPartitionCreatedAt + - withPartitionEndTimestamp + - withPartitionRunningAt + - withPartitionScheduledAt + - withPartitionStartTimestamp + - withPartitionToken + - withQueryStartedAt + - withRecordReadAt + - withRecordStreamEndedAt + - withRecordStreamStartedAt + - withRecordTimestamp + - withTotalStreamTimeMillis +ChangeStreamResultSet: + methods: + - close + - getCurrentRowAsStruct + - getMetadata + - getPgJsonb + - next +ChangeStreamResultSetMetadata: + methods: + - getNumberOfRecordsRead + - getQueryStartedAt + - getRecordReadAt + - getRecordStreamEndedAt + - getRecordStreamStartedAt + - getTotalStreamDuration +ChangeStreamsConstants: + properties: + - DEFAULT_CHANGE_STREAM_NAME + - DEFAULT_INCLUSIVE_END_AT + - DEFAULT_INCLUSIVE_START_AT + - DEFAULT_RPC_PRIORITY + - MAX_INCLUSIVE_END_AT + - SAMPLE_PARTITION + - THROUGHPUT_WINDOW_SECONDS +CheckpointMarkImpl: + methods: + - decode + - encode + - finalizeCheckpoint +ChildPartition: + methods: + - equals + - getParentTokens + - getToken + - hashCode + - toString +ChildPartitionsRecord: + methods: + - equals + - getChildPartitions + - getRecordSequence + - getRecordTimestamp + - getStartTimestamp + - hashCode + - toString +ChildPartitionsRecordAction: + methods: + - run +CivilTimeEncoder: + methods: + - decodePacked32TimeSeconds + - decodePacked32TimeSecondsAsJavaTime + - decodePacked64DatetimeMicros + - decodePacked64DatetimeMicrosAsJavaTime + - decodePacked64DatetimeSeconds + - decodePacked64DatetimeSecondsAsJavaTime + - decodePacked64TimeMicros + - decodePacked64TimeMicrosAsJavaTime + - decodePacked64TimeNanos + - decodePacked64TimeNanosAsJavaTime + - encodePacked32TimeSeconds + - encodePacked64DatetimeMicros + - encodePacked64DatetimeSeconds + - encodePacked64TimeMicros + - encodePacked64TimeNanos +ClassLoaderFileSystem: + methods: + - fromOptions + - getCurrentDirectory + - getFilename + - getScheme + - isDirectory + - resolve + properties: + - SCHEMA +CleanUpReadChangeStreamDoFn: + methods: + - processElement +ClickHouseIO: + methods: + - build + - expand + - finishBundle + - getTableSchema + - initialBackoff + - insertDeduplicate + - insertDistributedSync + - insertQuorum + - jdbcUrl + - maxCumulativeBackoff + - maxInsertBlockSize + - maxRetries + - processElement + - properties + - schema + - setup + - startBundle + - table + - tableSchema + - tearDown + - withInitialBackoff + - withInsertDeduplicate + - withInsertDistributedSync + - withInsertQuorum + - withMaxCumulativeBackoff + - withMaxInsertBlockSize + - withMaxRetries + - withTableSchema + - write + properties: + - DEFAULT_INITIAL_BACKOFF + - DEFAULT_MAX_CUMULATIVE_BACKOFF + - DEFAULT_MAX_INSERT_BLOCK_SIZE + - DEFAULT_MAX_RETRIES +ClickHouseWriter: {} +ClientConfiguration: + methods: + - build + - builder + - create + - credentialsProvider + - endpoint + - region + - retry + - toBuilder +CloudPubsubTransforms: + methods: + - ensureUsableAsCloudPubsub + - expand + - fromCloudPubsubMessages + - toCloudPubsubMessages +CloudVision: + methods: + - annotateImagesFromBytes + - annotateImagesFromBytesWithContext + - annotateImagesFromGcsUri + - annotateImagesFromGcsUriWithContext + - mapToRequest +CoGbkResult: + methods: + - and + - copy + - decode + - done + - empty + - encode + - equals + - fastForward + - getAll + - getCoderArguments + - getOnly + - getSchema + - getUnionCoder + - hasNext + - hashCode + - isEmpty + - iterator + - next + - observeAt + - of + - peek + - toString + - verifyDeterministic + properties: + - index + - value +CoGbkResultSchema: + methods: + - equals + - getIndex + - getTag + - getTupleTagList + - hashCode + - of + - size + - toString +CoGroup: + methods: + - crossProductJoin + - expand + - fieldAccessDescriptor + - fieldIds + - fieldNames + - join + - process + - withKeyField + - withOptionalParticipation + - withSideInput +CoGroupByKey: + methods: + - create + - expand + - processElement +CoGroupByKeyLoadTest: + methods: + - main + - processElement +Coder: + methods: + - consistentWithEquals + - decode + - encode + - equals + - getCoderArguments + - getEncodedTypeDescriptor + - getMessage + - getReasons + - hashCode + - isRegisterByteSizeObserverCheap + - nested + - registerByteSizeObserver + - structuralValue + - toString + - verifyDeterministic + properties: + - NESTED + - OUTER + - isWholeStream +CoderException: {} +CoderProperties: + methods: + - coderConsistentWithEquals + - coderConsistentWithEqualsInContext + - coderDecodeEncodeContentsEqual + - coderDecodeEncodeContentsEqualInContext + - coderDecodeEncodeContentsInSameOrder + - coderDecodeEncodeContentsInSameOrderInContext + - coderDecodeEncodeEqual + - coderDecodeEncodeEqualInContext + - coderDecodeEncodeInContext + - coderDecodesBase64 + - coderDecodesBase64ContentsEqual + - coderDeterministic + - coderDeterministicInContext + - coderEncodesBase64 + - coderSerializable + - getCount + - getMean + - getSum + - getSumAndReset + - reset + - structuralValueConsistentWithEquals + - structuralValueConsistentWithEqualsInContext + - structuralValueDecodeEncodeEqual + - structuralValueDecodeEncodeEqualInContext + - structuralValueDecodeEncodeEqualIterable + - structuralValueDecodeEncodeEqualIterableInContext + - testByteCount + properties: + - ALL_CONTEXTS +CoderProvider: + methods: + - coderFor +CoderProviders: + methods: + - coderFor + - forCoder + - fromStaticMethods + - toString +CoderRegistry: + methods: + - coderFor + - createDefault + - getCoder + - getOutputCoder + - getType + - registerCoderForClass + - registerCoderForType + - registerCoderProvider +CoderUtils: + methods: + - clone + - decodeFromBase64 + - decodeFromByteArray + - decodeFromByteString + - encodeToBase64 + - encodeToByteArray + - getCodedType +CollectionCoder: + methods: + - getEncodedTypeDescriptor + - of +ColumnType: + methods: + - equals + - getName + - getOrdinalPosition + - getType + - hashCode + - isPrimaryKey + - toString +Combine: + methods: + - accum + - addInput + - apply + - asSingletonView + - compact + - createAccumulator + - decode + - defaultValue + - encode + - equals + - expand + - extractOutput + - getAccumulatorCoder + - getAdditionalInputs + - getAppliedFn + - getCoderArguments + - getCombineFn + - getDefaultOutputCoder + - getFanout + - getFn + - getInputType + - getInsertDefault + - getNameOverride + - getOutputType + - getPipelineOptions + - getSideInputs + - globally + - groupedValues + - hashCode + - identity + - input + - isInsertDefault + - mergeAccumulators + - of + - perKey + - populateDisplayData + - processElement + - sideInput + - startBundle + - toString + - verifyDeterministic + - withFanout + - withHotKeyFanout + - withSideInputs + - withoutDefaults + properties: + - accum + - input +CombineContextFactory: + methods: + - createFromStateContext + - getPipelineOptions + - nullContext + - sideInput +CombineFnBase: + methods: + - getAccumTVariable + - getAccumulatorCoder + - getDefaultOutputCoder + - getIncompatibleGlobalWindowErrorMessage + - getInputTVariable + - getOutputTVariable + - populateDisplayData +CombineFnTester: + methods: + - testCombineFn +CombineFnUtil: + methods: + - addInput + - bindContext + - compact + - createAccumulator + - defaultValue + - extractOutput + - getAccumulatorCoder + - getDefaultOutputCoder + - mergeAccumulators + - populateDisplayData + - toFnWithContext +CombineFns: + methods: + - addInput + - compact + - compose + - createAccumulator + - decode + - encode + - equals + - extractOutput + - get + - getAccumulatorCoder + - getCoderArguments + - hasNext + - hashCode + - iterator + - mergeAccumulators + - next + - populateDisplayData + - remove + - verifyDeterministic + - with +CombineLoadTest: + methods: + - apply + - getPerKeyCombiner + - main +CombineRunners: + methods: + - createRunnerForPTransform + - getPTransformRunnerFactories +CombineWithContext: + methods: + - addInput + - apply + - compact + - createAccumulator + - defaultValue + - extractOutput + - getPipelineOptions + - mergeAccumulators + - sideInput +CompletableFutureInboundDataClient: + methods: + - awaitCompletion + - cancel + - complete + - create + - fail + - isDone + - runWhenComplete +CompositeOperatorTranslator: + methods: + - canTranslate + - translate +CompositeProvider: + methods: + - findTranslator + - of +CompositeUnaryFunction: + methods: + - apply + - of +CompressedSource: + methods: + - allowsDynamicSplitting + - close + - createDecompressingChannel + - from + - getChannelFactory + - getCount + - getCurrent + - getCurrentTimestamp + - getOutputCoder + - getSplitPointsConsumed + - getSplitPointsRemaining + - isCompressed + - isOpen + - matches + - populateDisplayData + - read + - validate + - withCompression + - withDecompression +ConfigWrapper: + methods: + - build + - fromJsonFile + - fromJsonString + - setParam + - withParams +ConfluentSchemaRegistryDeserializerProvider: + methods: + - getCoder + - getDeserializer + - of +ConnectionManager: {} +ConsoleResultPublisher: + methods: + - publish +Contextful: + methods: + - fn + - getClosure + - getRequirements + - of + - sideInput + - toString + - wrapProcessContext +ContextualTextIO: + methods: + - apply + - compare + - expand + - from + - populateDisplayData + - processElement + - read + - readFiles + - withCompression + - withDelimiter + - withEmptyMatchTreatment + - withHasMultilineCSVRecords + - withHintMatchesManyFiles + - withMatchConfiguration + - withRecordNumMetadata +ConversionContext: + methods: + - of +Convert: + methods: + - expand + - fromRows + - processElement + - to + - toRows +ConvertHelpers: + methods: + - appender + - getConvertPrimitive + - getConvertedSchemaInformation + - prepare + properties: + - outputSchemaCoder + - unboxedType +Count: + methods: + - addInput + - apply + - combineFn + - createAccumulator + - decode + - encode + - equals + - expand + - extractOutput + - getAccumulatorCoder + - getIncompatibleGlobalWindowErrorMessage + - globally + - hashCode + - isRegisterByteSizeObserverCheap + - mergeAccumulators + - perElement + - perKey +CountByKey: + methods: + - accumulationMode + - expand + - keyBy + - named + - of + - output + - triggeredBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withTimestampCombiner +CountIf: + methods: + - addInput + - combineFn + - createAccumulator + - extractOutput + - getAccumulatorCoder + - mergeAccumulators +CountingSource: + methods: + - advance + - apply + - close + - createReader + - createSourceForSubrange + - equals + - finalizeCheckpoint + - getBytesPerOffset + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getLastEmitted + - getMaxEndOffset + - getOutputCoder + - getSplitBacklogBytes + - getSplitPointsRemaining + - getStartTime + - getWatermark + - hashCode + - split + - start + - unbounded + - unboundedWithTimestampFn + - upTo + - withRate + - withTimestampFn +CovarianceFn: + methods: + - addInput + - createAccumulator + - extractOutput + - getAccumulatorCoder + - mergeAccumulators + - newPopulation + - newSample +CrashingRunner: + methods: + - fromOptions + - run +Create: + methods: + - apply + - close + - createReader + - createSourceForSubrange + - empty + - expand + - fromIterable + - getBytesPerOffset + - getCurrent + - getCurrentSource + - getElements + - getEstimatedSizeBytes + - getMaxEndOffset + - getOutputCoder + - of + - ofProvider + - processElement + - timestamped + - withCoder + - withRowSchema + - withSchema + - withType +CreateOptions: + methods: + - build + - builder + - expectFileToNotExist + - mimeType + - setExpectFileToNotExist + - setMimeType +CreateTableDestinations: + methods: + - expand + - processElement + - startBundle +CreateTableHelpers: {} +CreateTables: + methods: + - expand + - processElement + - startBundle +CrossLanguageConfiguration: + methods: + - getDataSourceConfiguration + - getDatabase + - getOAuthToken + - getPassword + - getPrivateKeyPassphrase + - getPrivateKeyPath + - getQuery + - getRawPrivateKey + - getRole + - getSchema + - getServerName + - getStagingBucketName + - getStorageIntegrationName + - getTable + - getUsername + - getWarehouse + - setDatabase + - setOAuthToken + - setPassword + - setPrivateKeyPassphrase + - setPrivateKeyPath + - setQuery + - setRawPrivateKey + - setRole + - setSchema + - setServerName + - setStagingBucketName + - setStorageIntegrationName + - setTable + - setUsername + - setWarehouse +CsvToRow: + methods: + - expand + - getCsvFormat +CustomCoder: + methods: + - getCoderArguments + - verifyDeterministic +CustomHttpErrors: + methods: + - addErrorForCode + - addErrorForCodeAndUrlContains + - build + - getCustomError + - getMatcher +CustomTimestampPolicyWithLimitedDelay: + methods: + - getTimestampForRecord + - getWatermark +CustomX509TrustManager: + methods: + - checkClientTrusted + - checkServerTrusted + - getAcceptedIssuers +Customer: + methods: + - equals + - getCountryOfResidence + - getId + - getName + - hashCode + - setCountryOfResidence + - setId + - setName + - toString +DLPDeidentifyText: + methods: + - build + - expand + - getBatchSizeBytes + - getColumnDelimiter + - getDeidentifyConfig + - getDeidentifyTemplateName + - getHeaderColumns + - getInspectConfig + - getInspectTemplateName + - getProjectId + - newBuilder + - processElement + - setBatchSizeBytes + - setColumnDelimiter + - setDeidentifyConfig + - setDeidentifyTemplateName + - setHeaderColumns + - setInspectConfig + - setInspectTemplateName + - setProjectId + - setup + - teardown + properties: + - DLP_PAYLOAD_LIMIT_BYTES +DLPInspectText: + methods: + - build + - expand + - getBatchSizeBytes + - getColumnDelimiter + - getHeaderColumns + - getInspectConfig + - getInspectTemplateName + - getProjectId + - newBuilder + - processElement + - setBatchSizeBytes + - setColumnDelimiter + - setHeaderColumns + - setInspectConfig + - setInspectTemplateName + - setProjectId + - setup + - teardown + properties: + - DLP_PAYLOAD_LIMIT_BYTES +DLPReidentifyText: + methods: + - build + - expand + - getBatchSizeBytes + - getColumnDelimiter + - getHeaderColumns + - getInspectConfig + - getInspectTemplateName + - getProjectId + - getReidentifyConfig + - getReidentifyTemplateName + - newBuilder + - processElement + - setBatchSizeBytes + - setColumnDelimiter + - setHeaderColumns + - setInspectConfig + - setInspectTemplateName + - setProjectId + - setReidentifyConfig + - setReidentifyTemplateName + - setup + - teardown + properties: + - DLP_PAYLOAD_LIMIT_BYTES +DaoFactory: + methods: + - getChangeStreamDao + - getPartitionMetadataAdminDao + - getPartitionMetadataDao +DataCatalogPipelineOptionsRegistrar: + methods: + - getPipelineOptions +DataCatalogTableProvider: + methods: + - buildBeamSqlTable + - close + - create + - createDataCatalogClient + - createTable + - dropTable + - getTable + - getTableByFullName + - getTableType + - getTables + - setSchemaIfNotPresent +DataChangeRecord: + methods: + - equals + - getCommitTimestamp + - getMetadata + - getModType + - getMods + - getNumberOfPartitionsInTransaction + - getNumberOfRecordsInTransaction + - getPartitionToken + - getRecordSequence + - getRecordTimestamp + - getRowType + - getServerTransactionId + - getTableName + - getTransactionTag + - getValueCaptureType + - hashCode + - isLastRecordInTransactionInPartition + - isSystemTransaction + - toString +DataChangeRecordAction: + methods: + - run +DataEndpoint: + methods: + - create + - getCoder + - getReceiver + - getTransformId +DataStoreV1SchemaIOProvider: + methods: + - buildReader + - buildWriter + - configurationSchema + - expand + - from + - getKind + - getProjectId + - identifier + - isBounded + - requiresDataSchema + - schema + properties: + - KEY_FIELD_PROPERTY +DataStoreV1TableProvider: + methods: + - getSchemaIOProvider + - getTableStatistics + - getTableType +DataStreams: + methods: + - close + - decodeFromChunkBoundaryToChunkBoundary + - delimitElement + - hasNext + - isEof + - isReady + - next + - outbound + - prefetch + - read + - remove + - write + properties: + - DEFAULT_OUTBOUND_BUFFER_LIMIT_BYTES +DataframeTransform: + methods: + - expand + - of + - withExpansionService + - withIndexes +DatastoreIO: + methods: + - v1 +DatastoreV1: + methods: + - addRequestLatency + - apply + - deleteEntity + - deleteKey + - expand + - finishBundle + - from + - getDatastore + - getLiteralGqlQuery + - getLocalhost + - getNamespace + - getNamespaceValueProvider + - getNumEntities + - getNumQuerySplits + - getProjectId + - getProjectValueProvider + - getQuery + - getQuerySplitter + - getReadTime + - nextBatchSize + - populateDisplayData + - processElement + - read + - start + - startBundle + - toString + - withHintNumWorkers + - withLiteralGqlQuery + - withLocalhost + - withNamespace + - withNumQuerySplits + - withProjectId + - withQuery + - withRampupThrottlingDisabled + - withReadTime + - write + properties: + - NUM_QUERY_SPLITS_MAX +Date: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +DateFunctions: + methods: + - date +DateTime: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - DATETIME_SCHEMA + - DATE_FIELD_NAME + - IDENTIFIER + - TIME_FIELD_NAME +DateTimeUtils: + methods: + - findDateTimePattern + - formatTimestampWithTimeZone + - parseDate + - parseDateToValue + - parseTime + - parseTimeToValue + - parseTimestampWithLocalTimeZone + - parseTimestampWithTZToValue + - parseTimestampWithTimeZone + - parseTimestampWithUTCTimeZone + - parseTimestampWithoutTimeZone + - validateTimeInterval + - validateTimestamp + properties: + - MAX_UNIX_MILLIS + - MILLIS_PER_DAY + - MIN_UNIX_MILLIS +DeadLetteredTransform: + methods: + - expand +DebeziumIO: + methods: + - create + - expand + - getConfigurationMap + - read + - readAsJson + - withCoder + - withConnectionProperties + - withConnectionProperty + - withConnectorClass + - withConnectorConfiguration + - withFormatFunction + - withHostName + - withMaxNumberOfRecords + - withMaxTimeToRun + - withPassword + - withPort + - withSourceConnector + - withUsername +DebeziumReadSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getDatabase + - getDebeziumConnectionProperties + - getHost + - getPassword + - getPort + - getTable + - getUsername + - identifier + - inputCollectionNames + - outputCollectionNames + - setDatabase + - setDebeziumConnectionProperties + - setHost + - setPassword + - setPort + - setTable + - setUsername +DebeziumTransformRegistrar: + methods: + - buildExternal + - knownBuilders + - setConnectionProperties + - setConnectorClass + - setHost + - setMaxNumberOfRecords + - setPassword + - setPort + - setUsername + properties: + - READ_JSON_URN +DecodingFnDataReceiver: + methods: + - accept + - create +Deduplicate: + methods: + - apply + - expand + - keyedValues + - onExpiry + - processElement + - values + - withDuration + - withRepresentativeCoder + - withRepresentativeType + - withRepresentativeValueFn + - withTimeDomain + properties: + - DEFAULT_DURATION + - DEFAULT_TIME_DOMAIN +DefaultAutoscaler: + methods: + - getTotalBacklogBytes + - start + - stop +DefaultBlobstoreClientBuilderFactory: + methods: + - createBuilder +DefaultFilenamePolicy: + methods: + - constructName + - decode + - encode + - equals + - fromParams + - fromStandardParameters + - hashCode + - of + - populateDisplayData + - toString + - unwindowedFilename + - windowedFilename + - withBaseFilename + - withShardTemplate + - withSuffix + - withWindowedWrites + properties: + - DEFAULT_UNWINDOWED_SHARD_TEMPLATE + - DEFAULT_WINDOWED_SHARD_TEMPLATE +DefaultPipelineOptionsRegistrar: + methods: + - getPipelineOptions +DefaultS3ClientBuilderFactory: + methods: + - createBuilder +DefaultS3FileSystemSchemeRegistrar: + methods: + - fromOptions +DefaultTableFilter: + methods: + - getNotSupported + - numSupported +DefaultTrigger: + methods: + - getWatermarkThatGuaranteesFiring + - isCompatible + - mayFinish + - of +DelegateCoder: + methods: + - decode + - encode + - equals + - getCoder + - getEncodedTypeDescriptor + - hashCode + - of + - structuralValue + - toString + - verifyDeterministic +DelegatingCounter: + methods: + - dec + - getName + - inc +DelegatingDistribution: + methods: + - getName + - update +DelegatingHistogram: + methods: + - getName + - update +DequeCoder: + methods: + - consistentWithEquals + - getEncodedTypeDescriptor + - of + - structuralValue + - verifyDeterministic +DetectNewPartitionsAction: + methods: + - run +DetectNewPartitionsDoFn: + methods: + - getInitialWatermarkEstimatorState + - getSize + - initialRestriction + - newTracker + - newWatermarkEstimator + - processElement + - setAveragePartitionBytesSize + - setup +DetectNewPartitionsRangeTracker: + methods: + - tryClaim +DicomIO: + methods: + - expand + - finishSpecifyingOutput + - getFailedReads + - getPipeline + - getReadResponse + - instantiateHealthcareClient + - processElement + - readStudyMetadata + properties: + - ERROR_MESSAGE + - METADATA +DirectStreamObserver: + methods: + - onCompleted + - onError + - onNext +DisplayData: + methods: + - absolute + - add + - addIfNotDefault + - addIfNotNull + - asMap + - build + - delegate + - equals + - extend + - from + - getComponents + - getKey + - getLabel + - getLinkUrl + - getNamespace + - getPath + - getShortValue + - getType + - getValue + - hashCode + - include + - inferType + - item + - items + - none + - of + - root + - setKey + - setLabel + - setLinkUrl + - setNamespace + - setShortValue + - setType + - setValue + - toString + - withLabel + - withLinkUrl + - withNamespace +Distinct: + methods: + - accumulationMode + - apply + - create + - expand + - named + - of + - output + - processElement + - projected + - triggeredBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withRepresentativeType + - withRepresentativeValueFn + - withTimestampCombiner +DistributionResult: + methods: + - create + - getCount + - getMax + - getMean + - getMin + - getSum + properties: + - IDENTITY_ELEMENT +DlqProvider: + methods: + - expand + - identifier + - newDlqTransform +DoFn: + methods: + - element + - fireTimestamp + - getAllowedTimestampSkew + - getInputTypeDescriptor + - getOutputTypeDescriptor + - getPipelineOptions + - output + - outputWithTimestamp + - pane + - populateDisplayData + - prepareForProcessing + - resume + - resumeDelay + - shouldResume + - sideInput + - stop + - timeDomain + - timestamp + - window + - withResumeDelay +DoFnInfo: + methods: + - forFn + - getDoFn + - getDoFnSchemaInformation + - getInputCoder + - getMainOutput + - getOutputCoders + - getSideInputMapping + - getSideInputViews + - getWindowingStrategy + - withFn +DoFnInvokers: + methods: + - getErrorContext + - invokerFor + - pipelineOptions + - tryInvokeSetupFor +DoFnOutputReceivers: + methods: + - get + - getRowReceiver + - output + - outputWithTimestamp + - rowReceiver + - windowedMultiReceiver + - windowedReceiver +DoFnSchemaInformation: + methods: + - apply + - create + - getElementConverters + - getFieldAccessDescriptor + - of + - toBuilder +DoFnSignature: + methods: + - alwaysFetched + - boundedWindow + - build + - bundleFinalizer + - coderT + - dispatch + - elementParameter + - elementT + - estimatorStateT + - estimatorT + - extraParameters + - field + - fieldAccessDeclarations + - fieldAccessString + - finishBundle + - finishBundleContext + - fnClass + - getInitialRestriction + - getInitialWatermarkEstimatorState + - getMainOutputReceiver + - getRestrictionCoder + - getSchemaElementParameters + - getSideInputParameters + - getSize + - getWatermarkEstimatorStateCoder + - hasReturnValue + - id + - index + - isBoundedPerElement + - isRowReceiver + - isSplittable + - isStateful + - keyT + - match + - newTracker + - newWatermarkEstimator + - onTimerContext + - onTimerFamilyMethods + - onTimerMethods + - onWindowExpiration + - onWindowExpirationContext + - outputReceiverParameter + - paneInfoParameter + - pipelineOptions + - processContext + - processElement + - referent + - requiresStableInput + - requiresTimeSortedInput + - restrictionParameter + - restrictionT + - restrictionTracker + - schemaElementParameter + - setElementT + - setFieldAccessString + - setIndex + - setSideInputId + - setup + - sideInputId + - sideInputParameter + - splitRestriction + - startBundle + - startBundleContext + - stateDeclarations + - stateParameter + - stateType + - taggedOutputReceiverParameter + - targetMethod + - teardown + - timeDomainParameter + - timerDeclarations + - timerFamilyDeclarations + - timerFamilyParameter + - timerIdParameter + - timerParameter + - timestampParameter + - toBuilder + - trackerT + - truncateRestriction + - usesState + - usesTimers + - watermarkEstimator + - watermarkEstimatorState + - watermarkEstimatorStateT + - watermarkEstimatorT + - windowT + properties: + - PREFIX +DoFnSignatures: + methods: + - addFieldAccessDeclaration + - addFieldAccessDeclarations + - addParameter + - addStateDeclaration + - addStateDeclarations + - addTimerDeclaration + - addTimerDeclarations + - addTimerFamilyDeclaration + - addTimerFamilyDeclarations + - checkArgument + - checkNotNull + - create + - findParameter + - findParameters + - getAnnotations + - getExtraParameters + - getFieldAccessDeclarations + - getIndex + - getMethod + - getSignature + - getStateDeclarations + - getStateParameters + - getStateSpecOrThrow + - getTimerDeclarations + - getTimerFamilyDeclarations + - getTimerFamilyParameters + - getTimerFamilySpecOrThrow + - getTimerParameters + - getTimerSpecOrThrow + - getType + - hasParameter + - isSplittable + - isStateful + - of + - requiresTimeSortedInput + - setParameter + - signatureForDoFn + - usesBagState + - usesBundleFinalizer + - usesMapState + - usesMultimapState + - usesOrderedListState + - usesSetState + - usesState + - usesTimers + - usesValueState + - usesWatermarkHold +DoFnTester: + methods: + - clearOutputElements + - close + - createProcessContext + - dispatch + - element + - finishBundle + - finishBundleContext + - get + - getCloningBehavior + - getErrorContext + - getMainOutputTag + - getMutableOutput + - getPipelineOptions + - key + - of + - output + - outputReceiver + - outputWithTimestamp + - pane + - paneInfo + - peekOutputElements + - peekOutputElementsInWindow + - peekOutputElementsWithTimestamp + - pipelineOptions + - processBundle + - processContext + - processElement + - processTimestampedElement + - processWindowedElement + - restriction + - restrictionTracker + - setCloningBehavior + - setSideInput + - setSideInputs + - sideInput + - startBundle + - startBundleContext + - taggedOutputReceiver + - takeOutputElements + - takeOutputElementsWithTimestamp + - timeDomain + - timerId + - timestamp + - window +DoFnWithExecutionInformation: + methods: + - getDoFn + - getMainOutputTag + - getSchemaInformation + - getSideInputMapping + - of +Done: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER +DoubleCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +DropFields: + methods: + - expand + - fields +DurationCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - verifyDeterministic +DynamicAvroDestinations: + methods: + - getCodec + - getDatumWriterFactory + - getMetadata + - getSchema +DynamicDestinations: + methods: + - getDestination + - getDestinationCoder + - getSchema + - getSideInputs + - getTable + - sideInput +DynamicFileDestinations: + methods: + - constant + - formatRecord + - getDefaultDestination + - getDestination + - getDestinationCoder + - getFilenamePolicy + - populateDisplayData + - toDefaultPolicies +DynamicProtoCoder: + methods: + - coderFor + - equals + - getCoderProvider + - hashCode + - of + - withExtensionsFrom + properties: + - serialVersionUID +DynamoDBIO: + methods: + - apply + - build + - builder + - create + - expand + - finishBundle + - items + - processElement + - read + - setMaxAttempts + - setMaxDuration + - setup + - startBundle + - tearDown + - test + - withAwsClientsProvider + - withClientConfiguration + - withCoder + - withDeduplicateKeys + - withDynamoDbClientProvider + - withRetryConfiguration + - withScanRequestFn + - withScanResponseMapperFn + - withScanResultMapperFn + - withWriteRequestMapperFn + - write +ElasticsearchIO: + methods: + - advance + - bulkIO + - close + - closeClient + - create + - createReader + - customizeRequestConfig + - decode + - docToBulk + - encode + - expand + - finishBundle + - fromSpec + - getAddresses + - getAllowedTimestampSkew + - getApiKey + - getApiPrefix + - getBearerToken + - getBulkDirective + - getBulkEndPoint + - getBulkIO + - getConnectTimeout + - getCountEndPoint + - getCurrent + - getCurrentSource + - getDocToBulk + - getEstimatedSizeBytes + - getHasError + - getIndex + - getInputDoc + - getKeystorePassword + - getKeystorePath + - getOutputCoder + - getPassword + - getPrefixedEndpoint + - getResponseItemJson + - getSearchEndPoint + - getSocketTimeout + - getTimestamp + - getType + - getUsername + - isTrustSelfSignedCerts + - of + - output + - populateDisplayData + - processElement + - read + - serialize + - setup + - split + - start + - startBundle + - test + - validate + - withAllowableResponseErrors + - withApiKey + - withAppendOnly + - withBackendVersion + - withBatchSize + - withBearerToken + - withBulkDirective + - withConnectTimeout + - withConnectionConfiguration + - withDocVersionFn + - withDocVersionType + - withHasError + - withIdFn + - withIgnoreVersionConflicts + - withIndexFn + - withInputDoc + - withIsDeleteFn + - withKeystorePassword + - withKeystorePath + - withMaxBatchSize + - withMaxBatchSizeBytes + - withMaxBufferingDuration + - withMaxParallelRequests + - withMaxParallelRequestsPerWindow + - withMetadata + - withPassword + - withQuery + - withResponseItemJson + - withRetryConfiguration + - withRoutingFn + - withScrollKeepalive + - withSocketTimeout + - withThrowWriteErrors + - withTimestamp + - withTrustSelfSignedCerts + - withTypeFn + - withUpsertScript + - withUsePartialUpdate + - withUseStatefulBatches + - withUsername + - write + properties: + - FAILED_WRITES + - SUCCESSFUL_WRITES +ElementByteSizeObservableIterable: + methods: + - addObserver + - iterator +ElementByteSizeObservableIterator: {} +ElementByteSizeObserver: + methods: + - advance + - getIsLazy + - setLazy + - setScalingFactor + - update +EmptyOnDeserializationThreadLocal: {} +EncodableThrowable: + methods: + - equals + - forThrowable + - hashCode + - throwable +EncodedBoundedWindow: + methods: + - consistentWithEquals + - decode + - encode + - forEncoding + - getEncodedWindow + - isRegisterByteSizeObserverCheap + - maxTimestamp + properties: + - INSTANCE +EncodingException: {} +EntityToRow: + methods: + - create + - expand + - processElement +EnumerationType: + methods: + - create + - equals + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - getValue + - getValues + - getValuesMap + - hashCode + - toBaseType + - toInputType + - toString + - valueOf + properties: + - IDENTIFIER +Event: + methods: + - decode + - encode + - equals + - hasAnnotation + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + - withAnnotation + properties: + - CODER + - bid + - newAuction + - newPerson +ExecutionStateSampler: + methods: + - activate + - create + - deactivate + - getCurrentThreadsPTransformId + - getLastTransitionTimeMillis + - getPTransformId + - getPTransformUniqueName + - getStatus + - getTrackedThread + - reset + - start + - stop + - takeSample + - updateFinalMonitoringData + - updateIntermediateMonitoringData + - updateMonitoringData +ExecutionStateSamplerBenchmark: + methods: + - setup + - tearDown + - testLargeBundleHarnessStateSampler + - testLargeBundleRunnersCoreStateSampler + - testTinyBundleHarnessStateSampler + - testTinyBundleRunnersCoreStateSampler + properties: + - sampler + - state1 + - state2 + - state3 + - tracker +ExpansionServer: + methods: + - close + - create + - getHost + - getPort +ExpansionService: + methods: + - close + - discoverSchemaTransform + - expand + - fromOptions + - getDependencies + - getTransform + - knownTransforms + - main + - payloadToConfig + - run +ExpansionServiceSchemaTransformProvider: + methods: + - createInput + - extractOutputs + - getTransform + - of +ExplicitShardedFile: + methods: + - readFilesWithRetries + - toString +ExposedByteArrayInputStream: + methods: + - close + - readAll +ExposedByteArrayOutputStream: + methods: + - reset + - toByteArray + - write + - writeAndOwn +ExpressionConverter: + methods: + - convertRelNodeToRexRangeRef + - convertResolvedLiteral + - convertRexNodeFromResolvedExpr + - convertTableValuedFunction + - indexOfProjectionColumnRef + - retrieveRexNode + - retrieveRexNodeFromOrderByScan + - trueLiteral +ExternalRead: + methods: + - buildExternal + - knownBuilders + - setIdLabel + - setSubscription + - setTimestampAttribute + - setTopic + - setWithAttributes + properties: + - URN +ExternalSchemaIOTransformRegistrar: + methods: + - buildExternal + - knownBuilderInstances + - setConfig + - setDataSchema + - setLocation +ExternalSorter: + methods: + - create + - getMemoryMB + - getSorterType + - getTempLocation + - setMemoryMB + - setSorterType + - setTempLocation +ExternalSqlTransformRegistrar: + methods: + - buildExternal + - knownBuilders + - setDialect + - setQuery +ExternalTransformRegistrarImpl: + methods: + - knownBuilderInstances + properties: + - READ_URN + - WRITE_URN +ExternalWorkerService: + methods: + - close + - main + - start + - startWorker + - stopWorker +ExternalWrite: + methods: + - buildExternal + - knownBuilders + - setIdLabel + - setTimestampAttribute + - setTopic + properties: + - URN +FailsafeValueInSingleWindow: + methods: + - decode + - encode + - getCoderArguments + - getComponents + - getFailsafeValue + - getPane + - getTimestamp + - getValue + - getWindow + - of + - verifyDeterministic +Failure: + methods: + - build + - getError + - getPayload + - newBuilder + - setError + - setPayload +FailureCollectorWrapper: + methods: + - addFailure + - getOrThrowException + - getValidationFailures +FakeBigQueryServices: + methods: + - cancel + - convertNumbers + - decodeQueryResult + - encodeQueryResult + - getDatasetService + - getJobService + - getStorageClient + - iterator + - withDatasetService + - withJobService + - withStorageClient +FakeDatasetService: + methods: + - appendRows + - close + - commitWriteStreams + - createDataset + - createTable + - createWriteStream + - deleteDataset + - deleteTable + - failOnInsert + - finalizeWriteStream + - flush + - getAllIds + - getAllRows + - getDataset + - getInsertCount + - getStreamAppendClient + - getTable + - getTableImpl + - insertAll + - isTableEmpty + - patchTableDescription + - pin + - setShouldFailRow + - setUp + - unpin + - updateTableSchema +FakeJobService: + methods: + - close + - dryRunQuery + - expectDryRunQuery + - getAllJobs + - getJob + - getNumExtractJobCalls + - pollJob + - setNumFailuresExpected + - setUp + - startCopyJob + - startExtractJob + - startLoadJob + - startQueryJob +FhirBundleParameter: + methods: + - getBundle + - getMetadata + - of +FhirBundleResponse: + methods: + - getFhirBundleParameter + - getResponse + - of +FhirIO: + methods: + - addToFile + - closeFile + - deidentify + - delete + - executeBundles + - expand + - exportResources + - fhirStoresImport + - finishSpecifyingOutput + - getFailedBodies + - getFailedBundles + - getFailedFiles + - getFailedReads + - getFailedSearches + - getFhirStore + - getKeyedResources + - getPatientEverything + - getPipeline + - getResources + - getSuccessfulBodies + - getSuccessfulBundles + - importBatch + - importResources + - in + - init + - initBatch + - initClient + - initFile + - instantiateHealthcareClient + - process + - processElement + - readResources + - searchResources + - searchResourcesWithGenericParameters + properties: + - DEAD_LETTER + - FAILED_BODY + - FAILED_BUNDLES + - FAILED_FILES + - OUT + - SUCCESSFUL_BODY + - SUCCESSFUL_BUNDLES + - TEMP_FILES +FhirIOPatientEverything: + methods: + - expand + - finishSpecifyingOutput + - getFailedReads + - getPatientCompartments + - getPipeline + - instantiateHealthcareClient + - processElement + properties: + - DEAD_LETTER + - OUT +FhirSearchParameter: + methods: + - equals + - getKey + - getQueries + - getResourceType + - hashCode + - of + - toString +FhirSearchParameterCoder: + methods: + - decode + - encode + - of +FieldAccessDescriptor: + methods: + - build + - builder + - create + - fieldIdsAccessed + - fieldNamesAccessed + - getAllFields + - getFieldId + - getFieldName + - getFieldRename + - getFieldsAccessed + - getKind + - getList + - getMap + - getNestedFieldsAccessed + - getQualifiers + - nestedFieldsById + - nestedFieldsByName + - of + - referencesSingleField + - resolve + - setFieldId + - setFieldName + - setFieldRename + - setQualifiers + - toString + - union + - withAllFields + - withFieldIds + - withFieldNameAs + - withFieldNames + - withFieldNamesAs + - withFields + - withNestedField + - withNestedFieldAs +FieldAccessDescriptorParser: + methods: + - getQualifiers + - parse + - visitArrayQualifierList + - visitDotExpression + - visitFieldSpecifier + - visitMapQualifierList + - visitQualifiedComponent + - visitQualifyComponent + - visitSimpleIdentifier + - visitWildcard +FieldTypeDescriptors: + methods: + - fieldTypeForJavaType + - javaTypeForFieldType +FieldValueTypeInformation: + methods: + - forField + - forGetter + - forOneOf + - forSetter + - getElementType + - getField + - getMapKeyType + - getMapValueType + - getMethod + - getName + - getNameOverride + - getNumber + - getNumberOverride + - getOneOfTypes + - getRawType + - getType + - isNullable + - setElementType + - setField + - setMapKeyType + - setMapValueType + - setMethod + - setName + - setNullable + - setNumber + - setOneOfTypes + - setRawType + - setType + - withName +FileBasedSink: + methods: + - apply + - cleanup + - close + - convertToFileResourceIfPossible + - create + - createWriteOperation + - createWriter + - decode + - encode + - formatRecord + - fromCanonical + - getCoderArguments + - getComponents + - getDefaultDestination + - getDestination + - getDestinationCoder + - getDestinationFile + - getDynamicDestinations + - getFilenamePolicy + - getMimeType + - getOutputFile + - getPaneInfo + - getShard + - getSideInputs + - getSink + - getSuggestedFilenameSuffix + - getTempDirectory + - getTempDirectoryProvider + - getTempFilename + - getWindow + - getWriteOperation + - of + - open + - populateDisplayData + - removeTemporaryFiles + - setWindowedWrites + - sideInput + - toString + - unwindowedFilename + - validate + - verifyDeterministic + - windowedFilename + - withShard + - write +FileBasedSource: + methods: + - advance + - allowsDynamicSplitting + - close + - createReader + - createSourceForSubrange + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getEmptyMatchTreatment + - getEstimatedSizeBytes + - getFileOrPatternSpec + - getFileOrPatternSpecProvider + - getFractionConsumed + - getMaxEndOffset + - getMode + - getSingleFileMetadata + - populateDisplayData + - split + - splitAtFraction + - start + - toString + - validate +FileChecksumMatcher: + methods: + - describeMismatchSafely + - describeTo + - fileContentsHaveChecksum + - matchesSafely +FileIO: + methods: + - apply + - by + - continuously + - create + - createWriteOperation + - createWriter + - defaultNaming + - equals + - expand + - filepattern + - formatRecord + - getCompression + - getDefaultDestination + - getDestination + - getDestinationCoder + - getEmptyMatchTreatment + - getFilenamePolicy + - getMatchUpdatedFiles + - getMetadata + - getSideInputs + - getWatchInterval + - hashCode + - match + - matchAll + - open + - openSeekable + - populateDisplayData + - process + - readFullyAsBytes + - readFullyAsUTF8String + - readMatches + - relativeFileNaming + - sideInput + - to + - toString + - unwindowedFilename + - via + - windowedFilename + - withCompression + - withConfiguration + - withDestinationCoder + - withDirectoryTreatment + - withEmptyGlobalWindowDestination + - withEmptyMatchTreatment + - withIgnoreWindowing + - withNaming + - withNoSpilling + - withNumShards + - withPrefix + - withSharding + - withSuffix + - withTempDirectory + - write + - writeDynamic +FilePatternMatchingShardedFile: + methods: + - readFilesWithRetries + - toString +FileSystem: {} +FileSystemUtils: + methods: + - wildcardToRegexp +FileSystems: + methods: + - apply + - copy + - create + - delete + - hasGlobWildcard + - match + - matchNewResource + - matchResources + - matchSingleFileSpec + - open + - rename + - setDefaultPipelineOptions + properties: + - DEFAULT_SCHEME + - filteredExistingSrcs + - resultDestinations + - resultSources +FileWriteSchemaTransformConfiguration: + methods: + - build + - builder + - csvConfigurationBuilder + - getCharset + - getCompression + - getCompressionCodecName + - getCsvConfiguration + - getCsvFormat + - getFilenamePrefix + - getFilenameSuffix + - getFormat + - getNumShards + - getParquetConfiguration + - getPreamble + - getRootElement + - getRowGroupSize + - getShardNameTemplate + - getXmlConfiguration + - parquetConfigurationBuilder + - setCharset + - setCompression + - setCompressionCodecName + - setCsvConfiguration + - setCsvFormat + - setFilenamePrefix + - setFilenameSuffix + - setFormat + - setNumShards + - setParquetConfiguration + - setPreamble + - setRootElement + - setRowGroupSize + - setShardNameTemplate + - setXmlConfiguration + - xmlConfigurationBuilder +FileWriteSchemaTransformFormatProviders: + methods: + - buildTransform + - identifier + - loadProviders +FillGaps: + methods: + - expand + - getNextWindow + - getPreviousWindow + - getValue + - keepEarliest + - keepLatest + - of + - onGcTimer + - onTimer + - process +Filter: + methods: + - by + - create + - equal + - expand + - getPredicate + - getRowSelector + - greaterThan + - greaterThanEq + - lessThan + - lessThanEq + - named + - of + - output + - populateDisplayData + - process + - processElement + - whereFieldId + - whereFieldIds + - whereFieldName + - whereFieldNames +FinalizeBundleHandler: + methods: + - create + - finalizeBundle + - getCallback + - getExpiryTime + - registerCallbacks +FindQuery: + methods: + - apply + - create + - withFilters + - withLimit + - withProjection +FirestoreIO: + methods: + - v1 +FirestoreV1: + methods: + - apply + - batchGetDocuments + - batchWrite + - build + - equals + - expand + - getNumBytes + - getNumWrites + - getStatus + - getWrite + - getWriteFailures + - getWriteResult + - hashCode + - listCollectionIds + - listDocuments + - partitionQuery + - populateDisplayData + - processElement + - read + - runQuery + - toBuilder + - toString + - withDeadLetterQueue + - withNameOnlyQuery + - withReadTime + - withRpcQosOptions + - write +FixedBytes: + methods: + - getLength + - getName + - of + - toBaseType + - toInputType + - toString + properties: + - IDENTIFIER +FixedPrecisionNumeric: + methods: + - of + - toInputType + properties: + - BASE_IDENTIFIER + - IDENTIFIER +FixedString: + methods: + - getLength + - getName + - of + - toInputType + - toString + properties: + - IDENTIFIER +FixedWindows: + methods: + - assignWindow + - equals + - getOffset + - getSize + - hashCode + - isCompatible + - of + - populateDisplayData + - verifyCompatibility + - windowCoder + - withOffset +FlatMap: + methods: + - eventTimeBy + - getAllowedTimestampSkew + - getEventTimeExtractor + - getFunctor + - named + - of + - output + - using +FlatMapElements: + methods: + - exceptionsInto + - exceptionsVia + - expand + - getInputTypeDescriptor + - getOutputTypeDescriptor + - getTypeDescriptor + - into + - populateDisplayData + - processElement + - via +FlatMapTranslator: + methods: + - collect + - getAllowedTimestampSkew + - processElement + - translate +Flatten: + methods: + - apply + - expand + - iterables + - pCollections +FlattenRunner: + methods: + - createRunnerForPTransform + - getPTransformRunnerFactories +FloatCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +FluentBackoff: + methods: + - backoff + - nextBackOffMillis + - reset + - toString + - withExponent + - withInitialBackoff + - withMaxBackoff + - withMaxCumulativeBackoff + - withMaxRetries + properties: + - DEFAULT +FnApiDoFnRunner: + methods: + - accept + - align + - bundleFinalizer + - clear + - createRunnerForPTransform + - element + - finishBundleContext + - fireTimestamp + - forRoots + - get + - getCurrentRelativeTime + - getDownstreamSplit + - getErrorContext + - getNewWindowStopIndex + - getPTransformRunnerFactories + - getPipelineOptions + - getPrimaryInFullyProcessedWindowsRoot + - getPrimarySplitRoot + - getProgress + - getResidualInUnprocessedWindowsRoot + - getResidualSplitRoot + - getWindowSplit + - key + - of + - offset + - onClaimFailed + - onClaimed + - onTimerContext + - output + - outputReceiver + - outputRowReceiver + - outputWithTimestamp + - pane + - paneInfo + - pipelineOptions + - processContext + - reset + - restriction + - restrictionTracker + - schemaElement + - set + - setRelative + - sideInput + - startBundleContext + - state + - taggedOutputReceiver + - timeDomain + - timer + - timerFamily + - timerId + - timestamp + - trySplit + - updateFinalMonitoringData + - updateIntermediateMonitoringData + - watermarkEstimator + - watermarkEstimatorState + - window + - withNoOutputTimestamp + - withOutputTimestamp +FnApiStateAccessor: + methods: + - add + - addAccum + - addIfAbsent + - apply + - bindBag + - bindCombining + - bindCombiningWithContext + - bindMap + - bindMultimap + - bindOrderedList + - bindSet + - bindValue + - bindWatermark + - clear + - computeIfAbsent + - contains + - entries + - finalizeState + - get + - getAccum + - getOrDefault + - getPipelineOptions + - isEmpty + - keys + - mergeAccumulators + - put + - read + - readLater + - remove + - sideInput + - values + - window + - write +FnApiTimerBundleTracker: + methods: + - get + - getBundleModifications + - getModifiedEventTimersOrdered + - getModifiedProcessingTimersOrdered + - getModifiedSynchronizedProcessingTimersOrdered + - getModifiedTimerIds + - getModifiedTimersOrdered + - getTimeDomain + - getTimer + - getTimerFamilyOrId + - of + - outputTimers + - reset + - timerModified +FnHarness: + methods: + - apply + - main +Fold: + methods: + - of +ForwardingClientResponseObserver: + methods: + - beforeStart + - create + - onCompleted + - onError + - onNext +FullJoin: + methods: + - by + - named + - of + - using +FullNameTableProvider: + methods: + - buildBeamSqlTable + - getSubProvider + - getTable + - getTableByFullName + - getTableType + - registerKnownTableNames +GaugeResult: + methods: + - create + - empty + - getTimestamp + - getValue +GceMetadataUtil: + methods: + - fetchDataflowJobId +GcpCredentialFactory: + methods: + - fromOptions + - getCredential +GcpIoPipelineOptionsRegistrar: + methods: + - getPipelineOptions +GcpPipelineOptionsRegistrar: + methods: + - getPipelineOptions +GcsCreateOptions: + methods: + - build + - builder + - gcsUploadBufferSizeBytes + - setGcsUploadBufferSizeBytes +GcsFileSystemRegistrar: + methods: + - fromOptions +GcsPath: + methods: + - compareTo + - endsWith + - equals + - fromComponents + - fromObject + - fromResourceName + - fromUri + - getBucket + - getFileName + - getFileSystem + - getName + - getNameCount + - getObject + - getParent + - getRoot + - hasNext + - hashCode + - isAbsolute + - iterator + - next + - normalize + - register + - relativize + - remove + - resolve + - resolveSibling + - setFileSystem + - startsWith + - subpath + - toAbsolutePath + - toFile + - toRealPath + - toResourceName + - toString + - toUri + properties: + - GCS_URI + - SCHEME +GcsPathValidator: + methods: + - fromOptions + - validateInputFilePatternSupported + - validateOutputFilePrefixSupported + - validateOutputResourceSupported + - verifyPath +GcsResourceId: + methods: + - equals + - getCurrentDirectory + - getFilename + - getScheme + - hashCode + - isDirectory + - resolve + - toString +GcsUtil: + methods: + - bucketAccessible + - bucketOwner + - build + - builder + - copy + - create + - createBucket + - enqueue + - execute + - expand + - fileSize + - getContentType + - getExpectFileToNotExist + - getFrom + - getLastError + - getNonWildcardPrefix + - getObject + - getObjects + - getReadyToEnqueue + - getTo + - getUploadBufferSizeBytes + - ioException + - isWildcard + - listObjects + - onFailure + - onSuccess + - open + - queue + - remove + - rename + - setContentType + - setExpectFileToNotExist + - setUploadBufferSizeBytes + - shouldRetry + - size + - storageObject + - verifyBucketAccessible +GenerateSequence: + methods: + - buildExternal + - expand + - from + - knownBuilders + - populateDisplayData + - setElementsPerPeriod + - setMaxReadTime + - setPeriod + - setStart + - setStop + - to + - withMaxReadTime + - withRate + - withTimestampFn + properties: + - URN +GenerateSequenceTableProvider: + methods: + - buildBeamSqlTable + - getTableType +Generator: + methods: + - compareTo + - copy + - currentInterEventDelayUs + - equals + - getCurrentConfig + - getFractionConsumed + - getNextEventId + - hasNext + - hashCode + - next + - nextEvent + - remove + - splitAtEventId + - toCheckpoint + - toString + - withDelay + properties: + - event + - eventTimestamp + - wallclockTimestamp + - watermark +GeneratorCheckpoint: + methods: + - decode + - encode + - finalizeCheckpoint + - toGenerator + - toString + - verifyDeterministic + properties: + - CODER_INSTANCE +GeneratorConfig: + methods: + - copy + - copyWith + - estimatedBytesForEvents + - getAvgAuctionByteSize + - getAvgBidByteSize + - getAvgPersonByteSize + - getEstimatedSizeBytes + - getHotAuctionRatio + - getHotBiddersRatio + - getHotSellersRatio + - getNumActivePeople + - getNumInFlightAuctions + - getOccasionalDelaySec + - getProbDelayedEvent + - getStartEventId + - getStopEventId + - nextAdjustedEventNumber + - nextEventNumber + - nextEventNumberForWatermark + - split + - timestampAndInterEventDelayUsForEvent + - toString + properties: + - AUCTION_PROPORTION + - FIRST_AUCTION_ID + - FIRST_CATEGORY_ID + - FIRST_PERSON_ID + - PERSON_PROPORTION + - PROPORTION_DENOMINATOR + - baseTime + - firstEventId + - firstEventNumber + - maxEvents +GenericDlq: + methods: + - getDlqTransform +GenericTranslatorProvider: + methods: + - build + - createWithDefaultTranslators + - findTranslator + - newBuilder + - register +GetterBasedSchemaProvider: + methods: + - apply + - create + - equals + - fieldValueGetters + - fieldValueTypeInformations + - fromRowFunction + - get + - getRaw + - hashCode + - name + - schemaTypeCreator + - toRowFunction +GetterBasedSchemaProviderBenchmark: + methods: + - processArrayOfNestedStringField + - processArrayOfStringField + - processByteBufferField + - processBytesField + - processDateTimeField + - processIntField + - processMapOfIntField + - processMapOfNestedIntField + - processNestedBytesField + - processNestedIntField + - processStringBuilderField + - processStringField +GlobalWindow: + methods: + - consistentWithEquals + - decode + - encode + - equals + - getCoderArguments + - hashCode + - maxTimestamp + - verifyDeterministic + properties: + - INSTANCE +GlobalWindows: + methods: + - assignWindows + - assignsToOneWindow + - equals + - getDefaultWindowMappingFn + - getSideInputWindow + - hashCode + - isCompatible + - toString + - verifyCompatibility + - windowCoder +Group: + methods: + - aggregate + - aggregateField + - aggregateFieldBaseValue + - aggregateFields + - aggregateFieldsById + - byFieldAccessDescriptor + - byFieldIds + - byFieldNames + - create + - expand + - getToKvs + - globally + - process + - witValueField + - withKeyField + - withValueField +GroupByKey: + methods: + - applicableTo + - create + - expand + - fewKeys + - getInputValueCoder + - getKeyCoder + - getOutputKvCoder + - populateDisplayData + - updateWindowingStrategy + - validate +GroupByKeyLoadTest: + methods: + - main + - processElement +GroupIntoBatches: + methods: + - apply + - create + - createDefault + - expand + - getBatchSize + - getBatchSizeBytes + - getBatchingParams + - getElementByteSize + - getMaxBufferingDuration + - getWeigher + - identity + - ofByteSize + - ofSize + - onBufferingTimer + - onWindowExpiration + - onWindowTimer + - processElement + - toString + - withByteSize + - withMaxBufferingDuration + - withShardedKey + - withSize +GrowableOffsetRangeTracker: + methods: + - getProgress + - isBounded + - trySplit +GrpcContextHeaderAccessorProvider: + methods: + - getHeaderAccessor + - getSdkWorkerId + - interceptCall + - interceptor +GrpcFnServer: + methods: + - allocatePortAndCreateFor + - close + - create + - getApiServiceDescriptor + - getServer + - getService +HBaseCoderProviderRegistrar: + methods: + - getCoderProviders +HBaseIO: + methods: + - advance + - close + - createReader + - equals + - expand + - finishBundle + - getConfiguration + - getCurrent + - getCurrentSource + - getEstimatedSizeBytes + - getFractionConsumed + - getKeyRange + - getOutputCoder + - getScan + - getSplitPointsConsumed + - getTableId + - hashCode + - populateDisplayData + - processElement + - read + - readAll + - setup + - split + - splitAtFraction + - start + - startBundle + - tearDown + - validate + - withConfiguration + - withFilter + - withKeyRange + - withScan + - withTableId + - write +HCatToRow: + methods: + - expand + - fromSpec + - processElement +HCatalogBeamSchema: + methods: + - create + - getTableSchema + - hasDatabase +HCatalogIO: + methods: + - advance + - close + - createReader + - expand + - finishBundle + - getCurrent + - getCurrentSource + - getEstimatedSizeBytes + - getOutputCoder + - initiateWrite + - populateDisplayData + - processElement + - read + - split + - start + - startBundle + - tearDown + - withBatchSize + - withConfigProperties + - withDatabase + - withFilter + - withPartition + - withPartitionCols + - withPollingInterval + - withTable + - withTerminationCondition + - write +HCatalogTable: + methods: + - buildIOReader + - buildIOWriter + - config + - database + - getSchema + - isBounded + - schema + - table +HCatalogUtils: {} +HDFSSynchronization: + methods: + - acquireTaskAttemptIdLock + - acquireTaskIdLock + - releaseJobIdLock + - tryAcquireJobLock +HL7v2IO: + methods: + - expand + - finishSpecifyingOutput + - getAll + - getEarliestToLatestRestriction + - getFailedInsertsWithErr + - getFailedReads + - getMessages + - getPipeline + - ingestMessages + - initClient + - instantiateHealthcareClient + - listMessages + - of + - processElement + - read + - readAll + - readAllWithFilter + - readWithFilter + - split + - withInitialSplitDuration + - writeMessages + properties: + - DEAD_LETTER + - FAILED + - OUT + - SUCCESS +HL7v2Message: + methods: + - fromModel + - getCreateTime + - getData + - getLabels + - getMessageType + - getName + - getSchematizedData + - getSendFacility + - getSendTime + - setSchematizedData + - toModel + - toString +HL7v2MessageCoder: + methods: + - decode + - encode + - of +HadoopFileSystemModule: + methods: + - deserialize + - serialize +HadoopFileSystemOptionsRegistrar: + methods: + - getPipelineOptions +HadoopFileSystemRegistrar: + methods: + - fromOptions +HadoopFormatIO: + methods: + - advance + - close + - createReader + - decode + - encode + - expand + - finishBundle + - getConfiguration + - getCurrent + - getCurrentSource + - getDefaultCoder + - getEstimatedSizeBytes + - getFractionConsumed + - getKeyCoder + - getKeyTranslationFunction + - getKeyTypeDescriptor + - getOutputCoder + - getSkipKeyClone + - getSkipValueClone + - getSplit + - getSplitPointsRemaining + - getValueCoder + - getValueTranslationFunction + - getValueTypeDescriptor + - getinputFormatClass + - getinputFormatKeyClass + - getinputFormatValueClass + - populateDisplayData + - processElement + - read + - setup + - split + - start + - startBundle + - toBuilder + - toString + - validate + - validateTransform + - withConfiguration + - withConfigurationTransform + - withExternalSynchronization + - withKeyTranslation + - withPartitioning + - withSkipKeyClone + - withSkipValueClone + - withValueTranslation + - withoutPartitioning + - write + properties: + - JOB_ID + - NUM_REDUCES + - OUTPUT_DIR + - OUTPUT_FORMAT_CLASS_ATTR + - OUTPUT_KEY_CLASS + - OUTPUT_VALUE_CLASS + - PARTITIONER_CLASS_ATTR +HarnessMonitoringInfosInstructionHandler: + methods: + - harnessMonitoringInfos +HarnessStreamObserverFactories: + methods: + - fromOptions +HealthcareIOError: + methods: + - getDataResource + - getErrorMessage + - getObservedTime + - getStackTrace + - getStatusCode +HealthcareIOErrorCoder: + methods: + - decode + - encode + - of +HealthcareIOErrorToTableRow: + methods: + - apply + properties: + - TABLE_FIELD_SCHEMAS + - TIMESTAMP_FIELD_NAME +HeartbeatRecord: + methods: + - equals + - getRecordTimestamp + - getTimestamp + - hashCode + - toString +HeartbeatRecordAction: + methods: + - run +HistogramData: + methods: + - clear + - equals + - getAccumulatedBucketSize + - getBottomBucketCount + - getBucketIndex + - getBucketSize + - getBucketType + - getCount + - getNumBuckets + - getPercentileString + - getRangeFrom + - getRangeTo + - getStart + - getTopBucketCount + - getTotalCount + - getWidth + - hashCode + - incBottomBucketCount + - incBucketCount + - incTopBucketCount + - linear + - of + - p50 + - p90 + - p99 + - record + - update +HllCount: + methods: + - expand + - forBytes + - forIntegers + - forLongs + - forStrings + - getSketchFromByteBuffer + - globally + - perKey + - processElement + - withPrecision + properties: + - DEFAULT_PRECISION + - MAXIMUM_PRECISION + - MINIMUM_PRECISION +HttpClientConfiguration: + methods: + - build + - builder + - connectionAcquisitionTimeout + - connectionMaxIdleTime + - connectionTimeToLive + - connectionTimeout + - maxConnections + - readTimeout + - socketTimeout + - writeTimeout +HttpHealthcareApiClient: + methods: + - createDicomStore + - createFhirStore + - createHL7v2Message + - createHL7v2Store + - deidentifyFhirStore + - deleteDicomStore + - deleteFhirStore + - deleteHL7v2Message + - deleteHL7v2Store + - executeFhirBundle + - exportFhirResourceToBigQuery + - exportFhirResourceToGcs + - getEarliestHL7v2SendTime + - getEnd + - getHL7v2Message + - getHL7v2Store + - getJsonFactory + - getLatestHL7v2SendTime + - getPatientEverything + - getStart + - hasNext + - importFhirResource + - ingestHL7v2Message + - initialize + - iterator + - listAllFhirStores + - makeHL7v2ListRequest + - makeListRequest + - makeSendTimeBoundHL7v2ListRequest + - next + - ofPatientEverything + - ofSearch + - pollOperation + - readFhirResource + - retrieveDicomStudyMetadata + - searchFhirResource + - uploadToDicomStore +IOITMetrics: + methods: + - publishToInflux +IOUtils: + methods: + - forEach +IdGenerators: + methods: + - decrementingLongs + - incrementingLongs +IdNameReserve: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER +IdentityWindowFn: + methods: + - assignWindows + - assignsToOneWindow + - getDefaultWindowMappingFn + - isCompatible + - verifyCompatibility + - windowCoder +IllegalMutationException: + methods: + - getNewValue + - getSavedValue +Impulse: + methods: + - create + - expand +InMemoryMetaStore: + methods: + - buildBeamSqlTable + - createTable + - dropTable + - getTableType + - getTables + - registerProvider +InMemoryMetaTableProvider: + methods: + - createTable + - dropTable + - getTables +InProcessServerFactory: + methods: + - allocateAddressAndCreate + - create +IncompatibleWindowException: + methods: + - getMessage +InferableFunction: + methods: + - apply + - fromProcessFunctionWithOutputType + - getInputTypeDescriptor + - getOutputTypeDescriptor + - populateDisplayData +InfluxDBPublisher: + methods: + - dataPoint + - fields + - measurement + - publish + - publishNexmarkResults + - publishWithSettings + - tags + - timestamp + - timestampUnit + - toString +InfluxDBSettings: + methods: + - builder + - copyWithMeasurement + - get + - withDatabase + - withHost + - withMeasurement + - withRetentionPolicy + properties: + - database + - host + - measurement + - retentionPolicy + - userName + - userPassword +InfluxDbIO: + methods: + - advance + - checkClientTrusted + - checkServerTrusted + - close + - create + - createReader + - expand + - finishBundle + - getAcceptedIssuers + - getConnection + - getCurrent + - getCurrentSource + - getEstimatedSizeBytes + - getOutputCoder + - populateDisplayData + - processElement + - read + - setDisableCertificateValidation + - split + - start + - startBundle + - tearDown + - validate + - withBatchSize + - withConsistencyLevel + - withDataSourceConfiguration + - withDatabase + - withDisableCertificateValidation + - withFromDateTime + - withMetric + - withQuery + - withRetentionPolicy + - withToDateTime + - write +InitialPartition: + methods: + - isInitialPartition + properties: + - PARENT_TOKENS + - PARTITION_TOKEN +InitializeDoFn: + methods: + - processElement +InsertRetryPolicy: + methods: + - alwaysRetry + - getInsertErrors + - neverRetry + - retryTransientErrors + - shouldRetry +InstanceBuilder: + methods: + - build + - fromClass + - fromClassName + - fromFactoryMethod + - ofType + - withArg +InstanceUtils: + methods: + - create + - forName +InstantCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +InstantDeserializer: + methods: + - close + - configure + - deserialize +InstantSerializer: + methods: + - close + - configure + - serialize +IntervalWindow: + methods: + - compareTo + - consistentWithEquals + - contains + - decode + - encode + - end + - equals + - getCoder + - getCoderArguments + - hashCode + - intersects + - isDisjoint + - isRegisterByteSizeObserverCheap + - maxTimestamp + - of + - registerByteSizeObserver + - span + - start + - toString + - verifyDeterministic +InvalidConfigurationException: {} +InvalidLocationException: {} +InvalidSchemaException: {} +InvalidTableException: {} +IsInf: + methods: + - isInf +IsNan: + methods: + - isNan +IterableCoder: + methods: + - getEncodedTypeDescriptor + - of + - structuralValue +IterableLikeCoder: + methods: + - decode + - encode + - getCoderArguments + - getElemCoder + - isRegisterByteSizeObserverCheap + - registerByteSizeObserver + - update + - verifyDeterministic +IterableSideInput: + methods: + - get +JAXBCoder: + methods: + - close + - decode + - encode + - equals + - getEncodedTypeDescriptor + - getJAXBClass + - hashCode + - of + - write +JavaBeanSchema: + methods: + - create + - equals + - fieldValueGetters + - fieldValueTypeInformations + - get + - hashCode + - schemaFor + - schemaTypeCreator + properties: + - INSTANCE +JavaBeanUtils: + methods: + - appender + - createConstructorCreator + - createGetter + - createSetter + - createStaticCreator + - getConstructorCreator + - getFieldTypes + - getGetters + - getSetters + - getStaticCreator + - prepare + - schemaFromJavaBeanClass + - validateJavaBean + properties: + - CACHED_CREATORS +JavaFieldSchema: + methods: + - fieldValueGetters + - fieldValueTypeInformations + - get + - schemaFor + - schemaTypeCreator + properties: + - INSTANCE +JavaUdfLoader: + methods: + - createClassLoader + - loadAggregateFunction + - loadScalarFunction + - run +JdbcConnection: + methods: + - getCurrentSchemaPlus + - getPipelineOptions + - setPipelineOptions + - setPipelineOptionsMap +JdbcDriver: + methods: + - connect + properties: + - CONNECT_STRING_PREFIX + - INSTANCE + - OBJECT_MAPPER +JdbcIO: + methods: + - apply + - create + - expand + - finish + - finishBundle + - of + - populateDisplayData + - process + - processElement + - read + - readAll + - readRows + - readWithPartitions + - setParameters + - setup + - tearDown + - withAutoSharding + - withBatchSize + - withCoder + - withConnectionInitSqls + - withConnectionProperties + - withDataSourceConfiguration + - withDataSourceProviderFn + - withDriverClassLoader + - withFetchSize + - withLowerBound + - withNumPartitions + - withOutputParallelization + - withParameterSetter + - withPartitionColumn + - withPassword + - withPreparedStatementSetter + - withQuery + - withResults + - withRetryConfiguration + - withRetryStrategy + - withRowMapper + - withRowOutput + - withStatement + - withStatementPreparator + - withTable + - withUpperBound + - withUsername + - withWriteResults + - write + - writeVoid +JdbcReadSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getConnectionInitSql + - getConnectionProperties + - getDriverClassName + - getFetchSize + - getJdbcUrl + - getLocation + - getOutputParallelization + - getPassword + - getReadQuery + - getUsername + - identifier + - inputCollectionNames + - outputCollectionNames + - setConnectionInitSql + - setConnectionProperties + - setDriverClassName + - setFetchSize + - setJdbcUrl + - setLocation + - setOutputParallelization + - setPassword + - setReadQuery + - setUsername + - validate +JdbcSchemaIOProvider: + methods: + - buildReader + - buildWriter + - configurationSchema + - expand + - from + - identifier + - isBounded + - requiresDataSchema + - schema +JdbcWriteResult: + methods: + - create +JdbcWriteSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getAutosharding + - getConnectionInitSql + - getConnectionProperties + - getDriverClassName + - getJdbcUrl + - getLocation + - getPassword + - getUsername + - getWriteStatement + - identifier + - inputCollectionNames + - outputCollectionNames + - setAutosharding + - setConnectionInitSql + - setConnectionProperties + - setDriverClassName + - setJdbcUrl + - setLocation + - setPassword + - setUsername + - setWriteStatement + - validate +JmsIO: + methods: + - advance + - close + - createReader + - expand + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getOutputCoder + - getTotalBacklogBytes + - getWatermark + - mapMessage + - populateDisplayData + - processElement + - read + - readMessage + - setup + - split + - start + - teardown + - withAutoScaler + - withCloseTimeout + - withCoder + - withConnectionFactory + - withMaxNumRecords + - withMaxReadTime + - withMessageMapper + - withPassword + - withQueue + - withTopic + - withTopicNameMapper + - withUsername + - withValueMapper + - write +JmsIOException: {} +JmsRecord: + methods: + - equals + - getJmsCorrelationID + - getJmsDeliveryMode + - getJmsDestination + - getJmsExpiration + - getJmsMessageID + - getJmsPriority + - getJmsRedelivered + - getJmsReplyTo + - getJmsTimestamp + - getJmsType + - getPayload + - getProperties + - hashCode +Join: + methods: + - accumulationMode + - by + - expand + - fullOuterJoin + - getJoiner + - getLeftKeyExtractor + - getRightKeyExtractor + - getType + - innerBroadcastJoin + - innerJoin + - left + - leftOuterBroadcastJoin + - leftOuterJoin + - named + - of + - on + - output + - outputValues + - processElement + - right + - rightOuterJoin + - triggeredBy + - using + - windowBy + - with + - withAllowedLateness + - withOnTimeBehavior + - withTimestampCombiner + properties: + - LHS_TAG + - RHS_TAG +JoinRelOptRuleCall: + methods: + - builder + - getChildRels + - getMetadataQuery + - getOperand0 + - getParents + - getPlanner + - getRelList + - getRule + - rel + - transformTo +JoinTranslator: + methods: + - getFnName + - processElement +JsonArrayCoder: + methods: + - decode + - encode + - of +JsonMatcher: + methods: + - describeTo + - jsonBytesLike + - jsonStringLike +JsonPayloadSerializerProvider: + methods: + - getSerializer + - identifier +JsonToRow: + methods: + - build + - create + - expand + - finishSpecifyingOutput + - getFailedToParseLines + - getJsonToRowWithErrFn + - getPipeline + - getResults + - processElement + - resultBuilder + - setErrorField + - setJsonToRowWithErrFn + - setLineField + - toBuilder + - withExceptionReporting + - withExtendedErrorInfo + - withNullBehavior + - withSchema + - withSchemaAndNullBehavior + properties: + - ERROR_ROW_SCHEMA + - ERROR_ROW_WITH_ERR_MSG_SCHEMA +JsonUtils: + methods: + - apply + - beamSchemaFromJsonSchema + - getJsonBytesToRowFunction + - getJsonStringToRowFunction + - getRowToJsonBytesFunction + - getRowToJsonStringsFunction +JvmInitializers: + methods: + - runBeforeProcessing + - runOnStartup +KV: + methods: + - compare + - equals + - getKey + - getValue + - hashCode + - of + - toString +KafkaCheckpointMark: + methods: + - finalizeCheckpoint + - getNextOffset + - getPartition + - getPartitions + - getTopic + - getWatermarkMillis + - toString +KafkaCommitOffset: + methods: + - expand + - processElement +KafkaConnectUtils: + methods: + - beamRowFromSourceRecordFn + - beamSchemaFromKafkaConnectSchema + - beamSchemaTypeFromKafkaType + - mapSourceRecord +KafkaIO: + methods: + - apply + - buildExternal + - commitOffsets + - commitOffsetsInFinalize + - decode + - encode + - expand + - externalWithMetadata + - getReplacementTransform + - getTimestamp + - knownBuilders + - mapOutputs + - populateDisplayData + - processElement + - read + - readBytes + - readSourceDescriptors + - setCommitOffsetInFinalize + - setConsumerConfig + - setKeyDeserializer + - setKeySerializer + - setMaxNumRecords + - setMaxReadTime + - setProducerConfig + - setStartReadTime + - setStopReadTime + - setTimestampPolicy + - setTopic + - setTopics + - setValueDeserializer + - setValueSerializer + - toExternalKafkaRecord + - updateConsumerProperties + - updateProducerProperties + - useCreateTime + - useLogAppendTime + - useProcessingTime + - validate + - values + - withBootstrapServers + - withCheckStopReadingFn + - withConsumerConfigOverrides + - withConsumerConfigUpdates + - withConsumerFactoryFn + - withCreatWatermarkEstimatorFn + - withCreateTime + - withDynamicRead + - withEOS + - withExtractOutputTimestampFn + - withInputTimestamp + - withKeyDeserializer + - withKeyDeserializerAndCoder + - withKeyDeserializerProvider + - withKeySerializer + - withLogAppendTime + - withManualWatermarkEstimator + - withMaxNumRecords + - withMaxReadTime + - withMonotonicallyIncreasingWatermarkEstimator + - withOffsetConsumerConfigOverrides + - withProcessingTime + - withProducerConfigUpdates + - withProducerFactoryFn + - withPublishTimestampFunction + - withReadCommitted + - withStartReadTime + - withStopReadTime + - withTimestampFn + - withTimestampFn2 + - withTimestampPolicyFactory + - withTopic + - withTopicPartitions + - withTopics + - withValueDeserializer + - withValueDeserializerAndCoder + - withValueDeserializerProvider + - withValueSerializer + - withWallTimeWatermarkEstimator + - withWatermarkFn + - withWatermarkFn2 + - withoutMetadata + - write + - writeRecords + properties: + - KAFKA_READ_OVERRIDE + - URN + - URN_WITHOUT_METADATA + - URN_WITH_METADATA +KafkaReadSchemaTransformConfiguration: + methods: + - build + - builder + - getAutoOffsetResetConfig + - getBootstrapServers + - getConfluentSchemaRegistrySubject + - getConfluentSchemaRegistryUrl + - getConsumerConfigUpdates + - getDataFormat + - getSchema + - getTopic + - setAutoOffsetResetConfig + - setBootstrapServers + - setConfluentSchemaRegistrySubject + - setConfluentSchemaRegistryUrl + - setConsumerConfigUpdates + - setDataFormat + - setSchema + - setTopic + - validate + properties: + - VALID_DATA_FORMATS + - VALID_START_OFFSET_VALUES +KafkaReadSchemaTransformProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames +KafkaRecord: + methods: + - equals + - getHeaders + - getKV + - getOffset + - getPartition + - getTimestamp + - getTimestampType + - getTopic + - hashCode +KafkaRecordCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - isRegisterByteSizeObserverCheap + - of + - structuralValue + - verifyDeterministic +KafkaSourceConsumerFn: + methods: + - checkDone + - configs + - currentRestriction + - exists + - getHashCode + - getInitialRestriction + - getRestrictionCoder + - isBounded + - newTracker + - offset + - offsetStorageReader + - offsets + - process + - start + - storageExists + - tryClaim + - trySplit + properties: + - BEAM_INSTANCE_PROPERTY + - fetchedRecords + - history + - maxRecords + - milisToRun + - offset +KafkaSourceDescriptor: + methods: + - getTopicPartition + - of +KafkaTableProvider: + methods: + - buildBeamSqlTable + - getTableType +KafkaWriteSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getBootstrapServers + - getFormat + - getProducerConfigUpdates + - getTopic + - identifier + - inputCollectionNames + - outputCollectionNames + - setBootstrapServers + - setFormat + - setProducerConfigUpdates + - setTopic + properties: + - SUPPORTED_FORMATS +KeyPairUtils: + methods: + - preparePrivateKey + - readPrivateKeyFile +KeyedPCollectionTuple: + methods: + - and + - apply + - empty + - expand + - getCoGbkResultSchema + - getCollection + - getKeyCoder + - getKeyedCollections + - getPipeline + - getTupleTag + - isEmpty + - of +Keys: + methods: + - apply + - create + - expand +KinesisClientThrottledException: {} +KinesisIO: + methods: + - addPutRecordsRequest + - build + - builder + - close + - expand + - finishBundle + - finishSpecifyingOutput + - getPipeline + - maxBufferedTime + - maxBytes + - processElement + - read + - readData + - refreshPeriodically + - setup + - shardAwareHashKey + - shardRefreshInterval + - startBundle + - teardown + - withAWSClientsProvider + - withArrivalTimeWatermarkPolicy + - withBatchMaxBytes + - withBatchMaxRecords + - withClientConfiguration + - withConcurrentRequests + - withCustomRateLimitPolicy + - withCustomWatermarkPolicy + - withDynamicDelayRateLimitPolicy + - withFixedDelayRateLimitPolicy + - withInitialPositionInStream + - withInitialTimestampInStream + - withMaxCapacityPerShard + - withMaxNumRecords + - withMaxReadTime + - withPartitionKey + - withPartitioner + - withProcessingTimeWatermarkPolicy + - withProducerProperties + - withRecordAggregation + - withRecordAggregationDisabled + - withRequestRecordsLimit + - withSerializer + - withStreamName + - withUpToDateThreshold + - write +KinesisRecord: + methods: + - equals + - getApproximateArrivalTimestamp + - getData + - getDataAsBytes + - getExtendedSequenceNumber + - getPartitionKey + - getReadTime + - getSequenceNumber + - getShardId + - getStreamName + - getSubSequenceNumber + - getUniqueId + - hashCode + - toString +KinesisTransformRegistrar: + methods: + - buildExternal + - knownBuilderInstances + - setAwsAccessKey + - setAwsSecretKey + - setInitialPositionInStream + - setInitialTimestampInStream + - setMaxCapacityPerShard + - setMaxNumRecords + - setMaxReadTime + - setPartitionKey + - setProducerProperties + - setRateLimit + - setRegion + - setRequestRecordsLimit + - setServiceEndpoint + - setStreamName + - setUpToDateThreshold + - setVerifyCertificate + - setWatermarkIdleDurationThreshold + - setWatermarkPolicy + properties: + - READ_DATA_URN + - WRITE_URN +KryoCoder: + methods: + - decode + - encode + - equals + - hashCode + - of + - verifyDeterministic + - withRegistrar +KryoCoderProvider: + methods: + - coderFor + - of + - registerTo + - withRegistrar +KuduIO: + methods: + - createReader + - expand + - finishBundle + - getEstimatedSizeBytes + - getOutputCoder + - populateDisplayData + - processElement + - read + - setup + - split + - startBundle + - teardown + - validate + - withBatchSize + - withCoder + - withFaultTolerent + - withFormatFn + - withMasterAddresses + - withParseFn + - withPredicates + - withProjectedColumns + - withTable + - write +KvCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getEncodedTypeDescriptor + - getKeyCoder + - getValueCoder + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - structuralValue + - verifyDeterministic +KvSwap: + methods: + - apply + - create + - expand +LatencyRecordingHttpRequestInitializer: + methods: + - initialize + - intercept + - interceptResponse + properties: + - HISTOGRAM_BUCKET_TYPE +Latest: + methods: + - addInput + - combineFn + - createAccumulator + - expand + - extractOutput + - getAccumulatorCoder + - getDefaultOutputCoder + - globally + - mergeAccumulators + - perKey +LazyAggregateCombineFn: + methods: + - addInput + - createAccumulator + - extractOutput + - getAccumTVariable + - getAccumulatorCoder + - getUdafImpl + - iterator + - mergeAccumulators + - toString +LeftJoin: + methods: + - by + - named + - of + - using +LengthPrefixCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getValueCoder + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +ListCoder: + methods: + - consistentWithEquals + - getEncodedTypeDescriptor + - of + - structuralValue + - verifyDeterministic +LoadTestResult: + methods: + - getRuntime + - getTotalBytesCount + - toMap +LocalFileSystemRegistrar: + methods: + - fromOptions +LocalResources: + methods: + - fromFile + - fromPath + - fromString +LogicalCalcMergeRule: + methods: + - onMatch + properties: + - INSTANCE +LogicalEndpoint: + methods: + - data + - getInstructionId + - getTimerFamilyId + - getTransformId + - isTimer + - timer +LongGenerator: + methods: + - nextLong +LzoCompression: + methods: + - createLzoInputStream + - createLzoOutputStream + - createLzopInputStream + - createLzopOutputStream +Main: + methods: + - call + - main +ManagedChannelFactory: + methods: + - createDefault + - createEpoll + - createInProcess + - forDescriptor + - withDirectExecutor + - withInterceptors +ManagedFactoryImpl: + methods: + - close + - create +MapCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getEncodedTypeDescriptor + - getKeyCoder + - getValueCoder + - of + - registerByteSizeObserver + - structuralValue + - verifyDeterministic +MapElements: + methods: + - exceptionsInto + - exceptionsVia + - expand + - getInputTypeDescriptor + - getMapper + - getOutputTypeDescriptor + - getTypeDescriptor + - into + - named + - of + - output + - populateDisplayData + - processElement + - using + - via +MapFnRunners: + methods: + - create + - createRunnerForPTransform + - forValueMapFnFactory + - forWindowedValueMapFnFactory +MapKeys: + methods: + - exceptionsInto + - exceptionsVia + - expand + - into + - via +MapValues: + methods: + - exceptionsInto + - exceptionsVia + - expand + - into + - via +MapperFactory: + methods: + - changeStreamRecordMapper + - partitionMetadataMapper +MappingUtils: {} +MatchResult: + methods: + - build + - builder + - checksum + - create + - isReadSeekEfficient + - lastModifiedMillis + - metadata + - resourceId + - setChecksum + - setIsReadSeekEfficient + - setLastModifiedMillis + - setResourceId + - setSizeBytes + - sizeBytes + - status + - unknown +Materializations: + methods: + - getUrn + - iterable + - multimap + properties: + - ITERABLE_MATERIALIZATION_URN + - MULTIMAP_MATERIALIZATION_URN +Max: + methods: + - apply + - doublesGlobally + - doublesPerKey + - globally + - identity + - integersGlobally + - integersPerKey + - longsGlobally + - longsPerKey + - naturalOrder + - of + - ofDoubles + - ofIntegers + - ofLongs + - perKey + - populateDisplayData +Mean: + methods: + - addInput + - createAccumulator + - decode + - encode + - equals + - extractOutput + - getAccumulatorCoder + - globally + - hashCode + - mergeAccumulator + - of + - perKey + - toString + - verifyDeterministic +MemoryMonitor: + methods: + - describeMemory + - dumpHeap + - fromOptions + - isThrashing + - run + - stop + - totalGCTimeMilliseconds + - tryToDumpHeap + - waitForResources + - waitForThrashingState + properties: + - DEFAULT_SLEEP_TIME_MILLIS +MergeOverlappingIntervalWindows: + methods: + - add + - apply + - intersects + - mergeWindows + - toString +MetadataCoder: + methods: + - consistentWithEquals + - decode + - encode + - of +MetadataCoderV2: + methods: + - consistentWithEquals + - decode + - encode + - of +MetricFiltering: + methods: + - matches + - matchesScope + - subPathMatches +MetricKey: + methods: + - create + - metricName + - stepName + - toString +MetricName: + methods: + - getName + - getNamespace + - named + - toString +MetricNameFilter: + methods: + - getName + - getNamespace + - inNamespace + - named +MetricQueryResults: + methods: + - create + - getCounters + - getDistributions + - getGauges + - toString +MetricResult: + methods: + - addAttempted + - addCommitted + - attempted + - create + - getAttempted + - getCommitted + - getCommittedOrNull + - getKey + - getName + - hasCommitted + - transform +MetricResults: + methods: + - allMetrics + - queryMetrics + - toString +Metrics: + methods: + - bundleProcessingThreadCounter + - bundleProcessingThreadDistribution + - counter + - dec + - distribution + - gauge + - getName + - inc + - reset + - set + - update + - updateFinalMonitoringData + - updateIntermediateMonitoringData +MetricsBenchmark: + methods: + - check + - testBundleProcessingThreadCounterMutation + - testBundleProcessingThreadCounterReset + - testCounterCellMutation + - testCounterCellReset + properties: + - bundleCounter + - counterCell +MetricsEnvironment: + methods: + - activate + - close + - getCurrentContainer + - getMetricsEnvironmentStateForCurrentThread + - getProcessWideContainer + - isMetricsSupported + - scopedMetricsContainer + - setCurrentContainer + - setMetricsSupported + - setProcessWideContainer +MetricsFilter: + methods: + - addNameFilter + - addStep + - build + - builder + - names + - steps +MetricsReader: + methods: + - getCounterMetric + - getEndTimeMetric + - getStartTimeMetric + - ofResults + - readAll + - withNamespace +MicrosInstant: + methods: + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +MimeTypes: + properties: + - BINARY + - TEXT +Min: + methods: + - apply + - doublesGlobally + - doublesPerKey + - globally + - identity + - integersGlobally + - integersPerKey + - longsGlobally + - longsPerKey + - naturalOrder + - of + - ofDoubles + - ofIntegers + - ofLongs + - perKey + - populateDisplayData +Mod: + methods: + - equals + - getKeysJson + - getNewValuesJson + - getOldValuesJson + - hashCode + - toString +MongoDbGridFSIO: + methods: + - advance + - close + - createReader + - expand + - finishBundle + - getAllowedTimestampSkew + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getEstimatedSizeBytes + - getOutputCoder + - output + - populateDisplayData + - processElement + - read + - setup + - split + - start + - startBundle + - teardown + - validate + - withBucket + - withChunkSize + - withCoder + - withDatabase + - withFilename + - withFilter + - withParser + - withSkew + - withUri + - write +MongoDbIO: + methods: + - advance + - close + - closeMongoClient + - createMongoClient + - createReader + - expand + - finishBundle + - getCurrent + - getCurrentSource + - getDocumentCount + - getEstimatedSizeBytes + - getOutputCoder + - populateDisplayData + - processElement + - read + - split + - start + - startBundle + - withBatchSize + - withBucketAuto + - withCollection + - withDatabase + - withIgnoreSSLCertificate + - withMaxConnectionIdleTime + - withNumSplits + - withOrdered + - withQueryFn + - withSSLEnabled + - withSSLInvalidHostNameAllowed + - withUpdateConfiguration + - withUri + - write +MongoDbTable: + methods: + - apply + - buildIOReader + - buildIOWriter + - constructFilter + - convert + - create + - expand + - getNotSupported + - getSupported + - getTableStatistics + - isBounded + - numSupported + - processElement + - supportsProjects + - toString + - withSchema +MongoDbTableProvider: + methods: + - buildBeamSqlTable + - getTableType +Monitor: + methods: + - getTransform + - processElement + properties: + - name + - prefix +MoreFutures: + methods: + - allAsList + - allAsListWithExceptions + - exception + - get + - getException + - getResult + - isCancelled + - isDone + - isException + - result + - runAsync + - supplyAsync +MovingFunction: + methods: + - add + - get + - isSignificant +MqttIO: + methods: + - add + - advance + - close + - closeMqttClient + - create + - createMqttClient + - createReader + - equals + - expand + - finalizeCheckpoint + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getOutputCoder + - getWatermark + - hashCode + - populateDisplayData + - processElement + - read + - split + - start + - withClientId + - withConnectionConfiguration + - withMaxNumRecords + - withMaxReadTime + - withPassword + - withRetained + - withServerUri + - withTopic + - withUsername + - write +MultimapSideInput: + methods: + - get +MultimapUserState: + methods: + - asyncClose + - clear + - createIterator + - get + - hasNext + - isReady + - keys + - next + - prefetch + - put + - remove +MutationDetectors: + methods: + - close + - forValueWithCoder + - noopMutationDetector + - verifyUnmodified +MutationGroup: + methods: + - attached + - create + - equals + - hashCode + - iterator + - primary + - size + - toString +NFA: + methods: + - addPrevEvent + - assignIndex + - atFinal + - canDecrement + - canTrim + - compile + - copy + - decrement + - equals + - getCurState + - getCurrentEvent + - getNewProceedPointer + - getNewTakePointer + - getNextState + - getPatternVar + - getPointer + - getPrevPointer + - getProceedCondition + - getQuantifier + - getRow + - getTakeCondition + - hasProceed + - hasTake + - hashCode + - isKleenePlus + - isKleenePlusSecondary + - isNull + - isProceedPointer + - proceed + - proceedIgnore + - processNewRow + - reset + - setNextState + - take + - toCEPLiteral + - toString + - trim + properties: + - isFinal + - isStart +NameCityStateId: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER + - city + - id + - name + - state +NameGenerator: + methods: + - generatePartitionMetadataTableName +NameUtils: + methods: + - approximatePTransformName + - approximateSimpleName +NamedTestResult: + methods: + - create + - fields + - getMetric + - getSchema + - getValue + - tags + - toInfluxDBDataPoint + - toMap +NanosDuration: + methods: + - toBaseType + - toInputType + properties: + - IDENTIFIER +NanosInstant: + methods: + - toBaseType + - toInputType + properties: + - IDENTIFIER +Neo4jIO: + methods: + - apply + - create + - expand + - finishBundle + - of + - populateDisplayData + - processElement + - readAll + - setup + - startBundle + - tearDown + - withBatchSize + - withCoder + - withConfig + - withCypher + - withCypherLogging + - withDefaultConfig + - withDriverConfiguration + - withParametersFunction + - withPassword + - withReadTransaction + - withRowMapper + - withSessionConfig + - withTransactionConfig + - withUnwindMapName + - withUrl + - withUrls + - withUsername + - withWriteTransaction + - writeUnwind + properties: + - closed + - driver + - session +Never: + methods: + - ever + - getWatermarkThatGuaranteesFiring +NexmarkConfiguration: + methods: + - copy + - equals + - fromString + - hashCode + - overrideFromOptions + - toShortString + - toString + properties: + - DEFAULT + - auctionSkip + - avgAuctionByteSize + - avgBidByteSize + - avgPersonByteSize + - coderStrategy + - cpuDelayMs + - debug + - diskBusyBytes + - exportSummaryToBigQuery + - fanout + - firstEventRate + - generateEventFilePathPrefix + - hotAuctionRatio + - hotBiddersRatio + - hotSellersRatio + - isRateLimited + - maxAuctionsWaitingTime + - maxLogEvents + - nextEventRate + - numActivePeople + - numEventGenerators + - numEvents + - numInFlightAuctions + - numKeyBuckets + - occasionalDelaySec + - outOfOrderGroupSize + - pardoCPUFactor + - preloadSeconds + - probDelayedEvent + - pubSubMode + - pubsubMessageSerializationMethod + - query + - ratePeriodSec + - rateShape + - rateUnit + - sessionGap + - sideInputNumShards + - sideInputRowCount + - sideInputType + - sideInputUrl + - sinkType + - sourceType + - streamTimeout + - usePubsubPublishTime + - useWallclockEventTime + - watermarkHoldbackSec + - windowPeriodSec + - windowSizeSec +NexmarkLauncher: + methods: + - processElement + - run +NexmarkPerf: + methods: + - anyActivity + - fromString + - toMap + - toString + properties: + - errors + - eventBytesPerSec + - eventsPerSec + - jobId + - numEvents + - numResults + - processingDelaySec + - resultBytesPerSec + - resultsPerSec + - runtimeSec + - shutdownDelaySec + - snapshots + - startupDelaySec +NexmarkQuery: + methods: + - expand + - getTransform + properties: + - eventMonitor + - resultMonitor +NexmarkQueryModel: + methods: + - apply + - assertionFor + - simulator + properties: + - configuration +NexmarkQueryTransform: + methods: + - getSideInput + - needsSideInput + - setSideInput +NexmarkQueryUtil: + methods: + - expand + - processElement + properties: + - AS_AUCTION + - AS_BID + - AS_PERSON + - AUCTION_BY_ID + - AUCTION_BY_SELLER + - AUCTION_TAG + - BID_BY_AUCTION + - BID_TAG + - BID_TO_AUCTION + - BID_TO_PRICE + - EVENT_TIMESTAMP_FROM_DATA + - IS_BID + - IS_NEW_AUCTION + - IS_NEW_PERSON + - JUST_BIDS + - JUST_NEW_AUCTIONS + - JUST_NEW_PERSONS + - PERSON_BY_ID + - PERSON_TAG +NexmarkUtils: + methods: + - apply + - batchEventsSource + - castToKnownSize + - cleanUpSideInput + - console + - cpuDelay + - decode + - devNull + - diskBusy + - encode + - expand + - format + - hash + - info + - interEventDelayUs + - log + - prepareSideInput + - processElement + - processingMode + - rateToPeriodUs + - setupPipeline + - snoop + - stamp + - standardEventIterator + - stepLengthSec + - streamEventsSource + properties: + - BEGINNING_OF_TIME + - END_OF_TIME + - MAPPER + - PUBSUB_ID + - PUBSUB_TIMESTAMP +NoSuchSchemaException: {} +NodeStats: + methods: + - create + - getRate + - getRowCount + - getWindow + - isUnknown + - minus + - multiply + - plus + properties: + - UNKNOWN +NonMergingWindowFn: + methods: + - isNonMerging + - mergeWindows +NoopCredentialFactory: + methods: + - fromOptions + - getAuthenticationType + - getCredential + - getRequestMetadata + - hasRequestMetadata + - hasRequestMetadataOnly + - refresh +NoopLock: + methods: + - get + - lock + - lockInterruptibly + - newCondition + - tryLock + - unlock +NoopPathValidator: + methods: + - fromOptions + - validateInputFilePatternSupported + - validateOutputFilePrefixSupported + - validateOutputResourceSupported + - verifyPath +NullCredentialInitializer: + methods: + - handleResponse + - initialize + - throwNullCredentialException +NullThroughputEstimator: + methods: + - getFrom + - update +NullableCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getEncodedTypeDescriptor + - getValueCoder + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - structuralValue + - verifyDeterministic +NumberedShardedFile: + methods: + - getFilePattern + - readFilesWithRetries + - toString +ObjectPool: + methods: + - equals + - hashCode + - pooledClientFactory + - release + - releaseByKey + - retain +OffsetBasedSource: + methods: + - advance + - allowsDynamicSplitting + - createSourceForSubrange + - getBytesPerOffset + - getCurrentSource + - getEndOffset + - getEstimatedSizeBytes + - getFractionConsumed + - getMaxEndOffset + - getMinBundleSize + - getSplitPointsConsumed + - getSplitPointsRemaining + - getStartOffset + - isDone + - isStarted + - populateDisplayData + - split + - splitAtFraction + - start + - toString + - validate +OffsetByteRangeCoder: + methods: + - decode + - encode + - getCoderProvider +OffsetRange: + methods: + - consistentWithEquals + - decode + - encode + - equals + - getEncodedTypeDescriptor + - getFrom + - getTo + - hashCode + - isRegisterByteSizeObserverCheap + - newTracker + - of + - split + - toString +OffsetRangeTracker: + methods: + - checkDone + - currentRestriction + - getFractionConsumed + - getPositionForFractionConsumed + - getProgress + - getSplitPointsProcessed + - getStartPosition + - getStopPosition + - isBounded + - isDone + - isStarted + - markDone + - toString + - tryClaim + - tryReturnRecordAt + - trySplit + - trySplitAtPosition + properties: + - OFFSET_INFINITY +OneOfType: + methods: + - create + - createValue + - equals + - getArgument + - getArgumentType + - getBaseType + - getCaseEnumType + - getCaseType + - getFieldType + - getIdentifier + - getOneOfSchema + - getValue + - hashCode + - toBaseType + - toInputType + - toString + properties: + - IDENTIFIER +OpenModuleAgent: + methods: + - premain +Operator: + methods: + - getName + - getOutputType + - toString +OperatorTransform: + methods: + - apply + - expand + - getOperator +OrFinallyTrigger: + methods: + - getMainTrigger + - getUntilTrigger + - getWatermarkThatGuaranteesFiring + - mayFinish + - toString +Order: + methods: + - equals + - getCustomerId + - getId + - hashCode + - setCustomerId + - setId + - toString +OrderKey: + methods: + - getDir + - getIndex + - getNullFirst + - of +OutboundObserverFactory: + methods: + - clientBuffered + - clientDirect + - outboundObserverFor + - serverDirect + - trivial +PAssert: + methods: + - apply + - assertFor + - containsInAnyOrder + - countAsserts + - empty + - enterCompositeTransform + - equals + - expand + - from + - hashCode + - inCombinedNonLatePanes + - inEarlyGlobalWindowPanes + - inEarlyPane + - inFinalPane + - inLatePane + - inOnTimePane + - inOnlyPane + - inWindow + - isEqualTo + - leaveCompositeTransform + - notEqualTo + - of + - prepareActuals + - processElement + - satisfies + - that + - thatFlattened + - thatList + - thatMap + - thatMultimap + - thatSingleton + - thatSingletonIterable + - visitPrimitiveTransform + - windowActuals + - windowDummy + - wrap + properties: + - FAILURE_COUNTER + - SUCCESS_COUNTER +PBegin: + methods: + - apply + - expand + - getPipeline + - in +PCollection: + methods: + - and + - apply + - createPrimitiveOutputInternal + - expand + - finishSpecifying + - finishSpecifyingOutput + - getCoder + - getFromRowFunction + - getName + - getSchema + - getToRowFunction + - getTypeDescriptor + - getWindowingStrategy + - hasSchema + - isBounded + - setCoder + - setIsBoundedInternal + - setName + - setRowSchema + - setSchema + - setTypeDescriptor + - setWindowingStrategyInternal +PCollectionConsumerRegistry: + methods: + - accept + - finishLazyUpdate + - forConsumer + - getConsumer + - getExecutionState + - getMetricsContainer + - getMultiplexingConsumer + - getPTransformId + - getProgress + - register + - trySplit + - tryUpdate +PCollectionList: + methods: + - and + - apply + - empty + - equals + - expand + - finishSpecifyingOutput + - get + - getAll + - getPipeline + - hashCode + - of + - size +PCollectionLists: + methods: + - getOnlyElement +PCollectionRowTuple: + methods: + - and + - apply + - empty + - equals + - expand + - finishSpecifyingOutput + - get + - getAll + - getPipeline + - has + - hashCode + - of +PCollectionTuple: + methods: + - and + - apply + - empty + - equals + - expand + - finishSpecifyingOutput + - get + - getAll + - getPipeline + - has + - hashCode + - of + - ofPrimitiveOutputsInternal +PCollectionViews: + methods: + - apply + - compare + - contains + - containsKey + - create + - createMetadata + - decode + - encode + - entrySet + - equals + - expand + - get + - getCoderArguments + - getCoderInternal + - getDefaultValue + - getMaterialization + - getMetadata + - getPCollection + - getTagInternal + - getTypeDescriptor + - getViewFn + - getWindowMappingFn + - getWindowingStrategyInternal + - hasDefault + - hashCode + - isMetadata + - iterableView + - iterableViewUsingVoidKey + - iterator + - listIterator + - listView + - listViewUsingVoidKey + - mapView + - mapViewUsingVoidKey + - multimapView + - multimapViewUsingVoidKey + - singletonView + - singletonViewUsingVoidKey + - size + - toAdditionalInputs + - toString + - verifyDeterministic +PDone: + methods: + - expand + - finishSpecifyingOutput + - getPipeline + - in +POJOUtils: + methods: + - appender + - createConstructorCreator + - createStaticCreator + - getConstructorCreator + - getFieldTypes + - getGetters + - getSetFieldCreator + - getSetters + - getStaticCreator + - prepare + - schemaFromPojoClass + properties: + - CACHED_CREATORS +PTransform: + methods: + - compose + - expand + - getAdditionalInputs + - getDefaultOutputCoder + - getName + - getResourceHints + - populateDisplayData + - setResourceHints + - toString + - validate +PTransformFunctionRegistry: + methods: + - getFunctions + - register +PTransformOverride: + methods: + - getMatcher + - getOverrideFactory + - of +PValueBase: + methods: + - finishSpecifying + - finishSpecifyingOutput + - getName + - getPipeline + - setName + - toString +PValues: + methods: + - expandInput + - expandOutput + - expandValue + - fullyExpand +PaneInfo: + methods: + - createPane + - decode + - decodePane + - encode + - equals + - fromTag + - getIndex + - getNonSpeculativeIndex + - getTiming + - hashCode + - isFirst + - isLast + - isUnknown + - of + - toString + - verifyDeterministic + properties: + - INSTANCE + - NO_FIRING + - ON_TIME_AND_ONLY_FIRING + - tag +ParDo: + methods: + - dispatchBag + - dispatchCombining + - dispatchMap + - dispatchMultimap + - dispatchOrderedList + - dispatchSet + - dispatchValue + - expand + - getAdditionalInputs + - getAdditionalOutputTags + - getDoFnSchemaInformation + - getFn + - getMainOutputTag + - getSideInputs + - of + - populateDisplayData + - toString + - withOutputTags + - withSideInput + - withSideInputs +ParDoLoadTest: + methods: + - main + - processElement +ParquetIO: + methods: + - apply + - close + - create + - createOrOverwrite + - defaultBlockSize + - expand + - flush + - from + - getConfWithModelClass + - getInitialRestriction + - getLength + - getPos + - getProgress + - getRestrictionCoder + - getSize + - makeProgress + - newStream + - newTracker + - open + - parseFilesGenericRecords + - parseGenericRecords + - populateDisplayData + - processElement + - read + - readFiles + - seek + - sink + - split + - splitBlockWithLimit + - supportsBlockSize + - withAvroDataModel + - withBeamSchemas + - withCoder + - withCompressionCodec + - withConfiguration + - withProjection + - withRowGroupSize + - write +ParquetTableProvider: + methods: + - buildBeamSqlTable + - getTableType +ParseException: {} +ParseJsons: + methods: + - apply + - exceptionsInto + - exceptionsVia + - expand + - of + - withMapper +ParseResult: + methods: + - equals + - failure + - getContent + - getError + - getErrorAsString + - getFileLocation + - getMetadata + - hashCode + - isSuccess + - success + - toString +Partition: + methods: + - expand + - getOutputTags + - getSideInputs + - of + - populateDisplayData + - processElement +PartitionMetadata: + methods: + - build + - equals + - getCreatedAt + - getEndTimestamp + - getFinishedAt + - getHeartbeatMillis + - getParentTokens + - getPartitionToken + - getRunningAt + - getScheduledAt + - getStartTimestamp + - getState + - getWatermark + - hashCode + - newBuilder + - setCreatedAt + - setEndTimestamp + - setFinishedAt + - setHeartbeatMillis + - setParentTokens + - setPartitionToken + - setRunningAt + - setScheduledAt + - setStartTimestamp + - setState + - setWatermark + - toBuilder + - toString +PartitionMetadataAdminDao: + methods: + - createPartitionMetadataTable + - deletePartitionMetadataTable + properties: + - COLUMN_CREATED_AT + - COLUMN_END_TIMESTAMP + - COLUMN_FINISHED_AT + - COLUMN_HEARTBEAT_MILLIS + - COLUMN_PARENT_TOKENS + - COLUMN_PARTITION_TOKEN + - COLUMN_RUNNING_AT + - COLUMN_SCHEDULED_AT + - COLUMN_START_TIMESTAMP + - COLUMN_STATE + - COLUMN_WATERMARK +PartitionMetadataDao: + methods: + - countPartitionsCreatedAfter + - getAllPartitionsCreatedAfter + - getCommitTimestamp + - getPartition + - getResult + - getUnfinishedMinWatermark + - insert + - runInTransaction + - tableExists + - toString + - updateToFinished + - updateToRunning + - updateToScheduled + - updateWatermark +PartitionMetadataMapper: + methods: + - from +PartitionPosition: + methods: + - done + - equals + - getMode + - getTimestamp + - hashCode + - queryChangeStream + - stop + - toString + - updateState + - waitForChildPartitions +PartitionRestriction: + methods: + - done + - equals + - getEndTimestamp + - getMetadata + - getMode + - getStartTimestamp + - getStoppedMode + - hashCode + - queryChangeStream + - stop + - toString + - updateState + - waitForChildPartitions + - withMetadata +PartitionRestrictionClaimer: + methods: + - tryClaim +PartitionRestrictionMetadata: + methods: + - build + - getPartitionEndTimestamp + - getPartitionStartTimestamp + - getPartitionToken + - newBuilder + - toString + - withPartitionEndTimestamp + - withPartitionStartTimestamp + - withPartitionToken +PartitionRestrictionProgressChecker: + methods: + - getProgress + - setTimeSupplier +PartitionRestrictionSplitter: + methods: + - trySplit +PartitionRestrictionTracker: + methods: + - checkDone + - currentRestriction + - getProgress + - isBounded + - setTimeSupplier + - tryClaim + - trySplit +PartitioningWindowFn: + methods: + - assignWindow + - assignWindows + - assignsToOneWindow + - getDefaultWindowMappingFn + - getSideInputWindow +PassThroughLogicalType: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType +PatternCondition: + methods: + - eval +PayloadSerializerKafkaTable: + methods: + - expand +PayloadSerializers: + methods: + - getSerializer +PeriodicImpulse: + methods: + - applyWindowing + - create + - expand + - startAt + - stopAt + - withInterval +PeriodicSequence: + methods: + - checkDone + - create + - currentRestriction + - equals + - expand + - getInitialRange + - getInitialWatermarkState + - getProgress + - hashCode + - isBounded + - newTracker + - newWatermarkEstimator + - processElement + - toString + - tryClaim + - trySplit + properties: + - durationMilliSec + - first + - last +Person: + methods: + - decode + - encode + - equals + - hasAnnotation + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + - withAnnotation + - withoutAnnotation + properties: + - CODER + - city + - creditCard + - dateTime + - emailAddress + - extra + - id + - name + - state +PersonGenerator: + methods: + - lastBase0PersonId + - nextBase0PersonId + - nextPerson +Pipeline: + methods: + - apply + - applyTransform + - begin + - create + - enterCompositeTransform + - enterPipeline + - forTransformHierarchy + - getCoderRegistry + - getOptions + - getSchemaRegistry + - leaveCompositeTransform + - leavePipeline + - replaceAll + - run + - setCoderRegistry + - toString + - traverseTopologically + - visitPrimitiveTransform + - visitValue +PipelineOptionsFactory: + methods: + - apply + - as + - compare + - create + - describe + - fromArgs + - getRegisteredOptions + - printHelp + - register + - resetCache + - withValidation + - withoutStrictParsing +PipelineOptionsValidator: + methods: + - validate + - validateCli +PipelineRunner: + methods: + - create + - fromOptions + - run +Plugin: + methods: + - build + - builder + - createBatch + - createStreaming + - getContext + - getFormatClass + - getFormatProviderClass + - getGetOffsetFn + - getGetReceiverArgsFromConfigFn + - getHadoopConfiguration + - getPluginClass + - getPluginConfig + - getPluginType + - getReceiverBuilder + - getReceiverClass + - initContext + - initPluginType + - isUnbounded + - prepareRun + - setContext + - setFormatClass + - setFormatProviderClass + - setGetOffsetFn + - setGetReceiverArgsFromConfigFn + - setPluginClass + - setPluginType + - setReceiverClass + - withConfig + - withHadoopConfiguration +PluginConfigInstantiationUtils: {} +PluginConstants: + methods: + - getFormatClass + - getFormatName + - getFormatProviderClass + - getFormatProviderName + - getKeyClass + - getValueClass +PostProcessingMetricsDoFn: + methods: + - processElement +PrecombineGroupingTable: + methods: + - add + - combining + - combiningAndSampling + - compact + - equals + - estimateSize + - flush + - getAccumulator + - getGroupingKey + - getKey + - getOutputTimestamp + - getStructuralKey + - getWeight + - getWindows + - hashCode + - put + - shrink + - toString +PrecombineGroupingTableBenchmark: + methods: + - setUp + - sumIntegerBinaryCombine + properties: + - distribution + - globallyWindowed +Preconditions: + methods: + - checkArgumentNotNull + - checkStateNotNull +PrefetchableIterables: + methods: + - concat + - createIterator + - emptyIterable + - fromArray + - hasNext + - isReady + - iterator + - limit + - next + - prefetch +PrefetchableIterators: + methods: + - concat + - concatIterators + - emptyIterator + - fromArray + - hasNext + - isReady + - next + - prefetch +PrepareWrite: + methods: + - expand + - processElement +PriceGenerator: + methods: + - nextPrice +ProcessBundleBenchmark: + methods: + - getCacheTokens + - handle + - log + - process + - tearDown + - testLargeBundle + - testStateWithCaching + - testStateWithoutCaching + - testTinyBundle +ProcessBundleHandler: + methods: + - activate + - addBundleProgressReporter + - addFinishBundleFunction + - addIncomingDataEndpoint + - addIncomingTimerEndpoint + - addOutgoingDataEndpoint + - addOutgoingTimersEndpoint + - addPCollectionConsumer + - addResetFunction + - addStartBundleFunction + - addTearDownFunction + - afterBundleCommit + - close + - create + - createRunnerForPTransform + - find + - getActiveBundleProcessors + - getBeamFnDataClient + - getBeamFnStateClient + - getBundleCacheSupplier + - getBundleFinalizer + - getBundleProcessorCache + - getCacheTokensSupplier + - getCoders + - getPCollectionConsumer + - getPCollections + - getPTransform + - getPTransformId + - getPipelineOptions + - getProcessBundleInstructionIdSupplier + - getProcessWideCache + - getRunnerCapabilities + - getShortIdMap + - getSplitListener + - getStateTracker + - getWindowingStrategies + - handle + - hashCode + - load + - processBundle + - progress + - reset + - shutdown + - start + - trySplit + properties: + - JAVA_SOURCE_URN +ProducerRecordCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - isRegisterByteSizeObserverCheap + - of + - structuralValue + - verifyDeterministic +ProtoCoder: + methods: + - coderFor + - decode + - encode + - equals + - getCoderProvider + - getExtensionHosts + - getExtensionRegistry + - getMessageType + - hashCode + - of + - verifyDeterministic + - withExtensionsFrom + properties: + - serialVersionUID +ProtoDomain: + methods: + - buildFrom + - contains + - equals + - getDescriptor + - getFieldOptionById + - getFileDescriptor + - hashCode + properties: + - serialVersionUID +ProtoDynamicMessageSchema: + methods: + - apply + - forDescriptor + - getBaseClass + - getFromRowFunction + - getSchema + - getSubContext + - getToRowFunction + - invokeNewBuilder + properties: + - serialVersionUID +ProtoFromBytes: + methods: + - apply + - expand +ProtoMessageSchema: + methods: + - fieldValueGetters + - fieldValueTypeInformations + - get + - getProtoBytesToRowFn + - getRowToProtoBytesFn + - schemaFor + - schemaTypeCreator +ProtoPayloadSerializerProvider: + methods: + - getSerializer + - identifier +ProtoSchemaLogicalTypes: + methods: + - toDuration + - toRow + - toTimestamp + properties: + - IDENTIFIER +ProtoToBytes: + methods: + - apply + - expand +ProtobufCoderProviderRegistrar: + methods: + - getCoderProviders +Providers: + methods: + - loadProviders +PubSubPayloadTranslation: + methods: + - getTransformPayloadTranslators + - getUrn + - translate +PublishResponseCoders: + methods: + - decode + - defaultPublishResponse + - encode + - fullPublishResponse + - fullPublishResponseWithoutHeaders + - verifyDeterministic +PublishResultCoders: + methods: + - decode + - defaultPublishResult + - encode + - fullPublishResult + - fullPublishResultWithoutHeaders + - verifyDeterministic +PublisherOptions: + methods: + - build + - newBuilder + - setTopicPath + - topicPath +PubsubClient: + methods: + - ackDeadlineSeconds + - ackId + - acknowledge + - apply + - createRandomSubscription + - createSchema + - createSubscription + - createTopic + - deleteSchema + - deleteSubscription + - deleteTopic + - equals + - getFullPath + - getId + - getName + - getPath + - getProjectId + - getSchema + - getSchemaPath + - hashCode + - isEOF + - listSubscriptions + - listTopics + - message + - modifyAckDeadline + - of + - projectPathFromId + - projectPathFromPath + - publish + - pull + - recordId + - requestTimeMsSinceEpoch + - schemaPathFromId + - schemaPathFromPath + - subscriptionPathFromName + - subscriptionPathFromPath + - timestampMsSinceEpoch + - toString + - topicPathFromName + - topicPathFromPath +PubsubCoderProviderRegistrar: + methods: + - getCoderProviders +PubsubDlqProvider: + methods: + - expand + - identifier + - newDlqTransform +PubsubGrpcClient: + methods: + - ackDeadlineSeconds + - acknowledge + - close + - createSchema + - createSubscription + - createTopic + - deleteSchema + - deleteSubscription + - deleteTopic + - getKind + - getSchema + - getSchemaPath + - isEOF + - listSubscriptions + - listTopics + - modifyAckDeadline + - newClient + - publish + - pull + properties: + - FACTORY +PubsubHelper: + methods: + - cleanup + - create + - createOrReuseTopic + - createSubscription + - createTopic + - reuseSubscription + - reuseTopic + - subscriptionExists + - topicExists +PubsubIO: + methods: + - apply + - asPath + - asV1Beta1Path + - asV1Beta2Path + - expand + - finishBundle + - fromPath + - fromSubscription + - fromTopic + - populateDisplayData + - processElement + - readAvroGenericRecords + - readAvros + - readAvrosWithBeamSchema + - readMessages + - readMessagesWithAttributes + - readMessagesWithAttributesAndMessageId + - readMessagesWithAttributesAndMessageIdAndOrderingKey + - readMessagesWithCoderAndParseFn + - readMessagesWithMessageId + - readProtoDynamicMessages + - readProtos + - readStrings + - startBundle + - to + - toString + - withClientFactory + - withCoderAndParseFn + - withDeadLetterTopic + - withIdAttribute + - withMaxBatchBytesSize + - withMaxBatchSize + - withPubsubRootUrl + - withTimestampAttribute + - writeAvros + - writeMessages + - writeProtos + - writeStrings +PubsubJsonClient: + methods: + - ackDeadlineSeconds + - acknowledge + - close + - createSchema + - createSubscription + - createTopic + - deleteSchema + - deleteSubscription + - deleteTopic + - getKind + - getSchema + - getSchemaPath + - isEOF + - listSubscriptions + - listTopics + - modifyAckDeadline + - newClient + - publish + - pull + properties: + - FACTORY +PubsubLiteIO: + methods: + - addUuids + - deduplicate + - expand + - read + - write +PubsubLiteSink: + methods: + - finishBundle + - processElement + - startBundle +PubsubLiteTableProvider: + methods: + - buildBeamSqlTable + - getTableType +PubsubMessage: + methods: + - equals + - getAttribute + - getAttributeMap + - getMessageId + - getOrderingKey + - getPayload + - hashCode + - toString +PubsubMessagePayloadOnlyCoder: + methods: + - decode + - encode + - of +PubsubMessageWithAttributesAndMessageIdAndOrderingKeyCoder: + methods: + - decode + - encode + - of +PubsubMessageWithAttributesAndMessageIdCoder: + methods: + - decode + - encode + - of +PubsubMessageWithAttributesCoder: + methods: + - decode + - encode + - of +PubsubMessageWithMessageIdCoder: + methods: + - decode + - encode + - of +PubsubMessages: + methods: + - apply + - fromProto + - toProto +PubsubSchemaIOProvider: + methods: + - buildReader + - buildWriter + - configurationSchema + - expand + - from + - identifier + - isBounded + - requiresDataSchema + - schema + properties: + - ATTRIBUTE_ARRAY_ENTRY_SCHEMA + - ATTRIBUTE_ARRAY_FIELD_TYPE + - ATTRIBUTE_MAP_FIELD_TYPE +PubsubSchemaTransformReadConfiguration: + methods: + - build + - builder + - getDataSchema + - getDeadLetterQueue + - getFormat + - getIdAttribute + - getProtoClass + - getSubscription + - getThriftClass + - getThriftProtocolFactoryClass + - getTimestampAttribute + - getTopic + - setDataSchema + - setDeadLetterQueue + - setFormat + - setIdAttribute + - setProtoClass + - setSubscription + - setThriftClass + - setThriftProtocolFactoryClass + - setTimestampAttribute + - setTopic +PubsubSchemaTransformReadProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames + - validate +PubsubTableProvider: + methods: + - getSchemaIOProvider + - getTableType +PubsubTestClient: + methods: + - ackDeadlineSeconds + - acknowledge + - advance + - close + - createFactoryForCreateSubscription + - createFactoryForGetSchema + - createFactoryForPublish + - createFactoryForPull + - createFactoryForPullAndPublish + - createSchema + - createSubscription + - createTopic + - deleteSchema + - deleteSubscription + - deleteTopic + - getKind + - getSchema + - getSchemaPath + - isEOF + - listSubscriptions + - listTopics + - modifyAckDeadline + - newClient + - publish + - pull +PubsubUnboundedSink: + methods: + - decode + - encode + - expand + - finishBundle + - getIdAttribute + - getTimestampAttribute + - getTopic + - getTopicProvider + - populateDisplayData + - processElement + - startBundle + properties: + - outer +PubsubUnboundedSource: + methods: + - advance + - apply + - close + - createReader + - decode + - encode + - expand + - finalizeCheckpoint + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentRecordId + - getCurrentSource + - getCurrentTimestamp + - getIdAttribute + - getNeedsAttributes + - getNeedsMessageId + - getNeedsOrderingKey + - getOutputCoder + - getProject + - getSplitBacklogBytes + - getSubscription + - getSubscriptionProvider + - getTimestampAttribute + - getTopic + - getTopicProvider + - getWatermark + - identity + - nackAll + - nackBatch + - of + - populateDisplayData + - processElement + - requiresDeduping + - split + - start + - validate + properties: + - outer +PubsubWriteSchemaTransformConfiguration: + methods: + - build + - builder + - getAttributesFieldName + - getFormat + - getIdAttribute + - getPayloadFieldName + - getSource + - getTarget + - getTimestampAttributeKey + - getTimestampFieldName + - getTopic + - setAttributesFieldName + - setFormat + - setIdAttribute + - setPayloadFieldName + - setSource + - setTarget + - setTimestampAttributeKey + - setTimestampFieldName + - setTopic + - sourceConfigurationBuilder + - targetConfigurationBuilder + properties: + - DEFAULT_TIMESTAMP_ATTRIBUTE +PubsubWriteSchemaTransformProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames + - process +PulsarIO: + methods: + - expand + - read + - useProcessingTime + - usePublishTime + - withAdminUrl + - withClientUrl + - withEndMessageId + - withEndTimestamp + - withExtractOutputTimestampFn + - withProcessingTime + - withPublishTime + - withPulsarClient + - withStartTimestamp + - withTopic + - write +PulsarMessage: + methods: + - getMessageRecord + - getPublishTimestamp + - getTopic + - setMessageRecord +PulsarMessageCoder: + methods: + - decode + - encode + - of +PulsarSourceDescriptor: + methods: + - of +PythonCallable: + methods: + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +PythonCallableSource: + methods: + - getPythonCallableCode + - of +PythonExternalTransform: + methods: + - expand + - from + - withArgs + - withExtraPackages + - withKwarg + - withKwargs + - withOutputCoder + - withOutputCoders + - withTypeHint +PythonMap: + methods: + - expand + - viaFlatMapFn + - viaMapFn + - withExpansionService +PythonService: + methods: + - findAvailablePort + - start + - waitForPort + - withExtraPackages +Quantifier: + methods: + - toString + properties: + - ASTERISK + - ASTERISK_RELUCTANT + - NONE + - PLUS + - PLUS_RELUCTANT + - QMARK + - QMARK_RELUCTANT +Query0: + methods: + - expand + - processElement +Query0Model: + methods: + - simulator +Query1: + methods: + - expand + - processElement +Query10: + methods: + - expand + - processElement + - setMaxNumWorkers + - setOutputPath + - toString +Query11: + methods: + - expand + - processElement +Query12: + methods: + - expand + - processElement +Query13: + methods: + - expand + - processElement +Query14: + methods: + - expand +Query1Model: + methods: + - simulator +Query2: + methods: + - expand + - processElement +Query2Model: + methods: + - simulator +Query3: + methods: + - expand + - onTimerCallback + - processElement +Query3Model: + methods: + - simulator +Query4: + methods: + - expand + - processElement +Query4Model: + methods: + - simulator +Query5: + methods: + - addInput + - createAccumulator + - equals + - expand + - extractOutput + - getAccumulatorCoder + - hashCode + - mergeAccumulator + - processElement + properties: + - auctions + - count +Query5Model: + methods: + - run + - simulator +Query6: + methods: + - addInput + - createAccumulator + - expand + - extractOutput + - mergeAccumulators + - processElement +Query6Model: + methods: + - simulator +Query7: + methods: + - expand + - processElement +Query7Model: + methods: + - simulator +Query8: + methods: + - expand + - processElement +Query8Model: + methods: + - run + - simulator +Query9: + methods: + - expand +Query9Model: + methods: + - simulator +QueryChangeStreamAction: + methods: + - run +QueryReader: + methods: + - getQueryIdentifiers + - readQuery +QueryStatementConverter: + methods: + - convert + - convertRootQuery +QueryTrait: + methods: + - addOutputColumnList + - addResolvedTable + - getTablePath + - isTableResolved + - resolveAlias + - retrieveFieldNames + properties: + - outputColumnMap + - resolvedTables + - withEntries +RabbitMqIO: + methods: + - advance + - advanceWatermark + - close + - createReader + - expand + - finalizeCheckpoint + - getChannel + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentRecordId + - getCurrentSource + - getCurrentTimestamp + - getOutputCoder + - getWatermark + - processElement + - read + - requiresDeduping + - setup + - split + - start + - stop + - teardown + - withExchange + - withMaxNumRecords + - withMaxReadTime + - withQueue + - withQueueDeclare + - withUri + - withUseCorrelationId + - write +RabbitMqMessage: + methods: + - createProperties + - equals + - getAppId + - getBody + - getClusterId + - getContentEncoding + - getContentType + - getCorrelationId + - getDeliveryMode + - getExpiration + - getHeaders + - getMessageId + - getPriority + - getReplyTo + - getRoutingKey + - getTimestamp + - getType + - getUserId + - hashCode +RampupThrottlingFn: + methods: + - populateDisplayData + - processElement + - setup +RawUnionValue: + methods: + - equals + - getUnionTag + - getValue + - hashCode + - toString +Read: + methods: + - advance + - checkDone + - close + - create + - createReader + - currentRestriction + - decode + - encode + - expand + - from + - getCheckpoint + - getCheckpointMark + - getCheckpointMarkCoder + - getCoderArguments + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getId + - getInitialWatermarkEstimatorState + - getKindString + - getProgress + - getSize + - getSource + - getTimestamp + - getValue + - getWatermark + - initialRestriction + - isBounded + - newWatermarkEstimator + - populateDisplayData + - processElement + - restrictionCoder + - restrictionTracker + - setUp + - split + - splitRestriction + - start + - tryClaim + - trySplit + - verifyDeterministic + - withMaxNumRecords + - withMaxReadTime +ReadAllViaFileBasedSource: + methods: + - apply + - expand + - process + properties: + - DEFAULT_USES_RESHUFFLE +ReadBuilder: + methods: + - buildExternal + - getCsvMapper +ReadChangeStreamPartitionDoFn: + methods: + - getInitialWatermarkEstimatorState + - getSize + - initialRestriction + - newTracker + - newWatermarkEstimator + - processElement + - setThroughputEstimator + - setup +ReadChangeStreamPartitionRangeTracker: + methods: + - tryClaim + - trySplit +ReadFromPulsarDoFn: + methods: + - estimate + - getInitialRestriction + - getInitialWatermarkEstimatorState + - getRestrictionCoder + - getSize + - initPulsarClients + - newReader + - newWatermarkEstimator + - processElement + - restrictionTracker + - teardown +ReadOnlyTableProvider: + methods: + - buildBeamSqlTable + - createTable + - dropTable + - getTableType + - getTables +ReadOperation: + methods: + - create + - getColumns + - getIndex + - getKeySet + - getQuery + - getQueryName + - getTable + - withColumns + - withIndex + - withKeySet + - withPartitionOptions + - withQuery + - withQueryName + - withTable +ReadableFileCoder: + methods: + - decode + - encode + - getCoderArguments + - getMetadataCoder + - of + - verifyDeterministic +ReadableStates: + methods: + - immediate + - read + - readLater +ReaderDelay: + methods: + - delayRecord + - delayStart +ReceiverBuilder: + methods: + - build + - getSparkReceiverClass + - withConstructorArgs +RecommendationAICreateCatalogItem: + methods: + - build + - catalogName + - expand + - processElement + - projectId + - setCatalogName + - setProjectId + - withCatalogName + - withProjectId + properties: + - FAILURE_TAG + - SUCCESS_TAG +RecommendationAIIO: + methods: + - createCatalogItems + - importCatalogItems + - importUserEvents + - predictAll + - writeUserEvent +RecommendationAIImportCatalogItems: + methods: + - batchSize + - build + - catalogName + - expand + - maxBufferingDuration + - processElement + - projectId + - setBatchSize + - setCatalogName + - setMaxBufferingDuration + - setProjectId + - withBatchSize + - withCatalogName + - withProjectId + properties: + - FAILURE_TAG + - SUCCESS_TAG +RecommendationAIImportUserEvents: + methods: + - batchSize + - build + - catalogName + - eventStore + - expand + - maxBufferingDuration + - processElement + - projectId + - setBatchSize + - setCatalogName + - setEventStore + - setMaxBufferingDuration + - setProjectId + - withBatchSize + - withCatalogName + - withEventStore + - withProjectId + properties: + - FAILURE_TAG + - SUCCESS_TAG +RecommendationAIPredict: + methods: + - build + - catalogName + - eventStore + - expand + - placementId + - processElement + - projectId + - setCatalogName + - setEventStore + - setPlacementId + - setProjectId + - withCatalogName + - withEventStore + - withPlacementId + - withProjectId + properties: + - FAILURE_TAG + - SUCCESS_TAG +RecommendationAIWriteUserEvent: + methods: + - build + - catalogName + - eventStore + - expand + - processElement + - projectId + - setCatalogName + - setEventStore + - setProjectId + - withCatalogName + - withEventStore + - withProjectId + properties: + - FAILURE_TAG + - SUCCESS_TAG +RecordWithMetadata: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - getSchema + - toBaseType + - toInputType + properties: + - RANGE_OFFSET + - RECORD_NUM + - RECORD_NUM_IN_OFFSET + - RECORD_OFFSET + - RESOURCE_ID + - VALUE +RedisConnectionConfiguration: + methods: + - connect + - create + - enableSSL + - populateDisplayData + - withAuth + - withHost + - withPort + - withSSL + - withTimeout +RedisCursor: + methods: + - compareTo + - equals + - getCursor + - getDbSize + - hashCode + - isStart + - of + properties: + - END_CURSOR + - ZERO_CURSOR + - ZERO_KEY +RedisIO: + methods: + - expand + - finishBundle + - getInitialRestriction + - populateDisplayData + - processElement + - read + - readKeyPatterns + - setup + - startBundle + - teardown + - withApproximateTrim + - withAuth + - withBatchSize + - withConnectionConfiguration + - withEndpoint + - withExpireTime + - withKeyPattern + - withMaxLen + - withMethod + - withOutputParallelization + - withTimeout + - write + - writeStreams +ReduceByKey: + methods: + - accumulationMode + - combineBy + - getAccumulate + - getAccumulatorFactory + - getAccumulatorType + - getMergeAccumulators + - getOutputFn + - getReducer + - getValueComparator + - getValueExtractor + - getValueType + - isCombinable + - isCombineFnStyle + - keyBy + - named + - of + - output + - outputValues + - reduceBy + - triggeredBy + - valueBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withSortedValues + - withTimestampCombiner +ReduceByKeyTranslator: + methods: + - addInput + - apply + - canTranslate + - createAccumulator + - extractOutput + - getAccumulatorCoder + - mergeAccumulators + - processElement + - translate +ReduceWindow: + methods: + - accumulationMode + - combineBy + - expand + - getReducer + - getValueComparator + - getValueExtractor + - getValueType + - isCombinable + - isCombineFnStyle + - named + - of + - output + - reduceBy + - triggeredBy + - valueBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withSortedValues + - withTimestampCombiner +ReflectHelpers: + methods: + - compare + - declaredFieldsWithAnnotation + - declaredMethodsWithAnnotation + - findClassLoader + - formatAnnotation + - formatMethod + - formatMethodWithClass + - getClosureOfMethodsOnInterface + - getClosureOfMethodsOnInterfaces + - loadServicesOrdered + - simpleTypeDescription + properties: + - INSTANCE +ReflectUtils: + methods: + - boxIfPrimitive + - create + - getAnnotatedConstructor + - getAnnotatedCreateMethod + - getClazz + - getFields + - getIterableComponentType + - getMapType + - getMethods + - getMethodsMap + - getSchema + - isGetter + - isSetter + - stripGetterPrefix + - stripPrefix + - stripSetterPrefix +Regex: + methods: + - allMatches + - expand + - find + - findAll + - findKV + - matches + - matchesKV + - processElement + - replaceAll + - replaceFirst + - split +RegexMatcher: + methods: + - describeTo + - matches +Reify: + methods: + - expand + - extractTimestampsFromValues + - getAllowedTimestampSkew + - process + - processElement + - timestamps + - timestampsInValue + - viewAsValues + - viewInGlobalWindow + - windows + - windowsInValue +ReifyAsIterable: + methods: + - expand + - processElement +RelMdNodeStats: + methods: + - getDef + - getNodeStats + properties: + - SOURCE +ReleaseInfo: + methods: + - getDefaultDockerRepoPrefix + - getDefaultDockerRepoRoot + - getName + - getProperties + - getReleaseInfo + - getSdkVersion + - getVersion + - isDevSdkVersion +RemoteGrpcPortRead: + methods: + - fromPTransform + - getPort + - readFromPort + - toPTransform + properties: + - URN +RemoteGrpcPortWrite: + methods: + - fromPTransform + - getPort + - toPTransform + - writeToPort + properties: + - URN +RenameFields: + methods: + - create + - expand + - processElement + - rename +Repeatedly: + methods: + - forever + - getRepeatedTrigger + - getWatermarkThatGuaranteesFiring + - mayFinish + - toString +Requirements: + methods: + - empty + - getSideInputs + - isEmpty + - requiresSideInputs + - union +Reshuffle: + methods: + - expand + - of + - processElement + - setup + - viaRandomKey + - withNumBuckets +ReshuffleTrigger: + methods: + - getWatermarkThatGuaranteesFiring + - mayFinish + - toString +ResourceHint: + methods: + - equals + - hashCode + - mergeWithOuter + - toBytes +ResourceHints: + methods: + - create + - equals + - fromOptions + - hashCode + - hints + - mergeWithOuter + - parse + - toBytes + - withAccelerator + - withHint + - withMinRam +ResourceIdCoder: + methods: + - consistentWithEquals + - decode + - encode + - of +ResourceIdTester: + methods: + - runResourceIdBattery +RestrictionTracker: + methods: + - checkDone + - currentRestriction + - from + - getTruncatedRestriction + - getWorkCompleted + - getWorkRemaining + - isBounded + - of + - tryClaim + - trySplit +RestrictionTrackers: + methods: + - checkDone + - currentRestriction + - getProgress + - isBounded + - observe + - tryClaim + - trySplit +RetryConfiguration: + methods: + - baseBackoff + - build + - builder + - convert + - maxBackoff + - numRetries + - throttledBaseBackoff + - toBuilder +RetryHttpRequestInitializer: + methods: + - handleIOException + - handleResponse + - initialize + - setCustomErrors + - setWriteTimeout +RightJoin: + methods: + - by + - named + - of + - using +RingRange: + methods: + - equals + - getEnd + - getStart + - hashCode + - isWrapping + - of + - toString +Row: + methods: + - addArray + - addIterable + - addValue + - addValues + - attachValues + - build + - deepEquals + - deepHashCode + - equals + - fromRow + - getArray + - getBaseValue + - getBaseValues + - getBoolean + - getByte + - getBytes + - getDateTime + - getDecimal + - getDouble + - getFieldCount + - getFloat + - getInt16 + - getInt32 + - getInt64 + - getIterable + - getLogicalTypeValue + - getMap + - getRow + - getSchema + - getString + - getValue + - getValues + - hashCode + - nextFieldId + - nullRow + - toRow + - toString + - withFieldAccessDescriptors + - withFieldValue + - withFieldValueGetters + - withFieldValues + - withSchema +RowBundle: + methods: + - processRows + - setup +RowCoder: + methods: + - equals + - hashCode + - of + - overrideEncodingPositions +RowCoderGenerator: + methods: + - appender + - generate + - overrideEncodingPositions + - prepare +RowJson: + methods: + - deserialize + - forSchema + - serialize + - toString + - verifySchemaSupported + - withDropNullsOnWrite + - withNullBehavior +RowJsonUtils: + methods: + - jsonToRow + - newObjectMapperWith + - rowToJson +RowMessages: + methods: + - apply + - bytesToRowFn + - rowToBytesFn +RowToCsv: + methods: + - expand + - getCsvFormat +RowToEntity: + methods: + - create + - createTest + - expand + - processElement +RowUtils: + methods: + - byteString + - byteStringUtf8 + properties: + - COLUMNS_MAPPING + - KEY + - LABELS + - TIMESTAMP_MICROS + - VALUE +RowWithGetters: + methods: + - equals + - getFieldCount + - getGetterTarget + - getGetters + - getValue + - getValues + - hashCode +RowWithStorage: + methods: + - getFieldCount + - getValue + - getValues +RpcQosOptions: + methods: + - build + - defaultOptions + - equals + - getBatchInitialCount + - getBatchMaxBytes + - getBatchMaxCount + - getBatchTargetLatency + - getHintMaxNumWorkers + - getInitialBackoff + - getMaxAttempts + - getOverloadRatio + - getSamplePeriod + - getSamplePeriodBucketSize + - getThrottleDuration + - hashCode + - isShouldReportDiagnosticMetrics + - newBuilder + - populateDisplayData + - toBuilder + - toString + - withBatchInitialCount + - withBatchMaxBytes + - withBatchMaxCount + - withBatchTargetLatency + - withHintMaxNumWorkers + - withInitialBackoff + - withMaxAttempts + - withOverloadRatio + - withReportDiagnosticMetrics + - withSamplePeriod + - withSamplePeriodBucketSize + - withThrottleDuration +RunInference: + methods: + - expand + - of + - ofKVs + - withExpansionService + - withExtraPackages + - withKwarg +S3FileSystemConfiguration: + methods: + - build + - builder + - builderFrom + - fromS3Options + - getBucketKeyEnabled + - getBuilder + - getS3ClientBuilder + - getS3StorageClass + - getS3ThreadPoolSize + - getS3UploadBufferSizeBytes + - getSSEAlgorithm + - getSSEAwsKeyManagementParams + - getSSECustomerKey + - getSSEKMSKeyId + - getScheme + - setBucketKeyEnabled + - setS3ClientBuilder + - setS3StorageClass + - setS3ThreadPoolSize + - setS3UploadBufferSizeBytes + - setSSEAlgorithm + - setSSEAwsKeyManagementParams + - setSSECustomerKey + - setSSEKMSKeyId + - setScheme + - toBuilder + properties: + - MINIMUM_UPLOAD_BUFFER_SIZE_BYTES +S3FileSystemRegistrar: + methods: + - fromOptions +SSECustomerKey: + methods: + - algorithm + - build + - builder + - getAlgorithm + - getKey + - getMD5 + - key + - md5 +Sample: + methods: + - addInput + - any + - anyCombineFn + - anyValueCombineFn + - combineFn + - createAccumulator + - expand + - extractOutput + - fixedSizeGlobally + - fixedSizePerKey + - getAccumulatorCoder + - getDefaultOutputCoder + - mergeAccumulators + - populateDisplayData +SbeLogicalTypes: + methods: + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +SbeSchema: + methods: + - assumeSingleMessageSchema + - build + - builder + - fromIr + - getIr + - getIrOptions + - getSbeFields + - messageId + - messageName + - setMessageId + - setMessageName + - toBuilder + properties: + - DEFAULT +ScalarFn: {} +ScalarFnReflector: + methods: + - getApplyMethod +ScalarFunctionImpl: + methods: + - create + - createAll + - getImplementor + - getJarPath + - getReturnType + - implement +Schema: + methods: + - addArrayField + - addBooleanField + - addByteArrayField + - addByteField + - addDateTimeField + - addDecimalField + - addDoubleField + - addField + - addFields + - addFloatField + - addInt16Field + - addInt32Field + - addInt64Field + - addIterableField + - addLogicalTypeField + - addMapField + - addNullableField + - addOptions + - addRowField + - addStringField + - array + - assignableTo + - assignableToIgnoreNullable + - build + - builder + - equals + - equivalent + - forTypeName + - getAllMetadata + - getCollectionElementType + - getDescription + - getEncodingPositions + - getField + - getFieldCount + - getFieldNames + - getFields + - getLastFieldId + - getLogicalType + - getMapKeyType + - getMapValueType + - getMetadata + - getMetadataString + - getName + - getNullable + - getOptionNames + - getOptions + - getRowSchema + - getType + - getTypeName + - getUUID + - getValue + - getValueOrDefault + - hasField + - hasOption + - hasOptions + - hashCode + - indexOf + - isCollectionType + - isCompositeType + - isDateType + - isEncodingPositionsOverridden + - isLogicalType + - isMapType + - isNumericType + - isPrimitiveType + - isStringType + - isSubtypeOf + - isSupertypeOf + - iterable + - logicalType + - map + - nameOf + - none + - nullable + - of + - row + - setDescription + - setEncodingPositions + - setName + - setOption + - setOptions + - setType + - setUUID + - sorted + - toBuilder + - toSchema + - toString + - typesEqual + - withDescription + - withMetadata + - withName + - withNullable + - withOptions + - withType + properties: + - BOOLEAN + - BYTE + - BYTES + - COLLECTION_TYPES + - COMPOSITE_TYPES + - DATETIME + - DATE_TYPES + - DECIMAL + - DOUBLE + - FLOAT + - INT16 + - INT32 + - INT64 + - MAP_TYPES + - NUMERIC_TYPES + - STRING + - STRING_TYPES +SchemaAndRecord: + methods: + - getRecord + - getTableSchema +SchemaBaseBeamTable: + methods: + - getSchema +SchemaCoder: + methods: + - coderForFieldType + - consistentWithEquals + - decode + - encode + - equals + - getEncodedTypeDescriptor + - getFromRowFunction + - getSchema + - getToRowFunction + - hashCode + - of + - overrideEncodingPositions + - toString + - verifyDeterministic +SchemaIOTableProviderWrapper: + methods: + - buildBeamSqlTable + - buildIOReader + - buildIOWriter + - getSchema + - getSchemaIOProvider + - getTableStatistics + - getTableType + - isBounded + - supportsProjects +SchemaLogicalType: + methods: + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +SchemaRegistry: + methods: + - createDefault + - fromRowFunction + - getFromRowFunction + - getSchema + - getSchemaCoder + - getToRowFunction + - registerJavaBean + - registerPOJO + - registerSchemaForClass + - registerSchemaForType + - registerSchemaProvider + - schemaFor + - toRowFunction +SchemaTranslation: + methods: + - rowFromProto + - rowToProto + - schemaFromProto + - schemaToProto +SchemaUtils: + methods: + - mergeWideningNullable + - toLogicalBaseType + - toLogicalInputType +SchemaVerification: + methods: + - verifyFieldValue +SchemaZipFold: + methods: + - accept + - accumulate + - apply + - create + - parent + - path + - withParent + - withPathPart + properties: + - EMPTY +Select: + methods: + - concatFieldNames + - create + - expand + - fieldAccess + - fieldIds + - fieldNames + - flattenedSchema + - keepMostNestedFieldName + - process + - withFieldNameAs + - withOutputSchema +SelectEvent: + methods: + - expand + - processElement +SelectHelpers: + methods: + - allLeavesDescriptor + - getOutputSchema + - getRowSelector + - getRowSelectorOptimized + - select + properties: + - CONCAT_FIELD_NAMES + - KEEP_NESTED_NAME +SellerPrice: + methods: + - decode + - encode + - equals + - hashCode + - sizeInBytes + - structuralValue + - toString + - verifyDeterministic + properties: + - CODER + - seller +SerializableCoder: + methods: + - coderFor + - consistentWithEquals + - decode + - encode + - equals + - getCoderProvider + - getCoderProviders + - getEncodedTypeDescriptor + - getRecordType + - hashCode + - of + - structuralValue + - toString + - verifyDeterministic +SerializableConfiguration: + methods: + - fromMap + - get + - newConfiguration + - newJob + - readExternal + - writeExternal +SerializableFunctions: + methods: + - apply + - clonesOf + - constant + - identity +SerializableIr: + methods: + - fromIr + - ir +SerializableMatchers: + methods: + - allOf + - anyOf + - anything + - arrayContaining + - arrayContainingInAnyOrder + - arrayWithSize + - closeTo + - contains + - containsInAnyOrder + - containsString + - describeMismatch + - describeTo + - empty + - emptyArray + - emptyIterable + - endsWith + - equalTo + - fromSupplier + - get + - greaterThan + - greaterThanOrEqualTo + - hasItem + - hasSize + - isIn + - isOneOf + - iterableWithSize + - kv + - kvWithKey + - kvWithValue + - lessThan + - lessThanOrEqualTo + - matches + - not + - nullValue + - startsWith + - toString +SerializableRexFieldAccess: + methods: + - getIndexes +SerializableRexInputRef: + methods: + - getIndex +SerializableRexNode: + methods: + - build + - builder +SerializableThrowable: + methods: + - equals + - getThrowable + - hashCode +SerializableUtils: + methods: + - clone + - deserializeFromByteArray + - ensureSerializable + - ensureSerializableByCoder + - ensureSerializableRoundTrip + - serializeToByteArray +ServerFactory: + methods: + - allocateAddressAndCreate + - create + - createDefault + - createEpollDomainSocket + - createEpollSocket + - createWithPortSupplier + - createWithUrlFactory + - createWithUrlFactoryAndPortSupplier +SessionSideInputJoin: + methods: + - expand + - needsSideInput + - processElement +SessionSideInputJoinModel: + methods: + - simulator +Sessions: + methods: + - assignWindows + - equals + - getDefaultWindowMappingFn + - getGapDuration + - getWindowTypeDescriptor + - hashCode + - isCompatible + - mergeWindows + - populateDisplayData + - verifyCompatibility + - windowCoder + - withGapDuration +SetCoder: + methods: + - getEncodedTypeDescriptor + - of + - verifyDeterministic +Sets: + methods: + - apply + - exceptAll + - exceptDistinct + - expand + - intersectAll + - intersectDistinct + - processElement + - unionAll + - unionDistinct +ShardNameTemplate: + properties: + - DIRECTORY_CONTAINER + - INDEX_OF_MAX +ShardedKey: + methods: + - consistentWithEquals + - decode + - encode + - equals + - getCoderArguments + - getKey + - getKeyCoder + - getShardNumber + - hashCode + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - structuralValue + - toString + - verifyDeterministic +ShardedKeyCoder: + methods: + - decode + - encode + - getCoderArguments + - of + - verifyDeterministic +ShardingWritableByteChannel: + methods: + - addChannel + - close + - getChannel + - getNumShards + - isOpen + - write + - writeToShard + properties: + - ALL_SHARDS +ShuffleOperator: + methods: + - getKeyExtractor + - getKeyType + - getWindow +SideInputLoadTest: + methods: + - main + - processElement +SideInputSpec: + methods: + - create +SimpleFunction: + methods: + - apply + - fromSerializableFunctionWithOutputType + - getOutputTypeDescriptor +SingleStoreIO: + methods: + - create + - expand + - finish + - getDataSource + - getInitialRange + - populateDisplayData + - process + - processElement + - read + - readRows + - readWithPartitions + - readWithPartitionsRows + - run + - splitRange + - withBatchSize + - withConnectionProperties + - withDataSourceConfiguration + - withDatabase + - withOutputParallelization + - withPassword + - withQuery + - withRowMapper + - withStatementPreparator + - withTable + - withUserDataMapper + - withUsername + - write + - writeRows +SingleStoreSchemaTransformReadConfiguration: + methods: + - build + - builder + - getDataSourceConfiguration + - getOutputParallelization + - getQuery + - getTable + - getWithPartitions + - setDataSourceConfiguration + - setOutputParallelization + - setQuery + - setTable + - setWithPartitions + - toBeamRow +SingleStoreSchemaTransformReadProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames +SingleStoreSchemaTransformWriteConfiguration: + methods: + - build + - builder + - getBatchSize + - getDataSourceConfiguration + - getTable + - setBatchSize + - setDataSourceConfiguration + - setTable + - toBeamRow +SingleStoreSchemaTransformWriteProvider: + methods: + - buildTransform + - expand + - identifier + - inputCollectionNames + - outputCollectionNames + properties: + - INPUT_TAG +SingleValueCollector: + methods: + - asContext + - collect + - get + - getCounter + - getHistogram + - getTimer +SingleValueContext: + methods: + - asContext + - collect + - get + - getAndResetValue + - getCounter + - getHistogram + - getTimer +SinkMetrics: + methods: + - bytesWritten + - elementsWritten +SizeEstimator: + methods: + - sizeOf +SketchFrequencies: + methods: + - add + - addInput + - create + - createAccumulator + - decode + - encode + - estimateCount + - expand + - extractOutput + - getAccumulatorCoder + - globally + - isRegisterByteSizeObserverCheap + - mergeAccumulators + - perKey + - populateDisplayData + - withAccuracy + - withConfidence + - withRelativeError +SlidingWindows: + methods: + - assignWindows + - assignsToOneWindow + - equals + - every + - getDefaultWindowMappingFn + - getOffset + - getPeriod + - getSideInputWindow + - getSize + - hashCode + - isCompatible + - of + - populateDisplayData + - verifyCompatibility + - windowCoder + - withOffset +SnappyCoder: + methods: + - decode + - encode + - getCoderArguments + - of + - verifyDeterministic +SnowflakeArray: + methods: + - of + - sql +SnowflakeBatchServiceConfig: + methods: + - getCreateDisposition + - getDataSourceProviderFn + - getDatabase + - getFilesList + - getQuery + - getQuotationMark + - getSchema + - getStagingBucketDir + - getStorageIntegrationName + - getTable + - getTableSchema + - getWriteDisposition +SnowflakeBatchServiceImpl: + methods: + - read + - write +SnowflakeBinary: + methods: + - getSize + - of + - setSize + - sql + properties: + - MAX_SIZE +SnowflakeBoolean: + methods: + - of + - sql +SnowflakeChar: + methods: + - of +SnowflakeColumn: + methods: + - getDataType + - getName + - isNullable + - of + - setDataType + - setName + - setNullable + - sql +SnowflakeDate: + methods: + - of + - sql +SnowflakeDateTime: + methods: + - of +SnowflakeDecimal: + methods: + - of +SnowflakeDouble: + methods: + - of +SnowflakeFloat: + methods: + - of + - sql +SnowflakeGeography: + methods: + - of + - sql +SnowflakeIO: + methods: + - addInput + - apply + - buildDatasource + - create + - createAccumulator + - expand + - extractOutput + - finishBundle + - fromQuery + - fromTable + - getAuthenticator + - getConfig + - getDataSource + - getDatabase + - getLoginTimeout + - getOauthToken + - getPassword + - getPortNumber + - getPrivateKey + - getPrivateKeyPassphrase + - getRawPrivateKey + - getRole + - getSchema + - getServerName + - getSsl + - getUrl + - getUsername + - getWarehouse + - mergeAccumulators + - of + - populateDisplayData + - processElement + - read + - setup + - to + - withAuthenticator + - withCoder + - withCreateDisposition + - withCsvMapper + - withDataSourceConfiguration + - withDataSourceProviderFn + - withDatabase + - withDebugMode + - withFileNameTemplate + - withFlushRowLimit + - withFlushTimeLimit + - withKeyPairAuth + - withKeyPairPathAuth + - withKeyPairRawAuth + - withLoginTimeout + - withOAuth + - withPortNumber + - withQueryTransformation + - withQuotationMark + - withRole + - withSchema + - withServerName + - withShardsNumber + - withSnowPipe + - withSnowflakeServices + - withStagingBucketName + - withStorageIntegrationName + - withTableSchema + - withUrl + - withUserDataMapper + - withUsernamePasswordAuth + - withWarehouse + - withWriteDisposition + - write +SnowflakeInteger: + methods: + - of +SnowflakeNumber: + methods: + - getPrecision + - getScale + - of + - setPrecision + - setScale + - sql +SnowflakeNumeric: + methods: + - of +SnowflakeObject: + methods: + - of + - sql +SnowflakeReal: + methods: + - of +SnowflakeServicesImpl: + methods: + - getBatchService + - getStreamingService +SnowflakeStreamingServiceConfig: + methods: + - getFilesList + - getIngestManager + - getStagingBucketDir +SnowflakeStreamingServiceImpl: + methods: + - read + - write +SnowflakeString: + methods: + - of +SnowflakeTableSchema: + methods: + - getColumns + - of + - setColumns + - sql +SnowflakeText: + methods: + - of +SnowflakeTime: + methods: + - of + - sql +SnowflakeTimestamp: + methods: + - of +SnowflakeTimestampLTZ: + methods: + - of + - sql +SnowflakeTimestampNTZ: + methods: + - of + - sql +SnowflakeTimestampTZ: + methods: + - of + - sql +SnowflakeTransformRegistrar: + methods: + - knownBuilderInstances + properties: + - READ_URN + - WRITE_URN +SnowflakeVarBinary: + methods: + - of +SnowflakeVarchar: + methods: + - getLength + - of + - setLength + - sql + properties: + - MAX_LENGTH +SnowflakeVariant: + methods: + - of + - sql +SnsCoderProviderRegistrar: + methods: + - getCoderProviders +SnsIO: + methods: + - create + - expand + - processElement + - setup + - tearDown + - test + - withAWSClientsProvider + - withClientConfiguration + - withCoder + - withFullPublishResponse + - withFullPublishResponseWithoutHeaders + - withFullPublishResult + - withFullPublishResultWithoutHeaders + - withPublishRequestBuilder + - withPublishRequestFn + - withResultOutputTag + - withRetryConfiguration + - withSnsClientProvider + - withTopicArn + - withTopicName + - write + - writeAsync +SocketAddressFactory: + methods: + - createFrom +SolrIO: + methods: + - baseUrl + - closeClient + - coreName + - coreUrl + - create + - expand + - finishBundle + - from + - populateDisplayData + - process + - processElement + - read + - readAll + - setup + - startBundle + - test + - to + - withBasicCredentials + - withConnectionConfiguration + - withMaxBatchSize + - withQuery + - withReplicaInfo + - withRetryConfiguration + - write +SortValues: + methods: + - create + - expand + - hasNext + - iterator + - next + - processElement + - remove +SortedMapCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getEncodedTypeDescriptor + - getKeyCoder + - getValueCoder + - of + - registerByteSizeObserver + - structuralValue + - verifyDeterministic +Source: + methods: + - advance + - close + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getDefaultOutputCoder + - getOutputCoder + - populateDisplayData + - start + - validate +SourceMetrics: + methods: + - backlogBytes + - backlogBytesOfSplit + - backlogElements + - backlogElementsOfSplit + - bytesRead + - bytesReadBySplit + - elementsRead + - elementsReadBySplit +SourceRecordJson: + methods: + - mapSourceRecord + - toJson +SourceTestUtils: + methods: + - advance + - assertSourcesEqualReferenceSource + - assertSplitAtFractionBehavior + - assertSplitAtFractionExhaustive + - assertSplitAtFractionFails + - assertSplitAtFractionSucceedsAndConsistent + - assertUnstartedReaderReadsSameAsItsSource + - close + - createReader + - createStructuralValues + - equals + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getEstimatedSizeBytes + - getFractionConsumed + - getOutputCoder + - getSplitPointsConsumed + - getSplitPointsRemaining + - hashCode + - populateDisplayData + - readFromSource + - readFromSplitsOfSource + - readFromStartedReader + - readFromUnstartedReader + - readNItemsFromStartedReader + - readNItemsFromUnstartedReader + - readRemainingFromReader + - split + - splitAtFraction + - start + - toString + - toUnsplittableSource + - validate + properties: + - numPrimaryItems + - numResidualItems +SpannerAccessor: + methods: + - close + - getBatchClient + - getDatabaseAdminClient + - getDatabaseClient + - getOrCreate +SpannerConfig: + methods: + - build + - create + - getCommitDeadline + - getCommitRetrySettings + - getDatabaseId + - getDatabaseRole + - getEmulatorHost + - getExecuteStreamingSqlRetrySettings + - getHost + - getInstanceId + - getIsLocalChannelProvider + - getMaxCumulativeBackoff + - getProjectId + - getRetryableCodes + - getRpcPriority + - populateDisplayData + - validate + - withCommitDeadline + - withCommitRetrySettings + - withDatabaseId + - withDatabaseRole + - withEmulatorHost + - withExecuteStreamingSqlRetrySettings + - withHost + - withInstanceId + - withIsLocalChannelProvider + - withMaxCumulativeBackoff + - withProjectId + - withRetryableCodes + - withRpcPriority +SpannerIO: + methods: + - build + - compareTo + - createTransaction + - expand + - finishBundle + - grouped + - load + - of + - output + - outputWithTimestamp + - populateDisplayData + - processElement + - read + - readAll + - readChangeStream + - setSpannerConfig + - setTimestampBound + - setup + - teardown + - withBatchSizeBytes + - withBatching + - withChangeStreamName + - withColumns + - withCommitDeadline + - withDatabaseId + - withDialectView + - withEmulatorHost + - withFailureMode + - withGroupingFactor + - withHighPriority + - withHost + - withInclusiveEndAt + - withInclusiveStartAt + - withIndex + - withInstanceId + - withKeySet + - withLowPriority + - withMaxCumulativeBackoff + - withMaxNumMutations + - withMaxNumRows + - withMetadataDatabase + - withMetadataInstance + - withMetadataTable + - withPartitionOptions + - withProjectId + - withQuery + - withQueryName + - withReadOperation + - withRpcPriority + - withSchemaReadySignal + - withSpannerConfig + - withTable + - withTimestamp + - withTimestampBound + - withTraceSampleProbability + - withTransaction + - write +SpannerTransformRegistrar: + methods: + - buildExternal + - getReadOperation + - knownBuilderInstances + - setBatching + - setCommitDeadline + - setDatabaseId + - setEmulatorHost + - setGroupingFactor + - setHost + - setInstanceId + - setMaxBatchSizeBytes + - setMaxCumulativeBackoff + - setMaxNumberMutations + - setMaxNumberRows + - setProjectId + - setReadTimestamp + - setSchema + - setSql + - setStaleness + - setTable + - setTimeUnit + - setTimestampBoundMode + properties: + - DELETE_URN + - INSERT_OR_UPDATE_URN + - INSERT_URN + - READ_URN + - REPLACE_URN + - UPDATE_URN +SpannerWriteResult: + methods: + - expand + - finishSpecifyingOutput + - getFailedMutations + - getOutput + - getPipeline +SpannerWriteSchemaTransformProvider: + methods: + - build + - buildTransform + - builder + - expand + - getDatabaseId + - getInstanceId + - getTableId + - identifier + - inputCollectionNames + - outputCollectionNames + - setDatabaseId + - setInstanceId + - setTableId +SparkReceiverIO: + methods: + - expand + - read + - validateTransform + - withGetOffsetFn + - withPullFrequencySec + - withSparkReceiverBuilder + - withStartOffset + - withTimestampFn +Split: + methods: + - named + - negative + - of + - output + - positive + - using +SplitResult: + methods: + - getPrimary + - getResidual + - of +SplunkEvent: + methods: + - create + - event + - host + - index + - newBuilder + - source + - sourceType + - time + - withEvent + - withHost + - withIndex + - withSource + - withSourceType + - withTime +SplunkIO: + methods: + - expand + - processElement + - setup + - withBatchCount + - withDisableCertificateValidation + - withEnableBatchLogs + - withEnableGzipHttpCompression + - withParallelism + - withRootCaCertificatePath + - write +SplunkWriteError: + methods: + - create + - newBuilder + - payload + - statusCode + - statusMessage + - withPayload + - withStatusCode + - withStatusMessage +SqlAnalyzer: {} +SqlBoundedSideInputJoin: + methods: + - calciteSqlBoundedSideInputJoin + - expand + - needsSideInput + - zetaSqlBoundedSideInputJoin +SqlCheckConstraint: + methods: + - getOperandList + - getOperator + - unparse +SqlColumnDeclaration: + methods: + - getOperandList + - getOperator + - unparse +SqlConversionException: {} +SqlCreateExternalTable: + methods: + - execute + - getOperandList + - unparse +SqlCreateFunction: + methods: + - execute + - getOperandList + - getOperator + - unparse +SqlDdlNodes: + methods: + - column + - dropTable +SqlDropTable: {} +SqlOperators: + methods: + - createStringAggOperator + - createZetaSqlFunction + - getSyntax + properties: + - ARRAY_AGG_FN + - BIT_XOR + - CAST_OP + - CHAR_LENGTH + - CONCAT + - COUNTIF + - DATE_OP + - ENDS_WITH + - LIKE + - LTRIM + - REPLACE + - REVERSE + - RTRIM + - START_WITHS + - SUBSTR + - TIMESTAMP_OP + - TRIM + - VALIDATE_TIMESTAMP + - VALIDATE_TIME_INTERVAL + - ZETASQL_TIMESTAMP_ADD +SqlQuery0: + methods: + - calciteSqlQuery0 + - expand + - processElement + - zetaSqlQuery0 +SqlQuery1: + methods: + - apply + - expand +SqlQuery2: + methods: + - calciteSqlQuery2 + - expand + - zetaSqlQuery2 +SqlQuery3: + methods: + - calciteSqlQuery3 + - expand + - zetaSqlQuery3 +SqlQuery5: + methods: + - expand +SqlQuery7: + methods: + - expand +SqlSetOptionBeam: + methods: + - execute +SqlTransform: + methods: + - expand + - query + - registerUdaf + - registerUdf + - withAutoLoading + - withDdlString + - withDefaultTableProvider + - withErrorsTransformer + - withNamedParameters + - withPositionalParameters + - withQueryPlannerClass + - withTableProvider +SqlTransformRunner: + methods: + - getIdentifiers + - runUsingSqlTransform + - visit +SqlTypes: + properties: + - DATE + - DATETIME + - TIME + - TIMESTAMP +SqsIO: + methods: + - expand + - processElement + - read + - setup + - teardown + - withClientConfiguration + - withCoder + - withMaxNumRecords + - withMaxReadTime + - withQueueUrl + - withSqsClientProvider + - write +SqsMessage: + methods: + - create + - getBody + - getMessageId + - getReceiptHandle + - getRequestTimeStamp + - getTimeStamp +StateBackedIterable: + methods: + - encode + - fromComponents + - getCoderTranslators + - getCoderURNs + - getComponents + - iterator +StateContexts: + methods: + - getPipelineOptions + - nullContext + - sideInput + - window + - windowOnlyContext +StateFetchingIterators: + methods: + - append + - clearAndAppend + - createIterator + - fromValues + - getBlocks + - getContinuationToken + - getWeight + - hasNext + - isReady + - loadPrefetchedResponse + - mutatedBlock + - next + - prefetch + - readAllAndDecodeStartingFrom + - remove + - seekToContinuationToken + - shrink +StateKeySpec: + methods: + - fields +StateSpecs: + methods: + - bag + - bind + - combining + - combiningFromInputInternal + - convertToBagSpecInternal + - convertToMapSpecInternal + - equals + - finishSpecifying + - hashCode + - map + - match + - multimap + - offerCoders + - orderedList + - rowBag + - rowMap + - rowMultimap + - rowOrderedList + - rowSet + - rowValue + - set + - value + - watermarkStateInternal +StaticSchemaInference: + methods: + - fieldFromType + - schemaFromClass + - sortBySchema +StorageApiConvertMessages: + methods: + - expand + - onTeardown + - processElement +StorageApiDynamicDestinationsTableRow: + methods: + - getMessageConverter + - getTableSchema + - toMessage + - toTableRow +StorageApiFlushAndFinalizeDoFn: + methods: + - compareTo + - equals + - hashCode + - onTeardown + - process +StorageApiLoads: + methods: + - expand + - expandInconsistent + - expandTriggered + - expandUntriggered + - processElement + - setup +StorageApiWritePayload: + methods: + - getPayload +StorageApiWriteRecordsInconsistent: + methods: + - expand +StorageApiWriteUnshardedRecords: + methods: + - expand + - finishBundle + - output + - outputWithTimestamp + - process + - startBundle + - teardown +StorageApiWritesShardedRecords: + methods: + - expand + - getAllowedTimestampSkew + - onTeardown + - onTimer + - onWindowExpiration + - process + - startBundle + - toString +StreamUtils: + methods: + - getBytesWithoutClosing +StreamingInserts: + methods: + - expand + - withExtendedErrorInfo + - withInsertRetryPolicy +StreamingSourceContextImpl: + methods: + - isPreviewEnabled + - registerLineage +StreamingWriteTables: + methods: + - apply + - expand +StringAgg: + methods: + - addInput + - createAccumulator + - extractOutput + - mergeAccumulators +StringDelegateCoder: + methods: + - decode + - encode + - equals + - getEncodedTypeDescriptor + - hashCode + - of + - structuralValue + - toString + - verifyDeterministic +StringFunctions: + methods: + - charLength + - concat + - endsWith + - like + - ltrim + - replace + - reverse + - rtrim + - startsWith + - substr + - trim + properties: + - SUBSTR_PARAMETER_EXCEED_INTEGER +StringUtf8Coder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedElementByteSize + - getEncodedTypeDescriptor + - of + - verifyDeterministic +StringUtils: + methods: + - byteArrayToJsonString + - getLevenshteinDistance + - jsonStringToByteArray +StringsGenerator: + methods: + - nextExactString + - nextExtra + - nextString +StructuralByteArray: + methods: + - equals + - getValue + - hashCode + - toString +StructuredCoder: + methods: + - equals + - getComponents + - hashCode + - toString +SubscribeTransform: + methods: + - expand + - getReplacementTransform + - mapOutputs + properties: + - V1_READ_OVERRIDE +SubscriberOptions: + methods: + - build + - newBuilder + - setSubscriptionPath + - subscriptionPath + - toBuilder +SubscriptionPartition: {} +SubscriptionPartitionCoder: + methods: + - decode + - encode + - getCoderProvider +SuccessOrFailure: + methods: + - assertionError + - equals + - failure + - hashCode + - isSuccess + - success + - toString +Sum: + methods: + - apply + - doublesGlobally + - doublesPerKey + - equals + - hashCode + - identity + - integersGlobally + - integersPerKey + - longsGlobally + - longsPerKey + - ofDoubles + - ofIntegers + - ofLongs +SumByKey: + methods: + - accumulationMode + - expand + - getValueExtractor + - keyBy + - named + - of + - output + - triggeredBy + - valueBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withTimestampCombiner +SummaryGenerator: + methods: + - generateTable +Sums: + methods: + - apply + - identity + - ofDoubles + - ofFloats + - ofInts + - ofLongs + - valueDesc +SynchronizedStreamObserver: + methods: + - onCompleted + - onError + - onNext + - wrapping +SyntheticBoundedSource: + methods: + - allowsDynamicSplitting + - close + - createReader + - createSourceForSubrange + - getBytesPerOffset + - getCurrent + - getCurrentSource + - getDefaultOutputCoder + - getFractionConsumed + - getMaxEndOffset + - split + - toString + - validate +SyntheticDataPublisher: + methods: + - apply + - main +SyntheticDelay: + methods: + - delay +SyntheticOptions: + methods: + - deserialize + - fromIntegerDistribution + - fromJsonString + - fromRealDistribution + - genKvPair + - getDistribution + - hashFunction + - nextDelay + - sample + - setSeed + - toString + - validate + properties: + - bytesPerRecord + - cpuUtilizationInMixedDelay + - delayType + - hotKeyFraction + - keySizeBytes + - largeKeyFraction + - largeKeySizeBytes + - numHotKeys + - seed + - valueSizeBytes +SyntheticSourceOptions: + methods: + - genRecord + - nextInitializeDelay + - nextProcessingTimeDelay + - validate + properties: + - bundleSizeDistribution + - forceNumInitialBundles + - kv + - numRecords + - progressShape + - sleepMsec + - splitPointFrequencyRecords + - watermarkDriftMillis + - watermarkSearchInAdvanceCount +SyntheticStep: + methods: + - load + - processElement + - startBundle + - validate + properties: + - maxWorkerThroughput + - outputRecordsPerInputRecord + - perBundleDelay + - perBundleDelayType + - preservesInputKeyDistribution + - reportThrottlingMicros +SyntheticUnboundedSource: + methods: + - advance + - close + - createReader + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getOutputCoder + - getWatermark + - split + - start + - toString + - validate +TDigestQuantiles: + methods: + - addInput + - create + - createAccumulator + - decode + - encode + - expand + - extractOutput + - getAccumulatorCoder + - getDefaultOutputCoder + - globally + - isRegisterByteSizeObserverCheap + - mergeAccumulators + - perKey + - populateDisplayData + - withCompression +TFRecordIO: + methods: + - allowsDynamicSplitting + - apply + - createWriteOperation + - createWriter + - expand + - flush + - from + - getCurrent + - getOutputCoder + - matches + - open + - populateDisplayData + - read + - readFiles + - recordLength + - sink + - to + - toResource + - withCompression + - withCompressionType + - withNoSpilling + - withNumShards + - withShardNameTemplate + - withSuffix + - withoutSharding + - withoutValidation + - write + properties: + - DEFAULT_BYTE_ARRAY_CODER +TVFSlidingWindowFn: + methods: + - assignWindows + - getDefaultWindowMappingFn + - getPeriod + - getSize + - isCompatible + - of + - windowCoder +TVFStreamingUtils: + properties: + - FIXED_WINDOW_TVF + - SESSION_WINDOW_TVF + - SLIDING_WINDOW_TVF + - WINDOW_END + - WINDOW_START +Table: + methods: + - build + - builder + - comment + - getComment + - getLocation + - getName + - getProperties + - getSchema + - getType + - location + - name + - properties + - schema + - toBuilder + - type +TableAndRecord: + methods: + - getRecord + - getTable +TableDestination: + methods: + - equals + - getClustering + - getJsonClustering + - getJsonTimePartitioning + - getTableDescription + - getTableReference + - getTableSpec + - getTableUrn + - getTimePartitioning + - hashCode + - toString + - withTableReference +TableDestinationCoder: + methods: + - decode + - encode + - of + - verifyDeterministic +TableDestinationCoderV2: + methods: + - decode + - encode + - of + - verifyDeterministic +TableDestinationCoderV3: + methods: + - decode + - encode + - of + - verifyDeterministic +TableName: + methods: + - create + - getPath + - getPrefix + - getTableName + - isCompound + - isSimple + - removePrefix +TableNameExtractionUtils: + methods: + - extractTableNamesFromNode +TableResolution: + methods: + - registerTables + - resolveCalciteTable +TableRowJsonCoder: + methods: + - decode + - encode + - getEncodedElementByteSize + - getEncodedTypeDescriptor + - of + - verifyDeterministic +TableRowToStorageApiProto: + methods: + - getDescriptorFromTableSchema + - getFullName + - getName + - getSchemaForField + - getType + - jsonValueFromMessageValue + - messageFromMap + - messageFromTableRow + - modeToProtoMode + - protoModeToJsonMode + - protoSchemaToTableSchema + - protoTableFieldToTableField + - protoTypeToJsonType + - schemaToProtoTableSchema + - tableFieldToProtoTableField + - tableRowFromMessage + - typeToProtoType +TableSchema: + methods: + - array + - arrayElementType + - build + - builder + - columnType + - columns + - defaultType + - defaultValue + - enum16 + - enum8 + - enumValues + - fixedString + - fixedStringSize + - getEquivalentFieldType + - getEquivalentSchema + - materializedOrAlias + - name + - nullable + - of + - parse + - parseDefaultExpression + - typeName + - withNullable + properties: + - DATE + - DATETIME + - FLOAT32 + - FLOAT64 + - INT16 + - INT32 + - INT64 + - INT8 + - STRING + - UINT16 + - UINT32 + - UINT64 + - UINT8 +TableSchemaCache: + methods: + - getSchema + - isSatisfied + - putSchemaIfAbsent + - refreshSchema + - refreshThread +TableSchemaJSONLoader: + methods: + - getAllTableNames + - parseTableSchema +TaggedPValue: + methods: + - getTag + - getValue + - of + - ofExpandedValue +TestBigQuery: + methods: + - apply + - assertThatAllRows + - create + - evaluate + - eventually + - getFlatJsonRows + - insertRows + - now + - tableReference + - tableSpec +TestPipeline: + methods: + - apply + - create + - enableAbandonedNodeEnforcement + - enableAutoRunIfMissing + - evaluate + - fromOptions + - getOptions + - isEmpty + - leaveCompositeTransform + - newProvider + - run + - runWithAdditionalOptionArgs + - testingPipelineOptions + - toString + - verifyPAssertsSucceeded + - visitPrimitiveTransform + properties: + - PROPERTY_BEAM_TEST_PIPELINE_OPTIONS +TestPubsub: + methods: + - apply + - assertSubscriptionEventuallyCreated + - assertThatTopicEventuallyReceives + - checkIfAnySubscriptionExists + - create + - evaluate + - fromOptions + - publish + - subscriptionPath + - topicPath + - waitForNMessages +TestPubsubSignal: + methods: + - apply + - create + - evaluate + - expand + - processElement + - signalStart + - signalSuccessWhen + - waitForStart + - waitForSuccess +TestStream: + methods: + - add + - addElements + - advanceBy + - advanceProcessingTime + - advanceTo + - advanceWatermarkTo + - advanceWatermarkToInfinity + - create + - decode + - encode + - equals + - expand + - fromRawEvents + - getCoderArguments + - getElements + - getEvents + - getProcessingTimeAdvance + - getValueCoder + - getWatermark + - hashCode + - of + - verifyDeterministic +TextIO: + methods: + - apply + - expand + - flush + - from + - matches + - open + - populateDisplayData + - read + - readAll + - readFiles + - sink + - skipIfEmpty + - to + - toResource + - watchForNewFiles + - withCompression + - withCompressionType + - withDelimiter + - withEmptyMatchTreatment + - withFooter + - withFormatFunction + - withHeader + - withHintMatchesManyFiles + - withMatchConfiguration + - withNoSpilling + - withNumShards + - withOutputFilenames + - withShardNameTemplate + - withSuffix + - withTempDirectory + - withWindowedWrites + - withWritableByteChannelFactory + - withoutSharding + - write + - writeCustomType +TextJsonTable: {} +TextMessageMapper: + methods: + - apply +TextRowCountEstimator: + methods: + - build + - builder + - estimateRowCount + - getCompression + - getDelimiters + - getDirectoryTreatment + - getEmptyMatchTreatment + - getFilePattern + - getNumSampledBytesPerFile + - getSamplingStrategy + - setCompression + - setDelimiters + - setDirectoryTreatment + - setEmptyMatchTreatment + - setFilePattern + - setNumSampledBytesPerFile + - setSamplingStrategy + - stopSampling +TextSourceBenchmark: + methods: + - benchmarkHadoopLineReader + - benchmarkTextSource + - createFile + - deleteFile + properties: + - length + - path + - pathString +TextTable: + methods: + - buildIOReader + - buildIOWriter + - getFilePattern + - getTableStatistics + - isBounded +TextTableProvider: + methods: + - buildBeamSqlTable + - create + - deadLetterFile + - expand + - getCsvFormat + - getTableType + - processElement + - schema +TextualIntegerCoder: + methods: + - decode + - encode + - getEncodedTypeDescriptor + - of + - verifyDeterministic +ThriftCoder: + methods: + - decode + - encode + - of +ThriftIO: + methods: + - build + - close + - expand + - flush + - open + - populateDisplayData + - processElement + - readFiles + - sink + - withProtocol + - write +ThriftPayloadSerializerProvider: + methods: + - getSerializer + - identifier +ThriftSchema: + methods: + - custom + - fieldValueGetters + - fieldValueTypeInformations + - get + - name + - provider + - schemaFor + - schemaTypeCreator + - toString + - typedef +TikaIO: + methods: + - expand + - filepattern + - parse + - parseFiles + - populateDisplayData + - processElement + - setup + - withContentTypeHint + - withInputMetadata + - withTikaConfigPath +Time: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER +TimeMonitor: + methods: + - processElement +TimeUtil: + methods: + - toJava + - toJoda +TimerEndpoint: + methods: + - create + - getCoder + - getReceiver + - getTimerFamilyId + - getTransformId +TimerSpecs: + methods: + - getTimeDomain + - timer + - timerMap +TimestampEncoding: {} +TimestampExtractTransform: + methods: + - expand + - of + - processElement +TimestampFunctions: + methods: + - timestamp +TimestampPolicy: + methods: + - getBacklogCheckTime + - getMessageBacklog + - getTimestampForRecord + - getWatermark +TimestampPrefixingWindowCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getWindowCoder + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - verifyDeterministic +TimestampRange: + methods: + - equals + - getFrom + - getTo + - hashCode + - of + - toString +TimestampRangeTracker: + methods: + - checkDone + - currentRestriction + - getProgress + - isBounded + - setTimeSupplier + - tryClaim + - trySplit +TimestampTransform: + methods: + - alignTo + - delay + - getDelay + - getOffset + - getPeriod +TimestampUtils: + methods: + - next + - previous + - toNanos + - toTimestamp +TimestampedValue: + methods: + - atMinimumTimestamp + - decode + - encode + - equals + - getCoderArguments + - getComponents + - getEncodedTypeDescriptor + - getTimestamp + - getValue + - getValueCoder + - hashCode + - of + - structuralValue + - toString + - verifyDeterministic +ToJson: + methods: + - expand + - of + - processElement +ToString: + methods: + - apply + - elements + - expand + - iterables + - kvs +ToStringFnRunner: + methods: + - getPTransformRunnerFactories +Top: + methods: + - addInput + - compare + - createAccumulator + - decode + - encode + - equals + - extractOutput + - getAccumulatorCoder + - getIncompatibleGlobalWindowErrorMessage + - getNameOverride + - hashCode + - isRegisterByteSizeObserverCheap + - largest + - largestDoublesFn + - largestFn + - largestIntsFn + - largestLongsFn + - largestPerKey + - mergeAccumulator + - of + - perKey + - populateDisplayData + - registerByteSizeObserver + - smallest + - smallestDoublesFn + - smallestFn + - smallestIntsFn + - smallestLongsFn + - smallestPerKey + - verifyDeterministic +TopPerKey: + methods: + - accumulationMode + - expand + - getScoreExtractor + - getScoreType + - getValueExtractor + - getValueType + - keyBy + - named + - of + - output + - scoreBy + - triggeredBy + - valueBy + - windowBy + - withAllowedLateness + - withOnTimeBehavior + - withTimestampCombiner +TopicPartitionCoder: + methods: + - decode + - encode + - getCoderArguments + - verifyDeterministic +TpcdsOptionsRegistrar: + methods: + - getPipelineOptions +TpcdsParametersReader: + methods: + - getAndCheckDataSize + - getAndCheckQueryNames + - getAndCheckTpcParallel + properties: + - ALL_QUERY_NAMES +TpcdsRun: + methods: + - call +TpcdsRunResult: + methods: + - getDataSize + - getDialect + - getElapsedTime + - getEndDate + - getIsSuccessful + - getJobName + - getPipelineOptions + - getPipelineResult + - getQueryName + - getStartDate +TpcdsSchemas: + methods: + - getCallCenterSchema + - getCatalogPageSchema + - getCatalogReturnsSchema + - getCatalogSalesSchema + - getCustomerAddressSchema + - getCustomerDemographicsSchema + - getCustomerSchema + - getDateDimSchema + - getHouseholdDemographicsSchema + - getIncomeBandSchema + - getInventorySchema + - getItemSchema + - getPromotionSchema + - getReasonSchema + - getShipModeSchema + - getStoreReturnsSchema + - getStoreSalesSchema + - getStoreSchema + - getTimeDimSchema + - getTpcdsSchemas + - getTpcdsSchemasImmutableMap + - getWarehouseSchema + - getWebReturnsSchema + - getWebSalesSchema + - getWebSiteSchema + - getWebpageSchema +TpcdsUtils: {} +TrackerWithProgress: {} +Transaction: + methods: + - create + - transactionId +TransformHierarchy: + methods: + - addComposite + - finishSpecifyingInput + - getCurrent + - getEnclosingNode + - getFullName + - getInputs + - getOutputs + - getTransform + - isCompositeNode + - isRootNode + - popNode + - pushNode + - replaceChild + - replaceNode + - replaceOutputs + - setOutput + - toAppliedPTransform + - toString + - visit +Transport: + methods: + - getJsonFactory + - getTransport + - newStorageClient + properties: + - rootUrl + - servicePath +Trigger: + methods: + - equals + - getContinuationTrigger + - getWatermarkThatGuaranteesFiring + - hashCode + - isCompatible + - mayFinish + - orFinally + - subTriggers + - toString +Triple: + methods: + - equals + - getFirst + - getSecond + - getThird + - hashCode + - of + - toString +TupleTag: + methods: + - equals + - getId + - getOutName + - getTypeDescriptor + - hashCode + - toString +TupleTagList: + methods: + - and + - empty + - get + - getAll + - of + - size + - toString +TypeAware: {} +TypeAwareness: + methods: + - orObjects +TypeCode: + methods: + - equals + - getCode + - hashCode + - toString +TypeDescriptor: + methods: + - equals + - getArgumentTypes + - getClasses + - getComponentType + - getInterfaces + - getRawType + - getSupertype + - getType + - getTypeParameter + - getTypes + - hasUnresolvedParameters + - hashCode + - isArray + - isSubtypeOf + - isSupertypeOf + - of + - resolveType + - toString + - where +TypeDescriptors: + methods: + - bigdecimals + - bigintegers + - booleans + - bytes + - characters + - doubles + - extractFromTypeParameters + - floats + - inputOf + - integers + - iterables + - kvs + - lists + - longs + - maps + - nulls + - outputOf + - rows + - sets + - shorts + - strings + - voids +TypeParameter: + methods: + - equals + - hashCode + - toString +TypeUtils: + methods: + - keyValues + - triplets +TypedCombineFnDelegate: + methods: + - addInput + - apply + - compact + - createAccumulator + - defaultValue + - extractOutput + - getAccumTVariable + - getAccumulatorCoder + - getDefaultOutputCoder + - getIncompatibleGlobalWindowErrorMessage + - getInputTVariable + - getInputType + - getOutputTVariable + - getOutputType + - mergeAccumulators + - populateDisplayData +TypedSchemaTransformProvider: + methods: + - configurationSchema + - dependencies + - from +UdafImpl: + methods: + - getCombineFn + - getImplementor + - getName + - getOrdinal + - getParameters + - getReturnType + - getType + - isOptional +UdfImplReflectiveFunctionBase: + methods: + - add + - addMethodParameters + - build + - builder + - getName + - getOrdinal + - getParameters + - getType + - isOptional + properties: + - method + - parameters +UdfTestProvider: + methods: + - addInput + - createAccumulator + - extractOutput + - helloWorld + - increment + - incrementAll + - isNull + - matches + - mergeAccumulators + - notRegistered + - userDefinedAggregateFunctions + - userDefinedScalarFunctions +UnboundedEventSource: + methods: + - advance + - close + - createReader + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getDefaultOutputCoder + - getSplitBacklogBytes + - getWatermark + - split + - start + - toString + - validate +UnboundedReaderImpl: + methods: + - advance + - close + - getCheckpointMark + - getCurrent + - getCurrentSource + - getCurrentTimestamp + - getSplitBacklogBytes + - getWatermark + - start +UnboundedScheduledExecutorService: + methods: + - awaitTermination + - call + - cancel + - compareTo + - execute + - getDelay + - invokeAll + - invokeAny + - isPeriodic + - isShutdown + - isTerminated + - run + - schedule + - scheduleAtFixedRate + - scheduleWithFixedDelay + - shutdown + - shutdownNow + - submit +UnboundedSource: + methods: + - advance + - createReader + - finalizeCheckpoint + - getCheckpointMark + - getCheckpointMarkCoder + - getCurrentRecordId + - getCurrentSource + - getSplitBacklogBytes + - getTotalBacklogBytes + - getWatermark + - requiresDeduping + - split + - start + properties: + - BACKLOG_UNKNOWN +UnboundedSourceImpl: + methods: + - createReader + - getCheckpointMarkCoder + - getOutputCoder + - split +Union: + methods: + - named + - of + - output +UnionCoder: + methods: + - decode + - encode + - getCoderArguments + - getComponents + - getElementCoders + - isRegisterByteSizeObserverCheap + - of + - registerByteSizeObserver + - verifyDeterministic +UnionTranslator: + methods: + - translate +UnknownLogicalType: + methods: + - getPayload +UnownedInputStream: + methods: + - close + - equals + - hashCode + - mark + - markSupported + - reset + - toString +UnownedOutputStream: + methods: + - close + - equals + - hashCode + - toString + - write +UnsignedOptions: + methods: + - build + - builder + - setUint16Behavior + - setUint32Behavior + - setUint64Behavior + - setUint8Behavior + - toBuilder + - uint16Behavior + - uint32Behavior + - uint64Behavior + - uint8Behavior + - usingHigherBitSize + - usingSameBitSize +UpdateConfiguration: + methods: + - create + - withFindKey + - withIsUpsert + - withUpdateFields + - withUpdateKey +UpdateField: + methods: + - fieldUpdate + - fullUpdate +UpdateSchemaDestination: + methods: + - finishBundle + - onTeardown + - processElement + - startBundle +UploadIdResponseInterceptor: + methods: + - interceptResponse +UserCodeException: + methods: + - wrap + - wrapIf +UserFunctionDefinitions: + methods: + - build + - create + - jarPath + - javaAggregateFunctions + - javaScalarFunctions + - method + - newBuilder + - setJavaAggregateFunctions + - setJavaScalarFunctions + - setSqlScalarFunctions + - setSqlTableValuedFunctions + - sqlScalarFunctions + - sqlTableValuedFunctions +UsesAttemptedMetrics: {} +UsesCounterMetrics: {} +UsesDistributionMetrics: {} +UsesGaugeMetrics: {} +UsesImpulse: {} +UsesOrderedListState: {} +Uuid: + methods: + - of + - random + - value + properties: + - DEFAULT_ATTRIBUTE +UuidCoder: + methods: + - decode + - encode + - getCoderProvider +UuidDeduplicationOptions: + methods: + - build + - deduplicate + - newBuilder + - setDeduplicate + - setUuidExtractor + - uuidExtractor + properties: + - DEFAULT_DEDUPLICATE_DURATION + - DEFAULT_TIME_DOMAIN + - DEFAULT_UUID_EXTRACTOR +UuidDeduplicationTransform: + methods: + - expand +UuidLogicalType: + methods: + - getArgument + - getArgumentType + - getBaseType + - getIdentifier + - toBaseType + - toInputType + properties: + - IDENTIFIER + - LEAST_SIGNIFICANT_BITS_FIELD_NAME + - MOST_SIGNIFICANT_BITS_FIELD_NAME + - UUID_SCHEMA +ValueInSingleWindow: + methods: + - decode + - encode + - getCoderArguments + - getComponents + - getPane + - getTimestamp + - getValue + - getWindow + - of + - verifyDeterministic +ValueProviders: + methods: + - updateSerializedOptions +ValueWithRecordId: + methods: + - decode + - encode + - equals + - getCoderArguments + - getId + - getValue + - getValueCoder + - hashCode + - of + - processElement + - toString + - verifyDeterministic +Values: + methods: + - apply + - create + - expand +VarInt: + methods: + - decodeInt + - decodeLong + - encode + - getLength +VarIntCoder: + methods: + - consistentWithEquals + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +VarLongCoder: + methods: + - consistentWithEquals + - decode + - encode + - getCoderArguments + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - verifyDeterministic +VariableBytes: + methods: + - getMaxLength + - getName + - of + - toInputType + - toString + properties: + - IDENTIFIER +VariableString: + methods: + - getMaxLength + - getName + - of + - toInputType + - toString + properties: + - IDENTIFIER +VarianceFn: + methods: + - addInput + - createAccumulator + - extractOutput + - getAccumulatorCoder + - mergeAccumulators + - newPopulation + - newSample +VideoIntelligence: + methods: + - annotateFromBytes + - annotateFromBytesWithContext + - annotateFromURI + - annotateFromUriWithContext + - expand +View: + methods: + - apply + - asIterable + - asList + - asMap + - asMultimap + - asSingleton + - defaultValue + - expand + - finishBundle + - getView + - hasDefaultValue + - identity + - of + - processElement + - withDefaultValue + - withSingletonValues +ViewFn: + methods: + - apply + - getMaterialization + - getTypeDescriptor +VoidAccumulatorProvider: + methods: + - add + - create + - get + - getCounter + - getFactory + - getHistogram + - getTimer + - increment +VoidCoder: + methods: + - decode + - encode + - getEncodedTypeDescriptor + - isRegisterByteSizeObserverCheap + - of + - structuralValue + - verifyDeterministic +Wait: + methods: + - expand + - finishBundle + - on + - process + - startBundle +Watch: + methods: + - afterIterations + - afterTimeSinceNewOutput + - afterTotalOf + - allOf + - canStopPolling + - checkDone + - complete + - currentRestriction + - decode + - eitherOf + - encode + - equals + - expand + - forNewInput + - getCoderArguments + - getCompleted + - getInitialRestriction + - getInitialWatermarkEstimatorState + - getPending + - getPollWatermark + - getRestrictionCoder + - getStateCoder + - getTerminationState + - growthOf + - hashCode + - ignoreInput + - incomplete + - isBounded + - never + - newTracker + - newWatermarkEstimator + - of + - onPollComplete + - onSeenNewOutput + - process + - processElement + - toString + - tryClaim + - trySplit + - verifyDeterministic + - withOutputCoder + - withOutputKeyCoder + - withOutputs + - withPollInterval + - withTerminationPerInput + - withWatermark +WatermarkEstimators: + methods: + - currentWatermark + - getState + - getWatermarkAndState + - observeTimestamp + - setWatermark + - threadSafe +WatermarkLatency: + methods: + - main + - process +WatermarkParameters: + methods: + - builder + - create + - toBuilder + - withTimestampFn + - withWatermarkIdleDurationThreshold +WebPathParser: + methods: + - parseDicomWebpath + properties: + - dataset + - dicomStorePath + - instanceId + - location + - project + - seriesId + - storeId + - studyId +WeightedValue: + methods: + - equals + - getValue + - getWeight + - hashCode + - of + - toString +Window: + methods: + - accumulatingFiredPanes + - apply + - configure + - discardingFiredPanes + - expand + - getOutputStrategyInternal + - getWindowFn + - into + - populateDisplayData + - remerge + - triggering + - withAllowedLateness + - withOnTimeBehavior + - withTimestampCombiner +WindowFn: + methods: + - assignWindows + - assignsToOneWindow + - element + - getDefaultWindowMappingFn + - getWindowTypeDescriptor + - isCompatible + - isNonMerging + - merge + - mergeWindows + - populateDisplayData + - timestamp + - verifyCompatibility + - window + - windowCoder + - windows +WindowFnTestUtils: + methods: + - assignedWindows + - assignedWindowsWithValue + - element + - get + - merge + - put + - runWindowFn + - runWindowFnWithValue + - set + - timestamp + - validateGetOutputTimestamps + - validateGetOutputTimestampsWithValue + - window + - windows +WindowMappingFn: + methods: + - getSideInputWindow + - maximumLookback +WindowMappingFnRunner: + methods: + - getPTransformRunnerFactories +WindowMergingFnRunner: + methods: + - getPTransformRunnerFactories + - merge + - windows +WindowTracing: + methods: + - debug + - trace +WindowedValue: + methods: + - decode + - encode + - equals + - explodeWindows + - fromComponents + - getCoderArguments + - getComponents + - getFullCoder + - getPane + - getParamWindowedValueCoder + - getPayload + - getTimestamp + - getValue + - getValueCoder + - getValueOnlyCoder + - getWindow + - getWindowCoder + - getWindows + - getWindowsCoder + - hashCode + - isSingleWindowedValue + - of + - registerByteSizeObserver + - timestampedValueInGlobalWindow + - toString + - valueInGlobalWindow + - verifyDeterministic + - withValue + - withValueCoder +WindowingStrategy: + methods: + - equals + - fixDefaults + - getAllowedLateness + - getClosingBehavior + - getEnvironmentId + - getMode + - getOnTimeBehavior + - getTimestampCombiner + - getTrigger + - getWindowFn + - globalDefault + - hashCode + - isAllowedLatenessSpecified + - isAlreadyMerged + - isModeSpecified + - isTimestampCombinerSpecified + - isTriggerSpecified + - needsMerge + - of + - toString + - withAllowedLateness + - withAlreadyMerged + - withClosingBehavior + - withEnvironmentId + - withMode + - withOnTimeBehavior + - withTimestampCombiner + - withTrigger + - withWindowFn +WinningBids: + methods: + - assignWindows + - decode + - encode + - equals + - expand + - forAuction + - forBid + - getDefaultWindowMappingFn + - hashCode + - isAuctionWindow + - isCompatible + - mergeWindows + - of + - processElement + - structuralValue + - toString + - verifyDeterministic + - windowCoder + properties: + - auction + - isAuctionWindow +WinningBidsSimulator: {} +WithFailures: + methods: + - apply + - element + - exception + - expand + - failures + - failuresTo + - finishSpecifyingOutput + - getPipeline + - of + - output +WithKeys: + methods: + - apply + - expand + - of + - process + - withKeyType +WithTimestamps: + methods: + - expand + - getAllowedTimestampSkew + - of + - processElement + - withAllowedTimestampSkew +WordCount: + methods: + - apply + - expand + - main + - processElement +WrappedSupervisor: + methods: + - createBlockGenerator + - getCurrentRateLimit + - isReceiverStopped + - logInfo + - onReceiverStart + - pushArrayBuffer + - pushBytes + - pushIterator + - pushSingle + - reportError +WritableCoder: + methods: + - coderFor + - decode + - encode + - equals + - getCoderArguments + - getCoderProvider + - getCoderProviders + - hashCode + - of + - verifyDeterministic +WriteBuilder: + methods: + - buildExternal + - getCreateDisposition + - getTableSchema + - getWriteDisposition + - setCreateDisposition + - setTableSchema + - setWriteDisposition +WriteFiles: + methods: + - apply + - assignShardKey + - equals + - expand + - finishBundle + - getAdditionalInputs + - getComputeNumShards + - getNumShardsProvider + - getShardingFunction + - getSink + - getWindowedWrites + - hashCode + - populateDisplayData + - process + - processElement + - startBundle + - to + - validate + - withMaxNumWritersPerBundle + - withNoSpilling + - withNumShards + - withRunnerDeterminedSharding + - withSharding + - withShardingFunction + - withSideInputs + - withSkipIfEmpty + - withWindowedWrites + properties: + - CONCRETE_CLASS +WriteFilesResult: + methods: + - expand + - finishSpecifyingOutput + - getPerDestinationOutputFilenames + - getPipeline +WriteJmsResult: + methods: + - expand + - finishSpecifyingOutput + - getFailedMessages + - getPipeline +WriteResult: + methods: + - expand + - finishSpecifyingOutput + - getFailedInserts + - getFailedInsertsWithErr + - getFailedStorageApiInserts + - getPipeline + - getSuccessfulInserts + - getSuccessfulTableLoads +WriteToPulsarDoFn: + methods: + - processElement + - setup + - teardown +XmlIO: + methods: + - apply + - expand + - flush + - from + - matches + - open + - populateDisplayData + - read + - readFiles + - sink + - to + - withCharset + - withCompression + - withCompressionType + - withMinBundleSize + - withRecordClass + - withRecordElement + - withRootElement + - withValidationEventHandler + - write +XmlSource: + methods: + - getCurrent + - getCurrentSource + - getOutputCoder +ZetaSQLQueryPlanner: + methods: + - convertToBeamRel + - createPlanner + - getDefaultTimezone + - getLanguageOptions + - getZetaSqlRuleSets + - parse + - setDefaultTimezone + properties: + - DEFAULT_CALC + - FACTORY +ZetaSqlBeamTranslationUtils: + methods: + - toBeamObject + - toBeamRow + - toBeamType + - toZetaSqlStructType + - toZetaSqlStructValue + - toZetaSqlType + - toZetaSqlValue +ZetaSqlCalciteTranslationUtils: + methods: + - toCalciteType + - toRexNode + - toZetaSqlType + properties: + - ZETASQL_NUMERIC_MAX_VALUE + - ZETASQL_NUMERIC_MIN_VALUE + - ZETASQL_NUMERIC_SCALE +ZetaSqlException: {} +ZetaSqlScalarFunctionImpl: + methods: + - create + properties: + - functionGroup +ZetaSqlUnnest: + methods: + - copy + - create + - deriveUncollectRowType + - explainTerms + properties: + - withOrdinality +ZetaSqlUserDefinedSQLNativeTableValuedFunction: {} +ZipFiles: + methods: + - iterator + - openStream + - toString + - zipDirectory + - zipDirectoryOverwrite +ZstdCoder: + methods: + - consistentWithEquals + - decode + - encode + - equals + - getCoderArguments + - hashCode + - of + - structuralValue + - toString + - verifyDeterministic diff --git a/playground/frontend/build/playground_components/assets/symbols/python.g.yaml b/playground/frontend/build/playground_components/assets/symbols/python.g.yaml new file mode 100644 index 000000000000..0b9e5e142ded --- /dev/null +++ b/playground/frontend/build/playground_components/assets/symbols/python.g.yaml @@ -0,0 +1,12096 @@ +AbstractBeamJob: + methods: + - artifact_staging_endpoint + - cancel + - get_message_stream + - get_pipeline + - get_state + - get_state_stream + - is_terminal_state + - prepare + - run + - set_state + - state + - to_runner_api + - with_state_history +AbstractComponentCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size + - get_estimated_size_and_observables +AbstractDoFnWrapper: + methods: + - finish_bundle + - process + - setup + - start_bundle + - teardown + - wrapper +AbstractJobServiceServicer: + methods: + - Cancel + - create_beam_job + - DescribePipelineOptions + - GetJobs + - GetMessageStream + - GetPipeline + - GetState + - GetStateStream + - Prepare + - Run +AcceleratorHint: + properties: + - urn +AccumulatingRuntimeState: + methods: + - add + - clear + - commit + - read +AccumulationMode: + properties: + - ACCUMULATING + - DISCARDING +AccumulatorCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +AccumulatorCombineFnCounter: + methods: + - reset + - update + - update_n +AdaptiveThrottler: + methods: + - successful_request + - throttle_request + properties: + - MIN_REQUESTS +AddBitbucketServerConnectedRepositoryRequest: + properties: + - connectedRepository +AddBitbucketServerConnectedRepositoryResponse: + properties: + - config + - connectedRepository +AddThenMultiply: + methods: + - expand +AddThenMultiplyDoFn: + methods: + - process +AddTimestampFn: + methods: + - process +AddWithProductDoFn: + methods: + - process +AfterAll: + properties: + - combine_op +AfterAny: + properties: + - combine_op +AfterCount: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api + properties: + - COUNT_TAG +AfterEach: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api + properties: + - INDEX_TAG +AfterProcessingTime: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api + properties: + - STATE_TAG +AfterWatermark: + methods: + - from_runner_api + - has_ontime_pane + - is_late + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api + properties: + - LATE_TAG +AggregateClassificationMetrics: + properties: + - accuracy + - f1Score + - logLoss + - precision + - recall + - rocAuc + - threshold +AllAccumulator: + methods: + - add_input + - extract_output + - merge +AllCombineFn: {} +AllPrimitives: + properties: + - field_bool + - field_bytes + - field_float32 + - field_float64 + - field_int16 + - field_int32 + - field_int64 + - field_int8 + - field_optional_bool + - field_optional_bytes + - field_optional_float32 + - field_optional_float64 + - field_optional_int16 + - field_optional_int32 + - field_optional_int64 + - field_optional_int8 + - field_optional_str + - field_str +Always: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api +AlwaysPassMatcher: {} +ANamedTuple: + properties: + - a + - b +AnnotateImage: + methods: + - expand + properties: + - MAX_BATCH_SIZE + - MIN_BATCH_SIZE +AnnotateImageWithContext: + methods: + - expand +AnnotateVideo: + methods: + - expand +AnnotateVideoWithContext: + methods: + - expand +AnnotationBasedPayloadBuilder: {} +AnnotationTests: + methods: + - check_annotation + - check_custom_annotation + - setUp + - test_deprecated_custom_no_replacements + - test_deprecated_with_since_current + - test_deprecated_with_since_current_message + - test_deprecated_with_since_current_message_class + - test_deprecated_with_since_current_message_custom + - test_deprecated_without_current + - test_deprecated_without_since_custom_should_fail + - test_deprecated_without_since_should_fail + - test_enforce_custom_since_deprecated_must_fail + - test_experimental_with_current + - test_experimental_with_current_message + - test_experimental_with_current_message_class + - test_experimental_with_current_message_custom + - test_experimental_without_current +AnyAccumulator: + methods: + - add_input + - extract_output + - merge +AnyCombineFn: {} +AnyTypeConstraint: + methods: + - type_check +AppendDestinationsFn: + methods: + - display_data + - process +AppliedPTransform: + methods: + - add_output + - add_part + - from_runner_api + - inputs + - is_composite + - named_inputs + - named_outputs + - replace_inputs + - replace_output + - replace_side_inputs + - to_runner_api + - visit +ApprovalConfig: + properties: + - approvalRequired +ApprovalResult: + properties: + - approvalTime + - approverAccount + - comment + - decision + - url +ApproveBuildRequest: + properties: + - approvalResult +ApproximateProgress: + properties: + - percentComplete + - position + - remainingTime +ApproximateQuantiles: {} +ApproximateQuantilesCombineFn: + methods: + - add_input + - create + - create_accumulator + - extract_output + - merge_accumulators +ApproximateReportedProgress: + properties: + - consumedParallelism + - fractionConsumed + - position + - remainingParallelism +ApproximateSplitRequest: + properties: + - fractionConsumed + - fractionOfRemainder + - position +ApproximateUnique: + methods: + - parse_input_params +ApproximateUniqueCombineFn: + methods: + - add_input + - create_accumulator + - display_data + - extract_output + - merge_accumulators +Arbitrary: + methods: + - check + - is_subpartitioning_of + - test_partition_fn +Argument: + properties: + - argumentKind + - dataType + - mode + - name +ArgumentPlaceholder: {} +ArimaCoefficients: + properties: + - autoRegressiveCoefficients + - interceptCoefficient + - movingAverageCoefficients +ArimaFittingMetrics: + properties: + - aic + - logLikelihood + - variance +ArimaForecastingMetrics: + properties: + - arimaFittingMetrics + - arimaSingleModelForecastingMetrics + - hasDrift + - nonSeasonalOrder + - seasonalPeriods + - timeSeriesId +ArimaModelInfo: + properties: + - arimaCoefficients + - arimaFittingMetrics + - hasDrift + - nonSeasonalOrder + - seasonalPeriods + - timeSeriesId +ArimaOrder: + properties: + - d + - p + - q +ArimaResult: + properties: + - arimaModelInfo + - seasonalPeriods +ArimaSingleModelForecastingMetrics: + properties: + - arimaFittingMetrics + - hasDrift + - nonSeasonalOrder + - seasonalPeriods + - timeSeriesId +ArrayMultiplyDoFn: + methods: + - infer_output_type + - process_batch +ArtifactObjects: + properties: + - location + - paths + - timing +ArtifactResult: + properties: + - fileHash + - location +ArtifactRetrievalService: + methods: + - GetArtifact + - ResolveArtifacts +Artifacts: + properties: + - images + - objects +ArtifactStagingService: + methods: + - register_job + - resolved_deps + - ReverseArtifactRetrievalService +AsDict: {} +AsIter: + methods: + - element_type +AsList: {} +AsMultiMap: + methods: + - requires_keyed_input +AsSideInput: + methods: + - element_type + - from_runner_api + - requires_keyed_input + - to_runner_api +AssignTimestamps: + methods: + - process +AssignUniqueID: + methods: + - process +AsSingleton: + methods: + - element_type +Auction: + properties: + - CODER +AuctionBid: + properties: + - CODER +AuctionBidCoder: + methods: + - is_deterministic + - to_type_hint +AuctionBidCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +AuctionByIdFn: + methods: + - process +AuctionBySellerFn: + methods: + - process +AuctionCoder: + methods: + - is_deterministic + - to_type_hint +AuctionCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +AuctionOrBidWindow: + methods: + - for_auction + - for_bid + - is_auction_window_fn +AuctionOrBidWindowCoder: + methods: + - is_deterministic +AuctionOrBidWindowCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +AuctionOrBidWindowFn: + methods: + - assign + - get_transformed_output_time + - get_window_coder + - merge +AuditConfig: + properties: + - auditLogConfigs + - service +AuditLogConfig: + properties: + - exemptedMembers + - logType +AugmentedPipeline: + methods: + - augment + - augmented_pipeline + - background_recording_pipeline + - cacheables +AugmentedTestResults: {} +AutocompleteIT: + methods: + - test_autocomplete_output_files_on_small_input + properties: + - EXPECTED_PREFIXES + - WORDS +AutoscalingEvent: + properties: + - currentNumWorkers + - description + - eventType + - targetNumWorkers + - time + - workerPool +AutoscalingSettings: + properties: + - algorithm + - maxNumWorkers +AvroBase: + methods: + - setUp + - tearDown + - test_corrupted_file + - test_dynamic_work_rebalancing_exhaustive + - test_read_all_continuously_new + - test_read_all_continuously_update + - test_read_all_from_avro_file_pattern + - test_read_all_from_avro_many_file_patterns + - test_read_all_from_avro_many_single_files + - test_read_all_from_avro_single_file + - test_read_all_from_avro_with_filename + - test_read_display_data + - test_read_from_avro + - test_read_reantrant_with_splitting + - test_read_reentrant_without_splitting + - test_read_with_splitting + - test_read_with_splitting_compressed_deflate + - test_read_with_splitting_compressed_snappy + - test_read_with_splitting_multiple_blocks + - test_read_with_splitting_pattern + - test_read_without_splitting + - test_read_without_splitting_compressed_deflate + - test_read_without_splitting_compressed_snappy + - test_read_without_splitting_multiple_blocks + - test_read_without_splitting_pattern + - test_sink_display_data + - test_sink_transform + - test_sink_transform_snappy + - test_source_display_data + - test_split_points + - test_write_display_data + - test_writer_open_and_close +AvroCoderImpl: + methods: + - decode + - encode +AvroGenericCoder: + methods: + - from_runner_api_parameter + - is_deterministic + - to_runner_api_parameter + - to_type_hint +AvroRecord: {} +AvroRowWriter: + methods: + - close + - closed + - flush + - read + - tell + - writable + - write +AvroTestCoder: + properties: + - SCHEMA +AvroTestRecord: {} +AzureOptions: + methods: + - validate +BackgroundCachingJob: + methods: + - cancel + - is_done + - is_running + - state +Bacon: {} +BagInStateOutputAfterTimer: + methods: + - emit_values + - process + properties: + - EMIT_TIMER + - SET_STATE +BagRuntimeState: + methods: + - add + - clear + - read +BagStateSpec: + methods: + - to_runner_api +Base64PickleCoder: + methods: + - decode + - encode + - is_deterministic + - is_kv_coder + - key_coder + - value_coder +BaseTimer: + methods: + - clear + - set +BasicLoggingService: + methods: + - Logging +BasicProvisionService: + methods: + - GetProvisionInfo +BatchConverter: + methods: + - batch_type + - combine_batches + - element_type + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch + - register +BatchCreateBitbucketServerConnectedRepositoriesRequest: + properties: + - requests +BatchCreateBitbucketServerConnectedRepositoriesResponse: + properties: + - bitbucketServerConnectedRepositories +BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata: + properties: + - completeTime + - config + - createTime +BatchDoFn: + methods: + - process_batch +BatchElements: + methods: + - expand +BatchGlobalTriggerDriver: + methods: + - process_elements + - process_timer + properties: + - GLOBAL_WINDOW_TUPLE + - ONLY_FIRING +BatchingPreference: + methods: + - requires_batches + - supports_batches + - supports_elements + properties: + - BATCH_FORBIDDEN + - BATCH_REQUIRED + - DO_NOT_CARE +BatchRowsAsDataFrame: + methods: + - expand +BatchToElementDoFn: + methods: + - process_batch +BeamAssertException: {} +BeamDataframeDoctestRunner: + methods: + - fake_pandas_module + - report_success + - run + - summarize + - summary +BeamDeprecationWarning: {} +BeamError: {} +BeamFilesystemHandler: + methods: + - file_reader + - file_writer +BeamFnControlServicer: + methods: + - Control +BeamFnDataServicer: + methods: + - Data + - get_conn_by_worker_id +BeamFnExternalWorkerPoolServicer: + methods: + - start + - StartWorker + - StopWorker +BeamFnLoggingServicer: + methods: + - Logging +BeamFnStatusServicer: + methods: + - WorkerStatus +BeamIOError: {} +BeamJarExpansionService: {} +BeamJob: + methods: + - artifact_staging_endpoint + - cancel + - get_message_stream + - get_state_stream + - pipeline_options + - prepare + - run + - set_state +BeamPlugin: + methods: + - get_all_plugin_paths + - get_all_subclasses +BeamSchemaConversionDoFn: + methods: + - infer_output_type + - process +BeamSqlMagics: + methods: + - beam_sql +BeamSqlParser: + methods: + - parse + - print_help +BeamTransformFactory: + methods: + - augment_oldstyle_op + - create_operation + - extract_timers_info + - get_coder + - get_input_coders + - get_input_windowing + - get_only_input_coder + - get_only_output_coder + - get_output_coders + - get_windowed_coder + - register_urn +BenchmarkConfig: + properties: + - benchmark + - num_runs + - size +Bid: + properties: + - CODER +BidByAuctionIdFn: + methods: + - process +BidCoder: + methods: + - is_deterministic + - to_type_hint +BidCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +BigIntegerCoder: + methods: + - is_deterministic + - to_type_hint +BigIntegerCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +BigQueryBatchFileLoads: + methods: + - expand + - verify + properties: + - COUNT + - DESTINATION_COPY_JOBID_PAIRS + - DESTINATION_FILE_PAIRS + - DESTINATION_JOBID_PAIRS +BigQueryClient: + methods: + - save +BigqueryDatasetsDeleteRequest: + properties: + - datasetId + - deleteContents + - projectId +BigqueryDatasetsDeleteResponse: {} +BigqueryDatasetsGetRequest: + properties: + - datasetId + - projectId +BigqueryDatasetsInsertRequest: + properties: + - dataset + - projectId +BigqueryDatasetsListRequest: + properties: + - all + - filter + - maxResults + - pageToken + - projectId +BigqueryDatasetsPatchRequest: + properties: + - dataset + - datasetId + - projectId +BigqueryDatasetsUpdateRequest: + properties: + - dataset + - datasetId + - projectId +BigQueryDisposition: + methods: + - validate_create + - validate_write + properties: + - CREATE_IF_NEEDED + - CREATE_NEVER + - WRITE_APPEND + - WRITE_EMPTY + - WRITE_TRUNCATE +BigQueryFileLoadsIntegrationTests: + methods: + - setUp + - tearDown + - test_avro_file_load + properties: + - BIG_QUERY_DATASET_ID +BigQueryFileLoadsIT: + methods: + - setUp + - tearDown + - test_bqfl_streaming + - test_bqfl_streaming_with_copy_jobs + - test_bqfl_streaming_with_dynamic_destinations + - test_multiple_destinations_transform + - test_one_job_fails_all_jobs_fail + properties: + - BIG_QUERY_DATASET_ID + - BIG_QUERY_SCHEMA + - BIG_QUERY_SCHEMA_2 + - BIG_QUERY_STREAMING_SCHEMA +BigqueryFullResultMatcher: + methods: + - describe_mismatch + - describe_to +BigqueryFullResultStreamingMatcher: + properties: + - DEFAULT_TIMEOUT +BigQueryIODetails: + properties: + - dataset + - projectId + - query + - table +BigQueryIOMetadata: + methods: + - add_additional_bq_job_labels +BigqueryIOReadIT: + methods: + - run_bigquery_io_read_pipeline + - test_bigquery_read_1M_python + - test_bigquery_read_custom_1M_python + properties: + - DEFAULT_DATASET + - DEFAULT_TABLE_PREFIX + - NUM_RECORDS +BigqueryJobsCancelRequest: + properties: + - jobId + - location + - projectId +BigqueryJobsGetQueryResultsRequest: + properties: + - jobId + - location + - maxResults + - pageToken + - projectId + - startIndex + - timeoutMs +BigqueryJobsGetRequest: + properties: + - jobId + - location + - projectId +BigqueryJobsInsertRequest: + properties: + - job + - projectId +BigqueryJobsListRequest: + properties: + - allUsers + - maxCreationTime + - maxResults + - minCreationTime + - pageToken + - parentJobId + - projectId + - projection + - stateFilter +BigqueryJobsQueryRequest: + properties: + - projectId + - queryRequest +BigQueryJobTypes: + properties: + - COPY + - EXPORT + - LOAD + - QUERY +BigQueryJsonIT: + methods: + - generate_data + - generate_query_data + - generate_schema + - read_and_validate_rows + - run_test_write + - setUpClass + - test_direct_read + - test_export_read + - test_file_loads_write + - test_query_read + - test_streaming_inserts +BigqueryMatcher: + methods: + - describe_mismatch + - describe_to +BigQueryMetricsFetcher: + methods: + - fetch +BigQueryMetricsPublisher: + methods: + - publish +BigqueryModelsDeleteRequest: + properties: + - datasetId + - modelId + - projectId +BigqueryModelsDeleteResponse: {} +BigqueryModelsGetRequest: + properties: + - datasetId + - modelId + - projectId +BigqueryModelsListRequest: + properties: + - datasetId + - maxResults + - pageToken + - projectId +BigqueryModelsPatchRequest: + properties: + - datasetId + - model + - modelId + - projectId +BigQueryModelTraining: + properties: + - currentIteration + - expectedTotalIterations +BigqueryProjectsGetServiceAccountRequest: + properties: + - projectId +BigqueryProjectsListRequest: + properties: + - maxResults + - pageToken +BigQueryQueryPriority: + properties: + - BATCH + - INTERACTIVE +BigQueryQueryToTableIT: + methods: + - setUp + - tearDown + - test_big_query_legacy_sql + - test_big_query_new_types + - test_big_query_new_types_avro + - test_big_query_standard_sql +BigQueryReadIntegrationTests: + methods: + - setUpClass + - tearDownClass + properties: + - BIG_QUERY_DATASET_ID +BigqueryRoutinesDeleteRequest: + properties: + - datasetId + - projectId + - routineId +BigqueryRoutinesDeleteResponse: {} +BigqueryRoutinesGetRequest: + properties: + - datasetId + - projectId + - readMask + - routineId +BigqueryRoutinesInsertRequest: + properties: + - datasetId + - projectId + - routine +BigqueryRoutinesListRequest: + properties: + - datasetId + - filter + - maxResults + - pageToken + - projectId + - readMask +BigqueryRoutinesUpdateRequest: + properties: + - datasetId + - projectId + - routine + - routineId +BigqueryRowAccessPoliciesListRequest: + properties: + - datasetId + - pageSize + - pageToken + - projectId + - tableId +BigQuerySideInputIT: + methods: + - setUp + - test_bigquery_side_input_it + properties: + - DEFAULT_OUTPUT_FILE +BigQueryStreamingInsertsErrorHandling: + methods: + - test_insert_all_retries_if_structured_retriable + - test_insert_all_retries_if_unstructured_retriable + - test_insert_all_unretriable_errors + - test_insert_all_unretriable_errors_streaming +BigQueryStreamingInsertTransformIntegrationTests: + methods: + - setUp + - tearDown + - test_multiple_destinations_transform + - test_value_provider_transform + properties: + - BIG_QUERY_DATASET_ID +BigQueryStreamingInsertTransformTests: + methods: + - test_dofn_client_finish_bundle_flush_called + - test_dofn_client_no_records + - test_dofn_client_process_flush_called + - test_dofn_client_process_performs_batching + - test_with_batched_input +BigqueryTabledataInsertAllRequest: + properties: + - datasetId + - projectId + - tableDataInsertAllRequest + - tableId +BigqueryTabledataListRequest: + properties: + - datasetId + - maxResults + - pageToken + - projectId + - selectedFields + - startIndex + - tableId +BigQueryTableMatcher: + methods: + - describe_mismatch + - describe_to +BigqueryTablesDeleteRequest: + properties: + - datasetId + - projectId + - tableId +BigqueryTablesDeleteResponse: {} +BigqueryTablesGetIamPolicyRequest: + properties: + - getIamPolicyRequest + - resource +BigqueryTablesGetRequest: + properties: + - datasetId + - projectId + - selectedFields + - tableId +BigqueryTablesInsertRequest: + properties: + - datasetId + - projectId + - table +BigqueryTablesListRequest: + properties: + - datasetId + - maxResults + - pageToken + - projectId +BigqueryTablesPatchRequest: + properties: + - datasetId + - projectId + - table + - tableId +BigqueryTablesSetIamPolicyRequest: + properties: + - resource + - setIamPolicyRequest +BigqueryTablesTestIamPermissionsRequest: + properties: + - resource + - testIamPermissionsRequest +BigqueryTablesUpdateRequest: + properties: + - datasetId + - projectId + - table + - tableId +BigqueryTornadoesIT: + methods: + - test_bigquery_tornadoes_it + properties: + - DEFAULT_CHECKSUM +BigqueryV2: + properties: + - BASE_URL + - MESSAGES_MODULE + - MTLS_BASE_URL +BigQueryWrapper: + methods: + - clean_up_temporary_dataset + - convert_row_to_dict + - create_temporary_dataset + - get_job + - get_or_create_dataset + - get_or_create_table + - get_query_location + - get_table + - get_table_location + - insert_rows + - is_user_configured_dataset + - perform_extract_job + - perform_load_job + - run_query + - unique_row_id + - wait_for_bq_job + properties: + - HISTOGRAM_METRIC_LOGGER + - TEMP_DATASET + - TEMP_TABLE +BigQueryWriteFn: + methods: + - display_data + - finish_bundle + - get_table_schema + - process + - start_bundle + properties: + - DEFAULT_MAX_BATCH_SIZE + - DEFAULT_MAX_BUFFERED_ROWS + - FAILED_ROWS + - FAILED_ROWS_WITH_ERRORS + - STREAMING_API_LOGGING_FREQUENCY_SEC +BigQueryWriteIntegrationTests: + methods: + - create_table + - setUp + - tearDown + - test_big_query_write + - test_big_query_write_insert_errors_reporting + - test_big_query_write_new_types + - test_big_query_write_schema_autodetect + - test_big_query_write_temp_table_append_schema_update + - test_big_query_write_without_schema + properties: + - BIG_QUERY_DATASET_ID +BigtableColumn: + properties: + - encoding + - fieldName + - onlyReadLatest + - qualifierEncoded + - qualifierString + - type +BigtableColumnFamily: + properties: + - columns + - encoding + - familyId + - onlyReadLatest + - type +BigTableIODetails: + properties: + - instanceId + - projectId + - tableId +BigtableOptions: + properties: + - columnFamilies + - ignoreUnspecifiedColumnFamilies + - readRowkeyAsString +BinaryClassificationMetrics: + properties: + - aggregateClassificationMetrics + - binaryConfusionMatrixList + - negativeLabel + - positiveLabel +BinaryConfusionMatrix: + properties: + - accuracy + - f1Score + - falseNegatives + - falsePositives + - positiveClassThreshold + - precision + - recall + - trueNegatives + - truePositives +Binding: + properties: + - condition + - members + - role +BitbucketServerConfig: + properties: + - apiKey + - connectedRepositories + - createTime + - hostUri + - name + - peeredNetwork + - secrets + - sslCa + - username + - webhookKey +BitbucketServerConnectedRepository: + properties: + - parent + - repo + - status +BitbucketServerRepository: + properties: + - browseUri + - description + - displayName + - name + - repoId +BitbucketServerRepositoryId: + properties: + - projectKey + - repoSlug + - webhookId +BitbucketServerSecrets: + properties: + - adminAccessTokenVersionName + - readAccessTokenVersionName + - webhookSecretVersionName +BitbucketServerTriggerConfig: + properties: + - bitbucketServerConfig + - bitbucketServerConfigResource + - projectKey + - pullRequest + - push + - repoSlug +BitcoinTxnCountDoFn: + methods: + - process +Blob: {} +BlobStorageDownloader: + methods: + - get_range + - size +BlobStorageError: {} +BlobStorageFileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split + properties: + - AZURE_FILE_SYSTEM_PREFIX + - CHUNK_SIZE +BlobStorageIO: + methods: + - checksum + - copy + - copy_paths + - copy_tree + - delete + - delete_files + - delete_paths + - delete_tree + - exists + - last_updated + - list_files + - list_prefix + - open + - rename + - rename_files + - size +BlobStorageIOError: {} +BlobStorageUploader: + methods: + - finish + - put +BooleanCoder: + methods: + - is_deterministic + - to_type_hint +BooleanCoderImpl: + methods: + - decode + - decode_from_stream + - encode + - encode_to_stream + - estimate_size +BoundedSource: + methods: + - default_output_coder + - estimate_size + - get_range_tracker + - is_bounded + - read + - split +BoundedWindow: + methods: + - end + - max_timestamp + - start +BoundMethod: {} +BqmlIterationResult: + properties: + - durationMs + - evalLoss + - index + - learnRate + - trainingLoss +BqmlTrainingRun: + properties: + - iterationResults + - startTime + - state + - trainingOptions +Breakfast: {} +Bucket: + properties: + - acl + - billing + - cors + - defaultEventBasedHold + - defaultObjectAcl + - encryption + - etag + - id + - kind + - labels + - lifecycle + - location + - logging + - metageneration + - name + - owner + - projectNumber + - retentionPolicy + - selfLink + - storageClass + - timeCreated + - updated + - versioning + - website +BucketAccessControl: + properties: + - bucket + - domain + - email + - entity + - entityId + - etag + - id + - kind + - projectTeam + - role + - selfLink +BucketAccessControls: + properties: + - items + - kind +Buckets: + properties: + - items + - kind + - nextPageToken +BucketType: + methods: + - accumulated_bucket_size + - bucket_index + - bucket_size + - num_buckets + - range_from + - range_to +Buffer: + methods: + - append + - extend +build: + properties: + - sub_commands +Build: + properties: + - approval + - artifacts + - availableSecrets + - buildTriggerId + - createTime + - failureInfo + - finishTime + - id + - images + - logsBucket + - logUrl + - name + - options + - projectId + - queueTtl + - results + - secrets + - serviceAccount + - source + - sourceProvenance + - startTime + - status + - statusDetail + - steps + - substitutions + - tags + - timeout + - timing + - warnings +BuildApproval: + properties: + - config + - result + - state +BuildOperationMetadata: + properties: + - build +BuildOptions: + properties: + - diskSizeGb + - dynamicSubstitutions + - env + - logging + - logStreamingOption + - machineType + - pool + - requestedVerifyOption + - secretEnv + - sourceProvenanceHash + - substitutionOption + - volumes + - workerPool +BuildStep: + properties: + - args + - dir + - entrypoint + - env + - id + - name + - pullTiming + - script + - secretEnv + - status + - timeout + - timing + - volumes + - waitFor +BuildTrigger: + properties: + - approvalConfig + - autodetect + - bitbucketServerTriggerConfig + - build + - createTime + - description + - disabled + - eventType + - filename + - filter + - gitFileSource + - github + - id + - ignoredFiles + - includedFiles + - name + - pubsubConfig + - resourceName + - serviceAccount + - sourceToBuild + - substitutions + - tags + - triggerTemplate + - webhookConfig +BuiltImage: + properties: + - digest + - name + - pushTiming +BundleBasedDirectRunner: + methods: + - is_fnapi_compatible + - run_pipeline +BundleContextManager: + methods: + - data_api_service_descriptor + - get_buffer + - get_coder_impl + - get_input_coder_impl + - get_timer_coder_impl + - input_for + - process_bundle_descriptor + - state_api_service_descriptor + - worker_handlers +BundleFactory: + methods: + - create_bundle + - create_empty_committed_bundle +BundleManager: + methods: + - process_bundle +BundleProcessor: + methods: + - bundle_application + - construct_bundle_application + - create_execution_tree + - delayed_bundle_application + - finalize_bundle + - monitoring_infos + - process_bundle + - requires_finalization + - reset + - shutdown + - try_split +BundleProcessorCache: + methods: + - activate + - discard + - get + - lookup + - register + - release + - shutdown + properties: + - periodic_shutdown +ByteCountingOutputStream: + methods: + - get + - get_count + - write + - write_byte +BytesCoder: + methods: + - as_cloud_object + - is_deterministic + - to_type_hint +BytesCoderImpl: + methods: + - decode + - decode_from_stream + - encode + - encode_to_stream +Cacheable: + methods: + - from_pcoll + - to_key + properties: + - pcoll + - producer_version + - var + - version +CacheAware: + methods: + - get_referents_for_cache +CacheKey: + methods: + - from_pcoll + - from_str + - to_str + properties: + - pipeline_id + - producer_version + - var + - version +CacheManager: + methods: + - cleanup + - clear + - exists + - is_latest_version + - load_pcoder + - read + - save_pcoder + - sink + - size + - source + - write +CachingStateHandler: + methods: + - blocking_get + - clear + - done + - extend + - process_instruction_id +CalculateSpammyUsers: + methods: + - expand + properties: + - SCORE_WEIGHT +CalculateTeamScores: + methods: + - expand +CalculateUserScores: + methods: + - expand +CallableWrapperCombineFn: + methods: + - add_input + - add_inputs + - compact + - create_accumulator + - default_type_hints + - display_data + - extract_output + - for_input_type + - infer_output_type + - merge_accumulators +CallableWrapperDoFn: + methods: + - default_type_hints + - display_data + - infer_output_type +CallableWrapperPartitionFn: + methods: + - partition_for +CallbackCoderImpl: + methods: + - decode + - decode_from_stream + - encode + - encode_to_stream + - estimate_size + - get_estimated_size_and_observables +CallSequenceEnforcingCombineFn: + methods: + - add_input + - add_inputs + - create_accumulator + - extract_output + - merge_accumulators + - setup + - teardown + properties: + - instances +CallSequenceEnforcingDoFn: + methods: + - finish_bundle + - process + - setup + - start_bundle + - teardown +CancelBuildRequest: + properties: + - id + - name + - projectId +CancelOperationRequest: {} +CaptureControl: + methods: + - limiters + - set_limiters_for_test +CategoricalValue: + properties: + - categoryCounts +CategoryCount: + properties: + - category + - count +Channel: + properties: + - address + - expiration + - id + - kind + - params + - payload + - resourceId + - resourceUri + - token + - type +Client: + methods: + - complete_multipart_upload + - copy + - create_multipart_upload + - delete + - delete_batch + - get_object_metadata + - get_range + - get_stream + - list + - upload_part +Clock: + methods: + - advance_time + - time +ClosableOutputStream: + methods: + - close + - create + - flush + - maybe_flush +CloudbuildLocationsRegionalWebhookRequest: + properties: + - httpBody + - location + - webhookKey +CloudbuildOperationsCancelRequest: + properties: + - cancelOperationRequest + - name +CloudbuildOperationsGetRequest: + properties: + - name +CloudbuildProjectsBuildsApproveRequest: + properties: + - approveBuildRequest + - name +CloudbuildProjectsBuildsCreateRequest: + properties: + - build + - parent + - projectId +CloudbuildProjectsBuildsGetRequest: + properties: + - id + - name + - projectId +CloudbuildProjectsBuildsListRequest: + properties: + - filter + - pageSize + - pageToken + - parent + - projectId +CloudbuildProjectsGithubEnterpriseConfigsCreateRequest: + properties: + - gheConfigId + - gitHubEnterpriseConfig + - parent + - projectId +CloudbuildProjectsGithubEnterpriseConfigsDeleteRequest: + properties: + - configId + - name + - projectId +CloudbuildProjectsGithubEnterpriseConfigsGetRequest: + properties: + - configId + - name + - projectId +CloudbuildProjectsGithubEnterpriseConfigsListRequest: + properties: + - parent + - projectId +CloudbuildProjectsGithubEnterpriseConfigsPatchRequest: + properties: + - gitHubEnterpriseConfig + - name + - updateMask +CloudbuildProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryRequest: + properties: + - addBitbucketServerConnectedRepositoryRequest + - config +CloudbuildProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateRequest: + properties: + - batchCreateBitbucketServerConnectedRepositoriesRequest + - parent +CloudbuildProjectsLocationsBitbucketServerConfigsCreateRequest: + properties: + - bitbucketServerConfig + - bitbucketServerConfigId + - parent +CloudbuildProjectsLocationsBitbucketServerConfigsDeleteRequest: + properties: + - name +CloudbuildProjectsLocationsBitbucketServerConfigsGetRequest: + properties: + - name +CloudbuildProjectsLocationsBitbucketServerConfigsListRequest: + properties: + - pageSize + - pageToken + - parent +CloudbuildProjectsLocationsBitbucketServerConfigsPatchRequest: + properties: + - bitbucketServerConfig + - name + - updateMask +CloudbuildProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryRequest: + properties: + - config + - removeBitbucketServerConnectedRepositoryRequest +CloudbuildProjectsLocationsBitbucketServerConfigsReposListRequest: + properties: + - pageSize + - pageToken + - parent +CloudbuildProjectsLocationsBuildsApproveRequest: + properties: + - approveBuildRequest + - name +CloudbuildProjectsLocationsBuildsCreateRequest: + properties: + - build + - parent + - projectId +CloudbuildProjectsLocationsBuildsGetRequest: + properties: + - id + - name + - projectId +CloudbuildProjectsLocationsBuildsListRequest: + properties: + - filter + - pageSize + - pageToken + - parent + - projectId +CloudbuildProjectsLocationsGithubEnterpriseConfigsCreateRequest: + properties: + - gheConfigId + - gitHubEnterpriseConfig + - parent + - projectId +CloudbuildProjectsLocationsGithubEnterpriseConfigsDeleteRequest: + properties: + - configId + - name + - projectId +CloudbuildProjectsLocationsGithubEnterpriseConfigsGetRequest: + properties: + - configId + - name + - projectId +CloudbuildProjectsLocationsGithubEnterpriseConfigsListRequest: + properties: + - parent + - projectId +CloudbuildProjectsLocationsGithubEnterpriseConfigsPatchRequest: + properties: + - gitHubEnterpriseConfig + - name + - updateMask +CloudbuildProjectsLocationsOperationsCancelRequest: + properties: + - cancelOperationRequest + - name +CloudbuildProjectsLocationsOperationsGetRequest: + properties: + - name +CloudbuildProjectsLocationsTriggersCreateRequest: + properties: + - buildTrigger + - parent + - projectId +CloudbuildProjectsLocationsTriggersDeleteRequest: + properties: + - name + - projectId + - triggerId +CloudbuildProjectsLocationsTriggersGetRequest: + properties: + - name + - projectId + - triggerId +CloudbuildProjectsLocationsTriggersListRequest: + properties: + - pageSize + - pageToken + - parent + - projectId +CloudbuildProjectsLocationsTriggersPatchRequest: + properties: + - buildTrigger + - projectId + - resourceName + - triggerId +CloudbuildProjectsLocationsTriggersRunRequest: + properties: + - name + - runBuildTriggerRequest +CloudbuildProjectsLocationsTriggersWebhookRequest: + properties: + - httpBody + - name + - projectId + - secret + - trigger +CloudbuildProjectsLocationsWorkerPoolsCreateRequest: + properties: + - parent + - validateOnly + - workerPool + - workerPoolId +CloudbuildProjectsLocationsWorkerPoolsDeleteRequest: + properties: + - allowMissing + - etag + - name + - validateOnly +CloudbuildProjectsLocationsWorkerPoolsGetRequest: + properties: + - name +CloudbuildProjectsLocationsWorkerPoolsListRequest: + properties: + - pageSize + - pageToken + - parent +CloudbuildProjectsLocationsWorkerPoolsPatchRequest: + properties: + - name + - updateMask + - validateOnly + - workerPool +CloudbuildProjectsTriggersCreateRequest: + properties: + - buildTrigger + - parent + - projectId +CloudbuildProjectsTriggersDeleteRequest: + properties: + - name + - projectId + - triggerId +CloudbuildProjectsTriggersGetRequest: + properties: + - name + - projectId + - triggerId +CloudbuildProjectsTriggersListRequest: + properties: + - pageSize + - pageToken + - parent + - projectId +CloudbuildProjectsTriggersPatchRequest: + properties: + - buildTrigger + - projectId + - triggerId +CloudbuildProjectsTriggersRunRequest: + properties: + - name + - projectId + - repoSource + - triggerId +CloudbuildProjectsTriggersWebhookRequest: + properties: + - httpBody + - name + - projectId + - secret + - trigger +CloudbuildV1: + properties: + - BASE_URL + - MESSAGES_MODULE + - MTLS_BASE_URL +CloudbuildWebhookRequest: + properties: + - httpBody + - webhookKey +CloudDLPIT: + methods: + - setUp + - test_deidentification + - test_inspection +Cluster: + properties: + - centroidId + - count + - featureValues +ClusterInfo: + properties: + - centroidId + - clusterRadius + - clusterSize +Clustering: + properties: + - fields +ClusteringMetrics: + properties: + - clusters + - daviesBouldinIndex + - meanSquaredDistance +ClusterMetadata: + methods: + - reset_name + properties: + - cluster_name + - dashboard + - machine_type + - master_url + - num_workers + - project_id + - region + - subnetwork +Clusters: + methods: + - cleanup + - cluster_metadata + - create + - describe + - set_default_cluster + properties: + - DATAPROC_FLINK_VERSION + - DATAPROC_MINIMUM_WORKER_NUM +Coder: + methods: + - as_cloud_object + - as_deterministic_coder + - decode + - decode_nested + - encode + - encode_nested + - estimate_size + - from_runner_api + - from_type_hint + - get_impl + - is_deterministic + - is_kv_coder + - key_coder + - register_structured_urn + - register_urn + - register_urn + - register_urn + - to_runner_api + - to_runner_api_parameter + - to_type_hint + - value_coder +CoderImpl: + methods: + - decode + - decode_all + - decode_from_stream + - decode_nested + - encode + - encode_all + - encode_nested + - encode_to_stream + - estimate_size + - get_estimated_size_and_observables +CoderRegistry: + methods: + - get_coder + - get_custom_type_coder_tuples + - register_coder + - register_fallback_coder + - register_standard_coders + - verify_deterministic +CodersIT: + methods: + - test_coders_output_files_on_small_input + properties: + - EXPECTED_RESULT + - SAMPLE_RECORDS +CoGBKTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +CoGroupByKey: + methods: + - expand +CollectingFn: + methods: + - process + properties: + - BUFFER_STATE + - COUNT_STATE +CombineFn: + methods: + - add_input + - add_inputs + - apply + - compact + - create_accumulator + - default_label + - extract_output + - for_input_type + - from_callable + - get_accumulator_coder + - maybe_from_callable + - merge_accumulators + - setup + - teardown +CombineGlobally: + methods: + - as_singleton_view + - default_label + - display_data + - expand + - from_runner_api_parameter + - with_defaults + - with_fanout + - without_defaults + properties: + - as_view + - fanout + - has_defaults +CombineGloballyTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +CombineOperation: + methods: + - finish + - process + - setup + - teardown +CombinePerKey: + methods: + - default_label + - default_type_hints + - display_data + - expand + - from_runner_api_parameter + - make_fn + - runner_api_requires_keyed_input + - to_runner_api_parameter + - with_hot_key_fanout +CombinePerKeyTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +CombinerWithoutDefaults: + methods: + - with_defaults + - without_defaults +CombineValues: + methods: + - expand + - from_runner_api_parameter + - make_fn + - to_runner_api_parameter +CombineValuesDoFn: + methods: + - default_type_hints + - process + - setup + - teardown +CombineValuesPTransformOverride: + methods: + - get_replacement_transform + - matches +CombiningTriggerDriver: + methods: + - process_elements + - process_timer +CombiningValueRuntimeState: + methods: + - add + - clear + - commit + - finalize + - read +CombiningValueStateSpec: + methods: + - to_runner_api +Command: + methods: + - run +ComparableValue: + methods: + - hydrate +CompleteMultipartUploadRequest: {} +ComplexSchema: + properties: + - array_optional + - id + - name + - optional_array + - optional_map + - timestamp +ComponentIdMap: + methods: + - get_or_assign +ComponentSource: + properties: + - name + - originalTransformOrCollection + - userName +ComponentTransform: + properties: + - name + - originalTransform + - userName +ComposeRequest: + properties: + - destination + - kind + - sourceObjects +CompositeTypeHint: {} +CompositeTypeHintError: {} +CompressedFile: + methods: + - close + - closed + - flush + - read + - readable + - readline + - seek + - seekable + - tell + - write + - writeable +CompressionTypes: + methods: + - detect_compression_type + - is_valid_compression_type + - mime_type + properties: + - AUTO + - BZIP2 + - DEFLATE + - GZIP + - UNCOMPRESSED + - ZSTD +ComputationTopology: + properties: + - computationId + - inputs + - keyRanges + - outputs + - stateFamilies + - systemStageName +ComputedExpression: + methods: + - args + - evaluate_at + - placeholders + - preserves_partition_by + - requires_partition_by +ComputeSessions: + methods: + - expand +ComputeTopSessions: + methods: + - expand +ComputeTopSessionsIT: + methods: + - test_top_wikipedia_sessions_output_files_on_small_input + properties: + - EDITS + - EXPECTED +ConcatPosition: {} +ConcatRangeTracker: + methods: + - fraction_consumed + - global_to_local + - local_to_global + - position_at_fraction + - set_current_position + - start_position + - stop_position + - sub_range_tracker + - try_claim + - try_split +ConcatSource: + methods: + - default_output_coder + - estimate_size + - get_range_tracker + - read + - sources + - split +ConfusionMatrix: + properties: + - confidenceThreshold + - rows +ConnectionProperty: + properties: + - key + - value +ConsoleMetricsPublisher: + methods: + - publish +Const: + methods: + - unwrap + - unwrap_all +ConstantExpression: + methods: + - args + - evaluate_at + - placeholders + - preserves_partition_by + - requires_partition_by +ConsumerSet: + methods: + - create + - current_element_progress + - try_split + - update_counters_batch + - update_counters_finish + - update_counters_start +ConsumerTrackingPipelineVisitor: + methods: + - views + - visit_transform +ContainerSpec: + properties: + - defaultEnvironment + - image + - metadata + - sdkInfo +ControlConnection: + methods: + - abort + - close + - get_req + - push + - push + - push + - set_input +ControlFuture: + methods: + - abort + - get + - is_done + - set +ConvertToPubSubMessage: + methods: + - process +CopyRequest: {} +CorruptMainSessionException: {} +Count: + methods: + - expand +Count1: + methods: + - expand +CountAccumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +CountAndLog: + methods: + - expand +CountCombineFn: + methods: + - add_input + - add_inputs + - create_accumulator + - extract_output + - merge_accumulators +Counter: + methods: + - error + - get + - increment +CounterAggregator: + methods: + - combine + - identity_element + - result +CounterCell: + methods: + - combine + - dec + - get_cumulative + - inc + - reset + - to_runner_api_monitoring_info_impl + - update +CounterFactory: + methods: + - get_counter + - get_counters + - reset +CounterMetadata: + properties: + - description + - kind + - otherUnits + - standardUnits +CounterMetric: {} +CounterName: + properties: + - SYSTEM + - USER +CounterStructuredName: + properties: + - componentStepName + - executionStepName + - inputIndex + - name + - origin + - originalRequestingStepName + - originalStepName + - originNamespace + - portion + - workerId +CounterStructuredNameAndMetadata: + properties: + - metadata + - name +CounterUpdate: + properties: + - boolean + - cumulative + - distribution + - floatingPoint + - floatingPointList + - floatingPointMean + - integer + - integerGauge + - integerList + - integerMean + - internal + - nameAndKind + - shortId + - stringList + - structuredNameAndMetadata +CountingSource: + methods: + - estimate_size + - get_range_tracker + - read + - split +CountLimiter: + methods: + - is_triggered + - update +CountMessages: + methods: + - process + properties: + - LABEL +CountPerElementTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +CountWords: + methods: + - expand +CPUTime: + properties: + - rate + - timestamp + - totalMs +Create: + methods: + - apply +CreateBitbucketServerConfigOperationMetadata: + properties: + - bitbucketServerConfig + - completeTime + - createTime +CreateBitbucketServerConnectedRepositoryRequest: + properties: + - bitbucketServerConnectedRepository + - parent +CreateCatalogItem: + methods: + - expand +CreateDisposition: + methods: + - VerifyParam + properties: + - CREATE_IF_NEEDED + - CREATE_NEVER +CreateFolderFn: + methods: + - process +CreateGitHubEnterpriseConfigOperationMetadata: + properties: + - completeTime + - createTime + - githubEnterpriseConfig +CreateGitLabConfigOperationMetadata: + properties: + - completeTime + - createTime + - gitlabConfig +CreateGrid: + methods: + - expand +CreateJobFromTemplateRequest: + properties: + - environment + - gcsPath + - jobName + - location + - parameters +CreatePTransformOverride: + methods: + - get_replacement_transform_for_applied_ptransform + - matches +CreateTransportData: + methods: + - process +CreateWorkerPoolOperationMetadata: + properties: + - completeTime + - createTime + - workerPool +CrossLanguageKafkaIO: + methods: + - build_read_pipeline + - build_write_pipeline + - run_xlang_kafkaio +CrossLanguageOptions: {} +CrossLanguageTestPipelines: + methods: + - run_cogroup_by_key + - run_combine_globally + - run_combine_per_key + - run_flatten + - run_group_by_key + - run_multi_input_output_with_sideinput + - run_partition + - run_prefix +CsvOptions: + properties: + - allowJaggedRows + - allowQuotedNewlines + - encoding + - fieldDelimiter + - quote + - skipLeadingRows +CustomClass: {} +CustomCoder: + methods: + - decode + - encode + - is_deterministic +CustomCommands: + methods: + - finalize_options + - initialize_options + - run + - RunCustomCommand +CustomMergingWindowFn: + methods: + - assign + - get_window_coder + - merge +CustomPTransformIT: + methods: + - test_custom_ptransform_output_files_on_small_input + properties: + - EXPECTED_RESULT + - WORDS +CustomPytorchModelHandlerKeyedTensor: + methods: + - load_model +CustomSklearnModelHandlerNumpy: + methods: + - batch_elements_kwargs + - run_inference +CustomSourceLocation: + properties: + - stateful +CustomTimestampingFixedWindowsWindowFn: + methods: + - get_transformed_output_time +DaskBagOp: + methods: + - apply + - transform + properties: + - applied +DaskOptions: {} +DaskRunner: + methods: + - is_fnapi_compatible + - run_pipeline + - to_dask_bag_visitor +DaskRunnerResult: + methods: + - cancel + - metrics + - wait_until_finish + properties: + - client + - futures +DataChannel: + methods: + - close + - input_elements + - output_stream + - output_timer_stream +DataChannelFactory: + methods: + - close + - create_data_channel + - create_data_channel_from_url +DataclassBasedPayloadBuilder: {} +DataDiskAssignment: + properties: + - dataDisks + - vmInstance +DataflowApplicationClient: + methods: + - create_job + - create_job_description + - get_job + - get_job_metrics + - job_id_for_name + - list_messages + - modify_job_state + - stage_file + - submit_job_description +DataflowBeamJob: + methods: + - cancel +DataflowDistributionCounter: + methods: + - add_input + - add_input_n + - calculate_bucket_index + - extract_output + - merge + - translate_to_histogram + properties: + - BUCKET_PER_TEN + - MAX_BUCKET_SIZE +DataflowDistributionCounterFn: {} +DataflowJobAlreadyExistsError: {} +DataflowMetrics: + methods: + - all_metrics + - query +DataflowOptionsForm: + methods: + - additional_options + - display_actions +DataflowPipelineResult: + methods: + - api_jobstate_to_pipeline_state + - cancel + - has_job + - is_in_terminal_state + - job_id + - metrics + - monitoring_infos + - state + - wait_until_finish +DataflowProjectsDeleteSnapshotsRequest: + properties: + - location + - projectId + - snapshotId +DataflowProjectsJobsAggregatedRequest: + properties: + - filter + - location + - pageSize + - pageToken + - projectId + - view +DataflowProjectsJobsCreateRequest: + properties: + - job + - location + - projectId + - replaceJobId + - view +DataflowProjectsJobsDebugGetConfigRequest: + properties: + - getDebugConfigRequest + - jobId + - projectId +DataflowProjectsJobsDebugSendCaptureRequest: + properties: + - jobId + - projectId + - sendDebugCaptureRequest +DataflowProjectsJobsGetMetricsRequest: + properties: + - jobId + - location + - projectId + - startTime +DataflowProjectsJobsGetRequest: + properties: + - jobId + - location + - projectId + - view +DataflowProjectsJobsListRequest: + properties: + - filter + - location + - pageSize + - pageToken + - projectId + - view +DataflowProjectsJobsMessagesListRequest: + properties: + - endTime + - jobId + - location + - minimumImportance + - pageSize + - pageToken + - projectId + - startTime +DataflowProjectsJobsSnapshotRequest: + properties: + - jobId + - projectId + - snapshotJobRequest +DataflowProjectsJobsUpdateRequest: + properties: + - job + - jobId + - location + - projectId +DataflowProjectsJobsWorkItemsLeaseRequest: + properties: + - jobId + - leaseWorkItemRequest + - projectId +DataflowProjectsJobsWorkItemsReportStatusRequest: + properties: + - jobId + - projectId + - reportWorkItemStatusRequest +DataflowProjectsLocationsFlexTemplatesLaunchRequest: + properties: + - launchFlexTemplateRequest + - location + - projectId +DataflowProjectsLocationsJobsCreateRequest: + properties: + - job + - location + - projectId + - replaceJobId + - view +DataflowProjectsLocationsJobsDebugGetConfigRequest: + properties: + - getDebugConfigRequest + - jobId + - location + - projectId +DataflowProjectsLocationsJobsDebugSendCaptureRequest: + properties: + - jobId + - location + - projectId + - sendDebugCaptureRequest +DataflowProjectsLocationsJobsGetExecutionDetailsRequest: + properties: + - jobId + - location + - pageSize + - pageToken + - projectId +DataflowProjectsLocationsJobsGetMetricsRequest: + properties: + - jobId + - location + - projectId + - startTime +DataflowProjectsLocationsJobsGetRequest: + properties: + - jobId + - location + - projectId + - view +DataflowProjectsLocationsJobsListRequest: + properties: + - filter + - location + - pageSize + - pageToken + - projectId + - view +DataflowProjectsLocationsJobsMessagesListRequest: + properties: + - endTime + - jobId + - location + - minimumImportance + - pageSize + - pageToken + - projectId + - startTime +DataflowProjectsLocationsJobsSnapshotRequest: + properties: + - jobId + - location + - projectId + - snapshotJobRequest +DataflowProjectsLocationsJobsSnapshotsListRequest: + properties: + - jobId + - location + - projectId +DataflowProjectsLocationsJobsStagesGetExecutionDetailsRequest: + properties: + - endTime + - jobId + - location + - pageSize + - pageToken + - projectId + - stageId + - startTime +DataflowProjectsLocationsJobsUpdateRequest: + properties: + - job + - jobId + - location + - projectId +DataflowProjectsLocationsJobsWorkItemsLeaseRequest: + properties: + - jobId + - leaseWorkItemRequest + - location + - projectId +DataflowProjectsLocationsJobsWorkItemsReportStatusRequest: + properties: + - jobId + - location + - projectId + - reportWorkItemStatusRequest +DataflowProjectsLocationsSnapshotsDeleteRequest: + properties: + - location + - projectId + - snapshotId +DataflowProjectsLocationsSnapshotsGetRequest: + properties: + - location + - projectId + - snapshotId +DataflowProjectsLocationsSnapshotsListRequest: + properties: + - jobId + - location + - projectId +DataflowProjectsLocationsSqlValidateRequest: + properties: + - location + - projectId + - query +DataflowProjectsLocationsTemplatesCreateRequest: + properties: + - createJobFromTemplateRequest + - location + - projectId +DataflowProjectsLocationsTemplatesGetRequest: + properties: + - gcsPath + - location + - projectId + - view +DataflowProjectsLocationsTemplatesLaunchRequest: + properties: + - dynamicTemplate_gcsPath + - dynamicTemplate_stagingLocation + - gcsPath + - launchTemplateParameters + - location + - projectId + - validateOnly +DataflowProjectsLocationsWorkerMessagesRequest: + properties: + - location + - projectId + - sendWorkerMessagesRequest +DataflowProjectsSnapshotsGetRequest: + properties: + - location + - projectId + - snapshotId +DataflowProjectsSnapshotsListRequest: + properties: + - jobId + - location + - projectId +DataflowProjectsTemplatesCreateRequest: + properties: + - createJobFromTemplateRequest + - projectId +DataflowProjectsTemplatesGetRequest: + properties: + - gcsPath + - location + - projectId + - view +DataflowProjectsTemplatesLaunchRequest: + properties: + - dynamicTemplate_gcsPath + - dynamicTemplate_stagingLocation + - gcsPath + - launchTemplateParameters + - location + - projectId + - validateOnly +DataflowProjectsWorkerMessagesRequest: + properties: + - projectId + - sendWorkerMessagesRequest +DataflowRunner: + methods: + - add_pcoll_with_auto_sharding + - apply + - apply_GroupByKey + - byte_array_to_json_string + - combinefn_visitor + - deserialize_windowing_strategy + - flatten_input_visitor + - get_default_gcp_region + - get_pcoll_with_auto_sharding + - is_fnapi_compatible + - json_string_to_byte_array + - poll_for_job_completion + - run__NativeWrite + - run_CombineValuesReplacement + - run_ExternalTransform + - run_Flatten + - run_GroupByKey + - run_Impulse + - run_ParDo + - run_pipeline + - run_Read + - run_TestStream + - serialize_windowing_strategy + - side_input_visitor +DataflowRuntimeException: {} +DataflowV1b3: + properties: + - BASE_URL + - MESSAGES_MODULE + - MTLS_BASE_URL +DataFrameBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length +DataFrameBatchConverterDropIndex: + methods: + - produce_batch +DataFrameBatchConverterKeepIndex: + methods: + - produce_batch +DataFrameToRowsFn: + methods: + - infer_output_type + - process +DataframeTransform: + methods: + - expand +DataInput: + properties: + - data + - timers +DataInputOperation: + methods: + - finish + - monitoring_infos + - process + - process_encoded + - reset + - setup + - start + - try_split +DataLossReason: + properties: + - CONDITION_NOT_GUARANTEED + - MAY_FINISH + - NO_POTENTIAL_LOSS +DataOutputOperation: + methods: + - finish + - process + - set_output_stream +DataprocClusterManager: + methods: + - cleanup + - cleanup_staging_files + - create_cluster + - create_flink_cluster + - get_cluster_details + - get_master_url_and_dashboard + - get_staging_location + - parse_master_url_and_dashboard + - stage_init_action + - wait_for_cluster_to_provision +Dataset: + properties: + - access + - creationTime + - datasetReference + - defaultEncryptionConfiguration + - defaultPartitionExpirationMs + - defaultTableExpirationMs + - description + - etag + - friendlyName + - id + - kind + - labels + - lastModifiedTime + - location + - satisfiesPZS + - selfLink +DatasetList: + properties: + - datasets + - etag + - kind + - nextPageToken +DatasetReference: + properties: + - datasetId + - projectId +DataSplitResult: + properties: + - evaluationTable + - trainingTable +DatastoreIODetails: + properties: + - namespace + - projectId +DatastoreWordCountIT: + methods: + - test_datastore_wordcount_it + properties: + - DATASTORE_WORDCOUNT_KIND + - EXPECTED_CHECKSUM +DatastoreWriteIT: + methods: + - run_datastore_write + - test_datastore_write_limit + properties: + - LIMIT + - NUM_ENTITIES +DebugOptions: + properties: + - enableHotKeyLogging +DecimalCoder: + methods: + - is_deterministic + - to_type_hint +DecimalCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + properties: + - BIG_INT_CODER_IMPL +DecimalLogicalType: + methods: + - language_type + - representation_type + - to_language_type + - to_representation_type + - urn +Decode: + methods: + - process +DecodePrediction: + methods: + - process +DecodePubSubMessage: + methods: + - process +DecoratorHelpers: + methods: + - test_getcallargs_forhints + - test_getcallargs_forhints_builtins + - test_hint_helper + - test_positional_arg_hints +Deduplicate: + methods: + - expand +DeduplicatePerKey: + methods: + - expand +DefaultEnvironment: + methods: + - from_runner_api_parameter + - to_runner_api_parameter +DefaultRootBundleProvider: + methods: + - get_root_bundles +DefaultTrigger: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api +DeferredBase: + methods: + - wrap +DeferredDataFrame: + methods: + - aggregate + - align + - append + - assign + - axes + - clip + - columns + - columns + - corr + - corrwith + - cov + - dot + - drop_duplicates + - dropna + - dtypes + - duplicated + - eval + - explode + - from_dict + - from_records + - get + - idxmax + - idxmin + - insert + - join + - keys + - melt + - merge + - mode + - nlargest + - nsmallest + - pivot + - pop + - quantile + - query + - rename + - round + - sample + - set_axis + - set_index + - shift + properties: + - add_prefix + - add_suffix + - agg + - all + - any + - applymap + - asof + - count + - cummax + - cummin + - cumprod + - cumsum + - describe + - diff + - first_valid_index + - head + - iat + - info + - interpolate + - isnull + - items + - iteritems + - iterrows + - itertuples + - kurt + - kurtosis + - last_valid_index + - lookup + - mad + - max + - mean + - median + - memory_usage + - min + - notnull + - nunique + - pct_change + - plot + - prod + - rename_axis + - select_dtypes + - sem + - shape + - skew + - stack + - std + - style + - sum + - T + - tail + - take + - to_dict + - to_numpy + - to_records + - to_sparse + - to_string + - transpose + - update + - values + - var +DeferredDataFrameOrSeries: + methods: + - astype + - bool + - drop + - droplevel + - dtype + - empty + - equals + - fillna + - first + - groupby + - iloc + - index + - last + - length + - loc + - mask + - ndim + - pipe + - replace + - reset_index + - size + - sort_index + - sort_values + - swaplevel + - truncate + - tz_localize + - unstack + - where + - xs + properties: + - abs + - at_time + - attrs + - between_time + - combine + - combine_first + - copy + - ewm + - expanding + - hist + - infer_object + - isin + - reindex + - reorder_levels + - resample + - rolling + - sparse + - swapaxes + - to_clipboard + - to_xarray + - transform + - tz_convert +DeferredFrame: {} +DeferredGroupBy: + methods: + - agg + - apply + - dtypes + - filter + - ndim + - pipe + - transform + properties: + - aggregate + - backfill + - bfill + - boxplot + - cumcount + - cummax + - cummin + - cumprod + - cumsum + - diff + - ewm + - expanding + - ffill + - fillna + - first + - groups + - head + - hist + - indices + - last + - nth + - ohlc + - pad + - pct_change + - plot + - resample + - rolling + - shift + - tail + - tshift +DeferredPandasModule: + methods: + - concat + properties: + - array + - bdate_range + - date_range + - describe_option + - factorize + - get_option + - interval_range + - isna + - isnull + - json_normalize + - melt + - melt + - merge + - merge_ordered + - notna + - notna + - notnull + - option_context + - period_range + - pivot + - pivot_table + - show_versions + - test + - timedelta_range + - to_datetime + - to_pickle +DeferredSeries: + methods: + - aggregate + - align + - append + - axes + - cat + - corr + - cov + - dot + - drop_duplicates + - dropna + - dt + - dtype + - duplicated + - explode + - hasnans + - idxmax + - idxmin + - is_unique + - keys + - kurt + - kurtosis + - mean + - mode + - name + - name + - nlargest + - nsmallest + - nunique + - quantile + - repeat + - sample + - set_axis + - skew + - std + - str + - unique + - update + - value_counts + - var + properties: + - add_prefix + - add_suffix + - agg + - all + - any + - apply + - argmax + - argmin + - argsort + - array + - asof + - autocorr + - between + - clip + - count + - cummax + - cummin + - cumprod + - cumsum + - describe + - diff + - dtypes + - factorize + - filter + - first_valid_index + - get + - head + - iat + - info + - interpolate + - is_monotonic + - is_monotonic_decreasing + - is_monotonic_increasing + - isnull + - items + - iteritems + - last_valid_index + - mad + - map + - max + - median + - memory_usage + - min + - nbytes + - notnull + - pct_change + - plot + - pop + - prod + - ravel + - rename + - rename_axis + - round + - searchsorted + - sem + - shape + - shift + - slice_shift + - sum + - T + - tail + - take + - to_dict + - to_frame + - to_list + - to_numpy + - to_string + - tolist + - transpose + - tshift + - values + - view +DefinesGetAndSetState: {} +DefinesGetState: {} +DeleteBatchRequest: {} +DeleteBatchResponse: {} +DeleteBitbucketServerConfigOperationMetadata: + properties: + - bitbucketServerConfig + - completeTime + - createTime +DeleteFromDatastore: {} +DeleteGitHubEnterpriseConfigOperationMetadata: + properties: + - completeTime + - createTime + - githubEnterpriseConfig +DeleteGitLabConfigOperationMetadata: + properties: + - completeTime + - createTime + - gitlabConfig +DeleteRequest: {} +DeleteSnapshotResponse: {} +DeleteTablesFn: + methods: + - process + - start_bundle +DeleteWorkerPoolOperationMetadata: + properties: + - completeTime + - createTime + - workerPool +DependsOnlyOnWindow: + methods: + - merge +DerivedSource: + properties: + - derivationMode + - source +DestinationTableProperties: + properties: + - description + - friendlyName + - labels +DeterministicFastPrimitivesCoder: + methods: + - is_deterministic + - is_kv_coder + - key_coder + - to_type_hint + - value_coder +DeterministicMapCoder: + methods: + - is_deterministic +DeterministicProtoCoder: + methods: + - as_deterministic_coder + - is_deterministic +DeterministicProtoCoderImpl: + methods: + - encode +DicomApiHttpClient: + methods: + - dicomweb_store_instance + - get_session + - qido_search + properties: + - healthcare_base_url + - session +DicomSearch: + methods: + - expand +DictHint: {} +DictToObject: {} +DillCoder: {} +DirectMetric: + methods: + - commit_logical + - commit_physical + - extract_committed + - extract_latest_attempted + - update_physical +DirectMetrics: + methods: + - commit_logical + - commit_physical + - query + - update_physical +DirectOptions: {} +DirectPipelineResult: + methods: + - aggregated_values + - cancel + - metrics + - wait_until_finish +DirectRunnerRetryTests: + methods: + - test_no_partial_writeouts + - test_retry_fork_graph +DirectRuntimeState: + methods: + - for_spec +DirectStepContext: + methods: + - get_keyed_state +DirectUnmergedState: {} +DirectUserStateContext: + methods: + - commit + - get_state + - get_timer + - reset +Disk: + properties: + - diskType + - mountPoint + - sizeGb +DisplayData: + properties: + - boolValue + - durationValue + - floatValue + - int64Value + - javaClassValue + - key + - label + - namespace + - shortStrValue + - strValue + - timestampValue + - url +DisplayDataItem: + methods: + - drop_if_default + - drop_if_none + - get_dict + - is_valid + - should_drop + properties: + - typeDict +DisplayDataItemMatcher: + methods: + - describe_to + properties: + - IGNORED +DisplayManager: + methods: + - start_periodic_update + - stop_periodic_update + - update_display +Distribution: + methods: + - update +DistributionAggregator: + methods: + - combine + - identity_element + - result +DistributionCell: + methods: + - combine + - get_cumulative + - reset + - to_runner_api_monitoring_info_impl + - update +DistributionData: + methods: + - combine + - get_cumulative + - singleton +DistributionInt64Accumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +DistributionInt64Fn: {} +DistributionMatcher: + methods: + - describe_mismatch + - describe_to +DistributionMetric: {} +DistributionResult: + methods: + - count + - max + - mean + - min + - sum +DistributionUpdate: + properties: + - count + - histogram + - max + - min + - sum + - sumOfSquares +DockerEnvironment: + methods: + - default_docker_image + - from_container_image + - from_options + - from_runner_api_parameter + - to_runner_api_parameter +DockerRPCManager: {} +DockerSdkWorkerHandler: + methods: + - host_from_worker + - start_worker + - stop_worker + - watch_container +Document: + methods: + - to_dict +DoFn: + methods: + - default_label + - default_type_hints + - finish_bundle + - from_callable + - get_function_arguments + - get_input_batch_type + - get_output_batch_type + - infer_output_type + - process + - process_batch + - setup + - start_bundle + - teardown + - unbounded_per_element + - yields_batches + - yields_elements + properties: + - BundleFinalizerParam + - DoFnProcessParams + - DynamicTimerTagParam + - ElementParam + - KeyParam + - PaneInfoParam + - RestrictionParam + - SideInputParam + - StateParam + - TimerParam + - TimestampParam + - WatermarkEstimatorParam + - WindowParam +DoFnContext: + methods: + - element + - set_element + - timestamp + - windows +DoFnInfo: + methods: + - create + - from_runner_api + - register_stateless_dofn + - serialized_dofn_data +DoFnInvoker: + methods: + - create_invoker + - invoke_create_tracker + - invoke_create_watermark_estimator + - invoke_finish_bundle + - invoke_initial_restriction + - invoke_process + - invoke_process_batch + - invoke_setup + - invoke_split + - invoke_start_bundle + - invoke_teardown + - invoke_user_timer +DoFnProcessContext: + methods: + - set_element +DoFnRunner: + methods: + - current_element_progress + - finalize + - finish + - process + - process_batch + - process_user_timer + - process_with_sized_restriction + - setup + - start + - teardown + - try_split +DoFnSignature: + methods: + - get_restriction_coder + - get_restriction_provider + - get_watermark_estimator_provider + - has_bundle_finalization + - has_timers + - is_splittable_dofn + - is_stateful_dofn + - is_unbounded_per_element +DoFnState: + methods: + - counter_for +DoOperation: + methods: + - add_timer_info + - finalize_bundle + - finish + - get_batching_preference + - get_input_batch_converter + - get_output_batch_converter + - needs_finalization + - pcollection_count_monitoring_infos + - process + - process_batch + - process_timer + - reset + - setup + - start + - teardown +DoOutputsTuple: {} +DoubleParDo: + methods: + - expand + - to_runner_api_parameter +Downloader: + methods: + - get_range + - size +DownloaderStream: + methods: + - readable + - readall + - readinto + - seek + - seekable + - tell +DriverClassName: + properties: + - DB2 + - MYSQL + - ORACLE + - POSTGRESQL +DummyClass: + methods: + - func +DummyCoder: + methods: + - decode + - encode + - to_type_hint +DummyTestClass1: {} +DummyTestClass2: {} +Duration: + methods: + - from_proto + - of + - to_proto +DurationLimiter: + methods: + - is_triggered +DynamicBatchSizer: + methods: + - get_batch_size + - report_latency +DynamicSourceSplit: + properties: + - primary + - residual +DynamicSplitRequest: {} +DynamicSplitResult: {} +DynamicSplitResultWithPosition: {} +Eggs: {} +EitherDoFn: + methods: + - process + - process_batch +ElementAndRestriction: {} +ElementCounter: + methods: + - increment + - reset + - set_breakpoint +ElementDoFn: + methods: + - process +ElementEvent: + methods: + - to_runner_api +ElementLimiter: + methods: + - update +ElementsToSeriesFn: + methods: + - process_batch +ElementStream: + methods: + - cache_key + - display_id + - is_computed + - is_done + - pcoll + - read + - var +ElementToBatchDoFn: + methods: + - infer_output_type + - process +EmbeddedGrpcWorkerHandler: + methods: + - start_worker + - stop_worker +EmbeddedJobServer: + methods: + - start + - stop +EmbeddedPythonEnvironment: + methods: + - default + - from_options + - from_runner_api_parameter + - to_runner_api_parameter +EmbeddedPythonGrpcEnvironment: + methods: + - default + - from_options + - from_runner_api_parameter + - parse_config + - to_runner_api_parameter +EmbeddedWorkerHandler: + methods: + - data_api_service_descriptor + - done + - logging_api_service_descriptor + - push + - start_worker + - state_api_service_descriptor + - stop_worker +Empty: {} +EmptyMatchTreatment: + methods: + - allow_empty_match + properties: + - ALLOW + - ALLOW_IF_WILDCARD + - DISALLOW +EmptySideInput: {} +EmulatedIterable: {} +EncryptionConfiguration: + properties: + - kmsKeyName +Entity: + methods: + - from_client_entity + - set_properties + - to_client_entity +EntityWrapper: + methods: + - make_entity +Entry: + properties: + - itemCount + - predictedLabel +Environment: + properties: + - clusterManagerApiService + - dataset + - debugOptions + - experiments + - flexResourceSchedulingGoal + - internalExperiments + - sdkPipelineOptions + - serviceAccountEmail + - serviceKmsKeyName + - serviceOptions + - shuffleMode + - tempStoragePrefix + - userAgent + - version + - workerPools + - workerRegion + - workerZone +EOL: + properties: + - CRLF + - CUSTOM_DELIMITER + - LF + - LF_WITH_NOTHING_AT_LAST_LINE + - MIXED +ErrorProto: + properties: + - debugInfo + - location + - message + - reason +EstimatePiIT: + methods: + - test_estimate_pi_output_file +EstimatePiTransform: + methods: + - expand +EvaluationContext: + methods: + - create_bundle + - create_empty_committed_bundle + - extract_all_timers + - get_aggregator_values + - get_execution_context + - get_value_or_block_until_ready + - handle_result + - is_done + - is_root_transform + - metrics + - schedule_pending_unblocked_tasks + - shutdown +EvaluationMetrics: + properties: + - arimaForecastingMetrics + - binaryClassificationMetrics + - clusteringMetrics + - multiClassClassificationMetrics + - rankingMetrics + - regressionMetrics +Event: + methods: + - from_runner_api + - to_runner_api +EventRecorder: + methods: + - cleanup + - events + - record +EventsReader: + methods: + - read_multiple +Exec: + methods: + - setUp + - test_method_forwarding_not_windows + - test_method_forwarding_windows +ExecutionContext: {} +ExecutionStageState: + properties: + - currentStateTime + - executionStageName + - executionStageState +ExecutionStageSummary: + properties: + - componentSource + - componentTransform + - id + - inputSource + - kind + - name + - outputSource + - prerequisiteStage +Executor: + methods: + - await_completion + - shutdown + - start +ExpandStrings: + methods: + - process +ExpandStringsProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size + - split +ExpansionAndArtifactRetrievalStub: + methods: + - artifact_service +ExpansionServiceServicer: + methods: + - Expand +ExpectedSplitOutcome: + properties: + - MUST_BE_CONSISTENT_IF_SUCCEEDS + - MUST_FAIL + - MUST_SUCCEED_AND_BE_CONSISTENT +ExpectingSideInputsFn: + methods: + - default_label + - process +ExplainQueryStage: + properties: + - completedParallelInputs + - computeMsAvg + - computeMsMax + - computeRatioAvg + - computeRatioMax + - endMs + - id + - inputStages + - name + - parallelInputs + - readMsAvg + - readMsMax + - readRatioAvg + - readRatioMax + - recordsRead + - recordsWritten + - shuffleOutputBytes + - shuffleOutputBytesSpilled + - slotMs + - startMs + - status + - steps + - waitMsAvg + - waitMsMax + - waitRatioAvg + - waitRatioMax + - writeMsAvg + - writeMsMax + - writeRatioAvg + - writeRatioMax +ExplainQueryStep: + properties: + - kind + - substeps +Explanation: + properties: + - attribution + - featureName +ExplodeWindowsFn: + methods: + - process +ExportCompression: + properties: + - DEFLATE + - GZIP + - NONE + - SNAPPY +Expr: + properties: + - description + - expression + - location + - title +Expression: + methods: + - evaluate_at + - placeholders + - preserves_partition_by + - proxy + - requires_partition_by +ExpressionCache: + methods: + - replace_with_cached +ExtendedProvisionInfo: + methods: + - for_environment +ExternalDataConfiguration: + properties: + - autodetect + - bigtableOptions + - compression + - connectionId + - csvOptions + - googleSheetsOptions + - hivePartitioningOptions + - ignoreUnknownValues + - maxBadRecords + - schema + - sourceFormat + - sourceUris +ExternalEnvironment: + methods: + - from_options + - from_runner_api_parameter + - to_runner_api_parameter +ExternalJobServer: + methods: + - start + - stop +ExternalTransform: + methods: + - default_label + - expand + - get_local_namespace + - outer_namespace + - replace_named_inputs + - replace_named_outputs + - service + - to_runner_api_transform + - with_output_types +ExternalTransformFinder: + methods: + - contains_external_transforms + - enter_composite_transform + - visit_transform +ExternalTransformIT: + methods: + - test_job_python_from_python_it +ExternalWorkerHandler: + methods: + - host_from_worker + - start_worker + - stop_worker +ExtraAssertionsMixin: + methods: + - assertUnhashableCountEqual +ExtractAndSumScore: + methods: + - expand +ExtractHtmlTitleDoFn: + methods: + - process +ExtractHtmlTitleTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +ExtractInferences: + methods: + - process +ExtractUserAndTimestampDoFn: + methods: + - process +FailedLocation: + properties: + - name +FailureInfo: + properties: + - detail + - type +FakeApiCall: {} +FakeBatch: + methods: + - begin + - commit + - delete + - put +FakeBatchApiRequest: + methods: + - Add + - Execute +FakeClock: + methods: + - time_ns +FakeDeterministicFastPrimitivesCoder: + methods: + - is_deterministic +FakeDownloader: + methods: + - get_range + - size +FakeFile: + methods: + - get_metadata +FakeGcsBuckets: + methods: + - Get + - get_bucket +FakeGcsClient: {} +FakeGcsObjects: + methods: + - add_file + - Delete + - delete_file + - Get + - get_file + - get_last_generation + - Insert + - List + - Rewrite + properties: + - REWRITE_TOKEN +FakeHdfs: + methods: + - checksum + - delete + - list + - makedirs + - read + - rename + - status + - walk + - write +FakeHdfsError: {} +FakeHttpClient: + methods: + - dicomweb_store_instance + - qido_search +FakeLogger: + methods: + - log +FakeModel: + methods: + - predict +FakeModelHandler: + methods: + - load_model + - run_inference +FakeModelHandlerExpectedInferenceArgs: + methods: + - run_inference + - validate_inference_args +FakeModelHandlerFailsOnInferenceArgs: + methods: + - run_inference +FakeModelHandlerNeedsBigBatch: + methods: + - batch_elements_kwargs + - run_inference +FakeMutation: + methods: + - ByteSize +FakeNumpyModelDictOut: + methods: + - predict +FakePandasModelDictOut: + methods: + - predict +FakePandasObject: {} +FakeS3Client: + methods: + - add_file + - complete_multipart_upload + - copy + - create_multipart_upload + - delete + - delete_batch + - delete_file + - get_file + - get_object_metadata + - get_range + - list + - upload_part +FakeSource: + methods: + - reader +FakeSourceReader: + methods: + - returns_windowed_values +FakeUnboundedSource: + methods: + - is_bounded + - reader +FakeUploader: + methods: + - finish + - last_error + - put +FastavroIT: + methods: + - setUp + - test_avro_it + properties: + - SCHEMA_STRING +FastCoder: + methods: + - decode + - encode + - estimate_size +FastCoders: + methods: + - test_using_fast_impl +FastPrimitivesCoder: + methods: + - as_cloud_object + - as_deterministic_coder + - is_deterministic + - is_kv_coder + - key_coder + - to_type_hint + - value_coder +FastPrimitivesCoderImpl: + methods: + - decode_from_stream + - decode_type + - encode_special_deterministic + - encode_to_stream + - encode_type + - get_estimated_size_and_observables + - register_iterable_like_type +FeatureValue: + properties: + - categoricalValue + - featureColumn + - numericalValue +FibTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +FieldNames: + properties: + - AUCTION + - BIDDER + - CATEGORY + - CITY + - CREDIT_CARD + - DATE_TIME + - DESCRIPTION + - EMAIL_ADDRESS + - EXPIRES + - EXTRA + - ID + - INITIAL_BID + - ITEM_NAME + - NAME + - PRICE + - RESERVE + - SELLER + - STATE +FileBasedCacheManager: + methods: + - cleanup + - clear + - exists + - load_pcoder + - read + - save_pcoder + - sink + - size + - source + - write +FileBasedIOTestOptions: {} +FileBasedSink: + methods: + - close + - display_data + - finalize_write + - initialize_write + - open + - open_writer + - pre_finalize + - write_encoded_record + - write_record +FileBasedSinkWriter: + methods: + - at_capacity + - close + - write +FileBasedSource: + methods: + - display_data + - estimate_size + - get_range_tracker + - open_file + - read + - read_records + - split + - splittable + properties: + - MIN_FRACTION_OF_FILES_TO_STAT + - MIN_NUMBER_OF_FILES_TO_STAT +FileChecksumMatcher: + methods: + - describe_mismatch + - describe_to +FileFormat: + properties: + - AVRO + - CSV + - JSON +FileHashes: + properties: + - fileHash +FileIODetails: + properties: + - filePattern +FileMetadata: {} +FileRecordsBuilder: + methods: + - add_element + - advance_processing_time + - advance_watermark + - build +FileResult: {} +FileSink: + methods: + - create_metadata + - flush + - open + - write +FileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - match + - match_files + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split + - translate_pattern + properties: + - CHUNK_SIZE +FileSystems: + methods: + - checksum + - copy + - create + - delete + - exists + - get_chunk_size + - get_filesystem + - get_scheme + - join + - last_updated + - match + - mkdirs + - open + - rename + - set_options + - split + properties: + - URI_SCHEMA_PATTERN +FilterLessThanTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +FilterTextFn: + methods: + - process +FinishCombine: + methods: + - default_type_hints + - process + - setup + - teardown +FirstOf: + methods: + - from_type_hint +FixedBytes: + methods: + - argument + - argument_type + - language_type + - to_language_type + - urn +FixedPrecisionDecimalLogicalType: + methods: + - argument + - argument_type + - language_type + - representation_type + - to_language_type + - to_representation_type + - urn +FixedString: + methods: + - argument + - argument_type + - language_type + - to_language_type + - urn +FixedWindows: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + - to_runner_api_parameter +Flatten: + methods: + - apply +FlattenAndDouble: + methods: + - expand +FlattenAndTriple: + methods: + - expand +FlattenInstruction: + properties: + - inputs +FlattenOperation: + methods: + - process +FlattenTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +FlexTemplateRuntimeEnvironment: + properties: + - additionalExperiments + - additionalUserLabels + - autoscalingAlgorithm + - diskSizeGb + - dumpHeapOnOom + - enableStreamingEngine + - flexrsGoal + - ipConfiguration + - kmsKeyName + - launcherMachineType + - machineType + - maxWorkers + - network + - numWorkers + - saveHeapDumpsToGcsPath + - sdkContainerImage + - serviceAccountEmail + - stagingLocation + - subnetwork + - tempLocation + - workerRegion + - workerZone + - zone +FlinkBeamJob: + methods: + - cancel + - delete + - delete_jar + - get + - get_message_stream + - get_metrics + - get_state + - get_state_stream + - post + - request + - run +FlinkJarJobServer: + methods: + - java_arguments + - path_to_jar +FlinkRunner: + methods: + - add_http_scheme + - create_job_service_handle + - default_job_server + - run_pipeline +FlinkRunnerOptions: + properties: + - PUBLISHED_FLINK_VERSIONS +FlinkRunnerTestOptimized: + methods: + - create_options + - test_expand_kafka_read + - test_expand_kafka_write + - test_external_transform + - test_pack_combiners + - test_sql +FlinkRunnerTestStreaming: + methods: + - create_options + - setUp + - test_callbacks_with_exception + - test_register_finalizations +FlinkStreamingImpulseSource: + methods: + - expand + - from_runner_api_parameter + - get_windowing + - infer_output_type + - set_interval_ms + - set_message_count + - to_runner_api_parameter + properties: + - config + - URN +FlinkUberJarJobServer: + methods: + - create_beam_job + - executable_jar + - flink_version + - GetJobMetrics + - start + - stop +FloatCoder: + methods: + - is_deterministic + - to_type_hint +FloatCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +FloatingPointList: + properties: + - elements +FloatingPointMean: + properties: + - count + - sum +FnApiLogRecordHandler: + methods: + - close + - connect + - emit + - map_log_level +FnApiMetrics: + methods: + - monitoring_infos + - query +FnApiRunner: + methods: + - create_stages + - embed_default_docker_image + - get_cache_token_generator + - maybe_profile + - run_pipeline + - run_stages + - run_via_runner_api + - supported_requirements + properties: + - NUM_FUSED_STAGES_COUNTER +FnApiRunnerExecutionContext: + methods: + - bundle_manager_for + - commit_side_inputs_to_state + - next_uid + - setup + - state_servicer +FnApiRunnerTestWithBundleRepeat: + methods: + - create_pipeline + - test_register_finalizations +FnApiRunnerTestWithBundleRepeatAndMultiWorkers: + methods: + - create_pipeline + - test_draining_sdf_with_sdf_initiated_checkpointing + - test_metrics + - test_register_finalizations + - test_sdf_with_dofn_as_watermark_estimator + - test_sdf_with_sdf_initiated_checkpointing + - test_sdf_with_watermark_tracking +FnApiRunnerTestWithDisabledCaching: + methods: + - create_pipeline +FnApiRunnerTestWithGrpc: + methods: + - create_pipeline +FnApiRunnerTestWithGrpcAndMultiWorkers: + methods: + - create_pipeline + - test_draining_sdf_with_sdf_initiated_checkpointing + - test_metrics + - test_register_finalizations + - test_sdf_with_dofn_as_watermark_estimator + - test_sdf_with_sdf_initiated_checkpointing + - test_sdf_with_watermark_tracking +FnApiRunnerTestWithMultiWorkers: + methods: + - create_pipeline + - test_draining_sdf_with_sdf_initiated_checkpointing + - test_metrics + - test_register_finalizations + - test_sdf_with_dofn_as_watermark_estimator + - test_sdf_with_sdf_initiated_checkpointing + - test_sdf_with_watermark_tracking +FnApiUserStateContext: + methods: + - add_timer_info + - commit + - get_state + - get_timer + - reset +FnApiWorkerStatusHandler: + methods: + - close + - generate_status_response +FnRunnerStatefulTriggerContext: + methods: + - add_state + - clear_state + - clear_timer + - for_window + - get_current_time + - get_state + - merge_windows + - set_timer + - windows_to_elements_map +FormatDoFn: + methods: + - process +FormatOutputDoFn: + methods: + - process +FormatToQido: + methods: + - expand +FrameState: + methods: + - closure_type + - const_type + - copy + - get_closure + - get_global + - get_name +FrozenSetHint: {} +FullyQualifiedNamedTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter + - with_filter +FuzzedExponentialIntervals: {} +GameStatsIT: + methods: + - setUp + - test_game_stats_it + properties: + - DEFAULT_EXPECTED_CHECKSUM + - DEFAULT_INPUT_COUNT + - INPUT_EVENT + - INPUT_SUB + - INPUT_TOPIC + - OUTPUT_DATASET + - OUTPUT_TABLE_SESSIONS + - OUTPUT_TABLE_TEAMS + - WAIT_UNTIL_FINISH_DURATION +Gauge: + methods: + - set +GaugeAggregator: + methods: + - combine + - identity_element + - result +GaugeCell: + methods: + - combine + - get_cumulative + - reset + - set + - to_runner_api_monitoring_info_impl + - update +GaugeData: + methods: + - combine + - get_cumulative + - singleton +GaugeResult: + methods: + - timestamp + - value +GBKTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +GcpTestIOError: {} +GCSFileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split + properties: + - CHUNK_SIZE + - GCS_PREFIX +GcsIO: + methods: + - checksum + - copy + - copy_batch + - copytree + - create_bucket + - delete + - delete_batch + - exists + - get_bucket + - get_project_number + - kms_key + - last_updated + - list_files + - list_prefix + - open + - rename + - size +GcsIOError: {} +GcsIOOverrides: + methods: + - retry_func +GeneralPurposeConsumerSet: + methods: + - flush + - receive + - receive_batch + properties: + - MAX_BATCH_SIZE +GeneralTriggerDriver: + methods: + - process_elements + - process_timer + properties: + - ELEMENTS + - INDEX + - NONSPECULATIVE_INDEX + - TOMBSTONE +GeneralTriggerManagerDoFn: + methods: + - process + - processing_time_trigger + - watermark_trigger + properties: + - FINISHED_WINDOWS + - KNOWN_WINDOWS + - LAST_KNOWN_TIME + - LAST_KNOWN_WATERMARK + - PROCESSING_TIME_TIMER + - WATERMARK_TIMER + - WINDOW_ELEMENT_PAIRS + - WINDOW_TAG_VALUES +GeneratedClassRowTypeConstraint: {} +GenerateDocs: + methods: + - process +GenerateSequence: + properties: + - URN +GenerateTestRows: + methods: + - expand +GeneratorHint: {} +GeneratorWrapper: + properties: + - next +GenericMergingWindowFn: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + - make_process_bundle_descriptor + - merge + - payload + - uid + - worker_handle + properties: + - FROM_SDK_TRANSFORM + - TO_SDK_TRANSFORM + - URN +GenericNonMergingWindowFn: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + properties: + - URN +GenericRowColumnEncoder: + methods: + - decode_from_stream + - encode_to_stream + - finalize_write + - null_flags +GetDebugConfigRequest: + properties: + - componentId + - location + - workerId +GetDebugConfigResponse: + properties: + - config +GetIamPolicyRequest: + properties: + - options +GetitemConstructor: {} +GetPolicyOptions: + properties: + - requestedPolicyVersion +GetQueryResultsResponse: + properties: + - cacheHit + - errors + - etag + - jobComplete + - jobReference + - kind + - numDmlAffectedRows + - pageToken + - rows + - schema + - totalBytesProcessed + - totalRows +GetRequest: {} +GetServiceAccountResponse: + properties: + - email + - kind +GetTemplateResponse: + properties: + - metadata + - runtimeMetadata + - status + - templateType +GetUpdates: + methods: + - process +GitFileSource: + properties: + - bitbucketServerConfig + - githubEnterpriseConfig + - path + - repoType + - revision + - uri +GitHubEnterpriseConfig: + properties: + - appId + - createTime + - displayName + - hostUrl + - name + - peeredNetwork + - secrets + - sslCa + - webhookKey +GitHubEnterpriseSecrets: + properties: + - oauthClientIdName + - oauthClientIdVersionName + - oauthSecretName + - oauthSecretVersionName + - privateKeyName + - privateKeyVersionName + - webhookSecretName + - webhookSecretVersionName +GitHubEventsConfig: + properties: + - enterpriseConfigResourceName + - installationId + - name + - owner + - pullRequest + - push +GitHubIssueMetaData: + properties: + - change_point + - change_point_timestamp + - issue_number + - issue_timestamp + - issue_url + - metric_name + - test_id + - test_name +GitRepoSource: + properties: + - bitbucketServerConfig + - githubEnterpriseConfig + - ref + - repoType + - uri +GlobalCachingStateHandler: + methods: + - blocking_get + - clear + - done + - extend + - process_instruction_id +GlobalExplanation: + properties: + - classLabel + - explanations +GlobalWindow: + methods: + - start +GlobalWindowCoder: + methods: + - as_cloud_object +GlobalWindows: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + - to_runner_api_parameter + - windowed_batch + - windowed_value + - windowed_value_at_end_of_window +GoogleCloudOptions: + methods: + - validate + properties: + - BIGQUERY_API_SERVICE + - COMPUTE_API_SERVICE + - DATAFLOW_ENDPOINT + - OAUTH_SCOPES + - STORAGE_API_SERVICE +GoogleDevtoolsCloudbuildV2OperationMetadata: + properties: + - apiVersion + - createTime + - endTime + - requestedCancellation + - statusMessage + - target + - verb +GoogleSheetsOptions: + properties: + - range + - skipLeadingRows +GroupBy: + methods: + - aggregate_field + - default_label + - expand + - force_tuple_keys +GroupByKey: + methods: + - apply +GroupingBuffer: + methods: + - append + - clear + - copy + - extend + - partition + - reset + properties: + - cleared +GroupIntoBatches: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +GroupIntoBatchesWithShardedKeyPTransformOverride: + methods: + - get_replacement_transform_for_applied_ptransform + - matches +GRPCChannelFactory: + methods: + - insecure_channel + - secure_channel + properties: + - DEFAULT_OPTIONS +GrpcClientDataChannel: {} +GrpcClientDataChannelFactory: + methods: + - close + - create_data_channel + - create_data_channel_from_url +GrpcServer: + methods: + - close +GrpcStateHandler: + methods: + - append_raw + - clear + - done + - get_raw + - process_instruction_id + - start +GrpcStateHandlerFactory: + methods: + - close + - create_state_handler +GrpcStateServicer: + methods: + - State +GrpcWorkerHandler: + methods: + - artifact_api_service_descriptor + - close + - control_api_service_descriptor + - data_api_service_descriptor + - host_from_worker + - logging_api_service_descriptor + - port_from_worker + - state_api_service_descriptor +HadoopFileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split +HadoopFileSystemOptions: + methods: + - validate +HasDisplayData: + methods: + - display_data +Hash: + properties: + - type + - value +HdfsDownloader: + methods: + - get_range + - size +HdfsUploader: + methods: + - finish + - put +Histogram: + properties: + - bucketCounts + - firstBucketOffset +HistogramAggregator: + methods: + - combine + - identity_element + - result +HistogramCell: + methods: + - combine + - get_cumulative + - reset + - to_runner_api_monitoring_info + - update +HistogramCellFactory: {} +HistogramData: + methods: + - combine + - get_cumulative +HistogramResult: + methods: + - p90 + - p95 + - p99 +HivePartitioningOptions: + properties: + - mode + - requirePartitionFilter + - sourceUriPrefix +HomogeneousWindowedBatch: + methods: + - as_empty_windowed_value + - as_windowed_values + - from_batch_and_windowed_value + - from_windowed_values + - of + - pane_info + - timestamp + - values + - windows + - windows + - with_values +HotKeyDetection: + properties: + - hotKeyAge + - systemName + - userStepName +HourlyTeamScore: + methods: + - expand +HourlyTeamScoreIT: + methods: + - setUp + - test_hourly_team_score_it + - test_hourly_team_score_output_checksum_on_small_input + properties: + - DEFAULT_EXPECTED_CHECKSUM + - DEFAULT_INPUT_FILE + - OUTPUT_DATASET + - OUTPUT_TABLE +HttpBody: + properties: + - contentType + - data + - extensions +HTTPDelivery: + properties: + - uri +HuggingFaceStripBatchingWrapper: + methods: + - forward +IdOrName: {} +IFrameParser: + methods: + - handle_starttag + - srcdocs +ImplicitSchemaPayloadBuilder: {} +ImportCatalogItems: + methods: + - expand +ImportUserEvents: + methods: + - expand +Impulse: + methods: + - expand + - from_runner_api_parameter + - get_windowing + - infer_output_type + - to_runner_api_parameter +ImpulseReadOperation: + methods: + - process +ImpulseSeqGenDoFn: + methods: + - process +ImpulseSeqGenRestrictionProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size + - truncate +Index: + methods: + - check + - is_subpartitioning_of + - partition_fn +IndexableTypeConstraint: {} +IndexAssigningDoFn: + methods: + - process + properties: + - state_param +InefficientExecutionWarning: {} +InfluxDBMetricsPublisher: + methods: + - publish +InfluxDBMetricsPublisherOptions: + methods: + - http_auth_enabled + - validate +InitialPositionInStream: + methods: + - validate_param + properties: + - AT_TIMESTAMP + - LATEST + - TRIM_HORIZON +InlineSecret: + properties: + - envMap + - kmsKeyName +InMemoryCache: + methods: + - cleanup + - clear + - exists + - load_pcoder + - read + - save_pcoder + - sink + - size + - source + - write +InMemoryDataChannel: + methods: + - close + - input_elements + - inverse + - output_stream + - output_timer_stream +InMemoryDataChannelFactory: + methods: + - close + - create_data_channel + - create_data_channel_from_url +InMemoryFileManager: + methods: + - file_reader + - file_writer + - get +InMemoryUnmergedState: + methods: + - add_state + - clear_state + - clear_timer + - copy + - get_and_clear_timers + - get_earliest_hold + - get_global_state + - get_state + - get_timers + - get_window + - set_global_state + - set_timer +InMemoryWriteOperation: + methods: + - process +InputStream: + methods: + - read + - read_all + - read_bigendian_double + - read_bigendian_float + - read_bigendian_int32 + - read_bigendian_int64 + - read_bigendian_uint64 + - read_byte + - read_var_int64 + - size +InspectForDetails: + methods: + - expand +InstructionInput: + properties: + - outputNum + - producerInstructionIndex +InstructionOutput: + properties: + - codec + - name + - onlyCountKeyBytes + - onlyCountValueBytes + - originalName + - systemName +IntegerGauge: + properties: + - timestamp + - value +IntegerList: + properties: + - elements +IntegerMean: + properties: + - count + - sum +InteractiveEnvironment: + methods: + - add_derived_pipeline + - add_user_pipeline + - cleanup + - cleanup_environment + - cleanup_pipeline + - computed_pcollections + - describe_all_recordings + - evict_background_caching_job + - evict_cache_manager + - evict_cached_source_signature + - evict_computed_pcollections + - evict_pipeline_result + - evict_recording_manager + - evict_test_stream_service_controller + - evict_tracked_pipelines + - get_background_caching_job + - get_cache_manager + - get_cached_source_signature + - get_recording_manager + - get_sql_chain + - get_test_stream_service_controller + - import_html_to_head + - inspector + - inspector_with_synthetic + - is_in_ipython + - is_in_notebook + - is_interactive_ready + - is_terminated + - load_jquery_with_datatable + - mark_pcollection_computed + - options + - pipeline_id_to_pipeline + - pipeline_result + - set_background_caching_job + - set_cache_manager + - set_cached_source_signature + - set_pipeline_result + - set_recording_manager + - set_test_stream_service_controller + - track_user_pipelines + - tracked_user_pipelines + - user_pipeline + - watch + - watching +InteractiveEnvironmentInspector: + methods: + - get_cluster_master_url + - get_pcoll_data + - get_val + - inspectable_pipelines + - inspectables + - list_clusters + - list_inspectables +InteractiveOptions: + methods: + - capture_control +InteractivePipelineGraph: + methods: + - update_pcollection_stats +InteractiveRunner: + methods: + - apply + - configure_for_flink + - end_session + - is_fnapi_compatible + - run_pipeline + - set_render_option + - start_session +IntervalWindow: + methods: + - intersects + - union +IntervalWindowCoder: + methods: + - as_cloud_object + - is_deterministic +IntervalWindowCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +IOTypeHints: + methods: + - debug_str + - empty + - from_callable + - has_simple_output_type + - simple_output_type + - strip_iterable + - strip_pcoll + - strip_pcoll_helper + - with_defaults + - with_input_types + - with_input_types_from + - with_output_types + - with_output_types_from + properties: + - input_types + - origin + - output_types +IPythonLogHandler: + methods: + - emit + properties: + - log_template + - logging_to_alert_level_map +Item: {} +IterableCoder: + methods: + - to_type_hint +IterableCoderImpl: {} +IterableHint: {} +IterationResult: + properties: + - arimaResult + - clusterInfos + - durationMs + - evalLoss + - index + - learnRate + - trainingLoss +IteratorHint: {} +JarArtifactManager: + methods: + - close + - file_writer + - zipfile_handle +JavaClassLookupPayloadBuilder: + methods: + - add_builder_method + - build + - with_constructor + - with_constructor_method + properties: + - IGNORED_ARG_FORMAT +JavaExternalTransform: + methods: + - expand +JavaJarExpansionService: {} +JavaJarJobServer: + methods: + - java_arguments + - local_jar + - path_to_beam_jar + - path_to_jar + - subprocess_cmd_and_endpoint +JavaJarJobServerStub: + methods: + - java_arguments + - local_jar + - path_to_jar +JavaJarServer: + methods: + - beam_services + - jar_name + - local_jar + - make_classpath_jar + - path_to_beam_jar + - path_to_maven_jar + - start_process + - stop_process + properties: + - BEAM_GROUP_ID + - JAR_CACHE + - MAVEN_CENTRAL_REPOSITORY +Job: + properties: + - clientRequestId + - createdFromSnapshotId + - createTime + - currentState + - currentStateTime + - environment + - executionInfo + - id + - jobMetadata + - labels + - location + - name + - pipelineDescription + - projectId + - replacedByJobId + - replaceJobId + - requestedState + - satisfiesPzs + - stageStates + - startTime + - steps + - stepsLocation + - tempFiles + - transformNameMapping + - type +JobCancelResponse: + properties: + - job + - kind +JobConfiguration: + properties: + - copy + - dryRun + - extract + - jobTimeoutMs + - jobType + - labels + - load + - query +JobConfigurationExtract: + properties: + - compression + - destinationFormat + - destinationUri + - destinationUris + - fieldDelimiter + - printHeader + - sourceModel + - sourceTable + - useAvroLogicalTypes +JobConfigurationLoad: + properties: + - allowJaggedRows + - allowQuotedNewlines + - autodetect + - clustering + - createDisposition + - decimalTargetTypes + - destinationEncryptionConfiguration + - destinationTable + - destinationTableProperties + - encoding + - fieldDelimiter + - hivePartitioningOptions + - ignoreUnknownValues + - maxBadRecords + - nullMarker + - projectionFields + - quote + - rangePartitioning + - schema + - schemaInline + - schemaInlineFormat + - schemaUpdateOptions + - skipLeadingRows + - sourceFormat + - sourceUris + - timePartitioning + - useAvroLogicalTypes + - writeDisposition +JobConfigurationQuery: + properties: + - allowLargeResults + - clustering + - connectionProperties + - createDisposition + - defaultDataset + - destinationEncryptionConfiguration + - destinationTable + - flattenResults + - maximumBillingTier + - maximumBytesBilled + - parameterMode + - preserveNulls + - priority + - query + - queryParameters + - rangePartitioning + - schemaUpdateOptions + - tableDefinitions + - timePartitioning + - useLegacySql + - useQueryCache + - userDefinedFunctionResources + - writeDisposition +JobConfigurationTableCopy: + properties: + - createDisposition + - destinationEncryptionConfiguration + - destinationExpirationTime + - destinationTable + - operationType + - sourceTable + - sourceTables + - writeDisposition +JobExecutionDetails: + properties: + - nextPageToken + - stages +JobExecutionInfo: + properties: + - stages +JobExecutionStageInfo: + properties: + - stepName +JobList: + properties: + - etag + - jobs + - kind + - nextPageToken +JobLogHandler: + methods: + - emit + properties: + - LOG_LEVEL_MAP +JobLogQueues: + methods: + - append + - cache + - put +JobMessage: + properties: + - id + - messageImportance + - messageText + - time +JobMetadata: + properties: + - bigqueryDetails + - bigTableDetails + - datastoreDetails + - fileDetails + - pubsubDetails + - sdkVersion + - spannerDetails +JobMetrics: + properties: + - metrics + - metricTime +JobReference: + properties: + - jobId + - location + - projectId +JobServer: + methods: + - start + - stop +JobServerOptions: {} +JobServiceHandle: + methods: + - encode_pipeline_options + - get_pipeline_options + - prepare + - run + - stage + - submit +JobStatistics: + properties: + - completionRatio + - creationTime + - endTime + - extract + - load + - numChildJobs + - parentJobId + - query + - quotaDeferments + - reservation_id + - reservationUsage + - rowLevelSecurityStatistics + - scriptStatistics + - startTime + - totalBytesProcessed + - totalSlotMs + - transactionInfoTemplate +JobStatistics2: + properties: + - billingTier + - cacheHit + - ddlAffectedRowAccessPolicyCount + - ddlOperationPerformed + - ddlTargetRoutine + - ddlTargetRowAccessPolicy + - ddlTargetTable + - estimatedBytesProcessed + - modelTraining + - modelTrainingCurrentIteration + - modelTrainingExpectedTotalIteration + - numDmlAffectedRows + - queryPlan + - referencedRoutines + - referencedTables + - reservationUsage + - schema + - statementType + - timeline + - totalBytesBilled + - totalBytesProcessed + - totalBytesProcessedAccuracy + - totalPartitionsProcessed + - totalSlotMs + - undeclaredQueryParameters +JobStatistics3: + properties: + - badRecords + - inputFileBytes + - inputFiles + - outputBytes + - outputRows +JobStatistics4: + properties: + - destinationUriFileCounts + - inputBytes +JobStatus: + properties: + - errorResult + - errors + - state +JoinAuctionBidFn: + methods: + - higher_bid + - process +JoinFn: + methods: + - expiry + - process + properties: + - auction_spec + - AUCTIONS + - PERSON + - PERSON_EXPIRING + - person_spec + - person_timer_spec +JoinIndex: + methods: + - check + - is_subpartitioning_of + - test_partition_fn +JoinPersonAuctionFn: + methods: + - process +JsonCoder: + methods: + - decode + - encode +JsonLogFormatter: + methods: + - format +JsonObject: + properties: + - additionalProperties +JsonRowWriter: + methods: + - close + - closed + - flush + - read + - tell + - writable + - write +JuliaSetTestIT: + methods: + - test_run_example_with_setup_file + properties: + - GRID_SIZE +JustAuctions: + methods: + - expand +JustBids: + methods: + - expand +JustPerson: + methods: + - expand +KafkaIOTestOptions: {} +Key: + methods: + - from_client_key + - to_client_key +KeyedDefaultDict: {} +KeyedModelHandler: + methods: + - batch_elements_kwargs + - get_metrics_namespace + - get_num_bytes + - get_resource_hints + - load_model + - run_inference + - validate_inference_args +KeyedWorkItem: {} +KeyRangeDataDiskAssignment: + properties: + - dataDisk + - end + - start +KeyRangeLocation: + properties: + - dataDisk + - deliveryEndpoint + - deprecatedPersistentDirectory + - end + - start +Keys: + methods: + - expand +KeywordOnlyArgsTests: + methods: + - test_combine_keyword_only_args + - test_do_fn_keyword_only_args + - test_side_input_keyword_only_args +KinesisHelper: + methods: + - create_stream + - delete_stream + - get_first_shard_id + - read_from_stream +KVHint: {} +Largest: + methods: + - default_label +Latest: {} +LatestCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +LaunchFlexTemplateParameter: + properties: + - containerSpec + - containerSpecGcsPath + - environment + - jobName + - launchOptions + - parameters + - transformNameMappings + - update +LaunchFlexTemplateRequest: + properties: + - launchParameter + - validateOnly +LaunchFlexTemplateResponse: + properties: + - job +LaunchTemplateParameters: + properties: + - environment + - jobName + - parameters + - transformNameMapping + - update +LaunchTemplateResponse: + properties: + - job +LeaderBoardIT: + methods: + - setUp + - test_leader_board_it + properties: + - DEFAULT_EXPECTED_CHECKSUM + - DEFAULT_INPUT_COUNT + - INPUT_EVENT + - INPUT_SUB + - INPUT_TOPIC + - OUTPUT_DATASET + - OUTPUT_TABLE_TEAMS + - OUTPUT_TABLE_USERS + - WAIT_UNTIL_FINISH_DURATION +LeaseWorkItemRequest: + properties: + - currentWorkerTime + - location + - requestedLeaseDuration + - unifiedWorkerRequest + - workerCapabilities + - workerId + - workItemTypes +LeaseWorkItemResponse: + properties: + - unifiedWorkerResponse + - workItems +LengthPrefixCoder: + methods: + - as_cloud_object + - estimate_size + - is_deterministic + - value_coder +LengthPrefixCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +LexicographicKeyRangeTracker: + methods: + - fraction_to_position + - position_to_fraction +LiftedCombinePerKey: + methods: + - expand +Limiter: + methods: + - is_triggered +LinearBucket: + methods: + - accumulated_bucket_size + - bucket_index + - bucket_size + - num_buckets + - range_from + - range_to +LinearRegression: + methods: + - forward +LinearRegressionBenchmarkConfig: + properties: + - benchmark + - increment + - num_runs + - starting_point +LineSource: + methods: + - read_records +ListBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch + properties: + - MAX_SAMPLES + - SAMPLE_FRACTION + - SAMPLED_BATCH_SIZE +ListBitbucketServerConfigsResponse: + properties: + - bitbucketServerConfigs + - nextPageToken +ListBitbucketServerRepositoriesResponse: + properties: + - bitbucketServerRepositories + - nextPageToken +ListBuffer: + methods: + - append + - clear + - copy + - extend + - partition + - reset +ListBuildsResponse: + properties: + - builds + - nextPageToken +ListBuildTriggersResponse: + properties: + - nextPageToken + - triggers +ListCoder: + methods: + - to_type_hint +ListCoderImpl: {} +ListGithubEnterpriseConfigsResponse: + properties: + - configs +ListHint: {} +ListJobMessagesResponse: + properties: + - autoscalingEvents + - jobMessages + - nextPageToken +ListJobsResponse: + properties: + - failedLocation + - jobs + - nextPageToken +ListLikeCoder: + methods: + - as_cloud_object + - as_deterministic_coder + - from_type_hint + - is_deterministic + - value_coder +ListModelsResponse: + properties: + - models + - nextPageToken +ListPlusOneDoFn: + methods: + - infer_output_type + - process_batch +ListRequest: {} +ListResponse: {} +ListRoutinesResponse: + properties: + - nextPageToken + - routines +ListRowAccessPoliciesResponse: + properties: + - nextPageToken + - rowAccessPolicies +ListSnapshotsResponse: + properties: + - snapshots +ListWorkerPoolsResponse: + properties: + - nextPageToken + - workerPools +LoadDataframe: + methods: + - process +LoadTestOptions: {} +LocalFileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split +LocalJobServicer: + methods: + - create_beam_job + - get_bind_address + - get_service_address + - GetJobMetrics + - start_grpc_server + - stop +LocationMetadata: + properties: + - legacyLocationId +LogElements: + methods: + - expand +LogicalType: + methods: + - argument + - argument_type + - from_runner_api + - from_typing + - language_type + - register_logical_type + - representation_type + - to_language_type + - to_representation_type + - urn +LogicalTypeCoder: + methods: + - is_deterministic + - to_type_hint +LogicalTypeCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +LogicalTypeRegistry: + methods: + - add + - get_logical_type_by_language_type + - get_logical_type_by_urn + - get_urn_by_logial_type +ManualWatermarkEstimator: + methods: + - current_watermark + - default_provider + - get_estimator_state + - observe_timestamp + - set_watermark +Map: + methods: + - apply +MapCoder: + methods: + - as_deterministic_coder + - from_type_hint + - is_deterministic + - to_type_hint +MapCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +MapTask: + properties: + - counterPrefix + - instructions + - stageName + - systemName +MapToUnionTypesTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +Marker: {} +MaskDetectedDetails: + methods: + - expand +MatchAll: + methods: + - expand +MatchContinuously: + methods: + - expand +MatchFiles: + methods: + - expand +MatchResult: {} +MaterializedViewDefinition: + properties: + - enableRefresh + - lastRefreshTime + - query + - refreshIntervalMs +MaxDoubleAccumulator: + methods: + - add_input + - extract_output + - merge +MaxFloatFn: {} +MaxInt64Accumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +MaxInt64Fn: {} +MaybeKeyedModelHandler: + methods: + - batch_elements_kwargs + - get_metrics_namespace + - get_num_bytes + - get_resource_hints + - load_model + - run_inference + - validate_inference_args +Mean: {} +MeanCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - for_input_type + - merge_accumulators +MeanDoubleAccumulator: + methods: + - add_input + - extract_output + - merge +MeanFloatFn: {} +MeanInt64Accumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +MeanInt64Fn: {} +MeasureBytes: + methods: + - process + properties: + - LABEL +MeasureLatency: + methods: + - process + properties: + - LABEL +MeasureTime: + methods: + - finish_bundle + - process + - start_bundle +MemInfo: + properties: + - currentLimitBytes + - currentOoms + - currentRssBytes + - timestamp + - totalGbMs +MergeableStateAdapter: + methods: + - add_state + - clear_state + - clear_timer + - get_state + - get_window + - known_windows + - merge + - set_timer + properties: + - WINDOW_IDS +MethodWrapper: + methods: + - invoke_timer_callback +Metric: + methods: + - as_dict +MetricAggregator: + methods: + - combine + - identity_element + - result +MetricCell: + methods: + - get_cumulative + - reset + - to_runner_api_monitoring_info + - to_runner_api_monitoring_info_impl + - update +MetricCellFactory: {} +MetricKey: {} +MetricLogger: + methods: + - log_metrics + - update +MetricName: + methods: + - fast_name +MetricResult: + methods: + - result +MetricResultMatcher: + methods: + - describe_mismatch + - describe_to +MetricResults: + methods: + - matches + - query + properties: + - COUNTERS + - DISTRIBUTIONS + - GAUGES +Metrics: + methods: + - counter + - histogram +MetricsContainer: + methods: + - get_counter + - get_cumulative + - get_distribution + - get_gauge + - get_metric_cell + - reset + - to_runner_api + - to_runner_api_monitoring_infos +MetricsFilter: + methods: + - names + - namespaces + - steps + - with_metric + - with_name + - with_names + - with_namespace + - with_namespaces + - with_step + - with_steps +MetricShortId: + properties: + - metricIndex + - shortId +MetricsPublisher: + methods: + - publish +MetricsReader: + methods: + - get_counter_metric + - publish_metrics + - publish_values +MetricStructuredName: + properties: + - context + - name + - origin +MetricStructuredNameMatcher: + methods: + - describe_to +MetricUpdate: + properties: + - cumulative + - distribution + - gauge + - internal + - kind + - meanCount + - meanSum + - name + - scalar + - set + - updateTime +MetricUpdateMatcher: + methods: + - describe_to +MetricUpdater: {} +MetricUpdates: {} +MetricUpdateTranslators: + methods: + - translate_boolean + - translate_scalar_counter_float + - translate_scalar_counter_int + - translate_scalar_mean_float + - translate_scalar_mean_int +MicrosInstant: + methods: + - language_type + - representation_type + - to_language_type + - to_representation_type + - urn +MillisInstant: + methods: + - language_type + - representation_type + - to_language_type + - urn +MinDoubleAccumulator: + methods: + - add_input + - extract_output + - merge +MinFloatFn: {} +MinInt64Accumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +MinInt64Fn: {} +MinRamHint: + methods: + - get_merged_value + - parse + properties: + - urn +MismatchedBatchProducingDoFn: + methods: + - process + - process_batch +MismatchedElementProducingDoFn: + methods: + - process + - process_batch +MockBuckets: + methods: + - Get +MockCluster: {} +MockClusterMetadata: + properties: + - master_url +MockException: {} +MockFileIO: + methods: + - readlines +MockFileSystem: + methods: + - open +MockPipelineResult: + methods: + - cancel + - set_state + - state + - wait_until_finish +MockProperty: {} +MockRunners: {} +MockStorageClient: {} +Model: + properties: + - creationTime + - description + - encryptionConfiguration + - etag + - expirationTime + - featureColumns + - friendlyName + - labelColumns + - labels + - lastModifiedTime + - location + - modelReference + - modelType + - trainingRuns +ModelDefinition: + properties: + - modelOptions + - trainingRuns +ModelFileType: + properties: + - JOBLIB + - PICKLE +ModelHandler: + methods: + - batch_elements_kwargs + - get_metrics_namespace + - get_num_bytes + - get_resource_hints + - load_model + - run_inference + - validate_inference_args +ModelReference: + properties: + - datasetId + - modelId + - projectId +ModelWrapper: + methods: + - forward + - mean_pooling +Monitor: {} +MonitorDoFn: + methods: + - finish_bundle + - process + - start_bundle +MonitorSuffix: + properties: + - ELEMENT_COUNTER + - EVENT_TIME + - EVENT_TIMESTAMP +MonotonicWatermarkEstimator: + methods: + - current_watermark + - default_provider + - get_estimator_state + - observe_timestamp +MostBidCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +MountedDataDisk: + properties: + - dataDisk +MovingMeanSellingPriceFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +MovingSum: + methods: + - add + - count + - has_data + - sum +MultiClassClassificationMetrics: + properties: + - aggregateClassificationMetrics + - confusionMatrixList +MultiOutputInfo: + properties: + - tag +MultipleOutputParDo: + methods: + - get_wordcount_results + - test_multiple_output_pardo + properties: + - EXPECTED_SHORT_WORDS + - EXPECTED_WORDS + - SAMPLE_TEXT +MultipleReadFromPubSub: + methods: + - expand +MultiProcessShared: + methods: + - acquire + - release +MutationGroup: + methods: + - info + - primary +MuteRenderer: + methods: + - option + - render_pipeline_graph +MutltiTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +MyDoFn: + methods: + - finish_bundle + - process + - setup + - start_bundle + - teardown +MyDoFnBadAnnotation: + methods: + - process +MyEnum: + properties: + - E1 + - E2 + - E3 +MyFileBasedSink: + methods: + - close + - open + - write_encoded_record +MyRow: + properties: + - timestamp + - value +NameAndKind: + properties: + - kind + - name +NameContext: + methods: + - logging_name + - metrics_name +NamedObject: + methods: + - get_name +NamedTupleBasedPayloadBuilder: {} +NativeReadPTransformOverride: + methods: + - get_replacement_transform + - matches +NativeSink: + methods: + - writer +NativeSinkWriter: + methods: + - takes_windowed_values + - Write +NativeSource: + methods: + - is_bounded + - reader + properties: + - coder +NativeSourceReader: + methods: + - get_progress + - request_dynamic_split + - returns_windowed_values +NaturalLanguageMlTestIT: + methods: + - test_analyzing_syntax +NestedContext: + methods: + - add_state + - clear_state + - clear_timer + - get_current_time + - get_state + - set_timer +NestedInput: + methods: + - process +NestedOutput: + methods: + - process +NestedValueProvider: + methods: + - get + - is_accessible +NetworkConfig: + properties: + - egressOption + - peeredNetwork +NexmarkLauncher: + methods: + - cleanup + - generate_events + - get_performance + - log_performance + - monitor + - parse_args + - publish_performance_influxdb + - read_from_file + - read_from_pubsub + - run + - run_query + properties: + - DONE_DELAY + - PERF_DELAY + - TERMINATE_DELAY + - WARNING_DELAY +NexmarkPerf: + methods: + - has_progress +NoArgumentLogicalType: + methods: + - argument + - argument_type +NoElementOutputAnnotation: + methods: + - process_batch +NoInputAnnotation: + methods: + - process_batch +NonLiquidShardingOffsetRangeTracker: + methods: + - checkpoint + - try_split +NonMergingWindowFn: + methods: + - is_merging + - merge +NonParallelOperation: {} +NoOp: + methods: + - apply +NoopSink: + methods: + - expand +NoOpTransformIOCounter: + methods: + - add_bytes_read + - update_current_step +NoOpWatermarkEstimatorProvider: + methods: + - create_watermark_estimator + - initial_estimator_state +NoOutputTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +NoReturnAnnotation: + methods: + - process_batch +NormalizeEmbedding: + methods: + - process +NoSideInputsCallableWrapperCombineFn: + methods: + - add_input + - add_inputs + - compact + - create_accumulator + - extract_output + - merge_accumulators +NotebookExecutor: + methods: + - cleanup + - execute + - notebook_path_to_execution_id + - output_html_dir + - output_html_paths +Notification: + properties: + - filter + - httpDelivery + - slackDelivery + - smtpDelivery + - structDelivery +Notifications: + properties: + - items + - kind +NotifierConfig: + properties: + - apiVersion + - kind + - metadata + - spec +NotifierMetadata: + properties: + - name + - notifier +NotifierSecret: + properties: + - name + - value +NotifierSecretRef: + properties: + - secretRef +NotifierSpec: + properties: + - notification + - secrets +NullableCoder: + methods: + - as_deterministic_coder + - from_type_hint + - is_deterministic + - to_type_hint +NullableCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size + properties: + - ENCODE_NULL + - ENCODE_PRESENT +NumpyBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch +NumpyTypeHint: {} +Object: + properties: + - acl + - bucket + - cacheControl + - componentCount + - contentDisposition + - contentEncoding + - contentLanguage + - contentType + - crc32c + - customerEncryption + - etag + - eventBasedHold + - generation + - id + - kind + - kmsKeyName + - md5Hash + - mediaLink + - metadata + - metageneration + - name + - owner + - retentionExpirationTime + - selfLink + - size + - storageClass + - temporaryHold + - timeCreated + - timeDeleted + - timeStorageClassUpdated + - updated +ObjectAccessControl: + properties: + - bucket + - domain + - email + - entity + - entityId + - etag + - generation + - id + - kind + - object + - projectTeam + - role + - selfLink +ObjectAccessControls: + properties: + - items + - kind +Objects: + properties: + - items + - kind + - nextPageToken + - prefixes +ObjectThatDoesNotImplementLen: {} +ObservableMixin: + methods: + - notify_observers + - register_observer +OffsetRange: + methods: + - new_tracker + - size + - split + - split_at +OffsetRangeProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size + - split +OffsetRangeProviderWithTruncate: + methods: + - truncate +OffsetRangeTracker: + methods: + - fraction_consumed + - last_attempted_record_start + - last_record_start + - position_at_fraction + - position_to_fraction + - set_current_position + - set_split_points_unclaimed_callback + - split_points + - start_position + - stop_position + - try_claim + - try_split + properties: + - OFFSET_INFINITY +OffsetRestrictionTracker: + methods: + - check_done + - current_progress + - current_restriction + - is_bounded + - start_position + - stop_position + - try_claim + - try_split +OldClassThatDoesNotImplementLen: {} +Operation: + methods: + - add_receiver + - current_element_progress + - execution_time_monitoring_infos + - finalize_bundle + - finish + - get_batching_preference + - get_input_batch_converter + - get_output_batch_converter + - monitoring_infos + - needs_finalization + - output + - pcollection_count_monitoring_infos + - process + - process_batch + - reset + - setup + - start + - str_internal + - teardown + - try_split + - user_monitoring_infos +OperationCounters: + methods: + - do_sample + - restart_sampling + - should_sample + - type_check + - update_collect + - update_from + - update_from_batch +OperationMetadata: + properties: + - apiVersion + - cancelRequested + - createTime + - endTime + - statusDetail + - target + - verb +OptimizeGrid: + methods: + - expand +OptionalHint: {} +OptionalUnionType: + properties: + - unnamed +Options: + methods: + - cache_root + - cache_root + - display_timestamp_format + - display_timestamp_format + - display_timezone + - display_timezone + - enable_recording_replay + - enable_recording_replay + - recordable_sources + - recording_duration + - recording_duration + - recording_size_limit + - recording_size_limit +OptionsContext: + methods: + - augment_options + properties: + - overrides +OptionsEntry: + properties: + - arg_builder + - cls + - default + - help + - label +OptionsForm: + methods: + - add + - additional_options + - display_actions + - display_for_input + - to_options +OrderedPositionRangeTracker: + methods: + - fraction_consumed + - fraction_to_position + - position_at_fraction + - position_to_fraction + - start_position + - stop_position + - try_claim + - try_split + properties: + - UNSTARTED +OrFinally: + methods: + - from_runner_api + - to_runner_api +OutputAtEarliestInputTimestampImpl: + methods: + - assign_output_time + - combine +OutputAtEarliestTransformedInputTimestampImpl: + methods: + - assign_output_time + - combine +OutputAtEndOfWindowImpl: + methods: + - assign_output_time + - combine +OutputAtLatestInputTimestampImpl: + methods: + - assign_output_time + - combine +OutputCheckWrapperDoFn: + methods: + - wrapper +OutputFile: {} +OutputFormat: + properties: + - SERIALIZED_TEST_STREAM_FILE_RECORDS + - TEST_STREAM_EVENTS + - TEST_STREAM_FILE_RECORDS +OutputHandler: + methods: + - handle_process_batch_outputs + - handle_process_outputs +OutputStream: + methods: + - get + - size + - write + - write_bigendian_double + - write_bigendian_float + - write_bigendian_int32 + - write_bigendian_int64 + - write_bigendian_uint64 + - write_byte + - write_var_int64 +OutputTimer: + methods: + - clear + - set +OverrideTypeInference: + methods: + - get_input_batch_type + - get_output_batch_type + - process_batch +Package: + properties: + - location + - name +PairWithRestrictionFn: + methods: + - process + - start_bundle +PairWithTiming: + methods: + - expand + properties: + - URN +PaneInfo: + methods: + - encoded_byte + - from_encoded_byte + - index + - is_first + - is_last + - nonspeculative_index + - timing +PaneInfoCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +PaneInfoEncoding: + properties: + - FIRST + - ONE_INDEX + - TWO_INDICES +PaneInfoTiming: + methods: + - from_string + - to_string + properties: + - EARLY + - LATE + - ON_TIME + - UNKNOWN +ParallelBundleManager: + methods: + - process_bundle +ParallelInstruction: + properties: + - flatten + - name + - originalName + - outputs + - parDo + - partialGroupByKey + - read + - systemName + - write +Parameter: + properties: + - key + - value +ParameterMetadata: + properties: + - customMetadata + - helpText + - isOptional + - label + - name + - paramType + - regexes +ParamWindowedValueCoder: + methods: + - as_cloud_object + - from_runner_api_parameter + - is_deterministic + - to_runner_api_parameter +ParamWindowedValueCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - get_estimated_size_and_observables +ParDo: + methods: + - apply +ParDoInstruction: + properties: + - input + - multiOutputInfos + - numOutputs + - sideInputs + - userFn +ParseEventFn: + methods: + - process +ParseGameEventFn: + methods: + - process +ParseJsonEventFn: + methods: + - process +PartialGroupByKeyCombiningValues: + methods: + - default_type_hints + - finish_bundle + - process + - setup + - start_bundle + - teardown +PartialGroupByKeyInstruction: + properties: + - input + - inputElementCodec + - originalCombineValuesInputStoreName + - originalCombineValuesStepName + - sideInputs + - valueCombiningFn +Partition: + methods: + - expand + - make_fn +PartitionableBuffer: + methods: + - clear + - cleared + - copy + - partition + - reset +PartitionFiles: + methods: + - process + properties: + - MULTIPLE_PARTITIONS_TAG + - SINGLE_PARTITION_TAG +PartitionFn: + methods: + - default_label + - partition_for +Partitioning: + methods: + - is_subpartitioning_of + - partition_fn + - test_partition_fn +PartitioningSession: + methods: + - evaluate +PartitionTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +PassThroughLogicalType: + methods: + - representation_type + - to_language_type + - to_representation_type +PayloadBase: + methods: + - get_payload_from_beam_typehints + - get_payload_from_typing_hints + - test_optional_error + - test_typehints_payload_builder + - test_typing_payload_builder + properties: + - bytes_values + - values +PayloadBuilder: + methods: + - build + - payload +PayloadTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +PBegin: {} +PCollection: + methods: + - from_ + - from_runner_api + - to_runner_api + - windowing +PCollectionVisualization: + methods: + - display + - display_plain_text +PDone: {} +People: + properties: + - partner + - primary +PerformanceTypeCheckVisitor: + methods: + - get_input_type_hints + - get_output_type_hints + - visit_transform +PeriodicImpulse: + methods: + - expand +PeriodicSequence: + methods: + - expand +PeriodicSequenceIT: + methods: + - setUp + - test_periodicsequence_outputs_valid_watermarks_it +PeriodicThread: + methods: + - cancel + - run +PermanentException: {} +Person: + properties: + - CODER +PersonByIdFn: + methods: + - process +PersonCoder: + methods: + - is_deterministic + - to_type_hint +PersonCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +PerWindowInvoker: + methods: + - current_element_progress + - invoke_process + - invoke_process_batch + - try_split +PerWindowTriggerContext: + methods: + - add_state + - clear_state + - clear_timer + - get_current_time + - get_state + - set_timer +PGBKCVOperation: + methods: + - finish + - output_key + - process + - setup + - teardown +PGBKOperation: + methods: + - finish + - flush + - process +PhasedCombineFnExecutor: + methods: + - add_only + - convert_to_accumulator + - extract_only + - full_combine + - merge_only +PickleCoder: + methods: + - as_deterministic_coder + - to_type_hint +PickledDoFnInfo: + methods: + - serialized_dofn_data + - to_runner_api +PickledObject: {} +Pipeline: + methods: + - allow_unsafe_triggers + - apply + - from_runner_api + - merge_compatible_environments + - options + - replace_all + - run + - runner_implemented_transforms + - to_runner_api + - visit +PipelineContext: + methods: + - add_requirement + - coder_id_from_element_type + - default_environment_id + - element_type_from_coder_id + - from_runner_api + - get_environment_id_for_resource_hints + - requirements + - to_runner_api +PipelineDescription: + properties: + - displayData + - executionPipelineStage + - originalPipelineTransform +PipelineError: {} +PipelineFragment: + methods: + - deduce_fragment + - run +PipelineGraph: + methods: + - display_graph + - get_dot +PipelineGraphRenderer: + methods: + - option + - render_pipeline_graph +PipelineInstrument: + methods: + - background_caching_pipeline_proto + - cache_key + - cacheables + - find_cacheables + - has_unbounded_sources + - instrument + - instrumented_pipeline_proto + - original_pipeline_proto + - pcoll_id + - preprocess + - prune_subgraph_for + - runner_pcoll_to_user_pcoll + - user_pipeline +PipelineOptions: + methods: + - display_data + - from_dictionary + - get_all_options + - view_as +PipelineOptionsValidator: + methods: + - is_full_string_match + - is_service_runner + - validate + - validate_cloud_options + - validate_container_prebuilding_options + - validate_environment_options + - validate_gcs_path + - validate_num_workers + - validate_optional_argument_positive + - validate_repeatable_argument_passed_as_list + - validate_sdk_container_image_options + - validate_test_matcher + - validate_worker_region_zone + properties: + - ENDPOINT_PATTERN + - ERR_ENVIRONMENT_CONFIG + - ERR_INVALID_ENVIRONMENT + - ERR_INVALID_GCS_BUCKET + - ERR_INVALID_GCS_OBJECT + - ERR_INVALID_GCS_PATH + - ERR_INVALID_JOB_NAME + - ERR_INVALID_NOT_POSITIVE + - ERR_INVALID_PROJECT_ID + - ERR_INVALID_PROJECT_NUMBER + - ERR_INVALID_TEST_MATCHER_TYPE + - ERR_INVALID_TEST_MATCHER_UNPICKLABLE + - ERR_INVALID_TRANSFORM_NAME_MAPPING + - ERR_MISSING_GCS_PATH + - ERR_MISSING_OPTION + - ERR_MISSING_REQUIRED_ENVIRONMENT_OPTION + - ERR_NUM_WORKERS_TOO_HIGH + - ERR_REPEATABLE_OPTIONS_NOT_SET_AS_LIST + - GCS_BUCKET + - GCS_SCHEME + - GCS_URI + - JOB_PATTERN + - OPTIONAL_ENVIRONMENT_OPTIONS + - OPTIONS + - PROJECT_ID_PATTERN + - PROJECT_NUMBER_PATTERN + - REQUIRED_ENVIRONMENT_OPTIONS +PipelineRenderer: + methods: + - info + - is_leaf + - layout_dot + - page + - page_callback_data + - pcoll_leaf_consumers + - pcoll_leaf_consumers_iter + - render_data + - render_json + - style + - to_dot + - to_dot_iter + - transform_attributes + - transform_node + - transform_to_dot + - update +PipelineResult: + methods: + - cancel + - metrics + - pipeline_state_to_runner_api_state + - runner_api_state_to_pipeline_state + - state + - wait_until_finish +PipelineRunner: + methods: + - apply + - apply_PTransform + - is_fnapi_compatible + - run + - run_async + - run_pipeline + - run_transform + - visit_transforms +PipelineState: + methods: + - is_terminal + properties: + - CANCELLED + - CANCELLING + - DONE + - DRAINED + - DRAINING + - FAILED + - PENDING + - RESOURCE_CLEANING_UP + - RUNNING + - STARTING + - STOPPED + - UNKNOWN + - UNRECOGNIZED + - UPDATED +PipelineStateMatcher: + methods: + - describe_mismatch + - describe_to +PipelineVisitor: + methods: + - enter_composite_transform + - leave_composite_transform + - visit_transform + - visit_value +PipeStream: + methods: + - read + - seek + - tell +PlaceholderExpression: + methods: + - args + - evaluate_at + - placeholders + - preserves_partition_by + - requires_partition_by +Player: {} +PlayerCoder: + methods: + - decode + - encode + - is_deterministic +Point: + properties: + - time + - value +Policy: + properties: + - bindings + - etag + - kind + - resourceId +PoolOption: + properties: + - name +PortableMetrics: + methods: + - query +PortableObject: + methods: + - from_runner_api + - to_runner_api +PortableOptions: + methods: + - add_environment_option + - lookup_environment_option + - validate +PortableRunner: + methods: + - create_job_service + - create_job_service_handle + - default_job_server + - get_proto_pipeline + - run_pipeline +PortableRunnerOptimized: + methods: + - create_options +PortableRunnerOptimizedWithoutFusion: + methods: + - create_options +PortableRunnerTestWithExternalEnv: + methods: + - create_options + - setUpClass + - tearDownClass +PortableRunnerTestWithLocalDocker: + methods: + - create_options +PortableRunnerTestWithSubprocesses: + methods: + - create_options + - test_batch_rebatch_pardos +PortableRunnerTestWithSubprocessesAndMultiWorkers: + methods: + - create_options +Position: + properties: + - byteOffset + - concatPosition + - end + - key + - recordIndex + - shufflePosition +Postprocess: + methods: + - process +PostProcessor: + methods: + - process +PredictUserEvent: + methods: + - expand +PrefetchingSourceSetIterable: + methods: + - add_byte_counter +PrefixTransform: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +Preprocess: + methods: + - process +PrintFn: + methods: + - process +PrivatePoolV1Config: + properties: + - networkConfig + - workerConfig +ProcessAppManifestCallbackOperationMetadata: + properties: + - completeTime + - createTime + - githubEnterpriseConfig +ProcessContinuation: + methods: + - resume +ProcessElements: + methods: + - expand + - new_process_fn +ProcessEnvironment: + methods: + - from_options + - from_runner_api_parameter + - parse_environment_variables + - to_runner_api_parameter +ProcessFn: + methods: + - process + - set_process_element_invoker + - step_context + - step_context +ProcessInferenceToString: + methods: + - process +ProcessingTimeEvent: + methods: + - to_runner_api +ProcessingTimeLimiter: + methods: + - is_triggered + - update +ProcessKeyedElements: + methods: + - expand +ProcessKeyedElementsViaKeyedWorkItems: + methods: + - expand +ProcessKeyedElementsViaKeyedWorkItemsOverride: + methods: + - get_replacement_transform_for_applied_ptransform + - matches +ProducerFn: + methods: + - get_int + - get_string + - process +Profile: + methods: + - default_file_copy_fn + - factory_from_options + properties: + - profile_output + - SORTBY + - stats +ProfilingOptions: {} +ProgressIndicator: + properties: + - spinner_removal_template + - spinner_template +ProgressRequester: + methods: + - run + - stop +ProgressTimeseries: + properties: + - currentProgress + - dataPoints +ProjectList: + properties: + - etag + - kind + - nextPageToken + - projects + - totalItems +ProjectReference: + properties: + - projectId +ProjectToCategoryPriceFn: + methods: + - process +PropertyNames: + properties: + - ALLOWS_SHARDABLE_STATE + - BIGQUERY_CREATE_DISPOSITION + - BIGQUERY_DATASET + - BIGQUERY_EXPORT_FORMAT + - BIGQUERY_FLATTEN_RESULTS + - BIGQUERY_KMS_KEY + - BIGQUERY_PROJECT + - BIGQUERY_QUERY + - BIGQUERY_SCHEMA + - BIGQUERY_TABLE + - BIGQUERY_USE_LEGACY_SQL + - BIGQUERY_WRITE_DISPOSITION + - DISPLAY_DATA + - ELEMENT + - ELEMENTS + - ENCODING + - FILE_NAME_PREFIX + - FILE_NAME_SUFFIX + - FILE_PATTERN + - FORMAT + - IMPULSE_ELEMENT + - INPUTS + - NON_PARALLEL_INPUTS + - NUM_SHARDS + - OUT + - OUTPUT + - OUTPUT_INFO + - OUTPUT_NAME + - PARALLEL_INPUT + - PIPELINE_PROTO_TRANSFORM_ID + - PRESERVES_KEYS + - PUBSUB_ID_LABEL + - PUBSUB_SERIALIZED_ATTRIBUTES_FN + - PUBSUB_SUBSCRIPTION + - PUBSUB_TIMESTAMP_ATTRIBUTE + - PUBSUB_TOPIC + - RESOURCE_HINTS + - RESTRICTION_ENCODING + - SERIALIZED_FN + - SERIALIZED_TEST_STREAM + - SHARD_NAME_TEMPLATE + - SOURCE_STEP_INPUT + - STEP_NAME + - USE_INDEXED_FORMAT + - USER_FN + - USER_NAME + - USES_KEYED_STATE + - VALIDATE_SINK + - VALIDATE_SOURCE + - VALUE + - WINDOWING_STRATEGY +ProperyTestingCoders: + methods: + - test_float_coder + - test_row_coder + - test_string_coder +ProtoCoder: + methods: + - as_deterministic_coder + - from_type_hint + - is_deterministic + - to_type_hint +ProtoCoderImpl: + methods: + - decode + - encode +ProtoPlusCoder: + methods: + - from_type_hint + - is_deterministic + - to_type_hint +ProtoPlusCoderImpl: + methods: + - decode + - encode +ProtoPlusMessageA: + properties: + - field1 + - field2 +ProtoPlusMessageB: + properties: + - field1 +ProtoPlusMessageWithMap: + properties: + - field1 +PTransform: + methods: + - annotations + - default_label + - default_type_hints + - expand + - from_runner_api + - get_resource_hints + - get_windowing + - infer_output_type + - label + - label + - register_urn + - register_urn + - register_urn + - register_urn + - register_urn + - runner_api_requires_keyed_input + - to_runner_api + - to_runner_api_parameter + - to_runner_api_pickled + - type_check_inputs + - type_check_inputs_or_outputs + - type_check_outputs + - with_input_types + - with_output_types + - with_resource_hints + properties: + - pipeline + - side_inputs +PTransformOverride: + methods: + - get_replacement_inputs + - get_replacement_transform + - get_replacement_transform_for_applied_ptransform + - matches +PTransformTestDisplayData: + methods: + - test_filter_anonymous_function + - test_filter_named_function + - test_flatmap_anonymous_function + - test_flatmap_named_function + - test_map_anonymous_function + - test_map_named_function +PTransformWithSideInputs: + methods: + - default_label + - make_fn + - type_check_inputs + - with_input_types +PubSubBigQueryIT: + methods: + - setUp + - tearDown + - test_file_loads + - test_streaming_inserts + properties: + - BIG_QUERY_DATASET_ID + - INPUT_SUB + - INPUT_TOPIC + - SCHEMA + - WAIT_UNTIL_FINISH_DURATION +PubsubConfig: + properties: + - serviceAccountEmail + - state + - subscription + - topic +PubSubIODetails: + properties: + - subscription + - topic +PubsubLocation: + properties: + - dropLateData + - idLabel + - subscription + - timestampLabel + - topic + - trackingSubscription + - withAttributes +PubsubMessage: {} +PubSubMessageMatcher: + methods: + - describe_mismatch + - describe_to +PubsubSnapshotMetadata: + properties: + - expireTime + - snapshotName + - topicName +PubSubSourceDescriptor: + properties: + - id_label + - source + - timestamp_attribute +PullRequestFilter: + properties: + - branch + - commentControl + - invertRegex +PullResponseMessage: {} +PushFilter: + properties: + - branch + - invertRegex + - tag +PValue: + methods: + - apply +PValueCache: + methods: + - cache_output + - clear_pvalue + - get_pvalue + - get_unwindowed_pvalue + - is_cached + - key + - to_cache_key +PValueError: {} +PyarrowArrayBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch +PyarrowBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch +PydotRenderer: + methods: + - option + - render_pipeline_graph +PyPIArtifactRegistry: + methods: + - get_artifacts + - register_artifact +PythonCallable: + methods: + - language_type + - representation_type + - to_language_type + - to_representation_type + - urn +PythonCallableWithSource: + methods: + - default_label + - get_source + - load_from_expression + - load_from_fully_qualified_name + - load_from_script + - load_from_source +PytorchBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch +PyTorchInference: + methods: + - test_torch_run_inference_bert_for_masked_lm + - test_torch_run_inference_coco_maskrcnn_resnet50_fpn + - test_torch_run_inference_imagenet_mobilenetv2 +PytorchLinearRegression: + methods: + - forward + - generate +PytorchLinearRegressionDict: + methods: + - forward +PytorchLinearRegressionKeyedBatchAndExtraInferenceArgs: + methods: + - forward +PytorchModelHandlerKeyedTensor: + methods: + - get_metrics_namespace + - get_num_bytes + - load_model + - run_inference + - validate_inference_args +PytorchModelHandlerTensor: + methods: + - get_metrics_namespace + - get_num_bytes + - load_model + - run_inference + - validate_inference_args +PytorchNoBatchModelHandler: + methods: + - batch_elements_kwargs +PytorchTypeHint: {} +Query: + methods: + - clone +QueryInfo: + properties: + - queryProperty +QueryParameter: + properties: + - name + - parameterType + - parameterValue +QueryParameterType: + properties: + - arrayType + - structTypes + - type +QueryParameterValue: + properties: + - arrayValues + - structValues + - value +QueryRequest: + properties: + - connectionProperties + - defaultDataset + - dryRun + - kind + - labels + - location + - maximumBytesBilled + - maxResults + - parameterMode + - preserveNulls + - query + - queryParameters + - requestId + - timeoutMs + - useLegacySql + - useQueryCache +QueryResponse: + properties: + - cacheHit + - errors + - jobComplete + - jobReference + - kind + - numDmlAffectedRows + - pageToken + - rows + - schema + - totalBytesProcessed + - totalRows +QuerySplitterError: {} +QueryTimelineSample: + properties: + - activeUnits + - completedUnits + - elapsedMs + - pendingUnits + - totalSlotMs +RampupThrottlingFn: + methods: + - process +RandomUniqueKeyFn: + methods: + - process +RangePartitioning: + properties: + - field + - range +RangeSource: + methods: + - estimate_size + - get_range_tracker + - read + - split +RangeTracker: + methods: + - fraction_consumed + - position_at_fraction + - set_current_position + - set_split_points_unclaimed_callback + - split_points + - start_position + - stop_position + - try_claim + - try_split + properties: + - SPLIT_POINTS_UNKNOWN +RankingMetrics: + properties: + - averageRank + - meanAveragePrecision + - meanSquaredError + - normalizedDiscountedCumulativeGain +Read: + methods: + - display_data + - expand + - from_runner_api_parameter + - get_desired_chunk_size + - get_windowing + - to_runner_api_parameter +ReadableFile: + methods: + - open + - read + - read_utf8 +ReadAllBQTests: + methods: + - create_bq_schema + - create_table + - setUpClass + - test_read_queries + properties: + - TABLE_DATA_1 + - TABLE_DATA_2 + - TABLE_DATA_3 +ReadAllFiles: + methods: + - expand +ReadAllFromAvro: + methods: + - expand + properties: + - DEFAULT_DESIRED_BUNDLE_SIZE +ReadAllFromAvroContinuously: + methods: + - expand +ReadAllFromBigQuery: + methods: + - expand + properties: + - COUNTER +ReadAllFromParquet: + methods: + - expand +ReadAllFromParquetBatched: + methods: + - expand + properties: + - DEFAULT_DESIRED_BUNDLE_SIZE +ReadAllFromText: + methods: + - expand + properties: + - DEFAULT_DESIRED_BUNDLE_SIZE +ReadAllFromTextContinuously: + methods: + - expand +ReadAllFromTFRecord: + methods: + - expand +ReadCache: + methods: + - read_cache +ReadDataFromKinesis: + properties: + - URN +ReaderPosition: {} +ReaderProgress: + methods: + - consumed_split_points + - percent_complete + - position + - remaining_split_points + - remaining_time +ReadFiles: + methods: + - process +ReadFilesProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size +ReadFromAvro: + methods: + - display_data + - expand +ReadFromBigQuery: + methods: + - expand + properties: + - COUNTER +ReadFromBigQueryRequest: + methods: + - validate +ReadFromCountingSource: + methods: + - expand +ReadFromDatastore: + methods: + - display_data + - expand +ReadFromDebezium: + methods: + - expand + properties: + - URN +ReadFromJdbc: + properties: + - URN +ReadFromKafka: + properties: + - byte_array_deserializer + - create_time_policy + - log_append_time + - processing_time_policy + - URN_WITH_METADATA + - URN_WITHOUT_METADATA +ReadFromMongoDB: + methods: + - expand +ReadFromParquet: + methods: + - display_data + - expand +ReadFromParquetBatched: + methods: + - display_data + - expand +ReadFromPubSub: + methods: + - expand + properties: + - URN +ReadFromPubSubLite: + methods: + - expand +ReadFromSnowflake: + methods: + - expand + properties: + - URN +ReadFromSpanner: + methods: + - display_data + - expand +ReadFromSpannerSchema: + properties: + - batching + - database_id + - emulator_host + - host + - instance_id + - project_id + - read_timestamp + - schema + - sql + - staleness + - table + - time_unit + - timestamp_bound_mode +ReadFromText: + methods: + - expand +ReadFromTextWithFilename: {} +ReadFromTFRecord: + methods: + - expand +ReadGbqTransformTests: + methods: + - test_bad_schema_public_api_direct_read + - test_ReadGbq_unsupported_param + - test_unsupported_callable +ReadInstruction: + properties: + - source +ReadInteractiveRunnerTests: + methods: + - test_read_in_interactive_runner +ReadMatches: + methods: + - expand +ReadModifyWriteRuntimeState: + methods: + - clear + - commit + - read + - write +ReadModifyWriteStateSpec: + methods: + - to_runner_api +ReadNewTypesTests: + methods: + - create_table + - get_expected_data + - setUpClass + - test_iobase_source + - test_native_source +ReadOperation: + methods: + - start +ReadPTransformOverride: + methods: + - get_replacement_transform_for_applied_ptransform + - matches +ReadTests: + methods: + - create_table + - setUpClass + - test_iobase_source + - test_native_source + - test_table_schema_retrieve + - test_table_schema_retrieve_specifying_only_table + - test_table_schema_retrieve_with_direct_read + properties: + - TABLE_DATA +ReadUsingReadGbqTests: + methods: + - test_ReadGbq + - test_ReadGbq_direct_read + - test_ReadGbq_direct_read_with_project + - test_ReadGbq_export_with_project + - test_ReadGbq_with_computation +ReadUsingStorageApiTests: + methods: + - setUpClass + - tearDownClass + - test_iobase_source + - test_iobase_source_with_column_selection + - test_iobase_source_with_column_selection_and_row_restriction + - test_iobase_source_with_native_datetime + - test_iobase_source_with_query + - test_iobase_source_with_query_and_filters + - test_iobase_source_with_row_restriction + - test_iobase_source_with_very_selective_filters + properties: + - TABLE_DATA +ReadViaPandas: + methods: + - expand +RealClock: + methods: + - time +Receiver: + methods: + - flush + - receive + - receive_batch +ReceiveTriggerWebhookResponse: {} +RecommendationAIIT: + methods: + - tearDownClass + - test_create_catalog_item + - test_create_user_event + - test_predict +Record: + properties: + - age + - height + - name +Recording: + methods: + - cancel + - computed + - describe + - is_computed + - stream + - uncomputed + - wait_until_finish +RecordingManager: + methods: + - cancel + - clear + - describe + - read + - record + - record_pipeline +Recordings: + methods: + - clear + - describe + - record + - stop +RecursiveClass: + properties: + - SELF_TYPE +Regex: + methods: + - all_matches + - find + - find_all + - find_kv + - matches + - matches_kv + - replace_all + - replace_first + - split + properties: + - ALL +RegressionMetrics: + properties: + - meanAbsoluteError + - meanSquaredError + - meanSquaredLogError + - medianAbsoluteError + - rSquared +Reify: + methods: + - process +ReifyWindowsFn: + methods: + - process +RekeyElements: + methods: + - process +RemoveBitbucketServerConnectedRepositoryRequest: + properties: + - connectedRepository +RenderOptions: {} +RenderPipelineResult: + methods: + - monitoring_infos + - wait_until_finish +RenderRunner: + methods: + - run_pipeline +Repeatedly: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api +ReportedParallelism: + properties: + - isInfinite + - value +ReportWorkItemStatusRequest: + properties: + - currentWorkerTime + - location + - unifiedWorkerRequest + - workerId + - workItemStatuses +ReportWorkItemStatusResponse: + properties: + - unifiedWorkerResponse + - workItemServiceStates +RepoSource: + properties: + - branchName + - commitSha + - dir + - invertRegex + - projectId + - repoName + - substitutions + - tagName +Reshuffle: + methods: + - expand + - from_runner_api_parameter + - to_runner_api_parameter +ReshufflePerKey: + methods: + - expand +ResourceHint: + methods: + - get_by_name + - get_by_urn + - get_merged_value + - is_registered + - parse + - register_resource_hint + properties: + - urn +ResourceUtilizationReport: + properties: + - containers + - cpuTime + - memoryInfo +ResourceUtilizationReportResponse: {} +RestrictionProgress: + methods: + - completed_work + - fraction_completed + - fraction_remaining + - remaining_work + - total_work + - with_completed +RestrictionProvider: + methods: + - create_tracker + - initial_restriction + - restriction_coder + - restriction_size + - split + - split_and_size + - truncate +RestrictionTracker: + methods: + - check_done + - current_progress + - current_restriction + - is_bounded + - try_claim + - try_split +RestrictionTrackerView: + methods: + - current_restriction + - defer_remainder + - is_bounded + - try_claim +ResultNames: + properties: + - AUCTION_ID + - BID_COUNT + - BIDDER_ID + - CATEGORY + - CITY + - ID + - IS_LAST + - NAME + - NUM + - PRICE + - RESERVE + - SELLER + - STATE +Results: + properties: + - artifactManifest + - artifactTiming + - buildStepImages + - buildStepOutputs + - images + - numArtifacts +RetryBuildRequest: + properties: + - id + - name + - projectId +RetryStrategy: + methods: + - should_retry + properties: + - RETRY_ALWAYS + - RETRY_NEVER + - RETRY_ON_TRANSIENT_ERROR +ReverseTestStream: + methods: + - expand +RewriteResponse: + properties: + - done + - kind + - objectSize + - resource + - rewriteToken + - totalBytesRewritten +RootBundleProvider: + methods: + - get_root_bundles +RoundTripFn: + methods: + - process +Routine: + properties: + - arguments + - creationTime + - definitionBody + - description + - determinismLevel + - etag + - importedLibraries + - language + - lastModifiedTime + - returnType + - routineReference + - routineType +RoutineReference: + properties: + - datasetId + - projectId + - routineId +Row: + properties: + - actualLabel + - entries +RowAccessPolicy: + properties: + - creationTime + - etag + - filterPredicate + - lastModifiedTime + - rowAccessPolicyReference +RowAccessPolicyReference: + properties: + - datasetId + - policyId + - projectId + - tableId +RowAsDictJsonCoder: + methods: + - decode + - encode + - to_type_hint +RowCoder: + methods: + - as_cloud_object + - as_deterministic_coder + - from_payload + - from_runner_api_parameter + - from_type_hint + - is_deterministic + - to_runner_api_parameter + - to_type_hint +RowCoderImpl: + methods: + - decode_batch_from_stream + - decode_from_stream + - encode_batch_to_stream + - encode_to_stream +RowColumnEncoder: + methods: + - create + - decode_from_stream + - encode_to_stream + - finalize_write + - null_flags + - register + properties: + - ROW_ENCODERS +RowLevelSecurityStatistics: + properties: + - rowLevelSecurityApplied +RowsToDataFrameFn: + methods: + - process_batch +RowToStringWithSlowDown: + methods: + - process +RowTypeConstraint: + methods: + - field_options + - from_fields + - from_user_type + - get_type_for + - schema_id + - schema_options + - set_schema_id + - type_check + - user_type +RunBuildTriggerRequest: + properties: + - projectId + - source + - triggerId +RunInference: + methods: + - expand + - from_callable +RunnerApiFn: + methods: + - from_runner_api + - register_pickle_urn + - register_urn + - register_urn + - register_urn + - register_urn + - register_urn + - to_runner_api + - to_runner_api_parameter +RunnerError: {} +RunnerIOOperation: {} +RunnerResult: + methods: + - metrics + - monitoring_infos + - monitoring_metrics + - wait_until_finish +RuntimeEnvironment: + properties: + - additionalExperiments + - additionalUserLabels + - bypassTempDirValidation + - enableStreamingEngine + - ipConfiguration + - kmsKeyName + - machineType + - maxWorkers + - network + - numWorkers + - serviceAccountEmail + - subnetwork + - tempLocation + - workerRegion + - workerZone + - zone +RuntimeMetadata: + properties: + - parameters + - sdkInfo +RuntimeMetric: {} +RuntimeState: + methods: + - finalize + - prefetch +RuntimeTimer: + methods: + - clear + - set +RuntimeValueProvider: + methods: + - get + - get_value + - is_accessible + - set_runtime_options + properties: + - experiments + - runtime_options +RuntimeValueProviderError: {} +RunWorkflowCustomOperationMetadata: + properties: + - apiVersion + - createTime + - endTime + - pipelineRunId + - requestedCancellation + - target + - verb +S3ClientError: {} +S3Downloader: + methods: + - get_range + - size +S3FileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split + properties: + - CHUNK_SIZE + - S3_PREFIX +S3IO: + methods: + - checksum + - copy + - copy_paths + - copy_tree + - delete + - delete_files + - delete_paths + - delete_tree + - exists + - last_updated + - list_files + - list_prefix + - open + - rename + - rename_files + - size +S3Options: {} +S3Uploader: + methods: + - finish + - put +SafeFastPrimitivesCoder: + methods: + - decode + - encode +Sample: {} +SampleCombineFn: + methods: + - add_input + - compact + - create_accumulator + - extract_output + - merge_accumulators + - setup + - teardown +SampleOptions: {} +SchemaAwareExternalTransform: + methods: + - discover + - expand +SchemaBasedPayloadBuilder: + methods: + - build +SchemaLoadedSqlTransform: + methods: + - expand +SchemaTransformPayloadBuilder: + methods: + - build +SchemaTranslation: + methods: + - atomic_value_from_runner_api + - atomic_value_to_runner_api + - named_tuple_from_schema + - option_from_runner_api + - option_to_runner_api + - typing_from_runner_api + - typing_to_runner_api + - value_from_runner_api + - value_to_runner_api +SchemaTypeRegistry: + methods: + - add + - generate_new_id + - get_schema_by_id + - get_typing_by_id +ScopedState: + methods: + - sampled_msecs_int + - sampled_seconds +ScreenDiffIntegrationTestEnvironment: + methods: + - base_url + - notebook_path_to_test_id + - test_urls +ScriptStackFrame: + properties: + - endColumn + - endLine + - procedureId + - startColumn + - startLine + - text +ScriptStatistics: + properties: + - evaluationKind + - stackFrames +SDFBoundedSourceReader: + methods: + - display_data + - expand + - get_windowing +SDFProcessElementInvoker: + methods: + - invoke_process_element + - test_method +SdfProcessSizedElements: + methods: + - current_element_progress + - monitoring_infos + - process + - try_split +SdfTruncateSizedRestrictions: + methods: + - current_element_progress + - try_split +SdkContainerImageBuilder: + methods: + - build_container_image +SdkHarness: + methods: + - create_worker + - run + properties: + - REQUEST_METHOD_PREFIX +SdkHarnessContainerImage: + properties: + - capabilities + - containerImage + - environmentId + - useSingleCorePerContainer +SDKInfo: + properties: + - language + - version +SdkVersion: + properties: + - sdkSupportStatus + - version + - versionDisplayName +SdkWorker: + methods: + - do_instruction + - finalize_bundle + - maybe_profile + - process_bundle + - process_bundle_progress + - process_bundle_split + - register +Secret: + properties: + - kmsKeyName + - secretEnv +SecretManagerSecret: + properties: + - env + - versionName +Secrets: + properties: + - inline + - secretManager +Select: + methods: + - default_label + - expand + - infer_output_type +SelectMaxBidFn: + methods: + - process +SendDebugCaptureRequest: + properties: + - componentId + - data + - dataFormat + - location + - workerId +SendDebugCaptureResponse: {} +SendWorkerMessagesRequest: + properties: + - location + - workerMessages +SendWorkerMessagesResponse: + properties: + - workerMessageResponses +Sentinel: + properties: + - sentinel +SeqMapTask: + properties: + - inputs + - name + - outputInfos + - stageName + - systemName + - userFn +SeqMapTaskOutputInfo: + properties: + - sink + - tag +Sequence: + methods: + - make_acquire_fn +SequenceCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size + - get_estimated_size_and_observables +SequenceTypeConstraint: + methods: + - bind_type_variables + - match_type_variables + - type_check +SeriesBatchConverter: + methods: + - combine_batches + - estimate_byte_size + - explode_batch + - from_typehints + - get_length + - produce_batch +SeriesToElementsFn: + methods: + - infer_output_type + - process +ServiceAccount: + properties: + - email_address + - kind +ServiceCallMetric: + methods: + - bigtable_error_code_to_grpc_status_string + - call + - convert_to_canonical_status_string +Session: + methods: + - evaluate + - lookup +Sessions: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + - merge + - to_runner_api_parameter +SessionsToStringsDoFn: + methods: + - process +SetHint: {} +SetIamPolicyRequest: + properties: + - policy + - updateMask +SetRuntimeState: + methods: + - add + - clear + - is_modified + - read +SetStateSpec: + methods: + - to_runner_api +SetupOptions: + methods: + - validate +ShardedKey: + methods: + - key +ShardedKeyCoder: + methods: + - as_cloud_object + - from_type_hint + - is_deterministic + - to_type_hint +ShardedKeyCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +ShardedKeyTypeConstraint: + methods: + - match_type_variables + - type_check +ShardEventsDoFn: + methods: + - process +Shared: + methods: + - acquire +ShellTask: + properties: + - command + - exitCode +ShortIdCache: + methods: + - get_infos + - get_short_id +ShuffleBarrier: + methods: + - expand +SideInputBarrier: + methods: + - expand +SideInputData: + methods: + - from_runner_api + - to_runner_api +SideInputError: {} +SideInputInfo: + properties: + - kind + - sources + - tag +SideInputMap: + methods: + - is_globally_windowed +SideInputReadCounter: {} +SimpleCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +SimpleInput: + methods: + - process +SimpleInvoker: + methods: + - invoke_process + - invoke_process_batch +SimpleKVSink: + methods: + - finalize_write + - initialize_write + - open_writer + - pre_finalize +SimpleKVWriter: + methods: + - close + - write +SimpleMapTaskExecutor: + methods: + - execute + - operations +SimpleMatcher: {} +SimpleOutput: + methods: + - process +SimpleRow: + properties: + - value +SimpleState: + methods: + - add_state + - at + - clear_state + - clear_timer + - get_state + - get_window + - set_timer +SimpleTypeHintError: {} +Simulator: + methods: + - simulate +SingleInputTupleCombineFn: + methods: + - add_input +SinglePrecisionFloatCoder: + methods: + - is_deterministic + - to_type_hint +SinglePrecisionFloatCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +Singleton: + methods: + - check + - is_subpartitioning_of + - partition_fn + - reason +SingletonCoder: + methods: + - is_deterministic +SingletonCoderImpl: + methods: + - decode + - decode_from_stream + - encode + - encode_to_stream + - estimate_size +SingletonElementConsumerSet: + methods: + - current_element_progress + - flush + - receive + - receive_batch + - try_split +SingletonStateHandlerFactory: + methods: + - close + - create_state_handler +Sink: + properties: + - codec + - spec +SizeBasedBufferingClosableOutputStream: + methods: + - flush + - maybe_flush +SizeLimiter: + methods: + - is_triggered +SklearnInference: + methods: + - test_sklearn_mnist_classification + - test_sklearn_regression +SklearnModelHandlerNumpy: + methods: + - get_metrics_namespace + - get_num_bytes + - load_model + - run_inference +SklearnModelHandlerPandas: + methods: + - get_metrics_namespace + - get_num_bytes + - load_model + - run_inference +SlackDelivery: + properties: + - webhookUri +SlidingWindows: + methods: + - assign + - from_runner_api_parameter + - get_window_coder + - to_runner_api_parameter +SlowCoders: + methods: + - test_using_slow_impl +Smallest: + methods: + - default_label +SMTPDelivery: + properties: + - fromAddress + - password + - port + - recipientAddresses + - senderAddress + - server +Snapshot: + properties: + - creationTime + - description + - diskSizeBytes + - id + - projectId + - pubsubMetadata + - region + - sourceJobId + - state + - ttl +SnapshotDefinition: + properties: + - baseTableReference + - snapshotTime +SnapshotJobRequest: + properties: + - description + - location + - snapshotSources + - ttl +SnippetUtils: {} +SortedConcatWithCounters: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +Source: + properties: + - repoSource + - storageSource + - storageSourceManifest +SourceBase: + methods: + - is_bounded +SourceFork: + properties: + - primary + - primarySource + - residual + - residualSource +SourceGetMetadataRequest: + properties: + - source +SourceGetMetadataResponse: + properties: + - metadata +SourceMetadata: + properties: + - estimatedSizeBytes + - infinite + - producesSortedKeys +SourceOperationRequest: + properties: + - getMetadata + - name + - originalName + - split + - stageName + - systemName +SourceOperationResponse: + properties: + - getMetadata + - split +SourceProvenance: + properties: + - fileHashes + - resolvedRepoSource + - resolvedStorageSource + - resolvedStorageSourceManifest +SourceSplitOptions: + properties: + - desiredBundleSizeBytes + - desiredShardSizeBytes +SourceSplitRequest: + properties: + - options + - source +SourceSplitResponse: + properties: + - bundles + - outcome + - shards +SourceSplitShard: + properties: + - derivationMode + - source +SpannerDelete: + properties: + - URN +SpannerHelper: + methods: + - create_database + - create_instance + - drop_database + - get_emulator_host + - insert_values + - read_data + - shutdown +SpannerInsert: + properties: + - URN +SpannerInsertOrUpdate: + properties: + - URN +SpannerIODetails: + properties: + - databaseId + - instanceId + - projectId +SpannerPartTestRow: + properties: + - f_int64 + - f_string +SpannerReplace: + properties: + - URN +SpannerTestKey: + properties: + - f_string +SpannerTestRow: + properties: + - f_boolean + - f_int64 + - f_string +SpannerUpdate: + properties: + - URN +SparkBeamJob: + methods: + - cancel + - delete + - get + - get_message_stream + - get_state + - get_state_stream + - post + - request + - run +SparkJarJobServer: + methods: + - java_arguments + - path_to_jar +SparkRunner: + methods: + - create_job_service_handle + - default_job_server + - run_pipeline +SparkRunnerOptions: {} +SparkTestPipelineOptions: + methods: + - view_as +SparkUberJarJobServer: + methods: + - create_beam_job + - executable_jar + - start + - stop +SpecialDoFn: + methods: + - display_data + - process +SpecialParDo: + methods: + - display_data +SplitInt64: + properties: + - highBits + - lowBits +SplitLinesToWordsFn: + methods: + - process + properties: + - OUTPUT_TAG_CHARACTER_COUNT + - OUTPUT_TAG_SHORT_WORDS +SplitNotPossibleError: {} +SplitRestrictionFn: + methods: + - process + - start_bundle +SplittableParDo: + methods: + - expand +SplittableParDoOverride: + methods: + - get_replacement_transform_for_applied_ptransform + - matches +SqlChain: + methods: + - append + - get + - to_pipeline + properties: + - current + - nodes + - root + - user_pipeline +SqlNode: + methods: + - to_pipeline + properties: + - evaluated + - execution_count + - next + - output_name + - query + - schemas + - source +SqlTransform: + properties: + - URN +Stage: + methods: + - can_fuse + - deduplicate_read + - executable_stage_transform + - fuse + - has_as_main_input + - is_all_sdk_urns + - is_runner_urn + - is_stateful + - side_inputs +StageExecutionDetails: + properties: + - nextPageToken + - workers +Stager: + methods: + - commit_manifest + - create_and_stage_job_resources + - create_job_resources + - extract_staging_tuple_iter + - get_sdk_package_name + - stage_artifact + - stage_job_resources +StageSource: + properties: + - name + - originalTransformOrCollection + - sizeBytes + - userName +StageSummary: + properties: + - endTime + - metrics + - progress + - stageId + - startTime + - state +StandardOptions: + properties: + - ALL_KNOWN_RUNNERS + - DEFAULT_RUNNER + - KNOWN_RUNNER_NAMES +StandardQueryParameters: + properties: + - access_token + - alt + - callback + - f__xgafv + - fields + - key + - oauth_token + - prettyPrint + - quotaUser + - trace + - upload_protocol + - uploadType +StandardSqlDataType: + properties: + - arrayElementType + - structType + - typeKind +StandardSqlField: + properties: + - name + - type +StandardSqlStructType: + properties: + - fields +StateBackedIterableCoder: + methods: + - from_runner_api_parameter + - is_deterministic + - to_runner_api_parameter + properties: + - DEFAULT_WRITE_THRESHOLD +StateBackedSideInputMap: + methods: + - is_globally_windowed + - reset +StateBackedTestElementType: + properties: + - live_element_count +StateCache: + methods: + - describe_stats + - get + - invalidate + - invalidate_all + - is_cache_enabled + - peek + - put + - size +StateFamilyConfig: + properties: + - isRead + - stateFamily +StatefulLoadGenerator: + methods: + - expand +StatefulOnlineClustering: + methods: + - process + properties: + - BIRCH_MODEL_SPEC + - DATA_ITEMS_SPEC + - EMBEDDINGS_SPEC + - UPDATE_COUNTER_SPEC +StateHandler: + methods: + - append_raw + - clear + - done + - get_raw + - process_instruction_id +StateHandlerFactory: + methods: + - close + - create_state_handler +StatelessDoFnInfo: + methods: + - serialized_dofn_data + - to_runner_api + properties: + - REGISTERED_DOFNS +StateSampler: + methods: + - commit_counters + - get_info + - scoped_state + - stage_name + - start + - stop + - stop_if_still_running +StateServicer: + methods: + - append_raw + - checkpoint + - clear + - commit + - done + - get_raw + - process_instruction_id + - restore + properties: + - StateType +StateSpec: + methods: + - to_runner_api +StaticValueProvider: + methods: + - get + - is_accessible +Status: + properties: + - code + - details + - message +Step: + properties: + - kind + - name + - properties +StopOnExitJobServer: + methods: + - start + - stop +StorageBucketAccessControlsDeleteRequest: + properties: + - bucket + - entity + - userProject +StorageBucketAccessControlsDeleteResponse: {} +StorageBucketAccessControlsGetRequest: + properties: + - bucket + - entity + - userProject +StorageBucketAccessControlsInsertRequest: + properties: + - bucket + - bucketAccessControl + - userProject +StorageBucketAccessControlsListRequest: + properties: + - bucket + - userProject +StorageBucketAccessControlsPatchRequest: + properties: + - bucket + - bucketAccessControl + - entity + - userProject +StorageBucketAccessControlsUpdateRequest: + properties: + - bucket + - bucketAccessControl + - entity + - userProject +StorageBucketsDeleteRequest: + properties: + - bucket + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - userProject +StorageBucketsDeleteResponse: {} +StorageBucketsGetIamPolicyRequest: + properties: + - bucket + - userProject +StorageBucketsGetRequest: + properties: + - bucket + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - projection + - userProject +StorageBucketsInsertRequest: + properties: + - bucket + - predefinedAcl + - predefinedDefaultObjectAcl + - project + - projection + - userProject +StorageBucketsListRequest: + properties: + - maxResults + - pageToken + - prefix + - project + - projection + - userProject +StorageBucketsLockRetentionPolicyRequest: + properties: + - bucket + - ifMetagenerationMatch + - userProject +StorageBucketsPatchRequest: + properties: + - bucket + - bucketResource + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - predefinedAcl + - predefinedDefaultObjectAcl + - projection + - userProject +StorageBucketsSetIamPolicyRequest: + properties: + - bucket + - policy + - userProject +StorageBucketsTestIamPermissionsRequest: + properties: + - bucket + - permissions + - userProject +StorageBucketsUpdateRequest: + properties: + - bucket + - bucketResource + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - predefinedAcl + - predefinedDefaultObjectAcl + - projection + - userProject +StorageChannelsStopResponse: {} +StorageDefaultObjectAccessControlsDeleteRequest: + properties: + - bucket + - entity + - userProject +StorageDefaultObjectAccessControlsDeleteResponse: {} +StorageDefaultObjectAccessControlsGetRequest: + properties: + - bucket + - entity + - userProject +StorageDefaultObjectAccessControlsInsertRequest: + properties: + - bucket + - objectAccessControl + - userProject +StorageDefaultObjectAccessControlsListRequest: + properties: + - bucket + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - userProject +StorageDefaultObjectAccessControlsPatchRequest: + properties: + - bucket + - entity + - objectAccessControl + - userProject +StorageDefaultObjectAccessControlsUpdateRequest: + properties: + - bucket + - entity + - objectAccessControl + - userProject +StorageNotificationsDeleteRequest: + properties: + - bucket + - notification + - userProject +StorageNotificationsDeleteResponse: {} +StorageNotificationsGetRequest: + properties: + - bucket + - notification + - userProject +StorageNotificationsInsertRequest: + properties: + - bucket + - notification + - userProject +StorageNotificationsListRequest: + properties: + - bucket + - userProject +StorageObjectAccessControlsDeleteRequest: + properties: + - bucket + - entity + - generation + - object + - userProject +StorageObjectAccessControlsDeleteResponse: {} +StorageObjectAccessControlsGetRequest: + properties: + - bucket + - entity + - generation + - object + - userProject +StorageObjectAccessControlsInsertRequest: + properties: + - bucket + - generation + - object + - objectAccessControl + - userProject +StorageObjectAccessControlsListRequest: + properties: + - bucket + - generation + - object + - userProject +StorageObjectAccessControlsPatchRequest: + properties: + - bucket + - entity + - generation + - object + - objectAccessControl + - userProject +StorageObjectAccessControlsUpdateRequest: + properties: + - bucket + - entity + - generation + - object + - objectAccessControl + - userProject +StorageObjectsComposeRequest: + properties: + - composeRequest + - destinationBucket + - destinationObject + - destinationPredefinedAcl + - ifGenerationMatch + - ifMetagenerationMatch + - kmsKeyName + - userProject +StorageObjectsCopyRequest: + properties: + - destinationBucket + - destinationObject + - destinationPredefinedAcl + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - ifSourceGenerationMatch + - ifSourceGenerationNotMatch + - ifSourceMetagenerationMatch + - ifSourceMetagenerationNotMatch + - object + - projection + - sourceBucket + - sourceGeneration + - sourceObject + - userProject +StorageObjectsDeleteRequest: + properties: + - bucket + - generation + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - object + - userProject +StorageObjectsDeleteResponse: {} +StorageObjectsGetIamPolicyRequest: + properties: + - bucket + - generation + - object + - userProject +StorageObjectsGetRequest: + properties: + - bucket + - generation + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - object + - projection + - userProject +StorageObjectsInsertRequest: + properties: + - bucket + - contentEncoding + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - kmsKeyName + - name + - object + - predefinedAcl + - projection + - userProject +StorageObjectsListRequest: + properties: + - bucket + - delimiter + - includeTrailingDelimiter + - maxResults + - pageToken + - prefix + - projection + - userProject + - versions +StorageObjectsPatchRequest: + properties: + - bucket + - generation + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - object + - objectResource + - predefinedAcl + - projection + - userProject +StorageObjectsRewriteRequest: + properties: + - destinationBucket + - destinationKmsKeyName + - destinationObject + - destinationPredefinedAcl + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - ifSourceGenerationMatch + - ifSourceGenerationNotMatch + - ifSourceMetagenerationMatch + - ifSourceMetagenerationNotMatch + - maxBytesRewrittenPerCall + - object + - projection + - rewriteToken + - sourceBucket + - sourceGeneration + - sourceObject + - userProject +StorageObjectsSetIamPolicyRequest: + properties: + - bucket + - generation + - object + - policy + - userProject +StorageObjectsTestIamPermissionsRequest: + properties: + - bucket + - generation + - object + - permissions + - userProject +StorageObjectsUpdateRequest: + properties: + - bucket + - generation + - ifGenerationMatch + - ifGenerationNotMatch + - ifMetagenerationMatch + - ifMetagenerationNotMatch + - object + - objectResource + - predefinedAcl + - projection + - userProject +StorageObjectsWatchAllRequest: + properties: + - bucket + - channel + - delimiter + - includeTrailingDelimiter + - maxResults + - pageToken + - prefix + - projection + - userProject + - versions +StorageProjectsServiceAccountGetRequest: + properties: + - projectId + - userProject +StorageSource: + properties: + - bucket + - generation + - object +StorageSourceManifest: + properties: + - bucket + - generation + - object +StorageV1: + properties: + - BASE_URL + - MESSAGES_MODULE +StreamCoderImpl: + methods: + - decode + - encode + - estimate_size +StreamingApplianceSnapshotConfig: + properties: + - importStateEndpoint + - snapshotId +Streamingbuffer: + properties: + - estimatedBytes + - estimatedRows + - oldestEntryTime +StreamingCache: + methods: + - capture_keys + - capture_paths + - capture_size + - cleanup + - clear + - exists + - load_pcoder + - read + - read_multiple + - save_pcoder + - sink + - size + - source + - write +StreamingCacheSink: + methods: + - expand + - path + - size_in_bytes +StreamingCacheSource: + methods: + - read +StreamingComputationConfig: + properties: + - computationId + - instructions + - stageName + - systemName + - transformUserNameToStateFamily +StreamingComputationRanges: + properties: + - computationId + - rangeAssignments +StreamingComputationTask: + properties: + - computationRanges + - dataDisks + - taskType +StreamingConfigTask: + properties: + - commitStreamChunkSizeBytes + - getDataStreamChunkSizeBytes + - maxWorkItemCommitBytes + - streamingComputationConfigs + - userStepToStateFamilyNameMap + - windmillServiceEndpoint + - windmillServicePort +StreamingSetupTask: + properties: + - drain + - receiveWorkPort + - snapshotConfig + - streamingComputationTopology + - workerHarnessPort +StreamingSideInputLocation: + properties: + - stateFamily + - tag +StreamingStageLocation: + properties: + - streamId +StreamingUserMetricsDoFn: + methods: + - finish_bundle + - process + - start_bundle +StreamingWordcountDebugging: + methods: + - test_streaming_wordcount_debugging +StreamingWordcountDebuggingIT: + methods: + - setUp + - setup_pubsub + - tearDown + - test_streaming_wordcount_debugging_it +StreamingWordCountIT: + methods: + - setUp + - tearDown + - test_streaming_wordcount_it +StreamLocation: + properties: + - customSourceLocation + - pubsubLocation + - sideInputLocation + - streamingStageLocation +StringList: + properties: + - elements +StructuredMessage: + properties: + - messageKey + - messageText + - parameters +StrUtf8Coder: + methods: + - decode + - encode + - is_deterministic + - to_type_hint +SubClass: {} +SubprocessJobServer: + methods: + - local_temp_dir + - start + - stop + - subprocess_cmd_and_endpoint +SubprocessSDKEnvironment: + methods: + - from_command_string + - from_options + - from_runner_api_parameter + - to_runner_api_parameter +SubprocessSdkWorker: + methods: + - run +SubprocessSdkWorkerHandler: + methods: + - start_worker + - stop_worker +SubprocessServer: + methods: + - local_temp_dir + - start + - start_process + - stop + - stop_process +SumAccumulator: + methods: + - update + - value +SumDoubleAccumulator: + methods: + - add_input + - extract_output + - merge +SumFloatFn: {} +SumInt64Accumulator: + methods: + - add_input + - add_input_n + - extract_output + - merge +SumInt64Fn: {} +Summary: + methods: + - result + - summarize +SuperClass: {} +SwitchingDirectRunner: + methods: + - is_fnapi_compatible + - run_pipeline +SynchronousBagRuntimeState: + methods: + - add + - clear + - commit + - read +SynchronousSetRuntimeState: + methods: + - add + - clear + - commit + - read +SyntheticRecordToStrFn: + methods: + - process +SyntheticSDFAsSource: + methods: + - process +SyntheticSDFSourceRestrictionProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size + - split +SyntheticSDFStepRestrictionProvider: + methods: + - create_tracker + - initial_restriction + - restriction_size + - split +SyntheticSource: + methods: + - default_output_coder + - element_size + - estimate_size + - get_range_tracker + - read + - split +SyntheticStep: + methods: + - finish_bundle + - process + - start_bundle +Table: + properties: + - clustering + - creationTime + - description + - encryptionConfiguration + - etag + - expirationTime + - externalDataConfiguration + - friendlyName + - id + - kind + - labels + - lastModifiedTime + - location + - materializedView + - model + - numBytes + - numLongTermBytes + - numPhysicalBytes + - numRows + - rangePartitioning + - requirePartitionFilter + - schema + - selfLink + - snapshotDefinition + - streamingBuffer + - tableReference + - timePartitioning + - type + - view +TableCell: + properties: + - v +TableDataInsertAllRequest: + properties: + - ignoreUnknownValues + - kind + - rows + - skipInvalidRows + - templateSuffix +TableDataInsertAllResponse: + properties: + - insertErrors + - kind +TableDataList: + properties: + - etag + - kind + - pageToken + - rows + - totalRows +TableFieldSchema: + properties: + - categories + - description + - fields + - mode + - name + - policyTags + - type +TableList: + properties: + - etag + - kind + - nextPageToken + - tables + - totalItems +TableReference: + properties: + - datasetId + - projectId + - tableId +TableRow: + properties: + - f +TableRowJsonCoder: + methods: + - decode + - encode +TableSchema: + properties: + - fields +TaggedOutput: {} +TaskRunnerSettings: + properties: + - alsologtostderr + - baseTaskDir + - baseUrl + - commandlinesFileName + - continueOnException + - dataflowApiVersion + - harnessCommand + - languageHint + - logDir + - logToSerialconsole + - logUploadLocation + - oauthScopes + - parallelWorkerSettings + - streamingWorkerMainClass + - taskGroup + - taskUser + - tempStoragePrefix + - vmId + - workflowFileName +TaxirideIT: + methods: + - setUp + - tearDown + - test_aggregation + - test_enrich +TeamScoresDict: + methods: + - process +TempDir: + methods: + - create_temp_file + - get_path +TemplateMetadata: + properties: + - description + - name + - parameters +TensorRTEngine: + methods: + - get_engine_attrs +TensorRTEngineHandlerNumPy: + methods: + - batch_elements_kwargs + - build_engine + - get_metrics_namespace + - get_num_bytes + - load_model + - load_onnx + - run_inference +Test_NativeWrite: + methods: + - setUp + - test_expand_method_pcollection_errors +TestAvroRowWriter: + methods: + - test_write_row +TestAZFSPathParser: + methods: + - test_azfs_path + - test_azfs_path_blob_optional + - test_bad_azfs_path + - test_bad_azfs_path_blob_optional + properties: + - BAD_AZFS_PATHS +TestBigQueryFileLoads: + methods: + - test_load_job_id_use_for_copy_job + - test_load_job_id_used + - test_multiple_partition_files + - test_one_load_job_failed_after_waiting + - test_records_traverse_transform_with_mocks + - test_trigger_load_jobs_with_empty_files + - test_triggering_frequency + - test_wait_for_load_job_completion +TestBigQuerySink: + methods: + - test_parse_schema_descriptor + - test_project_table_display_data + - test_table_spec_display_data +TestBigQueryToAvroSchema: + methods: + - test_convert_bigquery_schema_to_avro_schema +TestBigQueryToSchema: + methods: + - test_bad_schema_public_api_direct_read + - test_bad_schema_public_api_export + - test_check_conversion_with_empty_schema + - test_check_schema_conversions + - test_check_schema_conversions_with_timestamp + - test_unsupported_callable + - test_unsupported_mode + - test_unsupported_query_direct_read + - test_unsupported_query_export + - test_unsupported_type + - test_unsupported_value_provider +TestBigQueryWrapper: + methods: + - test_delete_dataset_retries_fail + - test_delete_dataset_retries_for_timeouts + - test_delete_non_existing_dataset + - test_delete_non_existing_table + - test_delete_table_retries_fail + - test_delete_table_retries_for_timeouts + - test_get_or_create_dataset_created + - test_get_or_create_dataset_fetched + - test_get_or_create_table + - test_get_or_create_table_intermittent_exception + - test_get_or_create_table_invalid_tablename + - test_get_or_create_table_race_condition + - test_get_query_location + - test_insert_rows_sets_metric_on_failure + - test_perform_load_job_source_mutual_exclusivity + - test_perform_load_job_with_load_job_id + - test_perform_load_job_with_source_stream + - test_start_query_job_priority_configuration + - test_temporary_dataset_is_unique + - test_user_agent_insert_all + - test_user_agent_passed + - test_wait_for_job_retries_fail + - test_wait_for_job_returns_true_when_job_is_done + - verify_write_call_metric +TestBQJobNames: + methods: + - test_matches_template + - test_random_in_name + - test_simple_names +TestChangePointAnalysis: + methods: + - setUp + - test_alert_on_data_with_change_point + - test_alert_on_data_with_reported_change_point + - test_change_point_outside_inspection_window_is_not_a_valid_alert + - test_duplicate_change_point + - test_duplicate_change_points_are_not_valid_alerts + - test_edivisive_means + - test_is_changepoint_in_valid_window + - test_no_alerts_when_no_change_points + - test_validate_config +TestCheckSchemaEqual: + methods: + - test_descriptions + - test_field_order + - test_simple_schemas +TestClock: + methods: + - advance_time + - time +TestCoerceToKvType: + methods: + - test_coercion_fail + - test_coercion_success +TestCompressedFile: + methods: + - setUp + - tearDown + - test_concatenated_compressed_file + - test_read_and_seek_back_to_beginning + - test_read_from_end_returns_no_data + - test_seek_cur + - test_seek_outside + - test_seek_set + - test_seekable_disabled_on_append + - test_seekable_disabled_on_write + - test_seekable_enabled_on_read + - test_tell + properties: + - content + - read_block_size +TestConcatPosition: + methods: + - test_invalid_position_type + - test_valid_position_type +TestConcatSource: + methods: + - setUp + - test_estimate_size + - test_read + - test_split +TestCounterCell: + methods: + - test_basic_operations + - test_parallel_access + - test_start_time_set + properties: + - NUM_ITERATIONS + - NUM_THREADS +TestCustomWindows: + methods: + - assign + - get_window_coder +TestDataflowMetrics: + methods: + - setup_mock_client_result + - test_cache_functions + - test_query_counters + - test_query_structured_metrics + - test_system_counters_set_labels_and_step_name + - test_translate_portable_job_step_name + properties: + - ONLY_COUNTERS_LIST + - STRUCTURED_COUNTER_LIST + - SYSTEM_COUNTERS_LIST +TestDataflowOptions: {} +TestDataflowRunner: + methods: + - build_console_url + - run_pipeline + - wait_until_in_state +TestDeidentifyFn: + methods: + - test_deidentify_called +TestDeidentifyText: + methods: + - test_exception_raised_when_no_config_is_provided +TestDicomSearch: + methods: + - test_client_search_notfound + - test_missing_parameters + - test_param_dict_passing + - test_Qido_search_small_buffer_flush + - test_successful_search + - test_wrong_input_type +TestDicomStoreInstance: + methods: + - test_destination_notfound + - test_missing_parameters + - test_store_byte_file + - test_store_byte_file_small_buffer_flush + - test_store_fileio_file + - test_store_fileio_file_small_buffer_flush +TestDirectRunner: + methods: + - run_pipeline +TestDistributionCell: + methods: + - test_basic_operations + - test_integer_only + - test_parallel_access + - test_start_time_set + properties: + - NUM_ITERATIONS + - NUM_THREADS +TestDownloaderStream: + methods: + - test_file_attributes + - test_read + - test_read_buffered + - test_read_empty +TestDynamicSplitRequest: + methods: + - test_invalid_progress_type + - test_valid_progress_type +TestDynamicSplitResultWithPosition: + methods: + - test_invalid_stop_position_type + - test_valid_stop_position_type +TestEnd2EndWriteAndRead: + methods: + - create_inputs + - test_end2end + - test_end2end_auto_compression + - test_end2end_auto_compression_unsharded + - test_end2end_example_proto + - test_end2end_read_write_read +TestEnvironment: + methods: + - context + - fake_pandas_module +TestErrorHandlingCall: + methods: + - setUpClass + - tearDownClass + - test_check_output_pip_install_non_existing_package + - test_oserror_check_output_message +TestErrorHandlingCheckCall: + methods: + - setUpClass + - tearDownClass + - test_check_call_pip_install_non_existing_package + - test_oserror_check_call + - test_oserror_check_call_message +TestErrorHandlingCheckOutput: + methods: + - setUpClass + - tearDownClass + - test_check_output_pip_install_non_existing_package + - test_oserror_check_output_message +TestFastAvro: {} +TestFileBasedSink: + methods: + - run_temp_dir_check + - test_empty_write + - test_file_sink_display_data + - test_file_sink_dst_matches_src + - test_file_sink_multi_shards + - test_file_sink_rename_error + - test_file_sink_src_missing + - test_file_sink_writing + - test_fixed_shard_write + - test_pre_finalize + - test_pre_finalize_error + - test_static_value_provider_empty_write + - test_temp_dir_gcs + - test_temp_dir_local + - test_temp_dir_uniqueness +TestFileBasedSource: + methods: + - setUp + - test_estimate_size_of_file + - test_estimate_size_of_pattern + - test_estimate_size_with_sampling_different_sizes + - test_estimate_size_with_sampling_same_size + - test_fully_read_file_pattern + - test_fully_read_file_pattern_with_empty_files + - test_fully_read_single_file + - test_read_auto_pattern + - test_read_auto_pattern_compressed_and_uncompressed + - test_read_auto_single_file_bzip2 + - test_read_auto_single_file_gzip + - test_read_file_bzip2 + - test_read_file_gzip + - test_read_pattern_bzip2 + - test_read_pattern_gzip + - test_read_splits_file_pattern + - test_read_splits_single_file + - test_single_file_display_data + - test_source_file + - test_source_file_unsplittable + - test_source_pattern + - test_source_pattern_unsplittable + - test_splits_get_coder_from_fbs + - test_splits_into_subranges + - test_string_or_value_provider_only + - test_unsplittable_does_not_split + - test_validation_directory_non_empty + - test_validation_failing + - test_validation_file_exists + - test_validation_file_missing_verification_disabled +TestFileSystem: + methods: + - setUp + - test_match_glob + - test_translate_pattern +TestFileSystemWithDirs: + methods: + - setUp +TestFormatToQido: + methods: + - test_failed_convert + - test_normal_convert + properties: + - expected_invalid_pubsub_dict + - expected_valid_pubsub_dict + - invalid_pubsub_string + - valid_pubsub_string +TestGaugeCell: + methods: + - test_basic_operations + - test_combine_appropriately + - test_integer_only + - test_start_time_set +TestGCSIO: + methods: + - setUp + - test_bad_file_modes + - test_checksum + - test_context_manager + - test_copy + - test_copy_batch + - test_copytree + - test_default_bucket_name + - test_default_bucket_name_failure + - test_delete + - test_delete_batch + - test_downloader_fail_non_existent_object + - test_downloader_fail_to_get_project_number + - test_downloader_fail_when_getting_metadata + - test_downloader_fail_when_reading + - test_downloader_monitoring_info + - test_empty_batches + - test_exists + - test_exists_failure + - test_file_close + - test_file_flush + - test_file_iterator + - test_file_mode + - test_file_random_seek + - test_file_read_line + - test_file_status + - test_file_write + - test_full_file_read + - test_last_updated + - test_list_prefix + - test_mime_binary_encoding + - test_num_retries + - test_rename + - test_retry_func + - test_size + - test_uploader_monitoring_info + - test_user_agent_passed +TestGCSPathParser: + methods: + - test_bad_gcs_path + - test_bad_gcs_path_object_optional + - test_gcs_path + - test_gcs_path_object_optional + properties: + - BAD_GCS_PATHS +TestGeneratorWrapper: + methods: + - test_functions_as_regular_generator +TestGetYieldedType: + methods: + - test_iterables + - test_not_iterable +TestGroupBy: + methods: + - test_aggregate + - test_fields + - test_lambdas + - test_pickled_field +TestHelperFunctions: + methods: + - test_dict_printable_fields +TestHistogramCell: + methods: + - test_basic_operations + - test_parallel_access + properties: + - NUM_ITERATIONS + - NUM_THREADS +TestIamPermissionsRequest: + properties: + - permissions +TestIamPermissionsResponse: + properties: + - kind + - permissions +TestingFileSystem: + methods: + - checksum + - copy + - create + - delete + - exists + - has_dirs + - join + - last_updated + - metadata + - mkdirs + - open + - rename + - scheme + - size + - split +TestInspectFn: + methods: + - test_inspect_called +TestInspectText: + methods: + - test_exception_raised_then_no_config_provided +TestJobServicePlan: + methods: + - get_pipeline_options +TestJsonRowWriter: + methods: + - test_write_row +TestJsonToDictCoder: + methods: + - test_coder_is_pickable + - test_null_fields_are_preserved + - test_record_and_repeatable_field_is_properly_converted + - test_record_field_is_properly_converted + - test_repeatable_field_is_properly_converted + - test_values_are_converted +TestMatchers: + methods: + - test_metric_update_basic + - test_structured_name_matcher_basic +TestMetricKey: + methods: + - test_equality_for_key_with_labels + - test_equality_for_key_with_no_labels + - test_inequality_for_key_with_labels +TestMetricsContainer: + methods: + - test_add_to_counter + - test_get_cumulative_or_updates +TestMultiReadFromPubSubOverride: + methods: + - test_expand_with_multiple_sources + - test_expand_with_multiple_sources_and_attributes + - test_expand_with_multiple_sources_and_other_options + - test_expand_with_wrong_source +TestNativeSink: + methods: + - test_on_direct_runner + - test_repr_method + - test_writer_method +TestNativeSource: + methods: + - test_reader_method + - test_repr_method +TestOffsetRestrictionProvider: + methods: + - restriction_size +TestOptions: + methods: + - validate +TestParDoAnnotations: + methods: + - test_pep484_annotations + - test_with_side_input +TestParquet: + methods: + - setUp + - tearDown + - test_batched_read + - test_dynamic_work_rebalancing + - test_int96_type_conversion + - test_min_bundle_size + - test_read_all_from_parquet_file_pattern + - test_read_all_from_parquet_many_file_patterns + - test_read_all_from_parquet_many_single_files + - test_read_all_from_parquet_single_file + - test_read_all_from_parquet_with_filename + - test_read_display_data + - test_read_reentrant + - test_read_with_splitting + - test_read_with_splitting_multiple_row_group + - test_read_without_splitting + - test_read_without_splitting_multiple_row_group + - test_selective_columns + - test_sink_display_data + - test_sink_transform + - test_sink_transform_batched + - test_sink_transform_compliant_nested_type + - test_sink_transform_compressed + - test_sink_transform_int96 + - test_sink_transform_multiple_row_group + - test_source_display_data + - test_split_points + - test_write_batched_display_data + - test_write_display_data +TestParquetIT: + methods: + - setUp + - tearDown + - test_parquetio_it +TestPartitionFiles: + methods: + - test_partition + - test_partition_files_dofn_file_split + - test_partition_files_dofn_size_split +TestPipeline: + methods: + - get_full_options_as_args + - get_option + - get_pipeline_options + - run + properties: + - pytest_test_pipeline_options +TestPipeStream: + methods: + - test_pipe_stream + - test_pipe_stream_rewind_buffer +TestPTransformAnnotations: + methods: + - test_annotations_with_arbitrary_input_and_output + - test_annotations_with_arbitrary_output + - test_annotations_with_none_input + - test_annotations_with_none_output + - test_annotations_with_pbegin + - test_annotations_with_pdone + - test_annotations_without_any_internal_type + - test_annotations_without_any_typehints + - test_annotations_without_input_internal_type + - test_annotations_without_input_pcollection_wrapper + - test_annotations_without_input_typehint + - test_annotations_without_output_internal_type + - test_annotations_without_output_pcollection_wrapper + - test_annotations_without_output_typehint + - test_mixed_annotations_are_converted_to_beam_annotations + - test_nested_typing_annotations_are_converted_to_beam_annotations + - test_pep484_annotations + - test_pipe_operator_as_union + - test_typing_module_annotations_are_converted_to_beam_annotations +TestPTransformFn: + methods: + - test_type_checking_fail + - test_type_checking_success + - test_type_hints_arg +TestPubsubMessage: + methods: + - test_eq + - test_hash + - test_payload_invalid + - test_payload_publish_invalid + - test_payload_valid + - test_proto_conversion + - test_repr +TestPubSubReadEvaluator: + methods: + - finish_bundle + - process_element + - start_bundle +TestPubSubSink: + methods: + - test_display_data +TestPubSubSource: + methods: + - test_display_data_no_subscription + - test_display_data_subscription + - test_display_data_topic +TestPytorchModelHandlerForInferenceOnly: {} +TestPytorchModelHandlerKeyedTensorForInferenceOnly: {} +TestReadAllFromTFRecord: + methods: + - test_process_auto + - test_process_deflate + - test_process_glob + - test_process_glob_with_empty_file + - test_process_gzip + - test_process_multiple + - test_process_multiple_globs + - test_process_single + - test_process_with_filename +TestReaderPosition: + methods: + - test_invalid_concat_position_type + - test_valid_concat_position_type +TestReaderProgress: + methods: + - test_out_of_bounds_percent_complete + - test_percent_complete_property + - test_position_property +TestReadFromBigQuery: + methods: + - setUpClass + - tearDown + - test_create_temp_dataset_exception + - test_get_destination_uri_empty_runtime_vp + - test_get_destination_uri_fallback_temp_location + - test_get_destination_uri_none + - test_get_destination_uri_runtime_vp + - test_get_destination_uri_static_vp + - test_query_job_exception + - test_read_export_exception + - test_temp_dataset_is_configurable +TestReadFromPubSub: + methods: + - test_read_data_success + - test_read_message_id_label_unsupported + - test_read_messages_success + - test_read_messages_timestamp_attribute_fail_parse + - test_read_messages_timestamp_attribute_milli_success + - test_read_messages_timestamp_attribute_missing + - test_read_messages_timestamp_attribute_rfc3339_success + - test_read_strings_success + - test_runner_api_transformation_properties_none + - test_runner_api_transformation_with_subscription + - test_runner_api_transformation_with_topic +TestReadFromPubSubOverride: + methods: + - test_expand_with_both_topic_and_subscription + - test_expand_with_no_topic_or_subscription + - test_expand_with_other_options + - test_expand_with_subscription + - test_expand_with_topic +TestReadFromTFRecord: + methods: + - test_process_auto + - test_process_deflate + - test_process_gzip_auto + - test_process_gzip_with_coder + - test_process_gzip_without_coder + - test_process_multiple + - test_process_single +TestRowAsDictJsonCoder: + methods: + - json_compliance_exception + - test_decimal_in_row_as_dict + - test_ensure_ascii + - test_invalid_json_inf + - test_invalid_json_nan + - test_invalid_json_neg_inf + - test_row_as_dict +TestS3IO: + methods: + - setUp + - test_checksum + - test_context_manager + - test_copy + - test_copy_paths + - test_copy_paths_error + - test_copy_tree + - test_delete + - test_delete_files + - test_delete_files_with_errors + - test_delete_paths + - test_delete_tree + - test_exists + - test_file_close + - test_file_flush + - test_file_iterator + - test_file_mime_type + - test_file_mode + - test_file_random_seek + - test_file_read_line + - test_file_status + - test_file_write + - test_full_file_read + - test_last_updated + - test_list_prefix + - test_midsize_file + - test_rename + - test_rename_files + - test_rename_files_with_errors + - test_rename_files_with_errors_directory + - test_size + - test_zerosize_file +TestS3PathParser: + methods: + - test_bad_s3_path + - test_bad_s3_path_object_optional + - test_s3_path + - test_s3_path_object_optional + properties: + - BAD_S3_PATHS +TestSingleFileSource: + methods: + - setUp + - test_estimates_size + - test_produce_split_with_start_and_end_positions + - test_produces_splits_desiredsize_large_than_size + - test_produces_splits_desiredsize_smaller_than_size + - test_read_range_at_beginning + - test_read_range_at_end + - test_read_range_at_middle + - test_source_creation_display_data + - test_source_creation_fails_for_non_number_offsets + - test_source_creation_fails_if_start_lg_stop +TestStager: + methods: + - commit_manifest + - stage_artifact +TestStatefulDoFn: + methods: + - on_expiry_1 + - on_expiry_2 + - on_expiry_3 + - on_expiry_family + - process + properties: + - BUFFER_STATE_1 + - BUFFER_STATE_2 + - EXPIRY_TIMER_1 + - EXPIRY_TIMER_2 + - EXPIRY_TIMER_3 + - EXPIRY_TIMER_FAMILY +TestStream: + methods: + - add_elements + - advance_processing_time + - advance_watermark_to + - advance_watermark_to_infinity + - expand + - from_runner_api_parameter + - get_windowing + - to_runner_api_parameter +TestStreamIntegrationTests: + methods: + - setUpClass + - test_basic_execution + - test_multiple_outputs + - test_multiple_outputs_with_watermark_advancement +TestStreamServiceController: + methods: + - Events + - start + - stop +TestTableReferenceParser: + methods: + - test_calling_with_all_arguments + - test_calling_with_callable + - test_calling_with_fully_qualified_table_ref + - test_calling_with_insufficient_table_ref + - test_calling_with_partially_qualified_table_ref + - test_calling_with_table_reference + - test_calling_with_value_provider +TestTableRowJsonCoder: + methods: + - json_compliance_exception + - test_invalid_json_inf + - test_invalid_json_nan + - test_invalid_json_neg_inf + - test_row_and_no_schema + - test_row_as_table_row +TestTableSchemaParser: + methods: + - test_parse_table_schema_from_json +TestTFRecordSink: + methods: + - test_write_record_multiple + - test_write_record_single +TestTFRecordUtil: + methods: + - setUp + - test_compatibility_read_write + - test_masked_crc32c + - test_masked_crc32c_crcmod + - test_read_record + - test_read_record_invalid_data_mask + - test_read_record_invalid_length_mask + - test_read_record_invalid_record + - test_write_record +TestUploaderStream: + methods: + - test_file_attributes + - test_write + - test_write_buffered + - test_write_empty +TestWriteBigTable: + methods: + - generate_row + - setUp + - test_write_metrics + - verify_write_call_metric + properties: + - TABLE_PREFIX +TestWriteGroupedRecordsToFile: + methods: + - test_files_are_created + - test_multiple_files +TestWriteRecordsToFile: + methods: + - test_files_created + - test_many_files + - test_records_are_spilled + properties: + - maxDiff +TestWriteStringsToPubSubOverride: + methods: + - test_expand + - test_expand_deprecated +TestWriteToBigQuery: + methods: + - setUp + - tearDown + - test_copy_load_job_exception + - test_dict_schema_parsing + - test_load_job_exception + - test_none_schema_parsing + - test_noop_dict_schema_parsing + - test_noop_schema_parsing + - test_schema_autodetect_not_allowed_with_avro_file_loads + - test_streaming_triggering_frequency_with_auto_sharding + - test_streaming_triggering_frequency_without_auto_sharding + - test_string_schema_parsing + - test_table_schema_parsing + - test_table_schema_parsing_end_to_end + - test_to_from_runner_api +TestWriteToPubSub: + methods: + - test_runner_api_transformation + - test_runner_api_transformation_properties_none + - test_write_messages_deprecated + - test_write_messages_success + - test_write_messages_unsupported_features + - test_write_messages_with_attributes_error + - test_write_messages_with_attributes_success +TestWriteToTFRecord: + methods: + - test_write_record_auto + - test_write_record_gzip +TextRenderer: + methods: + - option + - render_pipeline_graph +TextSink: + methods: + - flush + - open + - write +TfIdf: + methods: + - expand +TfIdfIT: + methods: + - test_basics +TFModelWrapperWithSignature: + methods: + - call +TFXRunInferenceTests: + methods: + - test_tfx_run_inference_mobilenetv2 +ThreadsafeRestrictionTracker: + methods: + - check_done + - current_progress + - current_restriction + - defer_remainder + - deferred_status + - is_bounded + - try_claim + - try_split +ThreadsafeWatermarkEstimator: + methods: + - current_watermark + - get_estimator_state + - observe_timestamp +ThrowingStateHandler: + methods: + - blocking_get + - clear + - done + - extend + - process_instruction_id +TimeBasedBufferingClosableOutputStream: + methods: + - close + - flush +TimeDomain: + methods: + - from_string + - is_event_time + - to_runner_api + properties: + - DEPENDENT_REAL_TIME + - REAL_TIME + - WATERMARK +TimePartitioning: + properties: + - expirationMs + - field + - requirePartitionFilter + - type +TimerCoderImpl: + methods: + - decode_from_stream + - encode_to_stream +TimerFiring: {} +TimerInfo: {} +TimerSpec: + methods: + - to_runner_api + properties: + - prefix +TimeSpan: + properties: + - endTime + - startTime +Timestamp: + methods: + - from_proto + - from_rfc3339 + - from_utc_datetime + - now + - of + - predecessor + - seconds + - to_proto + - to_rfc3339 + - to_utc_datetime +TimestampBoundMode: + properties: + - EXACT_STALENESS + - MAX_STALENESS + - MIN_READ_TIMESTAMP + - READ_TIMESTAMP + - STRONG +TimestampCoder: + methods: + - is_deterministic +TimestampCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +TimestampCombiner: + methods: + - get_impl + properties: + - OUTPUT_AT_EARLIEST + - OUTPUT_AT_EARLIEST_TRANSFORMED + - OUTPUT_AT_EOW + - OUTPUT_AT_LATEST +TimestampCombinerImpl: + methods: + - assign_output_time + - combine + - combine_all + - merge +TimestampedValue: {} +TimestampPrefixingWindowCoder: + methods: + - as_cloud_object + - is_deterministic + - to_type_hint +TimestampPrefixingWindowCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - estimate_size +TimeUnit: + properties: + - DAYS + - HOURS + - MICROSECONDS + - MILLISECONDS + - NANOSECONDS + - SECONDS +TimingInfo: + methods: + - processing_time + - watermark +ToBytesCoder: + methods: + - decode + - encode + - is_deterministic +ToDict: + methods: + - expand +ToDictCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +Tokenize: + methods: + - process + - setup +ToList: + methods: + - expand +ToListCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +Top: + methods: + - Largest + - LargestPerKey + - Smallest + - SmallestPerKey +TopClass: {} +TopCombineFn: + methods: + - add_input + - compact + - create_accumulator + - display_data + - extract_output + - merge_accumulators +TopologyConfig: + properties: + - computations + - dataDiskAssignments + - forwardingKeyBits + - persistentStateVersion + - userStageToComputationNameMap +TopPerMonth: + methods: + - expand +TopPerPrefix: + methods: + - expand +ToSet: + methods: + - expand +ToSetCombineFn: + methods: + - add_input + - create_accumulator + - extract_output + - merge_accumulators +ToString: + methods: + - Element + - Iterables + properties: + - Kvs +ToStringParDo: + methods: + - expand +TrainingOptions: + properties: + - autoArima + - autoArimaMaxOrder + - batchSize + - dataFrequency + - dataSplitColumn + - dataSplitEvalFraction + - dataSplitMethod + - distanceType + - dropout + - earlyStop + - feedbackType + - hiddenUnits + - holidayRegion + - horizon + - includeDrift + - initialLearnRate + - inputLabelColumns + - itemColumn + - kmeansInitializationColumn + - kmeansInitializationMethod + - l1Regularization + - l2Regularization + - labelClassWeights + - learnRate + - learnRateStrategy + - lossType + - maxIterations + - maxTreeDepth + - minRelativeProgress + - minSplitLoss + - modelUri + - nonSeasonalOrder + - numClusters + - numFactors + - optimizationStrategy + - preserveInputStructs + - subsample + - timeSeriesDataColumn + - timeSeriesIdColumn + - timeSeriesTimestampColumn + - userColumn + - walsAlpha + - warmStart +TrainingRun: + properties: + - dataSplitResult + - evaluationMetrics + - globalExplanations + - results + - startTime + - trainingOptions +TransactionInfo: + properties: + - transactionId +TransformContext: + methods: + - add_data_channel_coder + - add_or_get_coder_id + - length_prefix_pcoll_coders + - maybe_length_prefixed_and_safe_coder + - maybe_length_prefixed_coder + - parents_map + - with_state_iterables +TransformError: {} +TransformEvaluatorRegistry: + methods: + - get_evaluator + - get_root_bundle_provider + - should_execute_serially +TransformExecutor: + methods: + - attempt_call + - call +TransformIOCounter: + methods: + - add_bytes_read + - update_current_step +TransformNames: + properties: + - COLLECTION_TO_SINGLETON + - COMBINE + - CREATE_PCOLLECTION + - DO + - FLATTEN + - GROUP + - READ + - WRITE +TransformResult: {} +TransformSummary: + properties: + - displayData + - id + - inputCollectionName + - kind + - name + - outputCollectionName +TriggerContext: + methods: + - add_state + - clear_state + - clear_timer + - get_current_time + - get_state + - set_timer +TriggerCopyJobs: + methods: + - display_data + - finish_bundle + - process + - process_one + - start_bundle + properties: + - TRIGGER_DELETE_TEMP_TABLES +TriggerDriver: + methods: + - process_elements + - process_entire_key + - process_timer +TriggerEmailAlert: + methods: + - process + - setup +TriggerFn: + methods: + - from_runner_api + - has_ontime_pane + - may_lose_data + - on_element + - on_fire + - on_merge + - reset + - should_fire + - to_runner_api +TriggerLoadJobs: + methods: + - display_data + - finish_bundle + - process + - start_bundle + properties: + - ONGOING_JOBS + - TEMP_TABLES +TriggerMergeContext: + methods: + - merge +TripleParDo: + methods: + - expand +TupleCoder: + methods: + - as_cloud_object + - as_deterministic_coder + - coders + - from_runner_api_parameter + - from_type_hint + - is_deterministic + - is_kv_coder + - key_coder + - to_runner_api_parameter + - to_type_hint + - value_coder +TupleCoderImpl: {} +TupleCombineFn: + methods: + - add_input + - with_common_input +TupleHint: {} +TupleSequenceCoder: + methods: + - as_deterministic_coder + - from_type_hint + - is_deterministic + - value_coder +TupleSequenceCoderImpl: {} +TypeCheckCombineFn: + methods: + - add_input + - compact + - create_accumulator + - extract_output + - merge_accumulators + - setup + - teardown +TypeCheckError: {} +TypeCheckVisitor: + methods: + - enter_composite_transform + - leave_composite_transform + - visit_transform +TypeCheckWrapperDoFn: + methods: + - process + - type_check + - wrapper +TypeConstraint: + methods: + - bind_type_variables + - match_type_variables + - type_check + - visit +TypeInferenceError: {} +TypeOptions: + methods: + - validate +TypesAreAllTested: + methods: + - test_all_types_are_tested +TypeVariable: + methods: + - bind_type_variables + - match_type_variables +UberJarBeamJob: + methods: + - artifact_staging_endpoint + - prepare + properties: + - ARTIFACT_FOLDER + - PIPELINE_FOLDER + - PIPELINE_MANIFEST + - PIPELINE_NAME + - PIPELINE_OPTIONS_PATH + - PIPELINE_PATH +UnbatchPandas: + methods: + - expand +UnboundedOffsetRestrictionTracker: + methods: + - is_bounded +UnboundedThreadPoolExecutor: + methods: + - shutdown + - submit +UnionHint: {} +UnmergedState: + methods: + - get_global_state + - set_global_state +UnorderedList: {} +Unreify: + methods: + - process +UnsplittableRangeTracker: + methods: + - fraction_consumed + - position_at_fraction + - set_current_position + - set_split_points_unclaimed_callback + - split_points + - start_position + - stop_position + - try_claim + - try_split +UnsplittableRestrictionTracker: + methods: + - try_split +UnusableUnpickledDeferredBase: {} +UpdateBitbucketServerConfigOperationMetadata: + properties: + - bitbucketServerConfig + - completeTime + - createTime +UpdateDestinationSchema: + methods: + - display_data + - finish_bundle + - process + - start_bundle +UpdateGitHubEnterpriseConfigOperationMetadata: + properties: + - completeTime + - createTime + - githubEnterpriseConfig +UpdateGitLabConfigOperationMetadata: + properties: + - completeTime + - createTime + - gitlabConfig +UpdateWorkerPoolOperationMetadata: + properties: + - completeTime + - createTime + - workerPool +Uploader: + methods: + - finish + - put +UploaderStream: + methods: + - close + - tell + - writable + - write +UploadPartRequest: {} +UploadPartResponse: {} +UploadRequest: {} +UploadResponse: {} +UploadToDicomStore: + methods: + - expand +UserDefinedFunctionResource: + properties: + - inlineCode + - resourceUri +UserMetricsDoFn: + methods: + - finish_bundle + - process + - start_bundle +UserPipelineTracker: + methods: + - add_derived_pipeline + - add_user_pipeline + - clear + - evict + - get_pipeline + - get_user_pipeline +UserScore: + methods: + - expand +UserScoreIT: + methods: + - setUp + - test_user_score_it + - test_userscore_output_checksum_on_small_input + properties: + - DEFAULT_EXPECTED_CHECKSUM + - DEFAULT_INPUT_FILE + - DEFAULT_OUTPUT_FILE +UserSessionActivity: + methods: + - process +UserStateContext: + methods: + - commit + - get_state + - get_timer +UseSdfBoundedSourcesTests: + methods: + - test_sdf_wrap_range_source + - test_sdf_wrapper_overrides_read +ValidateResponse: + properties: + - errorMessage + - queryInfo +ValueProvider: + methods: + - get + - is_accessible +ValueProviderTests: + methods: + - setUp + - tearDown + - test_choices + - test_experiments_options_setup + - test_experiments_setup + - test_nested_value_provider_caches_value + - test_nested_value_provider_wrap_runtime + - test_nested_value_provider_wrap_static + - test_runtime_value_provider_keyword_argument + - test_runtime_value_provider_positional_argument + - test_set_runtime_option + - test_static_value_provider_choices + - test_static_value_provider_keyword_argument + - test_static_value_provider_positional_argument + - test_static_value_provider_type_cast +VariableBytes: + methods: + - argument + - argument_type + - language_type + - to_language_type + - urn +VariableString: + methods: + - argument + - argument_type + - language_type + - to_language_type + - urn +VarIntCoder: + methods: + - as_cloud_object + - is_deterministic + - to_type_hint +VarIntCoderImpl: + methods: + - decode + - decode_from_stream + - encode + - encode_to_stream + - estimate_size +VideoIntelligenceMlTestIT: + methods: + - test_label_detection_with_video_context + properties: + - VIDEO_PATH +ViewDefinition: + properties: + - query + - useLegacySql + - userDefinedFunctionResources +VisionMlTestIT: + methods: + - test_text_detection_with_language_hint +Volume: + properties: + - name + - path +WalltimeWatermarkEstimator: + methods: + - current_watermark + - default_provider + - get_estimator_state + - observe_timestamp +Warning: + properties: + - priority + - text +WatermarkEstimator: + methods: + - current_watermark + - get_estimator_state + - observe_timestamp +WatermarkEstimatorProvider: + methods: + - create_watermark_estimator + - estimator_state_coder + - initial_estimator_state +WatermarkEvent: + methods: + - to_runner_api +WatermarkManager: + methods: + - get_pcoll_node + - get_stage_node + - set_pcoll_watermark +WatermarkPolicy: + methods: + - validate_param + properties: + - ARRIVAL_TIME + - PROCESSING_TYPE +WebhookConfig: + properties: + - secret + - state +WeightedValue: + methods: + - value + - weight +WindowedBatch: + methods: + - as_windowed_values + - from_windowed_values + - with_values +WindowedTypeConstraint: + methods: + - type_check +WindowedValue: + methods: + - timestamp + - with_value +WindowedValueCoder: + methods: + - as_cloud_object + - is_deterministic + - is_kv_coder + - key_coder + - value_coder +WindowedValueCoderImpl: + methods: + - decode_from_stream + - encode_to_stream + - get_estimated_size_and_observables +WindowedValueHolder: + methods: + - from_row +WindowedValueHolderMeta: {} +WindowFn: + methods: + - assign + - get_transformed_output_time + - get_window_coder + - is_merging + - merge +WindowGroupingBuffer: + methods: + - append + - encoded_items +Windowing: + methods: + - from_runner_api + - is_default + - to_runner_api +WindowInto: + methods: + - expand + - from_runner_api_parameter + - get_windowing + - infer_output_type + - to_runner_api_parameter +WinningBids: + methods: + - expand +WithTypeHints: + methods: + - default_type_hints + - get_type_hints + - with_input_types + - with_output_types +WontImplementError: {} +WordCountIT: + methods: + - test_wordcount_fnapi_it + - test_wordcount_impersonation_it + - test_wordcount_it + - test_wordcount_it_with_prebuilt_sdk_container_cloud_build + - test_wordcount_it_with_prebuilt_sdk_container_local_docker + - test_wordcount_it_with_use_sibling_sdk_workers + properties: + - DEFAULT_CHECKSUM +WordExtractingDoFn: + methods: + - process +WorkerConfig: + properties: + - diskSizeGb + - machineType +WorkerDetails: + properties: + - workerName + - workItems +WorkerHandler: + methods: + - artifact_api_service_descriptor + - close + - control_api_service_descriptor + - create + - data_api_service_descriptor + - logging_api_service_descriptor + - register_environment + - start_worker + - state_api_service_descriptor + - stop_worker + properties: + - control_conn + - data_conn +WorkerHandlerManager: + methods: + - close_all + - get_process_bundle_descriptor + - get_worker + - get_worker_handlers + - register_process_bundle_descriptor +WorkerHealthReport: + properties: + - msg + - pods + - reportInterval + - vmBrokenCode + - vmIsBroken + - vmIsHealthy + - vmStartupTime +WorkerHealthReportResponse: + properties: + - reportInterval +WorkerIdInterceptor: + methods: + - intercept_stream_stream + - intercept_stream_unary + - intercept_unary_stream + - intercept_unary_unary +WorkerLifecycleEvent: + properties: + - containerStartTime + - event + - metadata +WorkerMessage: + properties: + - labels + - time + - workerHealthReport + - workerLifecycleEvent + - workerMessageCode + - workerMetrics + - workerShutdownNotice +WorkerMessageCode: + properties: + - code + - parameters +WorkerMessageResponse: + properties: + - workerHealthReportResponse + - workerMetricsResponse + - workerShutdownNoticeResponse +WorkerOptions: + methods: + - validate +WorkerPool: + properties: + - annotations + - createTime + - deleteTime + - displayName + - etag + - name + - privatePoolV1Config + - state + - uid + - updateTime +WorkerSettings: + properties: + - baseUrl + - reportingEnabled + - servicePath + - shuffleServicePath + - tempStoragePrefix + - workerId +WorkerShutdownNotice: + properties: + - reason +WorkerShutdownNoticeResponse: {} +WorkItem: + properties: + - configuration + - id + - initialReportIndex + - jobId + - leaseExpireTime + - mapTask + - packages + - projectId + - reportStatusInterval + - seqMapTask + - shellTask + - sourceOperationTask + - streamingComputationTask + - streamingConfigTask + - streamingSetupTask +WorkItemDetails: + properties: + - attemptId + - endTime + - metrics + - progress + - startTime + - state + - taskId +WorkItemServiceState: + properties: + - completeWorkStatus + - harnessData + - hotKeyDetection + - leaseExpireTime + - metricShortId + - nextReportIndex + - reportStatusInterval + - splitRequest + - suggestedStopPoint + - suggestedStopPosition +WorkItemStatus: + properties: + - completed + - counterUpdates + - dynamicSourceSplit + - errors + - metricUpdates + - progress + - reportedProgress + - reportIndex + - requestedLeaseDuration + - sourceFork + - sourceOperationResponse + - stopPosition + - totalThrottlerWaitTimeSeconds + - workItemId +Write: + methods: + - display_data + - expand + - from_runner_api_parameter + - to_runner_api_parameter +WriteCache: + methods: + - write_cache +WriteDisposition: + methods: + - VerifyParam + properties: + - APPEND + - EMPTY + - TRUNCATE +WriteEventDoFn: + methods: + - process +WriteGroupedRecordsToFile: + methods: + - process +WriteImpl: + methods: + - expand +WriteIndexDoFn: + methods: + - process +WriteInstruction: + properties: + - input + - sink +WriteMutation: + methods: + - delete + - insert + - insert_or_update + - replace + - update +Writer: + methods: + - at_capacity + - close + - write +WriteRecordsToFile: + methods: + - display_data + - finish_bundle + - process + - start_bundle + properties: + - UNWRITTEN_RECORD_TAG + - WRITTEN_FILE_TAG +WriteResult: + methods: + - destination_copy_jobid_pairs + - destination_file_pairs + - destination_load_jobid_pairs + - failed_rows + - failed_rows_with_errors + - validate +WriteToAvro: + methods: + - display_data + - expand +WriteToBigQuery: + methods: + - expand + - get_schema +WriteToBigTable: + methods: + - expand +WriteToDatastore: {} +WriteToFiles: + methods: + - expand + properties: + - DEFAULT_SHARDING + - MAX_NUM_WRITERS_PER_BUNDLE +WriteToJdbc: + properties: + - URN +WriteToKafka: + properties: + - byte_array_serializer + - URN +WriteToKinesis: + properties: + - URN +WriteToKVSink: + methods: + - expand +WriteToMongoDB: + methods: + - expand +WriteToParquet: + methods: + - display_data + - expand +WriteToParquetBatched: + methods: + - display_data + - expand +WriteToPubSub: + methods: + - expand + properties: + - URN +WriteToPubSubLite: + methods: + - expand +WriteToSnowflake: + methods: + - expand + properties: + - URN +WriteToSpanner: + methods: + - display_data + - expand +WriteToSpannerSchema: + properties: + - commit_deadline + - database_id + - emulator_host + - grouping_factor + - host + - instance_id + - max_batch_size_bytes + - max_cumulative_backoff + - max_number_mutations + - max_number_rows + - project_id + - table +WriteToTestSink: + methods: + - expand +WriteToText: + methods: + - expand +WriteToTFRecord: + methods: + - expand +WriteUserEvent: + methods: + - expand +WriteViaPandas: + methods: + - expand +Xyz: + methods: + - foo diff --git a/playground/frontend/build/playground_components/assets/translations/en.yaml b/playground/frontend/build/playground_components/assets/translations/en.yaml new file mode 100644 index 000000000000..41e7829afa5e --- /dev/null +++ b/playground/frontend/build/playground_components/assets/translations/en.yaml @@ -0,0 +1,103 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +dialogs: + cancel: Cancel + +errors: + error: 'Error' + failedParseOptions: Failed to parse pipeline options. + internetUnavailable: 'Internet connection is unavailable' + loading: 'Error while loading.' + loadingCatalog: 'Cannot load the example catalog.' + loadingExample: 'Cannot load the example.' + failedLoadExampleWithToken: 'Failed to load the example: {token}.' + savingSnippet: 'Cannot create a shareable link.' + unknownError: 'Unknown error. Possibly internet connection problem or CORS issue' + +examples: + defaultTitle: 'Catalog' + userSharedName: 'User Snippet' + +ui: + copyright: '© The Apache Software Foundation' + darkMode: 'Dark Mode' + lightMode: 'Light Mode' + privacyPolicy: 'Privacy Policy' + reportIssue: 'Report Issue on GitHub' + +intents: + playground: + run: 'Run Code' + reset: 'Reset Code' + +widgets: + codeEditor: + label: 'Code Text Area' + + closeButton: + label: 'Close' + + feedback: + hint: "Have feedback? We'd love to hear it, but please don't share sensitive information." + negative: 'Bad Experience' + positive: 'Good Experience' + send: 'Send Feedback' + title: 'Feedback' + + output: + filter: + all: 'All' + log: 'Log' + output: 'Output' + filterTitle: 'Display at this tab' + graph: 'Graph' + messages: + cachedResult: 'The results of this example are taken from the Apache Beam Playground cache' + pipelineCancelled: 'Pipeline cancelled' + result: 'Result' + + resetButton: + label: 'Reset' + + runOrCancelButton: + titles: + run: 'Run' + cancel: 'Cancel' + notificationTitles: + run: 'Run Code' + cancelExecution: 'Cancel Execution' + + pipelineOptions: + options: 'Options' + raw: 'Raw' + error: 'Please check the format (example: --key1 value1 --key2 value2)' + addParameter: Add parameter + saveAndClose: Save & close + input: Input + pipelineOptions: Pipeline Options + name: Name + value: Value + + versions: + beam: 'Beam {version}' + commit: 'Commit {hash} from {date}' + title: 'Versions' + titles: + frontend: 'Frontend' + router: 'Router' + runner: '{sdk} Runner' diff --git a/playground/frontend/build/playground_components/build.gradle.kts b/playground/frontend/build/playground_components/build.gradle.kts new file mode 100644 index 000000000000..1af9d6053765 --- /dev/null +++ b/playground/frontend/build/playground_components/build.gradle.kts @@ -0,0 +1,186 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.FileOutputStream + +description = "Apache Beam :: Playground :: playground_components Flutter Package" + +tasks.register("generate") { + dependsOn("generateCode") + dependsOn("extractBeamSymbols") + + group = "build" + description = "Generates all generated files." +} + +tasks.register("precommit") { + dependsOn("analyze") + dependsOn("test") + + group = "verification" + description = "All possible checks before a commit." +} + +tasks.register("analyze") { + dependsOn("generateCode") + + group = "verification" + description = "Run dart analyzer" + + doLast { + exec { + executable("dart") + args("analyze", ".") + } + } +} + +tasks.register("test") { + dependsOn("generateCode") + + group = "verification" + description = "Run tests" + + doLast { + exec { + executable("flutter") + args("test") + } + } +} + +tasks.register("cleanFlutter") { + group = "build" + description = "Remove build artifacts" + + doLast { + exec { + executable("flutter") + args("clean") + } + } +} + +tasks.register("pubGet") { + group = "build" + description = "Install dependencies" + + doLast { + exec { + executable("flutter") + args("pub", "get") + } + } +} + +tasks.register("cleanGenerated") { + group = "build" + description = "Remove all generated files" + + doLast { + println("Deleting:") + + deleteFilesByRegExp(".*\\.g\\.dart\$") + deleteFilesByRegExp(".*\\.g\\.yaml\$") + deleteFilesByRegExp(".*\\.gen\\.dart\$") + deleteFilesByRegExp(".*\\.mocks\\.dart\$") + } +} + +val deleteFilesByRegExp by extra( + fun(re: String) { + // Prints file names. + exec { + executable("find") + args("assets", "lib", "test", "-regex", re) + } + + // Actually deletes them. + exec { + executable("find") + args("assets", "lib", "test", "-regex", re, "-delete") + } + } +) + +tasks.register("generateCode") { + dependsOn("cleanFlutter") + dependsOn("pubGet") + mustRunAfter("extractBeamSymbols") + + group = "build" + description = "Generate code" + + doLast { + exec { + executable("flutter") + args("pub", "run", "build_runner", "build", "--delete-conflicting-outputs") + } + } +} + +tasks.register("extractBeamSymbols") { + dependsOn("ensureSymbolsDirectoryExists") + dependsOn("extractBeamSymbolsGo") + dependsOn("extractBeamSymbolsJava") + dependsOn("extractBeamSymbolsPython") + + group = "build" + description = "Build Beam symbols dictionaries" +} + +tasks.register("ensureSymbolsDirectoryExists") { + doLast { + exec { + executable("mkdir") + args("-p", "assets/symbols") + } + } +} + +tasks.register("extractBeamSymbolsGo") { + doLast { + exec { + workingDir("tools/extract_symbols_go") + executable("go") + args( + "run", + "extract_symbols_go.go", + "../../../../../sdks/go/pkg/beam", + ) + standardOutput = FileOutputStream("playground/frontend/playground_components/assets/symbols/go.g.yaml") + } + } +} + +tasks.register("extractBeamSymbolsJava") { + dependsOn("tools:extract_symbols_java:buildJava") +} + +tasks.register("extractBeamSymbolsPython") { + doLast { + exec { + executable("python3") + args( + "tools/extract_symbols_python/extract_symbols_python.py", + "../../../sdks/python/apache_beam", + ) + standardOutput = FileOutputStream("playground/frontend/playground_components/assets/symbols/python.g.yaml") + } + } +} diff --git a/playground/frontend/build/playground_components/lib/playground_components.dart b/playground/frontend/build/playground_components/lib/playground_components.dart new file mode 100644 index 000000000000..06959a14d960 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/playground_components.dart @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export 'src/cache/example_cache.dart'; + +export 'src/constants/analytics.dart'; +export 'src/constants/colors.dart'; +export 'src/constants/links.dart'; +export 'src/constants/sizes.dart'; +export 'src/controllers/build_metadata.dart'; +export 'src/controllers/example_loaders/examples_loader.dart'; +export 'src/controllers/feedback_controller.dart'; +export 'src/controllers/playground_controller.dart'; +export 'src/controllers/public_notifier.dart'; +export 'src/controllers/window_close_notifier/window_close_notifier.dart'; + +export 'src/enums/complexity.dart'; +export 'src/enums/feedback_rating.dart'; +export 'src/enums/output_tab.dart'; +export 'src/exceptions/examples_loading_exception.dart'; + +export 'src/models/category_with_examples.dart'; +export 'src/models/dataset.dart'; +export 'src/models/event_snippet_context.dart'; +export 'src/models/example.dart'; +export 'src/models/example_base.dart'; +export 'src/models/example_loading_descriptors/catalog_default_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/content_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/empty_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/examples_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/hive_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/http_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/standard_example_loading_descriptor.dart'; +export 'src/models/example_loading_descriptors/user_shared_example_loading_descriptor.dart'; +export 'src/models/example_view_options.dart'; +export 'src/models/intents.dart'; +export 'src/models/loading_status.dart'; +export 'src/models/outputs.dart'; +export 'src/models/run_shortcut.dart'; +export 'src/models/sdk.dart'; +export 'src/models/shortcut.dart'; +export 'src/models/snippet_file.dart'; +export 'src/models/toast.dart'; +export 'src/models/toast_type.dart'; + +export 'src/playground_components.dart'; + +export 'src/repositories/backend_urls.dart'; +export 'src/repositories/code_client/code_client.dart'; +export 'src/repositories/code_client/grpc_code_client.dart'; +export 'src/repositories/example_client/example_client.dart'; +export 'src/repositories/example_client/grpc_example_client.dart'; +export 'src/repositories/example_repository.dart'; + +export 'src/router/router_delegate.dart'; + +export 'src/services/analytics/analytics_service.dart'; +export 'src/services/analytics/events/abstract.dart'; +export 'src/services/analytics/events/app_rated.dart'; +export 'src/services/analytics/events/constants.dart'; +export 'src/services/analytics/events/external_url_navigated.dart'; +export 'src/services/analytics/events/feedback_form_sent.dart'; +export 'src/services/analytics/events/report_issue_clicked.dart'; +export 'src/services/analytics/events/run_cancelled.dart'; +export 'src/services/analytics/events/run_finished.dart'; +export 'src/services/analytics/events/run_started.dart'; +export 'src/services/analytics/events/sdk_selected.dart'; +export 'src/services/analytics/events/snippet_modified.dart'; +export 'src/services/analytics/events/snippet_reset.dart'; +export 'src/services/analytics/events/theme_set.dart'; +export 'src/services/analytics/google_analytics4_service/google_analytics4_service.dart'; +export 'src/services/symbols/loaders/yaml.dart'; + +export 'src/theme/switch_notifier.dart'; +export 'src/theme/theme.dart'; + +export 'src/util/async.dart'; +export 'src/util/dropdown_utils.dart'; +export 'src/util/iterable.dart'; +export 'src/util/logical_keyboard_key.dart'; +export 'src/util/pipeline_options.dart'; +export 'src/util/string.dart'; + +export 'src/widgets/bubble.dart'; +export 'src/widgets/buttons/privacy_policy.dart'; +export 'src/widgets/buttons/report_issue.dart'; +export 'src/widgets/clickable.dart'; +export 'src/widgets/close_button.dart'; +export 'src/widgets/complexity.dart'; +export 'src/widgets/copyright.dart'; +export 'src/widgets/dialog.dart'; +export 'src/widgets/dialogs/confirm.dart'; +export 'src/widgets/dialogs/progress.dart'; +export 'src/widgets/divider.dart'; +export 'src/widgets/drag_handle.dart'; +export 'src/widgets/dropdown_button/dropdown_button.dart'; +export 'src/widgets/feedback.dart'; +export 'src/widgets/header_icon_button.dart'; +export 'src/widgets/loading_error.dart'; +export 'src/widgets/loading_indicator.dart'; +export 'src/widgets/logo.dart'; +export 'src/widgets/output/output.dart'; +export 'src/widgets/output/output_tab.dart'; +export 'src/widgets/output/result_tab.dart'; +export 'src/widgets/overlay/body.dart'; +export 'src/widgets/overlay/opener.dart'; +export 'src/widgets/overlay/widget.dart'; +export 'src/widgets/pipeline_options_dropdown/pipeline_options_dropdown.dart'; +export 'src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_body.dart'; +export 'src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_input.dart'; +export 'src/widgets/pipeline_options_dropdown/pipeline_options_row.dart'; +export 'src/widgets/pipeline_options_dropdown/pipeline_options_text_field.dart'; +export 'src/widgets/reset_button.dart'; +export 'src/widgets/run_or_cancel_button.dart'; +export 'src/widgets/shortcut_tooltip.dart'; +export 'src/widgets/shortcuts_manager.dart'; +export 'src/widgets/snippet_editor.dart'; +export 'src/widgets/split_view.dart'; +export 'src/widgets/tab_header.dart'; +export 'src/widgets/tabs/tab_bar.dart'; +export 'src/widgets/toasts/toast_listener.dart'; +export 'src/widgets/toggle_theme_button.dart'; +export 'src/widgets/toggle_theme_icon_button.dart'; +export 'src/widgets/versions/versions.dart'; diff --git a/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel.dart b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel.dart new file mode 100644 index 000000000000..5c41c00d327e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel.dart @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export 'iis_workaround_channel_non_web.dart' + if (dart.library.html) 'iis_workaround_channel_web.dart'; diff --git a/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_non_web.dart b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_non_web.dart new file mode 100644 index 000000000000..39fb9d0ba388 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_non_web.dart @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:grpc/grpc_connection_interface.dart'; + +class IisWorkaroundChannel extends ClientChannelBase { + final Uri uri; + + IisWorkaroundChannel.xhr(this.uri) : super(); + + @override + ClientConnection createConnection() { + throw UnimplementedError('This only works in web'); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_web.dart b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_web.dart new file mode 100644 index 000000000000..b666677a643d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/iis_workaround_channel_web.dart @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:grpc/grpc_connection_interface.dart'; + +// ignore: implementation_imports +import 'package:grpc/src/client/transport/xhr_transport.dart'; + +class IisWorkaroundChannel extends ClientChannelBase { + final Uri uri; + + IisWorkaroundChannel.xhr(this.uri) : super(); + + @override + ClientConnection createConnection() { + return _IisClientConnection(uri); + } +} + +class _IisClientConnection extends XhrClientConnection { + _IisClientConnection(super.uri); + + @override + GrpcTransportStream makeRequest( + String path, + Duration? timeout, + Map metadata, + ErrorHandler onError, { + CallOptions? callOptions, + }) { + final pathWithoutFirstSlash = path.substring(1); + + return super.makeRequest( + pathWithoutFirstSlash, + timeout, + metadata, + onError, + callOptions: callOptions, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/api/v1/api.pb.dart b/playground/frontend/build/playground_components/lib/src/api/v1/api.pb.dart new file mode 100644 index 000000000000..88c83cb4bcb5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/v1/api.pb.dart @@ -0,0 +1,2565 @@ +/// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'api.pbenum.dart'; + +export 'api.pbenum.dart'; + +class Dataset extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Dataset', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: EmulatorType.EMULATOR_TYPE_UNSPECIFIED, valueOf: EmulatorType.valueOf, enumValues: EmulatorType.values) + ..m<$core.String, $core.String>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'options', entryClassName: 'Dataset.OptionsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('api.v1')) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'datasetPath') + ..hasRequiredFields = false + ; + + Dataset._() : super(); + factory Dataset({ + EmulatorType? type, + $core.Map<$core.String, $core.String>? options, + $core.String? datasetPath, + }) { + final _result = create(); + if (type != null) { + _result.type = type; + } + if (options != null) { + _result.options.addAll(options); + } + if (datasetPath != null) { + _result.datasetPath = datasetPath; + } + return _result; + } + factory Dataset.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Dataset.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Dataset clone() => Dataset()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Dataset copyWith(void Function(Dataset) updates) => super.copyWith((message) => updates(message as Dataset)) as Dataset; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Dataset create() => Dataset._(); + Dataset createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Dataset getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Dataset? _defaultInstance; + + @$pb.TagNumber(1) + EmulatorType get type => $_getN(0); + @$pb.TagNumber(1) + set type(EmulatorType v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasType() => $_has(0); + @$pb.TagNumber(1) + void clearType() => clearField(1); + + @$pb.TagNumber(2) + $core.Map<$core.String, $core.String> get options => $_getMap(1); + + @$pb.TagNumber(3) + $core.String get datasetPath => $_getSZ(2); + @$pb.TagNumber(3) + set datasetPath($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDatasetPath() => $_has(2); + @$pb.TagNumber(3) + void clearDatasetPath() => clearField(3); +} + +class RunCodeRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RunCodeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') + ..pc(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'datasets', $pb.PbFieldType.PM, subBuilder: Dataset.create) + ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'files', $pb.PbFieldType.PM, subBuilder: SnippetFile.create) + ..hasRequiredFields = false + ; + + RunCodeRequest._() : super(); + factory RunCodeRequest({ + $core.String? code, + Sdk? sdk, + $core.String? pipelineOptions, + $core.Iterable? datasets, + $core.Iterable? files, + }) { + final _result = create(); + if (code != null) { + _result.code = code; + } + if (sdk != null) { + _result.sdk = sdk; + } + if (pipelineOptions != null) { + _result.pipelineOptions = pipelineOptions; + } + if (datasets != null) { + _result.datasets.addAll(datasets); + } + if (files != null) { + _result.files.addAll(files); + } + return _result; + } + factory RunCodeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunCodeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RunCodeRequest clone() => RunCodeRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RunCodeRequest copyWith(void Function(RunCodeRequest) updates) => super.copyWith((message) => updates(message as RunCodeRequest)) as RunCodeRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RunCodeRequest create() => RunCodeRequest._(); + RunCodeRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunCodeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunCodeRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get code => $_getSZ(0); + @$pb.TagNumber(1) + set code($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => clearField(1); + + @$pb.TagNumber(2) + Sdk get sdk => $_getN(1); + @$pb.TagNumber(2) + set sdk(Sdk v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasSdk() => $_has(1); + @$pb.TagNumber(2) + void clearSdk() => clearField(2); + + @$pb.TagNumber(3) + $core.String get pipelineOptions => $_getSZ(2); + @$pb.TagNumber(3) + set pipelineOptions($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPipelineOptions() => $_has(2); + @$pb.TagNumber(3) + void clearPipelineOptions() => clearField(3); + + @$pb.TagNumber(4) + $core.List get datasets => $_getList(3); + + @$pb.TagNumber(5) + $core.List get files => $_getList(4); +} + +class RunCodeResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RunCodeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + RunCodeResponse._() : super(); + factory RunCodeResponse({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory RunCodeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunCodeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RunCodeResponse clone() => RunCodeResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RunCodeResponse copyWith(void Function(RunCodeResponse) updates) => super.copyWith((message) => updates(message as RunCodeResponse)) as RunCodeResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RunCodeResponse create() => RunCodeResponse._(); + RunCodeResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunCodeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunCodeResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class CheckStatusRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CheckStatusRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + CheckStatusRequest._() : super(); + factory CheckStatusRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory CheckStatusRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckStatusRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CheckStatusRequest clone() => CheckStatusRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CheckStatusRequest copyWith(void Function(CheckStatusRequest) updates) => super.copyWith((message) => updates(message as CheckStatusRequest)) as CheckStatusRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CheckStatusRequest create() => CheckStatusRequest._(); + CheckStatusRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckStatusRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckStatusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class CheckStatusResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CheckStatusResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) + ..hasRequiredFields = false + ; + + CheckStatusResponse._() : super(); + factory CheckStatusResponse({ + Status? status, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + return _result; + } + factory CheckStatusResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckStatusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CheckStatusResponse clone() => CheckStatusResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CheckStatusResponse copyWith(void Function(CheckStatusResponse) updates) => super.copyWith((message) => updates(message as CheckStatusResponse)) as CheckStatusResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CheckStatusResponse create() => CheckStatusResponse._(); + CheckStatusResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckStatusResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckStatusResponse? _defaultInstance; + + @$pb.TagNumber(1) + Status get status => $_getN(0); + @$pb.TagNumber(1) + set status(Status v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => clearField(1); +} + +class GetValidationOutputRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidationOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetValidationOutputRequest._() : super(); + factory GetValidationOutputRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetValidationOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidationOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidationOutputRequest clone() => GetValidationOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidationOutputRequest copyWith(void Function(GetValidationOutputRequest) updates) => super.copyWith((message) => updates(message as GetValidationOutputRequest)) as GetValidationOutputRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidationOutputRequest create() => GetValidationOutputRequest._(); + GetValidationOutputRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidationOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidationOutputRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetValidationOutputResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidationOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetValidationOutputResponse._() : super(); + factory GetValidationOutputResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetValidationOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidationOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidationOutputResponse clone() => GetValidationOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidationOutputResponse copyWith(void Function(GetValidationOutputResponse) updates) => super.copyWith((message) => updates(message as GetValidationOutputResponse)) as GetValidationOutputResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidationOutputResponse create() => GetValidationOutputResponse._(); + GetValidationOutputResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidationOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidationOutputResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetPreparationOutputRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPreparationOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetPreparationOutputRequest._() : super(); + factory GetPreparationOutputRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetPreparationOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPreparationOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPreparationOutputRequest clone() => GetPreparationOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPreparationOutputRequest copyWith(void Function(GetPreparationOutputRequest) updates) => super.copyWith((message) => updates(message as GetPreparationOutputRequest)) as GetPreparationOutputRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPreparationOutputRequest create() => GetPreparationOutputRequest._(); + GetPreparationOutputRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPreparationOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPreparationOutputRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetPreparationOutputResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPreparationOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetPreparationOutputResponse._() : super(); + factory GetPreparationOutputResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetPreparationOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPreparationOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPreparationOutputResponse clone() => GetPreparationOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPreparationOutputResponse copyWith(void Function(GetPreparationOutputResponse) updates) => super.copyWith((message) => updates(message as GetPreparationOutputResponse)) as GetPreparationOutputResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPreparationOutputResponse create() => GetPreparationOutputResponse._(); + GetPreparationOutputResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPreparationOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPreparationOutputResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetCompileOutputRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetCompileOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetCompileOutputRequest._() : super(); + factory GetCompileOutputRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetCompileOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetCompileOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetCompileOutputRequest clone() => GetCompileOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetCompileOutputRequest copyWith(void Function(GetCompileOutputRequest) updates) => super.copyWith((message) => updates(message as GetCompileOutputRequest)) as GetCompileOutputRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetCompileOutputRequest create() => GetCompileOutputRequest._(); + GetCompileOutputRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetCompileOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetCompileOutputRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetCompileOutputResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetCompileOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetCompileOutputResponse._() : super(); + factory GetCompileOutputResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetCompileOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetCompileOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetCompileOutputResponse clone() => GetCompileOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetCompileOutputResponse copyWith(void Function(GetCompileOutputResponse) updates) => super.copyWith((message) => updates(message as GetCompileOutputResponse)) as GetCompileOutputResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetCompileOutputResponse create() => GetCompileOutputResponse._(); + GetCompileOutputResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetCompileOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetCompileOutputResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetRunOutputRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRunOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetRunOutputRequest._() : super(); + factory GetRunOutputRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetRunOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunOutputRequest clone() => GetRunOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunOutputRequest copyWith(void Function(GetRunOutputRequest) updates) => super.copyWith((message) => updates(message as GetRunOutputRequest)) as GetRunOutputRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRunOutputRequest create() => GetRunOutputRequest._(); + GetRunOutputRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunOutputRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetRunOutputResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRunOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetRunOutputResponse._() : super(); + factory GetRunOutputResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetRunOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunOutputResponse clone() => GetRunOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunOutputResponse copyWith(void Function(GetRunOutputResponse) updates) => super.copyWith((message) => updates(message as GetRunOutputResponse)) as GetRunOutputResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRunOutputResponse create() => GetRunOutputResponse._(); + GetRunOutputResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunOutputResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetRunErrorRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRunErrorRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetRunErrorRequest._() : super(); + factory GetRunErrorRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetRunErrorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunErrorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunErrorRequest clone() => GetRunErrorRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunErrorRequest copyWith(void Function(GetRunErrorRequest) updates) => super.copyWith((message) => updates(message as GetRunErrorRequest)) as GetRunErrorRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRunErrorRequest create() => GetRunErrorRequest._(); + GetRunErrorRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunErrorRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunErrorRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetRunErrorResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRunErrorResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetRunErrorResponse._() : super(); + factory GetRunErrorResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetRunErrorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunErrorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunErrorResponse clone() => GetRunErrorResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunErrorResponse copyWith(void Function(GetRunErrorResponse) updates) => super.copyWith((message) => updates(message as GetRunErrorResponse)) as GetRunErrorResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRunErrorResponse create() => GetRunErrorResponse._(); + GetRunErrorResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunErrorResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunErrorResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetLogsRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetLogsRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetLogsRequest._() : super(); + factory GetLogsRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetLogsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetLogsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetLogsRequest clone() => GetLogsRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetLogsRequest copyWith(void Function(GetLogsRequest) updates) => super.copyWith((message) => updates(message as GetLogsRequest)) as GetLogsRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetLogsRequest create() => GetLogsRequest._(); + GetLogsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetLogsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetLogsRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetLogsResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetLogsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetLogsResponse._() : super(); + factory GetLogsResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetLogsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetLogsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetLogsResponse clone() => GetLogsResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetLogsResponse copyWith(void Function(GetLogsResponse) updates) => super.copyWith((message) => updates(message as GetLogsResponse)) as GetLogsResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetLogsResponse create() => GetLogsResponse._(); + GetLogsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetLogsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetLogsResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetGraphRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetGraphRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + GetGraphRequest._() : super(); + factory GetGraphRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory GetGraphRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGraphRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGraphRequest clone() => GetGraphRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGraphRequest copyWith(void Function(GetGraphRequest) updates) => super.copyWith((message) => updates(message as GetGraphRequest)) as GetGraphRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetGraphRequest create() => GetGraphRequest._(); + GetGraphRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGraphRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGraphRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class GetGraphResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetGraphResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'graph') + ..hasRequiredFields = false + ; + + GetGraphResponse._() : super(); + factory GetGraphResponse({ + $core.String? graph, + }) { + final _result = create(); + if (graph != null) { + _result.graph = graph; + } + return _result; + } + factory GetGraphResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGraphResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGraphResponse clone() => GetGraphResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGraphResponse copyWith(void Function(GetGraphResponse) updates) => super.copyWith((message) => updates(message as GetGraphResponse)) as GetGraphResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetGraphResponse create() => GetGraphResponse._(); + GetGraphResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGraphResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGraphResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get graph => $_getSZ(0); + @$pb.TagNumber(1) + set graph($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGraph() => $_has(0); + @$pb.TagNumber(1) + void clearGraph() => clearField(1); +} + +class CancelRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CancelRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineUuid') + ..hasRequiredFields = false + ; + + CancelRequest._() : super(); + factory CancelRequest({ + $core.String? pipelineUuid, + }) { + final _result = create(); + if (pipelineUuid != null) { + _result.pipelineUuid = pipelineUuid; + } + return _result; + } + factory CancelRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CancelRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CancelRequest clone() => CancelRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CancelRequest copyWith(void Function(CancelRequest) updates) => super.copyWith((message) => updates(message as CancelRequest)) as CancelRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CancelRequest create() => CancelRequest._(); + CancelRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CancelRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CancelRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get pipelineUuid => $_getSZ(0); + @$pb.TagNumber(1) + set pipelineUuid($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPipelineUuid() => $_has(0); + @$pb.TagNumber(1) + void clearPipelineUuid() => clearField(1); +} + +class CancelResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CancelResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + CancelResponse._() : super(); + factory CancelResponse() => create(); + factory CancelResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CancelResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CancelResponse clone() => CancelResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CancelResponse copyWith(void Function(CancelResponse) updates) => super.copyWith((message) => updates(message as CancelResponse)) as CancelResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CancelResponse create() => CancelResponse._(); + CancelResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CancelResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CancelResponse? _defaultInstance; +} + +class PrecompiledObject extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PrecompiledObject', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') + ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, valueOf: PrecompiledObjectType.valueOf, enumValues: PrecompiledObjectType.values) + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') + ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link') + ..aOB(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'multifile') + ..a<$core.int>(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'contextLine', $pb.PbFieldType.O3) + ..aOB(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'defaultExample') + ..e(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..e(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'complexity', $pb.PbFieldType.OE, defaultOrMaker: Complexity.COMPLEXITY_UNSPECIFIED, valueOf: Complexity.valueOf, enumValues: Complexity.values) + ..pPS(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'tags') + ..pc(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'datasets', $pb.PbFieldType.PM, subBuilder: Dataset.create) + ..aOS(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'urlVcs') + ..aOS(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'urlNotebook') + ..aOB(16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'alwaysRun') + ..aOB(17, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'neverRun') + ..hasRequiredFields = false + ; + + PrecompiledObject._() : super(); + factory PrecompiledObject({ + $core.String? cloudPath, + $core.String? name, + $core.String? description, + PrecompiledObjectType? type, + $core.String? pipelineOptions, + $core.String? link, + $core.bool? multifile, + $core.int? contextLine, + $core.bool? defaultExample, + Sdk? sdk, + Complexity? complexity, + $core.Iterable<$core.String>? tags, + $core.Iterable? datasets, + $core.String? urlVcs, + $core.String? urlNotebook, + $core.bool? alwaysRun, + $core.bool? neverRun, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + if (name != null) { + _result.name = name; + } + if (description != null) { + _result.description = description; + } + if (type != null) { + _result.type = type; + } + if (pipelineOptions != null) { + _result.pipelineOptions = pipelineOptions; + } + if (link != null) { + _result.link = link; + } + if (multifile != null) { + _result.multifile = multifile; + } + if (contextLine != null) { + _result.contextLine = contextLine; + } + if (defaultExample != null) { + _result.defaultExample = defaultExample; + } + if (sdk != null) { + _result.sdk = sdk; + } + if (complexity != null) { + _result.complexity = complexity; + } + if (tags != null) { + _result.tags.addAll(tags); + } + if (datasets != null) { + _result.datasets.addAll(datasets); + } + if (urlVcs != null) { + _result.urlVcs = urlVcs; + } + if (urlNotebook != null) { + _result.urlNotebook = urlNotebook; + } + if (alwaysRun != null) { + _result.alwaysRun = alwaysRun; + } + if (neverRun != null) { + _result.neverRun = neverRun; + } + return _result; + } + factory PrecompiledObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PrecompiledObject.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PrecompiledObject clone() => PrecompiledObject()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PrecompiledObject copyWith(void Function(PrecompiledObject) updates) => super.copyWith((message) => updates(message as PrecompiledObject)) as PrecompiledObject; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PrecompiledObject create() => PrecompiledObject._(); + PrecompiledObject createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PrecompiledObject getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PrecompiledObject? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get description => $_getSZ(2); + @$pb.TagNumber(3) + set description($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDescription() => $_has(2); + @$pb.TagNumber(3) + void clearDescription() => clearField(3); + + @$pb.TagNumber(4) + PrecompiledObjectType get type => $_getN(3); + @$pb.TagNumber(4) + set type(PrecompiledObjectType v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasType() => $_has(3); + @$pb.TagNumber(4) + void clearType() => clearField(4); + + @$pb.TagNumber(5) + $core.String get pipelineOptions => $_getSZ(4); + @$pb.TagNumber(5) + set pipelineOptions($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPipelineOptions() => $_has(4); + @$pb.TagNumber(5) + void clearPipelineOptions() => clearField(5); + + @$pb.TagNumber(6) + $core.String get link => $_getSZ(5); + @$pb.TagNumber(6) + set link($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasLink() => $_has(5); + @$pb.TagNumber(6) + void clearLink() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get multifile => $_getBF(6); + @$pb.TagNumber(7) + set multifile($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasMultifile() => $_has(6); + @$pb.TagNumber(7) + void clearMultifile() => clearField(7); + + @$pb.TagNumber(8) + $core.int get contextLine => $_getIZ(7); + @$pb.TagNumber(8) + set contextLine($core.int v) { $_setSignedInt32(7, v); } + @$pb.TagNumber(8) + $core.bool hasContextLine() => $_has(7); + @$pb.TagNumber(8) + void clearContextLine() => clearField(8); + + @$pb.TagNumber(9) + $core.bool get defaultExample => $_getBF(8); + @$pb.TagNumber(9) + set defaultExample($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(9) + $core.bool hasDefaultExample() => $_has(8); + @$pb.TagNumber(9) + void clearDefaultExample() => clearField(9); + + @$pb.TagNumber(10) + Sdk get sdk => $_getN(9); + @$pb.TagNumber(10) + set sdk(Sdk v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasSdk() => $_has(9); + @$pb.TagNumber(10) + void clearSdk() => clearField(10); + + @$pb.TagNumber(11) + Complexity get complexity => $_getN(10); + @$pb.TagNumber(11) + set complexity(Complexity v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasComplexity() => $_has(10); + @$pb.TagNumber(11) + void clearComplexity() => clearField(11); + + @$pb.TagNumber(12) + $core.List<$core.String> get tags => $_getList(11); + + @$pb.TagNumber(13) + $core.List get datasets => $_getList(12); + + @$pb.TagNumber(14) + $core.String get urlVcs => $_getSZ(13); + @$pb.TagNumber(14) + set urlVcs($core.String v) { $_setString(13, v); } + @$pb.TagNumber(14) + $core.bool hasUrlVcs() => $_has(13); + @$pb.TagNumber(14) + void clearUrlVcs() => clearField(14); + + @$pb.TagNumber(15) + $core.String get urlNotebook => $_getSZ(14); + @$pb.TagNumber(15) + set urlNotebook($core.String v) { $_setString(14, v); } + @$pb.TagNumber(15) + $core.bool hasUrlNotebook() => $_has(14); + @$pb.TagNumber(15) + void clearUrlNotebook() => clearField(15); + + @$pb.TagNumber(16) + $core.bool get alwaysRun => $_getBF(15); + @$pb.TagNumber(16) + set alwaysRun($core.bool v) { $_setBool(15, v); } + @$pb.TagNumber(16) + $core.bool hasAlwaysRun() => $_has(15); + @$pb.TagNumber(16) + void clearAlwaysRun() => clearField(16); + + @$pb.TagNumber(17) + $core.bool get neverRun => $_getBF(16); + @$pb.TagNumber(17) + set neverRun($core.bool v) { $_setBool(16, v); } + @$pb.TagNumber(17) + $core.bool hasNeverRun() => $_has(16); + @$pb.TagNumber(17) + void clearNeverRun() => clearField(17); +} + +class Categories_Category extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Categories.Category', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'categoryName') + ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObjects', $pb.PbFieldType.PM, subBuilder: PrecompiledObject.create) + ..hasRequiredFields = false + ; + + Categories_Category._() : super(); + factory Categories_Category({ + $core.String? categoryName, + $core.Iterable? precompiledObjects, + }) { + final _result = create(); + if (categoryName != null) { + _result.categoryName = categoryName; + } + if (precompiledObjects != null) { + _result.precompiledObjects.addAll(precompiledObjects); + } + return _result; + } + factory Categories_Category.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Categories_Category.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Categories_Category clone() => Categories_Category()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Categories_Category copyWith(void Function(Categories_Category) updates) => super.copyWith((message) => updates(message as Categories_Category)) as Categories_Category; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Categories_Category create() => Categories_Category._(); + Categories_Category createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Categories_Category getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Categories_Category? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get categoryName => $_getSZ(0); + @$pb.TagNumber(1) + set categoryName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCategoryName() => $_has(0); + @$pb.TagNumber(1) + void clearCategoryName() => clearField(1); + + @$pb.TagNumber(2) + $core.List get precompiledObjects => $_getList(1); +} + +class Categories extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Categories', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'categories', $pb.PbFieldType.PM, subBuilder: Categories_Category.create) + ..hasRequiredFields = false + ; + + Categories._() : super(); + factory Categories({ + Sdk? sdk, + $core.Iterable? categories, + }) { + final _result = create(); + if (sdk != null) { + _result.sdk = sdk; + } + if (categories != null) { + _result.categories.addAll(categories); + } + return _result; + } + factory Categories.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Categories.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Categories clone() => Categories()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Categories copyWith(void Function(Categories) updates) => super.copyWith((message) => updates(message as Categories)) as Categories; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Categories create() => Categories._(); + Categories createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Categories getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Categories? _defaultInstance; + + @$pb.TagNumber(1) + Sdk get sdk => $_getN(0); + @$pb.TagNumber(1) + set sdk(Sdk v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSdk() => $_has(0); + @$pb.TagNumber(1) + void clearSdk() => clearField(1); + + @$pb.TagNumber(2) + $core.List get categories => $_getList(1); +} + +class GetPrecompiledObjectsRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectsRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'category') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectsRequest._() : super(); + factory GetPrecompiledObjectsRequest({ + Sdk? sdk, + $core.String? category, + }) { + final _result = create(); + if (sdk != null) { + _result.sdk = sdk; + } + if (category != null) { + _result.category = category; + } + return _result; + } + factory GetPrecompiledObjectsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsRequest clone() => GetPrecompiledObjectsRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsRequest copyWith(void Function(GetPrecompiledObjectsRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectsRequest)) as GetPrecompiledObjectsRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectsRequest create() => GetPrecompiledObjectsRequest._(); + GetPrecompiledObjectsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectsRequest? _defaultInstance; + + @$pb.TagNumber(1) + Sdk get sdk => $_getN(0); + @$pb.TagNumber(1) + set sdk(Sdk v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSdk() => $_has(0); + @$pb.TagNumber(1) + void clearSdk() => clearField(1); + + @$pb.TagNumber(2) + $core.String get category => $_getSZ(1); + @$pb.TagNumber(2) + set category($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasCategory() => $_has(1); + @$pb.TagNumber(2) + void clearCategory() => clearField(2); +} + +class GetPrecompiledObjectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectRequest._() : super(); + factory GetPrecompiledObjectRequest({ + $core.String? cloudPath, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + return _result; + } + factory GetPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectRequest clone() => GetPrecompiledObjectRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectRequest copyWith(void Function(GetPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectRequest)) as GetPrecompiledObjectRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectRequest create() => GetPrecompiledObjectRequest._(); + GetPrecompiledObjectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); +} + +class GetPrecompiledObjectCodeRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectCodeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectCodeRequest._() : super(); + factory GetPrecompiledObjectCodeRequest({ + $core.String? cloudPath, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + return _result; + } + factory GetPrecompiledObjectCodeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectCodeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeRequest clone() => GetPrecompiledObjectCodeRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeRequest copyWith(void Function(GetPrecompiledObjectCodeRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectCodeRequest)) as GetPrecompiledObjectCodeRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectCodeRequest create() => GetPrecompiledObjectCodeRequest._(); + GetPrecompiledObjectCodeRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectCodeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectCodeRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); +} + +class GetPrecompiledObjectOutputRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectOutputRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectOutputRequest._() : super(); + factory GetPrecompiledObjectOutputRequest({ + $core.String? cloudPath, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + return _result; + } + factory GetPrecompiledObjectOutputRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectOutputRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputRequest clone() => GetPrecompiledObjectOutputRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputRequest copyWith(void Function(GetPrecompiledObjectOutputRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectOutputRequest)) as GetPrecompiledObjectOutputRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectOutputRequest create() => GetPrecompiledObjectOutputRequest._(); + GetPrecompiledObjectOutputRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectOutputRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectOutputRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); +} + +class GetPrecompiledObjectLogsRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectLogsRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectLogsRequest._() : super(); + factory GetPrecompiledObjectLogsRequest({ + $core.String? cloudPath, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + return _result; + } + factory GetPrecompiledObjectLogsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectLogsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsRequest clone() => GetPrecompiledObjectLogsRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsRequest copyWith(void Function(GetPrecompiledObjectLogsRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectLogsRequest)) as GetPrecompiledObjectLogsRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectLogsRequest create() => GetPrecompiledObjectLogsRequest._(); + GetPrecompiledObjectLogsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectLogsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectLogsRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); +} + +class GetPrecompiledObjectGraphRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectGraphRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cloudPath') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectGraphRequest._() : super(); + factory GetPrecompiledObjectGraphRequest({ + $core.String? cloudPath, + }) { + final _result = create(); + if (cloudPath != null) { + _result.cloudPath = cloudPath; + } + return _result; + } + factory GetPrecompiledObjectGraphRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectGraphRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectGraphRequest clone() => GetPrecompiledObjectGraphRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectGraphRequest copyWith(void Function(GetPrecompiledObjectGraphRequest) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectGraphRequest)) as GetPrecompiledObjectGraphRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectGraphRequest create() => GetPrecompiledObjectGraphRequest._(); + GetPrecompiledObjectGraphRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectGraphRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectGraphRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cloudPath => $_getSZ(0); + @$pb.TagNumber(1) + set cloudPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCloudPath() => $_has(0); + @$pb.TagNumber(1) + void clearCloudPath() => clearField(1); +} + +class GetDefaultPrecompiledObjectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectRequest._() : super(); + factory GetDefaultPrecompiledObjectRequest({ + Sdk? sdk, + }) { + final _result = create(); + if (sdk != null) { + _result.sdk = sdk; + } + return _result; + } + factory GetDefaultPrecompiledObjectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest clone() => GetDefaultPrecompiledObjectRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectRequest copyWith(void Function(GetDefaultPrecompiledObjectRequest) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectRequest)) as GetDefaultPrecompiledObjectRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest create() => GetDefaultPrecompiledObjectRequest._(); + GetDefaultPrecompiledObjectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectRequest? _defaultInstance; + + @$pb.TagNumber(1) + Sdk get sdk => $_getN(0); + @$pb.TagNumber(1) + set sdk(Sdk v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSdk() => $_has(0); + @$pb.TagNumber(1) + void clearSdk() => clearField(1); +} + +class GetPrecompiledObjectsResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdkCategories', $pb.PbFieldType.PM, subBuilder: Categories.create) + ..hasRequiredFields = false + ; + + GetPrecompiledObjectsResponse._() : super(); + factory GetPrecompiledObjectsResponse({ + $core.Iterable? sdkCategories, + }) { + final _result = create(); + if (sdkCategories != null) { + _result.sdkCategories.addAll(sdkCategories); + } + return _result; + } + factory GetPrecompiledObjectsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsResponse clone() => GetPrecompiledObjectsResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectsResponse copyWith(void Function(GetPrecompiledObjectsResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectsResponse)) as GetPrecompiledObjectsResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectsResponse create() => GetPrecompiledObjectsResponse._(); + GetPrecompiledObjectsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectsResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get sdkCategories => $_getList(0); +} + +class GetPrecompiledObjectResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) + ..hasRequiredFields = false + ; + + GetPrecompiledObjectResponse._() : super(); + factory GetPrecompiledObjectResponse({ + PrecompiledObject? precompiledObject, + }) { + final _result = create(); + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; + } + return _result; + } + factory GetPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectResponse clone() => GetPrecompiledObjectResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectResponse copyWith(void Function(GetPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectResponse)) as GetPrecompiledObjectResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectResponse create() => GetPrecompiledObjectResponse._(); + GetPrecompiledObjectResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectResponse? _defaultInstance; + + @$pb.TagNumber(1) + PrecompiledObject get precompiledObject => $_getN(0); + @$pb.TagNumber(1) + set precompiledObject(PrecompiledObject v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPrecompiledObject() => $_has(0); + @$pb.TagNumber(1) + void clearPrecompiledObject() => clearField(1); + @$pb.TagNumber(1) + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); +} + +class GetPrecompiledObjectCodeResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectCodeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code') + ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'files', $pb.PbFieldType.PM, subBuilder: SnippetFile.create) + ..hasRequiredFields = false + ; + + GetPrecompiledObjectCodeResponse._() : super(); + factory GetPrecompiledObjectCodeResponse({ + $core.String? code, + $core.Iterable? files, + }) { + final _result = create(); + if (code != null) { + _result.code = code; + } + if (files != null) { + _result.files.addAll(files); + } + return _result; + } + factory GetPrecompiledObjectCodeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectCodeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeResponse clone() => GetPrecompiledObjectCodeResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectCodeResponse copyWith(void Function(GetPrecompiledObjectCodeResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectCodeResponse)) as GetPrecompiledObjectCodeResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectCodeResponse create() => GetPrecompiledObjectCodeResponse._(); + GetPrecompiledObjectCodeResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectCodeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectCodeResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get code => $_getSZ(0); + @$pb.TagNumber(1) + set code($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => clearField(1); + + @$pb.TagNumber(2) + $core.List get files => $_getList(1); +} + +class GetPrecompiledObjectOutputResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectOutputResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectOutputResponse._() : super(); + factory GetPrecompiledObjectOutputResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetPrecompiledObjectOutputResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectOutputResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputResponse clone() => GetPrecompiledObjectOutputResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectOutputResponse copyWith(void Function(GetPrecompiledObjectOutputResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectOutputResponse)) as GetPrecompiledObjectOutputResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectOutputResponse create() => GetPrecompiledObjectOutputResponse._(); + GetPrecompiledObjectOutputResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectOutputResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectOutputResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetPrecompiledObjectLogsResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectLogsResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'output') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectLogsResponse._() : super(); + factory GetPrecompiledObjectLogsResponse({ + $core.String? output, + }) { + final _result = create(); + if (output != null) { + _result.output = output; + } + return _result; + } + factory GetPrecompiledObjectLogsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectLogsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsResponse clone() => GetPrecompiledObjectLogsResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectLogsResponse copyWith(void Function(GetPrecompiledObjectLogsResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectLogsResponse)) as GetPrecompiledObjectLogsResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectLogsResponse create() => GetPrecompiledObjectLogsResponse._(); + GetPrecompiledObjectLogsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectLogsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectLogsResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get output => $_getSZ(0); + @$pb.TagNumber(1) + set output($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasOutput() => $_has(0); + @$pb.TagNumber(1) + void clearOutput() => clearField(1); +} + +class GetPrecompiledObjectGraphResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPrecompiledObjectGraphResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'graph') + ..hasRequiredFields = false + ; + + GetPrecompiledObjectGraphResponse._() : super(); + factory GetPrecompiledObjectGraphResponse({ + $core.String? graph, + }) { + final _result = create(); + if (graph != null) { + _result.graph = graph; + } + return _result; + } + factory GetPrecompiledObjectGraphResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPrecompiledObjectGraphResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectGraphResponse clone() => GetPrecompiledObjectGraphResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPrecompiledObjectGraphResponse copyWith(void Function(GetPrecompiledObjectGraphResponse) updates) => super.copyWith((message) => updates(message as GetPrecompiledObjectGraphResponse)) as GetPrecompiledObjectGraphResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectGraphResponse create() => GetPrecompiledObjectGraphResponse._(); + GetPrecompiledObjectGraphResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPrecompiledObjectGraphResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPrecompiledObjectGraphResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get graph => $_getSZ(0); + @$pb.TagNumber(1) + set graph($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGraph() => $_has(0); + @$pb.TagNumber(1) + void clearGraph() => clearField(1); +} + +class GetDefaultPrecompiledObjectResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetDefaultPrecompiledObjectResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'precompiledObject', subBuilder: PrecompiledObject.create) + ..hasRequiredFields = false + ; + + GetDefaultPrecompiledObjectResponse._() : super(); + factory GetDefaultPrecompiledObjectResponse({ + PrecompiledObject? precompiledObject, + }) { + final _result = create(); + if (precompiledObject != null) { + _result.precompiledObject = precompiledObject; + } + return _result; + } + factory GetDefaultPrecompiledObjectResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDefaultPrecompiledObjectResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse clone() => GetDefaultPrecompiledObjectResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetDefaultPrecompiledObjectResponse copyWith(void Function(GetDefaultPrecompiledObjectResponse) updates) => super.copyWith((message) => updates(message as GetDefaultPrecompiledObjectResponse)) as GetDefaultPrecompiledObjectResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse create() => GetDefaultPrecompiledObjectResponse._(); + GetDefaultPrecompiledObjectResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDefaultPrecompiledObjectResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDefaultPrecompiledObjectResponse? _defaultInstance; + + @$pb.TagNumber(1) + PrecompiledObject get precompiledObject => $_getN(0); + @$pb.TagNumber(1) + set precompiledObject(PrecompiledObject v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPrecompiledObject() => $_has(0); + @$pb.TagNumber(1) + void clearPrecompiledObject() => clearField(1); + @$pb.TagNumber(1) + PrecompiledObject ensurePrecompiledObject() => $_ensure(0); +} + +class SnippetFile extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SnippetFile', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'content') + ..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isMain') + ..hasRequiredFields = false + ; + + SnippetFile._() : super(); + factory SnippetFile({ + $core.String? name, + $core.String? content, + $core.bool? isMain, + }) { + final _result = create(); + if (name != null) { + _result.name = name; + } + if (content != null) { + _result.content = content; + } + if (isMain != null) { + _result.isMain = isMain; + } + return _result; + } + factory SnippetFile.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SnippetFile.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SnippetFile clone() => SnippetFile()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SnippetFile copyWith(void Function(SnippetFile) updates) => super.copyWith((message) => updates(message as SnippetFile)) as SnippetFile; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SnippetFile create() => SnippetFile._(); + SnippetFile createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SnippetFile getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SnippetFile? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get content => $_getSZ(1); + @$pb.TagNumber(2) + set content($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasContent() => $_has(1); + @$pb.TagNumber(2) + void clearContent() => clearField(2); + + @$pb.TagNumber(3) + $core.bool get isMain => $_getBF(2); + @$pb.TagNumber(3) + set isMain($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasIsMain() => $_has(2); + @$pb.TagNumber(3) + void clearIsMain() => clearField(3); +} + +class SaveSnippetRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SaveSnippetRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'files', $pb.PbFieldType.PM, subBuilder: SnippetFile.create) + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') + ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'complexity', $pb.PbFieldType.OE, defaultOrMaker: Complexity.COMPLEXITY_UNSPECIFIED, valueOf: Complexity.valueOf, enumValues: Complexity.values) + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'persistenceKey') + ..hasRequiredFields = false + ; + + SaveSnippetRequest._() : super(); + factory SaveSnippetRequest({ + $core.Iterable? files, + Sdk? sdk, + $core.String? pipelineOptions, + Complexity? complexity, + $core.String? persistenceKey, + }) { + final _result = create(); + if (files != null) { + _result.files.addAll(files); + } + if (sdk != null) { + _result.sdk = sdk; + } + if (pipelineOptions != null) { + _result.pipelineOptions = pipelineOptions; + } + if (complexity != null) { + _result.complexity = complexity; + } + if (persistenceKey != null) { + _result.persistenceKey = persistenceKey; + } + return _result; + } + factory SaveSnippetRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SaveSnippetRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SaveSnippetRequest clone() => SaveSnippetRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SaveSnippetRequest copyWith(void Function(SaveSnippetRequest) updates) => super.copyWith((message) => updates(message as SaveSnippetRequest)) as SaveSnippetRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SaveSnippetRequest create() => SaveSnippetRequest._(); + SaveSnippetRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SaveSnippetRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SaveSnippetRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get files => $_getList(0); + + @$pb.TagNumber(2) + Sdk get sdk => $_getN(1); + @$pb.TagNumber(2) + set sdk(Sdk v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasSdk() => $_has(1); + @$pb.TagNumber(2) + void clearSdk() => clearField(2); + + @$pb.TagNumber(3) + $core.String get pipelineOptions => $_getSZ(2); + @$pb.TagNumber(3) + set pipelineOptions($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPipelineOptions() => $_has(2); + @$pb.TagNumber(3) + void clearPipelineOptions() => clearField(3); + + @$pb.TagNumber(4) + Complexity get complexity => $_getN(3); + @$pb.TagNumber(4) + set complexity(Complexity v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasComplexity() => $_has(3); + @$pb.TagNumber(4) + void clearComplexity() => clearField(4); + + @$pb.TagNumber(5) + $core.String get persistenceKey => $_getSZ(4); + @$pb.TagNumber(5) + set persistenceKey($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPersistenceKey() => $_has(4); + @$pb.TagNumber(5) + void clearPersistenceKey() => clearField(5); +} + +class SaveSnippetResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SaveSnippetResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..hasRequiredFields = false + ; + + SaveSnippetResponse._() : super(); + factory SaveSnippetResponse({ + $core.String? id, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + return _result; + } + factory SaveSnippetResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SaveSnippetResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SaveSnippetResponse clone() => SaveSnippetResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SaveSnippetResponse copyWith(void Function(SaveSnippetResponse) updates) => super.copyWith((message) => updates(message as SaveSnippetResponse)) as SaveSnippetResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SaveSnippetResponse create() => SaveSnippetResponse._(); + SaveSnippetResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SaveSnippetResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SaveSnippetResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); +} + +class GetSnippetRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetSnippetRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..hasRequiredFields = false + ; + + GetSnippetRequest._() : super(); + factory GetSnippetRequest({ + $core.String? id, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + return _result; + } + factory GetSnippetRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetSnippetRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetSnippetRequest clone() => GetSnippetRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetSnippetRequest copyWith(void Function(GetSnippetRequest) updates) => super.copyWith((message) => updates(message as GetSnippetRequest)) as GetSnippetRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetSnippetRequest create() => GetSnippetRequest._(); + GetSnippetRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetSnippetRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetSnippetRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); +} + +class GetSnippetResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetSnippetResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'files', $pb.PbFieldType.PM, subBuilder: SnippetFile.create) + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sdk', $pb.PbFieldType.OE, defaultOrMaker: Sdk.SDK_UNSPECIFIED, valueOf: Sdk.valueOf, enumValues: Sdk.values) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pipelineOptions') + ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'complexity', $pb.PbFieldType.OE, defaultOrMaker: Complexity.COMPLEXITY_UNSPECIFIED, valueOf: Complexity.valueOf, enumValues: Complexity.values) + ..hasRequiredFields = false + ; + + GetSnippetResponse._() : super(); + factory GetSnippetResponse({ + $core.Iterable? files, + Sdk? sdk, + $core.String? pipelineOptions, + Complexity? complexity, + }) { + final _result = create(); + if (files != null) { + _result.files.addAll(files); + } + if (sdk != null) { + _result.sdk = sdk; + } + if (pipelineOptions != null) { + _result.pipelineOptions = pipelineOptions; + } + if (complexity != null) { + _result.complexity = complexity; + } + return _result; + } + factory GetSnippetResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetSnippetResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetSnippetResponse clone() => GetSnippetResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetSnippetResponse copyWith(void Function(GetSnippetResponse) updates) => super.copyWith((message) => updates(message as GetSnippetResponse)) as GetSnippetResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetSnippetResponse create() => GetSnippetResponse._(); + GetSnippetResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetSnippetResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetSnippetResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get files => $_getList(0); + + @$pb.TagNumber(2) + Sdk get sdk => $_getN(1); + @$pb.TagNumber(2) + set sdk(Sdk v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasSdk() => $_has(1); + @$pb.TagNumber(2) + void clearSdk() => clearField(2); + + @$pb.TagNumber(3) + $core.String get pipelineOptions => $_getSZ(2); + @$pb.TagNumber(3) + set pipelineOptions($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPipelineOptions() => $_has(2); + @$pb.TagNumber(3) + void clearPipelineOptions() => clearField(3); + + @$pb.TagNumber(4) + Complexity get complexity => $_getN(3); + @$pb.TagNumber(4) + set complexity(Complexity v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasComplexity() => $_has(3); + @$pb.TagNumber(4) + void clearComplexity() => clearField(4); +} + +class GetMetadataRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetMetadataRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetMetadataRequest._() : super(); + factory GetMetadataRequest() => create(); + factory GetMetadataRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetMetadataRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetMetadataRequest clone() => GetMetadataRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetMetadataRequest copyWith(void Function(GetMetadataRequest) updates) => super.copyWith((message) => updates(message as GetMetadataRequest)) as GetMetadataRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetMetadataRequest create() => GetMetadataRequest._(); + GetMetadataRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetMetadataRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetMetadataRequest? _defaultInstance; +} + +class GetMetadataResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetMetadataResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'runnerSdk') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'buildCommitHash') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'buildCommitTimestampSecondsSinceEpoch') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'beamSdkVersion') + ..hasRequiredFields = false + ; + + GetMetadataResponse._() : super(); + factory GetMetadataResponse({ + $core.String? runnerSdk, + $core.String? buildCommitHash, + $fixnum.Int64? buildCommitTimestampSecondsSinceEpoch, + $core.String? beamSdkVersion, + }) { + final _result = create(); + if (runnerSdk != null) { + _result.runnerSdk = runnerSdk; + } + if (buildCommitHash != null) { + _result.buildCommitHash = buildCommitHash; + } + if (buildCommitTimestampSecondsSinceEpoch != null) { + _result.buildCommitTimestampSecondsSinceEpoch = buildCommitTimestampSecondsSinceEpoch; + } + if (beamSdkVersion != null) { + _result.beamSdkVersion = beamSdkVersion; + } + return _result; + } + factory GetMetadataResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetMetadataResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetMetadataResponse clone() => GetMetadataResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetMetadataResponse copyWith(void Function(GetMetadataResponse) updates) => super.copyWith((message) => updates(message as GetMetadataResponse)) as GetMetadataResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetMetadataResponse create() => GetMetadataResponse._(); + GetMetadataResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetMetadataResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetMetadataResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get runnerSdk => $_getSZ(0); + @$pb.TagNumber(1) + set runnerSdk($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasRunnerSdk() => $_has(0); + @$pb.TagNumber(1) + void clearRunnerSdk() => clearField(1); + + @$pb.TagNumber(2) + $core.String get buildCommitHash => $_getSZ(1); + @$pb.TagNumber(2) + set buildCommitHash($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBuildCommitHash() => $_has(1); + @$pb.TagNumber(2) + void clearBuildCommitHash() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get buildCommitTimestampSecondsSinceEpoch => $_getI64(2); + @$pb.TagNumber(3) + set buildCommitTimestampSecondsSinceEpoch($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasBuildCommitTimestampSecondsSinceEpoch() => $_has(2); + @$pb.TagNumber(3) + void clearBuildCommitTimestampSecondsSinceEpoch() => clearField(3); + + @$pb.TagNumber(4) + $core.String get beamSdkVersion => $_getSZ(3); + @$pb.TagNumber(4) + set beamSdkVersion($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasBeamSdkVersion() => $_has(3); + @$pb.TagNumber(4) + void clearBeamSdkVersion() => clearField(4); +} + diff --git a/playground/frontend/build/playground_components/lib/src/api/v1/api.pbenum.dart b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbenum.dart new file mode 100644 index 000000000000..1027dcdbd051 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbenum.dart @@ -0,0 +1,122 @@ +/// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME +import 'dart:core' as $core; +import 'package:protobuf/protobuf.dart' as $pb; + +class Sdk extends $pb.ProtobufEnum { + static const Sdk SDK_UNSPECIFIED = Sdk._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SDK_UNSPECIFIED'); + static const Sdk SDK_JAVA = Sdk._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SDK_JAVA'); + static const Sdk SDK_GO = Sdk._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SDK_GO'); + static const Sdk SDK_PYTHON = Sdk._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SDK_PYTHON'); + static const Sdk SDK_SCIO = Sdk._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SDK_SCIO'); + + static const $core.List values = [ + SDK_UNSPECIFIED, + SDK_JAVA, + SDK_GO, + SDK_PYTHON, + SDK_SCIO, + ]; + + static final $core.Map<$core.int, Sdk> _byValue = $pb.ProtobufEnum.initByValue(values); + static Sdk? valueOf($core.int value) => _byValue[value]; + + const Sdk._($core.int v, $core.String n) : super(v, n); +} + +class Status extends $pb.ProtobufEnum { + static const Status STATUS_UNSPECIFIED = Status._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_UNSPECIFIED'); + static const Status STATUS_VALIDATING = Status._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_VALIDATING'); + static const Status STATUS_VALIDATION_ERROR = Status._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_VALIDATION_ERROR'); + static const Status STATUS_PREPARING = Status._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_PREPARING'); + static const Status STATUS_PREPARATION_ERROR = Status._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_PREPARATION_ERROR'); + static const Status STATUS_COMPILING = Status._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_COMPILING'); + static const Status STATUS_COMPILE_ERROR = Status._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_COMPILE_ERROR'); + static const Status STATUS_EXECUTING = Status._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_EXECUTING'); + static const Status STATUS_FINISHED = Status._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_FINISHED'); + static const Status STATUS_RUN_ERROR = Status._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_RUN_ERROR'); + static const Status STATUS_ERROR = Status._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_ERROR'); + static const Status STATUS_RUN_TIMEOUT = Status._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_RUN_TIMEOUT'); + static const Status STATUS_CANCELED = Status._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'STATUS_CANCELED'); + + static const $core.List values = [ + STATUS_UNSPECIFIED, + STATUS_VALIDATING, + STATUS_VALIDATION_ERROR, + STATUS_PREPARING, + STATUS_PREPARATION_ERROR, + STATUS_COMPILING, + STATUS_COMPILE_ERROR, + STATUS_EXECUTING, + STATUS_FINISHED, + STATUS_RUN_ERROR, + STATUS_ERROR, + STATUS_RUN_TIMEOUT, + STATUS_CANCELED, + ]; + + static final $core.Map<$core.int, Status> _byValue = $pb.ProtobufEnum.initByValue(values); + static Status? valueOf($core.int value) => _byValue[value]; + + const Status._($core.int v, $core.String n) : super(v, n); +} + +class PrecompiledObjectType extends $pb.ProtobufEnum { + static const PrecompiledObjectType PRECOMPILED_OBJECT_TYPE_UNSPECIFIED = PrecompiledObjectType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PRECOMPILED_OBJECT_TYPE_UNSPECIFIED'); + static const PrecompiledObjectType PRECOMPILED_OBJECT_TYPE_EXAMPLE = PrecompiledObjectType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PRECOMPILED_OBJECT_TYPE_EXAMPLE'); + static const PrecompiledObjectType PRECOMPILED_OBJECT_TYPE_KATA = PrecompiledObjectType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PRECOMPILED_OBJECT_TYPE_KATA'); + static const PrecompiledObjectType PRECOMPILED_OBJECT_TYPE_UNIT_TEST = PrecompiledObjectType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PRECOMPILED_OBJECT_TYPE_UNIT_TEST'); + + static const $core.List values = [ + PRECOMPILED_OBJECT_TYPE_UNSPECIFIED, + PRECOMPILED_OBJECT_TYPE_EXAMPLE, + PRECOMPILED_OBJECT_TYPE_KATA, + PRECOMPILED_OBJECT_TYPE_UNIT_TEST, + ]; + + static final $core.Map<$core.int, PrecompiledObjectType> _byValue = $pb.ProtobufEnum.initByValue(values); + static PrecompiledObjectType? valueOf($core.int value) => _byValue[value]; + + const PrecompiledObjectType._($core.int v, $core.String n) : super(v, n); +} + +class Complexity extends $pb.ProtobufEnum { + static const Complexity COMPLEXITY_UNSPECIFIED = Complexity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'COMPLEXITY_UNSPECIFIED'); + static const Complexity COMPLEXITY_BASIC = Complexity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'COMPLEXITY_BASIC'); + static const Complexity COMPLEXITY_MEDIUM = Complexity._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'COMPLEXITY_MEDIUM'); + static const Complexity COMPLEXITY_ADVANCED = Complexity._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'COMPLEXITY_ADVANCED'); + + static const $core.List values = [ + COMPLEXITY_UNSPECIFIED, + COMPLEXITY_BASIC, + COMPLEXITY_MEDIUM, + COMPLEXITY_ADVANCED, + ]; + + static final $core.Map<$core.int, Complexity> _byValue = $pb.ProtobufEnum.initByValue(values); + static Complexity? valueOf($core.int value) => _byValue[value]; + + const Complexity._($core.int v, $core.String n) : super(v, n); +} + +class EmulatorType extends $pb.ProtobufEnum { + static const EmulatorType EMULATOR_TYPE_UNSPECIFIED = EmulatorType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'EMULATOR_TYPE_UNSPECIFIED'); + static const EmulatorType EMULATOR_TYPE_KAFKA = EmulatorType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'EMULATOR_TYPE_KAFKA'); + + static const $core.List values = [ + EMULATOR_TYPE_UNSPECIFIED, + EMULATOR_TYPE_KAFKA, + ]; + + static final $core.Map<$core.int, EmulatorType> _byValue = $pb.ProtobufEnum.initByValue(values); + static EmulatorType? valueOf($core.int value) => _byValue[value]; + + const EmulatorType._($core.int v, $core.String n) : super(v, n); +} + diff --git a/playground/frontend/build/playground_components/lib/src/api/v1/api.pbgrpc.dart b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbgrpc.dart new file mode 100644 index 000000000000..2e54bbcb7294 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbgrpc.dart @@ -0,0 +1,600 @@ +/// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'api.pb.dart' as $0; +export 'api.pb.dart'; + +class PlaygroundServiceClient extends $grpc.Client { + static final _$runCode = + $grpc.ClientMethod<$0.RunCodeRequest, $0.RunCodeResponse>( + '/api.v1.PlaygroundService/RunCode', + ($0.RunCodeRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.RunCodeResponse.fromBuffer(value)); + static final _$checkStatus = + $grpc.ClientMethod<$0.CheckStatusRequest, $0.CheckStatusResponse>( + '/api.v1.PlaygroundService/CheckStatus', + ($0.CheckStatusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.CheckStatusResponse.fromBuffer(value)); + static final _$getRunOutput = + $grpc.ClientMethod<$0.GetRunOutputRequest, $0.GetRunOutputResponse>( + '/api.v1.PlaygroundService/GetRunOutput', + ($0.GetRunOutputRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetRunOutputResponse.fromBuffer(value)); + static final _$getLogs = + $grpc.ClientMethod<$0.GetLogsRequest, $0.GetLogsResponse>( + '/api.v1.PlaygroundService/GetLogs', + ($0.GetLogsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetLogsResponse.fromBuffer(value)); + static final _$getGraph = + $grpc.ClientMethod<$0.GetGraphRequest, $0.GetGraphResponse>( + '/api.v1.PlaygroundService/GetGraph', + ($0.GetGraphRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetGraphResponse.fromBuffer(value)); + static final _$getRunError = + $grpc.ClientMethod<$0.GetRunErrorRequest, $0.GetRunErrorResponse>( + '/api.v1.PlaygroundService/GetRunError', + ($0.GetRunErrorRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetRunErrorResponse.fromBuffer(value)); + static final _$getValidationOutput = $grpc.ClientMethod< + $0.GetValidationOutputRequest, $0.GetValidationOutputResponse>( + '/api.v1.PlaygroundService/GetValidationOutput', + ($0.GetValidationOutputRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetValidationOutputResponse.fromBuffer(value)); + static final _$getPreparationOutput = $grpc.ClientMethod< + $0.GetPreparationOutputRequest, $0.GetPreparationOutputResponse>( + '/api.v1.PlaygroundService/GetPreparationOutput', + ($0.GetPreparationOutputRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPreparationOutputResponse.fromBuffer(value)); + static final _$getCompileOutput = $grpc.ClientMethod< + $0.GetCompileOutputRequest, $0.GetCompileOutputResponse>( + '/api.v1.PlaygroundService/GetCompileOutput', + ($0.GetCompileOutputRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetCompileOutputResponse.fromBuffer(value)); + static final _$cancel = + $grpc.ClientMethod<$0.CancelRequest, $0.CancelResponse>( + '/api.v1.PlaygroundService/Cancel', + ($0.CancelRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.CancelResponse.fromBuffer(value)); + static final _$getPrecompiledObjects = $grpc.ClientMethod< + $0.GetPrecompiledObjectsRequest, $0.GetPrecompiledObjectsResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObjects', + ($0.GetPrecompiledObjectsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectsResponse.fromBuffer(value)); + static final _$getPrecompiledObject = $grpc.ClientMethod< + $0.GetPrecompiledObjectRequest, $0.GetPrecompiledObjectResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObject', + ($0.GetPrecompiledObjectRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectResponse.fromBuffer(value)); + static final _$getPrecompiledObjectCode = $grpc.ClientMethod< + $0.GetPrecompiledObjectCodeRequest, + $0.GetPrecompiledObjectCodeResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObjectCode', + ($0.GetPrecompiledObjectCodeRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectCodeResponse.fromBuffer(value)); + static final _$getPrecompiledObjectOutput = $grpc.ClientMethod< + $0.GetPrecompiledObjectOutputRequest, + $0.GetPrecompiledObjectOutputResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObjectOutput', + ($0.GetPrecompiledObjectOutputRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectOutputResponse.fromBuffer(value)); + static final _$getPrecompiledObjectLogs = $grpc.ClientMethod< + $0.GetPrecompiledObjectLogsRequest, + $0.GetPrecompiledObjectLogsResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObjectLogs', + ($0.GetPrecompiledObjectLogsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectLogsResponse.fromBuffer(value)); + static final _$getPrecompiledObjectGraph = $grpc.ClientMethod< + $0.GetPrecompiledObjectGraphRequest, + $0.GetPrecompiledObjectGraphResponse>( + '/api.v1.PlaygroundService/GetPrecompiledObjectGraph', + ($0.GetPrecompiledObjectGraphRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectGraphResponse.fromBuffer(value)); + static final _$getDefaultPrecompiledObject = $grpc.ClientMethod< + $0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + '/api.v1.PlaygroundService/GetDefaultPrecompiledObject', + ($0.GetDefaultPrecompiledObjectRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetDefaultPrecompiledObjectResponse.fromBuffer(value)); + static final _$saveSnippet = + $grpc.ClientMethod<$0.SaveSnippetRequest, $0.SaveSnippetResponse>( + '/api.v1.PlaygroundService/SaveSnippet', + ($0.SaveSnippetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.SaveSnippetResponse.fromBuffer(value)); + static final _$getSnippet = + $grpc.ClientMethod<$0.GetSnippetRequest, $0.GetSnippetResponse>( + '/api.v1.PlaygroundService/GetSnippet', + ($0.GetSnippetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetSnippetResponse.fromBuffer(value)); + static final _$getMetadata = + $grpc.ClientMethod<$0.GetMetadataRequest, $0.GetMetadataResponse>( + '/api.v1.PlaygroundService/GetMetadata', + ($0.GetMetadataRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetMetadataResponse.fromBuffer(value)); + + PlaygroundServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, interceptors: interceptors); + + $grpc.ResponseFuture<$0.RunCodeResponse> runCode($0.RunCodeRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$runCode, request, options: options); + } + + $grpc.ResponseFuture<$0.CheckStatusResponse> checkStatus( + $0.CheckStatusRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$checkStatus, request, options: options); + } + + $grpc.ResponseFuture<$0.GetRunOutputResponse> getRunOutput( + $0.GetRunOutputRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getRunOutput, request, options: options); + } + + $grpc.ResponseFuture<$0.GetLogsResponse> getLogs($0.GetLogsRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getLogs, request, options: options); + } + + $grpc.ResponseFuture<$0.GetGraphResponse> getGraph($0.GetGraphRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getGraph, request, options: options); + } + + $grpc.ResponseFuture<$0.GetRunErrorResponse> getRunError( + $0.GetRunErrorRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getRunError, request, options: options); + } + + $grpc.ResponseFuture<$0.GetValidationOutputResponse> getValidationOutput( + $0.GetValidationOutputRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getValidationOutput, request, options: options); + } + + $grpc.ResponseFuture<$0.GetPreparationOutputResponse> getPreparationOutput( + $0.GetPreparationOutputRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPreparationOutput, request, options: options); + } + + $grpc.ResponseFuture<$0.GetCompileOutputResponse> getCompileOutput( + $0.GetCompileOutputRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getCompileOutput, request, options: options); + } + + $grpc.ResponseFuture<$0.CancelResponse> cancel($0.CancelRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$cancel, request, options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectsResponse> getPrecompiledObjects( + $0.GetPrecompiledObjectsRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObjects, request, options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectResponse> getPrecompiledObject( + $0.GetPrecompiledObjectRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObject, request, options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectCodeResponse> + getPrecompiledObjectCode($0.GetPrecompiledObjectCodeRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObjectCode, request, + options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectOutputResponse> + getPrecompiledObjectOutput($0.GetPrecompiledObjectOutputRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObjectOutput, request, + options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectLogsResponse> + getPrecompiledObjectLogs($0.GetPrecompiledObjectLogsRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObjectLogs, request, + options: options); + } + + $grpc.ResponseFuture<$0.GetPrecompiledObjectGraphResponse> + getPrecompiledObjectGraph($0.GetPrecompiledObjectGraphRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getPrecompiledObjectGraph, request, + options: options); + } + + $grpc.ResponseFuture<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($0.GetDefaultPrecompiledObjectRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getDefaultPrecompiledObject, request, + options: options); + } + + $grpc.ResponseFuture<$0.SaveSnippetResponse> saveSnippet( + $0.SaveSnippetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$saveSnippet, request, options: options); + } + + $grpc.ResponseFuture<$0.GetSnippetResponse> getSnippet( + $0.GetSnippetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getSnippet, request, options: options); + } + + $grpc.ResponseFuture<$0.GetMetadataResponse> getMetadata( + $0.GetMetadataRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getMetadata, request, options: options); + } +} + +abstract class PlaygroundServiceBase extends $grpc.Service { + $core.String get $name => 'api.v1.PlaygroundService'; + + PlaygroundServiceBase() { + $addMethod($grpc.ServiceMethod<$0.RunCodeRequest, $0.RunCodeResponse>( + 'RunCode', + runCode_Pre, + false, + false, + ($core.List<$core.int> value) => $0.RunCodeRequest.fromBuffer(value), + ($0.RunCodeResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.CheckStatusRequest, $0.CheckStatusResponse>( + 'CheckStatus', + checkStatus_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.CheckStatusRequest.fromBuffer(value), + ($0.CheckStatusResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetRunOutputRequest, $0.GetRunOutputResponse>( + 'GetRunOutput', + getRunOutput_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetRunOutputRequest.fromBuffer(value), + ($0.GetRunOutputResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetLogsRequest, $0.GetLogsResponse>( + 'GetLogs', + getLogs_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetLogsRequest.fromBuffer(value), + ($0.GetLogsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetGraphRequest, $0.GetGraphResponse>( + 'GetGraph', + getGraph_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetGraphRequest.fromBuffer(value), + ($0.GetGraphResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetRunErrorRequest, $0.GetRunErrorResponse>( + 'GetRunError', + getRunError_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetRunErrorRequest.fromBuffer(value), + ($0.GetRunErrorResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetValidationOutputRequest, + $0.GetValidationOutputResponse>( + 'GetValidationOutput', + getValidationOutput_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetValidationOutputRequest.fromBuffer(value), + ($0.GetValidationOutputResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPreparationOutputRequest, + $0.GetPreparationOutputResponse>( + 'GetPreparationOutput', + getPreparationOutput_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPreparationOutputRequest.fromBuffer(value), + ($0.GetPreparationOutputResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetCompileOutputRequest, + $0.GetCompileOutputResponse>( + 'GetCompileOutput', + getCompileOutput_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetCompileOutputRequest.fromBuffer(value), + ($0.GetCompileOutputResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.CancelRequest, $0.CancelResponse>( + 'Cancel', + cancel_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CancelRequest.fromBuffer(value), + ($0.CancelResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectsRequest, + $0.GetPrecompiledObjectsResponse>( + 'GetPrecompiledObjects', + getPrecompiledObjects_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectsRequest.fromBuffer(value), + ($0.GetPrecompiledObjectsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectRequest, + $0.GetPrecompiledObjectResponse>( + 'GetPrecompiledObject', + getPrecompiledObject_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectRequest.fromBuffer(value), + ($0.GetPrecompiledObjectResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectCodeRequest, + $0.GetPrecompiledObjectCodeResponse>( + 'GetPrecompiledObjectCode', + getPrecompiledObjectCode_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectCodeRequest.fromBuffer(value), + ($0.GetPrecompiledObjectCodeResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectOutputRequest, + $0.GetPrecompiledObjectOutputResponse>( + 'GetPrecompiledObjectOutput', + getPrecompiledObjectOutput_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectOutputRequest.fromBuffer(value), + ($0.GetPrecompiledObjectOutputResponse value) => + value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectLogsRequest, + $0.GetPrecompiledObjectLogsResponse>( + 'GetPrecompiledObjectLogs', + getPrecompiledObjectLogs_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectLogsRequest.fromBuffer(value), + ($0.GetPrecompiledObjectLogsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetPrecompiledObjectGraphRequest, + $0.GetPrecompiledObjectGraphResponse>( + 'GetPrecompiledObjectGraph', + getPrecompiledObjectGraph_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetPrecompiledObjectGraphRequest.fromBuffer(value), + ($0.GetPrecompiledObjectGraphResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetDefaultPrecompiledObjectRequest, + $0.GetDefaultPrecompiledObjectResponse>( + 'GetDefaultPrecompiledObject', + getDefaultPrecompiledObject_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetDefaultPrecompiledObjectRequest.fromBuffer(value), + ($0.GetDefaultPrecompiledObjectResponse value) => + value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.SaveSnippetRequest, $0.SaveSnippetResponse>( + 'SaveSnippet', + saveSnippet_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.SaveSnippetRequest.fromBuffer(value), + ($0.SaveSnippetResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetSnippetRequest, $0.GetSnippetResponse>( + 'GetSnippet', + getSnippet_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetSnippetRequest.fromBuffer(value), + ($0.GetSnippetResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetMetadataRequest, $0.GetMetadataResponse>( + 'GetMetadata', + getMetadata_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetMetadataRequest.fromBuffer(value), + ($0.GetMetadataResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.RunCodeResponse> runCode_Pre( + $grpc.ServiceCall call, $async.Future<$0.RunCodeRequest> request) async { + return runCode(call, await request); + } + + $async.Future<$0.CheckStatusResponse> checkStatus_Pre($grpc.ServiceCall call, + $async.Future<$0.CheckStatusRequest> request) async { + return checkStatus(call, await request); + } + + $async.Future<$0.GetRunOutputResponse> getRunOutput_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetRunOutputRequest> request) async { + return getRunOutput(call, await request); + } + + $async.Future<$0.GetLogsResponse> getLogs_Pre( + $grpc.ServiceCall call, $async.Future<$0.GetLogsRequest> request) async { + return getLogs(call, await request); + } + + $async.Future<$0.GetGraphResponse> getGraph_Pre( + $grpc.ServiceCall call, $async.Future<$0.GetGraphRequest> request) async { + return getGraph(call, await request); + } + + $async.Future<$0.GetRunErrorResponse> getRunError_Pre($grpc.ServiceCall call, + $async.Future<$0.GetRunErrorRequest> request) async { + return getRunError(call, await request); + } + + $async.Future<$0.GetValidationOutputResponse> getValidationOutput_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetValidationOutputRequest> request) async { + return getValidationOutput(call, await request); + } + + $async.Future<$0.GetPreparationOutputResponse> getPreparationOutput_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetPreparationOutputRequest> request) async { + return getPreparationOutput(call, await request); + } + + $async.Future<$0.GetCompileOutputResponse> getCompileOutput_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetCompileOutputRequest> request) async { + return getCompileOutput(call, await request); + } + + $async.Future<$0.CancelResponse> cancel_Pre( + $grpc.ServiceCall call, $async.Future<$0.CancelRequest> request) async { + return cancel(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectsResponse> getPrecompiledObjects_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectsRequest> request) async { + return getPrecompiledObjects(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectResponse> getPrecompiledObject_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectRequest> request) async { + return getPrecompiledObject(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectCodeResponse> + getPrecompiledObjectCode_Pre($grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectCodeRequest> request) async { + return getPrecompiledObjectCode(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectOutputResponse> + getPrecompiledObjectOutput_Pre($grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectOutputRequest> request) async { + return getPrecompiledObjectOutput(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectLogsResponse> + getPrecompiledObjectLogs_Pre($grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectLogsRequest> request) async { + return getPrecompiledObjectLogs(call, await request); + } + + $async.Future<$0.GetPrecompiledObjectGraphResponse> + getPrecompiledObjectGraph_Pre($grpc.ServiceCall call, + $async.Future<$0.GetPrecompiledObjectGraphRequest> request) async { + return getPrecompiledObjectGraph(call, await request); + } + + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject_Pre($grpc.ServiceCall call, + $async.Future<$0.GetDefaultPrecompiledObjectRequest> request) async { + return getDefaultPrecompiledObject(call, await request); + } + + $async.Future<$0.SaveSnippetResponse> saveSnippet_Pre($grpc.ServiceCall call, + $async.Future<$0.SaveSnippetRequest> request) async { + return saveSnippet(call, await request); + } + + $async.Future<$0.GetSnippetResponse> getSnippet_Pre($grpc.ServiceCall call, + $async.Future<$0.GetSnippetRequest> request) async { + return getSnippet(call, await request); + } + + $async.Future<$0.GetMetadataResponse> getMetadata_Pre($grpc.ServiceCall call, + $async.Future<$0.GetMetadataRequest> request) async { + return getMetadata(call, await request); + } + + $async.Future<$0.RunCodeResponse> runCode( + $grpc.ServiceCall call, $0.RunCodeRequest request); + $async.Future<$0.CheckStatusResponse> checkStatus( + $grpc.ServiceCall call, $0.CheckStatusRequest request); + $async.Future<$0.GetRunOutputResponse> getRunOutput( + $grpc.ServiceCall call, $0.GetRunOutputRequest request); + $async.Future<$0.GetLogsResponse> getLogs( + $grpc.ServiceCall call, $0.GetLogsRequest request); + $async.Future<$0.GetGraphResponse> getGraph( + $grpc.ServiceCall call, $0.GetGraphRequest request); + $async.Future<$0.GetRunErrorResponse> getRunError( + $grpc.ServiceCall call, $0.GetRunErrorRequest request); + $async.Future<$0.GetValidationOutputResponse> getValidationOutput( + $grpc.ServiceCall call, $0.GetValidationOutputRequest request); + $async.Future<$0.GetPreparationOutputResponse> getPreparationOutput( + $grpc.ServiceCall call, $0.GetPreparationOutputRequest request); + $async.Future<$0.GetCompileOutputResponse> getCompileOutput( + $grpc.ServiceCall call, $0.GetCompileOutputRequest request); + $async.Future<$0.CancelResponse> cancel( + $grpc.ServiceCall call, $0.CancelRequest request); + $async.Future<$0.GetPrecompiledObjectsResponse> getPrecompiledObjects( + $grpc.ServiceCall call, $0.GetPrecompiledObjectsRequest request); + $async.Future<$0.GetPrecompiledObjectResponse> getPrecompiledObject( + $grpc.ServiceCall call, $0.GetPrecompiledObjectRequest request); + $async.Future<$0.GetPrecompiledObjectCodeResponse> getPrecompiledObjectCode( + $grpc.ServiceCall call, $0.GetPrecompiledObjectCodeRequest request); + $async.Future<$0.GetPrecompiledObjectOutputResponse> + getPrecompiledObjectOutput( + $grpc.ServiceCall call, $0.GetPrecompiledObjectOutputRequest request); + $async.Future<$0.GetPrecompiledObjectLogsResponse> getPrecompiledObjectLogs( + $grpc.ServiceCall call, $0.GetPrecompiledObjectLogsRequest request); + $async.Future<$0.GetPrecompiledObjectGraphResponse> getPrecompiledObjectGraph( + $grpc.ServiceCall call, $0.GetPrecompiledObjectGraphRequest request); + $async.Future<$0.GetDefaultPrecompiledObjectResponse> + getDefaultPrecompiledObject($grpc.ServiceCall call, + $0.GetDefaultPrecompiledObjectRequest request); + $async.Future<$0.SaveSnippetResponse> saveSnippet( + $grpc.ServiceCall call, $0.SaveSnippetRequest request); + $async.Future<$0.GetSnippetResponse> getSnippet( + $grpc.ServiceCall call, $0.GetSnippetRequest request); + $async.Future<$0.GetMetadataResponse> getMetadata( + $grpc.ServiceCall call, $0.GetMetadataRequest request); +} diff --git a/playground/frontend/build/playground_components/lib/src/api/v1/api.pbjson.dart b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbjson.dart new file mode 100644 index 000000000000..d99d43af645f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/api/v1/api.pbjson.dart @@ -0,0 +1,575 @@ +/// +// Generated code. Do not modify. +// source: api/v1/api.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use sdkDescriptor instead') +const Sdk$json = const { + '1': 'Sdk', + '2': const [ + const {'1': 'SDK_UNSPECIFIED', '2': 0}, + const {'1': 'SDK_JAVA', '2': 1}, + const {'1': 'SDK_GO', '2': 2}, + const {'1': 'SDK_PYTHON', '2': 3}, + const {'1': 'SDK_SCIO', '2': 4}, + ], +}; + +/// Descriptor for `Sdk`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List sdkDescriptor = $convert.base64Decode('CgNTZGsSEwoPU0RLX1VOU1BFQ0lGSUVEEAASDAoIU0RLX0pBVkEQARIKCgZTREtfR08QAhIOCgpTREtfUFlUSE9OEAMSDAoIU0RLX1NDSU8QBA=='); +@$core.Deprecated('Use statusDescriptor instead') +const Status$json = const { + '1': 'Status', + '2': const [ + const {'1': 'STATUS_UNSPECIFIED', '2': 0}, + const {'1': 'STATUS_VALIDATING', '2': 1}, + const {'1': 'STATUS_VALIDATION_ERROR', '2': 2}, + const {'1': 'STATUS_PREPARING', '2': 3}, + const {'1': 'STATUS_PREPARATION_ERROR', '2': 4}, + const {'1': 'STATUS_COMPILING', '2': 5}, + const {'1': 'STATUS_COMPILE_ERROR', '2': 6}, + const {'1': 'STATUS_EXECUTING', '2': 7}, + const {'1': 'STATUS_FINISHED', '2': 8}, + const {'1': 'STATUS_RUN_ERROR', '2': 9}, + const {'1': 'STATUS_ERROR', '2': 10}, + const {'1': 'STATUS_RUN_TIMEOUT', '2': 11}, + const {'1': 'STATUS_CANCELED', '2': 12}, + ], +}; + +/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List statusDescriptor = $convert.base64Decode('CgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASFQoRU1RBVFVTX1ZBTElEQVRJTkcQARIbChdTVEFUVVNfVkFMSURBVElPTl9FUlJPUhACEhQKEFNUQVRVU19QUkVQQVJJTkcQAxIcChhTVEFUVVNfUFJFUEFSQVRJT05fRVJST1IQBBIUChBTVEFUVVNfQ09NUElMSU5HEAUSGAoUU1RBVFVTX0NPTVBJTEVfRVJST1IQBhIUChBTVEFUVVNfRVhFQ1VUSU5HEAcSEwoPU1RBVFVTX0ZJTklTSEVEEAgSFAoQU1RBVFVTX1JVTl9FUlJPUhAJEhAKDFNUQVRVU19FUlJPUhAKEhYKElNUQVRVU19SVU5fVElNRU9VVBALEhMKD1NUQVRVU19DQU5DRUxFRBAM'); +@$core.Deprecated('Use precompiledObjectTypeDescriptor instead') +const PrecompiledObjectType$json = const { + '1': 'PrecompiledObjectType', + '2': const [ + const {'1': 'PRECOMPILED_OBJECT_TYPE_UNSPECIFIED', '2': 0}, + const {'1': 'PRECOMPILED_OBJECT_TYPE_EXAMPLE', '2': 1}, + const {'1': 'PRECOMPILED_OBJECT_TYPE_KATA', '2': 2}, + const {'1': 'PRECOMPILED_OBJECT_TYPE_UNIT_TEST', '2': 3}, + ], +}; + +/// Descriptor for `PrecompiledObjectType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List precompiledObjectTypeDescriptor = $convert.base64Decode('ChVQcmVjb21waWxlZE9iamVjdFR5cGUSJwojUFJFQ09NUElMRURfT0JKRUNUX1RZUEVfVU5TUEVDSUZJRUQQABIjCh9QUkVDT01QSUxFRF9PQkpFQ1RfVFlQRV9FWEFNUExFEAESIAocUFJFQ09NUElMRURfT0JKRUNUX1RZUEVfS0FUQRACEiUKIVBSRUNPTVBJTEVEX09CSkVDVF9UWVBFX1VOSVRfVEVTVBAD'); +@$core.Deprecated('Use complexityDescriptor instead') +const Complexity$json = const { + '1': 'Complexity', + '2': const [ + const {'1': 'COMPLEXITY_UNSPECIFIED', '2': 0}, + const {'1': 'COMPLEXITY_BASIC', '2': 1}, + const {'1': 'COMPLEXITY_MEDIUM', '2': 2}, + const {'1': 'COMPLEXITY_ADVANCED', '2': 3}, + ], +}; + +/// Descriptor for `Complexity`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List complexityDescriptor = $convert.base64Decode('CgpDb21wbGV4aXR5EhoKFkNPTVBMRVhJVFlfVU5TUEVDSUZJRUQQABIUChBDT01QTEVYSVRZX0JBU0lDEAESFQoRQ09NUExFWElUWV9NRURJVU0QAhIXChNDT01QTEVYSVRZX0FEVkFOQ0VEEAM='); +@$core.Deprecated('Use emulatorTypeDescriptor instead') +const EmulatorType$json = const { + '1': 'EmulatorType', + '2': const [ + const {'1': 'EMULATOR_TYPE_UNSPECIFIED', '2': 0}, + const {'1': 'EMULATOR_TYPE_KAFKA', '2': 1}, + ], +}; + +/// Descriptor for `EmulatorType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List emulatorTypeDescriptor = $convert.base64Decode('CgxFbXVsYXRvclR5cGUSHQoZRU1VTEFUT1JfVFlQRV9VTlNQRUNJRklFRBAAEhcKE0VNVUxBVE9SX1RZUEVfS0FGS0EQAQ=='); +@$core.Deprecated('Use datasetDescriptor instead') +const Dataset$json = const { + '1': 'Dataset', + '2': const [ + const {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.api.v1.EmulatorType', '10': 'type'}, + const {'1': 'options', '3': 2, '4': 3, '5': 11, '6': '.api.v1.Dataset.OptionsEntry', '10': 'options'}, + const {'1': 'dataset_path', '3': 3, '4': 1, '5': 9, '10': 'datasetPath'}, + ], + '3': const [Dataset_OptionsEntry$json], +}; + +@$core.Deprecated('Use datasetDescriptor instead') +const Dataset_OptionsEntry$json = const { + '1': 'OptionsEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +/// Descriptor for `Dataset`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List datasetDescriptor = $convert.base64Decode('CgdEYXRhc2V0EigKBHR5cGUYASABKA4yFC5hcGkudjEuRW11bGF0b3JUeXBlUgR0eXBlEjYKB29wdGlvbnMYAiADKAsyHC5hcGkudjEuRGF0YXNldC5PcHRpb25zRW50cnlSB29wdGlvbnMSIQoMZGF0YXNldF9wYXRoGAMgASgJUgtkYXRhc2V0UGF0aBo6CgxPcHRpb25zRW50cnkSEAoDa2V5GAEgASgJUgNrZXkSFAoFdmFsdWUYAiABKAlSBXZhbHVlOgI4AQ=='); +@$core.Deprecated('Use runCodeRequestDescriptor instead') +const RunCodeRequest$json = const { + '1': 'RunCodeRequest', + '2': const [ + const {'1': 'code', '3': 1, '4': 1, '5': 9, '10': 'code'}, + const {'1': 'sdk', '3': 2, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'pipeline_options', '3': 3, '4': 1, '5': 9, '10': 'pipelineOptions'}, + const {'1': 'datasets', '3': 4, '4': 3, '5': 11, '6': '.api.v1.Dataset', '10': 'datasets'}, + const {'1': 'files', '3': 5, '4': 3, '5': 11, '6': '.api.v1.SnippetFile', '10': 'files'}, + ], +}; + +/// Descriptor for `RunCodeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List runCodeRequestDescriptor = $convert.base64Decode('Cg5SdW5Db2RlUmVxdWVzdBISCgRjb2RlGAEgASgJUgRjb2RlEh0KA3NkaxgCIAEoDjILLmFwaS52MS5TZGtSA3NkaxIpChBwaXBlbGluZV9vcHRpb25zGAMgASgJUg9waXBlbGluZU9wdGlvbnMSKwoIZGF0YXNldHMYBCADKAsyDy5hcGkudjEuRGF0YXNldFIIZGF0YXNldHMSKQoFZmlsZXMYBSADKAsyEy5hcGkudjEuU25pcHBldEZpbGVSBWZpbGVz'); +@$core.Deprecated('Use runCodeResponseDescriptor instead') +const RunCodeResponse$json = const { + '1': 'RunCodeResponse', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `RunCodeResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List runCodeResponseDescriptor = $convert.base64Decode('Cg9SdW5Db2RlUmVzcG9uc2USIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +@$core.Deprecated('Use checkStatusRequestDescriptor instead') +const CheckStatusRequest$json = const { + '1': 'CheckStatusRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `CheckStatusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkStatusRequestDescriptor = $convert.base64Decode('ChJDaGVja1N0YXR1c1JlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +@$core.Deprecated('Use checkStatusResponseDescriptor instead') +const CheckStatusResponse$json = const { + '1': 'CheckStatusResponse', + '2': const [ + const {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `CheckStatusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkStatusResponseDescriptor = $convert.base64Decode('ChNDaGVja1N0YXR1c1Jlc3BvbnNlEiYKBnN0YXR1cxgBIAEoDjIOLmFwaS52MS5TdGF0dXNSBnN0YXR1cw=='); +@$core.Deprecated('Use getValidationOutputRequestDescriptor instead') +const GetValidationOutputRequest$json = const { + '1': 'GetValidationOutputRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetValidationOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidationOutputRequestDescriptor = $convert.base64Decode('ChpHZXRWYWxpZGF0aW9uT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); +@$core.Deprecated('Use getValidationOutputResponseDescriptor instead') +const GetValidationOutputResponse$json = const { + '1': 'GetValidationOutputResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetValidationOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidationOutputResponseDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0aW9uT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); +@$core.Deprecated('Use getPreparationOutputRequestDescriptor instead') +const GetPreparationOutputRequest$json = const { + '1': 'GetPreparationOutputRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetPreparationOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPreparationOutputRequestDescriptor = $convert.base64Decode('ChtHZXRQcmVwYXJhdGlvbk91dHB1dFJlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +@$core.Deprecated('Use getPreparationOutputResponseDescriptor instead') +const GetPreparationOutputResponse$json = const { + '1': 'GetPreparationOutputResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetPreparationOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPreparationOutputResponseDescriptor = $convert.base64Decode('ChxHZXRQcmVwYXJhdGlvbk91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); +@$core.Deprecated('Use getCompileOutputRequestDescriptor instead') +const GetCompileOutputRequest$json = const { + '1': 'GetCompileOutputRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetCompileOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getCompileOutputRequestDescriptor = $convert.base64Decode('ChdHZXRDb21waWxlT3V0cHV0UmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); +@$core.Deprecated('Use getCompileOutputResponseDescriptor instead') +const GetCompileOutputResponse$json = const { + '1': 'GetCompileOutputResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetCompileOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getCompileOutputResponseDescriptor = $convert.base64Decode('ChhHZXRDb21waWxlT3V0cHV0UmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); +@$core.Deprecated('Use getRunOutputRequestDescriptor instead') +const GetRunOutputRequest$json = const { + '1': 'GetRunOutputRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetRunOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunOutputRequestDescriptor = $convert.base64Decode('ChNHZXRSdW5PdXRwdXRSZXF1ZXN0EiMKDXBpcGVsaW5lX3V1aWQYASABKAlSDHBpcGVsaW5lVXVpZA=='); +@$core.Deprecated('Use getRunOutputResponseDescriptor instead') +const GetRunOutputResponse$json = const { + '1': 'GetRunOutputResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetRunOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunOutputResponseDescriptor = $convert.base64Decode('ChRHZXRSdW5PdXRwdXRSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +@$core.Deprecated('Use getRunErrorRequestDescriptor instead') +const GetRunErrorRequest$json = const { + '1': 'GetRunErrorRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetRunErrorRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunErrorRequestDescriptor = $convert.base64Decode('ChJHZXRSdW5FcnJvclJlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +@$core.Deprecated('Use getRunErrorResponseDescriptor instead') +const GetRunErrorResponse$json = const { + '1': 'GetRunErrorResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetRunErrorResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunErrorResponseDescriptor = $convert.base64Decode('ChNHZXRSdW5FcnJvclJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); +@$core.Deprecated('Use getLogsRequestDescriptor instead') +const GetLogsRequest$json = const { + '1': 'GetLogsRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetLogsRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLogsRequestDescriptor = $convert.base64Decode('Cg5HZXRMb2dzUmVxdWVzdBIjCg1waXBlbGluZV91dWlkGAEgASgJUgxwaXBlbGluZVV1aWQ='); +@$core.Deprecated('Use getLogsResponseDescriptor instead') +const GetLogsResponse$json = const { + '1': 'GetLogsResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetLogsResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getLogsResponseDescriptor = $convert.base64Decode('Cg9HZXRMb2dzUmVzcG9uc2USFgoGb3V0cHV0GAEgASgJUgZvdXRwdXQ='); +@$core.Deprecated('Use getGraphRequestDescriptor instead') +const GetGraphRequest$json = const { + '1': 'GetGraphRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `GetGraphRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGraphRequestDescriptor = $convert.base64Decode('Cg9HZXRHcmFwaFJlcXVlc3QSIwoNcGlwZWxpbmVfdXVpZBgBIAEoCVIMcGlwZWxpbmVVdWlk'); +@$core.Deprecated('Use getGraphResponseDescriptor instead') +const GetGraphResponse$json = const { + '1': 'GetGraphResponse', + '2': const [ + const {'1': 'graph', '3': 1, '4': 1, '5': 9, '10': 'graph'}, + ], +}; + +/// Descriptor for `GetGraphResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGraphResponseDescriptor = $convert.base64Decode('ChBHZXRHcmFwaFJlc3BvbnNlEhQKBWdyYXBoGAEgASgJUgVncmFwaA=='); +@$core.Deprecated('Use cancelRequestDescriptor instead') +const CancelRequest$json = const { + '1': 'CancelRequest', + '2': const [ + const {'1': 'pipeline_uuid', '3': 1, '4': 1, '5': 9, '10': 'pipelineUuid'}, + ], +}; + +/// Descriptor for `CancelRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cancelRequestDescriptor = $convert.base64Decode('Cg1DYW5jZWxSZXF1ZXN0EiMKDXBpcGVsaW5lX3V1aWQYASABKAlSDHBpcGVsaW5lVXVpZA=='); +@$core.Deprecated('Use cancelResponseDescriptor instead') +const CancelResponse$json = const { + '1': 'CancelResponse', +}; + +/// Descriptor for `CancelResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cancelResponseDescriptor = $convert.base64Decode('Cg5DYW5jZWxSZXNwb25zZQ=='); +@$core.Deprecated('Use precompiledObjectDescriptor instead') +const PrecompiledObject$json = const { + '1': 'PrecompiledObject', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, + const {'1': 'type', '3': 4, '4': 1, '5': 14, '6': '.api.v1.PrecompiledObjectType', '10': 'type'}, + const {'1': 'pipeline_options', '3': 5, '4': 1, '5': 9, '10': 'pipelineOptions'}, + const {'1': 'link', '3': 6, '4': 1, '5': 9, '10': 'link'}, + const {'1': 'multifile', '3': 7, '4': 1, '5': 8, '10': 'multifile'}, + const {'1': 'context_line', '3': 8, '4': 1, '5': 5, '10': 'contextLine'}, + const {'1': 'default_example', '3': 9, '4': 1, '5': 8, '10': 'defaultExample'}, + const {'1': 'sdk', '3': 10, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'complexity', '3': 11, '4': 1, '5': 14, '6': '.api.v1.Complexity', '10': 'complexity'}, + const {'1': 'tags', '3': 12, '4': 3, '5': 9, '10': 'tags'}, + const {'1': 'datasets', '3': 13, '4': 3, '5': 11, '6': '.api.v1.Dataset', '10': 'datasets'}, + const {'1': 'url_vcs', '3': 14, '4': 1, '5': 9, '10': 'urlVcs'}, + const {'1': 'url_notebook', '3': 15, '4': 1, '5': 9, '10': 'urlNotebook'}, + const {'1': 'always_run', '3': 16, '4': 1, '5': 8, '10': 'alwaysRun'}, + const {'1': 'never_run', '3': 17, '4': 1, '5': 8, '10': 'neverRun'}, + ], +}; + +/// Descriptor for `PrecompiledObject`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List precompiledObjectDescriptor = $convert.base64Decode('ChFQcmVjb21waWxlZE9iamVjdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGgSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdGlvbhgDIAEoCVILZGVzY3JpcHRpb24SMQoEdHlwZRgEIAEoDjIdLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFR5cGVSBHR5cGUSKQoQcGlwZWxpbmVfb3B0aW9ucxgFIAEoCVIPcGlwZWxpbmVPcHRpb25zEhIKBGxpbmsYBiABKAlSBGxpbmsSHAoJbXVsdGlmaWxlGAcgASgIUgltdWx0aWZpbGUSIQoMY29udGV4dF9saW5lGAggASgFUgtjb250ZXh0TGluZRInCg9kZWZhdWx0X2V4YW1wbGUYCSABKAhSDmRlZmF1bHRFeGFtcGxlEh0KA3NkaxgKIAEoDjILLmFwaS52MS5TZGtSA3NkaxIyCgpjb21wbGV4aXR5GAsgASgOMhIuYXBpLnYxLkNvbXBsZXhpdHlSCmNvbXBsZXhpdHkSEgoEdGFncxgMIAMoCVIEdGFncxIrCghkYXRhc2V0cxgNIAMoCzIPLmFwaS52MS5EYXRhc2V0UghkYXRhc2V0cxIXCgd1cmxfdmNzGA4gASgJUgZ1cmxWY3MSIQoMdXJsX25vdGVib29rGA8gASgJUgt1cmxOb3RlYm9vaxIdCgphbHdheXNfcnVuGBAgASgIUglhbHdheXNSdW4SGwoJbmV2ZXJfcnVuGBEgASgIUghuZXZlclJ1bg=='); +@$core.Deprecated('Use categoriesDescriptor instead') +const Categories$json = const { + '1': 'Categories', + '2': const [ + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'categories', '3': 2, '4': 3, '5': 11, '6': '.api.v1.Categories.Category', '10': 'categories'}, + ], + '3': const [Categories_Category$json], +}; + +@$core.Deprecated('Use categoriesDescriptor instead') +const Categories_Category$json = const { + '1': 'Category', + '2': const [ + const {'1': 'category_name', '3': 1, '4': 1, '5': 9, '10': 'categoryName'}, + const {'1': 'precompiled_objects', '3': 2, '4': 3, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObjects'}, + ], +}; + +/// Descriptor for `Categories`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List categoriesDescriptor = $convert.base64Decode('CgpDYXRlZ29yaWVzEh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3NkaxI7CgpjYXRlZ29yaWVzGAIgAygLMhsuYXBpLnYxLkNhdGVnb3JpZXMuQ2F0ZWdvcnlSCmNhdGVnb3JpZXMaewoIQ2F0ZWdvcnkSIwoNY2F0ZWdvcnlfbmFtZRgBIAEoCVIMY2F0ZWdvcnlOYW1lEkoKE3ByZWNvbXBpbGVkX29iamVjdHMYAiADKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEnByZWNvbXBpbGVkT2JqZWN0cw=='); +@$core.Deprecated('Use getPrecompiledObjectsRequestDescriptor instead') +const GetPrecompiledObjectsRequest$json = const { + '1': 'GetPrecompiledObjectsRequest', + '2': const [ + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'category', '3': 2, '4': 1, '5': 9, '10': 'category'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectsRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectsRequestDescriptor = $convert.base64Decode('ChxHZXRQcmVjb21waWxlZE9iamVjdHNSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3NkaxIaCghjYXRlZ29yeRgCIAEoCVIIY2F0ZWdvcnk='); +@$core.Deprecated('Use getPrecompiledObjectRequestDescriptor instead') +const GetPrecompiledObjectRequest$json = const { + '1': 'GetPrecompiledObjectRequest', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectRequestDescriptor = $convert.base64Decode('ChtHZXRQcmVjb21waWxlZE9iamVjdFJlcXVlc3QSHQoKY2xvdWRfcGF0aBgBIAEoCVIJY2xvdWRQYXRo'); +@$core.Deprecated('Use getPrecompiledObjectCodeRequestDescriptor instead') +const GetPrecompiledObjectCodeRequest$json = const { + '1': 'GetPrecompiledObjectCodeRequest', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectCodeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectCodeRequestDescriptor = $convert.base64Decode('Ch9HZXRQcmVjb21waWxlZE9iamVjdENvZGVSZXF1ZXN0Eh0KCmNsb3VkX3BhdGgYASABKAlSCWNsb3VkUGF0aA=='); +@$core.Deprecated('Use getPrecompiledObjectOutputRequestDescriptor instead') +const GetPrecompiledObjectOutputRequest$json = const { + '1': 'GetPrecompiledObjectOutputRequest', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectOutputRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectOutputRequestDescriptor = $convert.base64Decode('CiFHZXRQcmVjb21waWxlZE9iamVjdE91dHB1dFJlcXVlc3QSHQoKY2xvdWRfcGF0aBgBIAEoCVIJY2xvdWRQYXRo'); +@$core.Deprecated('Use getPrecompiledObjectLogsRequestDescriptor instead') +const GetPrecompiledObjectLogsRequest$json = const { + '1': 'GetPrecompiledObjectLogsRequest', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectLogsRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectLogsRequestDescriptor = $convert.base64Decode('Ch9HZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXF1ZXN0Eh0KCmNsb3VkX3BhdGgYASABKAlSCWNsb3VkUGF0aA=='); +@$core.Deprecated('Use getPrecompiledObjectGraphRequestDescriptor instead') +const GetPrecompiledObjectGraphRequest$json = const { + '1': 'GetPrecompiledObjectGraphRequest', + '2': const [ + const {'1': 'cloud_path', '3': 1, '4': 1, '5': 9, '10': 'cloudPath'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectGraphRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectGraphRequestDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVxdWVzdBIdCgpjbG91ZF9wYXRoGAEgASgJUgljbG91ZFBhdGg='); +@$core.Deprecated('Use getDefaultPrecompiledObjectRequestDescriptor instead') +const GetDefaultPrecompiledObjectRequest$json = const { + '1': 'GetDefaultPrecompiledObjectRequest', + '2': const [ + const {'1': 'sdk', '3': 1, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectRequestDescriptor = $convert.base64Decode('CiJHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXF1ZXN0Eh0KA3NkaxgBIAEoDjILLmFwaS52MS5TZGtSA3Nkaw=='); +@$core.Deprecated('Use getPrecompiledObjectsResponseDescriptor instead') +const GetPrecompiledObjectsResponse$json = const { + '1': 'GetPrecompiledObjectsResponse', + '2': const [ + const {'1': 'sdk_categories', '3': 1, '4': 3, '5': 11, '6': '.api.v1.Categories', '10': 'sdkCategories'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectsResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectsResponseDescriptor = $convert.base64Decode('Ch1HZXRQcmVjb21waWxlZE9iamVjdHNSZXNwb25zZRI5Cg5zZGtfY2F0ZWdvcmllcxgBIAMoCzISLmFwaS52MS5DYXRlZ29yaWVzUg1zZGtDYXRlZ29yaWVz'); +@$core.Deprecated('Use getPrecompiledObjectResponseDescriptor instead') +const GetPrecompiledObjectResponse$json = const { + '1': 'GetPrecompiledObjectResponse', + '2': const [ + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectResponseDescriptor = $convert.base64Decode('ChxHZXRQcmVjb21waWxlZE9iamVjdFJlc3BvbnNlEkgKEnByZWNvbXBpbGVkX29iamVjdBgBIAEoCzIZLmFwaS52MS5QcmVjb21waWxlZE9iamVjdFIRcHJlY29tcGlsZWRPYmplY3Q='); +@$core.Deprecated('Use getPrecompiledObjectCodeResponseDescriptor instead') +const GetPrecompiledObjectCodeResponse$json = const { + '1': 'GetPrecompiledObjectCodeResponse', + '2': const [ + const {'1': 'code', '3': 1, '4': 1, '5': 9, '10': 'code'}, + const {'1': 'files', '3': 2, '4': 3, '5': 11, '6': '.api.v1.SnippetFile', '10': 'files'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectCodeResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectCodeResponseDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdENvZGVSZXNwb25zZRISCgRjb2RlGAEgASgJUgRjb2RlEikKBWZpbGVzGAIgAygLMhMuYXBpLnYxLlNuaXBwZXRGaWxlUgVmaWxlcw=='); +@$core.Deprecated('Use getPrecompiledObjectOutputResponseDescriptor instead') +const GetPrecompiledObjectOutputResponse$json = const { + '1': 'GetPrecompiledObjectOutputResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectOutputResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectOutputResponseDescriptor = $convert.base64Decode('CiJHZXRQcmVjb21waWxlZE9iamVjdE91dHB1dFJlc3BvbnNlEhYKBm91dHB1dBgBIAEoCVIGb3V0cHV0'); +@$core.Deprecated('Use getPrecompiledObjectLogsResponseDescriptor instead') +const GetPrecompiledObjectLogsResponse$json = const { + '1': 'GetPrecompiledObjectLogsResponse', + '2': const [ + const {'1': 'output', '3': 1, '4': 1, '5': 9, '10': 'output'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectLogsResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectLogsResponseDescriptor = $convert.base64Decode('CiBHZXRQcmVjb21waWxlZE9iamVjdExvZ3NSZXNwb25zZRIWCgZvdXRwdXQYASABKAlSBm91dHB1dA=='); +@$core.Deprecated('Use getPrecompiledObjectGraphResponseDescriptor instead') +const GetPrecompiledObjectGraphResponse$json = const { + '1': 'GetPrecompiledObjectGraphResponse', + '2': const [ + const {'1': 'graph', '3': 1, '4': 1, '5': 9, '10': 'graph'}, + ], +}; + +/// Descriptor for `GetPrecompiledObjectGraphResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPrecompiledObjectGraphResponseDescriptor = $convert.base64Decode('CiFHZXRQcmVjb21waWxlZE9iamVjdEdyYXBoUmVzcG9uc2USFAoFZ3JhcGgYASABKAlSBWdyYXBo'); +@$core.Deprecated('Use getDefaultPrecompiledObjectResponseDescriptor instead') +const GetDefaultPrecompiledObjectResponse$json = const { + '1': 'GetDefaultPrecompiledObjectResponse', + '2': const [ + const {'1': 'precompiled_object', '3': 1, '4': 1, '5': 11, '6': '.api.v1.PrecompiledObject', '10': 'precompiledObject'}, + ], +}; + +/// Descriptor for `GetDefaultPrecompiledObjectResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getDefaultPrecompiledObjectResponseDescriptor = $convert.base64Decode('CiNHZXREZWZhdWx0UHJlY29tcGlsZWRPYmplY3RSZXNwb25zZRJIChJwcmVjb21waWxlZF9vYmplY3QYASABKAsyGS5hcGkudjEuUHJlY29tcGlsZWRPYmplY3RSEXByZWNvbXBpbGVkT2JqZWN0'); +@$core.Deprecated('Use snippetFileDescriptor instead') +const SnippetFile$json = const { + '1': 'SnippetFile', + '2': const [ + const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'content', '3': 2, '4': 1, '5': 9, '10': 'content'}, + const {'1': 'is_main', '3': 3, '4': 1, '5': 8, '10': 'isMain'}, + ], +}; + +/// Descriptor for `SnippetFile`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List snippetFileDescriptor = $convert.base64Decode('CgtTbmlwcGV0RmlsZRISCgRuYW1lGAEgASgJUgRuYW1lEhgKB2NvbnRlbnQYAiABKAlSB2NvbnRlbnQSFwoHaXNfbWFpbhgDIAEoCFIGaXNNYWlu'); +@$core.Deprecated('Use saveSnippetRequestDescriptor instead') +const SaveSnippetRequest$json = const { + '1': 'SaveSnippetRequest', + '2': const [ + const {'1': 'files', '3': 1, '4': 3, '5': 11, '6': '.api.v1.SnippetFile', '10': 'files'}, + const {'1': 'sdk', '3': 2, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'pipeline_options', '3': 3, '4': 1, '5': 9, '10': 'pipelineOptions'}, + const {'1': 'complexity', '3': 4, '4': 1, '5': 14, '6': '.api.v1.Complexity', '10': 'complexity'}, + const {'1': 'persistence_key', '3': 5, '4': 1, '5': 9, '10': 'persistenceKey'}, + ], +}; + +/// Descriptor for `SaveSnippetRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List saveSnippetRequestDescriptor = $convert.base64Decode('ChJTYXZlU25pcHBldFJlcXVlc3QSKQoFZmlsZXMYASADKAsyEy5hcGkudjEuU25pcHBldEZpbGVSBWZpbGVzEh0KA3NkaxgCIAEoDjILLmFwaS52MS5TZGtSA3NkaxIpChBwaXBlbGluZV9vcHRpb25zGAMgASgJUg9waXBlbGluZU9wdGlvbnMSMgoKY29tcGxleGl0eRgEIAEoDjISLmFwaS52MS5Db21wbGV4aXR5Ugpjb21wbGV4aXR5EicKD3BlcnNpc3RlbmNlX2tleRgFIAEoCVIOcGVyc2lzdGVuY2VLZXk='); +@$core.Deprecated('Use saveSnippetResponseDescriptor instead') +const SaveSnippetResponse$json = const { + '1': 'SaveSnippetResponse', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `SaveSnippetResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List saveSnippetResponseDescriptor = $convert.base64Decode('ChNTYXZlU25pcHBldFJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZA=='); +@$core.Deprecated('Use getSnippetRequestDescriptor instead') +const GetSnippetRequest$json = const { + '1': 'GetSnippetRequest', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `GetSnippetRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getSnippetRequestDescriptor = $convert.base64Decode('ChFHZXRTbmlwcGV0UmVxdWVzdBIOCgJpZBgBIAEoCVICaWQ='); +@$core.Deprecated('Use getSnippetResponseDescriptor instead') +const GetSnippetResponse$json = const { + '1': 'GetSnippetResponse', + '2': const [ + const {'1': 'files', '3': 1, '4': 3, '5': 11, '6': '.api.v1.SnippetFile', '10': 'files'}, + const {'1': 'sdk', '3': 2, '4': 1, '5': 14, '6': '.api.v1.Sdk', '10': 'sdk'}, + const {'1': 'pipeline_options', '3': 3, '4': 1, '5': 9, '10': 'pipelineOptions'}, + const {'1': 'complexity', '3': 4, '4': 1, '5': 14, '6': '.api.v1.Complexity', '10': 'complexity'}, + ], +}; + +/// Descriptor for `GetSnippetResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getSnippetResponseDescriptor = $convert.base64Decode('ChJHZXRTbmlwcGV0UmVzcG9uc2USKQoFZmlsZXMYASADKAsyEy5hcGkudjEuU25pcHBldEZpbGVSBWZpbGVzEh0KA3NkaxgCIAEoDjILLmFwaS52MS5TZGtSA3NkaxIpChBwaXBlbGluZV9vcHRpb25zGAMgASgJUg9waXBlbGluZU9wdGlvbnMSMgoKY29tcGxleGl0eRgEIAEoDjISLmFwaS52MS5Db21wbGV4aXR5Ugpjb21wbGV4aXR5'); +@$core.Deprecated('Use getMetadataRequestDescriptor instead') +const GetMetadataRequest$json = const { + '1': 'GetMetadataRequest', +}; + +/// Descriptor for `GetMetadataRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getMetadataRequestDescriptor = $convert.base64Decode('ChJHZXRNZXRhZGF0YVJlcXVlc3Q='); +@$core.Deprecated('Use getMetadataResponseDescriptor instead') +const GetMetadataResponse$json = const { + '1': 'GetMetadataResponse', + '2': const [ + const {'1': 'runner_sdk', '3': 1, '4': 1, '5': 9, '10': 'runnerSdk'}, + const {'1': 'build_commit_hash', '3': 2, '4': 1, '5': 9, '10': 'buildCommitHash'}, + const {'1': 'build_commit_timestamp_seconds_since_epoch', '3': 3, '4': 1, '5': 3, '10': 'buildCommitTimestampSecondsSinceEpoch'}, + const {'1': 'beam_sdk_version', '3': 4, '4': 1, '5': 9, '10': 'beamSdkVersion'}, + ], +}; + +/// Descriptor for `GetMetadataResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getMetadataResponseDescriptor = $convert.base64Decode('ChNHZXRNZXRhZGF0YVJlc3BvbnNlEh0KCnJ1bm5lcl9zZGsYASABKAlSCXJ1bm5lclNkaxIqChFidWlsZF9jb21taXRfaGFzaBgCIAEoCVIPYnVpbGRDb21taXRIYXNoElkKKmJ1aWxkX2NvbW1pdF90aW1lc3RhbXBfc2Vjb25kc19zaW5jZV9lcG9jaBgDIAEoA1IlYnVpbGRDb21taXRUaW1lc3RhbXBTZWNvbmRzU2luY2VFcG9jaBIoChBiZWFtX3Nka192ZXJzaW9uGAQgASgJUg5iZWFtU2RrVmVyc2lvbg=='); diff --git a/playground/frontend/build/playground_components/lib/src/assets/assets.gen.dart b/playground/frontend/build/playground_components/lib/src/assets/assets.gen.dart new file mode 100644 index 000000000000..981557a7e465 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/assets/assets.gen.dart @@ -0,0 +1,187 @@ +/// GENERATED CODE - DO NOT MODIFY BY HAND +/// ***************************************************** +/// FlutterGen +/// ***************************************************** + +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use + +import 'package:flutter/widgets.dart'; + +class $AssetsButtonsGen { + const $AssetsButtonsGen(); + + /// File path: assets/buttons/reset.svg + String get reset => 'assets/buttons/reset.svg'; + + /// File path: assets/buttons/theme-mode.svg + String get themeMode => 'assets/buttons/theme-mode.svg'; + + /// List of all assets + List get values => [reset, themeMode]; +} + +class $AssetsNotificationIconsGen { + const $AssetsNotificationIconsGen(); + + /// File path: assets/notification_icons/error.svg + String get error => 'assets/notification_icons/error.svg'; + + /// File path: assets/notification_icons/info.svg + String get info => 'assets/notification_icons/info.svg'; + + /// File path: assets/notification_icons/success.svg + String get success => 'assets/notification_icons/success.svg'; + + /// File path: assets/notification_icons/warning.svg + String get warning => 'assets/notification_icons/warning.svg'; + + /// List of all assets + List get values => [error, info, success, warning]; +} + +class $AssetsPngGen { + const $AssetsPngGen(); + + /// File path: assets/png/beam-logo.png + AssetGenImage get beamLogo => const AssetGenImage('assets/png/beam-logo.png'); + + /// List of all assets + List get values => [beamLogo]; +} + +class $AssetsSvgGen { + const $AssetsSvgGen(); + + /// File path: assets/svg/drag-horizontal.svg + String get dragHorizontal => 'assets/svg/drag-horizontal.svg'; + + /// File path: assets/svg/drag-vertical.svg + String get dragVertical => 'assets/svg/drag-vertical.svg'; + + /// File path: assets/svg/thumb_down.svg + String get thumbDown => 'assets/svg/thumb_down.svg'; + + /// File path: assets/svg/thumb_down_filled.svg + String get thumbDownFilled => 'assets/svg/thumb_down_filled.svg'; + + /// File path: assets/svg/thumb_up.svg + String get thumbUp => 'assets/svg/thumb_up.svg'; + + /// File path: assets/svg/thumb_up_filled.svg + String get thumbUpFilled => 'assets/svg/thumb_up_filled.svg'; + + /// List of all assets + List get values => [ + dragHorizontal, + dragVertical, + thumbDown, + thumbDownFilled, + thumbUp, + thumbUpFilled + ]; +} + +class $AssetsSymbolsGen { + const $AssetsSymbolsGen(); + + /// File path: assets/symbols/go.g.yaml + String get goG => 'assets/symbols/go.g.yaml'; + + /// File path: assets/symbols/java.g.yaml + String get javaG => 'assets/symbols/java.g.yaml'; + + /// File path: assets/symbols/python.g.yaml + String get pythonG => 'assets/symbols/python.g.yaml'; + + /// List of all assets + List get values => [goG, javaG, pythonG]; +} + +class $AssetsTranslationsGen { + const $AssetsTranslationsGen(); + + /// File path: assets/translations/en.yaml + String get en => 'assets/translations/en.yaml'; + + /// List of all assets + List get values => [en]; +} + +class Assets { + Assets._(); + + static const $AssetsButtonsGen buttons = $AssetsButtonsGen(); + static const $AssetsNotificationIconsGen notificationIcons = + $AssetsNotificationIconsGen(); + static const $AssetsPngGen png = $AssetsPngGen(); + static const $AssetsSvgGen svg = $AssetsSvgGen(); + static const $AssetsSymbolsGen symbols = $AssetsSymbolsGen(); + static const $AssetsTranslationsGen translations = $AssetsTranslationsGen(); +} + +class AssetGenImage { + const AssetGenImage(this._assetName); + + final String _assetName; + + Image image({ + Key? key, + AssetBundle? bundle, + ImageFrameBuilder? frameBuilder, + ImageErrorWidgetBuilder? errorBuilder, + String? semanticLabel, + bool excludeFromSemantics = false, + double? scale, + double? width, + double? height, + Color? color, + Animation? opacity, + BlendMode? colorBlendMode, + BoxFit? fit, + AlignmentGeometry alignment = Alignment.center, + ImageRepeat repeat = ImageRepeat.noRepeat, + Rect? centerSlice, + bool matchTextDirection = false, + bool gaplessPlayback = false, + bool isAntiAlias = false, + String? package, + FilterQuality filterQuality = FilterQuality.low, + int? cacheWidth, + int? cacheHeight, + }) { + return Image.asset( + _assetName, + key: key, + bundle: bundle, + frameBuilder: frameBuilder, + errorBuilder: errorBuilder, + semanticLabel: semanticLabel, + excludeFromSemantics: excludeFromSemantics, + scale: scale, + width: width, + height: height, + color: color, + opacity: opacity, + colorBlendMode: colorBlendMode, + fit: fit, + alignment: alignment, + repeat: repeat, + centerSlice: centerSlice, + matchTextDirection: matchTextDirection, + gaplessPlayback: gaplessPlayback, + isAntiAlias: isAntiAlias, + package: package, + filterQuality: filterQuality, + cacheWidth: cacheWidth, + cacheHeight: cacheHeight, + ); + } + + ImageProvider provider() => AssetImage(_assetName); + + String get path => _assetName; + + String get keyName => _assetName; +} diff --git a/playground/frontend/build/playground_components/lib/src/build_metadata.g.dart b/playground/frontend/build/playground_components/lib/src/build_metadata.g.dart new file mode 100644 index 000000000000..67e37f9bfdda --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/build_metadata.g.dart @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GENERATED CODE - DO NOT MODIFY BY HAND +// +// This file is generated during deployment to contain data about the commit. +// The copy of this file stored in the repository is for development purpose +// so the project can be started locally. +// Keep these constants `null` in the repository. +const buildCommitHash = null; +const buildCommitSecondsSinceEpoch = null; diff --git a/playground/frontend/build/playground_components/lib/src/cache/example_cache.dart b/playground/frontend/build/playground_components/lib/src/cache/example_cache.dart new file mode 100644 index 000000000000..07df9a941c47 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/cache/example_cache.dart @@ -0,0 +1,327 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/foundation.dart'; + +import '../exceptions/catalog_loading_exception.dart'; +import '../exceptions/examples_loading_exception.dart'; +import '../exceptions/snippet_saving_exception.dart'; +import '../models/category_with_examples.dart'; +import '../models/example.dart'; +import '../models/example_base.dart'; +import '../models/example_view_options.dart'; +import '../models/loading_status.dart'; +import '../models/sdk.dart'; +import '../models/snippet_file.dart'; +import '../repositories/example_repository.dart'; +import '../repositories/models/get_default_precompiled_object_request.dart'; +import '../repositories/models/get_precompiled_object_request.dart'; +import '../repositories/models/get_precompiled_objects_request.dart'; +import '../repositories/models/get_snippet_request.dart'; +import '../repositories/models/save_snippet_request.dart'; + +/// A runtime cache for examples fetched from a repository. +class ExampleCache extends ChangeNotifier { + final ExampleRepository _exampleRepository; + final categoryListsBySdk = >{}; + + final _cachedExamplesByPath = {}; + final _cachedExamplesBySnippetId = {}; + + @visibleForTesting + final Map defaultExamplesBySdk = {}; + + // TODO(alexeyinkin): Extract, https://github.com/apache/beam/issues/23249 + bool isSelectorOpened = false; + + final _allExamplesCompleter = Completer(); + + Future get allExamplesFuture => _allExamplesCompleter.future; + + Future? _allPrecompiledObjectsAttemptFuture; + + ExampleCache({ + required ExampleRepository exampleRepository, + }) : _exampleRepository = exampleRepository; + + Future loadAllPrecompiledObjectsIfNot() async { + if (_allPrecompiledObjectsAttemptFuture != null) { + return await _allPrecompiledObjectsAttemptFuture; + } + + try { + _allPrecompiledObjectsAttemptFuture = _loadAllPrecompiledObjects(); + await _allPrecompiledObjectsAttemptFuture!; + } on Exception catch (ex) { + _allPrecompiledObjectsAttemptFuture = null; + throw CatalogLoadingException(ex); + } + } + + LoadingStatus get catalogStatus { + if (_allPrecompiledObjectsAttemptFuture == null) { + return LoadingStatus.error; + } + + if (categoryListsBySdk.isEmpty) { + return LoadingStatus.loading; + } + + return LoadingStatus.done; + } + + List getCategories(Sdk? sdk) { + return categoryListsBySdk[sdk] ?? []; + } + + Future getPrecompiledObject(String path, Sdk sdk) async { + try { + if (_cachedExamplesByPath.containsKey(path)) { + final result = _cachedExamplesByPath[path]; + if (result != null) { + return result; + } + + throw Exception('Example was not found before at $path'); + } + + final exampleBase = await _exampleRepository.getPrecompiledObject( + GetPrecompiledObjectRequest(path: path, sdk: sdk), + ); + + final result = await loadExampleInfo(exampleBase); + _cachedExamplesByPath[path] = result; + return result; + } on Exception { + _cachedExamplesByPath[path] = null; + rethrow; + } + } + + Future _getPrecompiledObjectOutput(ExampleBase example) async { + if (example.alwaysRun) { + return null; + } + + return _exampleRepository.getPrecompiledObjectOutput( + GetPrecompiledObjectRequest(path: example.path, sdk: example.sdk), + ); + } + + Future> _getPrecompiledObjectCode(ExampleBase example) { + return _exampleRepository.getPrecompiledObjectCode( + GetPrecompiledObjectRequest(path: example.path, sdk: example.sdk), + ); + } + + Future _getPrecompiledObjectLogs(ExampleBase example) { + return _exampleRepository.getPrecompiledObjectLogs( + GetPrecompiledObjectRequest(path: example.path, sdk: example.sdk), + ); + } + + Future _getPrecompiledObjectGraph(ExampleBase example) { + return _exampleRepository.getPrecompiledObjectGraph( + GetPrecompiledObjectRequest(path: example.path, sdk: example.sdk), + ); + } + + Future loadSharedExample( + String id, { + required ExampleViewOptions viewOptions, + }) async { + if (_cachedExamplesBySnippetId.containsKey(id)) { + final result = _cachedExamplesBySnippetId[id]; + if (result != null) { + return result; + } + + throw Exception('Snippet was not found before at $id'); + } + + try { + final response = await _exampleRepository.getSnippet( + GetSnippetRequest(id: id), + ); + + final example = Example( + complexity: response.complexity, + files: response.files, + name: 'examples.userSharedName'.tr(), + isMultiFile: response.files.length > 1, + path: id, + sdk: response.sdk, + pipelineOptions: response.pipelineOptions, + type: ExampleType.example, + viewOptions: viewOptions, + ); + + _cachedExamplesBySnippetId[id] = example; + return example; + } on Exception { + _cachedExamplesBySnippetId[id] = null; + rethrow; + } + } + + Future saveSnippet({ + required List files, + required Sdk sdk, + required String pipelineOptions, + }) async { + try { + final id = await _exampleRepository.saveSnippet( + SaveSnippetRequest( + files: files, + sdk: sdk, + pipelineOptions: pipelineOptions, + ), + ); + return id; + } on Exception catch (ex) { + throw SnippetSavingException(ex); + } + } + + Future loadExampleInfo(ExampleBase example) async { + if (example is Example) { + return example; + } + + final cachedExample = _cachedExamplesByPath[example.path]; + if (cachedExample != null) { + return cachedExample; + } + + //GRPC GetPrecompiledGraph errors hotfix + // TODO(alexeyinkin): Remove this special case, https://github.com/apache/beam/issues/24002 + if (example.name == 'MinimalWordCount' && + (example.sdk == Sdk.go || example.sdk == Sdk.scio)) { + final exampleData = await Future.wait([ + _getPrecompiledObjectCode(example), + _getPrecompiledObjectOutput(example), + _getPrecompiledObjectLogs(example), + ]); + + return Example.fromBase( + example, + files: exampleData[0]! as List, + outputs: exampleData[1] as String?, + logs: exampleData[2]! as String, + ); + } + + // TODO(alexeyinkin): Load in a single request, https://github.com/apache/beam/issues/24305 + final exampleData = await Future.wait([ + _getPrecompiledObjectCode(example), + _getPrecompiledObjectOutput(example), + _getPrecompiledObjectLogs(example), + _getPrecompiledObjectGraph(example) + ]); + + final precompiledExample = Example.fromBase( + example, + files: exampleData[0]! as List, + outputs: exampleData[1] as String?, + logs: exampleData[2]! as String, + graph: exampleData[3]! as String, + ); + _cachedExamplesByPath[example.path] = precompiledExample; + + return precompiledExample; + } + + Future _loadAllPrecompiledObjects() async { + final result = await _exampleRepository.getPrecompiledObjects( + const GetPrecompiledObjectsRequest( + sdk: null, + category: null, + ), + ); + + categoryListsBySdk.addAll(result); + _allExamplesCompleter.complete(); + notifyListeners(); + } + + void setSelectorOpened(bool value) { + isSelectorOpened = value; + notifyListeners(); + } + + Future getDefaultExampleBySdk(Sdk sdk) async { + await Future.wait([ + loadAllPrecompiledObjectsIfNot(), + loadDefaultPrecompiledObjectsIfNot(), + ]); + + return defaultExamplesBySdk[sdk]; + } + + Future loadDefaultPrecompiledObjects() async { + if (defaultExamplesBySdk.isNotEmpty) { + return; + } + + try { + await Future.wait(Sdk.known.map(_loadDefaultPrecompiledObject)); + } on Exception catch (ex) { + if (defaultExamplesBySdk.isEmpty) { + throw ExamplesLoadingException(ex); + } + // As long as any of the examples is loaded, continue. + print(ex); + // TODO: Log. + } + + notifyListeners(); + } + + Future _loadDefaultPrecompiledObject(Sdk sdk) async { + final exampleWithoutInfo = + await _exampleRepository.getDefaultPrecompiledObject( + GetDefaultPrecompiledObjectRequest(sdk: sdk), + ); + + defaultExamplesBySdk[sdk] = await loadExampleInfo(exampleWithoutInfo); + } + + Future loadDefaultPrecompiledObjectsIfNot() async { + if (defaultExamplesBySdk.isNotEmpty) { + return; + } + + await loadDefaultPrecompiledObjects(); + } + + Future getCatalogExampleByPath(String path) async { + await allExamplesFuture; + + final allExamples = categoryListsBySdk.values + .expand((categories) => categories.map((c) => c.examples)) + .expand((examples) => examples); + + return allExamples.firstWhereOrNull( + (e) => e.path == path, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/constants/analytics.dart b/playground/frontend/build/playground_components/lib/src/constants/analytics.dart new file mode 100644 index 000000000000..272f4457bfb0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/analytics.dart @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Measurement ID for production Playground and Tour of Beam. +const _prodMeasurementId = 'G-XE511WT838'; + +/// Measurement ID for all non-production instances. +const _devMeasurementId = 'G-BXFP2FNCKC'; + +/// Hosts to use [_prodMeasurementId] on. +const _prodHosts = { + 'play.beam.apache.org', + 'tour.beam.apache.org', +}; + +final _hostsToMeasurementIds = { + for (final host in _prodHosts) host: _prodMeasurementId, +}; + +/// Returns the measurement ID for the current host. +String getGoogleAnalyticsMeasurementId() { + return _hostsToMeasurementIds[Uri.base.host] ?? _devMeasurementId; +} diff --git a/playground/frontend/build/playground_components/lib/src/constants/backend_urls.dart b/playground/frontend/build/playground_components/lib/src/constants/backend_urls.dart new file mode 100644 index 000000000000..af9390ddc6d6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/backend_urls.dart @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: prefer_interpolation_to_compose_strings + +/// The template for production backend URL. +const defaultBackendUrlTemplate = 'https://{node}.play.beam.apache.org'; + +/// The URLs for local backend development. +const backendUrlOverrides = { + // Uncomment the following lines to use staging backend: + // 'router': 'https://router.play-dev.beam.apache.org', + // 'go': 'https://go.play-dev.beam.apache.org', + // 'java': 'https://java.play-dev.beam.apache.org', + // 'python': 'https://python.play-dev.beam.apache.org', + // 'scio': 'https://scio.play-dev.beam.apache.org', + + // Uncomment the following lines to use local backend: + // 'router': 'http://localhost:8081', + // 'go': 'http://localhost:8084', + // 'java': 'http://localhost:8086', + // 'python': 'http://localhost:8088', + // 'scio': 'http://localhost:8090', +}; + +/// The URL templates that will not be probed +/// if they are generated as the result of auto-composing backend URLs. +/// +/// If any new project is created that uses the Playground Backend, +/// its pattern should be added to this list. +/// Otherwise the first backend candidate will be derived from +/// such project's frontend host and will be probed in vain on every page load. +final skipBackendUrls = [ + 'tour.beam.apache.org' +].map((host) => RegExp(r'^http(s?)://(\w+)\.' + RegExp.escape(host) + r'$')); diff --git a/playground/frontend/build/playground_components/lib/src/constants/colors.dart b/playground/frontend/build/playground_components/lib/src/constants/colors.dart new file mode 100644 index 000000000000..e548b31e4e4a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/colors.dart @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +class BeamColors { + static const transparent = Colors.transparent; + static const white = Colors.white; + static const black = Colors.black; + static const grey1 = Color(0xffDFE1E3); + static const grey2 = Color(0xffCBCBCB); + static const grey3 = Color(0xffA0A4AB); + static const grey4 = Color(0x30808080); + static const darkGrey = Color(0xff2E2E34); + static const darkBlue = Color(0xff242639); + + static const green = Color(0xff37AC66); + static const orange = Color(0xffEEAB00); + static const red = Color(0xffE54545); +} + +class BeamGraphColors { + static const node = BeamColors.grey3; + static const border = Color(0xff45454E); + static const edge = BeamLightThemeColors.primary; +} + +class BeamNotificationColors { + static const error = Color(0xffE54545); + static const info = Color(0xff3E67F6); + static const success = Color(0xff37AC66); + static const warning = Color(0xffEEAB00); +} + +class BeamLightThemeColors { + static const border = Color(0xffE5E5E5); + static const primaryBackground = BeamColors.white; + static const secondaryBackground = Color(0xffFCFCFC); + static const selectedUnitColor = Color(0xffE6E7E9); + static const selectedProgressColor = BeamColors.grey3; + static const unselectedProgressColor = selectedUnitColor; + static const grey = Color(0xffE5E5E5); + static const listBackground = BeamColors.grey3; + static const text = BeamColors.darkBlue; + static const primary = Color(0xffE74D1A); + static const icon = BeamColors.grey3; + + static const code1 = primary; + static const code2 = Color(0xff5929B4); + static const codeComment = Color(0xff1B5E20); + static const codeBackground = Color(0xffFEF6F3); +} + +class BeamDarkThemeColors { + static const border = BeamColors.grey3; + static const primaryBackground = Color(0xff18181B); + static const secondaryBackground = BeamColors.darkGrey; + static const selectedUnitColor = Color(0xff626267); + static const selectedProgressColor = BeamColors.grey1; + static const unselectedProgressColor = selectedUnitColor; + static const grey = Color(0xff3F3F46); + static const listBackground = Color(0xff606772); + static const text = Color(0xffffffff); + static const primary = Color(0xffF26628); + static const icon = Color(0xff606772); + + static const code1 = Color(0xffFFEB3B); + static const code2 = primary; + static const codeComment = Color(0xff689F38); + static const codeBackground = Color(0xff231B1B); +} diff --git a/playground/frontend/build/playground_components/lib/src/constants/constants.dart b/playground/frontend/build/playground_components/lib/src/constants/constants.dart new file mode 100644 index 000000000000..843837cf8a71 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/constants.dart @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const spaceCount = 2; diff --git a/playground/frontend/build/playground_components/lib/src/constants/durations.dart b/playground/frontend/build/playground_components/lib/src/constants/durations.dart new file mode 100644 index 000000000000..696fab762be0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/durations.dart @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class BeamDurations { + /// The duration for a notification toast. + static const toast = Duration(seconds: 3); +} diff --git a/playground/frontend/build/playground_components/lib/src/constants/links.dart b/playground/frontend/build/playground_components/lib/src/constants/links.dart new file mode 100644 index 000000000000..c5addcfcc266 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/links.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class BeamLinks { + // Website + static const website = 'https://beam.apache.org/'; + static const about = 'https://beam.apache.org/get-started/beam-overview'; + static const privacyPolicy = 'https://beam.apache.org/privacy_policy/'; + + // GitHub + static const github = 'https://github.com/apache/beam'; + static const newExample = + 'https://github.com/apache/beam/blob/master/playground/load_your_code.md'; + static const reportIssue = 'https://github.com/apache/beam/issues'; + + // Projects + static const playgroundGitHub = + 'https://github.com/apache/beam/tree/master/playground'; + static const scioGitHub = 'https://github.com/spotify/scio'; +} diff --git a/playground/frontend/build/playground_components/lib/src/constants/sizes.dart b/playground/frontend/build/playground_components/lib/src/constants/sizes.dart new file mode 100644 index 000000000000..5caad08b3bce --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/constants/sizes.dart @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class BeamSizes { + static const double size0 = 0; + static const double size1 = 1; + static const double size2 = 2; + static const double size3 = 3; + static const double size4 = 4; + static const double size6 = 6; + static const double size7 = 7; + static const double size8 = 8; + static const double size10 = 10; + static const double size12 = 12; + static const double size16 = 16; + static const double size18 = 18; + static const double size20 = 20; + static const double size24 = 24; + static const double size30 = 30; + static const double size32 = 32; + static const double size36 = 36; + static const double size40 = 40; + static const double size64 = 64; + + static const double appBarHeight = 55; + static const double buttonHeight = 40; + static const double elevation = 2; + static const double headerButtonHeight = 46; + static const double loadingIndicator = 40; + static const double splitViewSeparator = BeamSizes.size8; + static const double tabBarHeight = 50; + static const double textFieldHeight = 50; + static const double popupWidth = 420; +} + +class BeamBorderRadius { + static const double small = BeamSizes.size4; + static const double medium = BeamSizes.size6; + static const double large = BeamSizes.size8; + static const double infinite = 1000; // TODO: Use StadiumBorder +} + +class BeamIconSizes { + static const double xs = BeamSizes.size8; + static const double small = BeamSizes.size16; + static const double medium = BeamSizes.size24; + static const double large = BeamSizes.size32; + + static const double largeSplashRadius = 24; +} + +class BeamSpacing { + static const double zero = BeamSizes.size0; + static const double small = BeamSizes.size4; + static const double medium = BeamSizes.size8; + static const double large = BeamSizes.size12; + static const double extraLarge = BeamSizes.size16; + static const double extraExtraLarge = BeamSizes.size36; +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/build_metadata.dart b/playground/frontend/build/playground_components/lib/src/controllers/build_metadata.dart new file mode 100644 index 000000000000..6455d19b0ea2 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/build_metadata.dart @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:get_it/get_it.dart'; + +import '../api/v1/api.pbgrpc.dart' show GetMetadataResponse; +import '../models/component_version.dart'; +import '../models/sdk.dart'; +import '../repositories/code_client/code_client.dart'; +import '../repositories/example_client/example_client.dart'; +import '../repositories/get_metadata_response_grpc_extension.dart'; + +/// Obtains versions from the backend. +class BuildMetadataController extends ChangeNotifier { + ComponentVersion? _routerVersion; + Future? _routerVersionFuture; + + final _runnerVersions = {}; + final _runnerVersionFutures = >{}; + + Future getRouterVersion() async { + if (_routerVersionFuture == null) { + await _loadRouterVersion(); + } + return _routerVersion!; + } + + Future _loadRouterVersion() async { + final client = GetIt.instance.get(); + _routerVersionFuture = client.getMetadata(); + + final metadata = await _routerVersionFuture!; + _routerVersion = metadata.componentVersion; + notifyListeners(); + } + + /// Returns the runner version and starts loading if it is not started yet. + Future getRunnerVersion(Sdk sdk) async { + if (!_runnerVersionFutures.containsKey(sdk)) { + await _loadRunnerVersion(sdk); + } + + return _runnerVersions[sdk]!; + } + + Future _loadRunnerVersion(Sdk sdk) async { + final client = GetIt.instance.get(); + _runnerVersionFutures[sdk] = client.getMetadata(sdk); + + final metadata = await _runnerVersionFutures[sdk]!; + _runnerVersions[sdk] = metadata.componentVersion; + notifyListeners(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/code_runner.dart b/playground/frontend/build/playground_components/lib/src/controllers/code_runner.dart new file mode 100644 index 000000000000..0a55b4236b6f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/code_runner.dart @@ -0,0 +1,522 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: prefer_interpolation_to_compose_strings + +import 'dart:async'; + +import 'package:clock/clock.dart'; +import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../playground_components.dart'; +import '../enums/unread_entry.dart'; +import '../repositories/models/output_response.dart'; +import '../repositories/models/run_code_error.dart'; +import '../repositories/models/run_code_request.dart'; +import '../repositories/models/run_code_response.dart'; +import '../repositories/models/run_code_result.dart'; +import '../util/connectivity_result.dart'; +import 'snippet_editing_controller.dart'; +import 'unread_controller.dart'; + +const kTimeoutErrorText = + 'Pipeline exceeded Playground execution timeout and was terminated. ' + 'We recommend installing Apache Beam ' + 'https://beam.apache.org/get-started/downloads/ ' + 'to try examples without timeout limitation.'; +const kUnknownErrorText = + 'Something went wrong. Please try again later or create a GitHub issue'; +const kProcessingStartedText = 'The processing has been started\n'; +const kProcessingStartedOptionsText = + 'The processing has been started with the pipeline options: '; + +class CodeRunner extends ChangeNotifier { + final CodeClient? codeClient; + final ValueGetter _snippetEditingControllerGetter; + SnippetEditingController? snippetEditingController; + final unreadController = UnreadController(); + + CodeRunner({ + required ValueGetter + snippetEditingControllerGetter, + this.codeClient, + }) : _snippetEditingControllerGetter = snippetEditingControllerGetter; + + RunCodeResult? _result; + DateTime? _runStartDate; + DateTime? _runStopDate; + + /// [Duration] from the last execution start to finish or to present time. + Duration? get elapsed => _runStartDate == null + ? null + : (_runStopDate ?? clock.now()).difference(_runStartDate!); + + /// The [EventSnippetContext] at the time when execution started. + EventSnippetContext? _eventSnippetContext; + + /// [EventSnippetContext] for which the execution last started. + EventSnippetContext? get eventSnippetContext => _eventSnippetContext; + + String? get pipelineOptions => + _snippetEditingControllerGetter()?.pipelineOptions; + + RunCodeResult? get result => _result; + + DateTime? get runStartDate => _runStartDate; + + DateTime? get runStopDate => _runStopDate; + + bool get isCodeRunning => !(_result?.isFinished ?? true); + + String get resultLog => _result?.log ?? ''; + + String get resultOutput => _result?.output ?? ''; + + String get resultLogOutput => resultLog + resultOutput; + + bool get isExampleChanged { + return _snippetEditingControllerGetter()?.isChanged ?? false; + } + + // Snapshot of additional analytics data at the time when execution started. + Map _analyticsData = const {}; + + Map get analyticsData => _analyticsData; + + bool get canRun => _snippetEditingControllerGetter() != null; + + static const _attempts = 6; + static const _attemptInterval = Duration(seconds: 5); + static const _statusCheckInterval = Duration(seconds: 1); + + void clearResult() { + _eventSnippetContext = null; + _setResult(null); + } + + Future reset() async { + if (isCodeRunning) { + await cancelRun(); + } + _runStartDate = null; + _runStopDate = null; + _eventSnippetContext = null; + _setResult(null); + } + + Future runCode({ + Map analyticsData = const {}, + }) async { + _analyticsData = analyticsData; + _runStartDate = DateTime.now(); + _runStopDate = null; + snippetEditingController = _snippetEditingControllerGetter(); + _eventSnippetContext = snippetEditingController!.eventSnippetContext; + + if (!isExampleChanged && + snippetEditingController!.example?.outputs != null) { + await _showPrecompiledResult(); + return; + } + + await _runReal(); + } + + Future _runReal() async { + final sdk = snippetEditingController!.sdk; + final parsedPipelineOptions = + parsePipelineOptions(snippetEditingController!.pipelineOptions); + if (parsedPipelineOptions == null) { + _setResult( + RunCodeResult( + errorMessage: 'errors.failedParseOptions'.tr(), + sdk: sdk, + status: RunCodeStatus.compileError, + ), + ); + return; + } + + final log = parsedPipelineOptions.isEmpty + ? kProcessingStartedText + : kProcessingStartedOptionsText + + parsedPipelineOptions.entries + .map((e) => '--${e.key} ${e.value}') + .join(' ') + + '\n'; + + _setResult( + RunCodeResult( + log: log, + sdk: sdk, + status: RunCodeStatus.preparation, + ), + ); + + final request = RunCodeRequest( + datasets: snippetEditingController?.example?.datasets ?? [], + files: snippetEditingController!.getFiles(), + sdk: snippetEditingController!.sdk, + pipelineOptions: parsedPipelineOptions, + ); + + try { + final runResponse = await _startExecution(request); + + if (runResponse == null || _result!.isFinished) { + // Cancelled while trying to start. + final pipelineUuid = runResponse?.pipelineUuid; + if (pipelineUuid != null) { + await codeClient?.cancelExecution(pipelineUuid); + } + return; + } + + await Future.delayed(_statusCheckInterval); + + while (!_result!.isFinished) { + final statusResponse = + await codeClient!.checkStatus(runResponse.pipelineUuid); + + final result = await _getPipelineResult( + runResponse.pipelineUuid, + statusResponse.status, + _result!, + ); + + _setResultIfNotFinished(result); + + await Future.delayed(_statusCheckInterval); + } + } on RunCodeError catch (ex) { + _setResult( + RunCodeResult( + errorMessage: ex.message ?? kUnknownErrorText, + log: _result!.log, + output: (_result!.output ?? '') + + '\n' + + (ex.message ?? kUnknownErrorText), + sdk: request.sdk, + status: RunCodeStatus.unknownError, + ), + ); + } on Exception catch (ex) { + print(ex); // ignore: avoid_print + _setResult( + RunCodeResult( + errorMessage: kUnknownErrorText, + log: _result!.log, + output: (_result!.output ?? '') + '\n' + kUnknownErrorText, + sdk: request.sdk, + status: RunCodeStatus.unknownError, + ), + ); + } finally { + snippetEditingController = null; + } + } + + Future _startExecution(RunCodeRequest request) async { + Exception? lastException; + + // Attempts to place the job for execution. + // This fails if the backend is overloaded and has not yet scaled up. + for (int attemptsLeft = _attempts; --attemptsLeft >= 0;) { + if (_result!.isFinished) { + return null; // Cancelled while retrying. + } + + try { + return await codeClient!.runCode(request); + } on RunCodeResourceExhaustedError catch (ex) { + lastException = ex; + } + + // ignore: avoid_print + print( + 'Got RunCodeResourceExhaustedError, attempts left: $attemptsLeft.', + ); + if (attemptsLeft > 0) { + // ignore: avoid_print + print('Waiting for $_attemptInterval before retrying.'); + await Future.delayed(_attemptInterval); + } + } + + throw lastException ?? Exception('lastException must be filled above.'); + } + + /// Resets the error message text so that on the next rebuild + /// of `CodeTextAreaWrapper` it is not picked up and not shown as a toast. + // TODO: Listen to this object outside of widgets, + // emit toasts from notifications, then remove this method. + void resetErrorMessageText() { + if (_result == null) { + return; + } + + _setResult( + RunCodeResult( + graph: _result!.graph, + log: _result!.log, + output: _result!.output, + sdk: _result!.sdk, + status: _result!.status, + ), + ); + + notifyListeners(); + } + + Future cancelRun() async { + final sdk = _result?.sdk; + if (sdk == null) { + return; + } + + final hasInternet = (await Connectivity().checkConnectivity()).isConnected; + if (!hasInternet) { + _setResult( + RunCodeResult( + errorMessage: 'errors.internetUnavailable'.tr(), + graph: _result?.graph, + log: _result?.log ?? '', + output: _result?.output, + sdk: sdk, + status: _result?.status ?? RunCodeStatus.unspecified, + ), + ); + notifyListeners(); + return; + } + + snippetEditingController = null; + final pipelineUuid = _result?.pipelineUuid ?? ''; + + if (pipelineUuid.isNotEmpty) { + await codeClient?.cancelExecution(pipelineUuid); + } + + _setResult( + RunCodeResult( + graph: _result?.graph, + log: (_result?.log ?? '') + + '\n' + + 'widgets.output.messages.pipelineCancelled'.tr(), + output: _result?.output, + sdk: sdk, + status: RunCodeStatus.cancelled, + ), + ); + } + + Future _showPrecompiledResult() async { + final selectedExample = snippetEditingController!.example!; + + _setResult( + RunCodeResult( + sdk: selectedExample.sdk, + status: RunCodeStatus.preparation, + ), + ); + + notifyListeners(); + // add a little delay to improve user experience + await Future.delayed(kPrecompiledDelay); + + if (_result?.status != RunCodeStatus.preparation) { + return; + } + + final String logs = selectedExample.logs ?? ''; + _setResult( + RunCodeResult( + graph: selectedExample.graph, + log: kCachedResultsLog + logs, + output: selectedExample.outputs, + sdk: selectedExample.sdk, + status: RunCodeStatus.finished, + ), + ); + } + + void _setResultIfNotFinished(RunCodeResult newValue) { + if (_result?.isFinished ?? true) { + return; + } + _setResult(newValue); + } + + void _setResult(RunCodeResult? newValue) { + // ignore: use_if_null_to_convert_nulls_to_bools + if (_result?.isFinished == false && newValue?.isFinished == true) { + _runStopDate = clock.now(); + } + + _result = newValue; + + if (newValue == null) { + unreadController.markAllRead(); + } else { + unreadController.setValue( + UnreadEntryEnum.result, + (newValue.output ?? '') + (newValue.log ?? ''), + ); + unreadController.setValue( + UnreadEntryEnum.graph, + newValue.graph ?? '', + ); + } + + notifyListeners(); + } + + Future _getPipelineResult( + String pipelineUuid, + RunCodeStatus status, + RunCodeResult prevResult, + ) async { + final prevOutput = prevResult.output ?? ''; + final prevLog = prevResult.log ?? ''; + final prevGraph = prevResult.graph ?? ''; + + switch (status) { + case RunCodeStatus.compileError: + final compileOutput = await codeClient!.getCompileOutput(pipelineUuid); + return RunCodeResult( + graph: prevGraph, + log: prevLog, + output: prevOutput + compileOutput.output, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.timeout: + return RunCodeResult( + errorMessage: kTimeoutErrorText, + graph: prevGraph, + log: prevLog, + output: prevOutput + kTimeoutErrorText, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.runError: + final output = await codeClient!.getRunErrorOutput(pipelineUuid); + return RunCodeResult( + graph: prevGraph, + log: prevLog, + output: prevOutput + output.output, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.validationError: + final output = await codeClient!.getValidationErrorOutput(pipelineUuid); + return RunCodeResult( + graph: prevGraph, + log: prevLog, + output: prevOutput + output.output, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.preparationError: + final output = + await codeClient!.getPreparationErrorOutput(pipelineUuid); + return RunCodeResult( + graph: prevGraph, + log: prevLog, + output: prevOutput + output.output, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.unknownError: + return RunCodeResult( + errorMessage: kUnknownErrorText, + graph: prevGraph, + log: prevLog, + output: prevOutput + kUnknownErrorText, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.executing: + final responses = await Future.wait([ + codeClient!.getRunOutput(pipelineUuid), + codeClient!.getLogOutput(pipelineUuid), + prevGraph.isEmpty + ? codeClient!.getGraphOutput(pipelineUuid) + : Future.value(OutputResponse(output: prevGraph)), + ]); + final output = responses[0]; + final log = responses[1]; + final graph = responses[2]; + return RunCodeResult( + graph: graph.output, + log: prevLog + log.output, + output: prevOutput + output.output, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.cancelled: + case RunCodeStatus.finished: + final responses = await Future.wait([ + codeClient!.getRunOutput(pipelineUuid), + codeClient!.getLogOutput(pipelineUuid), + codeClient!.getRunErrorOutput(pipelineUuid), + prevGraph.isEmpty + ? codeClient!.getGraphOutput(pipelineUuid) + : Future.value(OutputResponse(output: prevGraph)), + ]); + final output = responses[0]; + final log = responses[1]; + final error = responses[2]; + final graph = responses[3]; + return RunCodeResult( + graph: graph.output, + log: prevLog + log.output, + output: prevOutput + output.output + error.output, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + + case RunCodeStatus.unspecified: + case RunCodeStatus.preparation: + case RunCodeStatus.compiling: + return RunCodeResult( + graph: prevGraph, + log: prevLog, + output: prevOutput, + pipelineUuid: pipelineUuid, + sdk: prevResult.sdk, + status: status, + ); + } + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/catalog_default_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/catalog_default_example_loader.dart new file mode 100644 index 000000000000..699c205d751c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/catalog_default_example_loader.dart @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/catalog_default_example_loading_descriptor.dart'; +import '../../models/example_loading_descriptors/example_loading_descriptor.dart'; +import '../../models/example_loading_descriptors/standard_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +/// The [ExampleLoader] for [CatalogDefaultExampleLoadingDescriptor]. +/// +/// Loads the default example for the [sdk]. +class CatalogDefaultExampleLoader extends ExampleLoader { + @override + ExampleLoadingDescriptor get descriptor => + _standardDescriptor ?? _defaultDescriptor; + + final CatalogDefaultExampleLoadingDescriptor _defaultDescriptor; + StandardExampleLoadingDescriptor? _standardDescriptor; + + final ExampleCache exampleCache; + + CatalogDefaultExampleLoader({ + required CatalogDefaultExampleLoadingDescriptor descriptor, + required this.exampleCache, + }) : _defaultDescriptor = descriptor; + + @override + Sdk get sdk => _defaultDescriptor.sdk; + + @override + Future get future async { + final result = + await exampleCache.getDefaultExampleBySdk(_defaultDescriptor.sdk); + + if (result == null) { + throw Exception('Default example not found for $descriptor'); + } + + _standardDescriptor = StandardExampleLoadingDescriptor( + path: result.path, + sdk: result.sdk, + viewOptions: _defaultDescriptor.viewOptions, + ); + + return result; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/content_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/content_example_loader.dart new file mode 100644 index 000000000000..59357fe0cdb7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/content_example_loader.dart @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_base.dart'; +import '../../models/example_loading_descriptors/content_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +/// The [ExampleLoader] for [ContentExampleLoadingDescriptor]. +/// +/// Loads the example fully contained in the [descriptor]. +class ContentExampleLoader extends ExampleLoader { + @override + final ContentExampleLoadingDescriptor descriptor; + + const ContentExampleLoader({ + required this.descriptor, + // TODO(alexeyinkin): Remove when this lands: https://github.com/dart-lang/language/issues/1813 + required ExampleCache exampleCache, + }); + + @override + Sdk get sdk => descriptor.sdk; + + @override + Future get future async => Example( + complexity: descriptor.complexity, + files: descriptor.files, + name: descriptor.name ?? 'Untitled Example', + path: '', + pipelineOptions: descriptor.pipelineOptions, + sdk: descriptor.sdk, + type: ExampleType.example, + viewOptions: descriptor.viewOptions, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/empty_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/empty_example_loader.dart new file mode 100644 index 000000000000..9bccc2a4f4f6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/empty_example_loader.dart @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/empty_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +/// The [ExampleLoader] for [EmptyExampleLoadingDescriptor]. +/// +/// Empties the editor. +class EmptyExampleLoader extends ExampleLoader { + @override + final EmptyExampleLoadingDescriptor descriptor; + + final Example _example; + + EmptyExampleLoader({ + required this.descriptor, + // TODO(alexeyinkin): Remove when this lands: https://github.com/dart-lang/language/issues/1813 + required ExampleCache exampleCache, + }) : _example = Example.empty(descriptor.sdk); + + @override + Sdk get sdk => _example.sdk; + + @override + Future get future async => _example; +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader.dart new file mode 100644 index 000000000000..99c7e79ea5de --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/example_loading_descriptor.dart'; +import '../../models/sdk.dart'; + +/// Loads an [Example] of the [sdk] from the [descriptor] when the [future] +/// is read for the first time. +abstract class ExampleLoader { + const ExampleLoader(); + + Sdk? get sdk; + + Future get future; + + ExampleLoadingDescriptor get descriptor; +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader_factory.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader_factory.dart new file mode 100644 index 000000000000..edf0a961fb39 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/example_loader_factory.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../cache/example_cache.dart'; +import '../../models/example_loading_descriptors/example_loading_descriptor.dart'; +import 'example_loader.dart'; + +typedef ExampleLoaderFactoryFunction + = ExampleLoader Function({ + required D descriptor, + required ExampleCache exampleCache, +}); + +class ExampleLoaderFactory { + final factories = {}; + + void add( + ExampleLoaderFactoryFunction function, + ) { + factories[D] = ({ + required ExampleLoadingDescriptor descriptor, + required ExampleCache exampleCache, + }) { + return function(descriptor: descriptor as D, exampleCache: exampleCache); + }; + } + + ExampleLoader? create({ + required D descriptor, + required ExampleCache exampleCache, + }) { + return factories[descriptor.runtimeType]?.call( + descriptor: descriptor, + exampleCache: exampleCache, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/examples_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/examples_loader.dart new file mode 100644 index 000000000000..ca82333459a7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/examples_loader.dart @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:get_it/get_it.dart'; + +import '../../exceptions/example_loading_exception.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/empty_example_loading_descriptor.dart'; +import '../../models/example_loading_descriptors/example_loading_descriptor.dart'; +import '../../models/example_loading_descriptors/examples_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import '../../services/toast_notifier.dart'; +import '../playground_controller.dart'; +import 'catalog_default_example_loader.dart'; +import 'content_example_loader.dart'; +import 'empty_example_loader.dart'; +import 'example_loader.dart'; +import 'example_loader_factory.dart'; +import 'hive_example_loader.dart'; +import 'http_example_loader.dart'; +import 'standard_example_loader.dart'; +import 'user_shared_example_loader.dart'; + +class ExamplesLoader { + final defaultFactory = ExampleLoaderFactory(); + PlaygroundController? _playgroundController; + ExamplesLoadingDescriptor? _descriptor; + + static final failedToLoadExamples = []; + + ExamplesLoader() { + defaultFactory.add(CatalogDefaultExampleLoader.new); + defaultFactory.add(ContentExampleLoader.new); + defaultFactory.add(EmptyExampleLoader.new); + defaultFactory.add(HiveExampleLoader.new); + defaultFactory.add(HttpExampleLoader.new); + defaultFactory.add(StandardExampleLoader.new); + defaultFactory.add(UserSharedExampleLoader.new); + } + + void setPlaygroundController(PlaygroundController value) { + _playgroundController = value; + } + + /// Loads examples from [descriptor]'s immediate list. + /// + /// Sets empty editor for SDKs of failed examples. + Future loadIfNew(ExamplesLoadingDescriptor descriptor) async { + if (_descriptor == descriptor) { + return; + } + await load(descriptor); + } + + Future load(ExamplesLoadingDescriptor descriptor) async { + _descriptor = descriptor; + final loaders = descriptor.descriptors.map(_createLoader).whereNotNull(); + + try { + final loadFutures = loaders.map(_loadOne); + await Future.wait(loadFutures); + // ignore: avoid_catches_without_on_clauses + } catch (_) { + await _emptyMissing(loaders); + } + + final sdk = descriptor.initialSdk; + if (sdk != null) { + _playgroundController!.setSdk(sdk); + } + } + + ExampleLoader? _createLoader(ExampleLoadingDescriptor descriptor) { + final loader = defaultFactory.create( + descriptor: descriptor, + exampleCache: _playgroundController!.exampleCache, + ); + + if (loader == null) { + // TODO(alexeyinkin): Log, https://github.com/apache/beam/issues/23398. + print('Cannot create example loader for $descriptor'); + return null; + } + + return loader; + } + + Future _emptyMissing(Iterable loaders) async { + await Future.wait(loaders.map(_emptyIfMissing)); + } + + Future _emptyIfMissing(ExampleLoader loader) async { + final sdk = loader.sdk; + + if (sdk == null) { + return; + } + + _playgroundController!.setEmptyIfNotExists( + sdk, + setCurrentSdk: _shouldSetCurrentSdk(sdk), + ); + } + + Future loadDefaultIfAny(Sdk sdk) async { + try { + final one = _descriptor?.lazyLoadDescriptors[sdk]?.firstOrNull; + + if (_descriptor == null || one == null) { + return; + } + + final loader = _createLoader(one); + if (loader == null) { + return; + } + + await _loadOne(loader); + } on Exception catch (ex) { + GetIt.instance.get().addException(ex); + await _loadOne( + EmptyExampleLoader( + descriptor: EmptyExampleLoadingDescriptor(sdk: sdk), + exampleCache: _playgroundController!.exampleCache, + ), + ); + rethrow; + } + } + + Future _loadOne(ExampleLoader loader) async { + Example example; + try { + example = await loader.future; + // ignore: avoid_catches_without_on_clauses + } catch (ex) { + example = Example.empty(loader.sdk ?? Sdk.java); + _handleLoadException(loader, ex as Exception); + throw ExampleLoadingException(token: loader.descriptor.token); + } + _playgroundController!.setExample( + example, + descriptor: loader.descriptor, + setCurrentSdk: _shouldSetCurrentSdk(example.sdk), + ); + } + + void _handleLoadException(ExampleLoader loader, Exception ex) { + if (loader.descriptor.token != null) { + failedToLoadExamples.add(loader.descriptor.token!); + } + GetIt.instance.get().addException(ex); + final example = Example.empty(loader.sdk ?? Sdk.java); + _playgroundController!.setExample( + example, + descriptor: loader.descriptor, + setCurrentSdk: _shouldSetCurrentSdk(example.sdk), + ); + } + + bool _shouldSetCurrentSdk(Sdk sdk) { + final descriptor = _descriptor; + + if (descriptor == null) { + return false; + } + + if (descriptor.initialSdk == null) { + return true; + } + + return descriptor.initialSdk == sdk; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/hive_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/hive_example_loader.dart new file mode 100644 index 000000000000..7f394cfa606d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/hive_example_loader.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:convert'; + +import 'package:hive/hive.dart'; + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/hive_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +class HiveExampleLoader extends ExampleLoader { + @override + final HiveExampleLoadingDescriptor descriptor; + + final ExampleCache exampleCache; + + HiveExampleLoader({ + required this.descriptor, + required this.exampleCache, + }); + + @override + Sdk? get sdk => descriptor.sdk; + + @override + Future get future async { + final box = await Hive.openBox(descriptor.boxName); + final Map map = jsonDecode(box.get(descriptor.snippetId)); + return Example.fromJson(map); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/http_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/http_example_loader.dart new file mode 100644 index 000000000000..c29d7e9d96b5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/http_example_loader.dart @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:http/http.dart' as http; + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_base.dart'; +import '../../models/example_loading_descriptors/http_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import '../../models/snippet_file.dart'; +import 'example_loader.dart'; + +/// The [ExampleLoader] for [HttpExampleLoadingDescriptor]. +/// +/// Loads an example from the text content at a URL. +class HttpExampleLoader extends ExampleLoader { + @override + final HttpExampleLoadingDescriptor descriptor; + + const HttpExampleLoader({ + required this.descriptor, + // TODO(alexeyinkin): Remove when this lands: https://github.com/dart-lang/language/issues/1813 + required ExampleCache exampleCache, + }); + + @override + Sdk get sdk => descriptor.sdk; + + @override + Future get future async { + final response = await http.get(descriptor.uri); + + if (response.statusCode >= 400) { + throw Exception('Example not found: Error code ${response.statusCode}'); + } + + return Example( + name: descriptor.uri.path.split('/').lastOrNull ?? 'HTTP Example', + files: [ + SnippetFile(content: response.body, isMain: true), + ], + path: descriptor.uri.toString(), + sdk: descriptor.sdk, + type: ExampleType.example, + viewOptions: descriptor.viewOptions, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/standard_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/standard_example_loader.dart new file mode 100644 index 000000000000..20c88d635583 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/standard_example_loader.dart @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import '../../cache/example_cache.dart'; +import '../../exceptions/multiple_exceptions.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/standard_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +/// Loads a given example from the local cache, then adds info from network. +/// +/// This loader assumes that [ExampleCache] is loading all examples to +/// its cache. So it only completes if this is successful. +class StandardExampleLoader extends ExampleLoader { + @override + final StandardExampleLoadingDescriptor descriptor; + + final ExampleCache exampleCache; + + @override + Sdk? get sdk => descriptor.sdk; + + @override + late Future future = _load(); + + StandardExampleLoader({ + required this.descriptor, + required this.exampleCache, + }); + + Future _load() async { + try { + final exampleWithoutOptions = await exampleCache.getPrecompiledObject( + descriptor.path, + descriptor.sdk, + ); + + return exampleWithoutOptions.copyWith( + viewOptions: descriptor.viewOptions, + ); + } on Exception catch (ex, trace) { + return _tryLoadSharedExample( + previousExceptions: [ex], + previousStackTraces: [trace], + ); + } + } + + Future _tryLoadSharedExample({ + required List previousExceptions, + required List previousStackTraces, + }) async { + try { + return await exampleCache.loadSharedExample( + descriptor.path, + viewOptions: descriptor.viewOptions, + ); + } on Exception catch (ex, trace) { + throw MultipleExceptions( + 'Cannot load example: ${descriptor.path}', + exceptions: [...previousExceptions, ex], + stackTraces: [...previousStackTraces, trace], + ); + } + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/user_shared_example_loader.dart b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/user_shared_example_loader.dart new file mode 100644 index 000000000000..23fd43d4683e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/example_loaders/user_shared_example_loader.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../cache/example_cache.dart'; +import '../../models/example.dart'; +import '../../models/example_loading_descriptors/user_shared_example_loading_descriptor.dart'; +import '../../models/sdk.dart'; +import 'example_loader.dart'; + +/// The [ExampleLoader] from [UserSharedExampleLoadingDescriptor]. +/// +/// Loads a snippet previously saved by some user. +class UserSharedExampleLoader extends ExampleLoader { + @override + final UserSharedExampleLoadingDescriptor descriptor; + + final ExampleCache exampleCache; + Example? _example; + + UserSharedExampleLoader({ + required this.descriptor, + required this.exampleCache, + }); + + @override + Sdk? get sdk => _example?.sdk; + + @override + Future get future async { + return _example ?? + (_example = await exampleCache.loadSharedExample( + descriptor.snippetId, + viewOptions: descriptor.viewOptions, + )); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/feedback_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/feedback_controller.dart new file mode 100644 index 000000000000..d8145ffc0b5c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/feedback_controller.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +import '../enums/feedback_rating.dart'; +import '../models/event_snippet_context.dart'; + +class FeedbackController extends ChangeNotifier { + EventSnippetContext? eventSnippetContext; + Map additionalParams; + final textController = TextEditingController(); + + FeedbackController({ + this.eventSnippetContext, + this.additionalParams = const {}, + }); + + FeedbackRating? _rating; + FeedbackRating? get rating => _rating; + + set rating(FeedbackRating? newValue) { + _rating = newValue; + notifyListeners(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/playground_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/playground_controller.dart new file mode 100644 index 000000000000..4b01020c7956 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/playground_controller.dart @@ -0,0 +1,357 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; +import 'dart:math'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get_it/get_it.dart'; + +import '../cache/example_cache.dart'; +import '../models/event_snippet_context.dart'; +import '../models/example.dart'; +import '../models/example_base.dart'; +import '../models/example_loading_descriptors/empty_example_loading_descriptor.dart'; +import '../models/example_loading_descriptors/example_loading_descriptor.dart'; +import '../models/example_loading_descriptors/examples_loading_descriptor.dart'; +import '../models/example_loading_descriptors/standard_example_loading_descriptor.dart'; +import '../models/example_loading_descriptors/user_shared_example_loading_descriptor.dart'; +import '../models/intents.dart'; +import '../models/sdk.dart'; +import '../models/shortcut.dart'; +import '../repositories/code_client/code_client.dart'; +import '../services/symbols/loaders/map.dart'; +import '../services/symbols/symbols_notifier.dart'; +import '../util/logical_keyboard_key.dart'; +import 'code_runner.dart'; +import 'example_loaders/examples_loader.dart'; +import 'feedback_controller.dart'; +import 'result_filter_controller.dart'; +import 'snippet_editing_controller.dart'; + +const kTitleLength = 25; +const kExecutionTimeUpdate = 100; +const kPrecompiledDelay = Duration(seconds: 1); +const kCachedResultsLog = + 'The results of this example are taken from the Apache Beam Playground cache.\n'; + +/// The main state object for the code and its running. +class PlaygroundController with ChangeNotifier { + final ExampleCache exampleCache; + final ExamplesLoader examplesLoader; + final resultFilterController = ResultFilterController(); + + late final CodeRunner codeRunner; + + final _snippetEditingControllers = {}; + + Sdk? _sdk; + + PlaygroundController({ + required this.exampleCache, + required this.examplesLoader, + CodeClient? codeClient, + }) { + examplesLoader.setPlaygroundController(this); + + codeRunner = CodeRunner( + codeClient: codeClient, + snippetEditingControllerGetter: requireSnippetEditingController, + )..addListener(notifyListeners); + } + + SnippetEditingController _getOrCreateSnippetEditingController( + Sdk sdk, { + required bool loadDefaultIfNot, + }) { + final existing = _snippetEditingControllers[sdk]; + if (existing != null) { + return existing; + } + + final result = SnippetEditingController(sdk: sdk); + _snippetEditingControllers[sdk] = result; + result.addListener(notifyListeners); + + if (loadDefaultIfNot) { + // TODO(alexeyinkin): Show loading indicator if loading. + examplesLoader.loadDefaultIfAny(sdk); + } + + return result; + } + + // TODO(alexeyinkin): Return full, then shorten, https://github.com/apache/beam/issues/23250 + String get examplesTitle { + final name = + snippetEditingController?.example?.name ?? 'examples.defaultTitle'.tr(); + return name.substring(0, min(kTitleLength, name.length)); + } + + Example? get selectedExample => snippetEditingController?.example; + + Sdk? get sdk => _sdk; + + SnippetEditingController? get snippetEditingController => + _snippetEditingControllers[_sdk]; + + SnippetEditingController requireSnippetEditingController() { + final controller = snippetEditingController; + + if (controller == null) { + throw Exception('SDK is not set.'); + } + + return controller; + } + + /// [EventSnippetContext] of the current [SnippetEditingController]. + EventSnippetContext get eventSnippetContext => + snippetEditingController?.eventSnippetContext ?? + EventSnippetContext.empty; + + String? get source => + snippetEditingController?.activeFileController?.codeController.fullText; + + // TODO(alexeyinkin): Single source of truth for whether graph is supported, https://github.com/apache/beam/issues/23251 + bool get graphAvailable => + selectedExample?.type != ExampleType.test && + [Sdk.java, Sdk.python].contains(sdk); + + /// If no SDK is selected, sets it to [sdk] and creates an empty state for it. + void setEmptyIfNoSdk(Sdk sdk) { + if (_sdk != null) { + return; + } + + setExample( + Example.empty(sdk), + descriptor: EmptyExampleLoadingDescriptor(sdk: sdk), + setCurrentSdk: true, + ); + } + + /// If the state for [sdk] does not exists, creates an empty state for it. + void setEmptyIfNotExists( + Sdk sdk, { + required bool setCurrentSdk, + }) { + if (_snippetEditingControllers.containsKey(sdk)) { + return; + } + + setExample( + Example.empty(sdk), + descriptor: EmptyExampleLoadingDescriptor(sdk: sdk), + setCurrentSdk: setCurrentSdk, + ); + } + + Future setExampleBase(ExampleBase exampleBase) async { + final snippetEditingController = _getOrCreateSnippetEditingController( + exampleBase.sdk, + loadDefaultIfNot: false, + ); + + if (!snippetEditingController.lockExampleLoading()) { + return; + } + + notifyListeners(); + + try { + final example = await exampleCache.loadExampleInfo(exampleBase); + // TODO(alexeyinkin): setCurrentSdk = false when we do + // per-SDK output and run status. + // Now using true to reset the output and run status. + // https://github.com/apache/beam/issues/23248 + final descriptor = StandardExampleLoadingDescriptor( + sdk: example.sdk, + path: example.path, + ); + + setExample( + example, + descriptor: descriptor, + setCurrentSdk: true, + ); + + // ignore: avoid_catches_without_on_clauses + } catch (ex) { + snippetEditingController.releaseExampleLoading(); + notifyListeners(); + rethrow; + } + } + + void setExample( + Example example, { + required ExampleLoadingDescriptor descriptor, + required bool setCurrentSdk, + }) { + if (setCurrentSdk) { + _sdk = example.sdk; + _ensureSymbolsInitialized(); + } + + final controller = _getOrCreateSnippetEditingController( + example.sdk, + loadDefaultIfNot: false, + ); + controller.setExample(example, descriptor: descriptor); + if (example.sdk == _sdk) { + GetIt.instance.get().eventSnippetContext = + controller.eventSnippetContext; + } + + codeRunner.reset(); + notifyListeners(); + } + + void setSdk( + Sdk sdk, { + bool notify = true, + }) { + _sdk = sdk; + final controller = _getOrCreateSnippetEditingController( + sdk, + loadDefaultIfNot: true, + ); + GetIt.instance.get().eventSnippetContext = + controller.eventSnippetContext; + _ensureSymbolsInitialized(); + + if (notify) { + notifyListeners(); + } + } + + void _ensureSymbolsInitialized() { + final mode = _sdk?.highlightMode; + final loader = symbolLoadersByMode[mode]; + + if (mode == null || loader == null) { + return; + } + + GetIt.instance.get().addLoaderIfNot(mode, loader); + } + + Future reset() async { + snippetEditingController?.reset(); + codeRunner.reset(); + notifyListeners(); + } + + void showSuggestions() { + snippetEditingController?.activeFileController?.codeController + .generateSuggestions(); + notifyListeners(); + } + + void resetErrorMessageText() { + codeRunner.resetErrorMessageText(); + } + + void setPipelineOptions(String options) { + final controller = requireSnippetEditingController(); + controller.pipelineOptions = options; + notifyListeners(); + } + + Future saveSnippet() async { + final snippetController = requireSnippetEditingController(); + final files = snippetController.getFiles(); + + final snippetId = await exampleCache.saveSnippet( + files: files, + pipelineOptions: snippetController.pipelineOptions, + sdk: snippetController.sdk, + ); + + final sharedExample = Example( + datasets: snippetController.example?.datasets ?? [], + files: files, + name: 'examples.userSharedName'.tr(), + path: snippetId, + sdk: snippetController.sdk, + type: ExampleType.example, + pipelineOptions: snippetController.pipelineOptions, + ); + + final descriptor = UserSharedExampleLoadingDescriptor( + sdk: sharedExample.sdk, + snippetId: snippetId, + ); + + snippetController.setExample(sharedExample, descriptor: descriptor); + + return descriptor; + } + + /// Creates an [ExamplesLoadingDescriptor] that can recover + /// the current content. + ExamplesLoadingDescriptor getLoadingDescriptor() { + return ExamplesLoadingDescriptor( + descriptors: _snippetEditingControllers.values + .map( + (controller) => controller.getLoadingDescriptor(), + ) + .toList(growable: false), + initialSdk: _sdk, + ); + } + + late BeamShortcut resetShortcut = BeamShortcut( + keys: [ + LogicalKeyboardKeyExtension.metaOrControl, + LogicalKeyboardKey.shift, + LogicalKeyboardKey.keyE, + ], + actionIntent: const ResetIntent(), + createAction: (BuildContext context) => CallbackAction( + onInvoke: (_) => reset(), + ), + ); + + late BeamShortcut showSuggestionsShortcut = BeamShortcut( + keys: [ + LogicalKeyboardKeyExtension.metaOrControl, + LogicalKeyboardKey.shift, + LogicalKeyboardKey.keyS, + ], + actionIntent: const ShowSuggestionsIntent(), + createAction: (BuildContext context) => CallbackAction( + onInvoke: (_) => showSuggestions(), + ), + ); + + List get shortcuts => [ + // TODO(nausharipov): refactor like BeamRunShortcut. + resetShortcut, + showSuggestionsShortcut, + ]; + + @override + void dispose() { + super.dispose(); + codeRunner.removeListener(notifyListeners); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/public_notifier.dart b/playground/frontend/build/playground_components/lib/src/controllers/public_notifier.dart new file mode 100644 index 000000000000..cbc30fe84b9d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/public_notifier.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +/// Exposes notifyListeners that was protected in the superclass. +/// +/// Use this object when you need to fire callbacks that for some +/// reason cannot listen to the object you write your code in. +class PublicNotifier extends ChangeNotifier { + void notifyPublic() => notifyListeners(); +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/result_filter_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/result_filter_controller.dart new file mode 100644 index 000000000000..fc8703846fb2 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/result_filter_controller.dart @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../enums/result_filter.dart'; + +class ResultFilterController extends ChangeNotifier { + ResultFilterEnum value = ResultFilterEnum.all; + + void setValue(ResultFilterEnum newValue) { + value = newValue; + notifyListeners(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/snippet_editing_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/snippet_editing_controller.dart new file mode 100644 index 000000000000..090ab1018f15 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/snippet_editing_controller.dart @@ -0,0 +1,280 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:flutter/widgets.dart'; + +import '../models/event_snippet_context.dart'; +import '../models/example.dart'; +import '../models/example_loading_descriptors/content_example_loading_descriptor.dart'; +import '../models/example_loading_descriptors/empty_example_loading_descriptor.dart'; +import '../models/example_loading_descriptors/example_loading_descriptor.dart'; +import '../models/example_view_options.dart'; +import '../models/loading_status.dart'; +import '../models/sdk.dart'; +import '../models/snippet_file.dart'; +import 'snippet_file_editing_controller.dart'; + +/// The main state object for a single [sdk]. +class SnippetEditingController extends ChangeNotifier { + final Sdk sdk; + + ExampleLoadingDescriptor? _descriptor; + Example? _example; + String _pipelineOptions = ''; + + bool _isChanged = false; + LoadingStatus _exampleLoadingStatus = LoadingStatus.done; + + SnippetFileEditingController? _activeFileController; + final _fileControllers = []; + final _fileControllersByName = {}; + + Map _defaultEventParams = const {}; + + void setDefaultEventParams(Map eventParams) { + _defaultEventParams = eventParams; + for (final fileController in _fileControllers) { + fileController.defaultEventParams = eventParams; + } + } + + SnippetEditingController({ + required this.sdk, + }); + + /// Attempts to acquire a lock for asynchronous example loading. + /// + /// This prevents race condition for quick example switching + /// and allows to show a loading indicator. + /// + /// Returns whether the lock was acquired. + bool lockExampleLoading() { + switch (_exampleLoadingStatus) { + case LoadingStatus.loading: + return false; + case LoadingStatus.done: + case LoadingStatus.error: + _exampleLoadingStatus = LoadingStatus.loading; + return true; + } + } + + void releaseExampleLoading() { + _exampleLoadingStatus = LoadingStatus.done; + } + + bool get isLoading => _exampleLoadingStatus == LoadingStatus.loading; + + void setExample( + Example example, { + ExampleLoadingDescriptor? descriptor, + }) { + _descriptor = descriptor; + _example = example; + _pipelineOptions = example.pipelineOptions; + _isChanged = false; + releaseExampleLoading(); + + _deleteFileControllers(); + _createFileControllers(example.files, example.viewOptions); + + notifyListeners(); + } + + Example? get example => _example; + + ExampleLoadingDescriptor? get descriptor => _descriptor; + + set pipelineOptions(String value) { + if (value == _pipelineOptions) { + return; + } + _pipelineOptions = value; + + if (!_isChanged) { + if (_arePipelineOptionsChanged()) { + _isChanged = true; + notifyListeners(); + } + } else { + _updateIsChanged(); + if (!_isChanged) { + notifyListeners(); + } + } + } + + String get pipelineOptions => _pipelineOptions; + + bool get isChanged => _isChanged; + + void _updateIsChanged() { + _isChanged = _calculateIsChanged(); + } + + bool _calculateIsChanged() { + return _isAnyFileControllerChanged() || _arePipelineOptionsChanged(); + } + + bool _isAnyFileControllerChanged() { + return _fileControllers.any((c) => c.isChanged); + } + + bool _arePipelineOptionsChanged() { + return _pipelineOptions != (_example?.pipelineOptions ?? ''); + } + + void reset() { + for (final controller in _fileControllers) { + controller.reset(); + } + + _pipelineOptions = _example?.pipelineOptions ?? ''; + } + + /// Creates an [ExampleLoadingDescriptor] that can recover the + /// current content. + ExampleLoadingDescriptor getLoadingDescriptor() { + final example = this.example; + if (example == null) { + return EmptyExampleLoadingDescriptor(sdk: sdk); + } + + if (!isChanged && _descriptor != null) { + return _descriptor!; + } + + return ContentExampleLoadingDescriptor( + complexity: example.complexity, + files: getFiles(), + name: example.name, + pipelineOptions: _pipelineOptions, + sdk: sdk, + ); + } + + void _deleteFileControllers() { + for (final controller in _fileControllers) { + controller.removeListener(_onFileControllerChanged); + controller.dispose(); + } + + _fileControllers.clear(); + _fileControllersByName.clear(); + } + + void _createFileControllers( + Iterable files, + ExampleViewOptions viewOptions, + ) { + for (final file in files) { + final controller = SnippetFileEditingController( + contextLine1Based: file.isMain ? _example?.contextLine : null, + savedFile: file, + sdk: sdk, + viewOptions: viewOptions, + ); + + _fileControllers.add(controller); + controller.addListener(_onFileControllerChanged); + } + + for (final controller in _fileControllers) { + _fileControllersByName[controller.savedFile.name] = controller; + } + + _activeFileController = + _fileControllers.firstWhereOrNull((c) => c.savedFile.isMain); + + setDefaultEventParams(_defaultEventParams); + } + + void _onFileControllerChanged() { + if (!_isChanged) { + if (_isAnyFileControllerChanged()) { + _isChanged = true; + notifyListeners(); + } + } else { + _updateIsChanged(); + if (!_isChanged) { + notifyListeners(); + } + } + } + + List get fileControllers => + UnmodifiableListView(_fileControllers); + + SnippetFileEditingController? get activeFileController => + _activeFileController; + + SnippetFileEditingController requireFileControllerByName(String name) { + final result = getFileControllerByName(name); + + if (result != null) { + return result; + } + + throw Exception( + 'Required SnippetFileEditingController for $name, ' + 'only have ${_fileControllers.map((c) => c.getFile().name)}, ' + '${example?.path} ${example?.name}', + ); + } + + SnippetFileEditingController? getFileControllerByName(String name) { + return _fileControllersByName[name]; + } + + void activateFileControllerByName(String name) { + final newController = getFileControllerByName(name); + + if (newController != _activeFileController) { + _activeFileController = newController; + notifyListeners(); + } + } + + List getFiles() { + return _fileControllers.map((c) => c.getFile()).toList(growable: false); + } + + EventSnippetContext get eventSnippetContext { + final descriptor = getLoadingDescriptor(); + + return EventSnippetContext( + originalSnippet: _descriptor?.token, + sdk: sdk, + snippet: descriptor.token, + ); + } + + bool shouldSaveBeforeSharing() { + if (!(descriptor?.isSerializableToUrl ?? false)) { + return true; + } + + if (isChanged) { + return true; + } + + return false; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/snippet_file_editing_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/snippet_file_editing_controller.dart new file mode 100644 index 000000000000..cc25efec72cd --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/snippet_file_editing_controller.dart @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; +import 'package:get_it/get_it.dart'; + +import '../constants/constants.dart'; +import '../models/example_view_options.dart'; +import '../models/sdk.dart'; +import '../models/snippet_file.dart'; +import '../services/symbols/symbols_notifier.dart'; + +/// The main state object for a file in a snippet. +class SnippetFileEditingController extends ChangeNotifier { + final CodeController codeController; + final SnippetFile savedFile; + final Sdk sdk; + + bool _isChanged = false; + + final _symbolsNotifier = GetIt.instance.get(); + + Map defaultEventParams = const {}; + + SnippetFileEditingController({ + required this.savedFile, + required this.sdk, + required ExampleViewOptions viewOptions, + int? contextLine1Based, + }) : codeController = CodeController( + // ignore: avoid_redundant_argument_values + params: const EditorParams(tabSpaces: spaceCount), + language: sdk.highlightMode, + namedSectionParser: const BracketsStartEndNamedSectionParser(), + text: savedFile.content, + ) { + _applyViewOptions(viewOptions); + + // TODO(alexeyinkin): Scroll to a comment instead of index, + // then remove the parameter, https://github.com/apache/beam/issues/23774 + if (contextLine1Based != null) { + _toStartOfFullLine(max(contextLine1Based - 1, 0)); + } + + codeController.addListener(_onCodeControllerChanged); + _symbolsNotifier.addListener(_onSymbolsNotifierChanged); + _onSymbolsNotifierChanged(); + } + + void _applyViewOptions(ExampleViewOptions options) { + codeController.readOnlySectionNames = options.readOnlySectionNames.toSet(); + codeController.visibleSectionNames = options.showSectionNames.toSet(); + + if (options.foldCommentAtLineZero) { + codeController.foldCommentAtLineZero(); + } + + if (options.foldImports) { + codeController.foldImports(); + } + + final unfolded = options.unfoldSectionNames; + if (unfolded.isNotEmpty) { + codeController.foldOutsideSections(unfolded); + } + } + + void _toStartOfFullLine(int line) { + if (line >= codeController.code.lines.length) { + return; + } + + final fullPosition = codeController.code.lines.lines[line].textRange.start; + final visiblePosition = codeController.code.hiddenRanges.cutPosition( + fullPosition, + ); + + codeController.selection = TextSelection.collapsed( + offset: visiblePosition, + ); + } + + void _onCodeControllerChanged() { + if (!_isChanged) { + if (_isCodeChanged()) { + _isChanged = true; + notifyListeners(); + } + } else { + _updateIsChanged(); + if (!_isChanged) { + notifyListeners(); + } + } + } + + bool get isChanged => _isChanged; + + bool _isCodeChanged() { + return savedFile.content.tabsToSpaces(spaceCount) != + codeController.fullText; + } + + void _updateIsChanged() { + _isChanged = _isCodeChanged(); + } + + void reset() { + codeController.fullText = savedFile.content; + } + + void _onSymbolsNotifierChanged() { + final mode = sdk.highlightMode; + if (mode == null) { + return; + } + + final dictionary = _symbolsNotifier.getDictionary(mode); + if (dictionary == null) { + return; + } + + codeController.autocompleter.setCustomWords(dictionary.symbols); + } + + SnippetFile getFile() => SnippetFile( + content: codeController.fullText, + isMain: savedFile.isMain, + name: savedFile.name, + ); + + @override + void dispose() { + _symbolsNotifier.removeListener( + _onSymbolsNotifierChanged, + ); + super.dispose(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/unread_controller.dart b/playground/frontend/build/playground_components/lib/src/controllers/unread_controller.dart new file mode 100644 index 000000000000..1b6457247dab --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/unread_controller.dart @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/foundation.dart'; + +/// Tracks the unread status of arbitrary data. +class UnreadController extends ChangeNotifier { + final _values = {}; + final _unreadKeys = {}; + + /// Marks [key] as unread if [value] differs from the last call. + void setValue(K key, dynamic value) { + if (_values.containsKey(key) && _values[key] == value) { + return; + } + + _values[key] = value; + _unreadKeys.add(key); + notifyListeners(); + } + + bool isUnread(K key) { + return _unreadKeys.contains(key); + } + + void markRead(K key) { + if (!_unreadKeys.contains(key)) { + return; + } + + _unreadKeys.remove(key); + notifyListeners(); + } + + void markAllRead() { + if (_unreadKeys.isEmpty) { + return; + } + + _unreadKeys.clear(); + notifyListeners(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier.dart b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier.dart new file mode 100644 index 000000000000..71236377c942 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier.dart @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export 'window_close_notifier_non_web.dart' + if (dart.libraries.html) 'window_close_notifier_web.dart'; diff --git a/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_non_web.dart b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_non_web.dart new file mode 100644 index 000000000000..78b4df41da6a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_non_web.dart @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/foundation.dart'; + +/// The required placeholder for non-web builds, e.g. unit tests. +class WindowCloseNotifier extends ChangeNotifier {} diff --git a/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_web.dart b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_web.dart new file mode 100644 index 000000000000..673c988bad16 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/controllers/window_close_notifier/window_close_notifier_web.dart @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:html'; // ignore: avoid_web_libraries_in_flutter + +import 'package:flutter/foundation.dart'; + +/// Notifies when the browser window is being closed. +/// +/// Use this to cancel a possible run to save backend resources. +class WindowCloseNotifier extends ChangeNotifier { + WindowCloseNotifier() { + window.onBeforeUnload.listen((_) { + notifyListeners(); + }); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/complexity.dart b/playground/frontend/build/playground_components/lib/src/enums/complexity.dart new file mode 100644 index 000000000000..59da4941087c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/complexity.dart @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:json_annotation/json_annotation.dart'; + +enum Complexity { + @JsonValue('BASIC') + basic, + @JsonValue('MEDIUM') + medium, + @JsonValue('ADVANCED') + advanced, + ; + + static Complexity? fromString(String? complexity) { + switch (complexity) { + case 'basic': + return Complexity.basic; + case 'medium': + return Complexity.medium; + case 'advanced': + return Complexity.advanced; + } + + return null; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/emulator_type.dart b/playground/frontend/build/playground_components/lib/src/enums/emulator_type.dart new file mode 100644 index 000000000000..74b9916316af --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/emulator_type.dart @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +enum EmulatorType { + kafka, +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/feedback_rating.dart b/playground/frontend/build/playground_components/lib/src/enums/feedback_rating.dart new file mode 100644 index 000000000000..a056886d72ee --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/feedback_rating.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Sent as an analytics feedback events. +enum FeedbackRating { + positive, + negative, +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/output_tab.dart b/playground/frontend/build/playground_components/lib/src/enums/output_tab.dart new file mode 100644 index 000000000000..0d3b70b072f4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/output_tab.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:enum_map/enum_map.dart'; + +part 'output_tab.g.dart'; + +@unmodifiableEnumMap +enum OutputTabEnum { + result, + graph, +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/output_tab.g.dart b/playground/frontend/build/playground_components/lib/src/enums/output_tab.g.dart new file mode 100644 index 000000000000..e7d801fb8415 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/output_tab.g.dart @@ -0,0 +1,164 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'output_tab.dart'; + +// ************************************************************************** +// UnmodifiableEnumMapGenerator +// ************************************************************************** + +class UnmodifiableOutputTabEnumMap + extends UnmodifiableEnumMap { + final V result; + final V graph; + + const UnmodifiableOutputTabEnumMap({ + required this.result, + required this.graph, + }); + + @override + Map cast() { + return Map.castFrom(this); + } + + @override + bool containsValue(Object? value) { + if (this.result == value) return true; + if (this.graph == value) return true; + return false; + } + + @override + bool containsKey(Object? key) { + return key.runtimeType == OutputTabEnum; + } + + @override + V? operator [](Object? key) { + switch (key) { + case OutputTabEnum.result: + return this.result; + case OutputTabEnum.graph: + return this.graph; + } + + return null; + } + + @override + void operator []=(OutputTabEnum key, V value) { + throw Exception("Cannot modify this map."); + } + + @override + Iterable> get entries { + return [ + MapEntry(OutputTabEnum.result, this.result), + MapEntry(OutputTabEnum.graph, this.graph), + ]; + } + + @override + Map map( + MapEntry transform(OutputTabEnum key, V value)) { + final result = transform(OutputTabEnum.result, this.result); + final graph = transform(OutputTabEnum.graph, this.graph); + return { + result.key: result.value, + graph.key: graph.value, + }; + } + + @override + void addEntries(Iterable> newEntries) { + throw Exception("Cannot modify this map."); + } + + @override + V update(OutputTabEnum key, V update(V value), {V Function()? ifAbsent}) { + throw Exception("Cannot modify this map."); + } + + @override + void updateAll(V update(OutputTabEnum key, V value)) { + throw Exception("Cannot modify this map."); + } + + @override + void removeWhere(bool test(OutputTabEnum key, V value)) { + throw Exception("Objects in this map cannot be removed."); + } + + @override + V putIfAbsent(OutputTabEnum key, V ifAbsent()) { + return this.get(key); + } + + @override + void addAll(Map other) { + throw Exception("Cannot modify this map."); + } + + @override + V? remove(Object? key) { + throw Exception("Objects in this map cannot be removed."); + } + + @override + void clear() { + throw Exception("Objects in this map cannot be removed."); + } + + @override + void forEach(void action(OutputTabEnum key, V value)) { + action(OutputTabEnum.result, this.result); + action(OutputTabEnum.graph, this.graph); + } + + @override + Iterable get keys { + return OutputTabEnum.values; + } + + @override + Iterable get values { + return [ + this.result, + this.graph, + ]; + } + + @override + int get length { + return 2; + } + + @override + bool get isEmpty { + return false; + } + + @override + bool get isNotEmpty { + return true; + } + + V get(OutputTabEnum key) { + switch (key) { + case OutputTabEnum.result: + return this.result; + case OutputTabEnum.graph: + return this.graph; + } + } + + @override + String toString() { + final buffer = StringBuffer("{"); + buffer.write("OutputTabEnum.result: ${this.result}"); + buffer.write(", "); + buffer.write("OutputTabEnum.graph: ${this.graph}"); + buffer.write("}"); + return buffer.toString(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/result_filter.dart b/playground/frontend/build/playground_components/lib/src/enums/result_filter.dart new file mode 100644 index 000000000000..5dd2a526c33f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/result_filter.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +enum ResultFilterEnum { + all, + log, + output, +} diff --git a/playground/frontend/build/playground_components/lib/src/enums/unread_entry.dart b/playground/frontend/build/playground_components/lib/src/enums/unread_entry.dart new file mode 100644 index 000000000000..f4bbc9943603 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/enums/unread_entry.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Keys to track the unread status for. +enum UnreadEntryEnum { + result, + graph, +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/catalog_loading_exception.dart b/playground/frontend/build/playground_components/lib/src/exceptions/catalog_loading_exception.dart new file mode 100644 index 000000000000..6001073f2cfc --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/catalog_loading_exception.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; + +/// Thrown when the list of catalog examples failed to be loaded. +class CatalogLoadingException implements Exception { + final Exception ex; + + CatalogLoadingException(this.ex); + + @override + String toString() => 'errors.loadingCatalog'.tr(); +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/detailed_exception.dart b/playground/frontend/build/playground_components/lib/src/exceptions/detailed_exception.dart new file mode 100644 index 000000000000..d535b7a8faf5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/detailed_exception.dart @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// An [Exception] with more [details] than should be shown in an error popup. +abstract class DetailedException implements Exception { + String get details; +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/example_loading_exception.dart b/playground/frontend/build/playground_components/lib/src/exceptions/example_loading_exception.dart new file mode 100644 index 000000000000..94f47e24480b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/example_loading_exception.dart @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; + +class ExampleLoadingException implements Exception { + final String? token; + + ExampleLoadingException({required this.token}); + + @override + String toString() => 'errors.failedLoadExampleWithToken'.tr( + namedArgs: { + 'token': token ?? 'null', + }, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/examples_loading_exception.dart b/playground/frontend/build/playground_components/lib/src/exceptions/examples_loading_exception.dart new file mode 100644 index 000000000000..f1576e54f638 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/examples_loading_exception.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; + +/// Thrown when a single example failed to be loaded. +class ExamplesLoadingException implements Exception { + final Exception inner; + + ExamplesLoadingException(this.inner); + + @override + String toString() => '${'errors.loadingExample'.tr()} $inner'; +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/multiple_exceptions.dart b/playground/frontend/build/playground_components/lib/src/exceptions/multiple_exceptions.dart new file mode 100644 index 000000000000..3fd83f8c9fab --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/multiple_exceptions.dart @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'detailed_exception.dart'; + +class MultipleExceptions implements DetailedException { + final String message; + final List exceptions; + final List stackTraces; + + MultipleExceptions(this.message, { + required this.exceptions, + required this.stackTraces, + }); + + @override + String toString() => message; + + @override + String get details { + final buffer = StringBuffer('Exceptions (${exceptions.length}): '); + for (var i = 0; i < exceptions.length; i++) { + buffer + ..write('Exception #') + ..write(i + 1) + ..writeln(':') + ..writeln(exceptions[i]) + ..writeln('StackTrace:') + ..writeln(stackTraces[i]); + } + return buffer.toString(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/exceptions/snippet_saving_exception.dart b/playground/frontend/build/playground_components/lib/src/exceptions/snippet_saving_exception.dart new file mode 100644 index 000000000000..49ef601f1d9f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/exceptions/snippet_saving_exception.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; + +/// Called when user code failed to be saved. +class SnippetSavingException implements Exception { + final Exception ex; + + SnippetSavingException(this.ex); + + @override + String toString() => 'errors.savingSnippet'.tr(); +} diff --git a/playground/frontend/build/playground_components/lib/src/locator.dart b/playground/frontend/build/playground_components/lib/src/locator.dart new file mode 100644 index 000000000000..f741383f31ef --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/locator.dart @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:get_it/get_it.dart'; + +import 'controllers/build_metadata.dart'; +import 'controllers/feedback_controller.dart'; +import 'services/symbols/symbols_notifier.dart'; +import 'services/toast_notifier.dart'; + +Future initializeServiceLocator() async { + GetIt.instance.registerSingleton(BuildMetadataController()); + GetIt.instance.registerSingleton(FeedbackController()); + GetIt.instance.registerSingleton(SymbolsNotifier()); + GetIt.instance.registerSingleton(ToastNotifier()); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/category_with_examples.dart b/playground/frontend/build/playground_components/lib/src/models/category_with_examples.dart new file mode 100644 index 000000000000..7378894d6796 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/category_with_examples.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'example_base.dart'; + +const _pinnedTitle = 'quick start'; + +class CategoryWithExamples implements Comparable { + // TODO(alexeyinkin): Sort on the backend instead, then make const constructor, https://github.com/apache/beam/issues/23083 + final bool isPinned; + final String title; + final List examples; + + CategoryWithExamples({ + required this.title, + required this.examples, + }) : isPinned = title.toLowerCase() == _pinnedTitle; + + @override + int compareTo(CategoryWithExamples other) { + if (isPinned && !other.isPinned) { + return -1; + } + + if (!isPinned && other.isPinned) { + return 1; + } + + return title.toLowerCase().compareTo(other.title.toLowerCase()); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/models/component_version.dart b/playground/frontend/build/playground_components/lib/src/models/component_version.dart new file mode 100644 index 000000000000..0bff56950956 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/component_version.dart @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_redundant_argument_values + +import '../build_metadata.g.dart' as frontend_build_metadata; + +class ComponentVersion { + const ComponentVersion({ + this.beamSdkVersion, + this.buildCommitHash, + this.dateTime, + }); + + final String? beamSdkVersion; + final String? buildCommitHash; + final DateTime? dateTime; + + /// The version of the frontend. + static final frontend = ComponentVersion( + buildCommitHash: frontend_build_metadata.buildCommitHash, + dateTime: frontend_build_metadata.buildCommitSecondsSinceEpoch == null + ? null + : DateTime.fromMillisecondsSinceEpoch( + // ignore: avoid_dynamic_calls + frontend_build_metadata.buildCommitSecondsSinceEpoch * 1000, + ), + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/dataset.dart b/playground/frontend/build/playground_components/lib/src/models/dataset.dart new file mode 100644 index 000000000000..b51ba85ed1c6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/dataset.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:json_annotation/json_annotation.dart'; + +import '../enums/emulator_type.dart'; + +part 'dataset.g.dart'; + +@JsonSerializable() +class Dataset { + final EmulatorType? type; + final Map options; + final String datasetPath; + + Dataset({ + required this.type, + required this.options, + required this.datasetPath, + }); + + factory Dataset.fromJson(Map json) => + _$DatasetFromJson(json); + + Map toJson() => _$DatasetToJson(this); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/dataset.g.dart b/playground/frontend/build/playground_components/lib/src/models/dataset.g.dart new file mode 100644 index 000000000000..85256b1d5d83 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/dataset.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'dataset.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Dataset _$DatasetFromJson(Map json) => Dataset( + type: $enumDecodeNullable(_$EmulatorTypeEnumMap, json['type']), + options: Map.from(json['options'] as Map), + datasetPath: json['datasetPath'] as String, + ); + +Map _$DatasetToJson(Dataset instance) => { + 'type': _$EmulatorTypeEnumMap[instance.type], + 'options': instance.options, + 'datasetPath': instance.datasetPath, + }; + +const _$EmulatorTypeEnumMap = { + EmulatorType.kafka: 'kafka', +}; diff --git a/playground/frontend/build/playground_components/lib/src/models/event_snippet_context.dart b/playground/frontend/build/playground_components/lib/src/models/event_snippet_context.dart new file mode 100644 index 000000000000..989790fcb0b2 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/event_snippet_context.dart @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import 'sdk.dart'; + +const _none = 'none'; + +/// Basic information of the Playground state at a particular moment of time +/// to augment analytics events. +class EventSnippetContext with EquatableMixin { + const EventSnippetContext({ + required this.originalSnippet, + required this.sdk, + required this.snippet, + }); + + /// Any identifier of the snippet that the content was derived from. + /// + /// If the code was modified it is still the last snippet loaded or chosen + /// by the user. + final String? originalSnippet; + + final Sdk? sdk; + + /// Any identifier of the current snippet if it is unchanged. + final String? snippet; + + /// An empty [EventSnippetContext] for events before anything loaded. + static const empty = EventSnippetContext( + originalSnippet: null, + sdk: null, + snippet: null, + ); + + @override + List get props => [ + originalSnippet, + sdk?.id, + snippet, + ]; + + Map toJson() => { + 'originalSnippet': originalSnippet ?? _none, + 'sdk': sdk?.id ?? _none, + 'snippet': snippet ?? _none, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example.dart b/playground/frontend/build/playground_components/lib/src/models/example.dart new file mode 100644 index 000000000000..044cc4e2e0c0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example.dart @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:json_annotation/json_annotation.dart'; + +import '../enums/complexity.dart'; +import 'dataset.dart'; +import 'example_base.dart'; +import 'example_view_options.dart'; +import 'sdk.dart'; +import 'snippet_file.dart'; + +part 'example.g.dart'; + +/// A [ExampleBase] that also has all large fields fetched. +@JsonSerializable() +class Example extends ExampleBase { + final List files; + final String? graph; + final String? logs; + final String? outputs; + + const Example({ + required this.files, + required super.name, + required super.sdk, + required super.type, + required super.path, + super.alwaysRun, + super.complexity, + super.contextLine, + super.datasets, + super.description, + this.graph, + super.isMultiFile, + this.logs, + this.outputs, + super.pipelineOptions, + super.tags, + super.urlNotebook, + super.urlVcs, + super.viewOptions, + }); + + factory Example.fromJson(Map json) => + _$ExampleFromJson(json); + + @override + Map toJson() => _$ExampleToJson(this); + + Example.fromBase( + ExampleBase example, { + required this.files, + required this.logs, + required this.outputs, + this.graph, + }) : super( + alwaysRun: example.alwaysRun, + complexity: example.complexity, + contextLine: example.contextLine, + datasets: example.datasets, + description: example.description, + isMultiFile: example.isMultiFile, + name: example.name, + path: example.path, + pipelineOptions: example.pipelineOptions, + sdk: example.sdk, + tags: example.tags, + type: example.type, + urlNotebook: example.urlNotebook, + urlVcs: example.urlVcs, + viewOptions: example.viewOptions, + ); + + Example.empty(Sdk sdk) + : this( + name: 'Untitled Example', + files: [SnippetFile.empty], + path: '', + sdk: sdk, + type: ExampleType.example, + ); + + Example copyWith({ + ExampleViewOptions? viewOptions, + }) { + return Example( + alwaysRun: alwaysRun, + complexity: complexity, + contextLine: contextLine, + datasets: datasets, + description: description, + files: files, + graph: graph, + isMultiFile: isMultiFile, + logs: logs, + name: name, + outputs: outputs, + path: path, + pipelineOptions: pipelineOptions, + sdk: sdk, + tags: tags, + type: type, + urlNotebook: urlNotebook, + urlVcs: urlVcs, + viewOptions: viewOptions ?? this.viewOptions, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example.g.dart b/playground/frontend/build/playground_components/lib/src/models/example.g.dart new file mode 100644 index 000000000000..f46c32c1d0d4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example.g.dart @@ -0,0 +1,72 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'example.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Example _$ExampleFromJson(Map json) => Example( + files: (json['files'] as List) + .map((e) => SnippetFile.fromJson(e as Map)) + .toList(), + name: json['name'] as String, + sdk: Sdk.fromJson(json['sdk'] as Map), + type: $enumDecode(_$ExampleTypeEnumMap, json['type']), + path: json['path'] as String, + complexity: $enumDecodeNullable(_$ComplexityEnumMap, json['complexity']), + contextLine: json['contextLine'] as int? ?? 1, + datasets: (json['datasets'] as List?) + ?.map((e) => Dataset.fromJson(e as Map)) + .toList() ?? + const [], + description: json['description'] as String? ?? '', + graph: json['graph'] as String?, + isMultiFile: json['isMultiFile'] as bool? ?? false, + logs: json['logs'] as String?, + outputs: json['outputs'] as String?, + pipelineOptions: json['pipelineOptions'] as String? ?? '', + tags: + (json['tags'] as List?)?.map((e) => e as String).toList() ?? + const [], + urlNotebook: json['urlNotebook'] as String?, + urlVcs: json['urlVcs'] as String?, + viewOptions: json['viewOptions'] == null + ? ExampleViewOptions.empty + : ExampleViewOptions.fromJson( + json['viewOptions'] as Map), + ); + +Map _$ExampleToJson(Example instance) => { + 'complexity': _$ComplexityEnumMap[instance.complexity], + 'contextLine': instance.contextLine, + 'datasets': instance.datasets, + 'description': instance.description, + 'isMultiFile': instance.isMultiFile, + 'name': instance.name, + 'path': instance.path, + 'pipelineOptions': instance.pipelineOptions, + 'sdk': instance.sdk, + 'tags': instance.tags, + 'type': _$ExampleTypeEnumMap[instance.type]!, + 'urlNotebook': instance.urlNotebook, + 'urlVcs': instance.urlVcs, + 'viewOptions': instance.viewOptions, + 'files': instance.files, + 'graph': instance.graph, + 'logs': instance.logs, + 'outputs': instance.outputs, + }; + +const _$ExampleTypeEnumMap = { + ExampleType.all: 'all', + ExampleType.example: 'example', + ExampleType.kata: 'kata', + ExampleType.test: 'test', +}; + +const _$ComplexityEnumMap = { + Complexity.basic: 'BASIC', + Complexity.medium: 'MEDIUM', + Complexity.advanced: 'ADVANCED', +}; diff --git a/playground/frontend/build/playground_components/lib/src/models/example_base.dart b/playground/frontend/build/playground_components/lib/src/models/example_base.dart new file mode 100644 index 000000000000..4dbd88eca61e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_base.dart @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import '../enums/complexity.dart'; +import '../repositories/example_repository.dart'; +import 'dataset.dart'; +import 'example_view_options.dart'; +import 'sdk.dart'; + +part 'example_base.g.dart'; + +enum ExampleType { + all, + example, + kata, + test, +} + +extension ExampleTypeToString on ExampleType { + String get name { + switch (this) { + case ExampleType.example: + return 'Examples'; + case ExampleType.kata: + return 'Katas'; + case ExampleType.test: + return 'Unit tests'; + case ExampleType.all: + return 'All'; + } + } +} + +/// An example's basic info that does not contain source code +/// and other large fields. +/// These objects are fetched as lists from [ExampleRepository]. +@JsonSerializable() +class ExampleBase with EquatableMixin implements Comparable { + final bool alwaysRun; + final Complexity? complexity; + + /// Index of the line to focus, 1-based. + final int contextLine; + final List datasets; + final String description; + final bool isMultiFile; + final String name; + final String path; + final String pipelineOptions; + final Sdk sdk; + final List tags; + final ExampleType type; + final String? urlNotebook; + final String? urlVcs; + final ExampleViewOptions viewOptions; + + const ExampleBase({ + required this.name, + required this.path, + required this.sdk, + required this.type, + this.alwaysRun = false, + this.complexity, + this.contextLine = 1, + this.datasets = const [], + this.description = '', + this.isMultiFile = false, + this.pipelineOptions = '', + this.tags = const [], + this.urlNotebook, + this.urlVcs, + this.viewOptions = ExampleViewOptions.empty, + }); + + factory ExampleBase.fromJson(Map json) => + _$ExampleBaseFromJson(json); + + Map toJson() => _$ExampleBaseToJson(this); + + // TODO(alexeyinkin): Use all fields, https://github.com/apache/beam/issues/23979 + @override + List get props => [path]; + + @override + int compareTo(ExampleBase other) { + return name.toLowerCase().compareTo(other.name.toLowerCase()); + } + + bool get usesEmulatedData => datasets.any( + (dataset) => dataset.type != null, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_base.g.dart b/playground/frontend/build/playground_components/lib/src/models/example_base.g.dart new file mode 100644 index 000000000000..33afc2dcde2e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_base.g.dart @@ -0,0 +1,65 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'example_base.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ExampleBase _$ExampleBaseFromJson(Map json) => ExampleBase( + name: json['name'] as String, + path: json['path'] as String, + sdk: Sdk.fromJson(json['sdk'] as Map), + type: $enumDecode(_$ExampleTypeEnumMap, json['type']), + alwaysRun: json['alwaysRun'] as bool? ?? false, + complexity: $enumDecodeNullable(_$ComplexityEnumMap, json['complexity']), + contextLine: json['contextLine'] as int? ?? 1, + datasets: (json['datasets'] as List?) + ?.map((e) => Dataset.fromJson(e as Map)) + .toList() ?? + const [], + description: json['description'] as String? ?? '', + isMultiFile: json['isMultiFile'] as bool? ?? false, + pipelineOptions: json['pipelineOptions'] as String? ?? '', + tags: + (json['tags'] as List?)?.map((e) => e as String).toList() ?? + const [], + urlNotebook: json['urlNotebook'] as String?, + urlVcs: json['urlVcs'] as String?, + viewOptions: json['viewOptions'] == null + ? ExampleViewOptions.empty + : ExampleViewOptions.fromJson( + json['viewOptions'] as Map), + ); + +Map _$ExampleBaseToJson(ExampleBase instance) => + { + 'alwaysRun': instance.alwaysRun, + 'complexity': _$ComplexityEnumMap[instance.complexity], + 'contextLine': instance.contextLine, + 'datasets': instance.datasets, + 'description': instance.description, + 'isMultiFile': instance.isMultiFile, + 'name': instance.name, + 'path': instance.path, + 'pipelineOptions': instance.pipelineOptions, + 'sdk': instance.sdk, + 'tags': instance.tags, + 'type': _$ExampleTypeEnumMap[instance.type]!, + 'urlNotebook': instance.urlNotebook, + 'urlVcs': instance.urlVcs, + 'viewOptions': instance.viewOptions, + }; + +const _$ExampleTypeEnumMap = { + ExampleType.all: 'all', + ExampleType.example: 'example', + ExampleType.kata: 'kata', + ExampleType.test: 'test', +}; + +const _$ComplexityEnumMap = { + Complexity.basic: 'BASIC', + Complexity.medium: 'MEDIUM', + Complexity.advanced: 'ADVANCED', +}; diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor.dart new file mode 100644 index 000000000000..383373e9676d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor.dart @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../example_view_options.dart'; +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +const _key = 'default'; + +/// Describes a single loadable example that is default for its [sdk]. +class CatalogDefaultExampleLoadingDescriptor extends ExampleLoadingDescriptor { + @override + final Sdk sdk; + + const CatalogDefaultExampleLoadingDescriptor({ + required this.sdk, + super.viewOptions, + }); + + @override + List get props => [ + sdk.id, + viewOptions, + ]; + + @override + CatalogDefaultExampleLoadingDescriptor copyWithoutViewOptions() => + CatalogDefaultExampleLoadingDescriptor( + sdk: sdk, + ); + + @override + Map toJson() => { + 'sdk': sdk.id, + _key: true, + ...viewOptions.toShortMap(), + }; + + static CatalogDefaultExampleLoadingDescriptor? tryParse( + Map map, + ) { + if (map[_key] != true) { + return null; + } + + return CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.parseOrCreate(map['sdk']), + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/content_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/content_example_loading_descriptor.dart new file mode 100644 index 000000000000..3ffab8577b23 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/content_example_loading_descriptor.dart @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:convert'; + +import '../../enums/complexity.dart'; +import '../example_view_options.dart'; +import '../sdk.dart'; +import '../snippet_file.dart'; +import 'example_loading_descriptor.dart'; + +/// Fully contains an example data to be loaded. +class ContentExampleLoadingDescriptor extends ExampleLoadingDescriptor { + final Complexity? complexity; + + final List files; + + /// The name of the example, if any, to show in the dropdown. + final String? name; + + final String pipelineOptions; + + @override + final Sdk sdk; + + const ContentExampleLoadingDescriptor({ + required this.files, + required this.sdk, + this.complexity, + this.name, + this.pipelineOptions = '', + super.viewOptions, + }); + + static ContentExampleLoadingDescriptor? tryParse(Map map) { + final files = _getFilesFromMap(map); + if (files == null) { + return null; + } + + final sdk = Sdk.tryParse(map['sdk']); + if (sdk == null) { + return null; + } + + return ContentExampleLoadingDescriptor( + complexity: Complexity.fromString(map['complexity']), + files: files + .map((file) => SnippetFile.fromJson(file as Map)) + .toList(growable: false), + name: map['name']?.toString(), + pipelineOptions: map['pipelineOptions'] ?? '', + sdk: sdk, + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + static List? _getFilesFromMap(Map map) { + final files = map['files']; + + if (files is List) { + return files; + } + + if (files is String) { + final list = jsonDecode(files); + if (list is List) { + return list; + } + } + + return null; + } + + @override + List get props => [ + complexity, + files, + name, + pipelineOptions, + sdk.id, + viewOptions, + ]; + + @override + ContentExampleLoadingDescriptor copyWithoutViewOptions() => + ContentExampleLoadingDescriptor( + complexity: complexity, + files: files, + name: name, + pipelineOptions: pipelineOptions, + sdk: sdk, + ); + + @override + Map toJson() => { + 'complexity': complexity?.name, + 'files': files.map((e) => e.toJson()).toList(growable: false), + 'name': name, + 'pipelineOptions': pipelineOptions, + 'sdk': sdk.id, + ...viewOptions.toShortMap(), + }; + + @override + bool get isSerializableToUrl => false; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/empty_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/empty_example_loading_descriptor.dart new file mode 100644 index 000000000000..f92bd1762932 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/empty_example_loading_descriptor.dart @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +const _key = 'empty'; + +/// Indicates that an empty content should be loaded for the [sdk]. +class EmptyExampleLoadingDescriptor extends ExampleLoadingDescriptor { + @override + final Sdk sdk; + + const EmptyExampleLoadingDescriptor({ + required this.sdk, + }); + + @override + List get props => [sdk.id]; + + @override + EmptyExampleLoadingDescriptor copyWithoutViewOptions() => this; + + @override + Map toJson() => { + _key: true, + 'sdk': sdk.id, + }; + + static EmptyExampleLoadingDescriptor? tryParse( + Map map, + ) { + if (!map.containsKey(_key)) { + return null; + } + + return EmptyExampleLoadingDescriptor( + sdk: Sdk.parseOrCreate(map['sdk']), + ); + } + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/example_loading_descriptor.dart new file mode 100644 index 000000000000..eb48aee667a9 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/example_loading_descriptor.dart @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../example_view_options.dart'; +import '../sdk.dart'; + +/// Describes a single example to be loaded. +abstract class ExampleLoadingDescriptor with EquatableMixin { + const ExampleLoadingDescriptor({ + this.viewOptions = ExampleViewOptions.empty, + }); + + final ExampleViewOptions viewOptions; + + Sdk? get sdk => null; + + /// Anything to hint at the snippet: catalog path, user-shared ID, URL, etc. + /// + /// This can be used for analytics or other applications to distinguish + /// snippets in most cases but not as a strictly unique identifier. + String? get token => null; + + ExampleLoadingDescriptor copyWithoutViewOptions(); + + Map toJson(); + + /// Whether this descriptor can be serialized to a URL. + /// + /// If false, the code must be saved at the backend before sharing. + bool get isSerializableToUrl; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/examples_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/examples_loading_descriptor.dart new file mode 100644 index 000000000000..987cb693aef5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/examples_loading_descriptor.dart @@ -0,0 +1,227 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:convert'; + +import 'package:collection/collection.dart'; +import 'package:equatable/equatable.dart'; +import 'package:meta/meta.dart'; + +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +/// A factory that may parse a [map] into an [ExampleLoadingDescriptor]. +/// +/// [map] comes from query parameters or a serialized state of a page. +typedef SingleDescriptorFactory = ExampleLoadingDescriptor? Function( + Map map, +); + +const _descriptorsField = 'examples'; +const _initialSdkField = 'sdk'; +const _lazyLoadDescriptorsField = 'lazyLoad'; + +/// Holds information to load multiple examples. +@immutable +class ExamplesLoadingDescriptor with EquatableMixin { + /// The descriptors to be loaded right away. + final List descriptors; + + /// The descriptors to be loaded when an SDK is selected + /// that has nothing loaded yet. + final Map> lazyLoadDescriptors; + + /// If set, sets the SDK to this and does not change it when loading + /// new examples. Otherwise sets the SDK to that of each loaded example + /// of [descriptors]. + final Sdk? initialSdk; + + const ExamplesLoadingDescriptor({ + required this.descriptors, + this.lazyLoadDescriptors = const {}, + this.initialSdk, + }); + + /// A descriptor to load nothing. + static const empty = ExamplesLoadingDescriptor( + descriptors: [], + ); + + @override + String toString() { + final buffer = StringBuffer(); + buffer.write('Descriptors: '); + buffer.write(descriptors.map((e) => e.toString()).join('_')); + + for (final descriptor in lazyLoadDescriptors.entries) { + buffer.write(', Lazy Load ${descriptor.key.id}: '); + buffer.write(descriptor.value.map((e) => e.toString()).join('_')); + } + + return buffer.toString(); + } + + Map toJson() { + final lazyLoadNormalized = lazyLoadDescriptors.map( + (sdk, descriptors) => MapEntry( + sdk.id, + _descriptorsToJson(descriptors), + ), + ); + + return { + // + _descriptorsField: jsonEncode(_descriptorsToJson(descriptors)), + + if (initialSdk != null) _initialSdkField: initialSdk!.id, + + if (lazyLoadNormalized.isNotEmpty) + _lazyLoadDescriptorsField: jsonEncode(lazyLoadNormalized), + }; + } + + List _descriptorsToJson(List descriptors) { + return descriptors.map((d) => d.toJson()).toList(growable: false); + } + + /// Copies this and adds [addLazyLoadDescriptors] for those SDKs that + /// are missing in [lazyLoadDescriptors]. + ExamplesLoadingDescriptor copyWithMissingLazy( + Map> addLazyLoadDescriptors, + ) { + final newLazy = {...addLazyLoadDescriptors}..addAll(lazyLoadDescriptors); + + return ExamplesLoadingDescriptor( + descriptors: descriptors, + initialSdk: initialSdk, + lazyLoadDescriptors: newLazy, + ); + } + + ExamplesLoadingDescriptor copyWithoutViewOptions() { + return ExamplesLoadingDescriptor( + // + descriptors: descriptors + .map((d) => d.copyWithoutViewOptions()) + .toList(growable: false), + + initialSdk: initialSdk, + + lazyLoadDescriptors: lazyLoadDescriptors.map( + (sdk, descriptors) => MapEntry( + sdk, + descriptors + .map((d) => d.copyWithoutViewOptions()) + .toList(growable: false), + ), + ), + ); + } + + Sdk? get initialSnippetSdk { + if (descriptors.length == 1) { + return descriptors.first.sdk; + } + + for (final descriptor in descriptors) { + if (descriptor.sdk == initialSdk) { + return descriptor.sdk; + } + } + + return null; + } + + String? get initialSnippetToken { + if (descriptors.length == 1) { + return descriptors.first.token; + } + + for (final descriptor in descriptors) { + if (descriptor.sdk == initialSdk) { + return descriptor.token; + } + } + + return null; + } + + /// Tries to parse a [map] into an [ExamplesLoadingDescriptor]. + /// + /// [singleDescriptorFactory] is tried on nested collections of the [map]. + static ExamplesLoadingDescriptor? tryParse( + Map map, { + required SingleDescriptorFactory singleDescriptorFactory, + }) { + ExampleLoadingDescriptor? tryParseSingle(Object? map) { + if (map is! Map) { + return null; + } + return singleDescriptorFactory(map); + } + + List tryParseList(Object? list) { + if (list is String) { + list = jsonDecode(list); // ignore: parameter_assignments + } + + if (list is! List) { + return const []; + } + + return list.map(tryParseSingle).whereNotNull().toList(growable: false); + } + + Map> tryParseLazyLoad(Object? map) { + if (map is String) { + map = jsonDecode(map); // ignore: parameter_assignments + } + + if (map is! Map) { + return const {}; + } + + return map.map( + (sdkId, descriptors) => MapEntry( + Sdk.parseOrCreate(sdkId), + tryParseList(descriptors), + ), + ); + } + + final descriptors = tryParseList(map[_descriptorsField]); + if (descriptors.isEmpty) { + return null; + } + + final sdkId = map[_initialSdkField]; + + return ExamplesLoadingDescriptor( + descriptors: descriptors, + initialSdk: sdkId == null ? null : Sdk.parseOrCreate(sdkId), + lazyLoadDescriptors: tryParseLazyLoad(map[_lazyLoadDescriptorsField]), + ); + } + + @override + List get props => [ + descriptors, + initialSdk?.id, + lazyLoadDescriptors, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/hive_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/hive_example_loading_descriptor.dart new file mode 100644 index 000000000000..9b729a527d39 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/hive_example_loading_descriptor.dart @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../example_view_options.dart'; +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +/// Describes a loadable example saved in Hive. +class HiveExampleLoadingDescriptor extends ExampleLoadingDescriptor { + final String boxName; + final Sdk sdk; + final String snippetId; + + const HiveExampleLoadingDescriptor({ + required this.boxName, + required this.sdk, + required this.snippetId, + super.viewOptions, + }); + + @override + List get props => [ + boxName, + sdk.id, + snippetId, + viewOptions, + ]; + + @override + HiveExampleLoadingDescriptor copyWithoutViewOptions() => + HiveExampleLoadingDescriptor( + boxName: boxName, + sdk: sdk, + snippetId: snippetId, + ); + + @override + Map toJson() => { + 'boxName': boxName, + 'sdk': sdk.id, + 'shared': snippetId, + ...viewOptions.toShortMap(), + }; + + static HiveExampleLoadingDescriptor? tryParse( + Map map, + ) { + final boxName = map['boxName']; + final sdkId = map['sdk']; + final snippetId = map['shared']; + + if (sdkId == null || snippetId == null) { + return null; + } + + return HiveExampleLoadingDescriptor( + boxName: boxName, + sdk: Sdk.parseOrCreate(sdkId), + snippetId: snippetId, + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + @override + bool get isSerializableToUrl => false; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/http_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/http_example_loading_descriptor.dart new file mode 100644 index 000000000000..323a7475c71e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/http_example_loading_descriptor.dart @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../example_view_options.dart'; +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +/// Describes an example with the code to be fetched from [uri]. +class HttpExampleLoadingDescriptor extends ExampleLoadingDescriptor { + @override + final Sdk sdk; + + final Uri uri; + + @override + String get token => uri.toString(); + + const HttpExampleLoadingDescriptor({ + required this.sdk, + required this.uri, + super.viewOptions, + }); + + @override + List get props => [ + sdk.id, + uri, + viewOptions, + ]; + + @override + HttpExampleLoadingDescriptor copyWithoutViewOptions() => + HttpExampleLoadingDescriptor( + sdk: sdk, + uri: uri, + ); + + @override + Map toJson() => { + 'sdk': sdk.id, + 'url': uri.toString(), + ...viewOptions.toShortMap(), + }; + + static HttpExampleLoadingDescriptor? tryParse(Map map) { + final urlString = map['url']; + if (urlString == null) { + return null; + } + + final uri = Uri.tryParse(urlString); + if (uri == null) { + return null; + } + + final sdkId = map['sdk']; + if (sdkId == null) { + return null; + } + + return HttpExampleLoadingDescriptor( + sdk: Sdk.parseOrCreate(sdkId), + uri: uri, + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/standard_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/standard_example_loading_descriptor.dart new file mode 100644 index 000000000000..aaca54e3f41c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/standard_example_loading_descriptor.dart @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../example_view_options.dart'; +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +/// Describes an example to be loaded from the catalog. +class StandardExampleLoadingDescriptor extends ExampleLoadingDescriptor { + /// The identifier of the example in the catalog. + final String path; + + @override + final Sdk sdk; + + @override + String get token => path; + + const StandardExampleLoadingDescriptor({ + required this.path, + required this.sdk, + super.viewOptions, + }); + + @override + List get props => [ + path, + sdk.id, + viewOptions, + ]; + + @override + StandardExampleLoadingDescriptor copyWithoutViewOptions() => + StandardExampleLoadingDescriptor( + path: path, + sdk: sdk, + ); + + @override + Map toJson() => { + 'path': path, + 'sdk': sdk.id, + ...viewOptions.toShortMap(), + }; + + static StandardExampleLoadingDescriptor? tryParse(Map map) { + final path = map['path']; + final sdkId = map['sdk']; + + if (path == null || sdkId == null) { + return null; + } + + return StandardExampleLoadingDescriptor( + path: path, + sdk: Sdk.parseOrCreate(sdkId), + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/user_shared_example_loading_descriptor.dart b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/user_shared_example_loading_descriptor.dart new file mode 100644 index 000000000000..4f757e8ec874 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_loading_descriptors/user_shared_example_loading_descriptor.dart @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../example_view_options.dart'; +import '../sdk.dart'; +import 'example_loading_descriptor.dart'; + +/// Describes a loadable example previously saved by some user. +class UserSharedExampleLoadingDescriptor extends ExampleLoadingDescriptor { + @override + final Sdk sdk; + + final String snippetId; + + @override + String get token => snippetId; + + const UserSharedExampleLoadingDescriptor({ + required this.sdk, + required this.snippetId, + super.viewOptions, + }); + + @override + List get props => [ + sdk.id, + snippetId, + viewOptions, + ]; + + @override + UserSharedExampleLoadingDescriptor copyWithoutViewOptions() => + UserSharedExampleLoadingDescriptor( + sdk: sdk, + snippetId: snippetId, + ); + + @override + Map toJson() => { + 'sdk': sdk.id, + 'shared': snippetId, + ...viewOptions.toShortMap(), + }; + + static UserSharedExampleLoadingDescriptor? tryParse( + Map map, + ) { + final sdkId = map['sdk']; + final snippetId = map['shared']; + + if (sdkId == null || snippetId == null) { + return null; + } + + return UserSharedExampleLoadingDescriptor( + sdk: Sdk.parseOrCreate(sdkId), + snippetId: snippetId, + viewOptions: ExampleViewOptions.fromShortMap(map), + ); + } + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_view_options.dart b/playground/frontend/build/playground_components/lib/src/models/example_view_options.dart new file mode 100644 index 000000000000..54ced794fc20 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_view_options.dart @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import '../util/string.dart'; + +part 'example_view_options.g.dart'; + +@JsonSerializable() +class ExampleViewOptions with EquatableMixin { + final bool foldCommentAtLineZero; + final bool foldImports; + final List readOnlySectionNames; + final List showSectionNames; + final List unfoldSectionNames; + + const ExampleViewOptions({ + required this.readOnlySectionNames, + required this.showSectionNames, + required this.unfoldSectionNames, + this.foldCommentAtLineZero = true, + this.foldImports = true, + }); + + /// Parses a fully normalized map. + factory ExampleViewOptions.fromJson(Map json) => + _$ExampleViewOptionsFromJson(json); + + Map toJson() => _$ExampleViewOptionsToJson(this); + + /// Parses a simplified map that comes from a URL. + /// + /// This map has CSV strings instead of JSON arrays + /// and cannot override folding parameters' defaults. + factory ExampleViewOptions.fromShortMap(Map map) { + return ExampleViewOptions( + readOnlySectionNames: _split(map['readonly']), + showSectionNames: _split(map['show']), + unfoldSectionNames: _split(map['unfold']), + ); + } + + static List _split(Object? value) { + if (value is! String) { + return []; + } + + return value.splitNotEmpty(','); + } + + Map toShortMap() { + return { + if (readOnlySectionNames.isNotEmpty) + 'readonly': readOnlySectionNames.join(','), + if (showSectionNames.isNotEmpty) 'show': showSectionNames.join(','), + if (unfoldSectionNames.isNotEmpty) 'unfold': unfoldSectionNames.join(','), + }; + } + + static const empty = ExampleViewOptions( + readOnlySectionNames: [], + showSectionNames: [], + unfoldSectionNames: [], + ); + + @override + List get props => [ + foldCommentAtLineZero, + foldImports, + readOnlySectionNames, + showSectionNames, + unfoldSectionNames, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/example_view_options.g.dart b/playground/frontend/build/playground_components/lib/src/models/example_view_options.g.dart new file mode 100644 index 000000000000..e0b8d580862b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/example_view_options.g.dart @@ -0,0 +1,31 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'example_view_options.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ExampleViewOptions _$ExampleViewOptionsFromJson(Map json) => + ExampleViewOptions( + readOnlySectionNames: (json['readOnlySectionNames'] as List) + .map((e) => e as String) + .toList(), + showSectionNames: (json['showSectionNames'] as List) + .map((e) => e as String) + .toList(), + unfoldSectionNames: (json['unfoldSectionNames'] as List) + .map((e) => e as String) + .toList(), + foldCommentAtLineZero: json['foldCommentAtLineZero'] as bool? ?? true, + foldImports: json['foldImports'] as bool? ?? true, + ); + +Map _$ExampleViewOptionsToJson(ExampleViewOptions instance) => + { + 'foldCommentAtLineZero': instance.foldCommentAtLineZero, + 'foldImports': instance.foldImports, + 'readOnlySectionNames': instance.readOnlySectionNames, + 'showSectionNames': instance.showSectionNames, + 'unfoldSectionNames': instance.unfoldSectionNames, + }; diff --git a/playground/frontend/build/playground_components/lib/src/models/intents.dart b/playground/frontend/build/playground_components/lib/src/models/intents.dart new file mode 100644 index 000000000000..801d96bd9fd1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/intents.dart @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +class BeamIntent extends Intent { + final String slug; + + const BeamIntent({ + required this.slug, + }); +} + +class ResetIntent extends BeamIntent { + const ResetIntent() : super(slug: 'intents.playground.reset'); +} + +class RunIntent extends BeamIntent { + const RunIntent() : super(slug: 'intents.playground.run'); +} + +class ShowSuggestionsIntent extends BeamIntent { + const ShowSuggestionsIntent() + : super(slug: 'intents.playground.showSuggestions'); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/loading_status.dart b/playground/frontend/build/playground_components/lib/src/models/loading_status.dart new file mode 100644 index 000000000000..4cb742798d0a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/loading_status.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +enum LoadingStatus { + loading, + done, + error, +} diff --git a/playground/frontend/build/playground_components/lib/src/models/outputs.dart b/playground/frontend/build/playground_components/lib/src/models/outputs.dart new file mode 100644 index 000000000000..9260089c60bd --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/outputs.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class Outputs { + final String output; + final String graph; + final String log; + + const Outputs({ + required this.output, + required this.graph, + required this.log, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/run_shortcut.dart b/playground/frontend/build/playground_components/lib/src/models/run_shortcut.dart new file mode 100644 index 000000000000..be27545129de --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/run_shortcut.dart @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../util/logical_keyboard_key.dart'; +import 'intents.dart'; +import 'shortcut.dart'; + +abstract class BeamRunShortcut extends BeamShortcut { + final VoidCallback onInvoke; + + BeamRunShortcut({ + required this.onInvoke, + required LogicalKeyboardKey enterKey, + }) : super( + keys: [ + LogicalKeyboardKeyExtension.metaOrControl, + enterKey, + ], + actionIntent: const RunIntent(), + createAction: (BuildContext context) => CallbackAction( + onInvoke: (_) { + onInvoke(); + return; + }, + ), + ); +} + +class BeamMainRunShortcut extends BeamRunShortcut { + BeamMainRunShortcut({ + required super.onInvoke, + }) : super(enterKey: LogicalKeyboardKey.enter); +} + +class BeamNumpadRunShortcut extends BeamRunShortcut { + BeamNumpadRunShortcut({ + required super.onInvoke, + }) : super(enterKey: LogicalKeyboardKey.numpadEnter); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/sdk.dart b/playground/frontend/build/playground_components/lib/src/models/sdk.dart new file mode 100644 index 000000000000..fa821059e6db --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/sdk.dart @@ -0,0 +1,123 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:equatable/equatable.dart'; +import 'package:highlight/highlight_core.dart'; +import 'package:highlight/languages/go.dart' as mode_go; +import 'package:highlight/languages/java.dart' as mode_java; +import 'package:highlight/languages/python.dart' as mode_python; +import 'package:highlight/languages/scala.dart' as mode_scala; +import 'package:json_annotation/json_annotation.dart'; + +part 'sdk.g.dart'; + +@JsonSerializable() +class Sdk with EquatableMixin { + final String id; + final String title; + + const Sdk({ + required this.id, + required this.title, + }); + + factory Sdk.parseOrCreate(String id) { + return tryParse(id) ?? Sdk(id: id, title: id); + } + + static const java = Sdk(id: 'java', title: 'Java'); + static const go = Sdk(id: 'go', title: 'Go'); + static const python = Sdk(id: 'python', title: 'Python'); + static const scio = Sdk(id: 'scio', title: 'SCIO'); + + static const known = [ + java, + go, + python, + scio, + ]; + + @override + List get props => [ + id, + title, + ]; + + /// The default file extension of the programming language. + String get fileExtension { + switch (id) { + case 'go': + return '.go'; + case 'java': + return '.java'; + case 'python': + return '.py'; + case 'scio': + return '.scala'; + } + throw Exception('Unknown SDK: $id'); + } + + /// A temporary solution while we wait for the backend to add + /// sdk in example responses. + static Sdk? tryParseExamplePath(String? path) { + if (path == null) { + return null; + } + + if (path.startsWith('SDK_JAVA')) { + return java; + } + + if (path.startsWith('SDK_GO')) { + return go; + } + + if (path.startsWith('SDK_PYTHON')) { + return python; + } + + if (path.startsWith('SDK_SCIO')) { + return scio; + } + + return null; + } + + static Sdk? tryParse(Object? value) { + if (value is! String) { + return null; + } + + return known.firstWhereOrNull((e) => e.id == value); + } + + static final _idToHighlightMode = { + Sdk.java.id: mode_java.java, + Sdk.go.id: mode_go.go, + Sdk.python.id: mode_python.python, + Sdk.scio.id: mode_scala.scala, + }; + + Mode? get highlightMode => _idToHighlightMode[id]; + + factory Sdk.fromJson(Map json) => _$SdkFromJson(json); + + Map toJson() => _$SdkToJson(this); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/sdk.g.dart b/playground/frontend/build/playground_components/lib/src/models/sdk.g.dart new file mode 100644 index 000000000000..d43ed04f63a7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/sdk.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'sdk.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Sdk _$SdkFromJson(Map json) => Sdk( + id: json['id'] as String, + title: json['title'] as String, + ); + +Map _$SdkToJson(Sdk instance) => { + 'id': instance.id, + 'title': instance.title, + }; diff --git a/playground/frontend/build/playground_components/lib/src/models/shortcut.dart b/playground/frontend/build/playground_components/lib/src/models/shortcut.dart new file mode 100644 index 000000000000..1f3a3898b7e6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/shortcut.dart @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'intents.dart'; + +class BeamShortcut { + // Keys in the order to be shown or mocked. + // + // A list is required because a [LogicalKeySet] discards the original order. + final List keys; + + LogicalKeySet get keySet => LogicalKeySet.fromSet(keys.toSet()); + + final BeamIntent actionIntent; + final CallbackAction Function(BuildContext) createAction; + + BeamShortcut({ + required this.keys, + required this.actionIntent, + required this.createAction, + }); + + static const _metaKeyName = 'Command'; + static const _glue = ' + '; + + String get title { + return keys + .map(_getKeyDisplayName) + .join(_glue); + } + + String _getKeyDisplayName(LogicalKeyboardKey e) { + if (e.keyId == LogicalKeyboardKey.meta.keyId) { + return _metaKeyName; + } + return e.keyLabel; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/models/snippet_file.dart b/playground/frontend/build/playground_components/lib/src/models/snippet_file.dart new file mode 100644 index 000000000000..492eb7ba5c0e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/snippet_file.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'snippet_file.g.dart'; + +@JsonSerializable() +class SnippetFile with EquatableMixin { + final String content; + final bool isMain; + final String name; + + const SnippetFile({ + required this.content, + required this.isMain, + this.name = '', + }); + + static const empty = SnippetFile( + content: '', + isMain: true, + ); + + Map toJson() => _$SnippetFileToJson(this); + + factory SnippetFile.fromJson(Map map) => + _$SnippetFileFromJson(map); + + @override + List get props => [ + content, + isMain, + name, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/snippet_file.g.dart b/playground/frontend/build/playground_components/lib/src/models/snippet_file.g.dart new file mode 100644 index 000000000000..1d492e0ffb19 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/snippet_file.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'snippet_file.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SnippetFile _$SnippetFileFromJson(Map json) => SnippetFile( + content: json['content'] as String, + isMain: json['isMain'] as bool, + name: json['name'] as String? ?? '', + ); + +Map _$SnippetFileToJson(SnippetFile instance) => + { + 'content': instance.content, + 'isMain': instance.isMain, + 'name': instance.name, + }; diff --git a/playground/frontend/build/playground_components/lib/src/models/symbols_dictionary.dart b/playground/frontend/build/playground_components/lib/src/models/symbols_dictionary.dart new file mode 100644 index 000000000000..82374e1b02a7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/symbols_dictionary.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class SymbolsDictionary { + final List symbols; + + SymbolsDictionary({ + required this.symbols, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/models/toast.dart b/playground/frontend/build/playground_components/lib/src/models/toast.dart new file mode 100644 index 000000000000..8eb049b705dd --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/toast.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import 'toast_type.dart'; + +/// An entity for a popup notification. +/// +/// Named after 'fluttertoast' package. +class Toast with EquatableMixin { + final String description; + final String title; + final ToastType type; + + const Toast({ + required this.description, + required this.title, + required this.type, + }); + + @override + List get props => [ + description, + title, + type, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/models/toast_type.dart b/playground/frontend/build/playground_components/lib/src/models/toast_type.dart new file mode 100644 index 000000000000..375dfb982923 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/toast_type.dart @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:enum_map/enum_map.dart'; + +import 'toast.dart'; + +part 'toast_type.g.dart'; + +/// The type for [Toast] objects. +@unmodifiableEnumMap +enum ToastType { + error, + info, +} diff --git a/playground/frontend/build/playground_components/lib/src/models/toast_type.g.dart b/playground/frontend/build/playground_components/lib/src/models/toast_type.g.dart new file mode 100644 index 000000000000..750c9938e97f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/models/toast_type.g.dart @@ -0,0 +1,162 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'toast_type.dart'; + +// ************************************************************************** +// UnmodifiableEnumMapGenerator +// ************************************************************************** + +class UnmodifiableToastTypeMap extends UnmodifiableEnumMap { + final V error; + final V info; + + const UnmodifiableToastTypeMap({ + required this.error, + required this.info, + }); + + @override + Map cast() { + return Map.castFrom(this); + } + + @override + bool containsValue(Object? value) { + if (this.error == value) return true; + if (this.info == value) return true; + return false; + } + + @override + bool containsKey(Object? key) { + return key.runtimeType == ToastType; + } + + @override + V? operator [](Object? key) { + switch (key) { + case ToastType.error: + return this.error; + case ToastType.info: + return this.info; + } + + return null; + } + + @override + void operator []=(ToastType key, V value) { + throw Exception("Cannot modify this map."); + } + + @override + Iterable> get entries { + return [ + MapEntry(ToastType.error, this.error), + MapEntry(ToastType.info, this.info), + ]; + } + + @override + Map map(MapEntry transform(ToastType key, V value)) { + final error = transform(ToastType.error, this.error); + final info = transform(ToastType.info, this.info); + return { + error.key: error.value, + info.key: info.value, + }; + } + + @override + void addEntries(Iterable> newEntries) { + throw Exception("Cannot modify this map."); + } + + @override + V update(ToastType key, V update(V value), {V Function()? ifAbsent}) { + throw Exception("Cannot modify this map."); + } + + @override + void updateAll(V update(ToastType key, V value)) { + throw Exception("Cannot modify this map."); + } + + @override + void removeWhere(bool test(ToastType key, V value)) { + throw Exception("Objects in this map cannot be removed."); + } + + @override + V putIfAbsent(ToastType key, V ifAbsent()) { + return this.get(key); + } + + @override + void addAll(Map other) { + throw Exception("Cannot modify this map."); + } + + @override + V? remove(Object? key) { + throw Exception("Objects in this map cannot be removed."); + } + + @override + void clear() { + throw Exception("Objects in this map cannot be removed."); + } + + @override + void forEach(void action(ToastType key, V value)) { + action(ToastType.error, this.error); + action(ToastType.info, this.info); + } + + @override + Iterable get keys { + return ToastType.values; + } + + @override + Iterable get values { + return [ + this.error, + this.info, + ]; + } + + @override + int get length { + return 2; + } + + @override + bool get isEmpty { + return false; + } + + @override + bool get isNotEmpty { + return true; + } + + V get(ToastType key) { + switch (key) { + case ToastType.error: + return this.error; + case ToastType.info: + return this.info; + } + } + + @override + String toString() { + final buffer = StringBuffer("{"); + buffer.write("ToastType.error: ${this.error}"); + buffer.write(", "); + buffer.write("ToastType.info: ${this.info}"); + buffer.write("}"); + return buffer.toString(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/playground_components.dart b/playground/frontend/build/playground_components/lib/src/playground_components.dart new file mode 100644 index 000000000000..1b38e6531966 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/playground_components.dart @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization_ext/easy_localization_ext.dart'; +import 'package:get_it/get_it.dart'; + +import 'locator.dart'; +import 'services/analytics/analytics_service.dart'; +import 'services/toast_notifier.dart'; + +class PlaygroundComponents { + /// The name of the package. + /// + /// Used as a path component when loading assets. + static const packageName = 'playground_components'; + + // TODO(alexeyinkin): Make const when this is fixed: https://github.com/aissat/easy_localization_loader/issues/39 + static final translationLoader = YamlPackageAssetLoader( + packageName, + path: 'assets/translations', + ); + + static Future ensureInitialized() async { + await initializeServiceLocator(); + } + + /// The global [BeamAnalyticsService] instance. + static BeamAnalyticsService get analyticsService => + GetIt.instance.get(); + + /// The global [ToastNotifier] instance that communicates notifications. + static ToastNotifier get toastNotifier => GetIt.instance.get(); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/backend_urls.dart b/playground/frontend/build/playground_components/lib/src/repositories/backend_urls.dart new file mode 100644 index 000000000000..cfd2860e8942 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/backend_urls.dart @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_print + +import '../../playground_components.dart'; +import '../constants/backend_urls.dart'; + +const _routerNode = 'router'; + +Future getRouterUrl() => _getBackendUrl(_routerNode); +Future getRunnerUrl(Sdk sdk) => _getBackendUrl(sdk.id); + +/// Returns the URL for the backend [node]. +/// +/// Calls [_getBackendUrlOptions] for options. +/// +/// If only one option exists, returns it. +/// This ensures fast initialization in production. +/// +/// If multiple options exist, each of them except the last one is probed +/// with getMetadata() call. This results in slower initialization for +/// custom stages but keeps the configuration simple. +Future _getBackendUrl(String node) async { + final urls = _getBackendUrlOptions(node); + + if (urls.length == 1) { + return urls.first; + } + + print('Probing multiple options for $node backend:'); + urls.forEach(print); + + final lastUrl = urls.removeLast(); + + for (final url in urls) { + try { + final client = GrpcExampleClient(url: url); + await client.getMetadata(); + print('Using $url'); + return url; + } on Exception catch (ex) { + print('$url failed'); + print(ex); + } + } + + print('Using $lastUrl'); + return lastUrl; +} + +/// Returns options for backend URLs for [node]. +/// +/// If an override is given in [backendUrlOverrides], it is the only option. +/// This can be used for development if the production backend +/// must not be used. +/// +/// Otherwise there are 2 options in the following order: +/// 1. [node] is prepended to the host of the current URL. +/// 2. [node] is inserted into [defaultBackendUrlTemplate] (the production URL). +/// If the two are the same, only one is returned. +/// This results in the following when looking up "node": +/// +/// For production Playground: +/// - node.play.beam.apache.org (the production URL). +/// +/// For production Tour of Beam: +/// - node.play.beam.apache.org (as node.tour.beam.apache.org is blacklisted +/// via [skipBackendUrls]). +/// +/// For any other stage of Playground or Tour of Beam (my-stage.com): +/// - node.my-stage.com +/// - node.play.beam.apache.org +/// This means that if the stage runs its own container for the given +/// backend node, it is used. Otherwise the production backend is used. +List _getBackendUrlOptions(String node) { + final override = backendUrlOverrides[node]; + if (override != null) { + return [Uri.parse(override)]; + } + + final currentHost = Uri.base.host; + final nodeUriFromCurrentHost = Uri( + scheme: Uri.base.scheme, + host: '$node.$currentHost', + port: Uri.base.port, + ); + + return { + nodeUriFromCurrentHost.toString(), + defaultBackendUrlTemplate.replaceAll('{node}', node), + }.where(_shouldAttemptUrl).map(Uri.parse).toList(); +} + +/// Whether [url] does not match any pattern in [skipBackendUrls]. +bool _shouldAttemptUrl(String url) { + return !skipBackendUrls.any((pattern) => pattern.allMatches(url).isNotEmpty); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/code_client/code_client.dart b/playground/frontend/build/playground_components/lib/src/repositories/code_client/code_client.dart new file mode 100644 index 000000000000..f50a399d3c35 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/code_client/code_client.dart @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../api/v1/api.pb.dart' as grpc; +import '../../models/sdk.dart'; +import '../models/check_status_response.dart'; +import '../models/output_response.dart'; +import '../models/run_code_request.dart'; +import '../models/run_code_response.dart'; + +abstract class CodeClient { + Future getMetadata(Sdk sdk); + + Future runCode(RunCodeRequest request); + + Future cancelExecution(String pipelineUuid); + + Future checkStatus( + String pipelineUuid, + ); + + Future getCompileOutput( + String pipelineUuid, + ); + + Future getRunOutput( + String pipelineUuid, + ); + + Future getLogOutput( + String pipelineUuid, + ); + + Future getRunErrorOutput( + String pipelineUuid, + ); + + Future getValidationErrorOutput( + String pipelineUuid, + ); + + Future getPreparationErrorOutput( + String pipelineUuid, + ); + + Future getGraphOutput( + String pipelineUuid, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/code_client/grpc_code_client.dart b/playground/frontend/build/playground_components/lib/src/repositories/code_client/grpc_code_client.dart new file mode 100644 index 000000000000..4392cda9fac8 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/code_client/grpc_code_client.dart @@ -0,0 +1,282 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:grpc/grpc.dart'; + +import '../../api/iis_workaround_channel.dart'; +import '../../api/v1/api.pbgrpc.dart' as grpc; +import '../../models/sdk.dart'; +import '../../util/pipeline_options.dart'; +import '../../util/run_with_retry.dart'; +import '../dataset_grpc_extension.dart'; +import '../models/check_status_response.dart'; +import '../models/output_response.dart'; +import '../models/run_code_error.dart'; +import '../models/run_code_request.dart'; +import '../models/run_code_response.dart'; +import '../models/run_code_result.dart'; +import '../models/snippet_file_grpc_extension.dart'; +import '../sdk_grpc_extension.dart'; +import 'code_client.dart'; + +const kGeneralError = 'Failed to execute code'; + +class GrpcCodeClient implements CodeClient { + final grpc.PlaygroundServiceClient _defaultClient; + final Map _runnerUrlsById; + + factory GrpcCodeClient({ + required Uri url, + required Map runnerUrlsById, + }) { + final channel = IisWorkaroundChannel.xhr(url); + + return GrpcCodeClient._( + client: grpc.PlaygroundServiceClient(channel), + runnerUrlsById: runnerUrlsById, + ); + } + + GrpcCodeClient._({ + required grpc.PlaygroundServiceClient client, + required Map runnerUrlsById, + }) : _defaultClient = client, + _runnerUrlsById = runnerUrlsById; + + @override + Future getMetadata(Sdk sdk) async { + final client = _createRunCodeClient(sdk); + return _runSafely( + () => client.getMetadata( + grpc.GetMetadataRequest(), + ), + ); + } + + @override + Future runCode(RunCodeRequest request) async { + final client = _createRunCodeClient(request.sdk); + final response = await _runSafely( + () => client.runCode(_grpcRunCodeRequest(request)), + ); + + return RunCodeResponse( + pipelineUuid: response.pipelineUuid, + ); + } + + @override + Future cancelExecution(String pipelineUuid) { + return _runSafely( + () => _defaultClient.cancel( + grpc.CancelRequest(pipelineUuid: pipelineUuid), + ), + ); + } + + @override + Future checkStatus( + String pipelineUuid, + ) async { + return runWithRetry( + () => _checkStatusWithRetry(pipelineUuid), + ); + } + + Future _checkStatusWithRetry( + String pipelineUuid, + ) async { + final response = await _runSafely( + () => _defaultClient.checkStatus( + grpc.CheckStatusRequest(pipelineUuid: pipelineUuid), + ), + ); + + return CheckStatusResponse( + status: _toClientStatus(response.status), + ); + } + + @override + Future getCompileOutput( + String pipelineUuid, + ) async { + final response = await _runSafely( + () => _defaultClient.getCompileOutput( + grpc.GetCompileOutputRequest(pipelineUuid: pipelineUuid), + ), + ); + + return OutputResponse(output: response.output); + } + + @override + Future getRunOutput( + String pipelineUuid, + ) async { + try { + final response = await _runSafely( + () => _defaultClient.getRunOutput( + grpc.GetRunOutputRequest(pipelineUuid: pipelineUuid), + ), + ); + + return OutputResponse(output: response.output); + } catch (ex) { + print(ex); + return OutputResponse(output: ''); + } + } + + @override + Future getLogOutput( + String pipelineUuid, + ) async { + try { + final response = await _defaultClient.getLogs( + grpc.GetLogsRequest(pipelineUuid: pipelineUuid), + ); + + return OutputResponse(output: response.output); + } catch (ex) { + print(ex); + return OutputResponse(output: ''); + } + } + + @override + Future getRunErrorOutput( + String pipelineUuid, + ) async { + final response = await _defaultClient.getRunError( + grpc.GetRunErrorRequest(pipelineUuid: pipelineUuid), + ); + + return OutputResponse(output: response.output); + } + + @override + Future getValidationErrorOutput( + String pipelineUuid, + ) async { + final response = await _defaultClient.getValidationOutput( + grpc.GetValidationOutputRequest(pipelineUuid: pipelineUuid), + ); + + return OutputResponse(output: response.output); + } + + @override + Future getPreparationErrorOutput( + String pipelineUuid, + ) async { + final response = await _defaultClient.getPreparationOutput( + grpc.GetPreparationOutputRequest(pipelineUuid: pipelineUuid), + ); + + return OutputResponse(output: response.output); + } + + @override + Future getGraphOutput( + String pipelineUuid, + ) async { + try { + final response = await _defaultClient.getGraph( + grpc.GetGraphRequest(pipelineUuid: pipelineUuid), + ); + + return OutputResponse(output: response.graph); + } catch (ex) { + print(ex); + return OutputResponse(output: ''); + } + } + + Future _runSafely(Future Function() invoke) async { + try { + return await invoke(); + } on GrpcError catch (error) { + switch (error.code) { + case StatusCode.unknown: + // The default can be misleading for this. + throw RunCodeError(message: 'errors.unknownError'.tr()); + case StatusCode.resourceExhausted: + throw RunCodeResourceExhaustedError(message: error.message); + } + throw RunCodeError(message: error.message); + } on Exception catch (_) { + throw const RunCodeError(); + } + } + + /// Run Code request should use different urls for each sdk + /// instead of the default one, because we need to code + /// sdk services for it + grpc.PlaygroundServiceClient _createRunCodeClient(Sdk sdk) { + final apiClientURL = _runnerUrlsById[sdk.id]; + + if (apiClientURL == null) { + throw Exception('Runner not found for ${sdk.id}'); + } + + final channel = IisWorkaroundChannel.xhr(apiClientURL); + return grpc.PlaygroundServiceClient(channel); + } + + grpc.RunCodeRequest _grpcRunCodeRequest(RunCodeRequest request) { + return grpc.RunCodeRequest( + datasets: request.datasets.map((e) => e.grpc), + files: request.files.map((f) => f.grpc), + pipelineOptions: pipelineOptionsToString(request.pipelineOptions), + sdk: request.sdk.grpc, + ); + } + + RunCodeStatus _toClientStatus(grpc.Status status) { + switch (status) { + case grpc.Status.STATUS_UNSPECIFIED: + return RunCodeStatus.unspecified; + case grpc.Status.STATUS_VALIDATING: + case grpc.Status.STATUS_PREPARING: + return RunCodeStatus.preparation; + case grpc.Status.STATUS_COMPILING: + return RunCodeStatus.compiling; + case grpc.Status.STATUS_EXECUTING: + return RunCodeStatus.executing; + case grpc.Status.STATUS_CANCELED: + return RunCodeStatus.cancelled; + case grpc.Status.STATUS_FINISHED: + return RunCodeStatus.finished; + case grpc.Status.STATUS_COMPILE_ERROR: + return RunCodeStatus.compileError; + case grpc.Status.STATUS_RUN_TIMEOUT: + return RunCodeStatus.timeout; + case grpc.Status.STATUS_RUN_ERROR: + return RunCodeStatus.runError; + case grpc.Status.STATUS_VALIDATION_ERROR: + return RunCodeStatus.validationError; + case grpc.Status.STATUS_PREPARATION_ERROR: + return RunCodeStatus.preparationError; + case grpc.Status.STATUS_ERROR: + return RunCodeStatus.unknownError; + } + return RunCodeStatus.unspecified; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/complexity_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/complexity_grpc_extension.dart new file mode 100644 index 000000000000..39c9eed824d0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/complexity_grpc_extension.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../api/v1/api.pbgrpc.dart' as g; +import '../enums/complexity.dart'; + +extension GrpcComplecity on g.Complexity { + Complexity? get model { + switch (this) { + case g.Complexity.COMPLEXITY_BASIC: + return Complexity.basic; + case g.Complexity.COMPLEXITY_MEDIUM: + return Complexity.medium; + case g.Complexity.COMPLEXITY_ADVANCED: + return Complexity.advanced; + case g.Complexity.COMPLEXITY_UNSPECIFIED: + return null; + } + throw Exception('Unknown complexity: $this'); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/dataset_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/dataset_grpc_extension.dart new file mode 100644 index 000000000000..ee8b7539662e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/dataset_grpc_extension.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../api/v1/api.pbgrpc.dart' as g; +import '../models/dataset.dart'; +import 'emulator_type_grpc_extension.dart'; + +extension DatasetExtension on Dataset { + g.Dataset get grpc { + return g.Dataset( + type: type?.grpc ?? g.EmulatorType.EMULATOR_TYPE_UNSPECIFIED, + options: options, + datasetPath: datasetPath, + ); + } +} + +extension GrpcDatasetExtension on g.Dataset { + Dataset get model { + return Dataset( + type: type.model, + options: options, + datasetPath: datasetPath, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/emulator_type_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/emulator_type_grpc_extension.dart new file mode 100644 index 000000000000..7acbd0abd346 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/emulator_type_grpc_extension.dart @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../api/v1/api.pbgrpc.dart' as g; +import '../enums/emulator_type.dart'; + +extension ExampleTypeExtension on EmulatorType { + g.EmulatorType get grpc { + switch (this) { + case EmulatorType.kafka: + return g.EmulatorType.EMULATOR_TYPE_KAFKA; + } + } +} + +extension GrpcExampleTypeExtension on g.EmulatorType { + EmulatorType? get model { + EmulatorType? result; + switch (this) { + case g.EmulatorType.EMULATOR_TYPE_KAFKA: + result = EmulatorType.kafka; + break; + case g.EmulatorType.EMULATOR_TYPE_UNSPECIFIED: + result = null; + break; + } + return result; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/example_client/example_client.dart b/playground/frontend/build/playground_components/lib/src/repositories/example_client/example_client.dart new file mode 100644 index 000000000000..1987f827343e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/example_client/example_client.dart @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../api/v1/api.pb.dart' as grpc; +import '../models/get_default_precompiled_object_request.dart'; +import '../models/get_precompiled_object_code_response.dart'; +import '../models/get_precompiled_object_request.dart'; +import '../models/get_precompiled_object_response.dart'; +import '../models/get_precompiled_objects_request.dart'; +import '../models/get_precompiled_objects_response.dart'; +import '../models/get_snippet_request.dart'; +import '../models/get_snippet_response.dart'; +import '../models/output_response.dart'; +import '../models/save_snippet_request.dart'; +import '../models/save_snippet_response.dart'; + +abstract class ExampleClient { + Future getMetadata(); + + Future getPrecompiledObjects( + GetPrecompiledObjectsRequest request, + ); + + Future getPrecompiledObjectCode( + GetPrecompiledObjectRequest request, + ); + + Future getDefaultPrecompiledObject( + GetDefaultPrecompiledObjectRequest request, + ); + + Future getPrecompiledObject( + GetPrecompiledObjectRequest request, + ); + + Future getPrecompiledObjectOutput( + GetPrecompiledObjectRequest request, + ); + + Future getPrecompiledObjectLogs( + GetPrecompiledObjectRequest request, + ); + + Future getPrecompiledObjectGraph( + GetPrecompiledObjectRequest request, + ); + + Future getSnippet( + GetSnippetRequest request, + ); + + Future saveSnippet( + SaveSnippetRequest request, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/example_client/grpc_example_client.dart b/playground/frontend/build/playground_components/lib/src/repositories/example_client/grpc_example_client.dart new file mode 100644 index 000000000000..01e123103d68 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/example_client/grpc_example_client.dart @@ -0,0 +1,390 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:grpc/grpc.dart'; + +import '../../api/iis_workaround_channel.dart'; +import '../../api/v1/api.pbgrpc.dart' as grpc; +import '../../models/category_with_examples.dart'; +import '../../models/example_base.dart'; +import '../../models/sdk.dart'; +import '../../models/snippet_file.dart'; +import '../complexity_grpc_extension.dart'; +import '../dataset_grpc_extension.dart'; +import '../models/get_default_precompiled_object_request.dart'; +import '../models/get_precompiled_object_code_response.dart'; +import '../models/get_precompiled_object_request.dart'; +import '../models/get_precompiled_object_response.dart'; +import '../models/get_precompiled_objects_request.dart'; +import '../models/get_precompiled_objects_response.dart'; +import '../models/get_snippet_request.dart'; +import '../models/get_snippet_response.dart'; +import '../models/output_response.dart'; +import '../models/save_snippet_request.dart'; +import '../models/save_snippet_response.dart'; +import '../models/snippet_file_grpc_extension.dart'; +import '../sdk_grpc_extension.dart'; +import 'example_client.dart'; + +class GrpcExampleClient implements ExampleClient { + final grpc.PlaygroundServiceClient _defaultClient; + + factory GrpcExampleClient({ + required Uri url, + }) { + final channel = IisWorkaroundChannel.xhr(url); + + return GrpcExampleClient._( + client: grpc.PlaygroundServiceClient(channel), + ); + } + + GrpcExampleClient._({ + required grpc.PlaygroundServiceClient client, + }) : _defaultClient = client; + + @override + Future getMetadata() async { + return _runSafely( + () => _defaultClient.getMetadata( + grpc.GetMetadataRequest(), + ), + ); + } + + @override + Future getPrecompiledObjects( + GetPrecompiledObjectsRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObjects( + _grpcGetPrecompiledObjectsRequest(request), + ), + ); + return GetPrecompiledObjectsResponse( + categories: _toClientCategories(response.sdkCategories), + ); + } + + @override + Future getDefaultPrecompiledObject( + GetDefaultPrecompiledObjectRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.getDefaultPrecompiledObject( + _grpcGetDefaultPrecompiledObjectRequest(request), + ), + ); + + return GetPrecompiledObjectResponse( + example: _toExampleModel( + request.sdk, + response.precompiledObject, + ), + ); + } + + @override + Future getPrecompiledObject( + GetPrecompiledObjectRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObject( + grpc.GetPrecompiledObjectRequest()..cloudPath = request.path, + ), + ); + + return GetPrecompiledObjectResponse( + example: _toExampleModel( + request.sdk, + response.precompiledObject, + ), + ); + } + + @override + Future getPrecompiledObjectCode( + GetPrecompiledObjectRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObjectCode( + _grpcGetPrecompiledObjectRequest(request), + ), + ); + + return GetPrecompiledObjectCodeResponse( + files: response.files.map((f) => f.model).toList(growable: false), + ); + } + + @override + Future getPrecompiledObjectOutput( + GetPrecompiledObjectRequest request, + ) async { + try { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObjectOutput( + _grpcGetPrecompiledObjectOutputRequest(request), + ), + ); + + return OutputResponse(output: response.output); + } catch (ex) { + print(ex); + return OutputResponse( + output: '', + ); + } + } + + @override + Future getPrecompiledObjectLogs( + GetPrecompiledObjectRequest request, + ) async { + try { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObjectLogs( + _grpcGetPrecompiledObjectLogRequest(request), + ), + ); + + return OutputResponse(output: response.output); + } catch (ex) { + print(ex); + return OutputResponse( + output: '', + ); + } + } + + @override + Future getPrecompiledObjectGraph( + GetPrecompiledObjectRequest request, + ) async { + try { + final response = await _runSafely( + () => _defaultClient.getPrecompiledObjectGraph( + _grpcGetPrecompiledGraphRequest(request), + ), + ); + + return OutputResponse( + output: response.graph, + ); + } catch (ex) { + print(ex); + return OutputResponse( + output: '', + ); + } + } + + @override + Future getSnippet( + GetSnippetRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.getSnippet( + _grpcGetSnippetRequest(request), + ), + ); + + return GetSnippetResponse( + files: _convertToSharedFileList(response.files), + sdk: response.sdk.model, + pipelineOptions: response.pipelineOptions, + complexity: response.complexity.model, + ); + } + + @override + Future saveSnippet( + SaveSnippetRequest request, + ) async { + final response = await _runSafely( + () => _defaultClient.saveSnippet( + _grpcSaveSnippetRequest(request), + ), + ); + + return SaveSnippetResponse( + id: response.id, + ); + } + + Future _runSafely(Future Function() invoke) async { + try { + return await invoke(); + } on GrpcError catch (error) { + throw Exception(error.message); + } + } + + grpc.GetPrecompiledObjectsRequest _grpcGetPrecompiledObjectsRequest( + GetPrecompiledObjectsRequest request, + ) { + return grpc.GetPrecompiledObjectsRequest() + ..category = request.category ?? '' + ..sdk = request.sdk?.grpc ?? grpc.Sdk.SDK_UNSPECIFIED; + } + + grpc.GetDefaultPrecompiledObjectRequest + _grpcGetDefaultPrecompiledObjectRequest( + GetDefaultPrecompiledObjectRequest request, + ) { + return grpc.GetDefaultPrecompiledObjectRequest()..sdk = request.sdk.grpc; + } + + grpc.GetPrecompiledObjectCodeRequest _grpcGetPrecompiledObjectRequest( + GetPrecompiledObjectRequest request, + ) { + return grpc.GetPrecompiledObjectCodeRequest()..cloudPath = request.path; + } + + grpc.GetPrecompiledObjectOutputRequest _grpcGetPrecompiledObjectOutputRequest( + GetPrecompiledObjectRequest request, + ) { + return grpc.GetPrecompiledObjectOutputRequest()..cloudPath = request.path; + } + + grpc.GetPrecompiledObjectLogsRequest _grpcGetPrecompiledObjectLogRequest( + GetPrecompiledObjectRequest request, + ) { + return grpc.GetPrecompiledObjectLogsRequest()..cloudPath = request.path; + } + + grpc.GetPrecompiledObjectGraphRequest _grpcGetPrecompiledGraphRequest( + GetPrecompiledObjectRequest request, + ) { + return grpc.GetPrecompiledObjectGraphRequest()..cloudPath = request.path; + } + + grpc.GetSnippetRequest _grpcGetSnippetRequest( + GetSnippetRequest request, + ) { + return grpc.GetSnippetRequest()..id = request.id; + } + + grpc.SaveSnippetRequest _grpcSaveSnippetRequest( + SaveSnippetRequest request, + ) { + return grpc.SaveSnippetRequest() + ..sdk = request.sdk.grpc + ..pipelineOptions = request.pipelineOptions + ..files.addAll(_convertToSnippetFileList(request.files)); + } + + ExampleType _exampleTypeFromString(grpc.PrecompiledObjectType type) { + switch (type) { + case grpc.PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_EXAMPLE: + return ExampleType.example; + case grpc.PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_KATA: + return ExampleType.kata; + case grpc.PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNIT_TEST: + return ExampleType.test; + case grpc.PrecompiledObjectType.PRECOMPILED_OBJECT_TYPE_UNSPECIFIED: + return ExampleType.all; + } + + return ExampleType.example; + } + + Map> _toClientCategories( + List response, + ) { + final result = >{}; + + for (final sdkMap in response) { + final sdk = sdkMap.sdk.model; + final categoriesForSdk = []; + + for (final category in sdkMap.categories) { + final examples = category.precompiledObjects + .map((example) => _toExampleModel(sdk, example)) + .toList(growable: false) + ..sort(); + + categoriesForSdk.add( + CategoryWithExamples( + title: category.categoryName, + examples: examples, + ), + ); + } + + result[sdk] = categoriesForSdk..sort(); + } + + return result; + } + + ExampleBase _toExampleModel(Sdk sdk, grpc.PrecompiledObject example) { + return ExampleBase( + alwaysRun: example.alwaysRun, + complexity: example.complexity.model, + contextLine: example.contextLine, + description: example.description, + datasets: example.datasets.map((e) => e.model).toList(growable: false), + isMultiFile: example.multifile, + name: example.name, + path: example.cloudPath, + pipelineOptions: example.pipelineOptions, + sdk: sdk, + tags: example.tags, + type: _exampleTypeFromString(example.type), + urlNotebook: example.urlNotebook, + urlVcs: example.urlVcs, + ); + } + + List _convertToSharedFileList( + List snippetFileList, + ) { + final sharedFilesList = []; + + for (final item in snippetFileList) { + sharedFilesList.add( + SnippetFile( + content: item.content, + isMain: item.isMain, + name: item.name, + ), + ); + } + + return sharedFilesList; + } + + List _convertToSnippetFileList( + List sharedFilesList, + ) { + final snippetFileList = []; + + for (final item in sharedFilesList) { + snippetFileList.add( + grpc.SnippetFile( + content: item.content, + isMain: true, + name: item.name, + ), + ); + } + + return snippetFileList; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/example_repository.dart b/playground/frontend/build/playground_components/lib/src/repositories/example_repository.dart new file mode 100644 index 000000000000..bb35f0c7674e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/example_repository.dart @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../models/category_with_examples.dart'; +import '../models/example_base.dart'; +import '../models/sdk.dart'; +import '../models/snippet_file.dart'; +import 'example_client/example_client.dart'; +import 'models/get_default_precompiled_object_request.dart'; +import 'models/get_precompiled_object_request.dart'; +import 'models/get_precompiled_objects_request.dart'; +import 'models/get_snippet_request.dart'; +import 'models/get_snippet_response.dart'; +import 'models/save_snippet_request.dart'; + +class ExampleRepository { + final ExampleClient _client; + + ExampleRepository({ + required ExampleClient client, + }) : _client = client; + + Future>> getPrecompiledObjects( + GetPrecompiledObjectsRequest request, + ) async { + final result = await _client.getPrecompiledObjects(request); + return result.categories; + } + + Future getDefaultPrecompiledObject( + GetDefaultPrecompiledObjectRequest request, + ) async { + final result = await _client.getDefaultPrecompiledObject(request); + return result.example; + } + + Future> getPrecompiledObjectCode( + GetPrecompiledObjectRequest request, + ) async { + final result = await _client.getPrecompiledObjectCode(request); + return result.files; + } + + Future getPrecompiledObjectOutput( + GetPrecompiledObjectRequest request, + ) async { + final result = await _client.getPrecompiledObjectOutput(request); + return result.output; + } + + Future getPrecompiledObjectLogs( + GetPrecompiledObjectRequest request, + ) async { + final result = await _client.getPrecompiledObjectLogs(request); + return result.output; + } + + Future getPrecompiledObjectGraph( + GetPrecompiledObjectRequest request, + ) async { + final result = await _client.getPrecompiledObjectGraph(request); + return result.output; + } + + Future getPrecompiledObject( + GetPrecompiledObjectRequest request, + ) async { + final result = await _client.getPrecompiledObject(request); + return result.example; + } + + Future getSnippet( + GetSnippetRequest request, + ) async { + final result = await _client.getSnippet(request); + return result; + } + + Future saveSnippet( + SaveSnippetRequest request, + ) async { + final result = await _client.saveSnippet(request); + return result.id; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart new file mode 100644 index 000000000000..c45e75fb62a4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/get_metadata_response_grpc_extension.dart @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../api/v1/api.pb.dart'; +import '../models/component_version.dart'; + +extension MetadataResponseGrpcExtension on GetMetadataResponse { + ComponentVersion get componentVersion { + return ComponentVersion( + beamSdkVersion: beamSdkVersion == '' ? null : beamSdkVersion, + buildCommitHash: buildCommitHash == '' ? null : buildCommitHash, + dateTime: _getDateTime(), + ); + } + + DateTime? _getDateTime() { + final seconds = buildCommitTimestampSecondsSinceEpoch.toInt(); + if (seconds == 0) { + return null; + } + + return DateTime.fromMillisecondsSinceEpoch(seconds * 1000); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/check_status_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/check_status_response.dart new file mode 100644 index 000000000000..089a9a340bd4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/check_status_response.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'run_code_result.dart'; + +class CheckStatusResponse { + final RunCodeStatus status; + + const CheckStatusResponse({ + required this.status, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_default_precompiled_object_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_default_precompiled_object_request.dart new file mode 100644 index 000000000000..4b42dee69518 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_default_precompiled_object_request.dart @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../../models/sdk.dart'; + +class GetDefaultPrecompiledObjectRequest with EquatableMixin { + final Sdk sdk; + + const GetDefaultPrecompiledObjectRequest({ + required this.sdk, + }); + + @override + List get props => [ + sdk, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_code_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_code_response.dart new file mode 100644 index 000000000000..0f1895972c65 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_code_response.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/snippet_file.dart'; + +class GetPrecompiledObjectCodeResponse { + final List files; + + const GetPrecompiledObjectCodeResponse({ + required this.files, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_request.dart new file mode 100644 index 000000000000..95516e905a15 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_request.dart @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../../models/sdk.dart'; + +/// A data object for multiple requests querying separate fields +/// of a given example. +class GetPrecompiledObjectRequest with EquatableMixin { + final String path; + final Sdk sdk; + + const GetPrecompiledObjectRequest({ + required this.path, + required this.sdk, + }); + + @override + List get props => [ + path, + sdk, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_response.dart new file mode 100644 index 000000000000..0c6ce3d5b59e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_object_response.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/example_base.dart'; + +class GetPrecompiledObjectResponse { + final ExampleBase example; + + const GetPrecompiledObjectResponse({ + required this.example, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_request.dart new file mode 100644 index 000000000000..c5c5b7246c31 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_request.dart @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../../models/sdk.dart'; + +class GetPrecompiledObjectsRequest with EquatableMixin { + final Sdk? sdk; + final String? category; + + const GetPrecompiledObjectsRequest({ + required this.sdk, + required this.category, + }); + + @override + List get props => [ + sdk, + category, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_response.dart new file mode 100644 index 000000000000..69901df75c66 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_precompiled_objects_response.dart @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/category_with_examples.dart'; +import '../../models/sdk.dart'; + +class GetPrecompiledObjectsResponse { + final Map> categories; + + const GetPrecompiledObjectsResponse({ + required this.categories, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_request.dart new file mode 100644 index 000000000000..610cf0d67b74 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_request.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class GetSnippetRequest { + final String id; + + const GetSnippetRequest({ + required this.id, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_response.dart new file mode 100644 index 000000000000..17e1a92673ea --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/get_snippet_response.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../enums/complexity.dart'; +import '../../models/sdk.dart'; +import '../../models/snippet_file.dart'; + +class GetSnippetResponse { + final Complexity? complexity; + final List files; + final String pipelineOptions; + final Sdk sdk; + + const GetSnippetResponse({ + required this.complexity, + required this.files, + required this.pipelineOptions, + required this.sdk, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/output_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/output_response.dart new file mode 100644 index 000000000000..d33292cf3333 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/output_response.dart @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// A common response for anything returning a single string. +class OutputResponse { + final String output; + + const OutputResponse({ + required this.output, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_error.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_error.dart new file mode 100644 index 000000000000..6b5eb3401362 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_error.dart @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class RunCodeError implements Exception { + final String? message; + + const RunCodeError({ + this.message, + }); +} + +class RunCodeResourceExhaustedError extends RunCodeError { + const RunCodeResourceExhaustedError({ + required super.message, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_request.dart new file mode 100644 index 000000000000..ddfd695dc394 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_request.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/dataset.dart'; +import '../../models/sdk.dart'; +import '../../models/snippet_file.dart'; + +class RunCodeRequest { + final List datasets; + final List files; + final Map pipelineOptions; + final Sdk sdk; + + const RunCodeRequest({ + required this.datasets, + required this.files, + required this.pipelineOptions, + required this.sdk, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_response.dart new file mode 100644 index 000000000000..20f1a147972d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_response.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class RunCodeResponse { + final String pipelineUuid; + + const RunCodeResponse({ + required this.pipelineUuid, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_result.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_result.dart new file mode 100644 index 000000000000..7ca6e104f1d3 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/run_code_result.dart @@ -0,0 +1,82 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../../models/sdk.dart'; + +enum RunCodeStatus { + cancelled, + compileError, + compiling, + executing, + finished, + preparation, + preparationError, + runError, + timeout, + unknownError, + unspecified, + validationError, +} + +const kFinishedStatuses = { + RunCodeStatus.cancelled, + RunCodeStatus.compileError, + RunCodeStatus.finished, + RunCodeStatus.preparationError, + RunCodeStatus.runError, + RunCodeStatus.timeout, + RunCodeStatus.unknownError, + RunCodeStatus.validationError, +}; + +class RunCodeResult with EquatableMixin { + final String? errorMessage; + final String? graph; + final String? log; + final String? output; + final String? pipelineUuid; + final Sdk sdk; + final RunCodeStatus status; + + const RunCodeResult({ + required this.sdk, + required this.status, + this.errorMessage, + this.graph, + this.log, + this.output, + this.pipelineUuid, + }); + + bool get isFinished { + return kFinishedStatuses.contains(status); + } + + @override + List get props => [ + errorMessage, + graph, + log, + output, + pipelineUuid, + sdk, + status, + ]; +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_request.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_request.dart new file mode 100644 index 000000000000..c2043a754aaa --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_request.dart @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/sdk.dart'; +import '../../models/snippet_file.dart'; + +class SaveSnippetRequest { + final List files; + final Sdk sdk; + final String pipelineOptions; + + const SaveSnippetRequest({ + required this.files, + required this.sdk, + required this.pipelineOptions, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_response.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_response.dart new file mode 100644 index 000000000000..d0379bb73b6c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/save_snippet_response.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class SaveSnippetResponse { + final String id; + + const SaveSnippetResponse({ + required this.id, + }); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/models/snippet_file_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/models/snippet_file_grpc_extension.dart new file mode 100644 index 000000000000..e4b46ba42c01 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/models/snippet_file_grpc_extension.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../api/v1/api.pb.dart' as g; +import '../../models/snippet_file.dart'; + +extension SnippetFileExtension on SnippetFile { + g.SnippetFile get grpc => g.SnippetFile( + content: content, + isMain: isMain, + name: name, + ); +} + +extension SnippetFileGrpcExtension on g.SnippetFile { + SnippetFile get model => SnippetFile( + content: content, + isMain: isMain, + name: name, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/repositories/sdk_grpc_extension.dart b/playground/frontend/build/playground_components/lib/src/repositories/sdk_grpc_extension.dart new file mode 100644 index 000000000000..e0a3d30dda04 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/repositories/sdk_grpc_extension.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../api/v1/api.pbgrpc.dart' as g; +import '../models/sdk.dart'; + +extension SdkExtension on Sdk { + static final _idToGrpcEnum = { + Sdk.java.id: g.Sdk.SDK_JAVA, + Sdk.go.id: g.Sdk.SDK_GO, + Sdk.python.id: g.Sdk.SDK_PYTHON, + Sdk.scio.id: g.Sdk.SDK_SCIO, + }; + + g.Sdk get grpc => + _idToGrpcEnum[id] ?? (throw Exception('SDK not supported for GRPS: $id')); +} + +extension GrpcSdkExtension on g.Sdk { + Sdk get model { + switch (this) { + case g.Sdk.SDK_JAVA: + return Sdk.java; + case g.Sdk.SDK_GO: + return Sdk.go; + case g.Sdk.SDK_PYTHON: + return Sdk.python; + case g.Sdk.SDK_SCIO: + return Sdk.scio; + } + + return Sdk(id: '$value', title: name); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/router/router_delegate.dart b/playground/frontend/build/playground_components/lib/src/router/router_delegate.dart new file mode 100644 index 000000000000..41857979d9e1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/router/router_delegate.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:app_state/app_state.dart'; +import 'package:flutter/material.dart'; + +import '../widgets/toasts/toast_listener.dart'; + +/// Wraps [pageStack] in widgets that must be above [Navigator] and can be +/// below [MaterialApp]. +class BeamRouterDelegate extends PageStackRouterDelegate { + BeamRouterDelegate(super.pageStack); + + @override + Widget build(BuildContext context) { + // Overlay: to float toasts. + // ToastListenerWidget: turns notification events into floating toasts. + return Overlay( + initialEntries: [ + OverlayEntry( + builder: (context) => ToastListenerWidget( + child: super.build(context), + ), + ), + ], + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/analytics_service.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/analytics_service.dart new file mode 100644 index 000000000000..8bb108edc73c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/analytics_service.dart @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; +import 'dart:collection'; + +import 'package:get_it/get_it.dart'; +import 'package:meta/meta.dart'; + +import 'events/abstract.dart'; + +/// Abstract class to submit analytics events. +abstract class BeamAnalyticsService { + AnalyticsEvent? _lastEvent; + AnalyticsEvent? get lastEvent => _lastEvent; + + final _defaultEventParameters = {}; + + /// The parameters sent with all events. + /// + /// Individual event parameters have higher priority on collisions. + Map get defaultEventParameters => + UnmodifiableMapView(_defaultEventParameters); + + set defaultEventParameters(Map newValue) { + _defaultEventParameters.clear(); + _defaultEventParameters.addAll(newValue); + } + + static BeamAnalyticsService get() { + return GetIt.instance.get(); + } + + /// Sends [event] asynchronously without returning a [Future] + /// to avoid `discarded_futures` lint. + void sendUnawaited(AnalyticsEvent event) { + unawaited(_send(event)); + } + + Future _send(AnalyticsEvent event) async { + _lastEvent = event; + await sendProtected(event); + } + + @protected + Future sendProtected(AnalyticsEvent event); +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/abstract.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/abstract.dart new file mode 100644 index 000000000000..20b41500aead --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/abstract.dart @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:equatable/equatable.dart'; + +import '../../../models/event_snippet_context.dart'; + +/// The root event class for analytics. +abstract class AnalyticsEvent with EquatableMixin { + const AnalyticsEvent({ + required this.name, + }); + + final String name; + + @override + List get props => [ + name, + ]; + + /// Returns the event params to be sent. + Map toJson() => const {}; +} + +/// An [AnalyticsEvent] with [EventSnippetContext]. +abstract class AnalyticsEventWithSnippetContext extends AnalyticsEvent { + const AnalyticsEventWithSnippetContext({ + required this.snippetContext, + required super.name, + this.additionalParams = const {}, + }); + + final EventSnippetContext? snippetContext; + final Map additionalParams; + + @override + List get props => [ + ...super.props, + snippetContext, + ]; + + @override + Map toJson() { + final map = { + ...super.toJson(), + ...?snippetContext?.toJson(), + ...additionalParams, + }; + return map; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/app_rated.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/app_rated.dart new file mode 100644 index 000000000000..14461e8c8732 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/app_rated.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../../enums/feedback_rating.dart'; +import 'abstract.dart'; +import 'constants.dart'; + +/// A thump-up or thumb-down button pressed without yet entering feedback text. +class AppRatedAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const AppRatedAnalyticsEvent({ + required this.rating, + required super.snippetContext, + super.additionalParams, + }) : super( + name: BeamAnalyticsEvents.appRated, + ); + + final FeedbackRating rating; + + @override + List get props => [ + ...super.props, + rating, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.feedbackRating: rating.name, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/constants.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/constants.dart new file mode 100644 index 000000000000..cf191485ef61 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/constants.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class BeamAnalyticsEvents { + static const appRated = 'app_rated'; + static const externalUrlNavigated = 'external_url_navigated'; + static const feedbackFormSent = 'feedback_form_sent'; + static const reportIssueClicked = 'report_issue_clicked'; + static const runCancelled = 'run_cancelled'; + static const runFinished = 'run_finished'; + static const runStarted = 'run_started'; + static const sdkSelected = 'sdk_selected'; + static const snippetModified = 'snippet_modified'; + static const snippetReset = 'snippet_reset'; + static const themeSet = 'theme_set'; +} + +class EventParams { + static const app = 'app'; + static const brightness = 'brightness'; + static const destinationUrl = 'destinationUrl'; + static const feedbackRating = 'feedbackRating'; + static const feedbackText = 'feedbackText'; + static const fileName = 'fileName'; + static const runDurationInSeconds = 'runDurationInSeconds'; + static const sdk = 'sdk'; + static const snippet = 'snippet'; + static const trigger = 'trigger'; +} + +enum EventTrigger { + shortcut, + click, +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/external_url_navigated.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/external_url_navigated.dart new file mode 100644 index 000000000000..6fe1dc27f66e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/external_url_navigated.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// Clicked any external link that does not have a dedicated event. +class ExternalUrlNavigatedAnalyticsEvent extends AnalyticsEvent { + const ExternalUrlNavigatedAnalyticsEvent({ + required this.url, + }) : super( + name: BeamAnalyticsEvents.externalUrlNavigated, + ); + + final Uri url; + + @override + List get props => [ + ...super.props, + url, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.destinationUrl: url.toString(), + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/feedback_form_sent.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/feedback_form_sent.dart new file mode 100644 index 000000000000..65756a15d1b7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/feedback_form_sent.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../../enums/feedback_rating.dart'; +import 'abstract.dart'; +import 'constants.dart'; + +/// Feedback with the [rating] and the [text] is sent. +/// +/// Currently this analytics event is the only medium to log the feedback. +class FeedbackFormSentAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const FeedbackFormSentAnalyticsEvent({ + required this.rating, + required this.text, + required super.snippetContext, + super.additionalParams, + }) : super( + name: BeamAnalyticsEvents.feedbackFormSent, + ); + + final FeedbackRating rating; + final String text; + + @override + List get props => [ + ...super.props, + rating, + text, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.feedbackRating: rating.name, + EventParams.feedbackText: text, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/report_issue_clicked.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/report_issue_clicked.dart new file mode 100644 index 000000000000..3a79e839bb81 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/report_issue_clicked.dart @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// Report issue is clicked. +class ReportIssueClickedAnalyticsEvent + extends AnalyticsEventWithSnippetContext { + const ReportIssueClickedAnalyticsEvent({ + required super.snippetContext, + }) : super( + name: BeamAnalyticsEvents.reportIssueClicked, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_cancelled.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_cancelled.dart new file mode 100644 index 000000000000..7be7ca4d3275 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_cancelled.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// A real or cached run is cancelled. +class RunCancelledAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const RunCancelledAnalyticsEvent({ + required this.duration, + required super.snippetContext, + required this.trigger, + super.additionalParams, + }) : super( + name: BeamAnalyticsEvents.runCancelled, + ); + + final Duration duration; + final EventTrigger trigger; + + @override + List get props => [ + ...super.props, + duration, + trigger, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.runDurationInSeconds: duration.inSeconds, + EventParams.trigger: trigger.name, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_finished.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_finished.dart new file mode 100644 index 000000000000..5b925ca23f82 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_finished.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// A real run is finished. +class RunFinishedAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const RunFinishedAnalyticsEvent({ + required this.duration, + required super.snippetContext, + required this.trigger, + super.additionalParams, + }) : super( + name: BeamAnalyticsEvents.runFinished, + ); + + final Duration duration; + final EventTrigger trigger; + + @override + List get props => [ + ...super.props, + duration, + trigger, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.runDurationInSeconds: duration.inSeconds, + EventParams.trigger: trigger.name, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_started.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_started.dart new file mode 100644 index 000000000000..3c3a0277f860 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/run_started.dart @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// 'Run' button is pressed to show cached result or to run for real. +class RunStartedAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const RunStartedAnalyticsEvent({ + required super.snippetContext, + required this.trigger, + super.additionalParams, + }) : super( + name: BeamAnalyticsEvents.runStarted, + ); + + final EventTrigger trigger; + + @override + List get props => [ + ...super.props, + trigger, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.trigger: trigger.name, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/sdk_selected.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/sdk_selected.dart new file mode 100644 index 000000000000..78e13a8e7d8b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/sdk_selected.dart @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../../models/sdk.dart'; +import 'abstract.dart'; +import 'constants.dart'; + +/// SDK is changed. +class SdkSelectedAnalyticsEvent extends AnalyticsEvent { + const SdkSelectedAnalyticsEvent({ + required this.sdk, + }) : super( + name: BeamAnalyticsEvents.sdkSelected, + ); + + final Sdk sdk; + + @override + List get props => [ + ...super.props, + sdk, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.sdk: sdk.id, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_modified.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_modified.dart new file mode 100644 index 000000000000..e31e44e30900 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_modified.dart @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../../models/sdk.dart'; +import 'abstract.dart'; +import 'constants.dart'; + +/// Snippet code is modified for the first time. +/// +/// For multi-file snippets this fires up to one time on each modified file. +class SnippetModifiedAnalyticsEvent extends AnalyticsEvent { + const SnippetModifiedAnalyticsEvent({ + required this.additionalParams, + required this.fileName, + required this.sdk, + required this.snippet, + }) : super( + name: BeamAnalyticsEvents.snippetModified, + ); + + final Map additionalParams; + final String fileName; + final Sdk sdk; + final String snippet; + + @override + List get props => [ + ...super.props, + additionalParams, + fileName, + sdk, + snippet, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.fileName: fileName, + EventParams.sdk: sdk.id, + EventParams.snippet: snippet, + ...additionalParams, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_reset.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_reset.dart new file mode 100644 index 000000000000..0b0e639dd0cb --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/snippet_reset.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'abstract.dart'; +import 'constants.dart'; + +/// 'Reset Snippet' is clicked. +class SnippetResetAnalyticsEvent extends AnalyticsEventWithSnippetContext { + const SnippetResetAnalyticsEvent({ + required super.snippetContext, + }) : super( + name: BeamAnalyticsEvents.snippetReset, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/events/theme_set.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/events/theme_set.dart new file mode 100644 index 000000000000..77414b266290 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/events/theme_set.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:ui'; + +import 'abstract.dart'; +import 'constants.dart'; + +/// Dark or Light mode is turned on. +class ThemeSetAnalyticsEvent extends AnalyticsEvent { + const ThemeSetAnalyticsEvent({ + required this.brightness, + }) : super( + name: BeamAnalyticsEvents.themeSet, + ); + + /// The new value of brightness. + final Brightness brightness; + + @override + List get props => [ + ...super.props, + brightness, + ]; + + @override + Map toJson() => { + ...super.toJson(), + EventParams.brightness: brightness.name, + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service.dart new file mode 100644 index 000000000000..ae3c4422710e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../analytics_service.dart'; +import 'google_analytics4_service_non_web.dart' + if (dart.library.html) 'google_analytics4_service_web.dart'; + +/// An umbrella class over platform implementations of Google Analytics 4. +abstract class BeamGoogleAnalytics4Service extends BeamAnalyticsService { + factory BeamGoogleAnalytics4Service({ + required String measurementId, + }) => + + /// Call the platform-specific factory function. + createGoogleAnalytics4Service(measurementId: measurementId); + + /// Since we use the default constructor as the factory, + /// a non-factory constructor with any other name is required for subclasses. + BeamGoogleAnalytics4Service.create(); +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_non_web.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_non_web.dart new file mode 100644 index 000000000000..5b47e2c45dda --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_non_web.dart @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:meta/meta.dart'; + +import '../events/abstract.dart'; +import 'google_analytics4_service.dart'; + +@internal +BeamGoogleAnalytics4Service createGoogleAnalytics4Service({ + required String measurementId, +}) => + BeamGoogleAnalytics4ServiceNonWeb(); + +/// The required placeholder for non-web builds, e.g. unit tests. +class BeamGoogleAnalytics4ServiceNonWeb extends BeamGoogleAnalytics4Service { + BeamGoogleAnalytics4ServiceNonWeb() : super.create(); + + @override + Future sendProtected(AnalyticsEvent event) { + throw UnimplementedError(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_web.dart b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_web.dart new file mode 100644 index 000000000000..a16bf17911a5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/analytics/google_analytics4_service/google_analytics4_service_web.dart @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; +import 'dart:convert'; +import 'dart:html'; // ignore: avoid_web_libraries_in_flutter +import 'dart:js' as js; // ignore: avoid_web_libraries_in_flutter + +import 'package:meta/meta.dart'; + +import '../events/abstract.dart'; +import 'google_analytics4_service.dart'; + +final _urlTemplate = Uri.parse('https://www.googletagmanager.com/gtag/js'); +const _eventNameParam = 'eventName'; + +/// The global JS function to submit analytics data. +const _function = 'gtag'; + +@internal +BeamGoogleAnalytics4Service createGoogleAnalytics4Service({ + required String measurementId, +}) => + BeamGoogleAnalytics4ServiceWeb(measurementId: measurementId); + +/// Submits data to a Google Analytics 4 property using JavaScript. +class BeamGoogleAnalytics4ServiceWeb extends BeamGoogleAnalytics4Service { + final String measurementId; + final _readyCompleter = Completer(); + + BeamGoogleAnalytics4ServiceWeb({ + required this.measurementId, + }) : super.create() { + _loadGoogleJs(); + } + + void _loadGoogleJs() { + // Replicating the JS from the installation manual for websites. + _evalJs('window.dataLayer = window.dataLayer || [];'); + _evalJs('window.$_function = function () { dataLayer.push(arguments); }'); + _logJsDate(); + _logConfig(); + + final url = _urlTemplate.replace(queryParameters: {'id': measurementId}); + final element = document.createElement('script') as ScriptElement; + element.async = true; + element.src = url.toString(); // ignore: unsafe_html + element.onLoad.listen(_readyCompleter.complete); + document.head!.append(element); + } + + static dynamic _evalJs(String code) { + print('JS eval: $code'); // ignore: avoid_print + return js.context.callMethod('eval', [code]); + } + + void _logJsDate() { + _logEncoded('js', 'new Date()'); + } + + void _logConfig() { + _log('config', [measurementId]); + } + + void _log(String command, List arguments) { + _logEncoded(command, arguments.map(jsonEncode).join(',')); + } + + void _logEncoded(String command, String arguments) { + _evalJs('$_function(${jsonEncode(command)}, $arguments)'); + } + + @override + Future sendProtected(AnalyticsEvent event) async { + await _readyCompleter.future; + + // Google Analytics cannot use event names as a dimension, + // so also add the event name as a parameter. + final params = { + ...defaultEventParameters, + _eventNameParam: event.name, + ...event.toJson(), + }; + + _log('event', [event.name, params]); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/abstract.dart b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/abstract.dart new file mode 100644 index 000000000000..63a14109f189 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/abstract.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../../models/symbols_dictionary.dart'; + +abstract class AbstractSymbolsLoader { + const AbstractSymbolsLoader(); + + Future get future; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/map.dart b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/map.dart new file mode 100644 index 000000000000..5c5281ebcf02 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/map.dart @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:highlight/languages/go.dart'; +import 'package:highlight/languages/java.dart'; +import 'package:highlight/languages/python.dart'; +import 'package:highlight/languages/scala.dart'; + +import '../../../assets/assets.gen.dart'; +import '../../../playground_components.dart'; +import 'yaml.dart'; + +final _javaLoader = YamlSymbolsLoader( + path: Assets.symbols.javaG, + package: PlaygroundComponents.packageName, + ); + +final symbolLoadersByMode = { + // + go: YamlSymbolsLoader( + path: Assets.symbols.goG, + package: PlaygroundComponents.packageName, + ), + + java: _javaLoader, + + python: YamlSymbolsLoader( + path: Assets.symbols.pythonG, + package: PlaygroundComponents.packageName, + ), + + scala: _javaLoader, +}; diff --git a/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/yaml.dart b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/yaml.dart new file mode 100644 index 000000000000..93f66efea709 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/symbols/loaders/yaml.dart @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/services.dart'; +import 'package:yaml/yaml.dart'; + +import '../../../models/symbols_dictionary.dart'; +import 'abstract.dart'; + +class YamlSymbolsLoader extends AbstractSymbolsLoader { + final String path; + final String? package; + + YamlSymbolsLoader({ + required this.path, + this.package, + }); + + static const _methodsKey = 'methods'; + + @override + late Future future = _load(); + + Future _load() async { + final map = await _getMap(); + final list = []; + + for (final classEntry in map.entries) { + list.add(classEntry.key); + + final classValue = classEntry.value; + + if (classValue is! Map) { + throw Exception('Expected map for ${classEntry.key}, got $classValue'); + } + + final methods = classValue[_methodsKey] as List?; + list.addAll(methods?.cast() ?? []); + } + + return SymbolsDictionary(symbols: list); + } + + Future _getMap() async { + final fullPath = package == null ? path : 'packages/$package/$path'; + final yaml = loadYaml(await rootBundle.loadString(fullPath)); + + if (yaml is! Map) { + throw Exception('Expecting a YAML map, got $yaml'); + } + + return yaml; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/services/symbols/symbols_notifier.dart b/playground/frontend/build/playground_components/lib/src/services/symbols/symbols_notifier.dart new file mode 100644 index 000000000000..7c78fd0e8967 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/symbols/symbols_notifier.dart @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/widgets.dart'; +import 'package:highlight/highlight_core.dart'; + +import '../../models/symbols_dictionary.dart'; +import 'loaders/abstract.dart'; + +class SymbolsNotifier extends ChangeNotifier { + final _dictionaryFuturesByMode = >{}; + final _dictionariesByMode = {}; + + void addLoaderIfNot(Mode mode, AbstractSymbolsLoader loader) { + unawaited(_load(mode, loader)); + } + + Future _load( + Mode mode, + AbstractSymbolsLoader loader, + ) async { + final future = _dictionaryFuturesByMode[mode]; + + if (future != null) { + return; + } + + _dictionaryFuturesByMode[mode] = loader.future; + + final dictionary = await loader.future; + _dictionariesByMode[mode] = dictionary; + notifyListeners(); + } + + SymbolsDictionary? getDictionary(Mode mode) => _dictionariesByMode[mode]; +} diff --git a/playground/frontend/build/playground_components/lib/src/services/toast_notifier.dart b/playground/frontend/build/playground_components/lib/src/services/toast_notifier.dart new file mode 100644 index 000000000000..6497482a24c1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/services/toast_notifier.dart @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:rxdart/rxdart.dart'; + +import '../exceptions/detailed_exception.dart'; +import '../models/toast.dart'; +import '../models/toast_type.dart'; + +/// Communicates popup notifications. +/// +/// Objects that need to publish an app-wide notifications +/// should submit them with [add] or [addException]. +class ToastNotifier { + final _controller = BehaviorSubject(); + + /// The stream of notification objects to be shown as popups. + Stream get toasts => _controller.stream; + + /// Adds a [toast] to the [toasts] stream to be shown as a popup. + void add(Toast toast) { + _controller.add(toast); + } + + /// Adds an [exception] to be shown as an error popup. + void addException(Exception exception) { + add( + Toast( + title: 'errors.error'.tr(), + description: exception.toString(), + type: ToastType.error, + ), + ); + + _logExceptionToConsole(exception); + } + + void _logExceptionToConsole(Exception exception) { + final buffer = StringBuffer('$exception\n'); + + if (exception is DetailedException) { + buffer.writeln(exception.details); + } + + print(buffer); // ignore: avoid_print + } + + Future dispose() async { + await _controller.close(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/theme/switch_notifier.dart b/playground/frontend/build/playground_components/lib/src/theme/switch_notifier.dart new file mode 100644 index 000000000000..3b63bc0b9c19 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/theme/switch_notifier.dart @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +const kThemeMode = 'theme_mode'; + +class ThemeSwitchNotifier extends ChangeNotifier { + Brightness brightness = Brightness.light; + + ThemeMode get themeMode { + switch (brightness) { + case Brightness.dark: + return ThemeMode.dark; + case Brightness.light: + return ThemeMode.light; + } + } + + void init() { + _setPreferences(); + } + + Future _setPreferences() async { + final preferences = await SharedPreferences.getInstance(); + brightness = preferences.getString(kThemeMode) == Brightness.dark.toString() + ? Brightness.dark + : Brightness.light; + notifyListeners(); + } + + bool get isDarkMode { + return brightness == ThemeMode.dark; + } + + Future toggleTheme() async { + brightness = + brightness == Brightness.light ? Brightness.dark : Brightness.light; + final preferences = await SharedPreferences.getInstance(); + await preferences.setString(kThemeMode, brightness.toString()); + notifyListeners(); + } +} + +class ThemeSwitchNotifierProvider extends StatelessWidget { + final Widget child; + + const ThemeSwitchNotifierProvider({ + super.key, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (context) => ThemeSwitchNotifier()..init(), + child: child, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/theme/theme.dart b/playground/frontend/build/playground_components/lib/src/theme/theme.dart new file mode 100644 index 000000000000..dd18fa4e3c0a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/theme/theme.dart @@ -0,0 +1,499 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; +import 'package:flutter_markdown_selectionarea/flutter_markdown.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../../playground_components.dart'; +import 'transitions.dart'; + +const codeFontSize = 14.0; + +class BeamThemeExtension extends ThemeExtension { + final Color borderColor; + final Color fieldBackgroundColor; + final Color iconColor; + final Color primaryBackgroundTextColor; + final Color lightGreyBackgroundTextColor; + final Color secondaryBackgroundColor; + + // TODO(nausharipov): simplify new color addition + final Color selectedProgressColor; + final Color unselectedProgressColor; + + final ButtonStyle textButtonStyle; + + final Color codeBackgroundColor; + final TextStyle codeRootStyle; + final CodeThemeData codeTheme; + + final MarkdownStyleSheet markdownStyle; + + const BeamThemeExtension({ + required this.borderColor, + required this.codeBackgroundColor, + required this.codeRootStyle, + required this.codeTheme, + required this.fieldBackgroundColor, + required this.iconColor, + required this.lightGreyBackgroundTextColor, + required this.markdownStyle, + required this.primaryBackgroundTextColor, + required this.secondaryBackgroundColor, + required this.selectedProgressColor, + required this.textButtonStyle, + required this.unselectedProgressColor, + }); + + @override + ThemeExtension copyWith({ + Color? borderColor, + Color? codeBackgroundColor, + TextStyle? codeRootStyle, + CodeThemeData? codeTheme, + Color? fieldBackgroundColor, + Color? iconColor, + Color? lightGreyBackgroundTextColor, + MarkdownStyleSheet? markdownStyle, + Color? primaryBackgroundTextColor, + Color? secondaryBackgroundColor, + Color? selectedProgressColor, + ButtonStyle? textButtonStyle, + Color? unselectedProgressColor, + }) { + return BeamThemeExtension( + borderColor: borderColor ?? this.borderColor, + codeBackgroundColor: codeBackgroundColor ?? this.codeBackgroundColor, + codeRootStyle: codeRootStyle ?? this.codeRootStyle, + codeTheme: codeTheme ?? this.codeTheme, + fieldBackgroundColor: fieldBackgroundColor ?? this.fieldBackgroundColor, + iconColor: iconColor ?? this.iconColor, + lightGreyBackgroundTextColor: + lightGreyBackgroundTextColor ?? this.lightGreyBackgroundTextColor, + markdownStyle: markdownStyle ?? this.markdownStyle, + primaryBackgroundTextColor: + primaryBackgroundTextColor ?? this.primaryBackgroundTextColor, + secondaryBackgroundColor: + secondaryBackgroundColor ?? this.secondaryBackgroundColor, + selectedProgressColor: + selectedProgressColor ?? this.selectedProgressColor, + textButtonStyle: textButtonStyle ?? this.textButtonStyle, + unselectedProgressColor: + unselectedProgressColor ?? this.unselectedProgressColor, + ); + } + + @override + ThemeExtension lerp( + covariant BeamThemeExtension? other, + double t, + ) { + return BeamThemeExtension( + borderColor: Color.lerp(borderColor, other?.borderColor, t)!, + codeBackgroundColor: Color.lerp( + codeBackgroundColor, + other?.codeBackgroundColor, + t, + )!, + codeRootStyle: TextStyle.lerp( + codeRootStyle, + other?.codeRootStyle, + t, + )!, + codeTheme: t == 0.0 ? codeTheme : other?.codeTheme ?? codeTheme, + fieldBackgroundColor: Color.lerp( + fieldBackgroundColor, + other?.fieldBackgroundColor, + t, + )!, + iconColor: Color.lerp(iconColor, other?.iconColor, t)!, + lightGreyBackgroundTextColor: Color.lerp( + lightGreyBackgroundTextColor, + other?.lightGreyBackgroundTextColor, + t, + )!, + markdownStyle: + t < 0.5 ? markdownStyle : other?.markdownStyle ?? markdownStyle, + primaryBackgroundTextColor: Color.lerp( + primaryBackgroundTextColor, + other?.primaryBackgroundTextColor, + t, + )!, + secondaryBackgroundColor: Color.lerp( + secondaryBackgroundColor, + other?.secondaryBackgroundColor, + t, + )!, + selectedProgressColor: Color.lerp( + selectedProgressColor, + other?.selectedProgressColor, + t, + )!, + textButtonStyle: ButtonStyle.lerp( + textButtonStyle, + other?.textButtonStyle, + t, + )!, + unselectedProgressColor: Color.lerp( + unselectedProgressColor, + other?.unselectedProgressColor, + t, + )!, + ); + } +} + +final kLightTheme = ThemeData( + brightness: Brightness.light, + appBarTheme: _getAppBarTheme(BeamLightThemeColors.secondaryBackground), + // TODO(nausharipov): Migrate to Material 3: https://github.com/apache/beam/issues/24610 + backgroundColor: BeamLightThemeColors.primaryBackground, + canvasColor: BeamLightThemeColors.primaryBackground, + dividerColor: BeamLightThemeColors.grey, + elevatedButtonTheme: _getElevatedButtonTheme(BeamLightThemeColors.primary), + outlinedButtonTheme: _getOutlineButtonTheme( + BeamLightThemeColors.text, + BeamLightThemeColors.primary, + ), + pageTransitionsTheme: NoTransitionsTheme(), + primaryColor: BeamLightThemeColors.primary, + scaffoldBackgroundColor: BeamLightThemeColors.secondaryBackground, + selectedRowColor: BeamLightThemeColors.selectedUnitColor, + tabBarTheme: _getTabBarTheme( + textColor: BeamLightThemeColors.text, + indicatorColor: BeamLightThemeColors.primary, + ), + textButtonTheme: _getTextButtonTheme(BeamLightThemeColors.text), + textTheme: _getTextTheme(BeamLightThemeColors.text), + extensions: { + BeamThemeExtension( + borderColor: BeamLightThemeColors.border, + fieldBackgroundColor: BeamLightThemeColors.grey, + iconColor: BeamLightThemeColors.icon, + primaryBackgroundTextColor: BeamColors.white, + lightGreyBackgroundTextColor: BeamColors.black, + markdownStyle: _getMarkdownStyle(Brightness.light), + secondaryBackgroundColor: BeamLightThemeColors.secondaryBackground, + selectedProgressColor: BeamLightThemeColors.selectedProgressColor, + textButtonStyle: _textButtonStyle, + unselectedProgressColor: BeamLightThemeColors.unselectedProgressColor, + codeBackgroundColor: BeamLightThemeColors.codeBackground, + codeRootStyle: GoogleFonts.sourceCodePro( + color: BeamLightThemeColors.text, + fontSize: codeFontSize, + ), + codeTheme: CodeThemeData( + styles: const { + 'root': TextStyle( + backgroundColor: BeamLightThemeColors.primaryBackground, + color: BeamLightThemeColors.text, + ), + 'comment': TextStyle(color: BeamLightThemeColors.codeComment), + 'quote': TextStyle(color: BeamLightThemeColors.code2), + 'variable': TextStyle(color: BeamLightThemeColors.code2), + 'keyword': TextStyle(color: BeamLightThemeColors.code2), + 'selector-tag': TextStyle(color: BeamLightThemeColors.code2), + 'built_in': TextStyle(color: BeamLightThemeColors.code2), + 'name': TextStyle(color: BeamLightThemeColors.code2), + 'tag': TextStyle(color: BeamLightThemeColors.code2), + 'string': TextStyle(color: BeamLightThemeColors.code1), + 'title': TextStyle(color: BeamLightThemeColors.code1), + 'section': TextStyle(color: BeamLightThemeColors.code1), + 'attribute': TextStyle(color: BeamLightThemeColors.code1), + 'literal': TextStyle(color: BeamLightThemeColors.code1), + 'template-tag': TextStyle(color: BeamLightThemeColors.code1), + 'template-variable': TextStyle(color: BeamLightThemeColors.code1), + 'type': TextStyle(color: BeamLightThemeColors.code1), + 'addition': TextStyle(color: BeamLightThemeColors.code1), + 'deletion': TextStyle(color: BeamLightThemeColors.code2), + 'selector-attr': TextStyle(color: BeamLightThemeColors.code2), + 'selector-pseudo': TextStyle(color: BeamLightThemeColors.code2), + 'meta': TextStyle(color: BeamLightThemeColors.code2), + 'doctag': TextStyle(color: BeamLightThemeColors.codeComment), + 'attr': TextStyle(color: BeamLightThemeColors.primary), + 'symbol': TextStyle(color: BeamLightThemeColors.code2), + 'bullet': TextStyle(color: BeamLightThemeColors.code2), + 'link': TextStyle(color: BeamLightThemeColors.code2), + 'emphasis': TextStyle(fontStyle: FontStyle.italic), + 'strong': TextStyle(fontWeight: FontWeight.bold), + }, + ), + ), + }, +); + +final kDarkTheme = ThemeData( + brightness: Brightness.dark, + appBarTheme: _getAppBarTheme(BeamDarkThemeColors.secondaryBackground), + backgroundColor: BeamDarkThemeColors.primaryBackground, + canvasColor: BeamDarkThemeColors.primaryBackground, + dividerColor: BeamDarkThemeColors.grey, + elevatedButtonTheme: _getElevatedButtonTheme(BeamDarkThemeColors.primary), + outlinedButtonTheme: _getOutlineButtonTheme( + BeamDarkThemeColors.text, + BeamDarkThemeColors.primary, + ), + pageTransitionsTheme: NoTransitionsTheme(), + primaryColor: BeamDarkThemeColors.primary, + scaffoldBackgroundColor: BeamDarkThemeColors.secondaryBackground, + selectedRowColor: BeamDarkThemeColors.selectedUnitColor, + tabBarTheme: _getTabBarTheme( + textColor: BeamDarkThemeColors.text, + indicatorColor: BeamDarkThemeColors.primary, + ), + textButtonTheme: _getTextButtonTheme(BeamDarkThemeColors.text), + textTheme: _getTextTheme(BeamDarkThemeColors.text), + extensions: { + BeamThemeExtension( + borderColor: BeamDarkThemeColors.border, + fieldBackgroundColor: BeamDarkThemeColors.grey, + iconColor: BeamDarkThemeColors.icon, + primaryBackgroundTextColor: BeamColors.white, + lightGreyBackgroundTextColor: BeamColors.black, + markdownStyle: _getMarkdownStyle(Brightness.dark), + secondaryBackgroundColor: BeamDarkThemeColors.secondaryBackground, + selectedProgressColor: BeamDarkThemeColors.selectedProgressColor, + textButtonStyle: _textButtonStyle, + unselectedProgressColor: BeamDarkThemeColors.unselectedProgressColor, + codeBackgroundColor: BeamDarkThemeColors.codeBackground, + codeRootStyle: GoogleFonts.sourceCodePro( + color: BeamDarkThemeColors.text, + fontSize: codeFontSize, + ), + codeTheme: CodeThemeData( + styles: const { + 'root': TextStyle( + backgroundColor: BeamDarkThemeColors.primaryBackground, + color: BeamDarkThemeColors.text, + ), + 'comment': TextStyle(color: BeamDarkThemeColors.codeComment), + 'quote': TextStyle(color: BeamDarkThemeColors.code2), + 'variable': TextStyle(color: BeamDarkThemeColors.code2), + 'keyword': TextStyle(color: BeamDarkThemeColors.code2), + 'selector-tag': TextStyle(color: BeamDarkThemeColors.code2), + 'built_in': TextStyle(color: BeamDarkThemeColors.code2), + 'name': TextStyle(color: BeamDarkThemeColors.code2), + 'tag': TextStyle(color: BeamDarkThemeColors.code2), + 'string': TextStyle(color: BeamDarkThemeColors.code1), + 'title': TextStyle(color: BeamDarkThemeColors.code1), + 'section': TextStyle(color: BeamDarkThemeColors.code1), + 'attribute': TextStyle(color: BeamDarkThemeColors.code1), + 'literal': TextStyle(color: BeamDarkThemeColors.code1), + 'template-tag': TextStyle(color: BeamDarkThemeColors.code1), + 'template-variable': TextStyle(color: BeamDarkThemeColors.code1), + 'type': TextStyle(color: BeamDarkThemeColors.code1), + 'addition': TextStyle(color: BeamDarkThemeColors.code1), + 'deletion': TextStyle(color: BeamDarkThemeColors.code2), + 'selector-attr': TextStyle(color: BeamDarkThemeColors.code2), + 'selector-pseudo': TextStyle(color: BeamDarkThemeColors.code2), + 'meta': TextStyle(color: BeamDarkThemeColors.code2), + 'doctag': TextStyle(color: BeamDarkThemeColors.codeComment), + 'attr': TextStyle(color: BeamDarkThemeColors.primary), + 'symbol': TextStyle(color: BeamDarkThemeColors.code2), + 'bullet': TextStyle(color: BeamDarkThemeColors.code2), + 'link': TextStyle(color: BeamDarkThemeColors.code2), + 'emphasis': TextStyle(fontStyle: FontStyle.italic), + 'strong': TextStyle(fontWeight: FontWeight.bold), + }, + ), + ), + }, +); + +TextTheme _getTextTheme(Color textColor) { + return GoogleFonts.sourceSansProTextTheme( + const TextTheme( + displayLarge: _emptyTextStyle, + displayMedium: TextStyle( + fontSize: 48, + fontWeight: FontWeight.w900, + ), + displaySmall: TextStyle( + fontFamily: 'Roboto_regular', + fontSize: 18, + fontWeight: FontWeight.w400, + ), + headlineLarge: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + ), + headlineMedium: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + ), + headlineSmall: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + ), + titleLarge: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ), + titleMedium: _emptyTextStyle, + titleSmall: _emptyTextStyle, + labelLarge: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + ), + labelMedium: _emptyTextStyle, + labelSmall: _emptyTextStyle, + bodyLarge: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w400, + ), + bodyMedium: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w400, + ), + bodySmall: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w400, + ), + ).apply( + bodyColor: textColor, + displayColor: textColor, + ), + ); +} + +TextButtonThemeData _getTextButtonTheme(Color textColor) { + return TextButtonThemeData( + style: TextButton.styleFrom( + foregroundColor: textColor, + shape: _getButtonBorder(BeamBorderRadius.large), + ), + ); +} + +OutlinedButtonThemeData _getOutlineButtonTheme( + Color textColor, + Color outlineColor, +) { + return OutlinedButtonThemeData( + style: OutlinedButton.styleFrom( + foregroundColor: textColor, + side: BorderSide(color: outlineColor, width: 3), + padding: const EdgeInsets.symmetric( + vertical: BeamSizes.size20, + horizontal: BeamSizes.size40, + ), + shape: _getButtonBorder(BeamBorderRadius.small), + ), + ); +} + +ElevatedButtonThemeData _getElevatedButtonTheme(Color color) { + return ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + padding: const EdgeInsets.all(BeamSizes.size20), + foregroundColor: BeamColors.white, + backgroundColor: color, + ), + ); +} + +TabBarTheme _getTabBarTheme({ + required Color textColor, + required Color indicatorColor, +}) { + const labelStyle = TextStyle(fontWeight: FontWeight.w600); + return TabBarTheme( + unselectedLabelColor: textColor, + labelColor: textColor, + labelStyle: labelStyle, + unselectedLabelStyle: labelStyle, + indicator: UnderlineTabIndicator( + borderSide: BorderSide(width: 2.0, color: indicatorColor), + ), + ); +} + +AppBarTheme _getAppBarTheme(Color backgroundColor) { + return AppBarTheme( + color: backgroundColor, + elevation: BeamSizes.size1, + centerTitle: false, + toolbarHeight: BeamSizes.appBarHeight, + ); +} + +RoundedRectangleBorder _getButtonBorder(double radius) { + return RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(radius), + ), + ); +} + +MarkdownStyleSheet _getMarkdownStyle(Brightness brightness) { + final Color primaryColor; + final Color codeblockBackgroundColor; + if (brightness == Brightness.light) { + primaryColor = BeamLightThemeColors.primary; + codeblockBackgroundColor = BeamLightThemeColors.codeBackground; + } else { + primaryColor = BeamDarkThemeColors.primary; + codeblockBackgroundColor = BeamDarkThemeColors.codeBackground; + } + + return MarkdownStyleSheet( + p: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w400, + ), + pPadding: const EdgeInsets.only(top: BeamSizes.size2), + h1: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + ), + h2: const TextStyle( + fontSize: 17, + fontWeight: FontWeight.w600, + ), + h3: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + ), + h3Padding: const EdgeInsets.only(top: BeamSizes.size4), + blockquoteDecoration: BoxDecoration( + color: codeblockBackgroundColor, + borderRadius: BorderRadius.circular(BeamSizes.size6), + ), + code: GoogleFonts.sourceCodePro( + backgroundColor: BeamColors.transparent, + fontSize: 14, + ), + codeblockDecoration: BoxDecoration( + color: codeblockBackgroundColor, + border: Border.all(color: primaryColor), + borderRadius: const BorderRadius.all(Radius.circular(BeamSizes.size4)), + ), + ); +} + +final _textButtonStyle = TextButton.styleFrom( + textStyle: const TextStyle( + fontSize: BeamSizes.size12, + fontWeight: FontWeight.w400, + ), +); + +/// This is used to easily distinguish unimplemented text styles. +const TextStyle _emptyTextStyle = TextStyle(); diff --git a/playground/frontend/build/playground_components/lib/src/theme/transitions.dart b/playground/frontend/build/playground_components/lib/src/theme/transitions.dart new file mode 100644 index 000000000000..8388ba37775e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/theme/transitions.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +/// Disables page transitions. +/// +/// See https://medium.com/flutter/improving-perceived-performance-with-image-placeholders-precaching-and-disabled-navigation-6b3601087a2b +class NoTransitionsTheme extends PageTransitionsTheme { + @override + Widget buildTransitions( + PageRoute route, + BuildContext context, + Animation animation, + Animation secondaryAnimation, + Widget child, + ) { + return child; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/util/async.dart b/playground/frontend/build/playground_components/lib/src/util/async.dart new file mode 100644 index 000000000000..44248eeeb67f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/async.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Mimics [Future.wait] for a map. +Future> waitMap(Map> map) async { + final values = await Future.wait(map.values); + return Map.fromIterables(map.keys, values); +} diff --git a/playground/frontend/build/playground_components/lib/src/util/connectivity_result.dart b/playground/frontend/build/playground_components/lib/src/util/connectivity_result.dart new file mode 100644 index 000000000000..188f911f78aa --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/connectivity_result.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:connectivity_plus/connectivity_plus.dart'; + +extension ConnectivityResultExtension on ConnectivityResult { + bool get isConnected => this != ConnectivityResult.none; +} diff --git a/playground/frontend/build/playground_components/lib/src/util/dropdown_utils.dart b/playground/frontend/build/playground_components/lib/src/util/dropdown_utils.dart new file mode 100644 index 000000000000..df1c1c9f7a6c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/dropdown_utils.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../widgets/dropdown_button/dropdown_button.dart'; + +const _bottomToDropdown = 10.0; + +/// Returns the screen offset at which to show the dropdown. +/// +/// [key] points to the button that triggers the dropdown. +/// [widgetWidth] is important when aligning to the right. +Offset findDropdownOffset({ + required GlobalKey key, + DropdownAlignment alignment = DropdownAlignment.left, + double widgetWidth = 0, +}) { + final box = key.currentContext?.findRenderObject() as RenderBox?; + + if (box == null) { + throw Exception('Cannot find render object for $key'); + } + + final buttonOffset = box.localToGlobal(Offset.zero); + final top = buttonOffset.dy + box.size.height + _bottomToDropdown; + + switch (alignment) { + case DropdownAlignment.left: + return Offset(buttonOffset.dx, top); + case DropdownAlignment.right: + return Offset(buttonOffset.dx + box.size.width - widgetWidth, top); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/util/iterable.dart b/playground/frontend/build/playground_components/lib/src/util/iterable.dart new file mode 100644 index 000000000000..3ce5b6f88b46 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/iterable.dart @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +extension IterableExtension on Iterable { + Iterable alternateWith(T separator) { + return expand((item) sync* { + yield separator; + yield item as T; + }).skip(1); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/util/logical_keyboard_key.dart b/playground/frontend/build/playground_components/lib/src/util/logical_keyboard_key.dart new file mode 100644 index 000000000000..9ebbc099a4e0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/logical_keyboard_key.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/services.dart'; + +import 'native_platform.dart'; + +class LogicalKeyboardKeyExtension { + static LogicalKeyboardKey get metaOrControl => NativePlatform.isMacOs + ? LogicalKeyboardKey.meta + : LogicalKeyboardKey.control; +} diff --git a/playground/frontend/build/playground_components/lib/src/util/native_platform.dart b/playground/frontend/build/playground_components/lib/src/util/native_platform.dart new file mode 100644 index 000000000000..e67c20a92241 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/native_platform.dart @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:os_detect/os_detect.dart' as platform; + +class NativePlatform { + static bool get isMacOs => + platform.operatingSystemVersion.contains('Mac OS') || + platform.operatingSystemVersion.contains('Macintosh'); +} diff --git a/playground/frontend/build/playground_components/lib/src/util/pipeline_options.dart b/playground/frontend/build/playground_components/lib/src/util/pipeline_options.dart new file mode 100644 index 000000000000..4c7f34358591 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/pipeline_options.dart @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +RegExp pipelineOptionsRegExp = RegExp(r'--(\S+)\s+(\S+)'); + +const keyValueGroupCount = 2; + +String getGroupValue(RegExpMatch match, int groupNum) { + return match.group(groupNum)?.trim() ?? ''; +} + +/// Parses pipeline options string (--key value) to the key-value map +Map? parsePipelineOptions(String pipelineOptions) { + final Map result = {}; + if (pipelineOptions.isEmpty) { + return result; + } + final matches = pipelineOptionsRegExp.allMatches(pipelineOptions); + if (matches.isEmpty) { + return null; + } + final hasError = matches.where((match) { + return match.groupCount != keyValueGroupCount || + getGroupValue(match, 1).isEmpty || + getGroupValue(match, 2).isEmpty; + }).isNotEmpty; + if (hasError) { + return null; + } + for (final match in matches) { + final key = getGroupValue(match, 1); + final value = getGroupValue(match, 2); + result[key] = value; + } + var optionsCopy = pipelineOptions; + for (final element in result.entries) { + optionsCopy = optionsCopy.replaceAll('--${element.key}', ''); + optionsCopy = optionsCopy.replaceAll(element.value, ''); + } + if (optionsCopy.trim().isNotEmpty) { + return null; + } + return result; +} + +/// Converts pipeline options to --key value string +String pipelineOptionsToString(Map pipelineOptions) { + return pipelineOptions.entries.map((e) => '--${e.key} ${e.value}').join(' '); +} diff --git a/playground/frontend/build/playground_components/lib/src/util/run_with_retry.dart b/playground/frontend/build/playground_components/lib/src/util/run_with_retry.dart new file mode 100644 index 000000000000..6f4a8ba11dd1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/run_with_retry.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const kDefaultRetryCount = 5; +const kDefaultRetryWaitMs = 2000; + +/// Runs [fn] future [retryCount] times if error occurs +/// Each run except the first one delayed [retryWaitMs]ms +Future runWithRetry(Future Function() fn, + {int retryCount = kDefaultRetryCount, + int retryWaitMs = kDefaultRetryWaitMs}) async { + return _runWithRetry(fn, retryWaitMs: retryWaitMs, retryCount: retryCount); +} + +Future _runWithRetry( + Future Function() fn, { + required int retryCount, + required int retryWaitMs, + int attemptNumber = 1, +}) async { + try { + return await fn(); + } catch (e) { + if (attemptNumber > retryCount) { + rethrow; + } + return Future.delayed( + Duration(milliseconds: retryWaitMs), + () => _runWithRetry( + fn, + retryCount: retryCount, + retryWaitMs: retryWaitMs, + attemptNumber: attemptNumber + 1, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/util/string.dart b/playground/frontend/build/playground_components/lib/src/util/string.dart new file mode 100644 index 000000000000..6a2761bfe7d1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/util/string.dart @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +extension StringExtension on String { + List splitNotEmpty(Pattern pattern) { + return split(pattern).where((s) => s.isNotEmpty).toList(growable: false); + } + + String tabsToSpaces(int spaceCount) { + return replaceAll('\t', ' ' * spaceCount); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/bubble.dart b/playground/frontend/build/playground_components/lib/src/widgets/bubble.dart new file mode 100644 index 000000000000..1f6e46a1848a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/bubble.dart @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:playground_components/playground_components.dart'; + +import '../constants/sizes.dart'; + +class BubbleWidget extends StatelessWidget { + final bool isSelected; + final VoidCallback onTap; + final String title; + + const BubbleWidget({ + super.key, + required this.isSelected, + required this.onTap, + required this.title, + }); + + @override + Widget build(BuildContext context) { + final themeData = Theme.of(context); + final ext = themeData.extension()!; + + return MouseRegion( + cursor: SystemMouseCursors.click, + child: Padding( + padding: const EdgeInsets.only(right: BeamSizes.size8), + child: GestureDetector( + onTap: onTap, + child: Container( + height: BeamSizes.buttonHeight, + padding: const EdgeInsets.symmetric(horizontal: BeamSizes.size16), + decoration: BoxDecoration( + color: isSelected ? themeData.primaryColor : ext.borderColor, + borderRadius: BorderRadius.circular(BeamBorderRadius.infinite), + ), + child: Center( + child: Text( + title, + style: TextStyle( + color: isSelected + ? ext.primaryBackgroundTextColor + : ext.lightGreyBackgroundTextColor, + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/buttons/privacy_policy.dart b/playground/frontend/build/playground_components/lib/src/widgets/buttons/privacy_policy.dart new file mode 100644 index 000000000000..091364fc7496 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/buttons/privacy_policy.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../constants/links.dart'; +import 'text_external_url_navigation.dart'; + +class PrivacyPolicyButton extends StatelessWidget { + const PrivacyPolicyButton(); + + @override + Widget build(BuildContext context) { + return TextExternalUrlNavigationButton( + title: 'ui.privacyPolicy'.tr(), + url: Uri.parse(BeamLinks.privacyPolicy), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/buttons/report_issue.dart b/playground/frontend/build/playground_components/lib/src/widgets/buttons/report_issue.dart new file mode 100644 index 000000000000..592c3f05198b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/buttons/report_issue.dart @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../constants/links.dart'; +import '../../controllers/playground_controller.dart'; +import '../../services/analytics/analytics_service.dart'; +import '../../services/analytics/events/report_issue_clicked.dart'; +import 'text.dart'; + +class ReportIssueButton extends StatelessWidget { + const ReportIssueButton({ + required this.playgroundController, + }); + + final PlaygroundController? playgroundController; + + @override + Widget build(BuildContext context) { + return BeamTextButton( + title: 'ui.reportIssue'.tr(), + onPressed: () { + GetIt.instance.get().sendUnawaited( + ReportIssueClickedAnalyticsEvent( + snippetContext: playgroundController?.eventSnippetContext, + ), + ); + unawaited(launchUrl(Uri.parse(BeamLinks.reportIssue))); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/buttons/text.dart b/playground/frontend/build/playground_components/lib/src/widgets/buttons/text.dart new file mode 100644 index 000000000000..b66657bc8e46 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/buttons/text.dart @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../theme/theme.dart'; + +class BeamTextButton extends StatelessWidget { + const BeamTextButton({ + required this.onPressed, + required this.title, + }); + + final VoidCallback onPressed; + final String title; + + @override + Widget build(BuildContext context) { + return TextButton( + style: Theme.of(context).extension()!.textButtonStyle, + onPressed: onPressed, + child: Text(title), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/buttons/text_external_url_navigation.dart b/playground/frontend/build/playground_components/lib/src/widgets/buttons/text_external_url_navigation.dart new file mode 100644 index 000000000000..57b124abb91a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/buttons/text_external_url_navigation.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../services/analytics/analytics_service.dart'; +import '../../services/analytics/events/external_url_navigated.dart'; +import 'text.dart'; + +/// A [BeamTextButton] that navigates [url] and fires +/// an [ExternalUrlNavigatedAnalyticsEvent]. +class TextExternalUrlNavigationButton extends StatelessWidget { + const TextExternalUrlNavigationButton({ + required this.title, + required this.url, + }); + + final String title; + final Uri url; + + @override + Widget build(BuildContext context) { + return BeamTextButton( + onPressed: () { + GetIt.instance.get().sendUnawaited( + ExternalUrlNavigatedAnalyticsEvent(url: url), + ); + unawaited(launchUrl(url)); + }, + title: title, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/clickable.dart b/playground/frontend/build/playground_components/lib/src/widgets/clickable.dart new file mode 100644 index 000000000000..c2590882145c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/clickable.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +/// MouseRegion + GestureDetector. +class ClickableWidget extends StatelessWidget { + final Widget child; + final VoidCallback? onTap; + + const ClickableWidget({ + required this.child, + required this.onTap, + }); + + @override + Widget build(BuildContext context) { + if (onTap == null) return child; + + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: onTap, + child: child, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/close_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/close_button.dart new file mode 100644 index 000000000000..868e53fa920d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/close_button.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +class BeamCloseButton extends StatelessWidget { + static const _width = 120.0; + static const _height = 40.0; + + @override + Widget build(BuildContext context) { + return ElevatedButton( + style: const ButtonStyle( + elevation: MaterialStatePropertyAll(0), + fixedSize: MaterialStatePropertyAll( + Size(_width, _height), + ), + shape: MaterialStatePropertyAll( + StadiumBorder(), + ), + padding: MaterialStatePropertyAll(EdgeInsets.only(bottom: 2)), + ), + onPressed: () => Navigator.of(context).pop(), + child: Text('widgets.closeButton.label'.tr().toUpperCase()), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/complexity.dart b/playground/frontend/build/playground_components/lib/src/widgets/complexity.dart new file mode 100644 index 000000000000..93eaa758537e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/complexity.dart @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/colors.dart'; +import '../constants/sizes.dart'; +import '../enums/complexity.dart'; + +class ComplexityWidget extends StatelessWidget { + final Complexity complexity; + + const ComplexityWidget({required this.complexity}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () {}, + child: SizedBox.square( + dimension: 24, + child: Row( + mainAxisSize: MainAxisSize.min, + children: _dots[complexity]!, + ), + ), + ); + } + + static const Map> _dots = { + Complexity.basic: [_Dot.green, _Dot.grey, _Dot.grey], + Complexity.medium: [_Dot.orange, _Dot.orange, _Dot.grey], + Complexity.advanced: [_Dot.red, _Dot.red, _Dot.red], + }; +} + +class _Dot extends StatelessWidget { + final Color color; + + const _Dot({required this.color}); + + @override + Widget build(BuildContext context) { + return Container( + margin: const EdgeInsets.only(left: 1), + width: BeamSizes.size4, + height: BeamSizes.size4, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: color, + ), + ); + } + + static const grey = _Dot(color: BeamColors.grey2); + static const green = _Dot(color: BeamColors.green); + static const orange = _Dot(color: BeamColors.orange); + static const red = _Dot(color: BeamColors.red); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/copyright.dart b/playground/frontend/build/playground_components/lib/src/widgets/copyright.dart new file mode 100644 index 000000000000..e0f3a92e8b29 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/copyright.dart @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +class CopyrightWidget extends StatelessWidget { + const CopyrightWidget(); + + @override + Widget build(BuildContext context) { + return const Text('ui.copyright').tr(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/dialog.dart b/playground/frontend/build/playground_components/lib/src/widgets/dialog.dart new file mode 100644 index 000000000000..7e14d481649e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/dialog.dart @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +// TODO(alexeyinkin): In future convert all dialogs to this one. +class BeamDialog extends StatelessWidget { + static const _padding = 40.0; + + const BeamDialog({ + required this.child, + this.actions = const [], + this.title, + }); + + final List actions; + final Widget child; + final Widget? title; + + static Future show({ + required Widget child, + required BuildContext context, + Widget? title, + List actions = const [], + }) async { + await showDialog( + context: context, + builder: (BuildContext context) => BeamDialog( + actions: actions, + title: title, + child: child, + ), + ); + } + + @override + Widget build(BuildContext context) { + return AlertDialog( + actions: actions, + actionsPadding: const EdgeInsets.only( + bottom: _padding, + right: _padding, + ), + content: child, + contentPadding: const EdgeInsets.all(_padding), + title: title, + titlePadding: const EdgeInsets.only( + top: _padding, + left: _padding, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/dialogs/confirm.dart b/playground/frontend/build/playground_components/lib/src/widgets/dialogs/confirm.dart new file mode 100644 index 000000000000..7f5edeb3b1be --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/dialogs/confirm.dart @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../../playground_components.dart'; + +class ConfirmDialog extends StatelessWidget { + final String confirmButtonText; + + final String title; + final String? subtitle; + + const ConfirmDialog({ + required this.confirmButtonText, + required this.title, + this.subtitle, + }); + + static Future show({ + required BuildContext context, + required String title, + required String confirmButtonText, + String? subtitle, + }) async { + return await showDialog( + context: context, + builder: (context) => ConfirmDialog( + confirmButtonText: confirmButtonText, + title: title, + subtitle: subtitle, + ), + ); + } + + @override + Widget build(BuildContext context) { + return Dialog( + backgroundColor: Colors.transparent, + child: OverlayBody( + child: Container( + width: BeamSizes.popupWidth, + padding: const EdgeInsets.all(BeamSizes.size16), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + // + Text( + title, + style: Theme.of(context).textTheme.headlineMedium, + ), + if (subtitle != null) + Padding( + padding: const EdgeInsets.only(top: BeamSizes.size8), + child: Text(subtitle!), + ), + + const SizedBox(height: BeamSizes.size8), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + onPressed: () { + Navigator.pop(context, false); + }, + child: const Text('dialogs.cancel').tr(), + ), + const SizedBox(width: BeamSizes.size8), + TextButton( + onPressed: () { + Navigator.pop(context, true); + }, + child: Text(confirmButtonText), + ), + ], + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/dialogs/progress.dart b/playground/frontend/build/playground_components/lib/src/widgets/dialogs/progress.dart new file mode 100644 index 000000000000..4f513a783bd4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/dialogs/progress.dart @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; + +class ProgressDialog extends StatelessWidget { + const ProgressDialog(); + + /// Shows a dialog with [CircularProgressIndicator] until [future] completes. + static void show({ + required Future future, + required GlobalKey navigatorKey, + }) { + var shown = true; + unawaited( + showDialog( + barrierDismissible: false, + context: navigatorKey.currentContext!, + builder: (_) => const ProgressDialog(), + ).whenComplete(() { + shown = false; + }), + ); + unawaited( + future.whenComplete(() { + if (shown) { + navigatorKey.currentState!.pop(); + } + }), + ); + } + + @override + Widget build(BuildContext context) { + return const Dialog( + backgroundColor: Colors.transparent, + child: Center( + child: CircularProgressIndicator(), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/divider.dart b/playground/frontend/build/playground_components/lib/src/widgets/divider.dart new file mode 100644 index 000000000000..fdd0b0ef6092 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/divider.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +/// Replaces Flutter's Divider, which is buggy with HTML renderer. +/// See https://github.com/flutter/flutter/issues/46339 +class BeamDivider extends StatelessWidget { + final EdgeInsets? margin; + const BeamDivider({this.margin}); + + @override + Widget build(BuildContext context) { + return Container( + margin: margin, + width: double.infinity, + height: 1, + color: Theme.of(context).dividerColor, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/drag_handle.dart b/playground/frontend/build/playground_components/lib/src/widgets/drag_handle.dart new file mode 100644 index 000000000000..3c8a2f693c9e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/drag_handle.dart @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +import '../assets/assets.gen.dart'; +import '../playground_components.dart'; + +class DragHandle extends StatelessWidget { + final Axis direction; + + const DragHandle({ + required this.direction, + super.key, + }); + + @override + Widget build(BuildContext context) { + // TODO: Use a single file and just rotate it if needed. + // Currently a rotated widget gets blurred in HTML renderer. Find a fix. + return SvgPicture.asset( + direction == Axis.horizontal + ? Assets.svg.dragHorizontal + : Assets.svg.dragVertical, + package: PlaygroundComponents.packageName, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/dropdown_button/dropdown_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/dropdown_button/dropdown_button.dart new file mode 100644 index 000000000000..ac51664a780a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/dropdown_button/dropdown_button.dart @@ -0,0 +1,197 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import '../../theme/theme.dart'; +import '../../util/dropdown_utils.dart'; + +const int kAnimationDurationInMilliseconds = 80; +const Offset kAnimationBeginOffset = Offset(0, -0.02); +const Offset kAnimationEndOffset = Offset.zero; + +/// How to align the button and its dropdown. +enum DropdownAlignment { + /// Align the left edges of the button and its dropdown. + left, + + /// Align the right edges of the button and its dropdown. + right, +} + +class AppDropdownButton extends StatefulWidget { + final Widget buttonText; + final EdgeInsets buttonPadding; + final Widget Function(void Function() close) createDropdown; + final DropdownAlignment dropdownAlign; + final double? height; + final Widget? leading; + final bool showArrow; + final double width; + + const AppDropdownButton({ + super.key, + required this.buttonText, + required this.createDropdown, + required this.width, + this.buttonPadding = const EdgeInsets.all(BeamSpacing.medium), + this.dropdownAlign = DropdownAlignment.left, + this.height, + this.leading, + this.showArrow = true, + }); + + @override + State createState() => _AppDropdownButtonState(); +} + +class _AppDropdownButtonState extends State + with TickerProviderStateMixin { + final GlobalKey selectorKey = LabeledGlobalKey('ExampleSelector'); + late OverlayEntry? dropdown; + late AnimationController animationController; + late Animation offsetAnimation; + bool isOpen = false; + + @override + void initState() { + super.initState(); + animationController = AnimationController( + vsync: this, + duration: const Duration(milliseconds: kAnimationDurationInMilliseconds), + ); + offsetAnimation = Tween( + begin: kAnimationBeginOffset, + end: kAnimationEndOffset, + ).animate(animationController); + } + + @override + void dispose() { + animationController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final ext = Theme.of(context).extension()!; + + return Container( + height: BeamSizes.buttonHeight, + decoration: BoxDecoration( + color: ext.fieldBackgroundColor, + borderRadius: BorderRadius.circular(BeamBorderRadius.small), + ), + child: TextButton( + key: selectorKey, + onPressed: _changeSelectorVisibility, + child: Padding( + padding: widget.buttonPadding, + child: Wrap( + alignment: WrapAlignment.center, + crossAxisAlignment: WrapCrossAlignment.center, + children: [ + if (widget.leading != null) + Padding( + padding: const EdgeInsets.only(right: BeamSpacing.medium), + child: widget.leading, + ), + widget.buttonText, + if (widget.showArrow) const Icon(Icons.keyboard_arrow_down), + ], + ), + ), + ), + ); + } + + OverlayEntry createDropdown() { + final dropdownOffset = findDropdownOffset( + alignment: widget.dropdownAlign, + key: selectorKey, + widgetWidth: widget.width, + ); + + final child = widget.createDropdown(_close); + + return OverlayEntry( + builder: (context) { + return Stack( + children: [ + GestureDetector( + onTap: _close, + child: Container( + color: Colors.transparent, + height: double.infinity, + width: double.infinity, + ), + ), + Positioned( + left: dropdownOffset.dx, + top: dropdownOffset.dy, + child: SlideTransition( + position: offsetAnimation, + child: Material( + elevation: BeamSizes.elevation, + borderRadius: BorderRadius.circular(BeamBorderRadius.medium), + child: Container( + height: widget.height, + width: widget.width, + decoration: BoxDecoration( + color: Theme.of(context).backgroundColor, + borderRadius: BorderRadius.circular( + BeamBorderRadius.medium, + ), + ), + child: child, + ), + ), + ), + ), + ], + ); + }, + ); + } + + void _close() { + animationController.reverse(); + dropdown?.remove(); + setState(() { + isOpen = false; + }); + } + + void _open() { + animationController.forward(); + dropdown = createDropdown(); + Overlay.of(context).insert(dropdown!); + setState(() { + isOpen = true; + }); + } + + void _changeSelectorVisibility() { + if (isOpen) { + _close(); + } else { + _open(); + } + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/feedback.dart b/playground/frontend/build/playground_components/lib/src/widgets/feedback.dart new file mode 100644 index 000000000000..62fd515dfad1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/feedback.dart @@ -0,0 +1,200 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../playground_components.dart'; +import '../assets/assets.gen.dart'; +import 'iframe/iframe.dart'; + +class FeedbackWidget extends StatelessWidget { + static const positiveRatingButtonKey = Key('positive'); + static const negativeRatingButtonKey = Key('negative'); + + final FeedbackController controller; + final String feedbackFormUrl; + final String title; + + const FeedbackWidget({ + required this.controller, + required this.feedbackFormUrl, + required this.title, + }); + + void _onRatingChanged(BuildContext context, FeedbackRating rating) { + controller.rating = rating; + + PlaygroundComponents.analyticsService.sendUnawaited( + AppRatedAnalyticsEvent( + rating: rating, + snippetContext: controller.eventSnippetContext, + additionalParams: controller.additionalParams, + ), + ); + + final closeNotifier = PublicNotifier(); + showOverlay( + context: context, + closeNotifier: closeNotifier, + positioned: Positioned( + bottom: 50, + left: 20, + child: OverlayBody( + child: FeedbackDropdown( + close: closeNotifier.notifyPublic, + controller: controller, + feedbackFormUrl: feedbackFormUrl, + rating: rating, + title: 'widgets.feedback.title'.tr(), + subtitle: 'widgets.feedback.hint'.tr(), + ), + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: controller, + builder: (context, child) => Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + title, + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(width: BeamSizes.size6), + Tooltip( + message: 'widgets.feedback.positive'.tr(), + child: InkWell( + key: positiveRatingButtonKey, + onTap: () { + _onRatingChanged(context, FeedbackRating.positive); + }, + child: _RatingIcon( + groupValue: controller.rating, + value: FeedbackRating.positive, + ), + ), + ), + const SizedBox(width: BeamSizes.size6), + Tooltip( + message: 'widgets.feedback.negative'.tr(), + child: InkWell( + key: negativeRatingButtonKey, + onTap: () { + _onRatingChanged(context, FeedbackRating.negative); + }, + child: _RatingIcon( + groupValue: controller.rating, + value: FeedbackRating.negative, + ), + ), + ), + ], + ), + ); + } +} + +class _RatingIcon extends StatelessWidget { + final FeedbackRating? groupValue; + final FeedbackRating value; + const _RatingIcon({ + required this.groupValue, + required this.value, + }); + + String _getAsset() { + final isSelected = value == groupValue; + switch (value) { + case FeedbackRating.positive: + return isSelected ? Assets.svg.thumbUpFilled : Assets.svg.thumbUp; + case FeedbackRating.negative: + return isSelected ? Assets.svg.thumbDownFilled : Assets.svg.thumbDown; + } + } + + @override + Widget build(BuildContext context) { + return SvgPicture.asset( + _getAsset(), + package: PlaygroundComponents.packageName, + ); + } +} + +class FeedbackDropdown extends StatelessWidget { + static const sendButtonKey = Key('sendFeedbackButtonKey'); + static const textFieldKey = Key('feedbackTextFieldKey'); + + final VoidCallback close; + final FeedbackController controller; + final String feedbackFormUrl; + final FeedbackRating rating; + final String title; + final String subtitle; + + const FeedbackDropdown({ + required this.close, + required this.controller, + required this.feedbackFormUrl, + required this.title, + required this.rating, + required this.subtitle, + }); + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: controller.textController, + builder: (context, child) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + ), + padding: const EdgeInsets.all(16), + width: 500, + height: MediaQuery.of(context).size.height - 100, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + title, + style: Theme.of(context).textTheme.headlineLarge, + ), + const SizedBox(height: BeamSizes.size6), + Text( + subtitle, + textAlign: TextAlign.center, + ), + const SizedBox(height: BeamSizes.size16), + Expanded( + child: IFrameWidget( + url: feedbackFormUrl, + viewType: 'feedbackGoogleForms', + ), + ), + ], + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/header_icon_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/header_icon_button.dart new file mode 100644 index 000000000000..01e4a62de1c8 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/header_icon_button.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; + +class HeaderIconButton extends StatelessWidget { + final VoidCallback onPressed; + final String label; + final Widget icon; + + const HeaderIconButton({ + super.key, + required this.onPressed, + required this.label, + required this.icon, + }); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: BeamSizes.headerButtonHeight, + child: TextButton.icon( + icon: icon, + label: Text(label), + onPressed: onPressed, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe.dart b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe.dart new file mode 100644 index 000000000000..7cf807b5d393 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe.dart @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export 'iframe_non_web.dart' if (dart.library.html) 'iframe_web.dart'; diff --git a/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_non_web.dart b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_non_web.dart new file mode 100644 index 000000000000..de8a60df74c0 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_non_web.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore: avoid_web_libraries_in_flutter + +import 'package:flutter/widgets.dart'; + +class IFrameWidget extends StatefulWidget { + final String url; + final String viewType; + + const IFrameWidget({ + required this.url, + required this.viewType, + }); + + @override + State createState() => _IFrameWidgetState(); +} + +class _IFrameWidgetState extends State { + @override + Widget build(BuildContext context) { + return ErrorWidget('This only works in web.'); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_web.dart b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_web.dart new file mode 100644 index 000000000000..ef26b8fd84c4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/iframe/iframe_web.dart @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore: avoid_web_libraries_in_flutter +import 'dart:html' as html; +import 'dart:ui' as ui; + +import 'package:flutter/material.dart'; + +class IFrameWidget extends StatefulWidget { + final String url; + final String viewType; + + const IFrameWidget({ + required this.url, + required this.viewType, + }); + + @override + State createState() => _IFrameWidgetState(); +} + +class _IFrameWidgetState extends State { + final _iFrameElement = html.IFrameElement(); + + @override + void initState() { + // ignore: unsafe_html + _iFrameElement.src = widget.url; + _iFrameElement.style.border = 'none'; + // ignore: undefined_prefixed_name, avoid_dynamic_calls + ui.platformViewRegistry.registerViewFactory( + widget.viewType, + (int viewId) => _iFrameElement, + ); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + return HtmlElementView( + viewType: widget.viewType, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/loading_error.dart b/playground/frontend/build/playground_components/lib/src/widgets/loading_error.dart new file mode 100644 index 000000000000..646c748907b6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/loading_error.dart @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/widgets.dart'; + +/// Shows a static "Error while loading" text. +class LoadingErrorWidget extends StatelessWidget { + const LoadingErrorWidget({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Center( + child: const Text('errors.loading').tr(), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/loading_indicator.dart b/playground/frontend/build/playground_components/lib/src/widgets/loading_indicator.dart new file mode 100644 index 000000000000..60b696ed880f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/loading_indicator.dart @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; + +class LoadingIndicator extends StatelessWidget { + final double size; + + const LoadingIndicator({ + super.key, + this.size = BeamSizes.loadingIndicator, + }); + + @override + Widget build(BuildContext context) { + return Center( + child: SizedBox( + height: size, + width: size, + child: CircularProgressIndicator( + color: Theme.of(context).primaryColor, + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/logo.dart b/playground/frontend/build/playground_components/lib/src/widgets/logo.dart new file mode 100644 index 000000000000..dd50f236e9e6 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/logo.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../assets/assets.gen.dart'; +import '../constants/sizes.dart'; +import '../playground_components.dart'; + +class BeamLogo extends StatelessWidget { + const BeamLogo(); + + @override + Widget build(BuildContext context) { + return Image.asset( + Assets.png.beamLogo.path, + height: BeamIconSizes.large, + package: PlaygroundComponents.packageName, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/canvas_drawer.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/canvas_drawer.dart new file mode 100644 index 000000000000..65a95919021e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/canvas_drawer.dart @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:ui'; +import 'dart:ui' as ui; + +import 'package:flutter/material.dart'; + +import '../../../../constants/colors.dart'; + +const kDashSize = 4; +const kArrowSize = 4; +const kDefaultFontSize = 10.0; + +class CanvasDrawer { + final Canvas canvas; + + CanvasDrawer(this.canvas); + + final borderPaint = Paint() + ..color = BeamGraphColors.border + ..strokeWidth = 1 + ..isAntiAlias = true + ..style = PaintingStyle.fill; + + final linePaint = Paint() + ..color = BeamGraphColors.edge + ..strokeWidth = 2 + ..isAntiAlias = true + ..style = PaintingStyle.fill; + + Paragraph createParagraph(String text, double width, + {double fontSize = kDefaultFontSize, Color color = Colors.white}) { + final textStyle = ui.TextStyle( + color: color, + fontSize: fontSize, + ); + final paragraphStyle = ParagraphStyle( + textDirection: TextDirection.ltr, + textAlign: TextAlign.center, + ); + final paragraphBuilder = ParagraphBuilder(paragraphStyle) + ..pushStyle(textStyle) + ..addText(text); + final constraints = ParagraphConstraints(width: width); + final paragraph = paragraphBuilder.build(); + paragraph.layout(constraints); + return paragraph; + } + + drawText(String text, double width, Offset offset) { + canvas.drawParagraph(createParagraph(text, width), offset); + } + + drawSecondaryText(String text, double width, Offset offset) { + canvas.drawParagraph( + createParagraph( + text, + width, + color: BeamGraphColors.node, + ), + offset, + ); + } + + drawLine(double x1, double y1, double x2, double y2) { + canvas.drawLine(Offset(x1, y1), Offset(x2, y2), linePaint); + } + + drawDashedLine(double x1, double y1, double x2, double y2) { + double startX = x1; + double startY = y1; + + while (startX < x2 || startY < y2) { + double endX = x1 == x2 ? x1 : startX + kDashSize; + double endY = y1 == y2 ? y1 : startY + kDashSize; + canvas.drawLine( + Offset(startX, startY), + Offset(endX, endY), + linePaint, + ); + + startX = x1 == x2 ? x1 : endX + kDashSize; + startY = y1 == y2 ? y1 : endY + kDashSize; + } + } + + drawCircle(double x1, double y1, double radius) { + canvas.drawCircle(Offset(x1, y1), radius, linePaint); + } + + drawRightArrow(double x1, double y1) { + final path = Path(); + path.moveTo(x1 - kArrowSize, y1 - kArrowSize); + path.lineTo(x1 + kArrowSize, y1); + path.lineTo(x1 - kArrowSize, y1 + kArrowSize); + path.lineTo(x1 - kArrowSize, y1 - kArrowSize); + canvas.drawPath(path, linePaint); + } + + drawBottomArrow(double x1, double y1) { + final path = Path(); + path.moveTo(x1 - kArrowSize, y1); + path.lineTo(x1, y1 + kArrowSize); + path.lineTo(x1 + kArrowSize, y1); + path.lineTo(x1 - kArrowSize, y1); + canvas.drawPath(path, linePaint); + } + + drawRect( + double left, + double top, + double width, + double height, + double radius, + ) { + final borderRadius = Radius.circular(radius); + final rect = Rect.fromLTWH(left, top, width, height); + final rRect = RRect.fromRectAndRadius(rect, borderRadius); + canvas.drawRRect(rRect, borderPaint); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/edge_extractor.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/edge_extractor.dart new file mode 100644 index 000000000000..27c62de3177b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/edge_extractor.dart @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/graph.dart'; +import 'extractors.dart'; + +final RegExp kEdgeRegExp = RegExp(r'''.+ -> .+'''); +const kPrimaryEdgeStyle = 'solid'; +const kEdgeSeparator = ' -> '; +const kStyleStart = '['; +const kStyleString = 'style'; + +class EdgeExtractor implements Extractor { + @override + Edge? extract(String line) { + final lineWithoutSpaces = line.trim(); + final styleStartIndex = lineWithoutSpaces.indexOf(kStyleStart); + final endOfEdges = + styleStartIndex > 0 ? styleStartIndex : lineWithoutSpaces.length; + var edgesString = lineWithoutSpaces.substring(0, endOfEdges); + if (edgesString.endsWith(';')) { + edgesString = edgesString.substring(0, edgesString.length - 1); + } + final edges = edgesString.split(kEdgeSeparator); + final isPrimary = lineWithoutSpaces.contains(kPrimaryEdgeStyle) || + !lineWithoutSpaces.contains(kStyleString); + return Edge( + startId: removeExtraSymbols(edges[0]), + endId: removeExtraSymbols(edges[1]), + isPrimary: isPrimary, + ); + } + + removeExtraSymbols(String name) { + final trimName = name.trim(); + if (trimName.isNotEmpty && trimName.startsWith('"')) { + return trimName.substring(1, trimName.length - 1); + } + return trimName; + } + + @override + bool check(String line) { + return kEdgeRegExp.hasMatch(line); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/element_extractor.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/element_extractor.dart new file mode 100644 index 000000000000..e4af2ec9bab9 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/element_extractor.dart @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '../../models/graph.dart'; +import 'extractor_utils.dart'; +import 'extractors.dart'; + +final RegExp kGraphElementRegExp = RegExp(r'''subgraph cluster_0'''); +final RegExp kSubgraphElementRegExp = RegExp(r'''subgraph cluster_\d+'''); +final RegExp kNodeElementRegExp = RegExp(r'''\d+\s\[label=".*"\]'''); + +final kElementsRegexps = [ + kGraphElementRegExp, + kSubgraphElementRegExp, + kNodeElementRegExp +]; + +class GraphElementExtractor implements Extractor { + @override + GraphElement? extract(String line) { + final lineWithoutSpaces = line.trim(); + if (kGraphElementRegExp.hasMatch(line)) { + final match = kGraphElementRegExp.firstMatch(line); + final start = match!.start; + final end = match.end; + return Graph(name: line.substring(start, end)); + } + if (kSubgraphElementRegExp.hasMatch(line)) { + final match = kSubgraphElementRegExp.firstMatch(line); + final start = match!.start; + final end = match.end; + return Subgraph(depth: getDepth(line), name: line.substring(start, end)); + } + if (kNodeElementRegExp.hasMatch(line)) { + final name = extractNodeId(lineWithoutSpaces); + final label = extractNodeLabel(lineWithoutSpaces); + return Node(depth: getDepth(line), label: label, name: name); + } + return null; + } + + @override + bool check(String line) { + return kElementsRegexps + .where((element) => element.hasMatch(line)) + .isNotEmpty; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractor_utils.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractor_utils.dart new file mode 100644 index 000000000000..98508a5f2e27 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractor_utils.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +int getDepth(String line) { + final diff = line.length - line.trimLeft().length; + return (diff / 4).floor(); +} + +String extractNodeId(String line) { + return line.substring(0, line.indexOf(' ')); +} + +String extractNodeLabel(String line) { + return line + .substring(line.indexOf(' ') + 1) + .replaceAll('[label="', '') + .replaceAll('"]', ''); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractors.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractors.dart new file mode 100644 index 000000000000..2a497a4f2414 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/extractors.dart @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +abstract class Extractor { + bool check(String line); + + T? extract(String line); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/label_extractor.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/label_extractor.dart new file mode 100644 index 000000000000..1c9ce981388e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/extractors/label_extractor.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'extractors.dart'; + +final RegExp kLabelRegExp = RegExp(r'''label = ".*"'''); +const kLabelStart = 'label = "'; + +class LabelExtractor implements Extractor { + @override + String? extract(String line) { + final lineWithoutSpace = line.trim(); + return lineWithoutSpace.substring( + kLabelStart.length, lineWithoutSpace.length - 1); + } + + @override + bool check(String line) { + return kLabelRegExp.matchAsPrefix(line.trim()) != null; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/graph_builder.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/graph_builder.dart new file mode 100644 index 000000000000..9549a76fa601 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/graph_builder.dart @@ -0,0 +1,258 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:convert'; + +import 'package:flutter/widgets.dart' as widgets; +import 'package:playground_components/playground_components.dart'; + +import '../models/graph.dart'; +import '../models/table_cell.dart'; +import 'extractors/edge_extractor.dart'; +import 'extractors/element_extractor.dart'; +import 'extractors/label_extractor.dart'; +import 'painters/edge_painter.dart'; +import 'painters/graph_painter.dart'; +import 'painters/node_painter.dart'; + +final kGraphElementExtractor = GraphElementExtractor(); +final kLabelExtractor = LabelExtractor(); +final kEdgeExtractor = EdgeExtractor(); + +abstract class GraphBuilder { + final List elements = []; + final List edges = []; + final Map elementsMap = {}; + + // TODO(alexeyinkin): Use this as the source of truth + // of whether a graph is available for an SDK, + // https://github.com/apache/beam/issues/23251 + static final _graphBuilderFactoriesBySdk = { + Sdk.java: JavaGraphBuilder.new, + Sdk.python: PythonGraphBuilder.new, + }; + + static GraphBuilder? parseDot(String dot, Sdk sdk) { + LineSplitter ls = const LineSplitter(); + List lines = ls.convert(dot); + final builder = _graphBuilderFactoriesBySdk[sdk]?.call(); + + if (builder == null) { + return null; + } + + for (var line in lines) { + builder.parseNextLine(line); + } + builder.finish(); + return builder; + } + + void parseNextLine(String line); + + GraphPainter getPainter(widgets.Axis direction) { + final List nodeElements = elements + .where((element) => element.type == NodeType.node) + .toList() + .cast(); + // nodes without incoming edges + final List startNodes = + nodeElements.where((element) => element.inEdges.isEmpty).toList(); + + final List nodesInTopologicalOrder = + sortElementsInTopologicalOrder(startNodes); + + final Map nodeToColumnsMap = determineNodesColumns( + nodeElements, startNodes, nodesInTopologicalOrder); + final Map> nodeToCellMap = getNodeToCellMap( + nodesInTopologicalOrder, + nodeToColumnsMap, + ); + + return GraphPainter( + direction: direction, + elementsPainter: elements + .where((element) => element.type == NodeType.node) + .map((element) { + final cell = nodeToCellMap[element.name]!; + final row = + direction == widgets.Axis.horizontal ? cell.row : cell.column; + final column = + direction == widgets.Axis.horizontal ? cell.column : cell.row; + return NodeElementPainter( + element: element as Node, + row: row, + column: column, + ); + }).toList(), + edges: edges.map((e) => EdgePainter(e)).toList(), + ); + } + + /// Use Kahn's algorithm to sort elements in topological order + sortElementsInTopologicalOrder(List startNodes) { + final List startNodesCopy = [...startNodes]; + final List topologicalOrder = []; + final Set visitedEdges = {}; + while (startNodesCopy.isNotEmpty) { + final currentNode = startNodesCopy.removeAt(0); + topologicalOrder.add(currentNode); + for (var edge in currentNode.outEdges) { + final edgeNode = elementsMap[edge.endId] as Node; + visitedEdges.add(edge); + final hasInEdges = + edgeNode.inEdges.where((e) => !visitedEdges.contains(e)).isNotEmpty; + if (!hasInEdges) { + startNodesCopy.add(edgeNode); + } + } + } + return topologicalOrder; + } + + Map determineNodesColumns(List nodeElements, + List startNodes, List nodesInTopologicalOrder) { + final Map nodeToColumnsMap = {}; + for (var element in nodeElements) { + nodeToColumnsMap[element.name] = -1; + } + nodeToColumnsMap[nodesInTopologicalOrder.first.name] = 0; + final nodeInTopologicalOrderCopy = [...nodesInTopologicalOrder]; + while (nodeInTopologicalOrderCopy.isNotEmpty) { + Node node = nodeInTopologicalOrderCopy.removeAt(0); + // Update distances of all adjacent vertices ; + if (nodeToColumnsMap[node.name] != -1) { + for (var edge in node.outEdges) { + if (nodeToColumnsMap[edge.endId]! < + nodeToColumnsMap[edge.startId]! + 1) { + nodeToColumnsMap[edge.endId] = nodeToColumnsMap[edge.startId]! + 1; + } + } + } + } + for (var element in nodeElements) { + final column = nodeToColumnsMap[element.name]!; + if (column < 0) { + nodeToColumnsMap[element.name] = 0; + } + } + return nodeToColumnsMap; + } + + Map> getNodeToCellMap( + List nodesInTopologicalOrder, Map nodeToColumnsMap) { + final Map> nodeToCellMap = {}; + final Map rowToColumn = {}; + + for (var node in nodesInTopologicalOrder) { + final column = nodeToColumnsMap[node.name]!; + final row = (rowToColumn[column] ?? -1) + 1; + rowToColumn[column] = row; + nodeToCellMap[node.name] = TableCell(row: row, column: column); + } + return nodeToCellMap; + } + + void finish() { + for (var edge in edges) { + (elementsMap[edge.startId] as Node).outEdges.add(edge); + (elementsMap[edge.endId] as Node).inEdges.add(edge); + } + } +} + +class JavaGraphBuilder extends GraphBuilder { + final List parentElements = []; + GraphElement? lastElement; + + @override + void parseNextLine(String line) { + try { + if (kGraphElementExtractor.check(line)) { + final element = kGraphElementExtractor.extract(line); + if (element == null) { + return; + } + elements.add(element); + setParent(element); + if (element.type != NodeType.node) { + parentElements.add(element); + lastElement = element; + } + elementsMap[element.name] = element; + } else if (kLabelExtractor.check(line)) { + final label = kLabelExtractor.extract(line); + lastElement?.label = label ?? ''; + } else if (kEdgeExtractor.check(line)) { + final edge = kEdgeExtractor.extract(line); + if (edge != null) { + edges.add(edge); + } + } + } catch (e) { + print(e); + } + } + + setParent(GraphElement element) { + final lastParent = parentElements.isNotEmpty ? parentElements.last : null; + if (lastParent != null) { + if (lastParent.depth >= element.depth) { + while (parentElements.isNotEmpty && + parentElements.last.depth >= element.depth) { + parentElements.removeLast(); + } + } + final prevParent = parentElements.isNotEmpty ? parentElements.last : null; + element.parent = prevParent; + prevParent?.child.add(element); + } + } +} + +const kPythonDefaultCollectionLabel = 'pcoll'; +const kPythonCollectionLabel = 'PCollection'; + +class PythonGraphBuilder extends GraphBuilder { + @override + void parseNextLine(String line) { + if (kEdgeExtractor.check(line)) { + final edge = kEdgeExtractor.extract(line); + if (edge != null) { + createNodes(edge); + edges.add(edge); + } + } + } + + createNodes(Edge edge) { + createNodeIfNotExists(edge.startId); + createNodeIfNotExists(edge.endId); + } + + createNodeIfNotExists(String name) { + if (elementsMap[name] != null) { + return; + } + final label = name.replaceFirst( + kPythonDefaultCollectionLabel, kPythonCollectionLabel); + Node node = Node(label: label, depth: 1, name: name); + elementsMap[name] = node; + elements.add(node); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/edge_painter.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/edge_painter.dart new file mode 100644 index 000000000000..93a3d15d9108 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/edge_painter.dart @@ -0,0 +1,196 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; +import 'package:collection/collection.dart'; +import 'package:flutter/widgets.dart'; + +import '../../../../../constants/sizes.dart'; +import '../../models/graph.dart'; +import '../canvas_drawer.dart'; +import 'node_painter.dart'; + +const kEdgeSpacing = 2 * BeamSizes.size16; + +class EdgePainter { + final Edge edge; + + EdgePainter(this.edge); + + void paint( + CanvasDrawer drawer, + Map elementsMap, + Map rowStarts, + Map columnStarts, + Map rowSizes, + Map columnSizes, + Axis direction, + ) { + if (direction == Axis.vertical) { + _drawVertical( + drawer, elementsMap, rowStarts, columnStarts, rowSizes, columnSizes); + } else { + _drawHorizontal( + drawer, elementsMap, rowStarts, columnStarts, rowSizes, columnSizes); + } + } + + _drawHorizontal( + CanvasDrawer drawer, + Map elementsMap, + Map rowStarts, + Map columnStarts, + Map rowSizes, + Map columnSizes, + ) { + final startNode = elementsMap[edge.startId]!; + final endNode = elementsMap[edge.endId]!; + final startColumn = startNode.column; + final endColumn = endNode.column; + final endRow = endNode.row; + + final List> movePoints = []; + + var x = startNode.left! + startNode.size!.width; + var y = startNode.top! + startNode.size!.height / 2; + drawer.drawCircle(x, y, 4.0); + movePoints.add(Point(x, y)); + // 1. Go to the closest border (right) + x = columnStarts[startColumn]! + columnSizes[startColumn]! + kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 2. Go to the correct row + y = rowStarts[endRow]! + rowSizes[endRow]! + kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 3. Go to the correct column + x = columnStarts[endColumn]! - kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 4. Go to the middle of the row + y = rowStarts[endRow]! + rowSizes[endRow]! / 2; + movePoints.add(Point(x, y)); + + // 5. Go to the element + x = columnStarts[endColumn]!; + movePoints.add(Point(x, y)); + drawer.drawCircle(x, y, 4.0); + + List> optimizedMovePoints = []; + + movePoints.forEachIndexed((index, element) { + if (index == 0 || index == movePoints.length - 1) { + optimizedMovePoints.add(element); + return; + } + if (movePoints[index - 1].x == movePoints[index].x && + movePoints[index].x == movePoints[index + 1].x) { + return; + } + if (movePoints[index - 1].y == movePoints[index].y && + movePoints[index].y == movePoints[index + 1].y) { + return; + } + optimizedMovePoints.add(element); + }); + + drawer.drawRightArrow( + optimizedMovePoints[0].x + BeamSizes.size16, optimizedMovePoints[0].y); + + _drawLine(drawer, optimizedMovePoints); + } + + _drawVertical( + CanvasDrawer drawer, + Map elementsMap, + Map rowStarts, + Map columnStarts, + Map rowSizes, + Map columnSizes, + ) { + final startNode = elementsMap[edge.startId]!; + final endNode = elementsMap[edge.endId]!; + final startRow = startNode.row; + final endColumn = endNode.column; + final endRow = endNode.row; + + final List> movePoints = []; + + var x = startNode.left! + startNode.size!.width / 2; + var y = startNode.top! + rowSizes[startRow]!; + drawer.drawCircle(x, y, 4.0); + movePoints.add(Point(x, y)); + // 1. Go to the closest border (bottom) + y = rowStarts[startRow]! + rowSizes[startRow]! + kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 2. Go to the correct column + x = columnStarts[endColumn]! + columnSizes[endColumn]! + kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 3. Go to the correct row + y = rowStarts[endRow]! - kEdgeSpacing; + movePoints.add(Point(x, y)); + + // 4. Go to the middle of the column + x = columnStarts[endColumn]! + endNode.size!.width / 2; + movePoints.add(Point(x, y)); + + // 5. Go to the element + y = rowStarts[endRow]!; + movePoints.add(Point(x, y)); + drawer.drawCircle(x, y, 4.0); + + List> optimizedMovePoints = []; + + movePoints.forEachIndexed((index, element) { + if (index == 0 || index == movePoints.length - 1) { + optimizedMovePoints.add(element); + return; + } + if (movePoints[index - 1].x == movePoints[index].x && + movePoints[index].x == movePoints[index + 1].x) { + return; + } + if (movePoints[index - 1].y == movePoints[index].y && + movePoints[index].y == movePoints[index + 1].y) { + return; + } + optimizedMovePoints.add(element); + }); + + drawer.drawBottomArrow( + optimizedMovePoints[0].x, optimizedMovePoints[0].y + BeamSizes.size16); + + _drawLine(drawer, optimizedMovePoints); + } + + _drawLine(CanvasDrawer drawer, List> points) { + points.forEachIndexed((index, point) { + if (index == 0) { + return; + } + final prevPoint = points[index - 1]; + if (edge.isPrimary) { + drawer.drawLine(prevPoint.x, prevPoint.y, point.x, point.y); + } else { + drawer.drawDashedLine(prevPoint.x, prevPoint.y, point.x, point.y); + } + }); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/graph_painter.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/graph_painter.dart new file mode 100644 index 000000000000..8c2c4c356c02 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/graph_painter.dart @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:flutter/material.dart'; + +import '../../../../../constants/sizes.dart'; +import '../../models/graph.dart'; +import '../canvas_drawer.dart'; +import 'edge_painter.dart'; +import 'node_painter.dart'; + +class GraphPainter { + final List elementsPainter; + final List edges; + final Axis direction; + final Map elementsMap = {}; + final Map rowSizes = {}; + final Map columnSizes = {}; + final Map rowStarts = {}; + final Map columnStarts = {}; + + getSize() { + final lastColumn = columnStarts.length - 1; + final lastRow = rowStarts.length - 1; + final width = + columnStarts[lastColumn]! + columnSizes[lastColumn]! + 4 * BeamSizes.size16; + final height = rowStarts[lastRow]! + rowSizes[lastRow]! + 4 * BeamSizes.size16; + return Size(width, height); + } + + GraphPainter({ + required this.elementsPainter, + required this.edges, + required this.direction, + }) { + for (var element in elementsPainter) { + elementsMap[element.element.name] = element; + } + elementsPainter + .where((painter) => painter.element.type == NodeType.node) + .cast() + .forEach((painter) { + final currentRowSize = rowSizes[painter.row] ?? 0.0; + final elementHeight = + painter.calculateSize(elementsMap, null, null).height; + rowSizes[painter.row] = max(currentRowSize, elementHeight); + final elementWidth = painter.calculateSize(elementsMap, null, null).width; + final currentColumnSize = columnSizes[painter.column] ?? 0.0; + columnSizes[painter.column] = max(currentColumnSize, elementWidth); + }); + var left = 0.0; + var top = 0.0; + for (var r = 0; r < rowSizes.length; r++) { + rowStarts[r] = top; + top = top + rowSizes[r]! + 4 * BeamSizes.size16; + } + for (var c = 0; c < columnSizes.length; c++) { + columnStarts[c] = left; + left = left + columnSizes[c]! + 4 * BeamSizes.size16; + } + } + + paint(CanvasDrawer drawer) { + elementsPainter + .where((painter) => painter.element.type == NodeType.node) + .cast() + .forEach((element) { + element.paint(drawer, rowStarts, columnStarts); + }); + for (var element in edges) { + element.paint( + drawer, + elementsMap, + rowStarts, + columnStarts, + rowSizes, + columnSizes, + direction, + ); + } + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/node_painter.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/node_painter.dart new file mode 100644 index 000000000000..f0b78632d99a --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/graph_builder/painters/node_painter.dart @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:flutter/material.dart'; + +import '../../../../../constants/sizes.dart'; +import '../../models/graph.dart'; +import '../canvas_drawer.dart'; + +class NodeElementPainter { + int row; + int column; + final Node element; + Size? size; + double? left; + double? top; + + NodeElementPainter( + {required this.element, required this.row, required this.column}); + + void paint( + CanvasDrawer drawer, + Map rowStarts, + Map columnStarts, + ) { + final rowNum = row; + final columnNum = column; + left = columnStarts[columnNum]; + top = rowStarts[rowNum]; + drawer.drawRect(left!, top!, size!.width, size!.height, size!.height * 0.2); + if (parentLabel.isNotEmpty) { + drawer.drawText( + parentLabel, + maxTextWidth, + Offset(left! + BeamSizes.size16, top! + BeamSizes.size12), + ); + drawer.drawSecondaryText( + element.label, + maxTextWidth, + Offset(left! + BeamSizes.size16, top! + BeamSizes.size12 + BeamSizes.size8 + 10.0), + ); + } else { + drawer.drawText( + element.label, + maxTextWidth, + Offset(left! + BeamSizes.size16, top! + (56 / 2 - 5)), + ); + } + } + + String get parentLabel { + return element.parent?.label ?? ''; + } + + Size calculateSize( + Map elementsMap, + Map? rowSizes, + Map? columnSizes, + ) { + if (size != null) { + return size!; + } + final fullWidth = maxTextWidth + BeamSizes.size16 * 2; + size = Size(fullWidth, BeamSizes.size12 * 2 + BeamSizes.size8 + 10.0 * 2); + return size!; + } + + double get maxTextWidth { + var textWidth = getTextSize(element.label, 10.0).width; + if (parentLabel.isNotEmpty) { + final parentLabelSize = getTextSize(parentLabel, 10.0).width; + return max(parentLabelSize, textWidth); + } + return textWidth; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/graph.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/graph.dart new file mode 100644 index 000000000000..150228efd43c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/graph.dart @@ -0,0 +1,121 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +enum NodeType { + graph, + subgraph, + node, +} + +Size getTextSize(String text, double fontSize) { + final TextPainter textPainter = TextPainter( + text: TextSpan(text: text, style: TextStyle(fontSize: fontSize)), + maxLines: 1, + textDirection: TextDirection.ltr, + )..layout(minWidth: 0, maxWidth: double.infinity); + return textPainter.size; +} + +class GraphElement { + String label; + String name; + final int depth; + final NodeType type; + GraphElement? parent; + final List child = []; + + GraphElement({ + required this.type, + required this.depth, + required this.name, + this.label = '', + this.parent, + }); +} + +class Graph extends GraphElement { + Graph({ + String label = '', + String name = '', + GraphElement? parent, + }) : super( + label: label, + parent: parent, + name: name, + type: NodeType.graph, + depth: 0, + ); +} + +class Subgraph extends GraphElement { + Subgraph({ + required int depth, + String label = '', + String name = '', + GraphElement? parent, + }) : super( + label: label, + parent: parent, + name: name, + type: NodeType.subgraph, + depth: depth, + ); +} + +class Edge { + final String startId; + final String endId; + final bool isPrimary; + + Edge({ + required this.startId, + required this.endId, + required this.isPrimary, + }); + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Edge && + runtimeType == other.runtimeType && + startId == other.startId && + endId == other.endId; + + @override + int get hashCode => startId.hashCode ^ endId.hashCode; +} + +class Node extends GraphElement { + final List inEdges = []; + final List outEdges = []; + + Node({ + String label = '', + required int depth, + GraphElement? parent, + String name = '', + }) : super( + label: label, + parent: parent, + name: name, + type: NodeType.node, + depth: depth, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/table_cell.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/table_cell.dart new file mode 100644 index 000000000000..024c59365114 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/models/table_cell.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class TableCell { + final T row; + final T column; + + TableCell({required this.row, required this.column}); + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TableCell && + runtimeType == other.runtimeType && + row == other.row && + column == other.column; + + @override + int get hashCode => row.hashCode ^ column.hashCode; +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph/painter.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/painter.dart new file mode 100644 index 000000000000..f612153c5901 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph/painter.dart @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import 'graph_builder/canvas_drawer.dart'; +import 'graph_builder/painters/graph_painter.dart'; + +class GraphCustomPainter extends CustomPainter { + final GraphPainter graph; + + GraphCustomPainter({required this.graph}); + + @override + void paint(Canvas canvas, Size size) { + graph.paint(CanvasDrawer(canvas)); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return true; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab.dart new file mode 100644 index 000000000000..3edac92d0b77 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab.dart @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../controllers/playground_controller.dart'; +import '../../enums/unread_entry.dart'; +import '../unread/builder.dart'; +import 'output_tab.dart'; + +class GraphTab extends StatelessWidget { + const GraphTab({ + required this.playgroundController, + }); + + final PlaygroundController playgroundController; + + @override + Widget build(BuildContext context) { + return UnreadBuilder( + controller: playgroundController.codeRunner.unreadController, + unreadKey: UnreadEntryEnum.graph, + builder: (context, isUnread) { + return OutputTab( + isUnread: isUnread, + title: 'widgets.output.graph'.tr(), + ); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab_content.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab_content.dart new file mode 100644 index 000000000000..8a3f095b368d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/graph_tab_content.dart @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/playground_controller.dart'; +import '../../enums/unread_entry.dart'; +import '../scroll_2d.dart'; +import '../unread/clearer.dart'; +import 'graph/graph_builder/graph_builder.dart'; +import 'graph/graph_builder/painters/graph_painter.dart'; +import 'graph/painter.dart'; + +class GraphTabContent extends StatefulWidget { + const GraphTabContent({ + super.key, + required this.direction, + required this.playgroundController, + }); + + final Axis direction; + final PlaygroundController playgroundController; + + @override + State createState() => _GraphTabContentState(); +} + +class _GraphTabContentState extends State { + GraphPainter? _graphPainter; + String _lastGraph = ''; + + @override + void initState() { + super.initState(); + widget.playgroundController.addListener(_updateGraphPainterIfNeed); + _updateGraphPainter(); + } + + void _updateGraphPainterIfNeed() { + final graph = widget.playgroundController.codeRunner.result?.graph ?? ''; + if (graph == _lastGraph) { + return; + } + + _updateGraphPainter(); + } + + void _updateGraphPainter() { + final codeRunner = widget.playgroundController.codeRunner; + final result = codeRunner.result; + final graph = result?.graph ?? ''; + final sdk = result?.sdk; + + _lastGraph = graph; + _graphPainter = graph.isEmpty || sdk == null + ? null + : GraphBuilder.parseDot(graph, sdk)?.getPainter(widget.direction); + } + + @override + void dispose() { + widget.playgroundController.removeListener(_updateGraphPainterIfNeed); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final graphPainter = _graphPainter; + if (graphPainter == null) { + return Container(); + } + + return UnreadClearer( + controller: widget.playgroundController.codeRunner.unreadController, + unreadKey: UnreadEntryEnum.graph, + child: AnimatedBuilder( + animation: widget.playgroundController.codeRunner, + builder: (context, child) => Padding( + padding: const EdgeInsets.all(BeamSizes.size16), + child: Scroll2DWidget( + child: ClipRRect( + child: CustomPaint( + painter: GraphCustomPainter(graph: graphPainter), + size: graphPainter.getSize(), + ), + ), + ), + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/output.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/output.dart new file mode 100644 index 000000000000..e7ae35a74416 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/output.dart @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:keyed_collection_widgets/keyed_collection_widgets.dart'; + +import '../../controllers/playground_controller.dart'; +import '../../enums/output_tab.dart'; +import '../tabs/tab_bar.dart'; +import 'graph_tab.dart'; +import 'graph_tab_content.dart'; +import 'result_tab.dart'; +import 'result_tab_content.dart'; + +class OutputWidget extends StatelessWidget { + final PlaygroundController playgroundController; + final Widget? trailing; + final Axis graphDirection; + + const OutputWidget({ + required this.playgroundController, + required this.graphDirection, + this.trailing, + }); + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: playgroundController, + builder: (context, child) { + final keys = [...OutputTabEnum.values]; + + if (!playgroundController.graphAvailable) { + keys.remove(OutputTabEnum.graph); + } + + return DefaultKeyedTabController.fromKeys( + keys: keys, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: BeamTabBar( + hasPadding: true, + tabs: UnmodifiableOutputTabEnumMap( + result: ResultTab( + playgroundController: playgroundController, + ), + graph: GraphTab( + playgroundController: playgroundController, + ), + ), + ), + ), + if (trailing != null) trailing!, + ], + ), + Expanded( + child: KeyedTabBarView.withDefaultController( + children: UnmodifiableOutputTabEnumMap( + result: ResultTabContent( + playgroundController: playgroundController, + ), + graph: GraphTabContent( + direction: graphDirection, + playgroundController: playgroundController, + ), + ), + ), + ), + ], + ), + ); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/output_tab.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/output_tab.dart new file mode 100644 index 000000000000..1dc3ab1d565d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/output_tab.dart @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import '../unread/marker.dart'; + +const _horizontalPadding = BeamSizes.size8; + +class OutputTab extends StatelessWidget { + const OutputTab({ + required this.isUnread, + required this.title, + this.trailing, + }); + + final bool isUnread; + final String title; + final Widget? trailing; + + @override + Widget build(BuildContext context) { + return Tab( + child: Wrap( + alignment: WrapAlignment.center, + spacing: BeamSizes.size8, + children: [ + const SizedBox(width: _horizontalPadding), + Text(title), + if (trailing != null) trailing!, + SizedBox( + width: _horizontalPadding, + child: AnimatedSwitcher( + duration: const Duration(milliseconds: 500), + child: isUnread + ? const UnreadMarkerWidget() + : const Opacity(opacity: 0, child: UnreadMarkerWidget()), + ), + ), + ], + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_bubble.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_bubble.dart new file mode 100644 index 000000000000..68c557d5b19b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_bubble.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../enums/result_filter.dart'; +import '../bubble.dart'; + +class ResultFilterBubble extends StatelessWidget { + final ResultFilterEnum groupValue; + final ValueChanged onChanged; + final String title; + final ResultFilterEnum value; + + const ResultFilterBubble({ + super.key, + required this.groupValue, + required this.onChanged, + required this.title, + required this.value, + }); + + @override + Widget build(BuildContext context) { + final isSelected = value == groupValue; + + return BubbleWidget( + isSelected: isSelected, + onTap: () { + if (!isSelected) { + onChanged(value); + } + }, + title: title, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_button.dart new file mode 100644 index 000000000000..5ac2e9e5559f --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_button.dart @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:aligned_dialog/aligned_dialog.dart'; +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/playground_controller.dart'; +import 'result_filter_popover.dart'; + +class ResultFilterButton extends StatelessWidget { + const ResultFilterButton({ + required this.playgroundController, + }); + + final PlaygroundController playgroundController; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + unawaited( + showAlignedDialog( + context: context, + builder: (dialogContext) => ResultFilterPopover( + playgroundController: playgroundController, + ), + followerAnchor: Alignment.topLeft, + targetAnchor: Alignment.topLeft, + barrierColor: Colors.transparent, + ), + ); + }, + child: Icon( + Icons.filter_alt_outlined, + size: BeamIconSizes.small, + color: Theme.of(context).primaryColor, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_popover.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_popover.dart new file mode 100644 index 000000000000..51948aac622c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/result_filter_popover.dart @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/playground_controller.dart'; +import '../../enums/result_filter.dart'; +import 'result_filter_bubble.dart'; + +const kPopoverWidth = 240.0; +const kPopoverPadding = 50.0; + +class ResultFilterPopover extends StatelessWidget { + final PlaygroundController playgroundController; + + const ResultFilterPopover({ + required this.playgroundController, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(top: kPopoverPadding), + child: SizedBox( + width: kPopoverWidth, + child: Card( + child: Padding( + padding: const EdgeInsets.all(BeamSizes.size8), + child: Wrap( + runSpacing: BeamSizes.size8, + children: [ + const Text('widgets.output.filterTitle').tr(), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: BeamSizes.size4, + vertical: BeamSizes.size4, + ), + child: AnimatedBuilder( + animation: playgroundController.resultFilterController, + builder: (context, child) { + final groupValue = playgroundController + .resultFilterController.value; + + return Row( + children: [ + for (final value in ResultFilterEnum.values) + ResultFilterBubble( + groupValue: groupValue, + onChanged: playgroundController + .resultFilterController.setValue, + title: 'widgets.output.filter.${value.name}'.tr(), + value: value, + ), + ], + ); + }, + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab.dart new file mode 100644 index 000000000000..e27f09968966 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../controllers/playground_controller.dart'; +import '../../enums/unread_entry.dart'; +import '../unread/builder.dart'; +import 'output_tab.dart'; +import 'result_filter_button.dart'; + +class ResultTab extends StatelessWidget { + const ResultTab({ + required this.playgroundController, + }); + + final PlaygroundController playgroundController; + + @override + Widget build(BuildContext context) { + return UnreadBuilder( + controller: playgroundController.codeRunner.unreadController, + unreadKey: UnreadEntryEnum.result, + builder: (context, isUnread) => OutputTab( + isUnread: isUnread, + title: 'widgets.output.result'.tr(), + trailing: ResultFilterButton( + playgroundController: playgroundController, + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab_content.dart b/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab_content.dart new file mode 100644 index 000000000000..dbcd5d1ddb79 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/output/result_tab_content.dart @@ -0,0 +1,143 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/playground_controller.dart'; +import '../../enums/result_filter.dart'; +import '../../enums/unread_entry.dart'; +import '../../theme/theme.dart'; +import '../unread/clearer.dart'; + +// TODO(alexeyinkin): Show the full text when fixed: https://github.com/flutter/flutter/issues/128575 +const _maxFirstCharacters = 1000; +const _maxLastCharacters = 10000; +const _cutTemplate = 'Showing the first $_maxFirstCharacters ' + 'and the last $_maxLastCharacters characters:\n'; + +class ResultTabContent extends StatefulWidget { + const ResultTabContent({ + required this.playgroundController, + }); + + final PlaygroundController playgroundController; + + @override + State createState() => _ResultTabContentState(); +} + +class _ResultTabContentState extends State { + final ScrollController _scrollController = ScrollController(); + final CodeController _codeController = CodeController( + readOnly: true, + ); + + @override + void initState() { + super.initState(); + widget.playgroundController.codeRunner.addListener(_updateText); + widget.playgroundController.resultFilterController.addListener( + _updateText, + ); + _updateText(); + } + + void _updateText() { + _codeController.fullText = _getText(); + } + + @override + void dispose() { + _codeController.dispose(); + widget.playgroundController.resultFilterController.removeListener( + _updateText, + ); + widget.playgroundController.codeRunner.removeListener(_updateText); + super.dispose(); + } + + String _getText() { + final fullText = _getFullText(); + + if (fullText.length <= _maxFirstCharacters + _maxLastCharacters) { + return fullText; + } + + // ignore: prefer_interpolation_to_compose_strings + return _cutTemplate + + fullText.substring(0, _maxFirstCharacters) + + '\n\n...\n\n' + + fullText.substring(fullText.length - _maxLastCharacters); + } + + String _getFullText() { + final filter = widget.playgroundController.resultFilterController.value; + + switch (filter) { + case ResultFilterEnum.log: + return widget.playgroundController.codeRunner.resultLog; + case ResultFilterEnum.output: + return widget.playgroundController.codeRunner.resultOutput; + case ResultFilterEnum.all: + return widget.playgroundController.codeRunner.resultLogOutput; + } + } + + @override + Widget build(BuildContext context) { + final ext = Theme.of(context).extension()!; + + return UnreadClearer( + controller: widget.playgroundController.codeRunner.unreadController, + unreadKey: UnreadEntryEnum.result, + child: ColoredBox( + // TODO(alexeyinkin): Migrate to Material 3: https://github.com/apache/beam/issues/24610 + color: Theme.of(context).backgroundColor, + child: AnimatedBuilder( + animation: widget.playgroundController.codeRunner, + builder: (context, child) => SingleChildScrollView( + controller: _scrollController, + child: Scrollbar( + thumbVisibility: true, + trackVisibility: true, + controller: _scrollController, + child: Padding( + padding: const EdgeInsets.all(BeamSizes.size16), + child: AnimatedBuilder( + animation: widget.playgroundController.resultFilterController, + builder: (context, child) { + return CodeTheme( + data: ext.codeTheme, + child: CodeField( + controller: _codeController, + gutterStyle: GutterStyle.none, + textStyle: ext.codeRootStyle, + ), + ); + }, + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/overlay/body.dart b/playground/frontend/build/playground_components/lib/src/widgets/overlay/body.dart new file mode 100644 index 000000000000..5a45c0bcd304 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/overlay/body.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; + +class OverlayBody extends StatelessWidget { + final Widget child; + + const OverlayBody({required this.child}); + + @override + Widget build(BuildContext context) { + return Material( + elevation: BeamSizes.size10, + borderRadius: BorderRadius.circular(BeamSizes.size10), + child: child, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/overlay/opener.dart b/playground/frontend/build/playground_components/lib/src/widgets/overlay/opener.dart new file mode 100644 index 000000000000..a7910261ae90 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/overlay/opener.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../controllers/public_notifier.dart'; +import 'widget.dart'; + +void showOverlay({ + required BuildContext context, + required PublicNotifier closeNotifier, + required Positioned positioned, + bool barrierDismissible = true, +}) { + final overlay = OverlayEntry( + builder: (context) { + return BeamOverlay( + close: closeNotifier.notifyPublic, + isDismissible: barrierDismissible, + child: positioned, + ); + }, + ); + closeNotifier.addListener(overlay.remove); + Overlay.of(context).insert(overlay); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/overlay/widget.dart b/playground/frontend/build/playground_components/lib/src/widgets/overlay/widget.dart new file mode 100644 index 000000000000..b4af931aed5b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/overlay/widget.dart @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +class BeamOverlay extends StatelessWidget { + static const dismissibleAreaKey = Key('overlayDismissibleAreaKey'); + + final VoidCallback close; + final bool isDismissible; + final Positioned child; + + const BeamOverlay({ + required this.close, + required this.isDismissible, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + if (isDismissible) + Positioned.fill( + child: GestureDetector( + key: dismissibleAreaKey, + onTap: close, + ), + ), + child, + ], + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/periodic_builder.dart b/playground/frontend/build/playground_components/lib/src/widgets/periodic_builder.dart new file mode 100644 index 000000000000..aed7d8c21b8e --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/periodic_builder.dart @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; + +class PeriodicBuilderWidget extends StatefulWidget { + final Duration interval; + final ValueGetter builder; + + const PeriodicBuilderWidget({ + super.key, + required this.interval, + required this.builder, + }); + + @override + State createState() => _PeriodicBuilderWidgetState(); +} + +class _PeriodicBuilderWidgetState extends State { + late Timer _timer; + + @override + void initState() { + super.initState(); + _timer = Timer.periodic( + widget.interval, + (_) { + setState(() {}); + }, + ); + } + + @override + void dispose() { + super.dispose(); + _timer.cancel(); + } + + @override + Widget build(BuildContext context) { + return widget.builder(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_controller.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_controller.dart new file mode 100644 index 000000000000..21c590704650 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_controller.dart @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +class PipelineOptionController { + final TextEditingController nameController = TextEditingController(); + final TextEditingController valueController = TextEditingController(); + + PipelineOptionController({String name = '', String value = ''}) { + nameController.text = name; + valueController.text = value; + } + + void dispose() { + nameController.dispose(); + valueController.dispose(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_label.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_label.dart new file mode 100644 index 000000000000..ad2c8eb32a00 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_option_label.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +class PipelineOptionLabel extends StatelessWidget { + final String text; + + const PipelineOptionLabel({super.key, required this.text}); + + @override + Widget build(BuildContext context) { + return Text( + text, + style: Theme.of(context).textTheme.labelLarge, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown.dart new file mode 100644 index 000000000000..9f67effbdda5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../dropdown_button/dropdown_button.dart'; +import 'pipeline_options_dropdown_body.dart'; + +const kDropdownWidth = 400.0; +const kDropdownHeight = 375.0; + +class PipelineOptionsDropdown extends StatelessWidget { + final String pipelineOptions; + final void Function(String) setPipelineOptions; + + const PipelineOptionsDropdown({ + super.key, + required this.pipelineOptions, + required this.setPipelineOptions, + }); + + @override + Widget build(BuildContext context) { + return AppDropdownButton( + buttonText: Text('widgets.pipelineOptions.pipelineOptions'.tr()), + height: kDropdownHeight, + width: kDropdownWidth, + createDropdown: (close) => PipelineOptionsDropdownBody( + pipelineOptions: pipelineOptions, + setPipelineOptions: setPipelineOptions, + close: close, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_body.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_body.dart new file mode 100644 index 000000000000..6706205b0ff4 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_body.dart @@ -0,0 +1,243 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../../playground_components.dart'; +import 'pipeline_option_controller.dart'; +import 'pipeline_options_form.dart'; + +const kOptionsTabIndex = 0; +const kRawTabIndex = 1; + +class PipelineOptionsDropdownBody extends StatefulWidget { + static const optionsTabKey = ValueKey('PipelineOptionsOptionsTab'); + static const rawTabKey = ValueKey('PipelineOptionsRawTab'); + + static const saveAndCloseButtonKey = ValueKey('PipelineOptionsSaveAndClose'); + static const addOptionButtonKey = ValueKey('PipelineOptionsAddOption'); + + final String pipelineOptions; + final void Function(String) setPipelineOptions; + final void Function() close; + + PipelineOptionsDropdownBody({ + required this.pipelineOptions, + required this.setPipelineOptions, + required this.close, + }) : super(key: ValueKey(pipelineOptions)); + + @override + State createState() => + _PipelineOptionsDropdownBodyState(); +} + +class _PipelineOptionsDropdownBodyState + extends State + with SingleTickerProviderStateMixin { + late final TabController tabController; + final TextEditingController pipelineOptionsController = + TextEditingController(); + List pipelineOptionsList = []; + int selectedTab = kOptionsTabIndex; + bool showError = false; + + @override + void initState() { + tabController = TabController(vsync: this, length: 2); + tabController.addListener(onTabChange); + pipelineOptionsController.text = widget.pipelineOptions; + pipelineOptionsList = _pipelineOptionsMapToList(widget.pipelineOptions); + if (pipelineOptionsList.isEmpty) { + pipelineOptionsList = [PipelineOptionController()]; + } + super.initState(); + } + + @override + void dispose() { + tabController.removeListener(onTabChange); + tabController.dispose(); + pipelineOptionsController.dispose(); + + for (final controller in pipelineOptionsList) { + controller.dispose(); + } + + super.dispose(); + } + + onTabChange() { + setState(() { + selectedTab = tabController.index; + }); + if (tabController.index == kRawTabIndex) { + _updateRawValue(); + } else { + _updateFormValue(); + } + } + + onDelete(int index) { + setState(() { + pipelineOptionsList.removeAt(index); + }); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + TabBar( + controller: tabController, + tabs: [ + Tab( + key: PipelineOptionsDropdownBody.optionsTabKey, + text: 'widgets.pipelineOptions.options'.tr(), + ), + Tab( + key: PipelineOptionsDropdownBody.rawTabKey, + text: 'widgets.pipelineOptions.raw'.tr(), + ), + ], + ), + const BeamDivider(), + Expanded( + child: Padding( + padding: const EdgeInsets.all(BeamSpacing.extraLarge), + child: TabBarView( + controller: tabController, + physics: const NeverScrollableScrollPhysics(), + children: [ + PipelineOptionsForm( + options: pipelineOptionsList, + onDelete: onDelete, + ), + PipelineOptionsDropdownInput( + controller: pipelineOptionsController, + ), + ], + ), + ), + ), + const BeamDivider(), + Padding( + padding: const EdgeInsets.all(BeamSpacing.extraLarge), + child: Row( + children: [ + SizedBox( + height: BeamSizes.buttonHeight, + child: ElevatedButton( + key: PipelineOptionsDropdownBody.saveAndCloseButtonKey, + child: Text('widgets.pipelineOptions.saveAndClose'.tr()), + onPressed: () => _save(context), + ), + ), + const SizedBox(width: BeamSpacing.large), + if (selectedTab == kOptionsTabIndex) + SizedBox( + height: BeamSizes.buttonHeight, + child: OutlinedButton( + key: PipelineOptionsDropdownBody.addOptionButtonKey, + child: Text('widgets.pipelineOptions.addParameter'.tr()), + onPressed: () => setState(() { + pipelineOptionsList.add(PipelineOptionController()); + }), + ), + ), + if (showError && selectedTab == kRawTabIndex) + Flexible( + child: Text( + 'widgets.pipelineOptions.error'.tr(), + style: Theme.of(context) + .textTheme + .caption! + .copyWith(color: BeamNotificationColors.error), + softWrap: true, + ), + ), + ], + ), + ) + ], + ); + } + + Map get pipelineOptionsListValue { + final notEmptyOptions = pipelineOptionsList + .where((controller) => + controller.nameController.text.isNotEmpty && + controller.valueController.text.isNotEmpty) + .toList(); + return { + for (final controller in notEmptyOptions) + controller.nameController.text: controller.valueController.text + }; + } + + String get pipelineOptionsValue { + if (selectedTab == kRawTabIndex) { + return pipelineOptionsController.text; + } + return pipelineOptionsToString(pipelineOptionsListValue); + } + + void _save(BuildContext context) { + if (selectedTab == kRawTabIndex && !_isPipelineOptionsTextValid()) { + setState(() { + showError = true; + }); + return; + } + widget.setPipelineOptions(pipelineOptionsValue); + widget.close(); + } + + bool _isPipelineOptionsTextValid() { + final options = pipelineOptionsController.text; + final parsedOptions = parsePipelineOptions(options); + return options.isEmpty || (parsedOptions != null); + } + + void _updateRawValue() { + if (pipelineOptionsListValue.isNotEmpty) { + pipelineOptionsController.text = + pipelineOptionsToString(pipelineOptionsListValue); + } + } + + void _updateFormValue() { + final parsedOptions = + _pipelineOptionsMapToList(pipelineOptionsController.text); + if (parsedOptions.isNotEmpty) { + setState(() { + pipelineOptionsList = parsedOptions; + }); + } + } + + List _pipelineOptionsMapToList( + String pipelineOptions) { + return parsePipelineOptions(pipelineOptions) + ?.entries + .map((e) => PipelineOptionController(name: e.key, value: e.value)) + .toList() ?? + []; + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_input.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_input.dart new file mode 100644 index 000000000000..acb736800906 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_dropdown_input.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import 'pipeline_option_label.dart'; +import 'pipeline_options_text_field.dart'; + +const kPipelineOptionsInputLines = 8; + +class PipelineOptionsDropdownInput extends StatelessWidget { + static const textFieldKey = ValueKey('PipelineOptionsRawInput'); + + final TextEditingController controller; + + const PipelineOptionsDropdownInput({ + super.key, + required this.controller, + }); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + PipelineOptionLabel(text: 'widgets.pipelineOptions.input'.tr()), + PipelineOptionsTextField( + key: textFieldKey, + lines: kPipelineOptionsInputLines, + controller: controller, + ), + ], + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_form.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_form.dart new file mode 100644 index 000000000000..d52a2bcc679c --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_form.dart @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; +import 'pipeline_option_controller.dart'; +import 'pipeline_option_label.dart'; +import 'pipeline_options_row.dart'; + +const kSpace = SizedBox(width: BeamSpacing.medium); + +class PipelineOptionsForm extends StatelessWidget { + final List options; + final void Function(int) onDelete; + + const PipelineOptionsForm({ + super.key, + required this.options, + required this.onDelete, + }); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Row( + children: [ + Expanded( + child: PipelineOptionLabel( + text: 'widgets.pipelineOptions.name'.tr(), + ), + ), + kSpace, + Expanded( + child: PipelineOptionLabel( + text: 'widgets.pipelineOptions.value'.tr(), + ), + ), + const SizedBox(width: BeamIconSizes.large), + ], + ), + ...options.mapIndexed( + (index, controller) => PipelineOptionsRow( + controller: controller, + onDelete: () => onDelete(index), + ), + ), + ], + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_row.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_row.dart new file mode 100644 index 000000000000..c661f2058bd3 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_row.dart @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../../constants/sizes.dart'; +import 'pipeline_option_controller.dart'; +import 'pipeline_options_form.dart'; +import 'pipeline_options_text_field.dart'; + +class PipelineOptionsRow extends StatelessWidget { + final void Function() onDelete; + final PipelineOptionController controller; + + const PipelineOptionsRow({ + required this.controller, + required this.onDelete, + }); + + @override + Widget build(BuildContext context) { + final inputFormatters = [ + FilteringTextInputFormatter.deny(RegExp(r'\s')), + ]; + return Row( + children: [ + Expanded( + child: SizedBox( + height: BeamSizes.textFieldHeight, + child: PipelineOptionsTextField( + controller: controller.nameController, + inputFormatters: inputFormatters, + ), + ), + ), + kSpace, + Expanded( + child: SizedBox( + height: BeamSizes.textFieldHeight, + child: PipelineOptionsTextField( + controller: controller.valueController, + inputFormatters: inputFormatters, + ), + ), + ), + SizedBox( + width: BeamIconSizes.large, + child: IconButton( + iconSize: BeamIconSizes.medium, + splashRadius: BeamIconSizes.largeSplashRadius, + icon: Icon( + Icons.delete_outlined, + color: Theme.of(context).primaryColor, + ), + color: Theme.of(context).dividerColor, + onPressed: onDelete, + ), + ), + ], + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_text_field.dart b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_text_field.dart new file mode 100644 index 000000000000..13a0b61844ba --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/pipeline_options_dropdown/pipeline_options_text_field.dart @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../../constants/sizes.dart'; +import '../../theme/theme.dart'; + +class PipelineOptionsTextField extends StatelessWidget { + final TextEditingController controller; + final List? inputFormatters; + final int lines; + + const PipelineOptionsTextField({ + super.key, + required this.controller, + this.inputFormatters, + this.lines = 1, + }); + + @override + Widget build(BuildContext context) { + final themeData = Theme.of(context); + final ext = themeData.extension()!; + + return Container( + margin: const EdgeInsets.only( + top: BeamSpacing.medium, + ), + decoration: BoxDecoration( + color: Theme.of(context).backgroundColor, + borderRadius: BorderRadius.circular(BeamBorderRadius.medium), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(BeamBorderRadius.medium), + child: TextFormField( + minLines: lines, + maxLines: lines, + controller: controller, + inputFormatters: inputFormatters, + decoration: InputDecoration( + contentPadding: const EdgeInsets.all(BeamSpacing.medium), + border: _getInputBorder(ext.borderColor), + focusedBorder: _getInputBorder(themeData.primaryColor), + ), + ), + ), + ); + } + + OutlineInputBorder _getInputBorder(Color color) { + return OutlineInputBorder( + borderSide: BorderSide(color: color), + borderRadius: BorderRadius.circular(BeamBorderRadius.medium), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/reset_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/reset_button.dart new file mode 100644 index 000000000000..6cca4cf80d22 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/reset_button.dart @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../assets/assets.gen.dart'; +import '../controllers/playground_controller.dart'; +import '../playground_components.dart'; +import '../theme/theme.dart'; +import 'header_icon_button.dart'; +import 'shortcut_tooltip.dart'; + +class ResetButton extends StatelessWidget { + final PlaygroundController playgroundController; + final VoidCallback? beforeReset; + + const ResetButton({ + required this.playgroundController, + this.beforeReset, + }); + + @override + Widget build(BuildContext context) { + return ShortcutTooltip( + shortcut: playgroundController.resetShortcut, + child: HeaderIconButton( + icon: SvgPicture.asset( + Assets.buttons.reset, + color: Theme.of(context).extension()?.iconColor, + package: PlaygroundComponents.packageName, + ), + label: 'widgets.resetButton.label'.tr(), + onPressed: () { + beforeReset?.call(); + playgroundController.reset(); + }, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/run_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/run_button.dart new file mode 100644 index 000000000000..a3654aa62c72 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/run_button.dart @@ -0,0 +1,142 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; +import '../controllers/playground_controller.dart'; +import '../models/run_shortcut.dart'; +import '../theme/theme.dart'; +import 'periodic_builder.dart'; +import 'shortcut_tooltip.dart'; + +class RunButton extends StatelessWidget { + final PlaygroundController playgroundController; + final VoidCallback runCode; + final VoidCallback cancelRun; + final bool isEnabled; + + const RunButton({ + super.key, + required this.playgroundController, + required this.runCode, + required this.cancelRun, + this.isEnabled = true, + }); + + static const _buttonTextRebuildInterval = 100; + static const _width = 150.0; + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: playgroundController.codeRunner, + builder: (context, child) { + final isRunning = playgroundController.codeRunner.isCodeRunning; + final runStartDate = playgroundController.codeRunner.runStartDate; + final runStopDate = playgroundController.codeRunner.runStopDate; + + return SizedBox( + width: _width, + height: BeamSizes.buttonHeight, + child: ShortcutTooltip( + shortcut: BeamMainRunShortcut( + onInvoke: () {}, // Only the tooltip is used. + ), + child: ElevatedButton.icon( + style: const ButtonStyle( + padding: MaterialStatePropertyAll(EdgeInsets.zero), + ), + icon: isRunning + ? SizedBox( + width: BeamIconSizes.small, + height: BeamIconSizes.small, + child: CircularProgressIndicator( + color: Theme.of(context) + .extension()! + .primaryBackgroundTextColor, + ), + ) + : const Icon(Icons.play_arrow), + label: isRunning + // TODO(nausharipov): fix bug + // It is also rebuilt on every codeRunner notification + ? PeriodicBuilderWidget( + interval: const Duration( + milliseconds: _buttonTextRebuildInterval, + ), + builder: () { + return _ButtonText( + isRunning: isRunning, + runStartDate: runStartDate, + runStopDate: runStopDate, + ); + }, + ) + : _ButtonText( + isRunning: isRunning, + runStartDate: runStartDate, + runStopDate: runStopDate, + ), + onPressed: isEnabled ? _onPressed() : null, + ), + ), + ); + }, + ); + } + + VoidCallback _onPressed() { + return playgroundController.codeRunner.isCodeRunning ? cancelRun : runCode; + } +} + +class _ButtonText extends StatelessWidget { + final bool isRunning; + final DateTime? runStartDate; + final DateTime? runStopDate; + + const _ButtonText({ + required this.isRunning, + required this.runStartDate, + required this.runStopDate, + }); + + static const _msToSec = 1000; + static const _secondsFractionDigits = 1; + + @override + Widget build(BuildContext context) { + final runText = 'widgets.runOrCancelButton.titles.run'.tr(); + final cancelText = 'widgets.runOrCancelButton.titles.cancel'.tr(); + final buttonText = isRunning ? cancelText : runText; + final runStopDateOrNow = runStopDate ?? DateTime.now(); + + final elapsedDuration = + runStopDateOrNow.difference(runStartDate ?? DateTime.now()); + + if (elapsedDuration.inMilliseconds > 0) { + final seconds = elapsedDuration.inMilliseconds / _msToSec; + return Text( + '$buttonText (${seconds.toStringAsFixed(_secondsFractionDigits)} s)', + ); + } + return Text(buttonText); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/run_or_cancel_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/run_or_cancel_button.dart new file mode 100644 index 000000000000..79c00dabdf56 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/run_or_cancel_button.dart @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/widgets.dart'; + +import '../controllers/code_runner.dart'; +import '../controllers/playground_controller.dart'; +import '../models/toast.dart'; +import '../models/toast_type.dart'; +import '../playground_components.dart'; +import '../repositories/models/run_code_result.dart'; +import 'run_button.dart'; + +class RunOrCancelButton extends StatelessWidget { + final ValueChanged? beforeCancel; + final VoidCallback? beforeRun; + final ValueChanged? onComplete; + final PlaygroundController playgroundController; + + const RunOrCancelButton({ + required this.playgroundController, + this.beforeCancel, + this.beforeRun, + this.onComplete, + }); + + @override + Widget build(BuildContext context) { + return RunButton( + playgroundController: playgroundController, + cancelRun: () async { + beforeCancel?.call(playgroundController.codeRunner); + await playgroundController.codeRunner.cancelRun().catchError( + (_) => PlaygroundComponents.toastNotifier.add(_getErrorToast()), + ); + }, + runCode: () async { + beforeRun?.call(); + final runner = playgroundController.codeRunner; + await runner.runCode(); + if (runner.result?.status == RunCodeStatus.finished) { + onComplete?.call(playgroundController.codeRunner); + } + }, + ); + } + + Toast _getErrorToast() { + return Toast( + title: 'widgets.runOrCancelButton.notificationTitles.runCode'.tr(), + description: + 'widgets.runOrCancelButton.notificationTitles.cancelExecution'.tr(), + type: ToastType.error, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/scroll_2d.dart b/playground/frontend/build/playground_components/lib/src/widgets/scroll_2d.dart new file mode 100644 index 000000000000..be07da04dcc5 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/scroll_2d.dart @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +/// A temporary widget while Flutter team is working on +/// their TwoDimensionalScrollable. +/// +/// See https://github.com/apache/beam/issues/25118#issuecomment-1457703666 +class Scroll2DWidget extends StatefulWidget { + const Scroll2DWidget({ + required this.child, + }); + + final Widget child; + + @override + State createState() => _Scroll2DWidgetState(); +} + +class _Scroll2DWidgetState extends State { + final _verticalScrollController = ScrollController(); + final _horizontalScrollController = ScrollController(); + bool _isPanning = false; + + @override + Widget build(BuildContext context) { + return MouseRegion( + cursor: + _isPanning ? SystemMouseCursors.grabbing : SystemMouseCursors.grab, + child: GestureDetector( + onPanDown: (details) { + _setIsPanning(true); + }, + onPanStart: (details) { + _setIsPanning(true); + }, + onPanEnd: (details) { + _setIsPanning(false); + }, + onPanCancel: () { + _setIsPanning(false); + }, + onPanUpdate: (details) { + _verticalScrollController.position.jumpTo( + _verticalScrollController.position.pixels - details.delta.dy, + ); + _horizontalScrollController.position.jumpTo( + _horizontalScrollController.position.pixels - details.delta.dx, + ); + }, + child: SingleChildScrollView( + controller: _verticalScrollController, + child: SingleChildScrollView( + controller: _horizontalScrollController, + scrollDirection: Axis.horizontal, + child: widget.child, + ), + ), + ), + ); + } + + void _setIsPanning(bool newValue) { + setState(() { + _isPanning = newValue; + }); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/shortcut_tooltip.dart b/playground/frontend/build/playground_components/lib/src/widgets/shortcut_tooltip.dart new file mode 100644 index 000000000000..80e75b9e0788 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/shortcut_tooltip.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../models/shortcut.dart'; + +class ShortcutTooltip extends StatelessWidget { + final BeamShortcut shortcut; + final Widget child; + + const ShortcutTooltip({ + super.key, + required this.shortcut, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Tooltip( + excludeFromSemantics: true, + message: shortcut.title, + child: child, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/shortcuts_manager.dart b/playground/frontend/build/playground_components/lib/src/widgets/shortcuts_manager.dart new file mode 100644 index 000000000000..d5184961f3af --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/shortcuts_manager.dart @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../models/shortcut.dart'; + +/// Makes [shortcuts] available to the tree beneath. +class ShortcutsManager extends StatelessWidget { + final Widget child; + final List shortcuts; + + const ShortcutsManager({ + super.key, + required this.child, + required this.shortcuts, + }); + + @override + Widget build(BuildContext context) { + return FocusableActionDetector( + autofocus: true, + shortcuts: _shortcutsMap, + actions: _getActions(context), + child: child, + ); + } + + Map get _shortcutsMap => { + for (var shortcut in shortcuts) + shortcut.keySet: shortcut.actionIntent + }; + + Map> _getActions(BuildContext context) => { + for (var shortcut in shortcuts) + shortcut.actionIntent.runtimeType: shortcut.createAction(context) + }; +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/snippet_editor.dart b/playground/frontend/build/playground_components/lib/src/widgets/snippet_editor.dart new file mode 100644 index 000000000000..c0b8487213e1 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/snippet_editor.dart @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; +import '../controllers/snippet_editing_controller.dart'; +import 'loading_indicator.dart'; +import 'snippet_file_editor.dart'; +import 'tabbed_snippet_editor.dart'; + +class SnippetEditor extends StatelessWidget { + const SnippetEditor({ + required this.autofocus, + required this.controller, + required this.isEditable, + this.actionsWidget, + }); + + final bool autofocus; + final SnippetEditingController controller; + final bool isEditable; + + /// A child widget that will be: + /// - Hidden if no file is loaded. + /// - Shown as an overlay for a single file editor. + /// - Built into the tab bar for a multi-file editor. + final Widget? actionsWidget; + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: controller, + builder: (context, child) { + switch (controller.fileControllers.length) { + case 0: + return const Center( + child: LoadingIndicator(), + ); + + case 1: + return Stack( + children: [ + Positioned.fill( + child: SnippetFileEditor( + autofocus: autofocus, + controller: controller.fileControllers.first, + eventSnippetContext: controller.eventSnippetContext, + isEditable: isEditable, + ), + ), + if (actionsWidget != null) + Positioned( + right: 0, + top: BeamSizes.size10, + child: actionsWidget!, + ), + ], + ); + + default: + return TabbedSnippetEditor( + autofocus: autofocus, + controller: controller, + eventSnippetContext: controller.eventSnippetContext, + isEditable: isEditable, + trailing: actionsWidget, + ); + } + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/snippet_file_editor.dart b/playground/frontend/build/playground_components/lib/src/widgets/snippet_file_editor.dart new file mode 100644 index 000000000000..473bb82f76e2 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/snippet_file_editor.dart @@ -0,0 +1,173 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; + +import '../controllers/snippet_file_editing_controller.dart'; +import '../models/event_snippet_context.dart'; +import '../services/analytics/analytics_service.dart'; +import '../services/analytics/events/snippet_modified.dart'; +import '../theme/theme.dart'; + +class SnippetFileEditor extends StatefulWidget { + SnippetFileEditor({ + required this.autofocus, + required this.controller, + required this.eventSnippetContext, + required this.isEditable, + }) : super( + // When the example is changed, will scroll to the context line again. + key: ValueKey(controller.savedFile), + ); + + final bool autofocus; + final SnippetFileEditingController controller; + final EventSnippetContext eventSnippetContext; + final bool isEditable; + + @override + State createState() => _SnippetFileEditorState(); +} + +class _SnippetFileEditorState extends State { + bool _didAutoFocus = false; + final _focusNode = FocusNode(); + bool _isEverModified = false; + final _scrollController = ScrollController(); + + @override + void initState() { + super.initState(); + widget.controller.addListener(_onChanged); + } + + @override + void didUpdateWidget(SnippetFileEditor oldWidget) { + super.didUpdateWidget(oldWidget); + oldWidget.controller.removeListener(_onChanged); + widget.controller.addListener(_onChanged); + } + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + + if (widget.autofocus && !_didAutoFocus) { + _didAutoFocus = true; + SchedulerBinding.instance.addPostFrameCallback((_) { + if (mounted) { + _scrollSoCursorIsOnTop(); + } + }); + } + } + + void _scrollSoCursorIsOnTop() { + _focusNode.requestFocus(); + + final position = max(widget.controller.codeController.selection.start, 0); + final characterOffset = _getLastCharacterOffset( + style: kLightTheme.extension()!.codeRootStyle, + text: widget.controller.codeController.text.substring(0, position), + ); + + _scrollController.jumpTo( + min( + characterOffset.dy, + _scrollController.position.maxScrollExtent, + ), + ); + } + + @override + void dispose() { + _focusNode.dispose(); + widget.controller.removeListener(_onChanged); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final ext = Theme.of(context).extension()!; + + return Semantics( + container: true, + enabled: widget.isEditable, + label: 'widgets.codeEditor.label', + multiline: true, + readOnly: !widget.isEditable, + textField: true, + child: FocusScope( + node: FocusScopeNode(canRequestFocus: widget.isEditable), + child: CodeTheme( + data: ext.codeTheme, + child: Container( + color: ext.codeTheme.styles['root']?.backgroundColor, + child: SingleChildScrollView( + controller: _scrollController, + child: CodeField( + key: ValueKey(widget.controller.codeController), + controller: widget.controller.codeController, + enabled: widget.isEditable, + focusNode: _focusNode, + textStyle: ext.codeRootStyle, + ), + ), + ), + ), + ), + ); + } + + void _onChanged() { + if (widget.controller.isChanged && !_isEverModified) { + final snippet = widget.eventSnippetContext.originalSnippet; + + if (snippet != null) { + BeamAnalyticsService.get().sendUnawaited( + SnippetModifiedAnalyticsEvent( + fileName: widget.controller.savedFile.name, + sdk: widget.controller.sdk, + snippet: snippet, + additionalParams: widget.controller.defaultEventParams, + ), + ); + } + _isEverModified = true; + } + } +} + +Offset _getLastCharacterOffset({ + required TextStyle style, + required String text, +}) { + final textPainter = TextPainter( + textDirection: TextDirection.ltr, + text: TextSpan(text: text, style: style), + )..layout(); + + return textPainter.getOffsetForCaret( + TextPosition(offset: text.length), + Rect.zero, + ); +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/split_view.dart b/playground/frontend/build/playground_components/lib/src/widgets/split_view.dart new file mode 100644 index 000000000000..447710153d71 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/split_view.dart @@ -0,0 +1,175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; +import 'drag_handle.dart'; + +const minRatio = 0.3; +const maxRatio = 0.7; +const defaultRatio = 0.5; + +class SplitView extends StatefulWidget { + final Widget first; + final Widget second; + final Axis direction; + final double initialRatio; + final Key? dragHandleKey; + + const SplitView({ + super.key, + required this.first, + required this.second, + required this.direction, + this.dragHandleKey, + this.initialRatio = defaultRatio, + }); + + @override + State createState() => _SplitViewState(); +} + +class _SplitViewState extends State { + //from minRatio to maxRatio + double _ratio = defaultRatio; + double _maxSize = 0; + + int get _sizeFirst => (_ratio * _maxSize).toInt(); + + int get _sizeSecond => ((1 - _ratio) * _maxSize).toInt(); + + get _isHorizontal => widget.direction == Axis.horizontal; + + get _isVertical => widget.direction == Axis.vertical; + + @override + void initState() { + super.initState(); + _ratio = widget.initialRatio; + } + + @override + Widget build(BuildContext widgetContext) { + return LayoutBuilder(builder: (context, BoxConstraints constraints) { + _updateMaxSize(constraints); + return _isHorizontal + ? _buildHorizontalLayout(context, constraints) + : _buildVerticalLayout(context, constraints); + }); + } + + Widget _buildHorizontalLayout( + BuildContext context, BoxConstraints constraints) { + return SizedBox( + width: constraints.maxWidth, + child: Row( + children: [ + Expanded( + flex: _sizeFirst, + child: widget.first, + ), + _buildSeparator(context), + Expanded( + flex: _sizeSecond, + child: widget.second, + ), + ], + ), + ); + } + + Widget _buildVerticalLayout( + BuildContext context, BoxConstraints constraints) { + return SizedBox( + height: constraints.maxHeight, + child: Column( + children: [ + Expanded( + flex: _sizeFirst, + child: widget.first, + ), + _buildSeparator(context), + Expanded( + flex: _sizeSecond, + child: widget.second, + ), + ], + ), + ); + } + + Widget _buildSeparator(BuildContext context) { + return MouseRegion( + cursor: _isHorizontal + ? SystemMouseCursors.resizeLeftRight + : SystemMouseCursors.resizeUpDown, + child: GestureDetector( + behavior: HitTestBehavior.translucent, + child: Container( + width: _isHorizontal ? BeamSizes.splitViewSeparator : double.infinity, + height: _isVertical ? BeamSizes.splitViewSeparator : double.infinity, + color: Theme.of(context).dividerColor, + child: Center( + child: DragHandle( + direction: widget.direction, + key: widget.dragHandleKey, + ), + ), + ), + onPanUpdate: (DragUpdateDetails details) { + setState(() { + _updateRatio(details); + }); + }, + ), + ); + } + + void _updateRatio(DragUpdateDetails details) { + if (_maxSize == 0) { + return; + } + if (_isHorizontal) { + _ratio += details.delta.dx / _maxSize; + } else { + _ratio += details.delta.dy / _maxSize; + } + _checkRatioSafe(); + } + + void _checkRatioSafe() { + if (_ratio > maxRatio) { + _ratio = maxRatio; + } + if (_ratio < minRatio) { + _ratio = minRatio; + } + } + + void _updateMaxSize(BoxConstraints constraints) { + _calculateMaxSize( + _isHorizontal ? constraints.maxWidth : constraints.maxHeight); + } + + void _calculateMaxSize(double maxSize) { + if (_maxSize != maxSize) { + _maxSize = maxSize - BeamSizes.splitViewSeparator; + } + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/tab_header.dart b/playground/frontend/build/playground_components/lib/src/widgets/tab_header.dart new file mode 100644 index 000000000000..31d4f132aa75 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/tab_header.dart @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../constants/sizes.dart'; + +class TabHeader extends StatelessWidget { + final TabController tabController; + final Widget tabsWidget; + + const TabHeader({ + super.key, + required this.tabController, + required this.tabsWidget, + }); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: BeamSizes.tabBarHeight, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: BeamSizes.size16, + ), + child: tabsWidget, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/tabbed_snippet_editor.dart b/playground/frontend/build/playground_components/lib/src/widgets/tabbed_snippet_editor.dart new file mode 100644 index 000000000000..4b78b3277e9d --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/tabbed_snippet_editor.dart @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:keyed_collection_widgets/keyed_collection_widgets.dart'; + +import '../controllers/snippet_editing_controller.dart'; +import '../models/event_snippet_context.dart'; +import 'snippet_file_editor.dart'; +import 'tabs/tab_bar.dart'; + +class TabbedSnippetEditor extends StatelessWidget { + const TabbedSnippetEditor({ + required this.autofocus, + required this.controller, + required this.eventSnippetContext, + required this.isEditable, + this.trailing, + }); + + final bool autofocus; + final SnippetEditingController controller; + final EventSnippetContext eventSnippetContext; + final bool isEditable; + final Widget? trailing; + + @override + Widget build(BuildContext context) { + final files = controller.fileControllers.map((c) => c.getFile()); + final keys = files.map((f) => f.name).toList(growable: false); + final initialKey = files.firstWhereOrNull((f) => f.isMain)?.name; + + // TODO(nausharipov): fork keyed_collection_widgets and put prints. + return DefaultKeyedTabController.fromKeys( + animationDuration: Duration.zero, + initialKey: initialKey, + keys: keys, + onChanged: (key) { + if (key != null) { + controller.activateFileControllerByName(key); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: + BeamTabBar(tabs: {for (final key in keys) key: Text(key)}), + ), + if (trailing != null) trailing!, + ], + ), + Expanded( + child: KeyedTabBarView.withDefaultController( + children: { + for (final key in keys) + key: SnippetFileEditor( + autofocus: autofocus, + controller: controller.requireFileControllerByName(key), + eventSnippetContext: eventSnippetContext, + isEditable: isEditable, + ), + }, + ), + ), + ], + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/tabs/tab_bar.dart b/playground/frontend/build/playground_components/lib/src/widgets/tabs/tab_bar.dart new file mode 100644 index 000000000000..19419c6693cc --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/tabs/tab_bar.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:keyed_collection_widgets/keyed_collection_widgets.dart'; + +import '../../constants/sizes.dart'; + +class BeamTabBar extends StatelessWidget { + const BeamTabBar({ + super.key, + required this.tabs, + this.hasPadding = false, + }); + + final bool hasPadding; + final Map tabs; + + @override + Widget build(BuildContext context) { + return Padding( + padding: hasPadding + ? const EdgeInsets.symmetric(horizontal: BeamSizes.size16) + : EdgeInsets.zero, + child: SizedBox( + height: BeamSizes.tabBarHeight, + child: KeyedTabBar.withDefaultController( + isScrollable: true, + tabs: { + for (final key in tabs.keys) key: Tab(child: tabs[key]), + }, + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast.dart b/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast.dart new file mode 100644 index 000000000000..0a52277c4ce9 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast.dart @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../assets/assets.gen.dart'; +import '../../constants/colors.dart'; +import '../../constants/sizes.dart'; +import '../../models/toast.dart'; +import '../../models/toast_type.dart'; +import '../../playground_components.dart'; + +const _borderWidth = 4.0; +const _textWidth = 300.0; + +const _colors = UnmodifiableToastTypeMap( + error: BeamNotificationColors.error, + info: BeamNotificationColors.info, +); + +final _iconNames = UnmodifiableToastTypeMap( + error: Assets.notificationIcons.error, + info: Assets.notificationIcons.info, +); + +/// The content of a popup notification. +/// +/// Named after 'fluttertoast' package. +class ToastWidget extends StatelessWidget { + final Toast toast; + + const ToastWidget(this.toast); + + @override + Widget build(BuildContext context) { + return Card( + child: Stack( + children: [ + _leftBorder(context), + _content(context), + ], + ), + ); + } + + Widget _leftBorder(BuildContext context) { + return Positioned( + width: _borderWidth, + left: 0, + top: 0, + bottom: 0, + child: DecoratedBox( + decoration: BoxDecoration( + color: _colors.get(toast.type), + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(BeamSizes.size8), + bottomLeft: Radius.circular(BeamSizes.size8), + ), + ), + ), + ); + } + + Widget _content(BuildContext context) { + final textTheme = Theme.of(context).textTheme.bodyText1; + + return Positioned( + child: Padding( + padding: const EdgeInsets.all(BeamSizes.size12), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + SvgPicture.asset( + _iconNames.get(toast.type), + package: PlaygroundComponents.packageName, + ), + const SizedBox(width: BeamSizes.size12), + Wrap( + direction: Axis.vertical, + spacing: BeamSizes.size4, + children: [ + Text( + toast.title, + style: textTheme?.copyWith(fontWeight: FontWeight.w600), + ), + SizedBox( + width: _textWidth, + child: SelectableText( + toast.description, + style: textTheme, + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast_listener.dart b/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast_listener.dart new file mode 100644 index 000000000000..9a83f0938976 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/toasts/toast_listener.dart @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart' show FToast, ToastGravity; +import 'package:get_it/get_it.dart'; + +import '../../constants/durations.dart'; +import '../../models/toast.dart'; +import '../../services/toast_notifier.dart'; +import 'toast.dart'; + +/// Turns events from [ToastNotifier] into floating [ToastWidget]s. +class ToastListenerWidget extends StatefulWidget { + final Widget child; + + const ToastListenerWidget({ + super.key, + required this.child, + }); + + @override + State createState() => _ToastListenerWidgetState(); +} + +class _ToastListenerWidgetState extends State { + final _notifier = GetIt.instance.get(); + final _flutterToast = FToast(); + StreamSubscription? _toastSubscription; + + @override + void initState() { + super.initState(); + _flutterToast.init(context); + _toastSubscription = _notifier.toasts.listen(_onToast); + } + + Future _onToast(Toast toast) async { + _flutterToast.showToast( + gravity: ToastGravity.TOP, + toastDuration: BeamDurations.toast, + child: ToastWidget(toast), + ); + } + + @override + Widget build(BuildContext context) { + return widget.child; + } + + @override + void dispose() { + unawaited(_toastSubscription?.cancel()); + super.dispose(); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_button.dart new file mode 100644 index 000000000000..5e8c43ae3ae7 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_button.dart @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +import '../assets/assets.gen.dart'; +import '../playground_components.dart'; +import '../services/analytics/events/theme_set.dart'; +import '../theme/switch_notifier.dart'; + +class ToggleThemeButton extends StatelessWidget { + const ToggleThemeButton(); + + @override + Widget build(BuildContext context) { + return Consumer( + builder: (context, notifier, child) { + final text = + notifier.isDarkMode ? 'ui.lightMode'.tr() : 'ui.darkMode'.tr(); + + return TextButton.icon( + icon: SvgPicture.asset( + Assets.buttons.themeMode, + package: PlaygroundComponents.packageName, + ), + label: Text(text), + onPressed: () { + unawaited(notifier.toggleTheme()); + PlaygroundComponents.analyticsService.sendUnawaited( + ThemeSetAnalyticsEvent( + brightness: notifier.brightness, + ), + ); + }, + ); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_icon_button.dart b/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_icon_button.dart new file mode 100644 index 000000000000..4bd95b798d98 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/toggle_theme_icon_button.dart @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../assets/assets.gen.dart'; +import '../constants/sizes.dart'; +import '../playground_components.dart'; +import '../services/analytics/events/theme_set.dart'; +import '../theme/switch_notifier.dart'; + +class ToggleThemeIconButton extends StatelessWidget { + const ToggleThemeIconButton({super.key}); + + @override + Widget build(BuildContext context) { + return Consumer( + builder: (context, notifier, child) { + return IconButton( + iconSize: BeamIconSizes.large, + splashRadius: BeamIconSizes.largeSplashRadius, + icon: SvgPicture.asset( + Assets.buttons.themeMode, + package: PlaygroundComponents.packageName, + ), + onPressed: () { + unawaited(notifier.toggleTheme()); + PlaygroundComponents.analyticsService.sendUnawaited( + ThemeSetAnalyticsEvent( + brightness: notifier.brightness, + ), + ); + }, + ); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/unread/builder.dart b/playground/frontend/build/playground_components/lib/src/widgets/unread/builder.dart new file mode 100644 index 000000000000..f3647a7dc850 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/unread/builder.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; + +import '../../controllers/unread_controller.dart'; + +/// Calls [builder] when [controller] changes and passes the unread status +/// of [unreadKey]. +class UnreadBuilder extends StatelessWidget { + const UnreadBuilder({ + super.key, + required this.builder, + required this.controller, + required this.unreadKey, + }); + + final Widget Function(BuildContext context, bool isUnread) builder; + final UnreadController controller; + final Object unreadKey; + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: controller, + builder: (context, child) { + return builder(context, controller.isUnread(unreadKey)); + }, + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/unread/clearer.dart b/playground/frontend/build/playground_components/lib/src/widgets/unread/clearer.dart new file mode 100644 index 000000000000..011e0b458890 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/unread/clearer.dart @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; +import 'package:visibility_detector/visibility_detector.dart'; + +import '../../controllers/unread_controller.dart'; + +/// Clears the unread status of [unreadKey] when built and at least +/// partially visible. +class UnreadClearer extends StatelessWidget { + const UnreadClearer({ + super.key, + required this.child, + required this.controller, + required this.unreadKey, + }); + + final Widget child; + final UnreadController controller; + final T unreadKey; + + @override + Widget build(BuildContext context) { + return VisibilityDetector( + key: Key(unreadKey.toString()), + onVisibilityChanged: (info) { + if (info.visibleFraction > 0) { + controller.markRead(unreadKey); + } + }, + child: AnimatedBuilder( + animation: controller, + builder: (context, _) { + WidgetsBinding.instance.addPostFrameCallback((_) { + controller.markRead(unreadKey); + }); + return child; + }, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/unread/marker.dart b/playground/frontend/build/playground_components/lib/src/widgets/unread/marker.dart new file mode 100644 index 000000000000..977299f03fe8 --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/unread/marker.dart @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; + +import '../../constants/sizes.dart'; + +class UnreadMarkerWidget extends StatelessWidget { + const UnreadMarkerWidget(); + + @override + Widget build(BuildContext context) { + return Container( + width: BeamIconSizes.xs, + height: BeamIconSizes.xs, + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + shape: BoxShape.circle, + ), + ); + } +} diff --git a/playground/frontend/build/playground_components/lib/src/widgets/versions/versions.dart b/playground/frontend/build/playground_components/lib/src/widgets/versions/versions.dart new file mode 100644 index 000000000000..76a2ed69241b --- /dev/null +++ b/playground/frontend/build/playground_components/lib/src/widgets/versions/versions.dart @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:math'; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:url_launcher/link.dart'; + +import '../../constants/sizes.dart'; +import '../../controllers/build_metadata.dart'; +import '../../models/component_version.dart'; +import '../../models/sdk.dart'; +import '../loading_indicator.dart'; + +const _commitHashLength = 8; + +/// Shows versions of frontend, router, and [sdks] runners. +class VersionsWidget extends StatelessWidget { + const VersionsWidget({ + required this.sdks, + }); + + final List sdks; + + @override + Widget build(BuildContext context) { + final controller = GetIt.instance.get(); + + return AnimatedBuilder( + animation: controller, + builder: (context, child) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + // + _ComponentVersionWidget( + Future.value(ComponentVersion.frontend), + title: 'widgets.versions.titles.frontend'.tr(), + ), + + const SizedBox(height: BeamSizes.size10), + _ComponentVersionWidget( + controller.getRouterVersion(), // ignore: discarded_futures + title: 'widgets.versions.titles.router'.tr(), + ), + + for (final sdk in sdks) ...[ + const SizedBox(height: BeamSizes.size10), + _ComponentVersionWidget( + controller.getRunnerVersion(sdk), // ignore: discarded_futures + title: 'widgets.versions.titles.runner'.tr( + namedArgs: { + 'sdk': sdk.title, + }, + ), + ), + ], + ], + ), + ); + } +} + +/// A line in [VersionsWidget]. +class _ComponentVersionWidget extends StatelessWidget { + const _ComponentVersionWidget( + this.componentVersionFuture, { + required this.title, + }); + + final Future componentVersionFuture; + final String title; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text(title), + _getContent(), + ], + ); + } + + Widget _getContent() { + return FutureBuilder( + future: componentVersionFuture, + builder: _getContentWithSnapshot, + ); + } + + Widget _getContentWithSnapshot( + BuildContext context, + AsyncSnapshot snapshot, + ) { + final data = snapshot.data; + + if (data == null) { + return const LoadingIndicator(); + } + + final hash = data.buildCommitHash; + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + // + if (data.beamSdkVersion != null) + const Text('widgets.versions.beam').tr( + namedArgs: { + 'version': data.beamSdkVersion!, + }, + ), + + if (hash != null) + Link( + uri: _commitHashToUri(data.buildCommitHash!), + builder: (context, followLink) { + return TextButton( + onPressed: followLink, + child: const Text('widgets.versions.commit').tr( + namedArgs: { + 'hash': hash.substring( + 0, + min(_commitHashLength, hash.length), + ), + 'date': _formatDate(data.dateTime!), + }, + ), + ); + }, + ), + ], + ); + } + + String _formatDate(DateTime dt) { + return dt.toString().substring(0, 'YYYY-MM-DD HH:MM'.length); + } +} + +Uri _commitHashToUri(String commitHash) { + return Uri.parse('https://github.com/apache/beam/tree/$commitHash'); +} diff --git a/playground/frontend/build/playground_components/pubspec.yaml b/playground/frontend/build/playground_components/pubspec.yaml new file mode 100644 index 000000000000..bd37987dda58 --- /dev/null +++ b/playground/frontend/build/playground_components/pubspec.yaml @@ -0,0 +1,89 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: playground_components +description: Reusable Playground components +version: 0.0.1 +publish_to: none + +environment: + sdk: '>=3.0.2 <4.0.0' + flutter: '>=3.10.4' + +dependencies: + aligned_dialog: ^0.0.6 + app_state: 0.9.4 + clock: ^1.1.1 + collection: ^1.16.0 + connectivity_plus: ^2.3.9 + easy_localization: ">=3.0.1 <3.0.3" + easy_localization_ext: ^0.1.1 + easy_localization_loader: ^1.0.0 + enum_map: ^0.2.1 + equatable: ^2.0.5 + flutter: { sdk: flutter } + flutter_code_editor: ^0.3.0 + + # TODO(nausharipov): return flutter_markdown when it is fixed, https://github.com/apache/beam/issues/26498 + # The exact version is used because this non-official package can be poorly maintained. + # Same in Tour of Beam's file. + flutter_markdown_selectionarea: 0.6.14+3 + + flutter_svg: ^2.0.1 + fluttertoast: ^8.1.1 + get_it: ^7.2.0 + google_fonts: ^4.0.3 + grpc: ^3.0.2 + highlight: ^0.7.0 + hive: ^2.2.3 + hive_test: ^1.0.1 + http: ^0.13.5 + json_annotation: ^4.7.0 + keyed_collection_widgets: 0.4.3 + meta: ^1.7.0 + os_detect: ^2.0.1 + protobuf: ^2.1.0 + provider: ^6.0.3 + rxdart: ^0.27.7 + shared_preferences: ^2.0.15 + url_launcher: ^6.1.10 + visibility_detector: ^0.4.0+2 + yaml: ^3.1.1 + +dev_dependencies: + build_runner: ^2.2.0 + enum_map_gen: ^0.2.1 + flutter_gen_runner: ^5.2.0 + flutter_test: { sdk: flutter } + json_serializable: ^6.4.1 + mockito: ^5.4.1 + total_lints: ^2.17.4 + +flutter: + uses-material-design: true + assets: + - assets/buttons/ + - assets/notification_icons/ + - assets/png/ + - assets/svg/ + - assets/symbols/go.g.yaml + - assets/symbols/java.g.yaml + - assets/symbols/python.g.yaml + - assets/translations/en.yaml + +flutter_gen: + output: lib/src/assets/ diff --git a/playground/frontend/build/playground_components/test/src/cache/example_cache_test.dart b/playground/frontend/build/playground_components/test/src/cache/example_cache_test.dart new file mode 100644 index 000000000000..a05785a66811 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/cache/example_cache_test.dart @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:collection'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/src/cache/example_cache.dart'; +import 'package:playground_components/src/models/sdk.dart'; + +import '../common/categories.dart'; +import '../common/example_repository_mock.dart'; +import '../common/example_repository_mock.mocks.dart'; +import '../common/examples.dart'; +import '../common/requests.dart'; + +final _defaultExamplesMapMock = UnmodifiableMapView({ + Sdk.java: examplePython3, + Sdk.go: examplePython3, + Sdk.python: examplePython3, + Sdk.scio: examplePython3, +}); + +void main() { + late ExampleCache cache; + late MockExampleRepository mockRepo; + + setUp(() { + mockRepo = getMockExampleRepository(); + cache = ExampleCache(exampleRepository: mockRepo); + }); + + group('ExampleCache', () { + test('defaultExamplesBySdk is initially empty', () { + expect(cache.defaultExamplesBySdk, {}); + }); + + test('isSelectorOpened is initially false', () { + expect(cache.isSelectorOpened, false); + }); + + test( + 'loadAllPrecompiledObjectsIfNot loads all', + () async { + int notified = 0; + cache.addListener(() => notified++); + when(mockRepo.getPrecompiledObjects(kGetPrecompiledObjectsRequest)) + .thenAnswer((_) async => kGetPrecompiledObjectsResponse.categories); + + await cache.loadAllPrecompiledObjectsIfNot(); + + expect(notified, 1); + expect(cache.categoryListsBySdk, sdkCategoriesFromServerMock); + }, + ); + + group('loadExampleInfo tests', () { + test( + 'If example info is fetched (source is not empty), ' + 'then loadExampleInfo should return example immediately', + () async { + expect( + await cache.loadExampleInfo(examplePython1), + examplePython1, + ); + }, + ); + + test( + 'loadExampleInfo loads source, output, logs, graph for given example', + () async { + when(mockRepo.getPrecompiledObjectOutput(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.outputs!); + when(mockRepo.getPrecompiledObjectCode(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.files); + when(mockRepo.getPrecompiledObjectLogs(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.logs!); + when(mockRepo.getPrecompiledObjectGraph(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.graph!); + + expect( + await cache.loadExampleInfo(exampleBasePython3), + examplePython3, + ); + }, + ); + }); + + group('loadDefaultExamples tests', () { + test( + 'If defaultExamplesBySdk is not empty, ' + 'loadDefaultExamples should not change it', + () async { + cache.defaultExamplesBySdk.addAll(_defaultExamplesMapMock); + await cache.loadDefaultPrecompiledObjects(); + expect(cache.defaultExamplesBySdk, _defaultExamplesMapMock); + }, + ); + + test( + 'Example state loadDefaultExamples should load default example ' + 'with all additions for every Sdk', + () async { + // stubs + when(mockRepo.getPrecompiledObjectOutput(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.outputs!); + when(mockRepo.getPrecompiledObjectCode(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.files); + when(mockRepo.getPrecompiledObjectLogs(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.logs!); + when(mockRepo.getPrecompiledObjectGraph(kRequestForExampleInfo)) + .thenAnswer((_) async => examplePython3.graph!); + + // test assertion + await cache.loadDefaultPrecompiledObjects(); + expect( + cache.defaultExamplesBySdk, + _defaultExamplesMapMock, + ); + }, + ); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/common/categories.dart b/playground/frontend/build/playground_components/test/src/common/categories.dart new file mode 100644 index 000000000000..07a2acfa508a --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/categories.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:collection'; + +import 'package:playground_components/src/models/category_with_examples.dart'; +import 'package:playground_components/src/models/sdk.dart'; + +import 'examples.dart'; + +final categoriesMock = [ + CategoryWithExamples(title: 'Filtered', examples: [examplePython1]), + CategoryWithExamples( + title: 'Unfiltered', + // exampleMock2 is repeated to test that 'tag2' is more frequent than 'tag1' + examples: [examplePython1, examplePython2, examplePython2, examplePython2], + ), +]; + +final filteredCategories = [ + CategoryWithExamples(title: 'Filtered', examples: [examplePython1]), +]; + +const filteredExamples = [examplePython1, examplePython2]; + +const examplesFilteredByTypeMock = [examplePython2]; + +const examplesFilteredByTagsMock = [examplePython2]; + +const examplesFilteredByNameMock = [examplePython1]; + +final sdkCategoriesFromServerMock = UnmodifiableMapView({ + Sdk.java: categoriesMock, + Sdk.python: categoriesMock, + Sdk.go: categoriesMock, + Sdk.scio: categoriesMock, +}); diff --git a/playground/frontend/build/playground_components/test/src/common/descriptors.dart b/playground/frontend/build/playground_components/test/src/common/descriptors.dart new file mode 100644 index 000000000000..6d65c9d591a9 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/descriptors.dart @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import 'examples.dart'; + +const emptyDescriptor = EmptyExampleLoadingDescriptor(sdk: Sdk.java); + +final standardDescriptor1 = StandardExampleLoadingDescriptor( + path: examplePython1.path, + sdk: examplePython1.sdk, +); + +final standardDescriptor2 = StandardExampleLoadingDescriptor( + path: examplePython2.path, + sdk: examplePython2.sdk, +); + +final standardGoDescriptor = StandardExampleLoadingDescriptor( + path: exampleGo6.path, + sdk: exampleGo6.sdk, +); diff --git a/playground/frontend/build/playground_components/test/src/common/example_cache.dart b/playground/frontend/build/playground_components/test/src/common/example_cache.dart new file mode 100644 index 000000000000..b9cdeec866b4 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/example_cache.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:mockito/annotations.dart'; + +import 'package:playground_components/playground_components.dart'; + +@GenerateMocks([ExampleCache]) +class _C {} // ignore: unused_element + +/// Creates an [ExampleCache] with a broken URL so all requests fail. +ExampleCache createFailingExampleCache() { + return ExampleCache( + exampleRepository: ExampleRepository( + client: GrpcExampleClient(url: Uri.parse('')), + ), + ); +} diff --git a/playground/frontend/build/playground_components/test/src/common/example_cache.mocks.dart b/playground/frontend/build/playground_components/test/src/common/example_cache.mocks.dart new file mode 100644 index 000000000000..c5ccfa575adb --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/example_cache.mocks.dart @@ -0,0 +1,260 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/common/example_cache.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i6; +import 'dart:ui' as _i11; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/cache/example_cache.dart' as _i3; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i5; +import 'package:playground_components/src/models/example.dart' as _i2; +import 'package:playground_components/src/models/example_base.dart' as _i10; +import 'package:playground_components/src/models/example_view_options.dart' + as _i8; +import 'package:playground_components/src/models/loading_status.dart' as _i7; +import 'package:playground_components/src/models/sdk.dart' as _i4; +import 'package:playground_components/src/models/snippet_file.dart' as _i9; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExample_0 extends _i1.SmartFake implements _i2.Example { + _FakeExample_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExampleCache]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleCache extends _i1.Mock implements _i3.ExampleCache { + MockExampleCache() { + _i1.throwOnMissingStub(this); + } + + @override + Map<_i4.Sdk, List<_i5.CategoryWithExamples>> get categoryListsBySdk => + (super.noSuchMethod( + Invocation.getter(#categoryListsBySdk), + returnValue: <_i4.Sdk, List<_i5.CategoryWithExamples>>{}, + ) as Map<_i4.Sdk, List<_i5.CategoryWithExamples>>); + @override + Map<_i4.Sdk, _i2.Example> get defaultExamplesBySdk => (super.noSuchMethod( + Invocation.getter(#defaultExamplesBySdk), + returnValue: <_i4.Sdk, _i2.Example>{}, + ) as Map<_i4.Sdk, _i2.Example>); + @override + bool get isSelectorOpened => (super.noSuchMethod( + Invocation.getter(#isSelectorOpened), + returnValue: false, + ) as bool); + @override + set isSelectorOpened(bool? _isSelectorOpened) => super.noSuchMethod( + Invocation.setter( + #isSelectorOpened, + _isSelectorOpened, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future get allExamplesFuture => (super.noSuchMethod( + Invocation.getter(#allExamplesFuture), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i7.LoadingStatus get catalogStatus => (super.noSuchMethod( + Invocation.getter(#catalogStatus), + returnValue: _i7.LoadingStatus.loading, + ) as _i7.LoadingStatus); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future loadAllPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadAllPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + List<_i5.CategoryWithExamples> getCategories(_i4.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getCategories, + [sdk], + ), + returnValue: <_i5.CategoryWithExamples>[], + ) as List<_i5.CategoryWithExamples>); + @override + _i6.Future<_i2.Example> getPrecompiledObject( + String? path, + _i4.Sdk? sdk, + ) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + )), + ) as _i6.Future<_i2.Example>); + @override + _i6.Future<_i2.Example> loadSharedExample( + String? id, { + required _i8.ExampleViewOptions? viewOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + )), + ) as _i6.Future<_i2.Example>); + @override + _i6.Future saveSnippet({ + required List<_i9.SnippetFile>? files, + required _i4.Sdk? sdk, + required String? pipelineOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + { + #files: files, + #sdk: sdk, + #pipelineOptions: pipelineOptions, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i2.Example> loadExampleInfo(_i10.ExampleBase? example) => + (super.noSuchMethod( + Invocation.method( + #loadExampleInfo, + [example], + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #loadExampleInfo, + [example], + ), + )), + ) as _i6.Future<_i2.Example>); + @override + void setSelectorOpened(bool? value) => super.noSuchMethod( + Invocation.method( + #setSelectorOpened, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i2.Example?> getDefaultExampleBySdk(_i4.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getDefaultExampleBySdk, + [sdk], + ), + returnValue: _i6.Future<_i2.Example?>.value(), + ) as _i6.Future<_i2.Example?>); + @override + _i6.Future loadDefaultPrecompiledObjects() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjects, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future loadDefaultPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future<_i10.ExampleBase?> getCatalogExampleByPath(String? path) => + (super.noSuchMethod( + Invocation.method( + #getCatalogExampleByPath, + [path], + ), + returnValue: _i6.Future<_i10.ExampleBase?>.value(), + ) as _i6.Future<_i10.ExampleBase?>); + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/common/example_repository_mock.dart b/playground/frontend/build/playground_components/test/src/common/example_repository_mock.dart new file mode 100644 index 000000000000..5386e52144b2 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/example_repository_mock.dart @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/src/repositories/example_repository.dart'; + +import 'example_repository_mock.mocks.dart'; +import 'examples.dart'; +import 'requests.dart'; + +@GenerateMocks([ExampleRepository]) +MockExampleRepository getMockExampleRepository() { + final m = MockExampleRepository(); + + // stubs + when(m.getDefaultPrecompiledObject(kRequestDefaultExampleForJava)) + .thenAnswer((_) async => exampleBasePython3); + when(m.getDefaultPrecompiledObject(kRequestDefaultExampleForGo)) + .thenAnswer((_) async => exampleBasePython3); + when(m.getDefaultPrecompiledObject(kRequestDefaultExampleForPython)) + .thenAnswer((_) async => exampleBasePython3); + when(m.getDefaultPrecompiledObject(kRequestDefaultExampleForScio)) + .thenAnswer((_) async => exampleBasePython3); + + return m; +} diff --git a/playground/frontend/build/playground_components/test/src/common/example_repository_mock.mocks.dart b/playground/frontend/build/playground_components/test/src/common/example_repository_mock.mocks.dart new file mode 100644 index 000000000000..b426f3c01502 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/example_repository_mock.mocks.dart @@ -0,0 +1,180 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/common/example_repository_mock.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i7; +import 'package:playground_components/src/models/example_base.dart' as _i2; +import 'package:playground_components/src/models/sdk.dart' as _i6; +import 'package:playground_components/src/models/snippet_file.dart' as _i10; +import 'package:playground_components/src/repositories/example_repository.dart' + as _i4; +import 'package:playground_components/src/repositories/models/get_default_precompiled_object_request.dart' + as _i9; +import 'package:playground_components/src/repositories/models/get_precompiled_object_request.dart' + as _i11; +import 'package:playground_components/src/repositories/models/get_precompiled_objects_request.dart' + as _i8; +import 'package:playground_components/src/repositories/models/get_snippet_request.dart' + as _i12; +import 'package:playground_components/src/repositories/models/get_snippet_response.dart' + as _i3; +import 'package:playground_components/src/repositories/models/save_snippet_request.dart' + as _i13; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExampleBase_0 extends _i1.SmartFake implements _i2.ExampleBase { + _FakeExampleBase_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetSnippetResponse_1 extends _i1.SmartFake + implements _i3.GetSnippetResponse { + _FakeGetSnippetResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExampleRepository]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleRepository extends _i1.Mock implements _i4.ExampleRepository { + MockExampleRepository() { + _i1.throwOnMissingStub(this); + } + + @override + _i5.Future>> + getPrecompiledObjects(_i8.GetPrecompiledObjectsRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjects, + [request], + ), + returnValue: + _i5.Future>>.value( + <_i6.Sdk, List<_i7.CategoryWithExamples>>{}), + ) as _i5.Future>>); + @override + _i5.Future<_i2.ExampleBase> getDefaultPrecompiledObject( + _i9.GetDefaultPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getDefaultPrecompiledObject, + [request], + ), + returnValue: _i5.Future<_i2.ExampleBase>.value(_FakeExampleBase_0( + this, + Invocation.method( + #getDefaultPrecompiledObject, + [request], + ), + )), + ) as _i5.Future<_i2.ExampleBase>); + @override + _i5.Future> getPrecompiledObjectCode( + _i11.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectCode, + [request], + ), + returnValue: + _i5.Future>.value(<_i10.SnippetFile>[]), + ) as _i5.Future>); + @override + _i5.Future getPrecompiledObjectOutput( + _i11.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectOutput, + [request], + ), + returnValue: _i5.Future.value(''), + ) as _i5.Future); + @override + _i5.Future getPrecompiledObjectLogs( + _i11.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectLogs, + [request], + ), + returnValue: _i5.Future.value(''), + ) as _i5.Future); + @override + _i5.Future getPrecompiledObjectGraph( + _i11.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectGraph, + [request], + ), + returnValue: _i5.Future.value(''), + ) as _i5.Future); + @override + _i5.Future<_i2.ExampleBase> getPrecompiledObject( + _i11.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [request], + ), + returnValue: _i5.Future<_i2.ExampleBase>.value(_FakeExampleBase_0( + this, + Invocation.method( + #getPrecompiledObject, + [request], + ), + )), + ) as _i5.Future<_i2.ExampleBase>); + @override + _i5.Future<_i3.GetSnippetResponse> getSnippet( + _i12.GetSnippetRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getSnippet, + [request], + ), + returnValue: + _i5.Future<_i3.GetSnippetResponse>.value(_FakeGetSnippetResponse_1( + this, + Invocation.method( + #getSnippet, + [request], + ), + )), + ) as _i5.Future<_i3.GetSnippetResponse>); + @override + _i5.Future saveSnippet(_i13.SaveSnippetRequest? request) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [request], + ), + returnValue: _i5.Future.value(''), + ) as _i5.Future); +} diff --git a/playground/frontend/build/playground_components/test/src/common/examples.dart b/playground/frontend/build/playground_components/test/src/common/examples.dart new file mode 100644 index 000000000000..9a2a5f97b826 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/examples.dart @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/src/enums/complexity.dart'; +import 'package:playground_components/src/models/example.dart'; +import 'package:playground_components/src/models/example_base.dart'; +import 'package:playground_components/src/models/sdk.dart'; +import 'package:playground_components/src/models/snippet_file.dart'; + +const examplePython1 = Example( + complexity: Complexity.basic, + description: 'description', + files: [SnippetFile(content: 'ex1', isMain: true)], + name: 'Example X1', + path: 'SDK_PYTHON/Category/Name1', + sdk: Sdk.python, + tags: ['tag1'], + type: ExampleType.example, +); + +const examplePython2 = Example( + complexity: Complexity.basic, + description: 'description', + files: [SnippetFile(content: 'ex2', isMain: true)], + name: 'Kata', + path: 'SDK_PYTHON/Category/Name2', + sdk: Sdk.python, + tags: ['tag2'], + type: ExampleType.kata, +); + +const exampleBasePython3 = ExampleBase( + complexity: Complexity.basic, + description: 'description', + name: 'Test example', + path: 'SDK_PYTHON/Category/Name', + sdk: Sdk.python, + type: ExampleType.example, +); + +const examplePython3 = Example( + complexity: Complexity.basic, + description: 'description', + files: [SnippetFile(content: 'test source', isMain: true)], + graph: 'test graph', + logs: 'test logs', + name: 'Test example', + outputs: 'test outputs', + path: 'SDK_PYTHON/Category/Name', + sdk: Sdk.python, + type: ExampleType.example, +); + +const exampleGo4Multifile = Example( + files: [ + SnippetFile(content: 'go1', isMain: false, name: '1'), + SnippetFile(content: 'go2', isMain: true, name: '2'), + ], + name: 'exampleGo4Multifile', + sdk: Sdk.go, + type: ExampleType.example, + path: 'SDK_GO/Category/exampleGo4Multifile', +); + +const exampleGo5PipelineOptions = Example( + description: 'description', + files: [SnippetFile(content: 'test source', isMain: true)], + graph: 'test graph', + logs: 'test logs', + name: 'Test example', + outputs: 'test outputs', + path: 'SDK_PYTHON/Category/Name', + pipelineOptions: 'pipeline options', + sdk: Sdk.go, + type: ExampleType.example, +); + +const exampleGo6 = Example( + complexity: Complexity.medium, + description: 'description', + name: 'Example', + files: [SnippetFile(content: 'ex6', isMain: true)], + path: 'SDK_GO/Category/Name', + sdk: Sdk.go, + type: ExampleType.example, +); diff --git a/playground/frontend/build/playground_components/test/src/common/requests.dart b/playground/frontend/build/playground_components/test/src/common/requests.dart new file mode 100644 index 000000000000..f22014a40110 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/common/requests.dart @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/src/models/sdk.dart'; +import 'package:playground_components/src/models/snippet_file.dart'; +import 'package:playground_components/src/repositories/models/get_default_precompiled_object_request.dart'; +import 'package:playground_components/src/repositories/models/get_precompiled_object_code_response.dart'; +import 'package:playground_components/src/repositories/models/get_precompiled_object_request.dart'; +import 'package:playground_components/src/repositories/models/get_precompiled_object_response.dart'; +import 'package:playground_components/src/repositories/models/get_precompiled_objects_request.dart'; +import 'package:playground_components/src/repositories/models/get_precompiled_objects_response.dart'; +import 'package:playground_components/src/repositories/models/output_response.dart'; + +import 'categories.dart'; +import 'examples.dart'; + +const kGetPrecompiledObjectsRequest = GetPrecompiledObjectsRequest( + sdk: null, + category: null, +); +final kGetPrecompiledObjectsResponse = GetPrecompiledObjectsResponse( + categories: sdkCategoriesFromServerMock, +); + +const kGetDefaultPrecompiledObjectRequest = GetDefaultPrecompiledObjectRequest( + sdk: Sdk.java, +); +const kGetDefaultPrecompiledObjectResponse = GetPrecompiledObjectResponse( + example: examplePython1, +); + +const kGetPrecompiledObjectCodeResponse = GetPrecompiledObjectCodeResponse( + files: [SnippetFile(content: 'test source', isMain: true)], +); +const kOutputResponse = OutputResponse(output: 'test outputs'); + +const kRequestForExampleInfo = GetPrecompiledObjectRequest( + path: 'SDK_PYTHON/Category/Name', + sdk: Sdk.python, +); +const kRequestDefaultExampleForJava = GetDefaultPrecompiledObjectRequest( + sdk: Sdk.java, +); +const kRequestDefaultExampleForGo = GetDefaultPrecompiledObjectRequest( + sdk: Sdk.go, +); +const kRequestDefaultExampleForPython = GetDefaultPrecompiledObjectRequest( + sdk: Sdk.python, +); +const kRequestDefaultExampleForScio = GetDefaultPrecompiledObjectRequest( + sdk: Sdk.scio, +); diff --git a/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.dart b/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.dart new file mode 100644 index 000000000000..ff3766c43f39 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.dart @@ -0,0 +1,258 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/src/cache/example_cache.dart'; +import 'package:playground_components/src/controllers/code_runner.dart'; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart'; +import 'package:playground_components/src/controllers/snippet_editing_controller.dart'; +import 'package:playground_components/src/models/sdk.dart'; +import 'package:playground_components/src/repositories/code_client/code_client.dart'; +import 'package:playground_components/src/repositories/models/check_status_response.dart'; +import 'package:playground_components/src/repositories/models/output_response.dart'; +import 'package:playground_components/src/repositories/models/run_code_response.dart'; +import 'package:playground_components/src/repositories/models/run_code_result.dart'; + +import 'code_runner_test.mocks.dart'; + +const _sdk = Sdk.java; + +const kPipelineUuid = '1234'; +const kRunOutput = 'RunOutput'; +const kLogOutput = 'LogOutput'; +const kCompileOutput = 'CompileOutput'; +const kGraphOutput = 'GraphOutput'; +const kRunErrorOutput = 'RunErrorOutput'; +const kPreparationErrorOutput = 'PreparationErrorOutput'; +const kValidationErrorOutput = 'ValidationErrorOutput'; + +const kRunCodeResponse = RunCodeResponse(pipelineUuid: kPipelineUuid); +const kFinishedStatusResponse = CheckStatusResponse( + status: RunCodeStatus.finished, +); +const kRunErrorStatusResponse = CheckStatusResponse( + status: RunCodeStatus.runError, +); +const kCompileErrorStatusResponse = CheckStatusResponse( + status: RunCodeStatus.compileError, +); +const kValidationErrorStatusResponse = CheckStatusResponse( + status: RunCodeStatus.validationError, +); +const kPreparationErrorStatusResponse = CheckStatusResponse( + status: RunCodeStatus.preparationError, +); + +const kRunOutputResponse = OutputResponse(output: kRunOutput); +const kLogOutputResponse = OutputResponse(output: kLogOutput); +const kCompileOutputResponse = OutputResponse(output: kCompileOutput); +const kRunErrorOutputResponse = OutputResponse(output: kRunErrorOutput); +const kGraphResponse = OutputResponse(output: kGraphOutput); + +const kValidationErrorOutputResponse = + OutputResponse(output: kValidationErrorOutput); + +const kPreparationErrorOutputResponse = + OutputResponse(output: kPreparationErrorOutput); + +@GenerateMocks([CodeClient, ExamplesLoader, ExampleCache]) +void main() { + var results = []; + var client = MockCodeClient(); + var runner = CodeRunner( + snippetEditingControllerGetter: () => SnippetEditingController(sdk: _sdk), + ); + + setUp(() async { + results = []; + client = MockCodeClient(); + runner = CodeRunner( + snippetEditingControllerGetter: () => SnippetEditingController(sdk: _sdk), + codeClient: client, + ); + + runner.addListener(() { + results.add(runner.result); + }); + + when(client.runCode(any)).thenAnswer( + (_) async => kRunCodeResponse, + ); + when(client.getCompileOutput(kPipelineUuid)).thenAnswer( + (_) async => kCompileOutputResponse, + ); + when(client.getRunOutput(kPipelineUuid)).thenAnswer( + (_) async => kRunOutputResponse, + ); + when(client.getRunErrorOutput(kPipelineUuid)).thenAnswer( + (_) async => kRunErrorOutputResponse, + ); + when(client.getLogOutput(kPipelineUuid)).thenAnswer( + (_) async => kLogOutputResponse, + ); + when(client.getGraphOutput(kPipelineUuid)).thenAnswer( + (_) async => kGraphResponse, + ); + when(client.getValidationErrorOutput(kPipelineUuid)).thenAnswer( + (_) async => kValidationErrorOutputResponse, + ); + when(client.getPreparationErrorOutput(kPipelineUuid)).thenAnswer( + (_) async => kPreparationErrorOutputResponse, + ); + }); + + group('CodeRunner.runCode', () { + test('finished', () async { + when(client.checkStatus(kPipelineUuid)).thenAnswer( + (_) async => kFinishedStatusResponse, + ); + + await runner.runCode(); + + expect( + results, + const [ + RunCodeResult( + log: kProcessingStartedText, + sdk: _sdk, + status: RunCodeStatus.preparation, + ), + RunCodeResult( + pipelineUuid: kPipelineUuid, + output: kRunOutput + kRunErrorOutput, + log: kProcessingStartedText + kLogOutput, + graph: kGraphOutput, + sdk: _sdk, + status: RunCodeStatus.finished, + ), + ], + ); + + // compile output should not be called + verifyNever(client.getCompileOutput(kPipelineUuid)); + }); + + test('compileError', () async { + when(client.checkStatus(kPipelineUuid)).thenAnswer( + (_) async => kCompileErrorStatusResponse, + ); + + await runner.runCode(); + + expect( + results, + const [ + RunCodeResult( + log: kProcessingStartedText, + sdk: _sdk, + status: RunCodeStatus.preparation, + ), + RunCodeResult( + graph: '', + log: kProcessingStartedText, + output: kCompileOutput, + pipelineUuid: kPipelineUuid, + sdk: _sdk, + status: RunCodeStatus.compileError, + ), + ], + ); + }); + + test('validationError', () async { + when(client.checkStatus(kPipelineUuid)).thenAnswer( + (_) async => kValidationErrorStatusResponse, + ); + + await runner.runCode(); + + expect( + results, + const [ + RunCodeResult( + log: kProcessingStartedText, + sdk: _sdk, + status: RunCodeStatus.preparation, + ), + RunCodeResult( + graph: '', + log: kProcessingStartedText, + output: kValidationErrorOutput, + sdk: _sdk, + status: RunCodeStatus.validationError, + ), + ], + ); + }); + + test('preparationError', () async { + when(client.checkStatus(kPipelineUuid)).thenAnswer( + (_) async => kPreparationErrorStatusResponse, + ); + + await runner.runCode(); + + expect( + results, + const [ + RunCodeResult( + log: kProcessingStartedText, + sdk: _sdk, + status: RunCodeStatus.preparation, + ), + RunCodeResult( + graph: '', + log: kProcessingStartedText, + output: kPreparationErrorOutput, + sdk: _sdk, + status: RunCodeStatus.preparationError, + ), + ], + ); + }); + + test('runError', () async { + when(client.checkStatus(kPipelineUuid)).thenAnswer( + (_) async => kRunErrorStatusResponse, + ); + + await runner.runCode(); + + expect( + results, + const [ + RunCodeResult( + log: kProcessingStartedText, + sdk: _sdk, + status: RunCodeStatus.preparation, + ), + RunCodeResult( + graph: '', + log: kProcessingStartedText, + output: kRunErrorOutput, + pipelineUuid: kPipelineUuid, + sdk: _sdk, + status: RunCodeStatus.runError, + ), + ], + ); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.mocks.dart b/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.mocks.dart new file mode 100644 index 000000000000..892ad2d46dfb --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/code_runner_test.mocks.dart @@ -0,0 +1,564 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/controllers/code_runner_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i9; +import 'dart:ui' as _i21; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/api/v1/api.pb.dart' as _i2; +import 'package:playground_components/src/cache/example_cache.dart' as _i15; +import 'package:playground_components/src/controllers/example_loaders/example_loader_factory.dart' + as _i6; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart' + as _i12; +import 'package:playground_components/src/controllers/playground_controller.dart' + as _i13; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i16; +import 'package:playground_components/src/models/example.dart' as _i7; +import 'package:playground_components/src/models/example_base.dart' as _i20; +import 'package:playground_components/src/models/example_loading_descriptors/examples_loading_descriptor.dart' + as _i14; +import 'package:playground_components/src/models/example_view_options.dart' + as _i18; +import 'package:playground_components/src/models/loading_status.dart' as _i17; +import 'package:playground_components/src/models/sdk.dart' as _i10; +import 'package:playground_components/src/models/snippet_file.dart' as _i19; +import 'package:playground_components/src/repositories/code_client/code_client.dart' + as _i8; +import 'package:playground_components/src/repositories/models/check_status_response.dart' + as _i4; +import 'package:playground_components/src/repositories/models/output_response.dart' + as _i5; +import 'package:playground_components/src/repositories/models/run_code_request.dart' + as _i11; +import 'package:playground_components/src/repositories/models/run_code_response.dart' + as _i3; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeGetMetadataResponse_0 extends _i1.SmartFake + implements _i2.GetMetadataResponse { + _FakeGetMetadataResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRunCodeResponse_1 extends _i1.SmartFake + implements _i3.RunCodeResponse { + _FakeRunCodeResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCheckStatusResponse_2 extends _i1.SmartFake + implements _i4.CheckStatusResponse { + _FakeCheckStatusResponse_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeOutputResponse_3 extends _i1.SmartFake + implements _i5.OutputResponse { + _FakeOutputResponse_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExampleLoaderFactory_4 extends _i1.SmartFake + implements _i6.ExampleLoaderFactory { + _FakeExampleLoaderFactory_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExample_5 extends _i1.SmartFake implements _i7.Example { + _FakeExample_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [CodeClient]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCodeClient extends _i1.Mock implements _i8.CodeClient { + MockCodeClient() { + _i1.throwOnMissingStub(this); + } + + @override + _i9.Future<_i2.GetMetadataResponse> getMetadata(_i10.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getMetadata, + [sdk], + ), + returnValue: _i9.Future<_i2.GetMetadataResponse>.value( + _FakeGetMetadataResponse_0( + this, + Invocation.method( + #getMetadata, + [sdk], + ), + )), + ) as _i9.Future<_i2.GetMetadataResponse>); + @override + _i9.Future<_i3.RunCodeResponse> runCode(_i11.RunCodeRequest? request) => + (super.noSuchMethod( + Invocation.method( + #runCode, + [request], + ), + returnValue: + _i9.Future<_i3.RunCodeResponse>.value(_FakeRunCodeResponse_1( + this, + Invocation.method( + #runCode, + [request], + ), + )), + ) as _i9.Future<_i3.RunCodeResponse>); + @override + _i9.Future cancelExecution(String? pipelineUuid) => (super.noSuchMethod( + Invocation.method( + #cancelExecution, + [pipelineUuid], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + _i9.Future<_i4.CheckStatusResponse> checkStatus(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #checkStatus, + [pipelineUuid], + ), + returnValue: _i9.Future<_i4.CheckStatusResponse>.value( + _FakeCheckStatusResponse_2( + this, + Invocation.method( + #checkStatus, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i4.CheckStatusResponse>); + @override + _i9.Future<_i5.OutputResponse> getCompileOutput(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getCompileOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getCompileOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getRunOutput(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getRunOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getRunOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getLogOutput(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getLogOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getLogOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getRunErrorOutput(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getRunErrorOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getRunErrorOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getValidationErrorOutput( + String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getValidationErrorOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getValidationErrorOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getPreparationErrorOutput( + String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getPreparationErrorOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getPreparationErrorOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); + @override + _i9.Future<_i5.OutputResponse> getGraphOutput(String? pipelineUuid) => + (super.noSuchMethod( + Invocation.method( + #getGraphOutput, + [pipelineUuid], + ), + returnValue: _i9.Future<_i5.OutputResponse>.value(_FakeOutputResponse_3( + this, + Invocation.method( + #getGraphOutput, + [pipelineUuid], + ), + )), + ) as _i9.Future<_i5.OutputResponse>); +} + +/// A class which mocks [ExamplesLoader]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExamplesLoader extends _i1.Mock implements _i12.ExamplesLoader { + MockExamplesLoader() { + _i1.throwOnMissingStub(this); + } + + @override + _i6.ExampleLoaderFactory get defaultFactory => (super.noSuchMethod( + Invocation.getter(#defaultFactory), + returnValue: _FakeExampleLoaderFactory_4( + this, + Invocation.getter(#defaultFactory), + ), + ) as _i6.ExampleLoaderFactory); + @override + void setPlaygroundController(_i13.PlaygroundController? value) => + super.noSuchMethod( + Invocation.method( + #setPlaygroundController, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i9.Future loadIfNew(_i14.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #loadIfNew, + [descriptor], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + _i9.Future load(_i14.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #load, + [descriptor], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + _i9.Future loadDefaultIfAny(_i10.Sdk? sdk) => (super.noSuchMethod( + Invocation.method( + #loadDefaultIfAny, + [sdk], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); +} + +/// A class which mocks [ExampleCache]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleCache extends _i1.Mock implements _i15.ExampleCache { + MockExampleCache() { + _i1.throwOnMissingStub(this); + } + + @override + Map<_i10.Sdk, List<_i16.CategoryWithExamples>> get categoryListsBySdk => + (super.noSuchMethod( + Invocation.getter(#categoryListsBySdk), + returnValue: <_i10.Sdk, List<_i16.CategoryWithExamples>>{}, + ) as Map<_i10.Sdk, List<_i16.CategoryWithExamples>>); + @override + Map<_i10.Sdk, _i7.Example> get defaultExamplesBySdk => (super.noSuchMethod( + Invocation.getter(#defaultExamplesBySdk), + returnValue: <_i10.Sdk, _i7.Example>{}, + ) as Map<_i10.Sdk, _i7.Example>); + @override + bool get isSelectorOpened => (super.noSuchMethod( + Invocation.getter(#isSelectorOpened), + returnValue: false, + ) as bool); + @override + set isSelectorOpened(bool? _isSelectorOpened) => super.noSuchMethod( + Invocation.setter( + #isSelectorOpened, + _isSelectorOpened, + ), + returnValueForMissingStub: null, + ); + @override + _i9.Future get allExamplesFuture => (super.noSuchMethod( + Invocation.getter(#allExamplesFuture), + returnValue: _i9.Future.value(), + ) as _i9.Future); + @override + _i17.LoadingStatus get catalogStatus => (super.noSuchMethod( + Invocation.getter(#catalogStatus), + returnValue: _i17.LoadingStatus.loading, + ) as _i17.LoadingStatus); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i9.Future loadAllPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadAllPrecompiledObjectsIfNot, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + List<_i16.CategoryWithExamples> getCategories(_i10.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getCategories, + [sdk], + ), + returnValue: <_i16.CategoryWithExamples>[], + ) as List<_i16.CategoryWithExamples>); + @override + _i9.Future<_i7.Example> getPrecompiledObject( + String? path, + _i10.Sdk? sdk, + ) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + returnValue: _i9.Future<_i7.Example>.value(_FakeExample_5( + this, + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + )), + ) as _i9.Future<_i7.Example>); + @override + _i9.Future<_i7.Example> loadSharedExample( + String? id, { + required _i18.ExampleViewOptions? viewOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + returnValue: _i9.Future<_i7.Example>.value(_FakeExample_5( + this, + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + )), + ) as _i9.Future<_i7.Example>); + @override + _i9.Future saveSnippet({ + required List<_i19.SnippetFile>? files, + required _i10.Sdk? sdk, + required String? pipelineOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + { + #files: files, + #sdk: sdk, + #pipelineOptions: pipelineOptions, + }, + ), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override + _i9.Future<_i7.Example> loadExampleInfo(_i20.ExampleBase? example) => + (super.noSuchMethod( + Invocation.method( + #loadExampleInfo, + [example], + ), + returnValue: _i9.Future<_i7.Example>.value(_FakeExample_5( + this, + Invocation.method( + #loadExampleInfo, + [example], + ), + )), + ) as _i9.Future<_i7.Example>); + @override + void setSelectorOpened(bool? value) => super.noSuchMethod( + Invocation.method( + #setSelectorOpened, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i9.Future<_i7.Example?> getDefaultExampleBySdk(_i10.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getDefaultExampleBySdk, + [sdk], + ), + returnValue: _i9.Future<_i7.Example?>.value(), + ) as _i9.Future<_i7.Example?>); + @override + _i9.Future loadDefaultPrecompiledObjects() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjects, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + _i9.Future loadDefaultPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjectsIfNot, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + @override + _i9.Future<_i20.ExampleBase?> getCatalogExampleByPath(String? path) => + (super.noSuchMethod( + Invocation.method( + #getCatalogExampleByPath, + [path], + ), + returnValue: _i9.Future<_i20.ExampleBase?>.value(), + ) as _i9.Future<_i20.ExampleBase?>); + @override + void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/common.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/common.dart new file mode 100644 index 000000000000..714bea3c3c93 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/common.dart @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/example_loaders/example_loader.dart'; +import 'package:playground_components/src/controllers/example_loaders/example_loader_factory.dart'; + +class TestExampleLoadingDescriptor extends ExampleLoadingDescriptor { + @override + final Sdk? sdk; + + final bool succeed; + + const TestExampleLoadingDescriptor( + this.sdk, { + this.succeed = true, + }); + + @override + List get props => [sdk, succeed]; + + @override + ExampleLoadingDescriptor copyWithoutViewOptions() => this; + + @override + Map toJson() => throw UnimplementedError(); + + @override + bool get isSerializableToUrl => true; +} + +class TestExampleLoader extends ExampleLoader { + @override + final TestExampleLoadingDescriptor descriptor; + + final Example? example; + + TestExampleLoader(this.descriptor) + : example = descriptor.sdk == null + ? null + : Example( + files: [SnippetFile(content: descriptor.sdk!.id, isMain: true)], + name: descriptor.sdk!.id, + path: descriptor.sdk!.id, + sdk: descriptor.sdk!, + type: ExampleType.example, + ); + + @override + Sdk? get sdk => descriptor.sdk; + + @override + Future get future async { + if (descriptor.succeed && example != null) { + return example!; + } + + throw Exception(); + } + + static void register(ExampleLoaderFactory factory) { + factory.add( + ({ + required TestExampleLoadingDescriptor descriptor, + required ExampleCache exampleCache, + }) => + TestExampleLoader(descriptor), + ); + } +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/example_loader_factory_test.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/example_loader_factory_test.dart new file mode 100644 index 000000000000..4d698333cec7 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/example_loader_factory_test.dart @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/example_loaders/example_loader_factory.dart'; + +import '../../common/example_cache.mocks.dart'; +import 'common.dart'; + +void main() { + late ExampleLoaderFactory factory; + final cache = MockExampleCache(); + + setUp(() { + factory = ExampleLoaderFactory(); + TestExampleLoader.register(factory); + }); + + group('ExampleLoaderFactory', () { + test('creates loaders', () { + const descriptor = TestExampleLoadingDescriptor(Sdk.go); + final loader = + factory.create(descriptor: descriptor, exampleCache: cache); + + expect(loader, isA()); + }); + + test('null for unregistered type', () { + final descriptor = _UnregisteredDescriptor(); + final loader = + factory.create(descriptor: descriptor, exampleCache: cache); + + expect(loader, null); + }); + }); +} + +class _UnregisteredDescriptor extends ExampleLoadingDescriptor { + @override + List get props => []; + + @override + ExampleLoadingDescriptor copyWithoutViewOptions() => this; + + @override + Map toJson() => throw UnimplementedError(); + + @override + bool get isSerializableToUrl => true; +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.dart new file mode 100644 index 000000000000..d3dbd1c09c06 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.dart @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; +import 'examples_loader_test.mocks.dart'; + +@GenerateMocks([PlaygroundController, ExampleCache]) +void main() async { + late ExamplesLoader examplesLoader; + late MockPlaygroundController playgroundController; + final setExampleTrue = []; + final setExampleFalse = []; + final setEmptyIfNotExistsTrue = []; + final setEmptyIfNotExistsFalse = []; + + await PlaygroundComponents.ensureInitialized(); + + setUp(() { + setExampleTrue.clear(); + setExampleFalse.clear(); + setEmptyIfNotExistsTrue.clear(); + setEmptyIfNotExistsFalse.clear(); + + playgroundController = MockPlaygroundController(); + + when( + playgroundController.setExample( + any, + descriptor: anyNamed('descriptor'), + setCurrentSdk: true, + ), + ).thenAnswer((realInvocation) { + final example = realInvocation.positionalArguments[0] as Example; + setExampleTrue.add(example.name); + }); + when( + playgroundController.setExample( + any, + descriptor: anyNamed('descriptor'), + setCurrentSdk: false, + ), + ).thenAnswer((realInvocation) { + final example = realInvocation.positionalArguments[0] as Example; + setExampleFalse.add(example.name); + }); + when(playgroundController.setEmptyIfNotExists(any, setCurrentSdk: true)) + .thenAnswer((realInvocation) { + final sdk = realInvocation.positionalArguments[0] as Sdk; + setEmptyIfNotExistsTrue.add(sdk); + }); + when(playgroundController.setEmptyIfNotExists(any, setCurrentSdk: false)) + .thenAnswer((realInvocation) { + final sdk = realInvocation.positionalArguments[0] as Sdk; + setEmptyIfNotExistsFalse.add(sdk); + }); + + final exampleCache = MockExampleCache(); + when(playgroundController.exampleCache).thenReturn(exampleCache); + + examplesLoader = ExamplesLoader(); + examplesLoader.setPlaygroundController(playgroundController); + TestExampleLoader.register(examplesLoader.defaultFactory); + }); + + group('ExamplesLoader.', () { + group('load.', () { + group('Success.', () { + test('Race to set current SDK if not set', () async { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [ + TestExampleLoadingDescriptor(Sdk.go), + TestExampleLoadingDescriptor(Sdk.python), + ], + lazyLoadDescriptors: { + Sdk.scio: const [TestExampleLoadingDescriptor(Sdk.scio)], + }, + ); + + await examplesLoader.loadIfNew(descriptor); + + expect(setExampleTrue, [Sdk.go.id, Sdk.python.id]); + expect(setExampleFalse, []); + }); + + test('Example with initialSdk sets the current SDK', () async { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [ + TestExampleLoadingDescriptor(Sdk.go), + TestExampleLoadingDescriptor(Sdk.python), + ], + lazyLoadDescriptors: { + Sdk.scio: const [TestExampleLoadingDescriptor(Sdk.scio)], + }, + initialSdk: Sdk.python, + ); + + await examplesLoader.loadIfNew(descriptor); + + expect(setExampleTrue, [Sdk.python.id]); + expect(setExampleFalse, [Sdk.go.id]); + }); + }); + + group('Error.', () { + test('Load empty example instead', () async { + const descriptor = ExamplesLoadingDescriptor( + descriptors: [ + TestExampleLoadingDescriptor(Sdk.go, succeed: false), + TestExampleLoadingDescriptor(Sdk.python, succeed: false), + ], + initialSdk: Sdk.python, + ); + + await examplesLoader.loadIfNew(descriptor); + + expect(setEmptyIfNotExistsTrue, [Sdk.python]); + expect(setEmptyIfNotExistsFalse, [Sdk.go]); + }); + }); + + // TODO(alexeyinkin): Test lazy loading, https://github.com/apache/beam/issues/24351 + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.mocks.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.mocks.dart new file mode 100644 index 000000000000..4d8594647367 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/examples_loader_test.mocks.dart @@ -0,0 +1,657 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/controllers/example_loaders/examples_loader_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i14; +import 'dart:ui' as _i17; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/cache/example_cache.dart' as _i2; +import 'package:playground_components/src/controllers/code_runner.dart' as _i5; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart' + as _i3; +import 'package:playground_components/src/controllers/playground_controller.dart' + as _i12; +import 'package:playground_components/src/controllers/result_filter_controller.dart' + as _i4; +import 'package:playground_components/src/controllers/snippet_editing_controller.dart' + as _i8; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i18; +import 'package:playground_components/src/models/event_snippet_context.dart' + as _i7; +import 'package:playground_components/src/models/example.dart' as _i11; +import 'package:playground_components/src/models/example_base.dart' as _i15; +import 'package:playground_components/src/models/example_loading_descriptors/example_loading_descriptor.dart' + as _i16; +import 'package:playground_components/src/models/example_loading_descriptors/examples_loading_descriptor.dart' + as _i10; +import 'package:playground_components/src/models/example_loading_descriptors/user_shared_example_loading_descriptor.dart' + as _i9; +import 'package:playground_components/src/models/example_view_options.dart' + as _i20; +import 'package:playground_components/src/models/loading_status.dart' as _i19; +import 'package:playground_components/src/models/sdk.dart' as _i13; +import 'package:playground_components/src/models/shortcut.dart' as _i6; +import 'package:playground_components/src/models/snippet_file.dart' as _i21; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExampleCache_0 extends _i1.SmartFake implements _i2.ExampleCache { + _FakeExampleCache_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExamplesLoader_1 extends _i1.SmartFake + implements _i3.ExamplesLoader { + _FakeExamplesLoader_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeResultFilterController_2 extends _i1.SmartFake + implements _i4.ResultFilterController { + _FakeResultFilterController_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCodeRunner_3 extends _i1.SmartFake implements _i5.CodeRunner { + _FakeCodeRunner_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeBeamShortcut_4 extends _i1.SmartFake implements _i6.BeamShortcut { + _FakeBeamShortcut_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeEventSnippetContext_5 extends _i1.SmartFake + implements _i7.EventSnippetContext { + _FakeEventSnippetContext_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSnippetEditingController_6 extends _i1.SmartFake + implements _i8.SnippetEditingController { + _FakeSnippetEditingController_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUserSharedExampleLoadingDescriptor_7 extends _i1.SmartFake + implements _i9.UserSharedExampleLoadingDescriptor { + _FakeUserSharedExampleLoadingDescriptor_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExamplesLoadingDescriptor_8 extends _i1.SmartFake + implements _i10.ExamplesLoadingDescriptor { + _FakeExamplesLoadingDescriptor_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExample_9 extends _i1.SmartFake implements _i11.Example { + _FakeExample_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [PlaygroundController]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPlaygroundController extends _i1.Mock + implements _i12.PlaygroundController { + MockPlaygroundController() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.ExampleCache get exampleCache => (super.noSuchMethod( + Invocation.getter(#exampleCache), + returnValue: _FakeExampleCache_0( + this, + Invocation.getter(#exampleCache), + ), + ) as _i2.ExampleCache); + @override + _i3.ExamplesLoader get examplesLoader => (super.noSuchMethod( + Invocation.getter(#examplesLoader), + returnValue: _FakeExamplesLoader_1( + this, + Invocation.getter(#examplesLoader), + ), + ) as _i3.ExamplesLoader); + @override + _i4.ResultFilterController get resultFilterController => (super.noSuchMethod( + Invocation.getter(#resultFilterController), + returnValue: _FakeResultFilterController_2( + this, + Invocation.getter(#resultFilterController), + ), + ) as _i4.ResultFilterController); + @override + _i5.CodeRunner get codeRunner => (super.noSuchMethod( + Invocation.getter(#codeRunner), + returnValue: _FakeCodeRunner_3( + this, + Invocation.getter(#codeRunner), + ), + ) as _i5.CodeRunner); + @override + set codeRunner(_i5.CodeRunner? _codeRunner) => super.noSuchMethod( + Invocation.setter( + #codeRunner, + _codeRunner, + ), + returnValueForMissingStub: null, + ); + @override + _i6.BeamShortcut get resetShortcut => (super.noSuchMethod( + Invocation.getter(#resetShortcut), + returnValue: _FakeBeamShortcut_4( + this, + Invocation.getter(#resetShortcut), + ), + ) as _i6.BeamShortcut); + @override + set resetShortcut(_i6.BeamShortcut? _resetShortcut) => super.noSuchMethod( + Invocation.setter( + #resetShortcut, + _resetShortcut, + ), + returnValueForMissingStub: null, + ); + @override + _i6.BeamShortcut get showSuggestionsShortcut => (super.noSuchMethod( + Invocation.getter(#showSuggestionsShortcut), + returnValue: _FakeBeamShortcut_4( + this, + Invocation.getter(#showSuggestionsShortcut), + ), + ) as _i6.BeamShortcut); + @override + set showSuggestionsShortcut(_i6.BeamShortcut? _showSuggestionsShortcut) => + super.noSuchMethod( + Invocation.setter( + #showSuggestionsShortcut, + _showSuggestionsShortcut, + ), + returnValueForMissingStub: null, + ); + @override + String get examplesTitle => (super.noSuchMethod( + Invocation.getter(#examplesTitle), + returnValue: '', + ) as String); + @override + _i7.EventSnippetContext get eventSnippetContext => (super.noSuchMethod( + Invocation.getter(#eventSnippetContext), + returnValue: _FakeEventSnippetContext_5( + this, + Invocation.getter(#eventSnippetContext), + ), + ) as _i7.EventSnippetContext); + @override + bool get graphAvailable => (super.noSuchMethod( + Invocation.getter(#graphAvailable), + returnValue: false, + ) as bool); + @override + List<_i6.BeamShortcut> get shortcuts => (super.noSuchMethod( + Invocation.getter(#shortcuts), + returnValue: <_i6.BeamShortcut>[], + ) as List<_i6.BeamShortcut>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.SnippetEditingController requireSnippetEditingController() => + (super.noSuchMethod( + Invocation.method( + #requireSnippetEditingController, + [], + ), + returnValue: _FakeSnippetEditingController_6( + this, + Invocation.method( + #requireSnippetEditingController, + [], + ), + ), + ) as _i8.SnippetEditingController); + @override + void setEmptyIfNoSdk(_i13.Sdk? sdk) => super.noSuchMethod( + Invocation.method( + #setEmptyIfNoSdk, + [sdk], + ), + returnValueForMissingStub: null, + ); + @override + void setEmptyIfNotExists( + _i13.Sdk? sdk, { + required bool? setCurrentSdk, + }) => + super.noSuchMethod( + Invocation.method( + #setEmptyIfNotExists, + [sdk], + {#setCurrentSdk: setCurrentSdk}, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future setExampleBase(_i15.ExampleBase? exampleBase) => + (super.noSuchMethod( + Invocation.method( + #setExampleBase, + [exampleBase], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + void setExample( + _i11.Example? example, { + required _i16.ExampleLoadingDescriptor? descriptor, + required bool? setCurrentSdk, + }) => + super.noSuchMethod( + Invocation.method( + #setExample, + [example], + { + #descriptor: descriptor, + #setCurrentSdk: setCurrentSdk, + }, + ), + returnValueForMissingStub: null, + ); + @override + void setSdk( + _i13.Sdk? sdk, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setSdk, + [sdk], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future reset() => (super.noSuchMethod( + Invocation.method( + #reset, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + void showSuggestions() => super.noSuchMethod( + Invocation.method( + #showSuggestions, + [], + ), + returnValueForMissingStub: null, + ); + @override + void resetErrorMessageText() => super.noSuchMethod( + Invocation.method( + #resetErrorMessageText, + [], + ), + returnValueForMissingStub: null, + ); + @override + void setPipelineOptions(String? options) => super.noSuchMethod( + Invocation.method( + #setPipelineOptions, + [options], + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future<_i9.UserSharedExampleLoadingDescriptor> saveSnippet() => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + ), + returnValue: _i14.Future<_i9.UserSharedExampleLoadingDescriptor>.value( + _FakeUserSharedExampleLoadingDescriptor_7( + this, + Invocation.method( + #saveSnippet, + [], + ), + )), + ) as _i14.Future<_i9.UserSharedExampleLoadingDescriptor>); + @override + _i10.ExamplesLoadingDescriptor getLoadingDescriptor() => (super.noSuchMethod( + Invocation.method( + #getLoadingDescriptor, + [], + ), + returnValue: _FakeExamplesLoadingDescriptor_8( + this, + Invocation.method( + #getLoadingDescriptor, + [], + ), + ), + ) as _i10.ExamplesLoadingDescriptor); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ExampleCache]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleCache extends _i1.Mock implements _i2.ExampleCache { + MockExampleCache() { + _i1.throwOnMissingStub(this); + } + + @override + Map<_i13.Sdk, List<_i18.CategoryWithExamples>> get categoryListsBySdk => + (super.noSuchMethod( + Invocation.getter(#categoryListsBySdk), + returnValue: <_i13.Sdk, List<_i18.CategoryWithExamples>>{}, + ) as Map<_i13.Sdk, List<_i18.CategoryWithExamples>>); + @override + Map<_i13.Sdk, _i11.Example> get defaultExamplesBySdk => (super.noSuchMethod( + Invocation.getter(#defaultExamplesBySdk), + returnValue: <_i13.Sdk, _i11.Example>{}, + ) as Map<_i13.Sdk, _i11.Example>); + @override + bool get isSelectorOpened => (super.noSuchMethod( + Invocation.getter(#isSelectorOpened), + returnValue: false, + ) as bool); + @override + set isSelectorOpened(bool? _isSelectorOpened) => super.noSuchMethod( + Invocation.setter( + #isSelectorOpened, + _isSelectorOpened, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future get allExamplesFuture => (super.noSuchMethod( + Invocation.getter(#allExamplesFuture), + returnValue: _i14.Future.value(), + ) as _i14.Future); + @override + _i19.LoadingStatus get catalogStatus => (super.noSuchMethod( + Invocation.getter(#catalogStatus), + returnValue: _i19.LoadingStatus.loading, + ) as _i19.LoadingStatus); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i14.Future loadAllPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadAllPrecompiledObjectsIfNot, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + List<_i18.CategoryWithExamples> getCategories(_i13.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getCategories, + [sdk], + ), + returnValue: <_i18.CategoryWithExamples>[], + ) as List<_i18.CategoryWithExamples>); + @override + _i14.Future<_i11.Example> getPrecompiledObject( + String? path, + _i13.Sdk? sdk, + ) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + returnValue: _i14.Future<_i11.Example>.value(_FakeExample_9( + this, + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + )), + ) as _i14.Future<_i11.Example>); + @override + _i14.Future<_i11.Example> loadSharedExample( + String? id, { + required _i20.ExampleViewOptions? viewOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + returnValue: _i14.Future<_i11.Example>.value(_FakeExample_9( + this, + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + )), + ) as _i14.Future<_i11.Example>); + @override + _i14.Future saveSnippet({ + required List<_i21.SnippetFile>? files, + required _i13.Sdk? sdk, + required String? pipelineOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + { + #files: files, + #sdk: sdk, + #pipelineOptions: pipelineOptions, + }, + ), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + _i14.Future<_i11.Example> loadExampleInfo(_i15.ExampleBase? example) => + (super.noSuchMethod( + Invocation.method( + #loadExampleInfo, + [example], + ), + returnValue: _i14.Future<_i11.Example>.value(_FakeExample_9( + this, + Invocation.method( + #loadExampleInfo, + [example], + ), + )), + ) as _i14.Future<_i11.Example>); + @override + void setSelectorOpened(bool? value) => super.noSuchMethod( + Invocation.method( + #setSelectorOpened, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future<_i11.Example?> getDefaultExampleBySdk(_i13.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getDefaultExampleBySdk, + [sdk], + ), + returnValue: _i14.Future<_i11.Example?>.value(), + ) as _i14.Future<_i11.Example?>); + @override + _i14.Future loadDefaultPrecompiledObjects() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjects, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future loadDefaultPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjectsIfNot, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future<_i15.ExampleBase?> getCatalogExampleByPath(String? path) => + (super.noSuchMethod( + Invocation.method( + #getCatalogExampleByPath, + [path], + ), + returnValue: _i14.Future<_i15.ExampleBase?>.value(), + ) as _i14.Future<_i15.ExampleBase?>); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/hive_example_loader_test.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/hive_example_loader_test.dart new file mode 100644 index 000000000000..7975bda8d594 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/hive_example_loader_test.dart @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:convert'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:hive/hive.dart'; +import 'package:hive_test/hive_test.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/example_loaders/hive_example_loader.dart'; + +import '../../common/example_cache.mocks.dart'; + +const _example = Example( + files: [], + name: 'name', + sdk: Sdk.go, + type: ExampleType.example, + path: 'path', +); + +void main() { + test('HiveExampleLoader loads locally stored example', () async { + await setUpTestHive(); + + const descriptor = HiveExampleLoadingDescriptor( + sdk: Sdk.go, + boxName: 'boxName', + snippetId: 'snippetId', + ); + + final box = await Hive.openBox(descriptor.boxName); + await box.put(descriptor.snippetId, jsonEncode(_example.toJson())); + + final loader = HiveExampleLoader( + descriptor: descriptor, + exampleCache: MockExampleCache(), + ); + + final exampleFromHive = await loader.future; + + expect(exampleFromHive.name, _example.name); + expect(exampleFromHive.sdk.id, _example.sdk.id); + + await tearDownTestHive(); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.dart new file mode 100644 index 000000000000..b44ec6f81b5e --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.dart @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/example_loaders/http_example_loader.dart'; + +import 'http_example_loader_test.mocks.dart'; + +// A random small file at a specific revision. +const _name = 'section-remote-info.yaml'; +const _path = + 'https://raw.githubusercontent.com/apache/beam/238356dade3df54ea3d3f84a7424fa5c99bf37a4/learning/katas/go/core_transforms/$_name'; + +const _contents = ''' +id: 131788 +update_date: Mon, 27 Jul 2020 18:50:54 UTC +'''; + +const _sdk = Sdk.go; + +@GenerateMocks([ExampleCache]) +void main() { + test('HttpExampleLoader', () async { + final loader = HttpExampleLoader( + descriptor: HttpExampleLoadingDescriptor( + sdk: _sdk, + uri: Uri.parse(_path), + ), + exampleCache: MockExampleCache(), + ); + + final example = await loader.future; + + // TODO(alexeyinkin): Compare whole objects when that gets to include all fields, https://github.com/apache/beam/issues/23979 + expect(example.name, _name); + expect(example.sdk, _sdk); + expect(example.files.first.content, _contents); + expect(example.type, ExampleType.example); + expect(example.path, _path); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.mocks.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.mocks.dart new file mode 100644 index 000000000000..156309da419d --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/http_example_loader_test.mocks.dart @@ -0,0 +1,260 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/controllers/example_loaders/http_example_loader_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i6; +import 'dart:ui' as _i11; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/cache/example_cache.dart' as _i3; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i5; +import 'package:playground_components/src/models/example.dart' as _i2; +import 'package:playground_components/src/models/example_base.dart' as _i10; +import 'package:playground_components/src/models/example_view_options.dart' + as _i8; +import 'package:playground_components/src/models/loading_status.dart' as _i7; +import 'package:playground_components/src/models/sdk.dart' as _i4; +import 'package:playground_components/src/models/snippet_file.dart' as _i9; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExample_0 extends _i1.SmartFake implements _i2.Example { + _FakeExample_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExampleCache]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleCache extends _i1.Mock implements _i3.ExampleCache { + MockExampleCache() { + _i1.throwOnMissingStub(this); + } + + @override + Map<_i4.Sdk, List<_i5.CategoryWithExamples>> get categoryListsBySdk => + (super.noSuchMethod( + Invocation.getter(#categoryListsBySdk), + returnValue: <_i4.Sdk, List<_i5.CategoryWithExamples>>{}, + ) as Map<_i4.Sdk, List<_i5.CategoryWithExamples>>); + @override + Map<_i4.Sdk, _i2.Example> get defaultExamplesBySdk => (super.noSuchMethod( + Invocation.getter(#defaultExamplesBySdk), + returnValue: <_i4.Sdk, _i2.Example>{}, + ) as Map<_i4.Sdk, _i2.Example>); + @override + bool get isSelectorOpened => (super.noSuchMethod( + Invocation.getter(#isSelectorOpened), + returnValue: false, + ) as bool); + @override + set isSelectorOpened(bool? _isSelectorOpened) => super.noSuchMethod( + Invocation.setter( + #isSelectorOpened, + _isSelectorOpened, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future get allExamplesFuture => (super.noSuchMethod( + Invocation.getter(#allExamplesFuture), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i7.LoadingStatus get catalogStatus => (super.noSuchMethod( + Invocation.getter(#catalogStatus), + returnValue: _i7.LoadingStatus.loading, + ) as _i7.LoadingStatus); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future loadAllPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadAllPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + List<_i5.CategoryWithExamples> getCategories(_i4.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getCategories, + [sdk], + ), + returnValue: <_i5.CategoryWithExamples>[], + ) as List<_i5.CategoryWithExamples>); + @override + _i6.Future<_i2.Example> getPrecompiledObject( + String? path, + _i4.Sdk? sdk, + ) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + )), + ) as _i6.Future<_i2.Example>); + @override + _i6.Future<_i2.Example> loadSharedExample( + String? id, { + required _i8.ExampleViewOptions? viewOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + )), + ) as _i6.Future<_i2.Example>); + @override + _i6.Future saveSnippet({ + required List<_i9.SnippetFile>? files, + required _i4.Sdk? sdk, + required String? pipelineOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + { + #files: files, + #sdk: sdk, + #pipelineOptions: pipelineOptions, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i2.Example> loadExampleInfo(_i10.ExampleBase? example) => + (super.noSuchMethod( + Invocation.method( + #loadExampleInfo, + [example], + ), + returnValue: _i6.Future<_i2.Example>.value(_FakeExample_0( + this, + Invocation.method( + #loadExampleInfo, + [example], + ), + )), + ) as _i6.Future<_i2.Example>); + @override + void setSelectorOpened(bool? value) => super.noSuchMethod( + Invocation.method( + #setSelectorOpened, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i2.Example?> getDefaultExampleBySdk(_i4.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getDefaultExampleBySdk, + [sdk], + ), + returnValue: _i6.Future<_i2.Example?>.value(), + ) as _i6.Future<_i2.Example?>); + @override + _i6.Future loadDefaultPrecompiledObjects() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjects, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future loadDefaultPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future<_i10.ExampleBase?> getCatalogExampleByPath(String? path) => + (super.noSuchMethod( + Invocation.method( + #getCatalogExampleByPath, + [path], + ), + returnValue: _i6.Future<_i10.ExampleBase?>.value(), + ) as _i6.Future<_i10.ExampleBase?>); + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/example_loaders/user_shared_example_loader_test.dart b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/user_shared_example_loader_test.dart new file mode 100644 index 000000000000..a69303b7924e --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/example_loaders/user_shared_example_loader_test.dart @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/example_loaders/user_shared_example_loader.dart'; + +import '../../common/example_cache.dart'; + +void main() async { + TestWidgetsFlutterBinding.ensureInitialized(); + + group('UserSharedExampleLoader', () { + testWidgets('non-existent', (WidgetTester wt) async { + Exception? thrown; + final loader = UserSharedExampleLoader( + descriptor: const UserSharedExampleLoadingDescriptor( + sdk: Sdk.go, + snippetId: 'non-existent', + ), + exampleCache: createFailingExampleCache(), + ); + + try { + await loader.future; + } on Exception catch (ex) { + thrown = ex; + } + + expect(thrown, isA()); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.dart b/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.dart new file mode 100644 index 000000000000..696b887d7f14 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.dart @@ -0,0 +1,240 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/playground_components.dart'; + +import '../common/descriptors.dart'; +import '../common/examples.dart'; +import 'playground_controller_test.mocks.dart'; + +@GenerateMocks([ExamplesLoader, ExampleCache]) +Future main() async { + TestWidgetsFlutterBinding.ensureInitialized(); + await PlaygroundComponents.ensureInitialized(); + + late PlaygroundController controller; + final mockExamplesLoader = MockExamplesLoader(); + + when(mockExamplesLoader.loadIfNew(any)).thenAnswer((_) async => 1); + + setUp(() { + controller = PlaygroundController( + examplesLoader: MockExamplesLoader(), + exampleCache: MockExampleCache(), + ); + }); + + group('PlaygroundController', () { + test('sdk is initially null, set sdk', () { + expect(controller.sdk, null); + controller.setSdk(Sdk.go); + expect(controller.sdk, Sdk.go); + }); + + test('Initial value of examplesTitle', () { + expect(controller.examplesTitle, 'examples.defaultTitle'); + }); + + test('Initial value of isCodeRunning should be false', () { + expect(controller.codeRunner.isCodeRunning, false); + }); + + test('Initial value of pipelineOptions should be empty string', () { + controller.setSdk(Sdk.go); + expect(controller.codeRunner.pipelineOptions, ''); + }); + + test('source', () { + expect(controller.source, null); + controller.setSdk(Sdk.go); + expect(controller.source, null); + controller.snippetEditingController!.setExample(exampleGo4Multifile); + expect(controller.source, exampleGo4Multifile.files[1].content); + }); + + group('isExampleChanged Tests', () { + test( + 'If example source is changed, value of isExampleChanged should be true', + () { + controller.setExample( + examplePython1, + descriptor: emptyDescriptor, + setCurrentSdk: true, + ); + expect(controller.codeRunner.isExampleChanged, false); + controller.snippetEditingController?.fileControllers.first + .codeController.text = 'test'; + expect(controller.codeRunner.isExampleChanged, true); + }, + ); + + test( + 'If pipelineOptions is changed, value of isExampleChanged should be true', + () { + controller.setExample( + examplePython1, + descriptor: emptyDescriptor, + setCurrentSdk: true, + ); + expect(controller.codeRunner.isExampleChanged, false); + controller.setPipelineOptions('test options'); + expect(controller.codeRunner.isExampleChanged, true); + }, + ); + }); + + test( + 'If selected example type is not test and SDK is java or python, graph should be available', + () { + controller.setExample( + examplePython1, + descriptor: emptyDescriptor, + setCurrentSdk: true, + ); + expect(controller.graphAvailable, true); + }, + ); + + test( + 'Playground state setExample should update source and example and notify all listeners', + () { + controller.addListener(() { + expect(controller.sdk, Sdk.go); + expect(controller.source, exampleGo6.files.first.content); + expect(controller.selectedExample, exampleGo6); + }); + controller.setExample( + exampleGo6, + descriptor: emptyDescriptor, + setCurrentSdk: true, + ); + }, + ); + + test('Playground state should notify all listeners about sdk change', () { + controller.addListener(() { + expect(controller.sdk, Sdk.go); + }); + controller.setSdk(Sdk.go); + }); + + test( + 'Playground state reset should reset source to example notify all listeners', + () { + controller.setExample( + examplePython1, + descriptor: emptyDescriptor, + setCurrentSdk: true, + ); + controller.snippetEditingController?.fileControllers.first.codeController + .text = 'source'; + controller.addListener(() { + expect(controller.source, examplePython1.files.first.content); + }); + controller.reset(); + }); + + test( + 'If Playground state result is empty, then resetError should break the execution', + () { + controller.resetErrorMessageText(); + expect(controller.codeRunner.result, null); + }, + ); + + test( + 'Playground state should notify all listeners about pipeline options change', + () { + controller.setSdk(Sdk.go); + controller.addListener(() { + expect(controller.codeRunner.pipelineOptions, 'test options'); + }); + controller.setPipelineOptions('test options'); + }, + ); + + test('getLoadingDescriptor()', () { + controller.setExample( + examplePython2, + descriptor: standardDescriptor2, + setCurrentSdk: true, + ); + controller.setExample( + exampleGo6, + descriptor: standardGoDescriptor, + setCurrentSdk: false, + ); + + final descriptor = controller.getLoadingDescriptor(); + + expect( + descriptor, + ExamplesLoadingDescriptor( + descriptors: [ + standardDescriptor2, + standardGoDescriptor, + ], + initialSdk: Sdk.python, + ), + ); + }); + + test('setEmptyIfNoSdk', () { + controller.setEmptyIfNoSdk(Sdk.go); + + expect(controller.sdk, Sdk.go); + expect( + controller.snippetEditingController?.fileControllers.first + .codeController.fullText, + '', + ); + + controller.setEmptyIfNoSdk(Sdk.python); + + expect(controller.sdk, Sdk.go); + }); + + group('setEmptyIfNotExists', () { + test('setCurrentSdk = false', () { + controller.setEmptyIfNotExists(Sdk.go, setCurrentSdk: false); + + expect(controller.sdk, null); + }); + + test('setCurrentSdk = true', () { + const text = 'test'; + controller.setEmptyIfNotExists(Sdk.go, setCurrentSdk: true); + + expect(controller.sdk, Sdk.go); + + controller.snippetEditingController?.fileControllers.first + .codeController.text = text; + controller.setEmptyIfNotExists(Sdk.go, setCurrentSdk: true); + + expect( + controller.snippetEditingController?.fileControllers.first + .codeController.fullText, + text, + ); + }); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.mocks.dart b/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.mocks.dart new file mode 100644 index 000000000000..7c22126c6821 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/playground_controller_test.mocks.dart @@ -0,0 +1,335 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/controllers/playground_controller_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i6; +import 'dart:ui' as _i15; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/cache/example_cache.dart' as _i9; +import 'package:playground_components/src/controllers/example_loaders/example_loader_factory.dart' + as _i2; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart' + as _i4; +import 'package:playground_components/src/controllers/playground_controller.dart' + as _i5; +import 'package:playground_components/src/models/category_with_examples.dart' + as _i10; +import 'package:playground_components/src/models/example.dart' as _i3; +import 'package:playground_components/src/models/example_base.dart' as _i14; +import 'package:playground_components/src/models/example_loading_descriptors/examples_loading_descriptor.dart' + as _i7; +import 'package:playground_components/src/models/example_view_options.dart' + as _i12; +import 'package:playground_components/src/models/loading_status.dart' as _i11; +import 'package:playground_components/src/models/sdk.dart' as _i8; +import 'package:playground_components/src/models/snippet_file.dart' as _i13; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExampleLoaderFactory_0 extends _i1.SmartFake + implements _i2.ExampleLoaderFactory { + _FakeExampleLoaderFactory_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeExample_1 extends _i1.SmartFake implements _i3.Example { + _FakeExample_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExamplesLoader]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExamplesLoader extends _i1.Mock implements _i4.ExamplesLoader { + MockExamplesLoader() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.ExampleLoaderFactory get defaultFactory => (super.noSuchMethod( + Invocation.getter(#defaultFactory), + returnValue: _FakeExampleLoaderFactory_0( + this, + Invocation.getter(#defaultFactory), + ), + ) as _i2.ExampleLoaderFactory); + @override + void setPlaygroundController(_i5.PlaygroundController? value) => + super.noSuchMethod( + Invocation.method( + #setPlaygroundController, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future loadIfNew(_i7.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #loadIfNew, + [descriptor], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future load(_i7.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #load, + [descriptor], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future loadDefaultIfAny(_i8.Sdk? sdk) => (super.noSuchMethod( + Invocation.method( + #loadDefaultIfAny, + [sdk], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); +} + +/// A class which mocks [ExampleCache]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleCache extends _i1.Mock implements _i9.ExampleCache { + MockExampleCache() { + _i1.throwOnMissingStub(this); + } + + @override + Map<_i8.Sdk, List<_i10.CategoryWithExamples>> get categoryListsBySdk => + (super.noSuchMethod( + Invocation.getter(#categoryListsBySdk), + returnValue: <_i8.Sdk, List<_i10.CategoryWithExamples>>{}, + ) as Map<_i8.Sdk, List<_i10.CategoryWithExamples>>); + @override + Map<_i8.Sdk, _i3.Example> get defaultExamplesBySdk => (super.noSuchMethod( + Invocation.getter(#defaultExamplesBySdk), + returnValue: <_i8.Sdk, _i3.Example>{}, + ) as Map<_i8.Sdk, _i3.Example>); + @override + bool get isSelectorOpened => (super.noSuchMethod( + Invocation.getter(#isSelectorOpened), + returnValue: false, + ) as bool); + @override + set isSelectorOpened(bool? _isSelectorOpened) => super.noSuchMethod( + Invocation.setter( + #isSelectorOpened, + _isSelectorOpened, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future get allExamplesFuture => (super.noSuchMethod( + Invocation.getter(#allExamplesFuture), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i11.LoadingStatus get catalogStatus => (super.noSuchMethod( + Invocation.getter(#catalogStatus), + returnValue: _i11.LoadingStatus.loading, + ) as _i11.LoadingStatus); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future loadAllPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadAllPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + List<_i10.CategoryWithExamples> getCategories(_i8.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getCategories, + [sdk], + ), + returnValue: <_i10.CategoryWithExamples>[], + ) as List<_i10.CategoryWithExamples>); + @override + _i6.Future<_i3.Example> getPrecompiledObject( + String? path, + _i8.Sdk? sdk, + ) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + returnValue: _i6.Future<_i3.Example>.value(_FakeExample_1( + this, + Invocation.method( + #getPrecompiledObject, + [ + path, + sdk, + ], + ), + )), + ) as _i6.Future<_i3.Example>); + @override + _i6.Future<_i3.Example> loadSharedExample( + String? id, { + required _i12.ExampleViewOptions? viewOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + returnValue: _i6.Future<_i3.Example>.value(_FakeExample_1( + this, + Invocation.method( + #loadSharedExample, + [id], + {#viewOptions: viewOptions}, + ), + )), + ) as _i6.Future<_i3.Example>); + @override + _i6.Future saveSnippet({ + required List<_i13.SnippetFile>? files, + required _i8.Sdk? sdk, + required String? pipelineOptions, + }) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [], + { + #files: files, + #sdk: sdk, + #pipelineOptions: pipelineOptions, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i3.Example> loadExampleInfo(_i14.ExampleBase? example) => + (super.noSuchMethod( + Invocation.method( + #loadExampleInfo, + [example], + ), + returnValue: _i6.Future<_i3.Example>.value(_FakeExample_1( + this, + Invocation.method( + #loadExampleInfo, + [example], + ), + )), + ) as _i6.Future<_i3.Example>); + @override + void setSelectorOpened(bool? value) => super.noSuchMethod( + Invocation.method( + #setSelectorOpened, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.Example?> getDefaultExampleBySdk(_i8.Sdk? sdk) => + (super.noSuchMethod( + Invocation.method( + #getDefaultExampleBySdk, + [sdk], + ), + returnValue: _i6.Future<_i3.Example?>.value(), + ) as _i6.Future<_i3.Example?>); + @override + _i6.Future loadDefaultPrecompiledObjects() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjects, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future loadDefaultPrecompiledObjectsIfNot() => (super.noSuchMethod( + Invocation.method( + #loadDefaultPrecompiledObjectsIfNot, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future<_i14.ExampleBase?> getCatalogExampleByPath(String? path) => + (super.noSuchMethod( + Invocation.method( + #getCatalogExampleByPath, + [path], + ), + returnValue: _i6.Future<_i14.ExampleBase?>.value(), + ) as _i6.Future<_i14.ExampleBase?>); + @override + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/snippet_editing_controller_test.dart b/playground/frontend/build/playground_components/test/src/controllers/snippet_editing_controller_test.dart new file mode 100644 index 000000000000..028603e37a78 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/snippet_editing_controller_test.dart @@ -0,0 +1,253 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_redundant_argument_values + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/controllers/snippet_editing_controller.dart'; + +import '../common/descriptors.dart'; +import '../common/examples.dart'; + +void main() async { + await PlaygroundComponents.ensureInitialized(); + + int notified = 0; + late SnippetEditingController controller; + + setUp(() { + notified = 0; + controller = SnippetEditingController(sdk: Sdk.python); + controller.addListener(() => notified++); + }); + + group('SnippetEditingController.', () { + group('Changes.', () { + test('Unchanged initially', () { + expect(controller.isChanged, false); + expect(notified, 0); + }); + + test('Unchanged after setting an example', () { + controller.setExample(examplePython1); + + expect(controller.isChanged, false); + expect(notified, 1); + }); + + test('Changes when changing code, notifies once', () { + controller.setExample(examplePython1); + controller.fileControllers.first.codeController.text = + examplePython1.files.first.content; + + expect(controller.isChanged, false); + expect(notified, 1); + + controller.fileControllers.first.codeController.text = 'changed'; + + expect(controller.isChanged, true); + expect(notified, 2); + + controller.fileControllers.first.codeController.text = 'changed2'; + + expect(controller.isChanged, true); + expect(notified, 2); + + controller.fileControllers.first.codeController.text = + examplePython1.files.first.content; + + expect(controller.isChanged, false); + expect(notified, 3); + }); + + test('Changes when changing pipelineOptions, notifies once', () { + controller.setExample(exampleGo5PipelineOptions); + controller.pipelineOptions = exampleGo5PipelineOptions.pipelineOptions; + + expect(controller.isChanged, false); + expect(notified, 1); + + controller.pipelineOptions = 'changed'; + + expect(controller.isChanged, true); + expect(notified, 2); + + controller.pipelineOptions = 'changed2'; + + expect(controller.isChanged, true); + expect(notified, 2); + + controller.pipelineOptions = exampleGo5PipelineOptions.pipelineOptions; + + expect(controller.isChanged, false); + expect(notified, 3); + }); + }); + + group('Files.', () { + test('activeFileController, activateFileControllerByName', () { + expect(controller.activeFileController, null); + + controller.setExample(exampleGo4Multifile); + + expect( + controller.activeFileController?.getFile().content, + exampleGo4Multifile.files[1].content, + ); + + controller.activateFileControllerByName( + exampleGo4Multifile.files[0].name, + ); + expect( + controller.activeFileController?.getFile().content, + exampleGo4Multifile.files[0].content, + ); + + controller.activateFileControllerByName('nonexistent'); + expect(controller.activeFileController, null); + }); + + test('getFileControllerByName', () { + controller.setExample(exampleGo4Multifile); + + expect( + controller + .getFileControllerByName(exampleGo4Multifile.files[0].name) + ?.savedFile + .content, + exampleGo4Multifile.files[0].content, + ); + expect( + controller + .getFileControllerByName(exampleGo4Multifile.files[1].name) + ?.savedFile + .content, + exampleGo4Multifile.files[1].content, + ); + expect( + controller.getFileControllerByName('nonexistent'), + null, + ); + }); + }); + + group('Descriptors.', () { + test('Returns the original descriptor if unchanged', () { + controller.setExample( + examplePython1, + descriptor: standardDescriptor1, + ); + + final descriptor = controller.getLoadingDescriptor(); + + expect(descriptor, standardDescriptor1); + }); + + test('Returns a ContentExampleLoadingDescriptor if changed', () { + controller.setExample( + examplePython1, + descriptor: standardDescriptor1, + ); + + controller.fileControllers.first.codeController.value = + const TextEditingValue(text: 'ex4'); + final descriptor = controller.getLoadingDescriptor(); + + const expected = ContentExampleLoadingDescriptor( + complexity: Complexity.basic, + files: [SnippetFile(content: 'ex4', isMain: true, name: '')], + name: 'Example X1', + sdk: Sdk.python, + ); + + expect(descriptor, expected); + }); + + test('Returns a ContentExampleLoadingDescriptor if no descriptor', () { + controller.setExample(examplePython1, descriptor: null); + + controller.setExample(examplePython2, descriptor: null); + final descriptor = controller.getLoadingDescriptor(); + + const expected = ContentExampleLoadingDescriptor( + complexity: Complexity.basic, + files: [SnippetFile(content: 'ex2', isMain: true, name: '')], + name: 'Kata', + sdk: Sdk.python, + ); + + expect(descriptor, expected); + }); + }); + + group('EventSnippetContext.', () { + test('Uninitialized', () { + expect( + controller.eventSnippetContext, + const EventSnippetContext( + originalSnippet: null, + sdk: Sdk.python, + snippet: null, + ), + ); + }); + + test('Unchanged, changed', () { + final descriptors = [ + HttpExampleLoadingDescriptor( + sdk: Sdk.go, + uri: Uri.parse('https://example.com'), + ), + const StandardExampleLoadingDescriptor( + sdk: Sdk.go, + path: 'path', + ), + const UserSharedExampleLoadingDescriptor( + sdk: Sdk.python, + snippetId: 'id', + ), + ]; + + for (final descriptor in descriptors) { + controller.setExample(examplePython1, descriptor: descriptor); + + expect( + controller.eventSnippetContext, + EventSnippetContext( + originalSnippet: descriptor.token, + sdk: controller.sdk, + snippet: descriptor.token, + ), + ); + + controller.activeFileController!.codeController.text += 'changed'; + + expect( + controller.eventSnippetContext, + EventSnippetContext( + originalSnippet: descriptor.token, + sdk: controller.sdk, + snippet: null, + ), + ); + } + }); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/controllers/unread_controller_test.dart b/playground/frontend/build/playground_components/test/src/controllers/unread_controller_test.dart new file mode 100644 index 000000000000..d703d2ddba04 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/controllers/unread_controller_test.dart @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/controllers/unread_controller.dart'; + +void main() { + UnreadController controller = UnreadController(); + int notified = 0; + + setUp(() { + controller = UnreadController(); + notified = 0; + + controller.addListener(() { + notified++; + }); + }); + + group('UnreadController', () { + test('setValue, isUnread, clearKey, clear', () { + controller.setValue('a', 1); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), false); + expect(notified, 1); + + controller.setValue('a', 1); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), false); + expect(notified, 1); + + controller.setValue('a', 2); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), false); + expect(notified, 2); + + controller.setValue('b', 1); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), true); + expect(notified, 3); + + controller.markRead('b'); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), false); + expect(notified, 4); + + controller.setValue('b', 1); + expect(controller.isUnread('a'), true); + expect(controller.isUnread('b'), false); + expect(notified, 4); + + controller.setValue('c', 1); + controller.markAllRead(); + expect(controller.isUnread('a'), false); + expect(controller.isUnread('c'), false); + expect(notified, 6); + + controller.markAllRead(); + expect(notified, 6); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..7fbb8bb17cc7 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/catalog_default_example_loading_descriptor_test.dart @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + group('CatalogDefaultExampleLoadingDescriptor', () { + const descriptor = CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.go, + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = CatalogDefaultExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + CatalogDefaultExampleLoadingDescriptor( + sdk: descriptor.sdk, + ), + ); + }); + + test('token == null', () { + expect(descriptor.token, null); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/common.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/common.dart new file mode 100644 index 000000000000..3a3bcdc4be0b --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/common.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +const viewOptionsMap = { + 'readonly': 'readonly1,readonly2', + 'show': 'show1,show2', + 'unfold': 'unfold1,unfold2', +}; + +const viewOptions = ExampleViewOptions( + foldCommentAtLineZero: true, + foldImports: true, + readOnlySectionNames: ['readonly1', 'readonly2'], + showSectionNames: ['show1', 'show2'], + unfoldSectionNames: ['unfold1', 'unfold2'], +); diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/content_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/content_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..0184ebe05da4 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/content_example_loading_descriptor_test.dart @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + group('ContentExampleLoadingDescriptor', () { + test('defaults', () { + const descriptorWithDefaults = ContentExampleLoadingDescriptor( + files: [SnippetFile(content: 'abc', isMain: true)], + sdk: Sdk.go, + ); + + final map = descriptorWithDefaults.toJson(); + final parsed = ContentExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptorWithDefaults); + }); + + const descriptor = ContentExampleLoadingDescriptor( + complexity: Complexity.advanced, + files: [SnippetFile(content: 'abc', isMain: true)], + name: 'name', + pipelineOptions: '--name=value', + sdk: Sdk.go, + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = ContentExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + ContentExampleLoadingDescriptor( + complexity: descriptor.complexity, + files: descriptor.files, + name: descriptor.name, + pipelineOptions: '--name=value', + sdk: descriptor.sdk, + ), + ); + }); + + test('token == null', () { + expect(descriptor.token, null); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/empty_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/empty_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..1bcd042128f0 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/empty_example_loading_descriptor_test.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +void main() { + group('EmptyExampleLoadingDescriptor', () { + const descriptor = EmptyExampleLoadingDescriptor(sdk: Sdk.go); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = EmptyExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('token == null', () { + expect(descriptor.token, null); + }); + + test('copyWithoutViewOptions', () { + expect(descriptor.copyWithoutViewOptions(), descriptor); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/examples_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/examples_loading_descriptor_test.dart new file mode 100644 index 000000000000..29dc06407099 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/examples_loading_descriptor_test.dart @@ -0,0 +1,225 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: avoid_redundant_argument_values + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + group('ExamplesLoadingDescriptor', () { + test('Empty map -> null', () { + final parsed = ExamplesLoadingDescriptor.tryParse( + const {}, + singleDescriptorFactory: _singleDescriptorFactory, + ); + + expect(parsed, null); + }); + + test('Empty instant descriptors -> null', () { + // ignore: use_named_constants + const descriptor = ExamplesLoadingDescriptor( + descriptors: [], + ); + + final parsed = ExamplesLoadingDescriptor.tryParse( + descriptor.toJson(), + singleDescriptorFactory: _singleDescriptorFactory, + ); + + expect(parsed, null); + }); + + test('Multiple instant descriptors', () { + const descriptor = ExamplesLoadingDescriptor( + descriptors: [_d1, _d2, _unparsed], + ); + + final parsed = ExamplesLoadingDescriptor.tryParse( + descriptor.toJson(), + singleDescriptorFactory: _singleDescriptorFactory, + ); + + expect( + parsed, + const ExamplesLoadingDescriptor( + descriptors: [_d1, _d2], + initialSdk: null, + lazyLoadDescriptors: {}, + ), + ); + }); + + test('Multiple instant and lazy descriptors', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [_d1, _d2, _unparsed], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [_d2], + Sdk.python: const [_unparsed], + }, + ); + + final parsed = ExamplesLoadingDescriptor.tryParse( + descriptor.toJson(), + singleDescriptorFactory: _singleDescriptorFactory, + ); + + expect( + parsed, + ExamplesLoadingDescriptor( + descriptors: const [_d1, _d2], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [_d2], + Sdk.python: const [], + }, + ), + ); + }); + + test('copyWithMissingLazy', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [_d1], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [_d2], + Sdk.python: const [_unparsed], + }, + ); + + final result = descriptor.copyWithMissingLazy({ + Sdk.scio: const [_d1], + Sdk.go: const [_d2], + }); + + expect( + result, + ExamplesLoadingDescriptor( + descriptors: const [_d1], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [_d2], // Original, not overwritten. + Sdk.python: const [_unparsed], // Original. + Sdk.go: const [_d2], // Added. + }, + ), + ); + }); + + test('copyWithoutViewOptions', () { + final descriptorWithOptions = ExamplesLoadingDescriptor( + descriptors: const [ + CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.go, + viewOptions: viewOptions, + ), + ], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [ + StandardExampleLoadingDescriptor( + sdk: Sdk.scio, + path: 'path', + viewOptions: viewOptions, + ), + ], + }, + ); + + final expected = ExamplesLoadingDescriptor( + descriptors: const [_d1], + initialSdk: Sdk.python, + lazyLoadDescriptors: { + Sdk.scio: const [_d2], + }, + ); + + expect( + descriptorWithOptions.copyWithoutViewOptions(), + expected, + ); + }); + + group('initialSnippetSdk, initialSnippetToken.', () { + test('No descriptors -> null', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [], + initialSdk: Sdk.go, + lazyLoadDescriptors: { + Sdk.scio: const [_d1], + }, + ); + + expect(descriptor.initialSnippetSdk, null); + expect(descriptor.initialSnippetToken, null); + }); + + test('No initialSdk, multiple descriptors -> null', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [_d1, _d2], + initialSdk: null, + lazyLoadDescriptors: { + Sdk.scio: const [_d1], + }, + ); + + expect(descriptor.initialSnippetSdk, null); + expect(descriptor.initialSnippetToken, null); + }); + + test('No initialSdk, single descriptor -> from it', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [_d2], + initialSdk: null, + lazyLoadDescriptors: { + Sdk.scio: const [_d1], + }, + ); + + expect(descriptor.initialSnippetSdk, _d2.sdk); + expect(descriptor.initialSnippetToken, _d2.token); + }); + + test('initialSdk, multiple descriptors -> initialSdk', () { + final descriptor = ExamplesLoadingDescriptor( + descriptors: const [_d1, _d2], + initialSdk: _d2.sdk, + lazyLoadDescriptors: { + Sdk.scio: const [_d1], + }, + ); + + expect(descriptor.initialSnippetSdk, _d2.sdk); + expect(descriptor.initialSnippetToken, _d2.token); + }); + }); + }); +} + +ExampleLoadingDescriptor? _singleDescriptorFactory(Map map) { + return CatalogDefaultExampleLoadingDescriptor.tryParse(map) ?? + StandardExampleLoadingDescriptor.tryParse(map); +} + +const _d1 = CatalogDefaultExampleLoadingDescriptor(sdk: Sdk.go); +const _d2 = StandardExampleLoadingDescriptor(sdk: Sdk.scio, path: 'path'); +const _unparsed = EmptyExampleLoadingDescriptor(sdk: Sdk.python); diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/hive_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/hive_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..fdb9863fd2dd --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/hive_example_loading_descriptor_test.dart @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/models/example_loading_descriptors/hive_example_loading_descriptor.dart'; +import 'package:playground_components/src/models/sdk.dart'; + +import 'common.dart'; + +void main() { + group('HiveExampleLoadingDescriptor', () { + const descriptor = HiveExampleLoadingDescriptor( + boxName: 'boxName', + sdk: Sdk.go, + snippetId: 'snippetId', + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = HiveExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + HiveExampleLoadingDescriptor( + boxName: descriptor.boxName, + sdk: descriptor.sdk, + snippetId: descriptor.snippetId, + ), + ); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/http_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/http_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..c81a8729f81e --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/http_example_loading_descriptor_test.dart @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + const urlString = 'https://example.com'; + + group('HttpExampleLoadingDescriptor', () { + final descriptor = HttpExampleLoadingDescriptor( + sdk: Sdk.go, + uri: Uri.parse(urlString), + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = HttpExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + HttpExampleLoadingDescriptor( + sdk: descriptor.sdk, + uri: descriptor.uri, + ), + ); + }); + + test('token', () { + expect(descriptor.token, urlString); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/standard_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/standard_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..b0ea880a8fbc --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/standard_example_loading_descriptor_test.dart @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + const path = 'path'; + + group('StandardExampleLoadingDescriptor', () { + const descriptor = StandardExampleLoadingDescriptor( + path: path, + sdk: Sdk.go, + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = StandardExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + StandardExampleLoadingDescriptor( + path: descriptor.path, + sdk: descriptor.sdk, + ), + ); + }); + + test('token', () { + expect(descriptor.token, path); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/user_shared_example_loading_descriptor_test.dart b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/user_shared_example_loading_descriptor_test.dart new file mode 100644 index 000000000000..f530ac6a71bd --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/example_loading_descriptors/user_shared_example_loading_descriptor_test.dart @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'common.dart'; + +void main() { + const snippetId = 'snippetId'; + + group('UserSharedExampleLoadingDescriptor', () { + const descriptor = UserSharedExampleLoadingDescriptor( + sdk: Sdk.go, + snippetId: snippetId, + viewOptions: viewOptions, + ); + + test('toJson -> tryParse', () { + final map = descriptor.toJson(); + final parsed = UserSharedExampleLoadingDescriptor.tryParse(map); + + expect(parsed, descriptor); + }); + + test('copyWithoutViewOptions', () { + expect( + descriptor.copyWithoutViewOptions(), + UserSharedExampleLoadingDescriptor( + sdk: descriptor.sdk, + snippetId: descriptor.snippetId, + ), + ); + }); + + test('token', () { + expect(descriptor.token, snippetId); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/models/shortcut_test.dart b/playground/frontend/build/playground_components/test/src/models/shortcut_test.dart new file mode 100644 index 000000000000..db982e9bbc1f --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/models/shortcut_test.dart @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/services.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +void main() { + group( + 'BeamShortcut test.', + () { + test( + 'Title builds correctly', + () { + const meta = 'Command'; + final shortcutsAndTitles = { + // + _buildShortcut([ + LogicalKeyboardKey.meta, + LogicalKeyboardKey.enter, + ]): '$meta + Enter', + + _buildShortcut([ + LogicalKeyboardKey.enter, + LogicalKeyboardKey.meta, + ]): 'Enter + $meta', + + _buildShortcut([ + LogicalKeyboardKey.meta, + LogicalKeyboardKey.shift, + LogicalKeyboardKey.keyS, + ]): '$meta + Shift + S', + + _buildShortcut([ + LogicalKeyboardKey.meta, + LogicalKeyboardKey.alt, + LogicalKeyboardKey.shift, + LogicalKeyboardKey.keyS, + ]): '$meta + Alt + Shift + S', + + _buildShortcut([ + LogicalKeyboardKey.control, + LogicalKeyboardKey.alt, + LogicalKeyboardKey.shift, + LogicalKeyboardKey.keyS, + ]): 'Control + Alt + Shift + S', + }; + + for (final entry in shortcutsAndTitles.entries) { + expect(entry.key.title, entry.value); + } + }, + ); + }, + ); +} + +BeamShortcut _buildShortcut(List keys) { + return BeamShortcut( + keys: keys, + actionIntent: const BeamIntent( + slug: 'slug', + ), + createAction: (_) => CallbackAction( + onInvoke: (_) { + return null; + }, + ), + ); +} diff --git a/playground/frontend/build/playground_components/test/src/repositories/dataset_grpc_extension_test.dart b/playground/frontend/build/playground_components/test/src/repositories/dataset_grpc_extension_test.dart new file mode 100644 index 000000000000..ddca310c033b --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/repositories/dataset_grpc_extension_test.dart @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/api/v1/api.pbgrpc.dart' as g; +import 'package:playground_components/src/repositories/dataset_grpc_extension.dart'; + +void main() { + final datasets = [ + // + g.Dataset( + datasetPath: 'mockPath1', + options: {'key1': 'value1'}, + type: g.EmulatorType.EMULATOR_TYPE_KAFKA, + ), + + g.Dataset( + datasetPath: 'mockPath2', + options: {'key2': 'value2'}, + type: g.EmulatorType.EMULATOR_TYPE_UNSPECIFIED, + ), + ]; + + group('Dataset extensions test.', () { + for (final dataset in datasets) { + test('Dataset with type ${dataset.type.name} converts to the same value', + () { + expect(dataset.model.grpc, dataset); + }); + } + }); +} diff --git a/playground/frontend/build/playground_components/test/src/repositories/emulator_type_grpc_extension_test.dart b/playground/frontend/build/playground_components/test/src/repositories/emulator_type_grpc_extension_test.dart new file mode 100644 index 000000000000..627ca11a620b --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/repositories/emulator_type_grpc_extension_test.dart @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/api/v1/api.pbgrpc.dart' as g; +import 'package:playground_components/src/repositories/emulator_type_grpc_extension.dart'; + +void main() { + group('Emulator type extensions test', () { + for (final value in g.EmulatorType.values) { + test('Emulator type ${value.name} converts to the same value', () { + expect( + value.model?.grpc ?? g.EmulatorType.EMULATOR_TYPE_UNSPECIFIED, + value, + ); + }); + } + }); +} diff --git a/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.dart b/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.dart new file mode 100644 index 000000000000..6b7f740d4a43 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.dart @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:playground_components/src/repositories/example_client/example_client.dart'; +import 'package:playground_components/src/repositories/example_repository.dart'; + +import '../common/requests.dart'; +import 'example_repository_test.mocks.dart'; + +@GenerateMocks([ExampleClient]) +void main() { + late ExampleRepository repo; + late ExampleClient client; + + setUp( + () { + client = MockExampleClient(); + repo = ExampleRepository(client: client); + }, + ); + + test( + 'Example repository getListOfExamples should return response with categories', + () async { + when(client.getPrecompiledObjects(kGetPrecompiledObjectsRequest)) + .thenAnswer((_) async => kGetPrecompiledObjectsResponse); + expect( + await repo.getPrecompiledObjects(kGetPrecompiledObjectsRequest), + kGetPrecompiledObjectsResponse.categories, + ); + verify(client.getPrecompiledObjects(kGetPrecompiledObjectsRequest)) + .called(1); + }, + ); + + test( + 'Example repository getDefaultExample should return defaultExample for chosen Sdk', + () async { + when(client + .getDefaultPrecompiledObject(kGetDefaultPrecompiledObjectRequest)) + .thenAnswer((_) async => kGetDefaultPrecompiledObjectResponse); + expect( + await repo + .getDefaultPrecompiledObject(kGetDefaultPrecompiledObjectRequest), + kGetDefaultPrecompiledObjectResponse.example, + ); + verify(client + .getDefaultPrecompiledObject(kGetDefaultPrecompiledObjectRequest)) + .called(1); + }, + ); + + test( + 'Example repository getExampleSource should return files for example', + () async { + when(client.getPrecompiledObjectCode(kRequestForExampleInfo)) + .thenAnswer((_) async => kGetPrecompiledObjectCodeResponse); + expect( + await repo.getPrecompiledObjectCode(kRequestForExampleInfo), + kGetPrecompiledObjectCodeResponse.files, + ); + verify(client.getPrecompiledObjectCode(kRequestForExampleInfo)).called(1); + }, + ); + + test( + 'Example repository getExampleOutput should return output for example', + () async { + when(client.getPrecompiledObjectOutput(kRequestForExampleInfo)) + .thenAnswer((_) async => kOutputResponse); + expect( + await repo.getPrecompiledObjectOutput(kRequestForExampleInfo), + kOutputResponse.output, + ); + verify(client.getPrecompiledObjectOutput(kRequestForExampleInfo)) + .called(1); + }, + ); + + test( + 'Example repository getExampleLogs should return logs for example', + () async { + when(client.getPrecompiledObjectLogs(kRequestForExampleInfo)) + .thenAnswer((_) async => kOutputResponse); + expect( + await repo.getPrecompiledObjectLogs(kRequestForExampleInfo), + kOutputResponse.output, + ); + verify(client.getPrecompiledObjectLogs(kRequestForExampleInfo)).called(1); + }, + ); + + test( + 'Example repository getExampleGraph should return logs for example', + () async { + when(client.getPrecompiledObjectGraph(kRequestForExampleInfo)) + .thenAnswer((_) async => kOutputResponse); + expect( + await repo.getPrecompiledObjectGraph(kRequestForExampleInfo), + kOutputResponse.output, + ); + verify(client.getPrecompiledObjectGraph(kRequestForExampleInfo)) + .called(1); + }, + ); + + test( + 'Example repository getExample should return ExampleModel', + () async { + when(client.getPrecompiledObject(kRequestForExampleInfo)) + .thenAnswer((_) async => kGetDefaultPrecompiledObjectResponse); + expect( + await repo.getPrecompiledObject(kRequestForExampleInfo), + kGetDefaultPrecompiledObjectResponse.example, + ); + verify(client.getPrecompiledObject(kRequestForExampleInfo)).called(1); + }, + ); +} diff --git a/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.mocks.dart b/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.mocks.dart new file mode 100644 index 000000000000..2a1e33bc6a77 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/repositories/example_repository_test.mocks.dart @@ -0,0 +1,299 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in playground_components/test/src/repositories/example_repository_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i10; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/api/v1/api.pb.dart' as _i2; +import 'package:playground_components/src/repositories/example_client/example_client.dart' + as _i9; +import 'package:playground_components/src/repositories/models/get_default_precompiled_object_request.dart' + as _i13; +import 'package:playground_components/src/repositories/models/get_precompiled_object_code_response.dart' + as _i4; +import 'package:playground_components/src/repositories/models/get_precompiled_object_request.dart' + as _i12; +import 'package:playground_components/src/repositories/models/get_precompiled_object_response.dart' + as _i5; +import 'package:playground_components/src/repositories/models/get_precompiled_objects_request.dart' + as _i11; +import 'package:playground_components/src/repositories/models/get_precompiled_objects_response.dart' + as _i3; +import 'package:playground_components/src/repositories/models/get_snippet_request.dart' + as _i14; +import 'package:playground_components/src/repositories/models/get_snippet_response.dart' + as _i7; +import 'package:playground_components/src/repositories/models/output_response.dart' + as _i6; +import 'package:playground_components/src/repositories/models/save_snippet_request.dart' + as _i15; +import 'package:playground_components/src/repositories/models/save_snippet_response.dart' + as _i8; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeGetMetadataResponse_0 extends _i1.SmartFake + implements _i2.GetMetadataResponse { + _FakeGetMetadataResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPrecompiledObjectsResponse_1 extends _i1.SmartFake + implements _i3.GetPrecompiledObjectsResponse { + _FakeGetPrecompiledObjectsResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPrecompiledObjectCodeResponse_2 extends _i1.SmartFake + implements _i4.GetPrecompiledObjectCodeResponse { + _FakeGetPrecompiledObjectCodeResponse_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPrecompiledObjectResponse_3 extends _i1.SmartFake + implements _i5.GetPrecompiledObjectResponse { + _FakeGetPrecompiledObjectResponse_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeOutputResponse_4 extends _i1.SmartFake + implements _i6.OutputResponse { + _FakeOutputResponse_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetSnippetResponse_5 extends _i1.SmartFake + implements _i7.GetSnippetResponse { + _FakeGetSnippetResponse_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSaveSnippetResponse_6 extends _i1.SmartFake + implements _i8.SaveSnippetResponse { + _FakeSaveSnippetResponse_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExampleClient]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExampleClient extends _i1.Mock implements _i9.ExampleClient { + MockExampleClient() { + _i1.throwOnMissingStub(this); + } + + @override + _i10.Future<_i2.GetMetadataResponse> getMetadata() => (super.noSuchMethod( + Invocation.method( + #getMetadata, + [], + ), + returnValue: _i10.Future<_i2.GetMetadataResponse>.value( + _FakeGetMetadataResponse_0( + this, + Invocation.method( + #getMetadata, + [], + ), + )), + ) as _i10.Future<_i2.GetMetadataResponse>); + @override + _i10.Future<_i3.GetPrecompiledObjectsResponse> getPrecompiledObjects( + _i11.GetPrecompiledObjectsRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjects, + [request], + ), + returnValue: _i10.Future<_i3.GetPrecompiledObjectsResponse>.value( + _FakeGetPrecompiledObjectsResponse_1( + this, + Invocation.method( + #getPrecompiledObjects, + [request], + ), + )), + ) as _i10.Future<_i3.GetPrecompiledObjectsResponse>); + @override + _i10.Future<_i4.GetPrecompiledObjectCodeResponse> getPrecompiledObjectCode( + _i12.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectCode, + [request], + ), + returnValue: _i10.Future<_i4.GetPrecompiledObjectCodeResponse>.value( + _FakeGetPrecompiledObjectCodeResponse_2( + this, + Invocation.method( + #getPrecompiledObjectCode, + [request], + ), + )), + ) as _i10.Future<_i4.GetPrecompiledObjectCodeResponse>); + @override + _i10.Future<_i5.GetPrecompiledObjectResponse> getDefaultPrecompiledObject( + _i13.GetDefaultPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getDefaultPrecompiledObject, + [request], + ), + returnValue: _i10.Future<_i5.GetPrecompiledObjectResponse>.value( + _FakeGetPrecompiledObjectResponse_3( + this, + Invocation.method( + #getDefaultPrecompiledObject, + [request], + ), + )), + ) as _i10.Future<_i5.GetPrecompiledObjectResponse>); + @override + _i10.Future<_i5.GetPrecompiledObjectResponse> getPrecompiledObject( + _i12.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObject, + [request], + ), + returnValue: _i10.Future<_i5.GetPrecompiledObjectResponse>.value( + _FakeGetPrecompiledObjectResponse_3( + this, + Invocation.method( + #getPrecompiledObject, + [request], + ), + )), + ) as _i10.Future<_i5.GetPrecompiledObjectResponse>); + @override + _i10.Future<_i6.OutputResponse> getPrecompiledObjectOutput( + _i12.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectOutput, + [request], + ), + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( + this, + Invocation.method( + #getPrecompiledObjectOutput, + [request], + ), + )), + ) as _i10.Future<_i6.OutputResponse>); + @override + _i10.Future<_i6.OutputResponse> getPrecompiledObjectLogs( + _i12.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectLogs, + [request], + ), + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( + this, + Invocation.method( + #getPrecompiledObjectLogs, + [request], + ), + )), + ) as _i10.Future<_i6.OutputResponse>); + @override + _i10.Future<_i6.OutputResponse> getPrecompiledObjectGraph( + _i12.GetPrecompiledObjectRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getPrecompiledObjectGraph, + [request], + ), + returnValue: + _i10.Future<_i6.OutputResponse>.value(_FakeOutputResponse_4( + this, + Invocation.method( + #getPrecompiledObjectGraph, + [request], + ), + )), + ) as _i10.Future<_i6.OutputResponse>); + @override + _i10.Future<_i7.GetSnippetResponse> getSnippet( + _i14.GetSnippetRequest? request) => + (super.noSuchMethod( + Invocation.method( + #getSnippet, + [request], + ), + returnValue: + _i10.Future<_i7.GetSnippetResponse>.value(_FakeGetSnippetResponse_5( + this, + Invocation.method( + #getSnippet, + [request], + ), + )), + ) as _i10.Future<_i7.GetSnippetResponse>); + @override + _i10.Future<_i8.SaveSnippetResponse> saveSnippet( + _i15.SaveSnippetRequest? request) => + (super.noSuchMethod( + Invocation.method( + #saveSnippet, + [request], + ), + returnValue: _i10.Future<_i8.SaveSnippetResponse>.value( + _FakeSaveSnippetResponse_6( + this, + Invocation.method( + #saveSnippet, + [request], + ), + )), + ) as _i10.Future<_i8.SaveSnippetResponse>); +} diff --git a/playground/frontend/build/playground_components/test/src/services/symbols/loaders/yaml_test.dart b/playground/frontend/build/playground_components/test/src/services/symbols/loaders/yaml_test.dart new file mode 100644 index 000000000000..9a88ac5ea12d --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/services/symbols/loaders/yaml_test.dart @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: unnecessary_lambdas + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +void main() { + setUp(() { + TestWidgetsFlutterBinding.ensureInitialized(); + }); + + test('YamlSymbolsLoader', () async { + final loader = YamlSymbolsLoader( + path: 'assets/symbols/python.g.yaml', + package: PlaygroundComponents.packageName, + ); + + final symbolsDictionary = await loader.future; + + expect( + symbolsDictionary.symbols, + containsAll([ + 'ANamedTuple', + 'PCollection', + 'Xyz', + ]), + reason: 'Classes should be loaded but are not.', + ); + + expect( + symbolsDictionary.symbols, + containsAll([ + 'get_message_stream', + 'windowing', + 'leave_composite_transform', + ]), + reason: 'Methods should be loaded but are not.', + ); + + expect( + symbolsDictionary.symbols.contains('f_int64'), + false, + reason: 'Properties should not be loaded but are.', + ); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/services/symbols/symbols_notifier_test.dart b/playground/frontend/build/playground_components/test/src/services/symbols/symbols_notifier_test.dart new file mode 100644 index 000000000000..10c673c94359 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/services/symbols/symbols_notifier_test.dart @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:highlight/highlight_core.dart'; +import 'package:playground_components/src/models/symbols_dictionary.dart'; +import 'package:playground_components/src/services/symbols/loaders/abstract.dart'; +import 'package:playground_components/src/services/symbols/symbols_notifier.dart'; + +void main() { + test( + 'SymbolsNotifier loads symbols from a loader and notifies listeners', + () async { + const symbols = ['a', 'b', 'c']; + final mode = Mode(); + final notifier = SymbolsNotifier(); + int notified = 0; + List? loadedSymbols; + + notifier.addListener(() { + notified++; + loadedSymbols = + List.from(notifier.getDictionary(mode)!.symbols); + }); + notifier.addLoaderIfNot(mode, const _TestLoader(symbols)); + notifier.addLoaderIfNot(mode, const _TestLoader(symbols)); + await Future.delayed(Duration.zero); + + expect(notified, 1); + expect(loadedSymbols, symbols); + }, + ); +} + +class _TestLoader extends AbstractSymbolsLoader { + final List symbols; + + const _TestLoader(this.symbols); + + @override + Future get future async { + return SymbolsDictionary(symbols: symbols); + } +} diff --git a/playground/frontend/build/playground_components/test/src/services/toast_notifier_test.dart b/playground/frontend/build/playground_components/test/src/services/toast_notifier_test.dart new file mode 100644 index 000000000000..7351ca06c25a --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/services/toast_notifier_test.dart @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:playground_components/src/services/toast_notifier.dart'; + +void main() { + late ToastNotifier notifier; + final toasts = []; + + setUp((){ + toasts.clear(); + notifier = ToastNotifier(); + notifier.toasts.listen(toasts.add); + }); + + group('ToastNotifier', () { + test('add', () async { + const toast = Toast( + title: 'title', + description: 'text', + type: ToastType.info, + ); + + notifier.add(toast); + await Future.delayed(Duration.zero); + + expect(toasts, [toast]); + }); + + test('addException', () async { + final exception = _TestException(); + + notifier.addException(exception); + await Future.delayed(Duration.zero); + + expect( + toasts, + [ + Toast( + title: 'errors.error', + description: exception.toString(), + type: ToastType.error, + ), + ], + ); + }); + }); +} + +class _TestException implements Exception { + @override + String toString() => 'test'; +} diff --git a/playground/frontend/build/playground_components/test/src/util/pipeline_options_test.dart b/playground/frontend/build/playground_components/test/src/util/pipeline_options_test.dart new file mode 100644 index 000000000000..cb15e5b046e6 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/util/pipeline_options_test.dart @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/util/pipeline_options.dart'; + +void main() { + group('PipelineOptions parser', () { + test('should return null if cant parse options', () { + expect(parsePipelineOptions('--key1'), null); + expect(parsePipelineOptions('--key1 value --key'), null); + expect(parsePipelineOptions('-key1 value'), null); + expect(parsePipelineOptions('- -key1 value'), null); + }); + test('should return empty map if empty', () { + expect(parsePipelineOptions(''), {}); + }); + test('should parse correct options string', () { + expect( + parsePipelineOptions('--key1 value1 --key2 value2'), + {'key1': 'value1', 'key2': 'value2'}, + ); + expect( + parsePipelineOptions('--key1 value1 --key2 value2'), + {'key1': 'value1', 'key2': 'value2'}, + ); + expect( + parsePipelineOptions('--output1 ./dir --output2 "value"'), + {'output1': './dir', 'output2': '"value"'}, + ); + }); + }); + group('PipelineOptions to string', () { + test('should return empty string for empty map', () { + expect(pipelineOptionsToString({}), ''); + }); + test('should correctly transform single option', () { + expect(pipelineOptionsToString({'key': 'value'}), '--key value'); + }); + test('should correctly transform multiple options', () { + expect( + pipelineOptionsToString( + {'key': 'value', 'key2': 'value2', 'key3': 'value3'}, + ), + '--key value --key2 value2 --key3 value3', + ); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/src/util/run_with_retry_test.dart b/playground/frontend/build/playground_components/test/src/util/run_with_retry_test.dart new file mode 100644 index 000000000000..5c655a01f3c4 --- /dev/null +++ b/playground/frontend/build/playground_components/test/src/util/run_with_retry_test.dart @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/util/run_with_retry.dart'; + +class ExecutionTime { + final int time; + final T? value; + final Object? error; + + ExecutionTime(this.time, {this.value, this.error}); +} + +Future> withExecutionTime(Future Function() fn) async { + final stopwatch = Stopwatch()..start(); + try { + final result = await fn(); + return ExecutionTime(stopwatch.elapsedMilliseconds, value: result); + } catch (e) { + return ExecutionTime(stopwatch.elapsedMilliseconds, error: e); + } +} + +class ResultBuilder { + static Future Function() getFutureWithResult(List Function()> futures) { + var attempt = 0; + return () async { + final futureCreator = futures[attempt]; + attempt = attempt + 1; + return futureCreator(); + }; + } +} + +void main() { + test('runWithRetry should resolve success instantly', () async { + final result = await withExecutionTime( + () => runWithRetry(() => Future.value(10), retryWaitMs: 50)); + // it should run without retry, so execution time should be less than retry + expect(result.time, lessThan(50)); + expect(result.value, equals(10)); + }); + + test( + 'runWithRetry should return success result if attempts count not exceeded limits', + () async { + final builder = ResultBuilder.getFutureWithResult([ + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.value(10), + ]); + final result = await withExecutionTime( + () => runWithRetry(() => builder(), retryCount: 5, retryWaitMs: 10)); + // it should run with 4 retries, so execution time should be greater 10 * 4 + expect(result.time, greaterThan(40)); + expect(result.value, equals(10)); + }); + + test( + 'runWithRetry should return error result if attempts count exceeded limits', + () async { + final builder = ResultBuilder.getFutureWithResult([ + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('error'), + () => Future.error('last error'), + ]); + final result = await withExecutionTime( + () => runWithRetry(() => builder(), retryCount: 5, retryWaitMs: 10)); + // it should run with attempt + 5 retries, so execution time should be greater 10 * 5 + expect(result.time, greaterThan(50)); + expect(result.error, equals('last error')); + }); +} diff --git a/playground/frontend/build/playground_components/test/theme/switch_notifier_test.dart b/playground/frontend/build/playground_components/test/theme/switch_notifier_test.dart new file mode 100644 index 000000000000..b94ee6958524 --- /dev/null +++ b/playground/frontend/build/playground_components/test/theme/switch_notifier_test.dart @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/src/theme/switch_notifier.dart'; + +void main() { + group('theme mode', () { + test('light mode is default', () { + expect(ThemeSwitchNotifier().isDarkMode, false); + }); + }); +} diff --git a/playground/frontend/build/playground_components/test/tools/common.dart b/playground/frontend/build/playground_components/test/tools/common.dart new file mode 100644 index 000000000000..ef98885a477f --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/common.dart @@ -0,0 +1,90 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:io'; + +import 'package:flutter_test/flutter_test.dart'; + +Future testExtractSymbols({ + required String language, + required List executables, + required List arguments, +}) async { + final directory = 'tools/extract_symbols_$language'; + final fileName = 'test/$directory/$language.golden.yaml'; + final results = {}; + + for (final executable in await _getExecutables(executables)) { + final result = await Process.run( + executable, + arguments, + workingDirectory: directory, + ); + + if (result.exitCode != 0) { + results[executable] = result; + continue; + } + + expect(result.stdout, File(fileName).readAsStringSync()); + return; + } + + final path = (await Process.run('printenv', ['PATH'])).stdout; + fail( + 'Script error ' + 'or No $executables in your \$PATH: $path\n${results.toStringDebug()}', + ); +} + +/// Returns all executables found in $PATH. +/// +/// Flutter comes with it's own copy of `python3` which has neither +/// `pyyaml` package nor `pip3` to install it. +/// The test environment overrides $PATH to put that copy of `python3` first, +/// so we cannot automatically get the system's default `python3`. +/// So we must try all available copies of `python3`. +/// +/// The same may happen with other SDKs. +Future> _getExecutables(List executables) async { + final result = await Process.run('which', ['-a', executables.join(' ')]); + return result.stdout + .toString() + .split('\n') + .where((command) => command.isNotEmpty); +} + +extension on ProcessResult { + String toStringDebug() { + final buffer = StringBuffer(); + + buffer.writeln('Exit code: ${this.exitCode}'); + buffer.writeln('Stdout:\n${this.stdout}'); + buffer.writeln('Stderr:\n${this.stderr}'); + + return buffer.toString(); + } +} + +extension on Map { + String toStringDebug() { + return entries + .map((e) => '${e.key}\n${e.value.toStringDebug()}') + .join('\n\n'); + } +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_go/extract_symbols_go_test.dart b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/extract_symbols_go_test.dart new file mode 100644 index 000000000000..874a75c80eb6 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/extract_symbols_go_test.dart @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; + +import '../common.dart'; + +const _lang = 'go'; + +void main() { + test('Extract SDK Symbols. $_lang', () async { + await testExtractSymbols( + language: _lang, + executables: ['go'], + arguments: const [ + 'run', + 'extract_symbols_$_lang.go', + '../../test/tools/extract_symbols_$_lang/sdk_mock', + ], + ); + }); +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_go/go.golden.yaml b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/go.golden.yaml new file mode 100644 index 000000000000..4729b2b9e341 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/go.golden.yaml @@ -0,0 +1,17 @@ +"": + methods: + - PublicGlobalFunction +PublicStruct2: + methods: + - MethodAfterStructDeclaration + - PublicMethodOnPublicStruct + - PublicMethodOnPublicStructGeneric1 + - PublicMethodOnPublicStructGeneric2 + - PublicMethodOnPublicStructPointer + - PublicMethodOnPublicStructPointerGeneric1 + - PublicMethodOnPublicStructPointerGeneric2 + properties: + - PublicField2 +PublicStruct3: + properties: + - PublicField3 diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/file2.go b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/file2.go new file mode 100644 index 000000000000..095773800dd2 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/file2.go @@ -0,0 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +func privateGlobalFunction() {} +func PublicGlobalFunction() {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/ignore.txt b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/ignore.txt new file mode 100644 index 000000000000..ad26d74c4aec --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/directory/ignore.txt @@ -0,0 +1,18 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +func PublicFunctionInIgnoredFile() {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/file1.go b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/file1.go new file mode 100644 index 000000000000..7497cc150a90 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_go/sdk_mock/file1.go @@ -0,0 +1,73 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +// Methods are deliberately declared before structs. + +// Private methods on private struct -- Ignored. + +func (p privateStruct2) privateMethodOnPrivateStruct() {} +func (p privateStruct2[int]) privateMethodOnPrivateStructGeneric1() {} +func (p privateStruct2[int, string]) privateMethodOnPrivateStructGeneric2() {} +func (p *privateStruct2) privateMethodOnPrivateStructPointer() {} +func (p *privateStruct2[int]) privateMethodOnPrivateStructPointerGeneric1() {} +func (p *privateStruct2[int, string]) privateMethodOnPrivateStructPointerGeneric2() {} + +// Public methods on private struct -- Ignored. + +func (p privateStruct2) PublicMethodOnPrivateStruct() {} +func (p privateStruct2[int]) PublicMethodOnPrivateStructGeneric1() {} +func (p privateStruct2[int, string]) PublicMethodOnPrivateStructGeneric2() {} +func (p *privateStruct2) PublicMethodOnPrivateStructPointer() {} +func (p *privateStruct2[int]) PublicMethodOnPrivateStructPointerGeneric1() {} +func (p *privateStruct2[int, string]) PublicMethodOnPrivateStructPointerGeneric2() {} + +// Private methods on public struct -- Ignored. + +func (p PublicStruct2) privateMethodOnPublicStruct() {} +func (p PublicStruct2[int]) privateMethodOnPublicStructGeneric1() {} +func (p PublicStruct2[int, string]) privateMethodOnPublicStructGeneric2() {} +func (p *PublicStruct2) privateMethodOnPublicStructPointer() {} +func (p *PublicStruct2[int]) privateMethodOnPublicStructPointerGeneric1() {} +func (p *PublicStruct2[int, string]) privateMethodOnPublicStructPointerGeneric2() {} + +// Public methods on public struct. + +func (p PublicStruct2) PublicMethodOnPublicStruct() {} +func (p PublicStruct2[int]) PublicMethodOnPublicStructGeneric1() {} +func (p PublicStruct2[int, string]) PublicMethodOnPublicStructGeneric2() {} +func (p *PublicStruct2) PublicMethodOnPublicStructPointer() {} +func (p *PublicStruct2[int]) PublicMethodOnPublicStructPointerGeneric1() {} +func (p *PublicStruct2[int, string]) PublicMethodOnPublicStructPointerGeneric2() {} + +// Structs + +type privateStruct1 struct { + privateField1 int + PublicField2 *string +} + +type PublicStruct2 struct { + privateField1 int + PublicField2 *string +} + +type PublicStruct3 struct { + PublicStruct2 + PublicField3 int +} + +func (p PublicStruct2) MethodAfterStructDeclaration() {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/extract_symbols_java_test.dart b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/extract_symbols_java_test.dart new file mode 100644 index 000000000000..d944441f10a5 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/extract_symbols_java_test.dart @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:io'; + +import 'package:flutter_test/flutter_test.dart'; + +import '../common.dart'; + +const _lang = 'java'; +const _dependenciesDir = 'test/tools/extract_symbols_$_lang/dependencies'; + +void main() { + test('Extract SDK Symbols. $_lang', () async { + final classPath = await _buildClassPath(); + await _compileClasses(classPath); + await testExtractSymbols( + language: _lang, + executables: ['java'], + arguments: [ + '-classpath', + classPath, + 'com.playground.extract_symbols.Main', + '../../test/tools/extract_symbols_$_lang/sdk_mock', + ], + ); + }); +} + +Future _buildClassPath() async { + const dependencies = [ + 'https://repo1.maven.org/maven2/com/github/javaparser/javaparser-core/3.24.9/javaparser-core-3.24.9.jar', + 'https://repo1.maven.org/maven2/com/esotericsoftware/yamlbeans/yamlbeans/1.15/yamlbeans-1.15.jar', + ]; + + await _downloadDependenciesIfNeed(dependencies); + + final workingDirectory = Directory.current.path; + + return [ + '$workingDirectory/tools/extract_symbols_$_lang/build/classes/java/main', + ...dependencies.map( + (f) => '$workingDirectory/$_dependenciesDir/${f.split('/').last}', + ), + ].join(':'); +} + +Future _downloadDependenciesIfNeed(List dependencies) async { + for (final dependency in dependencies) { + final fileName = dependency.split('/').last; + final file = File('$_dependenciesDir/$fileName'); + if (!file.existsSync()) { + final request = await HttpClient().getUrl(Uri.parse(dependency)); + final response = await request.close(); + await file.create(recursive: true); + await response.pipe(file.openWrite()); + } + } +} + +Future _compileClasses(String classPath) async { + await Process.run( + 'mkdir', + ['-p', 'build/classes/java/main'], + workingDirectory: 'tools/extract_symbols_$_lang', + ); + await Process.run( + 'javac', + [ + '-d', + 'build/classes/java/main/', + '-classpath', + classPath, + 'src/main/java/com/playground/extract_symbols/Main.java', + 'src/main/java/com/playground/extract_symbols/ClassInfo.java', + ], + workingDirectory: 'tools/extract_symbols_$_lang', + ); +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/java.golden.yaml b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/java.golden.yaml new file mode 100644 index 000000000000..d881f0c68044 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/java.golden.yaml @@ -0,0 +1,13 @@ +ExtendedPublicClass: + methods: + - extendedPublicMethod + properties: + - extendedPublicField +PublicClass: + methods: + - anotherPublicMethod + - publicMethod + properties: + - anotherPublicField + - publicField +Test: {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/DefaultClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/DefaultClass.java new file mode 100644 index 000000000000..62c016e83a36 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/DefaultClass.java @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class DefaultClass {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/KotlinClass.kt b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/KotlinClass.kt new file mode 100644 index 000000000000..54d56cc4f27e --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/KotlinClass.kt @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class KotlinClass() { + public fun publicMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PrivateClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PrivateClass.java new file mode 100644 index 000000000000..bc45d6127006 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PrivateClass.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +private class PrivateClass { + public void publicMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PublicClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PublicClass.java new file mode 100644 index 000000000000..978345eaacc6 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/PublicClass.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class PublicClass { + int defaultField; + public int publicField; + protected int protectedField; + private int privateField; + + void defaultMethod() {} + public void publicMethod() {} + protected void protectedMethod() {} + private void privateMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/Test.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/Test.java new file mode 100644 index 000000000000..92029db1cb39 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/Test.java @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This test file is in the result because it is not in .../test/... . +public class Test {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/ExtendedPublicClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/ExtendedPublicClass.java new file mode 100644 index 000000000000..924f91cbac2b --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/ExtendedPublicClass.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class ExtendedPublicClass extends PublicClass { + int extendedDefaultField; + public int extendedPublicField; + protected int protectedField; + private int privateField; + + public void extendedPublicMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/PublicClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/PublicClass.java new file mode 100644 index 000000000000..5f9eae157e50 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/directory/PublicClass.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class PublicClass { + int defaultField; + public int publicField; + public int anotherPublicField; + protected int protectedField; + private int privateField; + + void defaultMethod() {} + public void publicMethod() {} + public void publicMethod(int i) {} + public void anotherPublicMethod() {} + protected void protectedMethod() {} + private void privateMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/test/TestFolderPublicClass.java b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/test/TestFolderPublicClass.java new file mode 100644 index 000000000000..6ad8cd789497 --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_java/sdk_mock/test/TestFolderPublicClass.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This class is skipped because it is in .../test/... . +public class TestFolderPublicClass { + public int publicField; + + public void publicMethod() {} +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_python/extract_symbols_python_test.dart b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/extract_symbols_python_test.dart new file mode 100644 index 000000000000..344198f0ba9a --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/extract_symbols_python_test.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; + +import '../common.dart'; + +const _lang = 'python'; + +void main() { + test('Extract SDK Symbols. $_lang', () async { + await testExtractSymbols( + language: _lang, + executables: ['python3'], + arguments: const [ + 'extract_symbols_$_lang.py', + '../../test/tools/extract_symbols_$_lang/sdk_mock', + ], + ); + }); +} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_python/python.golden.yaml b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/python.golden.yaml new file mode 100644 index 000000000000..05af7605603d --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/python.golden.yaml @@ -0,0 +1,9 @@ +Class1: + methods: + - visible_method_1 + - visible_method_2 + properties: + - visible_field_1 + - visible_field_2 +Class2: {} +Class3: {} diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/directory/file2.py b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/directory/file2.py new file mode 100644 index 000000000000..6bde26be544b --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/directory/file2.py @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class Class3: + pass diff --git a/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/file1.py b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/file1.py new file mode 100644 index 000000000000..4b02c570c71a --- /dev/null +++ b/playground/frontend/build/playground_components/test/tools/extract_symbols_python/sdk_mock/file1.py @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import numpy + +class Class2: + pass + +class Class1(object): + visible_field_2: numpy.int8 + visible_field_1 = [] + + _hidden_field_1 = 1 + + def __init__(self): + self.hidden_field_2 = 2 + + def _hidden_method_2(): pass + + def visible_method_2(): + self.hidden_field_3 = 3 + + def visible_method_1(): + self.hidden_field_3 = 3 + +def hidden_global_function(): + return 1 + +hidden_global_variable = 1 + +class HiddenTest: + pass + +class HiddenTestCase: + pass diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_go/extract_symbols_go.go b/playground/frontend/build/playground_components/tools/extract_symbols_go/extract_symbols_go.go new file mode 100644 index 000000000000..a940a9ab396d --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_go/extract_symbols_go.go @@ -0,0 +1,257 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "fmt" + "go/ast" + "go/parser" + "go/token" + "io/fs" + "os" + "path/filepath" + "sort" + "strings" + "unicode" + + "gopkg.in/yaml.v2" +) + +type ClassSymbols struct { + Methods []string `yaml:",omitempty"` + Properties []string `yaml:",omitempty"` +} + +func (cs *ClassSymbols) sort() { + sort.Strings(cs.Methods) + cs.Methods = removeDuplicates(cs.Methods) + + sort.Strings(cs.Properties) + cs.Properties = removeDuplicates(cs.Properties) +} + +func main() { + if len(os.Args) < 2 { + fmt.Println("Usage: go run extract_symbols_go.go ") + return + } + + path := os.Args[1] + classesMap := getDirSymbolsRecursive(path) + sortClassSymbolsMap(classesMap) + + yamlData, err := yaml.Marshal(&classesMap) + if err != nil { + panic(err) + } + + fmt.Print(string(yamlData)) +} + +func getDirSymbolsRecursive(dir string) map[string]*ClassSymbols { + classesMap := make(map[string]*ClassSymbols) + + filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + + if d.IsDir() || !shouldIncludeFile(path) { + return nil + } + + addFileSymbols(classesMap, path) + return nil + }) + + return classesMap +} + +func shouldIncludeFile(path string) bool { + if !strings.HasSuffix(path, ".go") { + return false + } + + if strings.HasSuffix(path, "_test.go") { + return false + } + + return true +} + +func addFileSymbols(classesMap map[string]*ClassSymbols, filename string) { + fileSet := token.NewFileSet() + file, err := parser.ParseFile(fileSet, filename, nil, parser.SkipObjectResolution) + if err != nil { + panic(err) + } + + ast.Inspect(file, func(node ast.Node) bool { + switch node := node.(type) { + case *ast.TypeSpec: + visitTypeSpec(classesMap, node) + case *ast.FuncDecl: + visitFuncDecl(classesMap, node) + default: + return true // Go recursive + } + + return false // No recursion + }) +} + +func visitTypeSpec(classesMap map[string]*ClassSymbols, typeSpec *ast.TypeSpec) { + className := typeSpec.Name.Name + if !shouldIncludeSymbol(className) { + return + } + + if structType, ok := typeSpec.Type.(*ast.StructType); ok { + visitStructType(classesMap, typeSpec, structType) + return + } + + if interfaceType, ok := typeSpec.Type.(*ast.InterfaceType); ok { + visitInterfaceType(classesMap, typeSpec, interfaceType) + return + } +} + +func visitStructType(classesMap map[string]*ClassSymbols, typeSpec *ast.TypeSpec, structType *ast.StructType) { + className := typeSpec.Name.Name + classSymbols := getOrCreateClassSymbols(classesMap, className) + + for _, field := range (*structType.Fields).List { + if len(field.Names) == 0 { + continue + } + + name := field.Names[0].Name + if !shouldIncludeSymbol(name) { + continue + } + + classSymbols.Properties = append(classSymbols.Properties, name) + } +} + +func visitInterfaceType(classesMap map[string]*ClassSymbols, typeSpec *ast.TypeSpec, interfaceType *ast.InterfaceType) { + className := typeSpec.Name.Name + classSymbols := getOrCreateClassSymbols(classesMap, className) + + for _, field := range (*interfaceType.Methods).List { + if len(field.Names) == 0 { + continue + } + + name := field.Names[0].Name + if !shouldIncludeSymbol(name) { + continue + } + + classSymbols.Methods = append(classSymbols.Methods, name) + } +} + +func visitFuncDecl(classesMap map[string]*ClassSymbols, funcDecl *ast.FuncDecl) { + className := getReceiverClassName(funcDecl) + if !shouldIncludeSymbol(className) { + return + } + + name := funcDecl.Name.Name + if !shouldIncludeSymbol(name) { + return + } + + classSymbols := getOrCreateClassSymbols(classesMap, className) + classSymbols.Methods = append(classSymbols.Methods, name) +} + +func getReceiverClassName(funcDecl *ast.FuncDecl) string { + if funcDecl.Recv == nil { + return "" + } + + return getExpressionClassName(funcDecl.Recv.List[0].Type) +} + +// Extracts the class name from nodes like Foo, *Foo, Foo[type] etc. +func getExpressionClassName(expr ast.Expr) string { + switch expr := expr.(type) { + case *ast.Ident: + // Foo + return expr.Name + case *ast.IndexExpr: + // Foo[param] + if ident, ok := expr.X.(*ast.Ident); ok { + return ident.Name + } + case *ast.IndexListExpr: + // Foo[param1, param2] + if ident, ok := expr.X.(*ast.Ident); ok { + return ident.Name + } + case *ast.StarExpr: + // *Foo, *Foo[param], *Foo[param1, param2] + return getExpressionClassName(expr.X) + } + + panic(nil) +} + +func getOrCreateClassSymbols(classesMap map[string]*ClassSymbols, name string) *ClassSymbols { + existing, ok := classesMap[name] + if ok { + return existing + } + + created := ClassSymbols{} + + classesMap[name] = &created + return &created +} + +func shouldIncludeSymbol(symbol string) bool { + if symbol == "" { + return true // Special case for globals. + } + + r := []rune(symbol)[0] + return unicode.IsUpper(r) +} + +func sortClassSymbolsMap(classesMap map[string]*ClassSymbols) { + // Only sort ClassSymbols objects because the map itself is sorted when serialized. + // https://github.com/go-yaml/yaml/issues/30#issuecomment-56232269 + for _, v := range classesMap { + v.sort() + } +} + +func removeDuplicates(arr []string) []string { + existing := make(map[string]bool) + result := []string{} + + for _, item := range arr { + if _, exists := existing[item]; !exists { + existing[item] = true + result = append(result, item) + } + } + + return result +} diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_go/go.mod b/playground/frontend/build/playground_components/tools/extract_symbols_go/go.mod new file mode 100644 index 000000000000..eb4d9437f130 --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_go/go.mod @@ -0,0 +1,20 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module beam.apache.org/playground/extract_symbols_go + +go 1.20 + +require gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_go/go.sum b/playground/frontend/build/playground_components/tools/extract_symbols_go/go.sum new file mode 100644 index 000000000000..75346616b19b --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_go/go.sum @@ -0,0 +1,3 @@ +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_java/build.gradle b/playground/frontend/build/playground_components/tools/extract_symbols_java/build.gradle new file mode 100644 index 000000000000..a71f7d4d2539 --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_java/build.gradle @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id 'java' +} + +group 'com.playground.extract_symbols' + +repositories { + mavenCentral() +} + +ext { + javaMainClass = "com.playground.extract_symbols.Main" +} + +dependencies { + implementation group: 'com.github.javaparser', name: 'javaparser-core', version: '3.23.1' + implementation group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version: '1.15' +} + +tasks.register("buildJava") { + dependsOn "build" + doLast { + exec { + executable "java" + args "-classpath", sourceSets.main.runtimeClasspath.getAsPath(), javaMainClass, "../../../../../sdks/java" + standardOutput = new FileOutputStream("playground/frontend/playground_components/assets/symbols/java.g.yaml") + } + } +} diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/ClassInfo.java b/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/ClassInfo.java new file mode 100644 index 000000000000..be1dd88a9b2d --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/ClassInfo.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package com.playground.extract_symbols; + +import java.util.*; +import java.util.stream.Collectors; + +public class ClassInfo { + final Set publicMethods = new HashSet<>(); + final Set publicFields = new HashSet<>(); + + Map> toMap() { + Map> map = new HashMap<>(); + if (!publicMethods.isEmpty()) { + map.put("methods", publicMethods.stream().sorted().collect(Collectors.toList())); + } + if (!publicFields.isEmpty()) { + map.put("properties", publicFields.stream().sorted().collect(Collectors.toList())); + } + return map; + } +} diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/Main.java b/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/Main.java new file mode 100644 index 000000000000..7d6f81597fd8 --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_java/src/main/java/com/playground/extract_symbols/Main.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.playground.extract_symbols; + +import com.esotericsoftware.yamlbeans.YamlConfig; +import com.esotericsoftware.yamlbeans.YamlException; +import com.esotericsoftware.yamlbeans.YamlWriter; +import com.github.javaparser.ParseProblemException; +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.CompilationUnit; +import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; +import com.github.javaparser.ast.body.FieldDeclaration; +import com.github.javaparser.ast.body.MethodDeclaration; + +import java.io.File; +import java.io.IOException; +import java.io.StringWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.*; + +public class Main { + public static void main(String[] args) throws IOException { + final String sdkPath = args[0]; + final HashMap classInfoMap = getDirSymbols(sdkPath); + final String yamlString = buildYamlString(classInfoMap); + System.out.print(yamlString); + } + + private static HashMap getDirSymbols(String sdkPathString) throws IOException { + final HashMap classInfoMap = new HashMap<>(); + final Path sdkPath = new File(sdkPathString).toPath().toAbsolutePath(); + Files.walk(sdkPath).forEach(path -> { + String stringPath = path.toString(); + final String relativePath = sdkPath.relativize(path).toString(); + if (isJavaNonTestFile(relativePath)) { + String fileName = stringPath.substring(stringPath.lastIndexOf("/") + 1).replace(".java", ""); + try { + CompilationUnit unit = StaticJavaParser.parse(path); + if (unit.getClassByName(fileName).isPresent()) { + addClassSymbols(classInfoMap, unit.getClassByName(fileName).get()); + } + } catch (IOException | ParseProblemException ignored) { + } + } + }); + + return classInfoMap; + } + + static boolean isJavaNonTestFile(String stringPath) { + final boolean isInTestFolder = stringPath.contains("/test/") || stringPath.startsWith("test/"); + return stringPath.endsWith(".java") && !isInTestFolder; + } + + private static void addClassSymbols(HashMap classInfoList, ClassOrInterfaceDeclaration cl) { + if (!cl.isPublic()) { + return; + } + + ClassInfo classInfo; + if (classInfoList.containsKey(cl.getNameAsString())) { + classInfo = classInfoList.get(cl.getNameAsString()); + } else { + classInfo = new ClassInfo(); + classInfoList.put(cl.getNameAsString(), classInfo); + } + + cl.findAll(MethodDeclaration.class).forEach(method -> { + if (method.isPublic()) { + classInfo.publicMethods.add(method.getNameAsString()); + } + }); + cl.findAll(FieldDeclaration.class).forEach(field -> { + if (field.isPublic()) { + classInfo.publicFields.add(field.getVariable(0).getNameAsString()); + } + }); + } + + private static String buildYamlString(HashMap classInfoMap) throws YamlException { + final StringWriter stringWriter = new StringWriter(); + final YamlWriter yamlWriter = new YamlWriter(stringWriter); + yamlWriter.getConfig().writeConfig.setIndentSize(2); + yamlWriter.getConfig().writeConfig.setWriteClassname(YamlConfig.WriteClassName.NEVER); + final LinkedHashMap>> yamlMap = new LinkedHashMap<>(); + + classInfoMap.forEach((key, value) -> yamlMap.put(key, value.toMap())); + final LinkedHashMap>> sortedMap = sortMap(yamlMap); + + yamlWriter.write(sortedMap); + + yamlWriter.close(); + return stringWriter.toString(); + } + + private static LinkedHashMap>> sortMap(HashMap>> yamlMap) { + final Comparator> comparator = Comparator.comparing(Map.Entry::getKey); + final ArrayList>>> array = new ArrayList<>(yamlMap.entrySet()); + array.sort(comparator); + + final LinkedHashMap>> sortedMap = new LinkedHashMap<>(); + for (Map.Entry>> entry : array) { + sortedMap.put(entry.getKey(), entry.getValue()); + } + return sortedMap; + } +} diff --git a/playground/frontend/build/playground_components/tools/extract_symbols_python/extract_symbols_python.py b/playground/frontend/build/playground_components/tools/extract_symbols_python/extract_symbols_python.py new file mode 100644 index 000000000000..5656de4a1fd9 --- /dev/null +++ b/playground/frontend/build/playground_components/tools/extract_symbols_python/extract_symbols_python.py @@ -0,0 +1,124 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import argparse +import ast +import os +import yaml +from typing import Dict +from typing import List + + +def should_include_class_node(class_node: ast.ClassDef) -> bool: + if class_node.name[0:1] == '_': return False + if class_node.name[-4:] == 'Test': return False + if class_node.name[-8:] == 'TestCase': return False + return True + + +def should_include_function_node(member_node: ast.FunctionDef) -> bool: + if member_node.name[0:1] == '_': return False + return True + + +def should_include_property_node(name_node: ast.Name) -> bool: + if name_node.id[0:1] == '_': return False + return True + + +def get_file_symbols(file_name: str) -> Dict[str, Dict[str, List[str]]]: + classes_dict = {} + + with open(file_name, 'r') as f: + str = f.read() + + module = ast.parse(str) + + for class_node in module.body: + if isinstance(class_node, ast.ClassDef): + if not should_include_class_node(class_node): continue + + class_dict = { + 'methods': [], + 'properties': [], + } + + for member_node in class_node.body: + if isinstance(member_node, ast.FunctionDef): + if not should_include_function_node(member_node): continue + class_dict['methods'].append(member_node.name) + + elif isinstance(member_node, ast.Assign): + target = member_node.targets[0] + if isinstance(target, ast.Name): + if not should_include_property_node(target): continue + class_dict['properties'].append(target.id) + + elif isinstance(member_node, ast.AnnAssign): + target = member_node.target + if isinstance(target, ast.Name): + if not should_include_property_node(target): continue + class_dict['properties'].append(target.id) + + if len(class_dict['methods']) == 0: + del class_dict['methods'] + else: + class_dict['methods'].sort(key=lambda s: s.lower()) + + if len(class_dict['properties']) == 0: + del class_dict['properties'] + else: + class_dict['properties'].sort(key=lambda s: s.lower()) + + classes_dict[class_node.name] = class_dict + + return classes_dict + + +def get_dir_symbols_recursive(dir: str) -> Dict[str, Dict[str, List[str]]]: + class_names = {} + + for root, subdirs, files in os.walk(dir): + for file in files: + if not file.endswith('.py'): continue + + file_path = os.path.join(root, file) + class_names.update(get_file_symbols(file_path)) + + return class_names + + +parser = argparse.ArgumentParser(description='Parses a directory with Python files and prints a YAML with symbols.') +parser.add_argument('dir', metavar='DIR', type=str, help='The directory to parse.') +args = parser.parse_args() + +class_names = get_dir_symbols_recursive(args.dir) +class_names = dict( + sorted( + class_names.items(), + key=lambda pair: pair[0].lower(), + ) +) + +print( + yaml.dump( + class_names, + default_flow_style=False, + sort_keys=False, + ), + end='', +) diff --git a/playground/frontend/build/playground_components/tools/generate_build_metadata.sh b/playground/frontend/build/playground_components/tools/generate_build_metadata.sh new file mode 100644 index 000000000000..d06c97f97d4a --- /dev/null +++ b/playground/frontend/build/playground_components/tools/generate_build_metadata.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Usage +# ./generate_build_metadata.sh + +FILE=$(realpath "$(dirname "$0")/../lib/src/build_metadata.g.dart") + +cat > "$FILE" << EOF +// GENERATED CODE - DO NOT MODIFY BY HAND +// +// This file is generated during deployment to contain data about the commit. +// The copy of this file stored in the repository is for development purpose +// so the project can be started locally. +// Keep these constants \`null\` in the repository. + +const buildCommitHash = '$1'; +const buildCommitSecondsSinceEpoch = $2; +EOF + +echo "Written $FILE:" +cat "$FILE" diff --git a/playground/frontend/build/playground_components_dev/README.md b/playground/frontend/build/playground_components_dev/README.md new file mode 100644 index 000000000000..cf1f2678a28d --- /dev/null +++ b/playground/frontend/build/playground_components_dev/README.md @@ -0,0 +1,23 @@ + + +# playground_components_dev + +This is a non-pub.dev Flutter package that contains +helpers for testing [playground_components](../playground_components) package. diff --git a/playground/frontend/build/playground_components_dev/analysis_options.yaml b/playground/frontend/build/playground_components_dev/analysis_options.yaml new file mode 100644 index 000000000000..06a391310797 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/analysis_options.yaml @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +include: package:total_lints/app.yaml + +linter: + rules: + do_not_use_environment: false diff --git a/playground/frontend/build/playground_components_dev/lib/playground_components_dev.dart b/playground/frontend/build/playground_components_dev/lib/playground_components_dev.dart new file mode 100644 index 000000000000..704d512ea4f7 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/playground_components_dev.dart @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export 'src/common_finders.dart'; + +export 'src/common_tests/toggle_brightness_mode_test.dart'; + +export 'src/examples/example_descriptor.dart'; + +export 'src/examples/go/example.dart'; +export 'src/examples/go/minimal_word_count.dart'; +export 'src/examples/go/word_count.dart'; + +export 'src/examples/java/aggregation_max.dart'; +export 'src/examples/java/example.dart'; +export 'src/examples/java/minimal_word_count.dart'; + +export 'src/examples/python/aggregation_mean.dart'; +export 'src/examples/python/word_count_with_metrics.dart'; + +export 'src/examples/scio/minimal_word_count.dart'; + +export 'src/expect.dart'; +export 'src/finder.dart'; +export 'src/string.dart'; +export 'src/widget_tester.dart'; diff --git a/playground/frontend/build/playground_components_dev/lib/src/code.dart b/playground/frontend/build/playground_components_dev/lib/src/code.dart new file mode 100644 index 000000000000..82ce8d89e063 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/code.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_code_editor/flutter_code_editor.dart'; +import 'package:highlight/highlight_core.dart'; + +String foldLicenseAndImports(String text, Mode language) { + final controller = CodeController( + language: language, + namedSectionParser: const BracketsStartEndNamedSectionParser(), + text: text, + ); + + controller.foldCommentAtLineZero(); + controller.foldImports(); + + return controller.text; +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/common_finders.dart b/playground/frontend/build/playground_components_dev/lib/src/common_finders.dart new file mode 100644 index 000000000000..5b57532ebdfe --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/common_finders.dart @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'finder.dart'; + +extension CommonFindersExtension on CommonFinders { + Finder snippetCodeField() { + return find.descendant( + of: find.byType(SnippetEditor), + matching: byType(CodeField), + ); + } + + Finder dropdownMenuItemWithText(String text) { + return find.descendant( + of: find.byType(DropdownMenuItem), + matching: find.text(text), + ); + } + + Finder graphTab() { + // TODO(alexeyinkin): Use keys when output tabs get to use enum, https://github.com/apache/beam/issues/22663 + return widgetWithText(OutputTab, 'Graph'); + } + + Finder outputCodeField() { + return find.descendant( + of: find.outputWidget(), + matching: byType(CodeField), + ); + } + + Finder outlinedButtonWithText(String text) { + return find.descendant( + of: find.byType(OutlinedButton), + matching: find.text(text), + ); + } + + Finder outputWidget() { + return byType(OutputWidget); + } + + Finder resetButton() { + return find.byType(ResetButton); + } + + Finder resultTab() { + return find.byType(ResultTab); + } + + Finder runOrCancelButton() { + return byType(RunOrCancelButton); + } + + Finder splitView() { + return byType(SplitView); + } + + Finder toggleThemeButton() { + return byType(ToggleThemeButton).or(byType(ToggleThemeIconButton)); + } +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/common_tests/toggle_brightness_mode_test.dart b/playground/frontend/build/playground_components_dev/lib/src/common_tests/toggle_brightness_mode_test.dart new file mode 100644 index 000000000000..d094b20197b4 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/common_tests/toggle_brightness_mode_test.dart @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:playground_components/playground_components.dart'; +import '../expect.dart'; +import '../widget_tester.dart'; + +Future checkToggleBrightnessMode(WidgetTester wt) async { + final oldBrightness = wt.getBrightness(); + final newBrightness = + oldBrightness == Brightness.light ? Brightness.dark : Brightness.light; + + await wt.toggleTheme(); + expect(wt.getBrightness(), newBrightness); + expectLastAnalyticsEvent( + ThemeSetAnalyticsEvent( + brightness: newBrightness, + ), + ); + + await wt.toggleTheme(); + expect(wt.getBrightness(), oldBrightness); + expectLastAnalyticsEvent( + ThemeSetAnalyticsEvent( + brightness: oldBrightness, + ), + ); +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/example_descriptor.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/example_descriptor.dart new file mode 100644 index 000000000000..6c938919e214 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/example_descriptor.dart @@ -0,0 +1,155 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: prefer_interpolation_to_compose_strings + +import 'package:http/http.dart' as http; +import 'package:playground_components/playground_components.dart'; + +import '../code.dart'; + +const _noGraphSdks = [Sdk.go, Sdk.scio]; + +const areExamplesDeployed = ExampleDescriptor._repository != '' && + ExampleDescriptor._ref != ''; + +/// Describes an example for the purpose of integration tests. +class ExampleDescriptor { + static const _schemaAndHost = 'https://github.com'; + static const _rawSchemaAndHost = 'https://raw.githubusercontent.com'; + + static const _repository = String.fromEnvironment('example-repository'); + static const _ref = String.fromEnvironment('example-ref'); + + const ExampleDescriptor( + this.name, { + required this.dbPath, + required this.path, + required this.sdk, + this.contextLine1Based, + this.croppedFoldedVisibleText, + this.foldedVisibleText, + this.fullText, + this.outputContains, + this.outputTail, + this.repository = _repository, + this.ref = _ref, + }); + + /// 1-based line index to set cursor to. + final int? contextLine1Based; + + /// A token to retrieve the example from server. + final String dbPath; + + /// Name as shown in the dropdown. + final String name; + + /// File path relative to the repository root, starting with `/`. + final String path; + + /// The owner and repository where this example code is stored, + /// like 'apache/beam'. + final String repository; + + /// The branch name or commit hash of the GitHub repository + /// to use when fetching the code for this example. + final String ref; + + /// The SDK of this example. + final Sdk sdk; + + /// Full text to override the one we would get from HTTPS. + final String? fullText; + + /// Visible text when using `visibleSectionNames` and `foldOutsideSections()`. + final String? croppedFoldedVisibleText; + + /// Visible text when using `foldOutsideSections()`. + final String? foldedVisibleText; + + /// The strings that the example's output must contain. + final List? outputContains; + + /// The string that the example's output must end with. + final String? outputTail; + + /// Whether the example tab must be visible after running this example. + bool get hasGraphTab => !_noGraphSdks.contains(sdk); + + /// The basename of the main file with extension. + String get mainFileName => '$name${sdk.fileExtension}'; + + /// The URL to view the file with GitHub UI elements. + /// + /// Example: + /// https://github.com/apache/beam/blob/master/examples/java/src/main/java/org/apache/beam/examples/MinimalWordCount.java + String get url => '$_schemaAndHost/$repository/blob/$ref$path'; + + /// The URL to view the file raw content on GitHub. + /// + /// Example: + /// https://raw.githubusercontent.com/apache/beam/master/examples/java/src/main/java/org/apache/beam/examples/MinimalWordCount.java + String get rawUrl => '$_rawSchemaAndHost/$repository/$ref$path'; + + /// The visible text in the code editor after required foldings. + Future getVisibleText() async { + final content = await getFullText(); + + return foldLicenseAndImports(content, sdk.highlightMode!); + } + + /// The full code of the example. + Future getFullText() async { + final text = fullText ?? (await http.get(Uri.parse(rawUrl))).body; + return cutTagComments(text); + } + + /// Cuts the comments containing meta tags from the file in the repository + /// so that it matches the source that must be provided by the backend. + static String cutTagComments(String code) { + const commentSequences = ['//', '#']; + const firstString = 'beam-playground:'; + + for (final commentSequence in commentSequences) { + final firstStringRe = RegExp( + '^' + + RegExp.escape(commentSequence) + + r'\s+' + + RegExp.escape(firstString) + + r'$', + multiLine: true, + ); + + final start = code.indexOf(firstStringRe); + if (start == -1) { + continue; + } + + final lastStringRe = RegExp(r'^(\s)*$', multiLine: true); + final end = code.indexOf(lastStringRe, start); + if (end == -1) { + continue; + } + + return code.substring(0, start) + code.substring(end); + } + + return code; + } +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/go/content/example.go b/playground/frontend/build/playground_components_dev/lib/src/examples/go/content/example.go new file mode 100644 index 000000000000..eb403bdfbe49 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/go/content/example.go @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "github.com/apache/beam/sdks/v2/go/pkg/beam" +) + +func OutsideOfSections() { +} + +// [START show] +func Folded() { +} + +func Unfolded1() { + fmt.Print("editable")// [START unfold1] + fmt.Print("readonly")// [START readonly1] [END unfold1] [END readonly1] +} + +func Unfolded2() { + fmt.Print("editable")// [START unfold2] + fmt.Print("readonly")// [START readonly2] [END unfold2] [END readonly2] +} +// [END show] diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/go/example.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/go/example.dart new file mode 100644 index 000000000000..249dfbda621f --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/go/example.dart @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +/// To test code folding, read-only, and visible sections. Not runnable. +const goExample = ExampleDescriptor( + // + '', + dbPath: '', + path: + '/playground/frontend/playground_components_dev/lib/src/examples/go/content/example.go', + sdk: Sdk.go, + + fullText: ''' +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "github.com/apache/beam/sdks/v2/go/pkg/beam" +) + +func OutsideOfSections() { +} + +// [START show] +func Folded() { +} + +func Unfolded1() { + fmt.Print("editable")// [START unfold1] + fmt.Print("readonly")// [START readonly1] [END unfold1] [END readonly1] +} + +func Unfolded2() { + fmt.Print("editable")// [START unfold2] + fmt.Print("readonly")// [START readonly2] [END unfold2] [END readonly2] +} +// [END show] +''', + + croppedFoldedVisibleText: ''' + +func Folded() { + +func Unfolded1() { + fmt.Print("editable") + fmt.Print("readonly") +} + +func Unfolded2() { + fmt.Print("editable") + fmt.Print("readonly") +} + +''', + foldedVisibleText: ''' +/* + +package main + +func OutsideOfSections() { + + +func Folded() { + +func Unfolded1() { + fmt.Print("editable") + fmt.Print("readonly") +} + +func Unfolded2() { + fmt.Print("editable") + fmt.Print("readonly") +} + +''', +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/go/minimal_word_count.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/go/minimal_word_count.dart new file mode 100644 index 000000000000..61d39c200fcc --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/go/minimal_word_count.dart @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const goMinimalWordCount = ExampleDescriptor( + // + 'MinimalWordCount', + contextLine1Based: 38, + dbPath: 'SDK_GO_MinimalWordCount', + path: '/sdks/go/examples/minimal_wordcount/minimal_wordcount.go', + sdk: Sdk.go, + + outputContains: [ + 'Reading from gs://apache-beam-samples/shakespeare/kinglear.txt', + 'Writing to wordcounts.txt', + ], +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/go/word_count.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/go/word_count.dart new file mode 100644 index 000000000000..2c603f697612 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/go/word_count.dart @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const goWordCount = ExampleDescriptor( + 'WordCount', + dbPath: 'SDK_GO_WordCount', + path: '/sdks/go/examples/wordcount/wordcount.go', + sdk: Sdk.go, +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/java/aggregation_max.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/java/aggregation_max.dart new file mode 100644 index 000000000000..256080f69a62 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/java/aggregation_max.dart @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const javaAggregationMax = ExampleDescriptor( + // + 'AggregationMax', + dbPath: 'SDK_JAVA_AggregationMax', + path: + '/learning/katas/java/Common Transforms/Aggregation/Max/src/org/apache/beam/learning/katas/commontransforms/aggregation/max/Task.java', + sdk: Sdk.java, + + outputTail: 'INFO: 10\n', +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/java/content/example.java b/playground/frontend/build/playground_components_dev/lib/src/examples/java/content/example.java new file mode 100644 index 000000000000..9e796ebb3947 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/java/content/example.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main; + +import a; +import b; + +void OutsideOfSections() { +} + +// [START show] +void Folded() { +} + +void Unfolded1() { + System.out.println("editable")// [START unfold1] + System.out.println("readonly")// [START readonly1] [END unfold1] [END readonly1] +} + +void Unfolded2() { + System.out.println("editable")// [START unfold2] + System.out.println("readonly")// [START readonly2] [END unfold2] [END readonly2] +} +// [END show] diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/java/example.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/java/example.dart new file mode 100644 index 000000000000..2e44a6639b38 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/java/example.dart @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +/// To test code folding, read-only, and visible sections. Not runnable. +const javaExample = ExampleDescriptor( + // + '', + dbPath: '', + path: + '/playground/frontend/playground_components_dev/lib/src/examples/java/content/example.java', + sdk: Sdk.java, + + fullText: ''' +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main; + +import a; +import b; + +void OutsideOfSections() { +} + +// [START show] +void Folded() { +} + +void Unfolded1() { + System.out.println("editable")// [START unfold1] + System.out.println("readonly")// [START readonly1] [END unfold1] [END readonly1] +} + +void Unfolded2() { + System.out.println("editable")// [START unfold2] + System.out.println("readonly")// [START readonly2] [END unfold2] [END readonly2] +} +// [END show] +''', + + croppedFoldedVisibleText: ''' + +void Folded() { + +void Unfolded1() { + System.out.println("editable") + System.out.println("readonly") +} + +void Unfolded2() { + System.out.println("editable") + System.out.println("readonly") +} + +''', + foldedVisibleText: ''' +/* + +package main; + +void OutsideOfSections() { + + +void Folded() { + +void Unfolded1() { + System.out.println("editable") + System.out.println("readonly") +} + +void Unfolded2() { + System.out.println("editable") + System.out.println("readonly") +} + +''', +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/java/minimal_word_count.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/java/minimal_word_count.dart new file mode 100644 index 000000000000..9a30a2b32e37 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/java/minimal_word_count.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const javaMinimalWordCount = ExampleDescriptor( + // + 'MinimalWordCount', + contextLine1Based: 54, + dbPath: 'SDK_JAVA_MinimalWordCount', + path: + '/examples/java/src/main/java/org/apache/beam/examples/MinimalWordCount.java', + sdk: Sdk.java, + + outputContains: ['Finalizing for destination'], +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/python/aggregation_mean.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/python/aggregation_mean.dart new file mode 100644 index 000000000000..7c91e14277f1 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/python/aggregation_mean.dart @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const pythonAggregationMean = ExampleDescriptor( + // + 'AggregationMean', + dbPath: 'SDK_PYTHON_AggregationMean', + path: '/learning/katas/python/Common Transforms/Aggregation/Mean/task.py', + sdk: Sdk.python, + + outputContains: ['5.5'], +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/python/word_count_with_metrics.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/python/word_count_with_metrics.dart new file mode 100644 index 000000000000..5619abc24c2d --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/python/word_count_with_metrics.dart @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; + +const pythonWordCountWithMetrics = ExampleDescriptor( + // + 'WordCountWithMetrics', + contextLine1Based: 23, + dbPath: 'SDK_PYTHON_WordCountWithMetrics', + path: '/sdks/python/apache_beam/examples/wordcount_with_metrics.py', + sdk: Sdk.python, + + outputContains: ['average word length: 4'], +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/scio/common.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/scio/common.dart new file mode 100644 index 000000000000..edafb443152e --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/scio/common.dart @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/// Commit in spotify/scio at which deployed examples match GitHub. +/// Must be hardcoded because we do not control the Spotify repository. +const spotifyScioRef = '72423169818a25b0cf9321dc24660a1252890a54'; diff --git a/playground/frontend/build/playground_components_dev/lib/src/examples/scio/minimal_word_count.dart b/playground/frontend/build/playground_components_dev/lib/src/examples/scio/minimal_word_count.dart new file mode 100644 index 000000000000..f1be208d7196 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/examples/scio/minimal_word_count.dart @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:playground_components/playground_components.dart'; + +import '../example_descriptor.dart'; +import 'common.dart'; + +const scioMinimalWordCount = ExampleDescriptor( + // + 'MinimalWordCount', + dbPath: 'SDK_SCIO_MinimalWordCount', + path: + '/scio-examples/src/main/scala/com/spotify/scio/examples/MinimalWordCount.scala', + sdk: Sdk.scio, + + repository: 'spotify/scio', + ref: spotifyScioRef, + + outputContains: ['Finalizing 5 file results'], +); diff --git a/playground/frontend/build/playground_components_dev/lib/src/expect.dart b/playground/frontend/build/playground_components_dev/lib/src/expect.dart new file mode 100644 index 000000000000..54b1ac979193 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/expect.dart @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'dart:ui'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground_components/playground_components.dart'; + +import 'examples/example_descriptor.dart'; +import 'widget_tester.dart'; + +void expectContextLine( + int contextLine1Based, + WidgetTester wt, { + String? reason, +}) { + final controller = wt.findOneCodeController(); + final selection = controller.selection; + final position = controller.code.hiddenRanges.recoverPosition( + selection.baseOffset, + placeHiddenRanges: TextAffinity.downstream, + ); + + expect(selection.isCollapsed, true); + expect( + controller.code.lines.characterIndexToLineIndex(position), + contextLine1Based - 1, + reason: reason, + ); +} + +void expectOutputIfDeployed(ExampleDescriptor example, WidgetTester wt) { + if (example.outputTail != null) { + expectOutputEndsWithIfDeployed(example.outputTail, wt); + } else if (example.outputContains != null) { + for (final str in example.outputContains!) { + expectOutputContainsIfDeployed(str, wt); + } + } else { + throw AssertionError('No pattern to check example output: ${example.path}'); + } +} + +void expectOutputEqualsIfDeployed(String text, WidgetTester wt) { + if (!areExamplesDeployed) { + return; + } + + final actualText = wt.findOutputText(); + expect(actualText, text); +} + +void expectOutputContainsIfDeployed(String? text, WidgetTester wt) { + if (!areExamplesDeployed) { + return; + } + + final actualText = wt.findOutputText(); + expect(text, isNotNull); + expect(actualText, contains(text)); +} + +void expectOutputEndsWithIfDeployed(String? text, WidgetTester wt) { + if (!areExamplesDeployed) { + return; + } + + final actualText = wt.findOutputText(); + expect(text, isNotNull); + expect(actualText, endsWith(text!)); +} + +void expectOutputStartsWith(String? text, WidgetTester wt) { + final actualText = wt.findOutputText(); + expect(text, isNotNull); + expect(actualText, startsWith(text!)); +} + +void expectSdk(Sdk sdk, WidgetTester wt) { + final controller = wt.findPlaygroundController(); + expect(controller.sdk, sdk); +} + +void expectSimilar(double a, double b) { + Matcher closeToFraction(num value, double fraction) => + closeTo(value, value * fraction); + Matcher onePerCentTolerance(num value) => closeToFraction(value, 0.01); + expect(a, onePerCentTolerance(b)); +} + +void expectVisibleTextIfDeployed(String? visibleText, WidgetTester wt) { + if (!areExamplesDeployed) { + return; + } + + expectVisibleText(visibleText, wt); +} + +void expectVisibleText(String? visibleText, WidgetTester wt, {String? reason}) { + final controller = wt.findOneCodeController(); + expect(visibleText, isNotNull); + expect(controller.text, visibleText, reason: reason); +} + +void expectLastAnalyticsEvent( + AnalyticsEvent event, { + String? reason, +}) { + expect( + PlaygroundComponents.analyticsService.lastEvent, + event, + reason: reason, + ); +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/finder.dart b/playground/frontend/build/playground_components_dev/lib/src/finder.dart new file mode 100644 index 000000000000..c4ae3d199e74 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/finder.dart @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; + +extension FinderExtension on Finder { + // TODO(alexeyinkin): Push to Flutter or wait for them to make their own, https://github.com/flutter/flutter/issues/117675 + Finder and(Finder another) { + return _AndFinder(this, another); + } + + Finder or(Finder another) { + return _OrFinder(this, another); + } + + Finder getChildrenByType(Type childType) { + final finders = evaluate(); + final childElements = finders + .map((e) => collectAllElementsFrom(e, skipOffstage: true)) + .expand((e) => e) + .where((e) => e.widget.runtimeType == childType); + + return find.byElementPredicate( + (element) => childElements.contains(element), + ); + } + + Finder horizontallyAt(int index, WidgetTester wt) => + _atIndexOnAxis(index, Axis.horizontal, wt); + + Finder verticallyAt(int index, WidgetTester wt) => + _atIndexOnAxis(index, Axis.vertical, wt); + + Finder _atIndexOnAxis(int index, Axis axis, WidgetTester wt) { + final finders = evaluate(); + + if (index > finders.length - 1) { + throw IndexError(index, finders); + } + + final offsets = <_IndexAndOffset>[]; + + for (int i = 0; i < finders.length; i++) { + offsets.add(_IndexAndOffset(i, wt.getCenter(at(i)))); + } + + offsets.sort( + (a, b) => axis == Axis.vertical + ? _compareDoubles(a.offset.dy, b.offset.dy) + : _compareDoubles(a.offset.dx, b.offset.dx), + ); + + return at(offsets[index].index); + } + + int _compareDoubles(double a, double b) { + return (a - b).sign.toInt(); + } +} + +class _AndFinder extends ChainedFinder { + _AndFinder(super.parent, this.another); + + final Finder another; + + @override + String get description => '${parent.description} AND ${another.description}'; + + @override + Iterable filter(Iterable parentCandidates) { + return another.apply(parentCandidates); + } +} + +class _OrFinder extends ChainedFinder { + _OrFinder(super.parent, this.another); + + final Finder another; + + @override + String get description => '(${parent.description} OR ${another.description})'; + + @override + Iterable filter(Iterable parentCandidates) { + return {...parentCandidates, ...another.evaluate()}; + } +} + +class _IndexAndOffset { + final int index; + final Offset offset; + + _IndexAndOffset(this.index, this.offset); +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/string.dart b/playground/frontend/build/playground_components_dev/lib/src/string.dart new file mode 100644 index 000000000000..7f300aeeb980 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/string.dart @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter/widgets.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; + +extension StringExtension on String { + /// Whether this is different from [another] only by cutting a single range + /// of zero or more characters. + bool isAsIfCutFrom(String another) { + final range = getChangedRange( + another, + attributeChangeTo: TextAffinity.downstream, + ); + + return range.isCollapsed; + } +} diff --git a/playground/frontend/build/playground_components_dev/lib/src/widget_tester.dart b/playground/frontend/build/playground_components_dev/lib/src/widget_tester.dart new file mode 100644 index 000000000000..9d3ab1cb4007 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/lib/src/widget_tester.dart @@ -0,0 +1,216 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:app_state/app_state.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_code_editor/flutter_code_editor.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:get_it/get_it.dart'; +import 'package:keyed_collection_widgets/keyed_collection_widgets.dart'; +import 'package:playground_components/playground_components.dart'; +import 'package:provider/provider.dart'; + +import 'common_finders.dart'; +import 'examples/example_descriptor.dart'; +import 'expect.dart'; + +extension WidgetTesterExtension on WidgetTester { + //workaround for https://github.com/flutter/flutter/issues/120060 + Future enterCodeFieldText(String text) async { + final codeField = widget(find.snippetCodeField()); + (codeField as CodeField).controller.fullText = text; + codeField.focusNode?.requestFocus(); + } + + Brightness getBrightness() { + final context = element(find.toggleThemeButton()); + return Theme.of(context).brightness; + } + + Future toggleTheme() async { + await tap(find.toggleThemeButton()); + await pumpAndSettle(); + } + + CodeController findOneCodeController() { + final codeField = find.snippetCodeField(); + expect(codeField, findsOneWidget); + + return widget(codeField).controller; + } + + KeyedTabController findOutputTabController() { + final beamTabBar = find.descendant( + of: find.outputWidget(), + matching: find.byType(BeamTabBar), + ); + + expect(beamTabBar, findsOneWidget); + + return beamTabBar.evaluate().first.getKeyedTabController()!; + } + + String? findOutputText() { + final codeField = widget(find.outputCodeField()); + return (codeField as CodeField).controller.text; + } + + PlaygroundController findPlaygroundController() { + final context = element(find.snippetCodeField()); + return context.read(); + } + + Future runShortcut(BeamShortcut shortcut) async { + final list = shortcut.keys.toList(); + for (final key in list) { + await sendKeyDownEvent(key); + } + for (final key in list.reversed) { + await sendKeyUpEvent(key); + } + } + + Future tapAndSettle( + Finder finder, { + bool warnIfMissed = true, + }) async { + await tap( + finder, + warnIfMissed: warnIfMissed, + ); + await pumpAndSettle(); + } + + Future pumpAndSettleNoException({ + Duration duration = const Duration(milliseconds: 100), + EnginePhase phase = EnginePhase.sendSemanticsUpdate, + Duration timeout = const Duration(minutes: 10), + }) async { + return TestAsyncUtils.guard(() async { + final DateTime endTime = binding.clock.fromNowBy(timeout); + int count = 0; + do { + if (binding.clock.now().isAfter(endTime)) { + return count; + } + await binding.pump(duration, phase); + count += 1; + } while (binding.hasScheduledFrame); + return count; + }); + } + + /// Runs and expects that the execution is as fast as it should be for cache. + Future runExpectCached(ExampleDescriptor example) async { + final codeRunner = findPlaygroundController().codeRunner; + + await tap(find.runOrCancelButton()); + await pump(); + expect(codeRunner.isCodeRunning, true); + + try { + await pumpAndSettle( + const Duration(milliseconds: 100), + EnginePhase.sendSemanticsUpdate, + const Duration(milliseconds: 1000), + ); + + // ignore: avoid_catching_errors + } on FlutterError { + // Expected timeout because for some reason UI updates way longer. + } + + expect(codeRunner.isCodeRunning, false); + expect( + PlaygroundComponents.analyticsService.lastEvent, + isA(), + ); + + await pumpAndSettle(); // Let the UI catch up. + + expectOutputStartsWith(kCachedResultsLog, this); + expectOutputIfDeployed(example, this); + } + + Future modifyRunExpectReal(ExampleDescriptor example) async { + modifyCodeController(); + + final playgroundController = findPlaygroundController(); + final eventSnippetContext = playgroundController.eventSnippetContext; + expect(eventSnippetContext.snippet, null); + + await tap(find.runOrCancelButton()); + await pumpAndSettle(); + + final actualText = findOutputText(); + expect(actualText, isNot(startsWith(kCachedResultsLog))); + expectOutputIfDeployed(example, this); + + // Animation stops just before the analytics event is fired, wait a bit. + await Future.delayed(const Duration(seconds: 1)); + + final event = PlaygroundComponents.analyticsService.lastEvent; + if (event is RunFinishedAnalyticsEvent) { + final finishedEvent = event! as RunFinishedAnalyticsEvent; + expect(finishedEvent.snippetContext, eventSnippetContext); + } else if (event is RunStartedAnalyticsEvent) { + final startedEvent = event! as RunStartedAnalyticsEvent; + expect(startedEvent.snippetContext, eventSnippetContext); + } else { + fail('Unexpected analytics event: $event'); + } + } + + /// Modifies the code controller in a unique way by inserting timestamp + /// in the comment. + void modifyCodeController() { + // Add a character into the first comment. + // This relies on that the position 10 is inside a license comment. + final controller = findOneCodeController(); + final text = controller.fullText; + + // ignore: prefer_interpolation_to_compose_strings + controller.fullText = text.substring(0, 10) + + DateTime.now().millisecondsSinceEpoch.toString() + + text.substring(10); + } + + Future navigateAndSettle(String urlString) async { + final url = Uri.parse(urlString); + print('Navigating: $url\n'); // ignore: avoid_print + await _navigate(url); + + // These appears to be the minimal reliable delay. + await Future.delayed(const Duration(seconds: 3)); + await pumpAndSettle(); + } + + Future _navigate(Uri uri) async { + final parser = GetIt.instance.get(); + final path = await parser.parsePagePath( + RouteInformation(location: uri.toString()), + ); + + if (path == null) { + fail('Cannot parse $uri into PagePath'); + } + + final pageStack = GetIt.instance.get(); + await pageStack.replacePath(path, mode: PageStackMatchMode.none); + } +} diff --git a/playground/frontend/build/playground_components_dev/pubspec.yaml b/playground/frontend/build/playground_components_dev/pubspec.yaml new file mode 100644 index 000000000000..6ecaf4e160d6 --- /dev/null +++ b/playground/frontend/build/playground_components_dev/pubspec.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: playground_components_dev +description: Helpers for testing playground_components package +version: 0.0.1 +publish_to: none + +environment: + sdk: '>=3.0.2 <4.0.0' + flutter: '>=3.10.4' + +dependencies: + app_state: 0.9.4 + flutter: { sdk: flutter } + flutter_code_editor: ^0.3.0 + flutter_test: { sdk: flutter } + get_it: ^7.2.0 + highlight: ^0.7.0 + http: ^0.13.5 + keyed_collection_widgets: 0.4.3 + playground_components: { path: ../playground_components } + provider: ^6.0.3 + total_lints: ^2.18.0 diff --git a/playground/frontend/build/pubspec.lock b/playground/frontend/build/pubspec.lock new file mode 100644 index 000000000000..e49850e7a820 --- /dev/null +++ b/playground/frontend/build/pubspec.lock @@ -0,0 +1,1388 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + akvelon_flutter_issue_106664_workaround: + dependency: "direct main" + description: + name: akvelon_flutter_issue_106664_workaround + sha256: "1b8e38a65afa6058bc365b5e1762786a1e7618f549f1ea6215151d8d3b346207" + url: "https://pub.dev" + source: hosted + version: "0.1.2" + aligned_dialog: + dependency: "direct main" + description: + name: aligned_dialog + sha256: "5d227d0e9d96bfa06699656b05f2cfba2f45645ccc52c43272e33ae307b26be8" + url: "https://pub.dev" + source: hosted + version: "0.0.7" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + app_state: + dependency: "direct main" + description: + name: app_state + sha256: a0db005a03cb28bfc00e788b9389d22540ac259a860675f02fe9c43ab7c76553 + url: "https://pub.dev" + source: hosted + version: "0.9.4" + archive: + dependency: transitive + description: + name: archive + sha256: "49b1fad315e57ab0bbc15bcbb874e83116a1d78f77ebd500a4af6c9407d6b28e" + url: "https://pub.dev" + source: hosted + version: "3.3.8" + args: + dependency: transitive + description: + name: args + sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + url: "https://pub.dev" + source: hosted + version: "2.4.1" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + autotrie: + dependency: transitive + description: + name: autotrie + sha256: "55da6faefb53cfcb0abb2f2ca8636123fb40e35286bb57440d2cf467568188f8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + url: "https://pub.dev" + source: hosted + version: "2.2.0" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + url: "https://pub.dev" + source: hosted + version: "2.4.4" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "88a57f2ac99849362e73878334caa9f06ee25f31d2adced882b8337838c84e1e" + url: "https://pub.dev" + source: hosted + version: "7.2.9" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "7dd62d9faf105c434f3d829bbe9c4be02ec67f5ed94832222116122df67c5452" + url: "https://pub.dev" + source: hosted + version: "8.6.0" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" + source: hosted + version: "1.17.2" + connectivity_plus: + dependency: transitive + description: + name: connectivity_plus + sha256: "3f8fe4e504c2d33696dac671a54909743bc6a902a9bb0902306f7a2aed7e528e" + url: "https://pub.dev" + source: hosted + version: "2.3.9" + connectivity_plus_linux: + dependency: transitive + description: + name: connectivity_plus_linux + sha256: "3caf859d001f10407b8e48134c761483e4495ae38094ffcca97193f6c271f5e2" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + connectivity_plus_macos: + dependency: transitive + description: + name: connectivity_plus_macos + sha256: "488d2de1e47e1224ad486e501b20b088686ba1f4ee9c4420ecbc3b9824f0b920" + url: "https://pub.dev" + source: hosted + version: "1.2.6" + connectivity_plus_platform_interface: + dependency: transitive + description: + name: connectivity_plus_platform_interface + sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + url: "https://pub.dev" + source: hosted + version: "1.2.4" + connectivity_plus_web: + dependency: transitive + description: + name: connectivity_plus_web + sha256: "81332be1b4baf8898fed17bb4fdef27abb7c6fd990bf98c54fd978478adf2f1a" + url: "https://pub.dev" + source: hosted + version: "1.2.5" + connectivity_plus_windows: + dependency: transitive + description: + name: connectivity_plus_windows + sha256: "535b0404b4d5605c4dd8453d67e5d6d2ea0dd36e3b477f50f31af51b0aeab9dd" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + url: "https://pub.dev" + source: hosted + version: "1.6.3" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" + url: "https://pub.dev" + source: hosted + version: "0.17.3" + csv: + dependency: transitive + description: + name: csv + sha256: "016b31a51a913744a0a1655c74ff13c9379e1200e246a03d96c81c5d9ed297b5" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + url: "https://pub.dev" + source: hosted + version: "2.3.1" + dbus: + dependency: transitive + description: + name: dbus + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" + source: hosted + version: "0.7.8" + easy_localization: + dependency: "direct main" + description: + name: easy_localization + sha256: "30ebf25448ffe169e0bd9bc4b5da94faa8398967a2ad2ca09f438be8b6953645" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + easy_localization_ext: + dependency: "direct main" + description: + name: easy_localization_ext + sha256: "7a5ff2595436141f2e4873b69576ff33034fe23fef252fa592b2575be3fba33a" + url: "https://pub.dev" + source: hosted + version: "0.1.1" + easy_localization_loader: + dependency: "direct main" + description: + name: easy_localization_loader + sha256: "89e70b2516123d639e8e68b8dd08fc07c8b83b0cfee17c642165e7e8807ebc86" + url: "https://pub.dev" + source: hosted + version: "1.0.1+1" + easy_logger: + dependency: transitive + description: + name: easy_logger + sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7 + url: "https://pub.dev" + source: hosted + version: "0.0.2" + enum_map: + dependency: transitive + description: + name: enum_map + sha256: "0dfe18306d2e9b0e9d381f5e11aac4c8255d5f5eddc68b0ab037f7d00aa36126" + url: "https://pub.dev" + source: hosted + version: "0.2.1" + equatable: + dependency: "direct main" + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" + expansion_widget: + dependency: "direct main" + description: + name: expansion_widget + sha256: c1ab07f475c6a5381e6f068de1d6a8e6e736a07a664787267503c1cd085844f7 + url: "https://pub.dev" + source: hosted + version: "0.0.3" + fake_async: + dependency: "direct dev" + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_code_editor: + dependency: "direct dev" + description: + name: flutter_code_editor + sha256: d4f94719d3f4dc3f40b0b80c980e3b550069c413542b6c0521bff8267f57eefb + url: "https://pub.dev" + source: hosted + version: "0.3.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_highlight: + dependency: transitive + description: + name: flutter_highlight + sha256: "7b96333867aa07e122e245c033b8ad622e4e3a42a1a2372cbb098a2541d8782c" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + flutter_issue_108697_workaround: + dependency: transitive + description: + name: flutter_issue_108697_workaround + sha256: "4f0ec26fd21b15954fda4acc94922abd2b2c067b5af4629438e270f8b2a2da08" + url: "https://pub.dev" + source: hosted + version: "0.1.3" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" + source: hosted + version: "2.0.1" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_markdown_selectionarea: + dependency: transitive + description: + name: flutter_markdown_selectionarea + sha256: "4ce7f7eb337d75afcb8613f49e484ffc561e695b5369ff588b6549e422078569" + url: "https://pub.dev" + source: hosted + version: "0.6.14+3" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "6ff8c902c8056af9736de2689f63f81c42e2d642b9f4c79dbf8790ae48b63012" + url: "https://pub.dev" + source: hosted + version: "2.0.6" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: transitive + description: + name: fluttertoast + sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c" + url: "https://pub.dev" + source: hosted + version: "8.2.2" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468" + url: "https://pub.dev" + source: hosted + version: "7.6.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + url: "https://pub.dev" + source: hosted + version: "4.0.4" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da + url: "https://pub.dev" + source: hosted + version: "1.4.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + grpc: + dependency: transitive + description: + name: grpc + sha256: a73c16e4f6a4a819be892bb2c73cc1d0b00e36095f69b0738cc91a733e3d27ba + url: "https://pub.dev" + source: hosted + version: "3.1.0" + highlight: + dependency: "direct main" + description: + name: highlight + sha256: "5353a83ffe3e3eca7df0abfb72dcf3fa66cc56b953728e7113ad4ad88497cf21" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + hive: + dependency: transitive + description: + name: hive + sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + hive_test: + dependency: transitive + description: + name: hive_test + sha256: dd7a5cf0be7af288566a96180b5d07574023777aa947ef252b69046ec36d8eb2 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + html: + dependency: transitive + description: + name: html + sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" + url: "https://pub.dev" + source: hosted + version: "0.15.3" + http: + dependency: transitive + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http2: + dependency: transitive + description: + name: http2 + sha256: "58805ebc6513eed3b98ee0a455a8357e61d187bf2e0fdc1e53120770f78de258" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + keyed_collection_widgets: + dependency: transitive + description: + name: keyed_collection_widgets + sha256: "9db2df4c4897c35fe167bdca82d307d81baa4161c3118da3f06ab4fd2d75291b" + url: "https://pub.dev" + source: hosted + version: "0.4.3" + linked_scroll_controller: + dependency: transitive + description: + name: linked_scroll_controller + sha256: e6020062bcf4ffc907ee7fd090fa971e65d8dfaac3c62baf601a3ced0b37986a + url: "https://pub.dev" + source: hosted + version: "0.2.0" + lints: + dependency: transitive + description: + name: lints + sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: "8e332924094383133cee218b676871f42db2514f1f6ac617b6cf6152a7faab8e" + url: "https://pub.dev" + source: hosted + version: "7.1.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + meta: + dependency: transitive + description: + name: meta + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: "8b46d7eb40abdda92d62edd01546051f0c27365e65608c284de336dccfef88cc" + url: "https://pub.dev" + source: hosted + version: "5.4.1" + mocktail: + dependency: transitive + description: + name: mocktail + sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + url: "https://pub.dev" + source: hosted + version: "0.3.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + nm: + dependency: transitive + description: + name: nm + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + onmessage: + dependency: "direct main" + description: + name: onmessage + sha256: "262fee2df9a3cf361446ad743cb556ebf0552c2ae5c1220a041a781346f8a1a9" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + os_detect: + dependency: transitive + description: + name: os_detect + sha256: faf3bcf39515e64da8ff76b2f2805b20a6ff47ae515393e535f8579ff91d6b7f + url: "https://pub.dev" + source: hosted + version: "2.0.1" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + url: "https://pub.dev" + source: hosted + version: "2.0.15" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + url: "https://pub.dev" + source: hosted + version: "2.0.27" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + url: "https://pub.dev" + source: hosted + version: "2.1.11" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 + url: "https://pub.dev" + source: hosted + version: "2.1.6" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" + source: hosted + version: "5.4.0" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + playground_components: + dependency: "direct main" + description: + path: playground_components + relative: true + source: path + version: "0.0.1" + playground_components_dev: + dependency: "direct dev" + description: + path: playground_components_dev + relative: true + source: path + version: "0.0.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" + source: hosted + version: "3.7.3" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + provider: + dependency: "direct main" + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" + scrollable_positioned_list: + dependency: transitive + description: + name: scrollable_positioned_list + sha256: "1b54d5f1329a1e263269abc9e2543d90806131aa14fe7c6062a8054d57249287" + url: "https://pub.dev" + source: hosted + version: "0.3.8" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "16d3fb6b3692ad244a695c0183fca18cf81fd4b821664394a781de42386bf022" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: e014107bb79d6d3297196f4f2d0db54b5d1f85b8ea8ff63b8e8b391a02700feb + url: "https://pub.dev" + source: hosted + version: "2.2.2" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9d387433ca65717bbf1be88f4d5bb18f10508917a8fa2fb02e0fd0d7479a9afa" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "74083203a8eae241e0de4a0d597dbedab3b8fef5563f33cf3c12d7e93c655ca5" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "5e588e2efef56916a3b229c3bfe81e6a525665a454519ca51dbcc4236a274173" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + url: "https://pub.dev" + source: hosted + version: "1.24.3" + test_api: + dependency: transitive + description: + name: test_api + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + url: "https://pub.dev" + source: hosted + version: "0.5.3" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + total_lints: + dependency: transitive + description: + name: total_lints + sha256: "5424a55034e89a9c6198518356842dfdc33b6f0b4d557071f84d6095e5a9f8ea" + url: "https://pub.dev" + source: hosted + version: "2.19.0" + tuple: + dependency: transitive + description: + name: tuple + sha256: "0ea99cd2f9352b2586583ab2ce6489d1f95a5f6de6fb9492faaf97ae2060f0aa" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: f2e0ff0c4af8e4bbda4d273ca4a11be4055414f478fad5c161609b74790ff696 + url: "https://pub.dev" + source: hosted + version: "2.2.2" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "06866290206d196064fd61df4c7aea1ffe9a4e7c4ccaa8fcded42dd41948005d" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + url: "https://pub.dev" + source: hosted + version: "6.1.11" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51 + url: "https://pub.dev" + source: hosted + version: "6.0.35" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + url: "https://pub.dev" + source: hosted + version: "2.0.17" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + url_strategy: + dependency: "direct main" + description: + name: url_strategy + sha256: "42b68b42a9864c4d710401add17ad06e28f1c1d5500c93b98c431f6b0ea4ab87" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: b96f10cbdfcbd03a65758633a43e7d04574438f059b1043104b5d61b23d38a4f + url: "https://pub.dev" + source: hosted + version: "1.1.6" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "57a8e6e24662a3bdfe3b3d61257db91768700c0b8f844e235877b56480f31c69" + url: "https://pub.dev" + source: hosted + version: "1.1.6" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "7430f5d834d0db4560d7b19863362cd892f1e52b43838553a3c5cdfc9ab28e5b" + url: "https://pub.dev" + source: hosted + version: "1.1.6" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + url: "https://pub.dev" + source: hosted + version: "11.7.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" + web_browser_detect: + dependency: transitive + description: + name: web_browser_detect + sha256: "78ba66860b61a993030788a3a4586fb21cb7d9cef966cfd24faa9ad487c3fd8b" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + url: "https://pub.dev" + source: hosted + version: "4.1.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.0.2 <4.0.0" + flutter: ">=3.10.4" diff --git a/playground/frontend/build/pubspec.yaml b/playground/frontend/build/pubspec.yaml new file mode 100644 index 000000000000..d53a6b45a0a8 --- /dev/null +++ b/playground/frontend/build/pubspec.yaml @@ -0,0 +1,71 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: playground +description: A new Flutter project. +publish_to: 'none' +version: 1.0.0+1 + +environment: + sdk: '>=3.0.2 <4.0.0' + flutter: '>=3.10.4' + +dependencies: + akvelon_flutter_issue_106664_workaround: ^0.1.2 + aligned_dialog: ^0.0.6 + app_state: 0.9.4 + collection: ^1.15.0 + easy_localization: ">=3.0.1 <3.0.3" + easy_localization_ext: ^0.1.1 + easy_localization_loader: ^1.0.0 + equatable: ^2.0.5 + expansion_widget: ^0.0.2 + flutter: { sdk: flutter } + flutter_localizations: { sdk: flutter } + flutter_svg: ^2.0.1 + flutter_web_plugins: { sdk: flutter } + get_it: ^7.2.0 + google_fonts: ^4.0.3 + highlight: ^0.7.0 + intl: ^0.18.0 + onmessage: ^0.2.0 + playground_components: { path: playground_components } + provider: ^6.0.0 + shared_preferences: ^2.0.12 + url_launcher: ^6.0.12 + url_strategy: ^0.2.0 + +dev_dependencies: + build_runner: ^2.1.4 + fake_async: ^1.3.0 + flutter_code_editor: ^0.3.0 + flutter_lints: ^2.0.1 + flutter_test: { sdk: flutter } + integration_test: { sdk: flutter } + mockito: ^5.0.16 + playground_components_dev: { path: playground_components_dev } + +flutter: + assets: + - assets/ + - assets/translations/en.yaml + + generate: true + uses-material-design: true + +flutter_gen: + output: lib/src/assets/ diff --git a/playground/frontend/build/settings.gradle b/playground/frontend/build/settings.gradle new file mode 100644 index 000000000000..9d758de11cee --- /dev/null +++ b/playground/frontend/build/settings.gradle @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +rootProject.name = 'apache-beam-playground-frontend' diff --git a/playground/frontend/build/test/modules/examples/models/example_loading_descriptors/examples_loading_descriptor_factory_test.dart b/playground/frontend/build/test/modules/examples/models/example_loading_descriptors/examples_loading_descriptor_factory_test.dart new file mode 100644 index 000000000000..9efe2d4f61e4 --- /dev/null +++ b/playground/frontend/build/test/modules/examples/models/example_loading_descriptors/examples_loading_descriptor_factory_test.dart @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground/modules/examples/models/example_loading_descriptors/examples_loading_descriptor_factory.dart'; +import 'package:playground_components/playground_components.dart'; + +void main() { + final lazy = ExamplesLoadingDescriptorFactory.defaultLazyLoadDescriptors; + + group('ExamplesLoadingDescriptorFactory', () { + test('defaultLazyLoadDescriptors', () { + final expected = { + Sdk.go: [ + const CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.go, + ) + ], + Sdk.java: [ + const CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.java, + ) + ], + Sdk.python: [ + const CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.python, + ) + ], + Sdk.scio: [ + const CatalogDefaultExampleLoadingDescriptor( + sdk: Sdk.scio, + ) + ], + }; + + expect(lazy, expected); + }); + + test('emptyLazyLoadDescriptors', () { + final expected = { + Sdk.go: [ + const EmptyExampleLoadingDescriptor( + sdk: Sdk.go, + ) + ], + Sdk.java: [ + const EmptyExampleLoadingDescriptor( + sdk: Sdk.java, + ) + ], + Sdk.python: [ + const EmptyExampleLoadingDescriptor( + sdk: Sdk.python, + ) + ], + Sdk.scio: [ + const EmptyExampleLoadingDescriptor( + sdk: Sdk.scio, + ) + ], + }; + + expect(ExamplesLoadingDescriptorFactory.emptyLazyLoadDescriptors, expected,); + }); + }); +} diff --git a/playground/frontend/build/test/modules/messages/handlers/messages_debouncer_test.dart b/playground/frontend/build/test/modules/messages/handlers/messages_debouncer_test.dart new file mode 100644 index 000000000000..7999493bea33 --- /dev/null +++ b/playground/frontend/build/test/modules/messages/handlers/messages_debouncer_test.dart @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ignore_for_file: prefer_const_constructors + +import 'package:fake_async/fake_async.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground/modules/messages/handlers/abstract_message_handler.dart'; +import 'package:playground/modules/messages/handlers/messages_debouncer.dart'; +import 'package:playground/modules/messages/models/abstract_message.dart'; +import 'package:playground/modules/messages/models/set_sdk_message.dart'; +import 'package:playground_components/playground_components.dart'; + +void main() { + group('MessagesDebouncer', () { + late _Recorder recorder; + late MessagesDebouncer debouncer; + + setUp(() { + recorder = _Recorder(); + debouncer = MessagesDebouncer(handler: recorder); + }); + + test('drops sequential calls, no time limit', () { + fakeAsync((async) { + debouncer.handle(SetSdkMessage(sdk: Sdk.java)); + debouncer.handle(SetSdkMessage(sdk: Sdk.java)); + async.elapse(const Duration(days: 36500)); + debouncer.handle(SetSdkMessage(sdk: Sdk.java)); + }); + + expect(recorder.messages, [SetSdkMessage(sdk: Sdk.java)]); + }); + + test('returns the last result on debouncing', () { + final result1 = debouncer.handle( + _MessageWithResult( + n: 1, + result: MessageHandleResult.handled, + ), + ); + final result2 = debouncer.handle( + _MessageWithResult( + n: 1, + result: MessageHandleResult.notHandled, + ), + ); + final result3 = debouncer.handle( + _MessageWithResult( + n: 2, + result: MessageHandleResult.notHandled, + ), + ); + final result4 = debouncer.handle( + _MessageWithResult( + n: 2, + result: MessageHandleResult.handled, + ), + ); + + expect(result1, MessageHandleResult.handled, reason: '1'); + expect(result2, MessageHandleResult.handled, reason: '2'); + expect(result3, MessageHandleResult.notHandled, reason: '3'); + expect(result4, MessageHandleResult.notHandled, reason: '4'); + }); + }); +} + +class _Recorder extends AbstractMessageHandler { + final messages = []; + + @override + MessageHandleResult handle(AbstractMessage message) { + messages.add(message); + + return message is _MessageWithResult + ? message.result + : MessageHandleResult.handled; + } +} + +class _MessageWithResult extends AbstractMessage { + final int n; + final MessageHandleResult result; + + _MessageWithResult({required this.n, required this.result}); + + @override + Map toJson() => {'n': n}; + + @override + int get hashCode => n.hashCode; + + // Disregard `result` for comparison, this is the point of the test. + @override + bool operator ==(Object other) => other is _MessageWithResult && other.n == n; +} diff --git a/playground/frontend/build/test/modules/messages/models/set_content_message_test.dart b/playground/frontend/build/test/modules/messages/models/set_content_message_test.dart new file mode 100644 index 000000000000..45169f4d2249 --- /dev/null +++ b/playground/frontend/build/test/modules/messages/models/set_content_message_test.dart @@ -0,0 +1,166 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground/modules/examples/models/example_loading_descriptors/examples_loading_descriptor_factory.dart'; +import 'package:playground/modules/messages/models/set_content_message.dart'; +import 'package:playground_components/playground_components.dart'; + +const _content1 = 'my_code1'; +const _content2 = 'my_code2'; +const _sdk = Sdk.python; + +void main() { + group('SetContentMessage.tryParse', () { + test( + 'returns null for other types', + () { + const map = {'type': 'any-other'}; + + final parsed = SetContentMessage.tryParse(map); + + expect(parsed, null); + }, + ); + + test( + 'parses a single empty Java descriptor when without descriptor', + () { + const map = {'type': SetContentMessage.type}; + + final parsed = SetContentMessage.tryParse(map); + + expect( + parsed, + SetContentMessage( + descriptor: ExamplesLoadingDescriptor( + descriptors: const [EmptyExampleLoadingDescriptor(sdk: Sdk.java)], + lazyLoadDescriptors: + ExamplesLoadingDescriptorFactory.defaultLazyLoadDescriptors, + ), + ), + ); + }, + ); + + test( + 'parses a single empty Java descriptor with an invalid descriptor', + () { + const map = { + 'type': SetContentMessage.type, + 'descriptor': 123, + }; + + final parsed = SetContentMessage.tryParse(map); + + expect( + parsed, + SetContentMessage( + descriptor: ExamplesLoadingDescriptor( + descriptors: const [EmptyExampleLoadingDescriptor(sdk: Sdk.java)], + lazyLoadDescriptors: + ExamplesLoadingDescriptorFactory.defaultLazyLoadDescriptors, + ), + ), + ); + }, + ); + + test( + 'parses messages', + () { + final map = { + 'type': SetContentMessage.type, + 'descriptor': { + 'examples': [ + null, + 1, + 1.0, + 'string', + [], + {'type': 'any-other'}, + { + 'files': [ + {'content': _content1, 'isMain': false, 'name': '1'}, + {'content': _content2, 'isMain': true, 'name': '2'}, + ], + 'name': 'name', + 'sdk': _sdk.id, + 'complexity': 'basic', + }, + { + 'files': [ + {'content': _content1, 'isMain': false, 'name': '1'} + ], + 'name': null, + 'sdk': _sdk.id, + 'complexity': 'medium', + }, + { + 'files': [ + {'content': _content1, 'isMain': false, 'name': '1'} + ], + 'sdk': _sdk.id, + 'complexity': 'advanced', + }, + ], + }, + }; + + final parsed = SetContentMessage.tryParse(map); + + expect( + parsed, + SetContentMessage( + descriptor: ExamplesLoadingDescriptor( + descriptors: const [ + ContentExampleLoadingDescriptor( + complexity: Complexity.basic, + files: [ + SnippetFile(content: _content1, isMain: false, name: '1'), + SnippetFile(content: _content2, isMain: true, name: '2'), + ], + name: 'name', + sdk: _sdk, + ), + ContentExampleLoadingDescriptor( + complexity: Complexity.medium, + files: [ + SnippetFile(content: _content1, isMain: false, name: '1'), + ], + name: null, + sdk: _sdk, + ), + ContentExampleLoadingDescriptor( + complexity: Complexity.advanced, + files: [ + SnippetFile(content: _content1, isMain: false, name: '1'), + ], + name: null, + sdk: _sdk, + ), + ], + lazyLoadDescriptors: + ExamplesLoadingDescriptorFactory.defaultLazyLoadDescriptors, + ), + ), + ); + }, + ); + }); +} diff --git a/playground/frontend/build/test/modules/messages/models/set_sdk_message_test.dart b/playground/frontend/build/test/modules/messages/models/set_sdk_message_test.dart new file mode 100644 index 000000000000..c9223849bbfe --- /dev/null +++ b/playground/frontend/build/test/modules/messages/models/set_sdk_message_test.dart @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground/modules/messages/models/set_sdk_message.dart'; +import 'package:playground_components/playground_components.dart'; + +const _sdk = Sdk.python; + +void main() { + group('SetSdkMessage.tryParse', () { + test( + 'returns null for other types', + () { + const map = {'type': 'any-other'}; + + final parsed = SetSdkMessage.tryParse(map); + + expect(parsed, null); + }, + ); + + test( + 'returns null for an empty message', + () { + const map = {'type': SetSdkMessage.type}; + + final parsed = SetSdkMessage.tryParse(map); + + expect(parsed, null); + }, + ); + + test( + 'parses an SDK', + () { + final map = {'type': SetSdkMessage.type, 'sdk': _sdk.id}; + + final parsed = SetSdkMessage.tryParse(map); + + expect(parsed, const SetSdkMessage(sdk: _sdk)); + }, + ); + + test( + 'returns null for unknown SDK', + () { + const map = {'type': SetSdkMessage.type, 'sdk': 'not-existing'}; + + final parsed = SetSdkMessage.tryParse(map); + + expect(parsed, null); + }, + ); + }); +} diff --git a/playground/frontend/build/test/modules/messages/parsers/message_parser_test.dart b/playground/frontend/build/test/modules/messages/parsers/message_parser_test.dart new file mode 100644 index 000000000000..9497245a6d35 --- /dev/null +++ b/playground/frontend/build/test/modules/messages/parsers/message_parser_test.dart @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:playground/modules/messages/models/set_content_message.dart'; +import 'package:playground/modules/messages/models/set_sdk_message.dart'; +import 'package:playground/modules/messages/parsers/messages_parser.dart'; +import 'package:playground_components/playground_components.dart'; + +const _sdk = Sdk.python; + +void main() { + group('MessageParser.parse returns null for invalid inputs', () { + test( + 'MessageParser.parse returns null for null', + () { + const value = null; + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, null); + }, + ); + + test( + 'MessageParser.parse returns null for non-string and non-map', + () { + final value = DateTime(2022); + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, null); + }, + ); + + test( + 'MessageParser.parse returns null for a non-JSON string', + () { + const value = 'non-JSON string'; + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, null); + }, + ); + + test( + 'MessageParser.parse returns null for a JSON scalar', + () { + const value = '123'; + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, null); + }, + ); + + test( + 'MessageParser.parse returns null for an alien map', + () { + const value = {'key': 'value'}; + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, null); + }, + ); + }); + + group('MessageParser.parse parses messages', () { + test( + 'MessageParser.parse parses SetContentMessage', + () { + const value = {'type': SetContentMessage.type}; + + final parsed = MessagesParser().tryParse(value); + + expect( + parsed, + SetContentMessage( + descriptor: ExamplesLoadingDescriptor( + descriptors: const [EmptyExampleLoadingDescriptor(sdk: Sdk.java)], + lazyLoadDescriptors: { + Sdk.go: const [ + CatalogDefaultExampleLoadingDescriptor(sdk: Sdk.go), + ], + Sdk.java: const [ + CatalogDefaultExampleLoadingDescriptor(sdk: Sdk.java), + ], + Sdk.python: const [ + CatalogDefaultExampleLoadingDescriptor(sdk: Sdk.python), + ], + Sdk.scio: const [ + CatalogDefaultExampleLoadingDescriptor(sdk: Sdk.scio), + ], + }, + ), + ), + ); + }, + ); + + test( + 'MessageParser.parse parses SetSdkMessage', + () { + final value = {'type': SetSdkMessage.type, 'sdk': _sdk.id}; + + final parsed = MessagesParser().tryParse(value); + + expect(parsed, const SetSdkMessage(sdk: _sdk)); + }, + ); + }); +} diff --git a/playground/frontend/build/test/pages/playground/states/example_selector_state_test.dart b/playground/frontend/build/test/pages/playground/states/example_selector_state_test.dart new file mode 100644 index 000000000000..009e5eb86911 --- /dev/null +++ b/playground/frontend/build/test/pages/playground/states/example_selector_state_test.dart @@ -0,0 +1,177 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:playground_components/src/models/example_base.dart'; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart'; +import 'package:playground/pages/standalone_playground/notifiers/example_selector_state.dart'; +import 'package:playground_components/src/cache/example_cache.dart'; +import 'package:playground_components/src/controllers/playground_controller.dart'; + +import 'example_selector_state_test.mocks.dart'; +import '../../../../playground_components/test/src/common/categories.dart'; +import '../../../../playground_components/test/src/common/example_repository_mock.dart'; + +@GenerateMocks([ExamplesLoader]) +void main() { + late PlaygroundController playgroundController; + late ExampleCache exampleCache; + late ExampleSelectorState state; + final mockExampleRepository = getMockExampleRepository(); + + setUp(() { + exampleCache = ExampleCache( + exampleRepository: mockExampleRepository, + ); + + playgroundController = PlaygroundController( + examplesLoader: MockExamplesLoader(), + exampleCache: exampleCache, + ); + state = ExampleSelectorState(playgroundController, []); + }); + + test( + 'ExampleSelector state selectedFilterType should be ExampleType.all by default', + () { + expect(state.selectedFilterType, ExampleType.all); + }, + ); + + test( + 'ExampleSelector state filterText should be empty string by default', + () { + expect(state.searchText, ''); + }, + ); + + test( + 'ExampleSelector state should notify all listeners about filter type change', + () { + state.addListener(() { + expect(state.selectedFilterType, ExampleType.example); + }); + state.setSelectedFilterType(ExampleType.example); + }, + ); + + test( + 'ExampleSelector state should notify all listeners about filterText change', + () { + state.addListener(() { + expect(state.searchText, 'test'); + }); + state.setSearchText('test'); + }, + ); + + test( + 'ExampleSelector state should notify all listeners about categories change', + () { + state.addListener(() { + expect(state.categories, []); + }); + state.setCategories([]); + }, + ); + + test( + 'ExampleSelector state filterCategories should:' + '- update categories and notify all listeners,' + 'but should NOT:' + '- affect Example state categories', () { + state.addListener(() { + expect(state.categories, []); + expect(exampleCache.categoryListsBySdk, exampleCache.categoryListsBySdk); + }); + state.filterCategoriesWithExamples(); + }); + + test( + 'ExampleSelector state filterExamplesByType should:' + '- update categories,' + '- notify all listeners,' + 'but should NOT:' + '- affect Example state categories', () { + state = ExampleSelectorState( + playgroundController, + categoriesMock, + ); + state.addListener(() { + expect(state.categories, examplesFilteredByTypeMock); + expect(exampleCache.categoryListsBySdk, exampleCache.categoryListsBySdk); + }); + state.filterExamplesByType(filteredExamples, ExampleType.kata); + }); + + test( + 'ExampleSelector state filterExamplesByTags should:' + '- return examples which contain all selected tags' + '- notify all listeners,' + 'but should NOT:' + '- affect Example state categories', () { + state = ExampleSelectorState( + playgroundController, + categoriesMock, + ); + state.addSelectedTag('tag2'); + expect( + state.filterExamplesByTags(filteredExamples), + examplesFilteredByTagsMock, + ); + }); + + test( + 'ExampleSelector state filterExamplesByName should:' + '- return examples with matching names' + '- notify all listeners,' + 'but should NOT:' + '- wait for full name of example,' + '- be sensitive for register,' + '- affect Example state categories', () { + state = ExampleSelectorState( + playgroundController, + categoriesMock, + ); + state.setSearchText('Example X1'); + expect( + state.filterExamplesByName(filteredExamples), + examplesFilteredByNameMock, + ); + }); + + test('ExampleSelectorState sorts tags by example count', () { + state = ExampleSelectorState( + playgroundController, + categoriesMock, + ); + const popularTag = 'tag2'; + expect(state.tags.first == popularTag, true); + }); + + test('ExampleSelectorState sorts first selected tags ', () { + state = ExampleSelectorState( + playgroundController, + categoriesMock, + ); + const selectedTag = 'tag1'; + state.addSelectedTag(selectedTag); + expect(state.tags.first == selectedTag, true); + }); +} diff --git a/playground/frontend/build/test/pages/playground/states/example_selector_state_test.mocks.dart b/playground/frontend/build/test/pages/playground/states/example_selector_state_test.mocks.dart new file mode 100644 index 000000000000..c0c86843ec1a --- /dev/null +++ b/playground/frontend/build/test/pages/playground/states/example_selector_state_test.mocks.dart @@ -0,0 +1,95 @@ +// Mocks generated by Mockito 5.4.0 from annotations +// in playground/test/pages/playground/states/example_selector_state_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:playground_components/src/controllers/example_loaders/example_loader_factory.dart' + as _i2; +import 'package:playground_components/src/controllers/example_loaders/examples_loader.dart' + as _i3; +import 'package:playground_components/src/controllers/playground_controller.dart' + as _i4; +import 'package:playground_components/src/models/example_loading_descriptors/examples_loading_descriptor.dart' + as _i6; +import 'package:playground_components/src/models/sdk.dart' as _i7; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeExampleLoaderFactory_0 extends _i1.SmartFake + implements _i2.ExampleLoaderFactory { + _FakeExampleLoaderFactory_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ExamplesLoader]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockExamplesLoader extends _i1.Mock implements _i3.ExamplesLoader { + MockExamplesLoader() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.ExampleLoaderFactory get defaultFactory => (super.noSuchMethod( + Invocation.getter(#defaultFactory), + returnValue: _FakeExampleLoaderFactory_0( + this, + Invocation.getter(#defaultFactory), + ), + ) as _i2.ExampleLoaderFactory); + @override + void setPlaygroundController(_i4.PlaygroundController? value) => + super.noSuchMethod( + Invocation.method( + #setPlaygroundController, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i5.Future loadIfNew(_i6.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #loadIfNew, + [descriptor], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future load(_i6.ExamplesLoadingDescriptor? descriptor) => + (super.noSuchMethod( + Invocation.method( + #load, + [descriptor], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future loadDefaultIfAny(_i7.Sdk? sdk) => (super.noSuchMethod( + Invocation.method( + #loadDefaultIfAny, + [sdk], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); +} diff --git a/playground/frontend/build/test_driver/integration_test.dart b/playground/frontend/build/test_driver/integration_test.dart new file mode 100644 index 000000000000..6b59b37dd129 --- /dev/null +++ b/playground/frontend/build/test_driver/integration_test.dart @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import 'package:integration_test/integration_test_driver.dart'; + +Future main() => integrationDriver(); diff --git a/playground/frontend/build/web/favicon.ico b/playground/frontend/build/web/favicon.ico new file mode 100644 index 000000000000..47e6fdb5853d Binary files /dev/null and b/playground/frontend/build/web/favicon.ico differ diff --git a/playground/frontend/build/web/index.html b/playground/frontend/build/web/index.html new file mode 100644 index 000000000000..bed71f2f21e0 --- /dev/null +++ b/playground/frontend/build/web/index.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Apache Beam Playground + + + + + + + + + + + diff --git a/playground/frontend/build/web/manifest.json b/playground/frontend/build/web/manifest.json new file mode 100644 index 000000000000..024a11325bb4 --- /dev/null +++ b/playground/frontend/build/web/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "playground", + "short_name": "playground", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false +} diff --git a/sdks/java/io/iceberg/bqms/build/libs/iceberg-bqms-catalog-1.6.1-1.0.1.jar b/sdks/java/io/iceberg/bqms/build/libs/iceberg-bqms-catalog-1.6.1-1.0.1.jar new file mode 100644 index 000000000000..197b50542f6f Binary files /dev/null and b/sdks/java/io/iceberg/bqms/build/libs/iceberg-bqms-catalog-1.6.1-1.0.1.jar differ diff --git a/sdks/python/apache_beam.egg-info/PKG-INFO b/sdks/python/apache_beam.egg-info/PKG-INFO new file mode 100644 index 000000000000..45a81f07117c --- /dev/null +++ b/sdks/python/apache_beam.egg-info/PKG-INFO @@ -0,0 +1,402 @@ +Metadata-Version: 2.4 +Name: apache-beam +Version: 2.73.0.dev0 +Summary: Apache Beam SDK for Python +Home-page: https://beam.apache.org +Download-URL: https://pypi.python.org/pypi/apache-beam +Author: Apache Software Foundation +Author-email: dev@beam.apache.org +License: Apache License, Version 2.0 +Keywords: apache beam +Classifier: Intended Audience :: End Users/Desktop +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=3.10 +Description-Content-Type: text/markdown +Requires-Dist: cryptography<48.0.0,>=39.0.0 +Requires-Dist: envoy-data-plane<2,>=1.0.3; python_version >= "3.11" +Requires-Dist: envoy-data-plane<0.3.0; python_version < "3.11" +Requires-Dist: fastavro<2,>=0.23.6 +Requires-Dist: fasteners<1.0,>=0.3 +Requires-Dist: grpcio!=1.48.0,!=1.59.*,!=1.60.*,!=1.61.*,!=1.62.0,!=1.62.1,!=1.66.*,!=1.67.*,!=1.68.*,!=1.69.*,!=1.70.*,<2,>=1.33.1 +Requires-Dist: httplib2<0.32.0,>=0.8 +Requires-Dist: jsonpickle<4.0.0,>=3.0.0 +Requires-Dist: numpy<2.5.0,>=1.14.3 +Requires-Dist: objsize<0.8.0,>=0.6.1 +Requires-Dist: packaging>=22.0 +Requires-Dist: pillow<13,>=12.1.1 +Requires-Dist: pymongo<5.0.0,>=3.8.0 +Requires-Dist: proto-plus<2,>=1.7.1 +Requires-Dist: protobuf!=4.0.*,!=4.21.*,!=4.22.0,!=4.23.*,!=4.24.*,<7.0.0.dev0,>=3.20.3 +Requires-Dist: python-dateutil<3,>=2.8.0 +Requires-Dist: pytz>=2018.3 +Requires-Dist: requests<3.0.0,>=2.32.4 +Requires-Dist: sortedcontainers>=2.4.0 +Requires-Dist: typing-extensions>=3.7.0 +Requires-Dist: zstandard<1,>=0.18.0 +Requires-Dist: pyyaml<7.0.0,>=3.12 +Requires-Dist: beartype<0.23.0,>=0.21.0 +Requires-Dist: pyarrow<24.0.0,>=6.0.1 +Requires-Dist: pyarrow-hotfix<1 +Provides-Extra: dill +Requires-Dist: dill<0.3.2,>=0.3.1.1; extra == "dill" +Provides-Extra: docs +Requires-Dist: jinja2<3.2,>=3.0; extra == "docs" +Requires-Dist: Sphinx<8.0,>=7.0.0; extra == "docs" +Requires-Dist: docstring-parser<1.0,>=0.15; extra == "docs" +Requires-Dist: docutils>=0.18.1; extra == "docs" +Requires-Dist: markdown; extra == "docs" +Requires-Dist: pandas<2.3.0; extra == "docs" +Requires-Dist: openai; extra == "docs" +Requires-Dist: virtualenv-clone<1.0,>=0.5; extra == "docs" +Provides-Extra: test +Requires-Dist: cloud-sql-python-connector[pg8000]<2.0.0,>=1.0.0; extra == "test" +Requires-Dist: docstring-parser<1.0,>=0.15; extra == "test" +Requires-Dist: freezegun>=0.3.12; extra == "test" +Requires-Dist: jinja2<3.2,>=3.0; extra == "test" +Requires-Dist: joblib>=1.0.1; extra == "test" +Requires-Dist: mock<6.0.0,>=1.0.1; extra == "test" +Requires-Dist: pandas<2.3.0; extra == "test" +Requires-Dist: parameterized<0.10.0,>=0.7.1; extra == "test" +Requires-Dist: pyhamcrest!=1.10.0,<3.0.0,>=1.9; extra == "test" +Requires-Dist: requests_mock<2.0,>=1.7; extra == "test" +Requires-Dist: tenacity<9,>=8.0.0; extra == "test" +Requires-Dist: pytest<9.0,>=7.1.2; extra == "test" +Requires-Dist: pytest-xdist<4,>=2.5.0; extra == "test" +Requires-Dist: pytest-timeout<3,>=2.1.0; extra == "test" +Requires-Dist: scikit-learn<1.8.0,>=0.20.0; extra == "test" +Requires-Dist: sqlalchemy<3.0,>=1.3; extra == "test" +Requires-Dist: psycopg2-binary<3.0,>=2.8.5; extra == "test" +Requires-Dist: testcontainers[kafka,milvus,mysql]<5.0.0,>=4.0.0; extra == "test" +Requires-Dist: cryptography>=41.0.2; extra == "test" +Requires-Dist: hypothesis<6.148.4,>5.0.0; extra == "test" +Requires-Dist: virtualenv-clone<1.0,>=0.5; extra == "test" +Requires-Dist: python-tds>=1.16.1; extra == "test" +Requires-Dist: sqlalchemy-pytds>=1.0.2; extra == "test" +Requires-Dist: pg8000>=1.31.5; extra == "test" +Requires-Dist: PyMySQL>=1.1.0; extra == "test" +Requires-Dist: oracledb>=3.1.1; extra == "test" +Provides-Extra: gcp +Requires-Dist: cachetools<7,>=3.1.0; extra == "gcp" +Requires-Dist: google-api-core<3,>=2.0.0; extra == "gcp" +Requires-Dist: google-apitools<0.5.32,>=0.5.31; python_version < "3.13" and extra == "gcp" +Requires-Dist: google-apitools>=0.5.35; python_version >= "3.13" and extra == "gcp" +Requires-Dist: google-auth<3,>=1.18.0; extra == "gcp" +Requires-Dist: google-auth-httplib2<0.3.0,>=0.1.0; extra == "gcp" +Requires-Dist: google-cloud-datastore<3,>=2.0.0; extra == "gcp" +Requires-Dist: google-cloud-pubsub<3,>=2.1.0; extra == "gcp" +Requires-Dist: google-cloud-storage<3,>=2.18.2; extra == "gcp" +Requires-Dist: google-cloud-bigquery<4,>=2.0.0; extra == "gcp" +Requires-Dist: google-cloud-bigquery-storage<3,>=2.6.3; extra == "gcp" +Requires-Dist: google-cloud-core<3,>=2.0.0; extra == "gcp" +Requires-Dist: google-cloud-bigtable<3,>=2.19.0; extra == "gcp" +Requires-Dist: google-cloud-build<4,>=3.35.0; extra == "gcp" +Requires-Dist: google-cloud-spanner<4,>=3.0.0; extra == "gcp" +Requires-Dist: google-cloud-dlp<4,>=3.0.0; extra == "gcp" +Requires-Dist: google-cloud-kms<4,>=3.0.0; extra == "gcp" +Requires-Dist: google-cloud-language<3,>=2.0; extra == "gcp" +Requires-Dist: google-cloud-secret-manager<3,>=2.0; extra == "gcp" +Requires-Dist: google-cloud-videointelligence<3,>=2.0; extra == "gcp" +Requires-Dist: google-cloud-vision<4,>=2; extra == "gcp" +Requires-Dist: google-cloud-recommendations-ai<0.11.0,>=0.1.0; extra == "gcp" +Requires-Dist: google-cloud-aiplatform<2.0,>=1.26.0; extra == "gcp" +Requires-Dist: cloud-sql-python-connector<2.0.0,>=1.18.2; extra == "gcp" +Requires-Dist: python-tds>=1.16.1; extra == "gcp" +Requires-Dist: pg8000>=1.31.5; extra == "gcp" +Requires-Dist: PyMySQL>=1.1.0; extra == "gcp" +Requires-Dist: keyrings.google-artifactregistry-auth; extra == "gcp" +Requires-Dist: orjson<4,>=3.9.7; extra == "gcp" +Requires-Dist: regex>=2020.6.8; extra == "gcp" +Provides-Extra: interactive +Requires-Dist: facets-overview<2,>=1.1.0; extra == "interactive" +Requires-Dist: google-cloud-dataproc<6,>=5.0.0; extra == "interactive" +Requires-Dist: ipython<9,>=7; extra == "interactive" +Requires-Dist: ipykernel<7,>=6; extra == "interactive" +Requires-Dist: ipywidgets<9,>=8; extra == "interactive" +Requires-Dist: jupyter-client!=6.1.13,<8.2.1,>=6.1.11; extra == "interactive" +Requires-Dist: pydot<2,>=1.2.0; extra == "interactive" +Requires-Dist: timeloop<2,>=1.0.2; extra == "interactive" +Requires-Dist: nbformat<6,>=5.0.5; extra == "interactive" +Requires-Dist: nbconvert<8,>=6.2.0; extra == "interactive" +Requires-Dist: pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3; extra == "interactive" +Provides-Extra: interactive-test +Requires-Dist: needle<1,>=0.5.0; extra == "interactive-test" +Requires-Dist: chromedriver-binary<118,>=117; extra == "interactive-test" +Requires-Dist: pillow<10,>=7.1.1; extra == "interactive-test" +Requires-Dist: urllib3<2,>=1.21.1; extra == "interactive-test" +Provides-Extra: ml-test +Requires-Dist: datatable; extra == "ml-test" +Requires-Dist: dill; extra == "ml-test" +Requires-Dist: tensorflow_transform<1.15.0,>=1.14.0; extra == "ml-test" +Requires-Dist: numpy<2; extra == "ml-test" +Requires-Dist: protobuf<4; python_version < "3.11" and extra == "ml-test" +Requires-Dist: embeddings>=0.0.4; extra == "ml-test" +Requires-Dist: onnxruntime; extra == "ml-test" +Requires-Dist: langchain; extra == "ml-test" +Requires-Dist: sentence-transformers>=2.2.2; extra == "ml-test" +Requires-Dist: skl2onnx; extra == "ml-test" +Requires-Dist: pyod>=0.7.6; extra == "ml-test" +Requires-Dist: tensorflow; extra == "ml-test" +Requires-Dist: absl-py>=0.12.0; extra == "ml-test" +Requires-Dist: tensorflow-hub; extra == "ml-test" +Requires-Dist: tf2onnx; extra == "ml-test" +Requires-Dist: torch; extra == "ml-test" +Requires-Dist: transformers; extra == "ml-test" +Provides-Extra: p310-ml-test +Requires-Dist: datatable; extra == "p310-ml-test" +Requires-Dist: embeddings>=0.0.4; extra == "p310-ml-test" +Requires-Dist: onnxruntime; extra == "p310-ml-test" +Requires-Dist: langchain; extra == "p310-ml-test" +Requires-Dist: sentence-transformers>=2.2.2; extra == "p310-ml-test" +Requires-Dist: skl2onnx; extra == "p310-ml-test" +Requires-Dist: pyod>=0.7.6; extra == "p310-ml-test" +Requires-Dist: tensorflow; extra == "p310-ml-test" +Requires-Dist: absl-py>=0.12.0; extra == "p310-ml-test" +Requires-Dist: tensorflow-hub; extra == "p310-ml-test" +Requires-Dist: tf2onnx; extra == "p310-ml-test" +Requires-Dist: torch; extra == "p310-ml-test" +Requires-Dist: transformers; extra == "p310-ml-test" +Provides-Extra: p312-ml-test +Requires-Dist: datatable; extra == "p312-ml-test" +Requires-Dist: embeddings>=0.0.4; extra == "p312-ml-test" +Requires-Dist: onnxruntime; extra == "p312-ml-test" +Requires-Dist: langchain; extra == "p312-ml-test" +Requires-Dist: sentence-transformers>=2.2.2; extra == "p312-ml-test" +Requires-Dist: skl2onnx; extra == "p312-ml-test" +Requires-Dist: pyod>=0.7.6; extra == "p312-ml-test" +Requires-Dist: tensorflow; extra == "p312-ml-test" +Requires-Dist: absl-py>=0.12.0; extra == "p312-ml-test" +Requires-Dist: tensorflow-hub; extra == "p312-ml-test" +Requires-Dist: tf2onnx; extra == "p312-ml-test" +Requires-Dist: torch; extra == "p312-ml-test" +Requires-Dist: transformers; extra == "p312-ml-test" +Provides-Extra: p313-ml-test +Requires-Dist: embeddings>=0.0.4; extra == "p313-ml-test" +Requires-Dist: onnxruntime; extra == "p313-ml-test" +Requires-Dist: langchain; extra == "p313-ml-test" +Requires-Dist: sentence-transformers>=2.2.2; extra == "p313-ml-test" +Requires-Dist: skl2onnx; extra == "p313-ml-test" +Requires-Dist: pyod>=0.7.6; extra == "p313-ml-test" +Requires-Dist: tensorflow; extra == "p313-ml-test" +Requires-Dist: absl-py>=0.12.0; extra == "p313-ml-test" +Requires-Dist: tensorflow-hub; extra == "p313-ml-test" +Requires-Dist: tf2onnx; extra == "p313-ml-test" +Requires-Dist: torch; extra == "p313-ml-test" +Requires-Dist: transformers; extra == "p313-ml-test" +Requires-Dist: pymilvus<3.0.0,>=2.5.10; extra == "p313-ml-test" +Provides-Extra: aws +Requires-Dist: boto3<2,>=1.9; extra == "aws" +Provides-Extra: azure +Requires-Dist: azure-storage-blob<13,>=12.3.2; extra == "azure" +Requires-Dist: azure-core<2,>=1.7.0; extra == "azure" +Requires-Dist: azure-identity<2,>=1.12.0; extra == "azure" +Provides-Extra: dataframe +Requires-Dist: pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3; extra == "dataframe" +Provides-Extra: dask +Requires-Dist: distributed>=2024.4.2; extra == "dask" +Requires-Dist: dask>=2024.4.2; extra == "dask" +Provides-Extra: hadoop +Requires-Dist: hdfs<3.0.0,>=2.1.0; extra == "hadoop" +Provides-Extra: yaml +Requires-Dist: docstring-parser<1.0,>=0.15; extra == "yaml" +Requires-Dist: jinja2<3.2,>=3.0; extra == "yaml" +Requires-Dist: virtualenv-clone<1.0,>=0.5; extra == "yaml" +Requires-Dist: js2py<1,>=0.74; python_version < "3.12" and extra == "yaml" +Requires-Dist: jsonschema<5.0.0,>=4.0.0; extra == "yaml" +Requires-Dist: pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3; extra == "yaml" +Provides-Extra: torch +Requires-Dist: torch<2.8.0,>=1.9.0; extra == "torch" +Provides-Extra: tensorflow +Requires-Dist: tensorflow<2.21,>=2.12rc1; extra == "tensorflow" +Requires-Dist: absl-py>=0.12.0; extra == "tensorflow" +Provides-Extra: transformers +Requires-Dist: transformers<4.56.0,>=4.28.0; extra == "transformers" +Requires-Dist: tensorflow>=2.12.0; extra == "transformers" +Requires-Dist: torch>=1.9.0; extra == "transformers" +Provides-Extra: ml-cpu +Requires-Dist: tensorflow>=2.12.0; extra == "ml-cpu" +Requires-Dist: torch==2.8.0+cpu; extra == "ml-cpu" +Requires-Dist: transformers<4.56.0,>=4.28.0; extra == "ml-cpu" +Requires-Dist: absl-py>=0.12.0; extra == "ml-cpu" +Provides-Extra: redis +Requires-Dist: redis<6,>=5.0.0; extra == "redis" +Provides-Extra: tft +Requires-Dist: tensorflow_transform<1.15.0,>=1.14.0; extra == "tft" +Requires-Dist: numpy<2; extra == "tft" +Requires-Dist: dill; extra == "tft" +Provides-Extra: tfrecord +Requires-Dist: crcmod<2.0,>=1.7; extra == "tfrecord" +Provides-Extra: onnx +Requires-Dist: onnxruntime==1.13.1; extra == "onnx" +Requires-Dist: torch==1.13.1; extra == "onnx" +Requires-Dist: tensorflow==2.11.0; extra == "onnx" +Requires-Dist: tf2onnx==1.13.0; extra == "onnx" +Requires-Dist: skl2onnx==1.13; extra == "onnx" +Requires-Dist: transformers==4.25.1; extra == "onnx" +Requires-Dist: absl-py>=0.12.0; extra == "onnx" +Provides-Extra: xgboost +Requires-Dist: xgboost<2.1.3,>=1.6.0; extra == "xgboost" +Requires-Dist: datatable==1.0.0; extra == "xgboost" +Provides-Extra: tensorflow-hub +Requires-Dist: tensorflow-hub<0.16.0,>=0.14.0; extra == "tensorflow-hub" +Provides-Extra: milvus +Requires-Dist: pymilvus<3.0.0,>=2.5.10; extra == "milvus" +Provides-Extra: vllm +Requires-Dist: openai==1.107.1; extra == "vllm" +Requires-Dist: vllm==0.10.1.1; extra == "vllm" +Requires-Dist: triton==3.3.1; extra == "vllm" +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: download-url +Dynamic: home-page +Dynamic: keywords +Dynamic: license +Dynamic: provides-extra +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary + +# Apache Beam + +[Apache Beam](http://beam.apache.org/) is a unified model for defining both batch and streaming data-parallel processing pipelines, as well as a set of language-specific SDKs for constructing pipelines and Runners for executing them on distributed processing backends, including [Apache Flink](http://flink.apache.org/), [Apache Spark](http://spark.apache.org/), [Google Cloud Dataflow](http://cloud.google.com/dataflow/), and [Hazelcast Jet](https://jet.hazelcast.org/). + + +## Overview + +Beam provides a general approach to expressing [embarrassingly parallel](https://en.wikipedia.org/wiki/Embarrassingly_parallel) data processing pipelines and supports three categories of users, each of which have relatively disparate backgrounds and needs. + +1. _End Users_: Writing pipelines with an existing SDK, running it on an existing runner. These users want to focus on writing their application logic and have everything else just work. +2. _SDK Writers_: Developing a Beam SDK targeted at a specific user community (Java, Python, Scala, Go, R, graphical, etc). These users are language geeks and would prefer to be shielded from all the details of various runners and their implementations. +3. _Runner Writers_: Have an execution environment for distributed processing and would like to support programs written against the Beam Model. Would prefer to be shielded from details of multiple SDKs. + + +### The Beam Model + +The model behind Beam evolved from several internal Google data processing projects, including [MapReduce](http://research.google.com/archive/mapreduce.html), [FlumeJava](http://research.google.com/pubs/pub35650.html), and [Millwheel](http://research.google.com/pubs/pub41378.html). This model was originally known as the “[Dataflow Model](http://www.vldb.org/pvldb/vol8/p1792-Akidau.pdf)â€. + +To learn more about the Beam Model (though still under the original name of Dataflow), see the World Beyond Batch: [Streaming 101](https://www.oreilly.com/ideas/the-world-beyond-batch-streaming-101) and [Streaming 102](https://www.oreilly.com/ideas/the-world-beyond-batch-streaming-102) posts on O’Reilly’s Radar site, and the [VLDB 2015 paper](http://www.vldb.org/pvldb/vol8/p1792-Akidau.pdf). + +The key concepts in the Beam programming model are: + +* `PCollection`: represents a collection of data, which could be bounded or unbounded in size. +* `PTransform`: represents a computation that transforms input PCollections into output PCollections. +* `Pipeline`: manages a directed acyclic graph of PTransforms and PCollections that is ready for execution. +* `PipelineRunner`: specifies where and how the pipeline should execute. + +### Runners + +Beam supports executing programs on multiple distributed processing backends through PipelineRunners. Currently, the following PipelineRunners are available: + +- The `DirectRunner` runs the pipeline on your local machine. +- The `PrismRunner` runs the pipeline on your local machine using Beam Portability. +- The `DataflowRunner` submits the pipeline to the [Google Cloud Dataflow](http://cloud.google.com/dataflow/). +- The `FlinkRunner` runs the pipeline on an Apache Flink cluster. The code has been donated from [dataArtisans/flink-dataflow](https://github.com/dataArtisans/flink-dataflow) and is now part of Beam. +- The `SparkRunner` runs the pipeline on an Apache Spark cluster. +- The `JetRunner` runs the pipeline on a Hazelcast Jet cluster. The code has been donated from [hazelcast/hazelcast-jet](https://github.com/hazelcast/hazelcast-jet) and is now part of Beam. +- The `Twister2Runner` runs the pipeline on a Twister2 cluster. The code has been donated from [DSC-SPIDAL/twister2](https://github.com/DSC-SPIDAL/twister2) and is now part of Beam. + +Have ideas for new Runners? See the [runner-ideas label](https://github.com/apache/beam/issues?q=is%3Aopen+is%3Aissue+label%3Arunner-ideas). + + +## Get started with the Python SDK + +Get started with the [Beam Python SDK quickstart](/get-started/quickstart-py) to set up your Python development environment, get the Beam SDK for Python, and run an example pipeline. Then, read through the [Beam programming guide](/documentation/programming-guide) to learn the basic concepts that apply to all SDKs in Beam. The [Python Tips document](../../contributor-docs/python-tips.md) is also a useful resource for setting up a development environment and performing common processes. + +See the [Python API reference](https://beam.apache.org/releases/pydoc/) for more information on individual APIs. + +## Python streaming pipelines + +Python [streaming pipeline execution](https://beam.apache.org/documentation/sdks/python-streaming) +is available (with some [limitations](https://beam.apache.org//documentation/sdks/python-streaming/#unsupported-features)) +starting with Beam SDK version 2.5.0. + +## Python type safety + +Python is a dynamically-typed language with no static type checking. The Beam SDK for Python uses type hints during pipeline construction and runtime to try to emulate the correctness guarantees achieved by true static typing. [Ensuring Python Type Safety](https://beam.apache.org/documentation/sdks/python-type-safety) walks through how to use type hints, which help you to catch potential bugs up front with the [Direct Runner](https://beam.apache.org//documentation/runners/direct/). + +## Managing Python pipeline dependencies + +When you run your pipeline locally, the packages that your pipeline depends on are available because they are installed on your local machine. However, when you want to run your pipeline remotely, you must make sure these dependencies are available on the remote machines. [Managing Python Pipeline Dependencies](https://beam.apache.org/documentation/sdks/python-pipeline-dependencies) shows you how to make your dependencies available to the remote workers. + +## Developing new I/O connectors for Python + +The Beam SDK for Python provides an extensible API that you can use to create +new I/O connectors. See the [Developing I/O connectors overview](https://beam.apache.org/documentation/io/developing-io-overview) +for information about developing new I/O connectors and links to +language-specific implementation guidance. + +## Making machine learning inferences with Python + +To integrate machine learning models into your pipelines for making inferences, use the RunInference API for PyTorch and Scikit-learn models. If you are using TensorFlow models, you can make use of the +[library from `tfx_bsl`](https://github.com/tensorflow/tfx-bsl/tree/master/tfx_bsl/beam). + +You can create multiple types of transforms using the RunInference API: the API takes multiple types of setup parameters from model handlers, and the parameter type determines the model implementation. For more information, +see [About Beam ML](https://beam.apache.org/documentation/ml/about-ml). + +[TensorFlow Extended (TFX)](https://www.tensorflow.org/tfx) is an end-to-end platform for deploying production ML pipelines. TFX is integrated with Beam. For more information, see [TFX user guide](https://www.tensorflow.org/tfx/guide). + +## Python multi-language pipelines quickstart + +Apache Beam lets you combine transforms written in any supported SDK language and use them in one multi-language pipeline. To learn how to create a multi-language pipeline using the Python SDK, see the [Python multi-language pipelines quickstart](https://beam.apache.org/documentation/sdks/python-multi-language-pipelines). + +## Unrecoverable Errors in Beam Python + +Some common errors can occur during worker start-up and prevent jobs from starting. To learn about these errors and how to troubleshoot them in the Python SDK, see [Unrecoverable Errors in Beam Python](https://beam.apache.org/documentation/sdks/python-unrecoverable-errors). + +## 📚 Learn More + +Here are some resources actively maintained by the Beam community to help you get started: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourceDetails
Apache Beam WebsiteOur website discussing the project, and it's specifics.
Python QuickstartA guide to getting started with the Python SDK.
Tour of Beam A comprehensive, interactive learning experience covering Beam concepts in depth.
Beam Quest A certification granted by Google Cloud, certifying proficiency in Beam.
Community Metrics Beam's Git Community Metrics.
+ + +## Contribution + +Instructions for building and testing Beam itself +are in the [contribution guide](https://beam.apache.org/contribute). + +## Contact Us + +To get involved with Apache Beam: + +* [Subscribe to](https://beam.apache.org/community/contact-us/#:~:text=Subscribe%20and%20Unsubscribe) or e-mail the [user@beam.apache.org](http://mail-archives.apache.org/mod_mbox/beam-user/) list. +* [Subscribe to](https://beam.apache.org/community/contact-us/#:~:text=Subscribe%20and%20Unsubscribe) or e-mail the [dev@beam.apache.org](http://mail-archives.apache.org/mod_mbox/beam-dev/) list. +* [Join ASF Slack](https://s.apache.org/slack-invite) on [#beam channel](https://s.apache.org/beam-slack-channel) +* [Report an issue](https://github.com/apache/beam/issues/new/choose). diff --git a/sdks/python/apache_beam.egg-info/SOURCES.txt b/sdks/python/apache_beam.egg-info/SOURCES.txt new file mode 100644 index 000000000000..8db2478c1ed4 --- /dev/null +++ b/sdks/python/apache_beam.egg-info/SOURCES.txt @@ -0,0 +1,1383 @@ +MANIFEST.in +README.md +gen_protos.py +gen_xlang_wrappers.py +pyproject.toml +setup.cfg +setup.py +apache_beam/__init__.py +apache_beam/error.py +apache_beam/pipeline.py +apache_beam/pipeline_test.py +apache_beam/programming_guide_test.py +apache_beam/pvalue.py +apache_beam/pvalue_test.py +apache_beam/py.typed +apache_beam/version.py +apache_beam.egg-info/PKG-INFO +apache_beam.egg-info/SOURCES.txt +apache_beam.egg-info/dependency_links.txt +apache_beam.egg-info/not-zip-safe +apache_beam.egg-info/requires.txt +apache_beam.egg-info/top_level.txt +apache_beam/coders/__init__.py +apache_beam/coders/avro_record.py +apache_beam/coders/coder_impl.pxd +apache_beam/coders/coder_impl.py +apache_beam/coders/coder_impl_row_encoders.pyx +apache_beam/coders/coders.py +apache_beam/coders/coders_property_based_test.py +apache_beam/coders/coders_test.py +apache_beam/coders/coders_test_common.py +apache_beam/coders/fast_coders_test.py +apache_beam/coders/observable.py +apache_beam/coders/observable_test.py +apache_beam/coders/proto2_coder_test_messages_pb2.py +apache_beam/coders/row_coder.py +apache_beam/coders/row_coder_test.py +apache_beam/coders/slow_coders_test.py +apache_beam/coders/slow_stream.py +apache_beam/coders/standard_coders_test.py +apache_beam/coders/stream.pxd +apache_beam/coders/stream.pyx +apache_beam/coders/stream_test.py +apache_beam/coders/typecoders.py +apache_beam/coders/typecoders_test.py +apache_beam/dataframe/__init__.py +apache_beam/dataframe/convert.py +apache_beam/dataframe/convert_test.py +apache_beam/dataframe/doctests.py +apache_beam/dataframe/doctests_test.py +apache_beam/dataframe/expressions.py +apache_beam/dataframe/expressions_test.py +apache_beam/dataframe/frame_base.py +apache_beam/dataframe/frame_base_test.py +apache_beam/dataframe/frames.py +apache_beam/dataframe/frames_test.py +apache_beam/dataframe/io.py +apache_beam/dataframe/io_it_test.py +apache_beam/dataframe/io_test.py +apache_beam/dataframe/pandas_docs_test.py +apache_beam/dataframe/pandas_doctests_test.py +apache_beam/dataframe/pandas_top_level_functions.py +apache_beam/dataframe/partitionings.py +apache_beam/dataframe/partitionings_test.py +apache_beam/dataframe/schemas.py +apache_beam/dataframe/schemas_test.py +apache_beam/dataframe/transforms.py +apache_beam/dataframe/transforms_test.py +apache_beam/examples/__init__.py +apache_beam/examples/avro_nyc_trips.py +apache_beam/examples/avro_nyc_trips_it_test.py +apache_beam/examples/avro_nyc_trips_test.py +apache_beam/examples/california_housing_clustering.py +apache_beam/examples/fastavro_it_test.py +apache_beam/examples/matrix_power.py +apache_beam/examples/matrix_power_test.py +apache_beam/examples/online_clustering.py +apache_beam/examples/per_entity_training.py +apache_beam/examples/rate_limiter_simple.py +apache_beam/examples/sql_taxi.py +apache_beam/examples/streaming_wordcount.py +apache_beam/examples/streaming_wordcount_debugging.py +apache_beam/examples/streaming_wordcount_debugging_it_test.py +apache_beam/examples/streaming_wordcount_debugging_test.py +apache_beam/examples/streaming_wordcount_it_test.py +apache_beam/examples/windowed_wordcount.py +apache_beam/examples/wordcount.py +apache_beam/examples/wordcount_dataframe.py +apache_beam/examples/wordcount_debugging.py +apache_beam/examples/wordcount_debugging_test.py +apache_beam/examples/wordcount_it_test.py +apache_beam/examples/wordcount_minimal.py +apache_beam/examples/wordcount_minimal_test.py +apache_beam/examples/wordcount_test.py +apache_beam/examples/wordcount_with_metrics.py +apache_beam/examples/wordcount_xlang.py +apache_beam/examples/wordcount_xlang_sql.py +apache_beam/examples/complete/__init__.py +apache_beam/examples/complete/autocomplete.py +apache_beam/examples/complete/autocomplete_it_test.py +apache_beam/examples/complete/autocomplete_test.py +apache_beam/examples/complete/distribopt.py +apache_beam/examples/complete/distribopt_test.py +apache_beam/examples/complete/estimate_pi.py +apache_beam/examples/complete/estimate_pi_it_test.py +apache_beam/examples/complete/estimate_pi_test.py +apache_beam/examples/complete/tfidf.py +apache_beam/examples/complete/tfidf_it_test.py +apache_beam/examples/complete/tfidf_test.py +apache_beam/examples/complete/top_wikipedia_sessions.py +apache_beam/examples/complete/top_wikipedia_sessions_it_test.py +apache_beam/examples/complete/top_wikipedia_sessions_test.py +apache_beam/examples/complete/game/__init__.py +apache_beam/examples/complete/game/game_stats.py +apache_beam/examples/complete/game/game_stats_it_test.py +apache_beam/examples/complete/game/game_stats_test.py +apache_beam/examples/complete/game/hourly_team_score.py +apache_beam/examples/complete/game/hourly_team_score_it_test.py +apache_beam/examples/complete/game/hourly_team_score_test.py +apache_beam/examples/complete/game/leader_board.py +apache_beam/examples/complete/game/leader_board_it_test.py +apache_beam/examples/complete/game/leader_board_test.py +apache_beam/examples/complete/game/user_score.py +apache_beam/examples/complete/game/user_score_it_test.py +apache_beam/examples/complete/game/user_score_test.py +apache_beam/examples/complete/juliaset/__init__.py +apache_beam/examples/complete/juliaset/juliaset_main.py +apache_beam/examples/complete/juliaset/setup.py +apache_beam/examples/complete/juliaset/juliaset/__init__.py +apache_beam/examples/complete/juliaset/juliaset/juliaset.py +apache_beam/examples/complete/juliaset/juliaset/juliaset_test.py +apache_beam/examples/complete/juliaset/juliaset/juliaset_test_it.py +apache_beam/examples/cookbook/__init__.py +apache_beam/examples/cookbook/bigquery_schema.py +apache_beam/examples/cookbook/bigquery_side_input.py +apache_beam/examples/cookbook/bigquery_side_input_it_test.py +apache_beam/examples/cookbook/bigquery_side_input_test.py +apache_beam/examples/cookbook/bigquery_tornadoes.py +apache_beam/examples/cookbook/bigquery_tornadoes_it_test.py +apache_beam/examples/cookbook/bigquery_tornadoes_test.py +apache_beam/examples/cookbook/bigtableio_it_test.py +apache_beam/examples/cookbook/coders.py +apache_beam/examples/cookbook/coders_it_test.py +apache_beam/examples/cookbook/coders_test.py +apache_beam/examples/cookbook/combiners_test.py +apache_beam/examples/cookbook/custom_ptransform.py +apache_beam/examples/cookbook/custom_ptransform_it_test.py +apache_beam/examples/cookbook/custom_ptransform_test.py +apache_beam/examples/cookbook/datastore_wordcount.py +apache_beam/examples/cookbook/datastore_wordcount_it_test.py +apache_beam/examples/cookbook/filters.py +apache_beam/examples/cookbook/filters_test.py +apache_beam/examples/cookbook/group_with_coder.py +apache_beam/examples/cookbook/group_with_coder_test.py +apache_beam/examples/cookbook/mergecontacts.py +apache_beam/examples/cookbook/mergecontacts_test.py +apache_beam/examples/cookbook/multiple_output_pardo.py +apache_beam/examples/cookbook/multiple_output_pardo_test.py +apache_beam/examples/cookbook/ordered_window_elements/__init__.py +apache_beam/examples/cookbook/ordered_window_elements/batch.py +apache_beam/examples/cookbook/ordered_window_elements/batch_test.py +apache_beam/examples/cookbook/ordered_window_elements/streaming.py +apache_beam/examples/cookbook/ordered_window_elements/streaming_test.py +apache_beam/examples/dataframe/__init__.py +apache_beam/examples/dataframe/flight_delays.py +apache_beam/examples/dataframe/flight_delays_it_test.py +apache_beam/examples/dataframe/taxiride.py +apache_beam/examples/dataframe/taxiride_it_test.py +apache_beam/examples/dataframe/taxiride_test.py +apache_beam/examples/dataframe/wordcount.py +apache_beam/examples/dataframe/wordcount_test.py +apache_beam/examples/flink/__init__.py +apache_beam/examples/flink/flink_streaming_impulse.py +apache_beam/examples/inference/__init__.py +apache_beam/examples/inference/gemini_image_generation.py +apache_beam/examples/inference/gemini_text_classification.py +apache_beam/examples/inference/huggingface_language_modeling.py +apache_beam/examples/inference/huggingface_question_answering.py +apache_beam/examples/inference/milk_quality_prediction_windowing.py +apache_beam/examples/inference/onnx_sentiment_classification.py +apache_beam/examples/inference/pytorch_image_classification.py +apache_beam/examples/inference/pytorch_image_classification_with_side_inputs.py +apache_beam/examples/inference/pytorch_image_segmentation.py +apache_beam/examples/inference/pytorch_language_modeling.py +apache_beam/examples/inference/pytorch_model_per_key_image_segmentation.py +apache_beam/examples/inference/pytorch_sentiment.py +apache_beam/examples/inference/rate_limiter_vertex_ai.py +apache_beam/examples/inference/run_inference_side_inputs.py +apache_beam/examples/inference/sklearn_japanese_housing_regression.py +apache_beam/examples/inference/sklearn_mnist_classification.py +apache_beam/examples/inference/tensorflow_imagenet_segmentation.py +apache_beam/examples/inference/tensorflow_mnist_classification.py +apache_beam/examples/inference/tensorflow_mnist_with_weights.py +apache_beam/examples/inference/tensorrt_object_detection.py +apache_beam/examples/inference/tensorrt_text_classification.py +apache_beam/examples/inference/vertex_ai_image_classification.py +apache_beam/examples/inference/vertex_ai_llm_text_classification.py +apache_beam/examples/inference/vllm_gemma_batch.py +apache_beam/examples/inference/vllm_text_completion.py +apache_beam/examples/inference/xgboost_iris_classification.py +apache_beam/examples/inference/runinference_metrics/__init__.py +apache_beam/examples/inference/runinference_metrics/config.py +apache_beam/examples/inference/runinference_metrics/main.py +apache_beam/examples/inference/runinference_metrics/setup.py +apache_beam/examples/inference/runinference_metrics/pipeline/__init__.py +apache_beam/examples/inference/runinference_metrics/pipeline/options.py +apache_beam/examples/inference/runinference_metrics/pipeline/transformations.py +apache_beam/examples/inference/tfx_bsl/__init__.py +apache_beam/examples/inference/tfx_bsl/build_tensorflow_model.py +apache_beam/examples/inference/tfx_bsl/tensorflow_image_classification.py +apache_beam/examples/inference/tfx_bsl/tfx_bsl_inference_it_test.py +apache_beam/examples/kafkataxi/__init__.py +apache_beam/examples/kafkataxi/kafka_taxi.py +apache_beam/examples/ml_transform/__init__.py +apache_beam/examples/ml_transform/ml_transform_basic.py +apache_beam/examples/ml_transform/ml_transform_it_test.py +apache_beam/examples/ml_transform/vocab_tfidf_processing.py +apache_beam/examples/sinks/__init__.py +apache_beam/examples/sinks/generate_event.py +apache_beam/examples/sinks/test_periodicimpulse.py +apache_beam/examples/sinks/test_write_bounded.py +apache_beam/examples/sinks/test_write_unbounded.py +apache_beam/examples/snippets/__init__.py +apache_beam/examples/snippets/snippets.py +apache_beam/examples/snippets/snippets_examples_wordcount_debugging.py +apache_beam/examples/snippets/snippets_examples_wordcount_minimal.py +apache_beam/examples/snippets/snippets_examples_wordcount_wordcount.py +apache_beam/examples/snippets/snippets_test.py +apache_beam/examples/snippets/util.py +apache_beam/examples/snippets/util_test.py +apache_beam/examples/snippets/transforms/__init__.py +apache_beam/examples/snippets/transforms/aggregation/__init__.py +apache_beam/examples/snippets/transforms/aggregation/approximatequantiles.py +apache_beam/examples/snippets/transforms/aggregation/approximatequantiles_test.py +apache_beam/examples/snippets/transforms/aggregation/approximateunique.py +apache_beam/examples/snippets/transforms/aggregation/approximateunique_test.py +apache_beam/examples/snippets/transforms/aggregation/batchelements.py +apache_beam/examples/snippets/transforms/aggregation/batchelements_test.py +apache_beam/examples/snippets/transforms/aggregation/cogroupbykey.py +apache_beam/examples/snippets/transforms/aggregation/cogroupbykey_test.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_combinefn.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_function.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_lambda.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_multiple_arguments.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_side_inputs_dict.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_side_inputs_iter.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/aggregation/combineglobally_test.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_combinefn.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_function.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_lambda.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_multiple_arguments.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_side_inputs_dict.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_side_inputs_iter.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_simple.py +apache_beam/examples/snippets/transforms/aggregation/combineperkey_test.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_combinefn.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_function.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_lambda.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_multiple_arguments.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_side_inputs_dict.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_side_inputs_iter.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_simple.py +apache_beam/examples/snippets/transforms/aggregation/combinevalues_test.py +apache_beam/examples/snippets/transforms/aggregation/count_globally.py +apache_beam/examples/snippets/transforms/aggregation/count_per_element.py +apache_beam/examples/snippets/transforms/aggregation/count_per_key.py +apache_beam/examples/snippets/transforms/aggregation/count_test.py +apache_beam/examples/snippets/transforms/aggregation/distinct.py +apache_beam/examples/snippets/transforms/aggregation/distinct_test.py +apache_beam/examples/snippets/transforms/aggregation/groupby_attr.py +apache_beam/examples/snippets/transforms/aggregation/groupby_attr_expr.py +apache_beam/examples/snippets/transforms/aggregation/groupby_expr.py +apache_beam/examples/snippets/transforms/aggregation/groupby_expr_aggregate.py +apache_beam/examples/snippets/transforms/aggregation/groupby_global_aggregate.py +apache_beam/examples/snippets/transforms/aggregation/groupby_simple_aggregate.py +apache_beam/examples/snippets/transforms/aggregation/groupby_test.py +apache_beam/examples/snippets/transforms/aggregation/groupby_two_exprs.py +apache_beam/examples/snippets/transforms/aggregation/groupbykey.py +apache_beam/examples/snippets/transforms/aggregation/groupbykey_test.py +apache_beam/examples/snippets/transforms/aggregation/groupintobatches.py +apache_beam/examples/snippets/transforms/aggregation/groupintobatches_test.py +apache_beam/examples/snippets/transforms/aggregation/latest_globally.py +apache_beam/examples/snippets/transforms/aggregation/latest_per_key.py +apache_beam/examples/snippets/transforms/aggregation/latest_test.py +apache_beam/examples/snippets/transforms/aggregation/max_globally.py +apache_beam/examples/snippets/transforms/aggregation/max_per_key.py +apache_beam/examples/snippets/transforms/aggregation/max_test.py +apache_beam/examples/snippets/transforms/aggregation/mean_globally.py +apache_beam/examples/snippets/transforms/aggregation/mean_per_key.py +apache_beam/examples/snippets/transforms/aggregation/mean_test.py +apache_beam/examples/snippets/transforms/aggregation/min_globally.py +apache_beam/examples/snippets/transforms/aggregation/min_per_key.py +apache_beam/examples/snippets/transforms/aggregation/min_test.py +apache_beam/examples/snippets/transforms/aggregation/sample_fixed_size_globally.py +apache_beam/examples/snippets/transforms/aggregation/sample_fixed_size_per_key.py +apache_beam/examples/snippets/transforms/aggregation/sample_test.py +apache_beam/examples/snippets/transforms/aggregation/sum_globally.py +apache_beam/examples/snippets/transforms/aggregation/sum_per_key.py +apache_beam/examples/snippets/transforms/aggregation/sum_test.py +apache_beam/examples/snippets/transforms/aggregation/tolist.py +apache_beam/examples/snippets/transforms/aggregation/tolist_test.py +apache_beam/examples/snippets/transforms/aggregation/top_largest.py +apache_beam/examples/snippets/transforms/aggregation/top_largest_per_key.py +apache_beam/examples/snippets/transforms/aggregation/top_of.py +apache_beam/examples/snippets/transforms/aggregation/top_per_key.py +apache_beam/examples/snippets/transforms/aggregation/top_smallest.py +apache_beam/examples/snippets/transforms/aggregation/top_smallest_per_key.py +apache_beam/examples/snippets/transforms/aggregation/top_test.py +apache_beam/examples/snippets/transforms/elementwise/__init__.py +apache_beam/examples/snippets/transforms/elementwise/enrichment.py +apache_beam/examples/snippets/transforms/elementwise/enrichment_test.py +apache_beam/examples/snippets/transforms/elementwise/filter_function.py +apache_beam/examples/snippets/transforms/elementwise/filter_lambda.py +apache_beam/examples/snippets/transforms/elementwise/filter_multiple_arguments.py +apache_beam/examples/snippets/transforms/elementwise/filter_side_inputs_dict.py +apache_beam/examples/snippets/transforms/elementwise/filter_side_inputs_iter.py +apache_beam/examples/snippets/transforms/elementwise/filter_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/elementwise/filter_test.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_function.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_generator.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_lambda.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_multiple_arguments.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_nofunction.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_side_inputs_dict.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_side_inputs_iter.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_simple.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_test.py +apache_beam/examples/snippets/transforms/elementwise/flatmap_tuple.py +apache_beam/examples/snippets/transforms/elementwise/keys.py +apache_beam/examples/snippets/transforms/elementwise/keys_test.py +apache_beam/examples/snippets/transforms/elementwise/kvswap.py +apache_beam/examples/snippets/transforms/elementwise/kvswap_test.py +apache_beam/examples/snippets/transforms/elementwise/map_context.py +apache_beam/examples/snippets/transforms/elementwise/map_function.py +apache_beam/examples/snippets/transforms/elementwise/map_lambda.py +apache_beam/examples/snippets/transforms/elementwise/map_multiple_arguments.py +apache_beam/examples/snippets/transforms/elementwise/map_side_inputs_dict.py +apache_beam/examples/snippets/transforms/elementwise/map_side_inputs_iter.py +apache_beam/examples/snippets/transforms/elementwise/map_side_inputs_singleton.py +apache_beam/examples/snippets/transforms/elementwise/map_simple.py +apache_beam/examples/snippets/transforms/elementwise/map_test.py +apache_beam/examples/snippets/transforms/elementwise/map_tuple.py +apache_beam/examples/snippets/transforms/elementwise/mltransform.py +apache_beam/examples/snippets/transforms/elementwise/mltransform_test.py +apache_beam/examples/snippets/transforms/elementwise/pardo_dofn.py +apache_beam/examples/snippets/transforms/elementwise/pardo_dofn_methods.py +apache_beam/examples/snippets/transforms/elementwise/pardo_dofn_params.py +apache_beam/examples/snippets/transforms/elementwise/pardo_test.py +apache_beam/examples/snippets/transforms/elementwise/partition_function.py +apache_beam/examples/snippets/transforms/elementwise/partition_lambda.py +apache_beam/examples/snippets/transforms/elementwise/partition_multiple_arguments.py +apache_beam/examples/snippets/transforms/elementwise/partition_test.py +apache_beam/examples/snippets/transforms/elementwise/regex_all_matches.py +apache_beam/examples/snippets/transforms/elementwise/regex_find.py +apache_beam/examples/snippets/transforms/elementwise/regex_find_all.py +apache_beam/examples/snippets/transforms/elementwise/regex_find_kv.py +apache_beam/examples/snippets/transforms/elementwise/regex_matches.py +apache_beam/examples/snippets/transforms/elementwise/regex_matches_kv.py +apache_beam/examples/snippets/transforms/elementwise/regex_replace_all.py +apache_beam/examples/snippets/transforms/elementwise/regex_replace_first.py +apache_beam/examples/snippets/transforms/elementwise/regex_split.py +apache_beam/examples/snippets/transforms/elementwise/regex_test.py +apache_beam/examples/snippets/transforms/elementwise/runinference.py +apache_beam/examples/snippets/transforms/elementwise/runinference_sklearn_keyed_model_handler.py +apache_beam/examples/snippets/transforms/elementwise/runinference_sklearn_unkeyed_model_handler.py +apache_beam/examples/snippets/transforms/elementwise/runinference_test.py +apache_beam/examples/snippets/transforms/elementwise/tostring_element.py +apache_beam/examples/snippets/transforms/elementwise/tostring_iterables.py +apache_beam/examples/snippets/transforms/elementwise/tostring_kvs.py +apache_beam/examples/snippets/transforms/elementwise/tostring_test.py +apache_beam/examples/snippets/transforms/elementwise/values.py +apache_beam/examples/snippets/transforms/elementwise/values_test.py +apache_beam/examples/snippets/transforms/elementwise/withtimestamps.py +apache_beam/examples/snippets/transforms/elementwise/withtimestamps_event_time.py +apache_beam/examples/snippets/transforms/elementwise/withtimestamps_logical_clock.py +apache_beam/examples/snippets/transforms/elementwise/withtimestamps_processing_time.py +apache_beam/examples/snippets/transforms/elementwise/withtimestamps_test.py +apache_beam/examples/snippets/transforms/other/__init__.py +apache_beam/examples/snippets/transforms/other/create.py +apache_beam/examples/snippets/transforms/other/create_test.py +apache_beam/examples/snippets/transforms/other/flatten.py +apache_beam/examples/snippets/transforms/other/flatten_test.py +apache_beam/examples/snippets/transforms/other/window.py +apache_beam/examples/snippets/transforms/other/window_test.py +apache_beam/internal/__init__.py +apache_beam/internal/cloudpickle_pickler.py +apache_beam/internal/cloudpickle_pickler_test.py +apache_beam/internal/code_object_pickler.py +apache_beam/internal/code_object_pickler_test.py +apache_beam/internal/dill_pickler.py +apache_beam/internal/http_client.py +apache_beam/internal/http_client_test.py +apache_beam/internal/module_test.py +apache_beam/internal/pickler.py +apache_beam/internal/pickler_test.py +apache_beam/internal/set_pickler.py +apache_beam/internal/set_pickler_test.py +apache_beam/internal/util.py +apache_beam/internal/util_test.py +apache_beam/internal/azure/__init__.py +apache_beam/internal/azure/auth.py +apache_beam/internal/cloudpickle/__init__.py +apache_beam/internal/cloudpickle/cloudpickle.py +apache_beam/internal/cloudpickle/cloudpickle_fast.py +apache_beam/internal/gcp/__init__.py +apache_beam/internal/gcp/auth.py +apache_beam/internal/gcp/auth_test.py +apache_beam/internal/gcp/json_value.py +apache_beam/internal/gcp/json_value_test.py +apache_beam/internal/metrics/__init__.py +apache_beam/internal/metrics/metric.py +apache_beam/internal/test_data/__init__.py +apache_beam/internal/test_data/module_1.py +apache_beam/internal/test_data/module_1_class_added.py +apache_beam/internal/test_data/module_1_function_added.py +apache_beam/internal/test_data/module_1_global_variable_added.py +apache_beam/internal/test_data/module_1_lambda_variable_added.py +apache_beam/internal/test_data/module_1_local_variable_added.py +apache_beam/internal/test_data/module_1_local_variable_removed.py +apache_beam/internal/test_data/module_1_nested_function_2_added.py +apache_beam/internal/test_data/module_1_nested_function_added.py +apache_beam/internal/test_data/module_2.py +apache_beam/internal/test_data/module_2_modified.py +apache_beam/internal/test_data/module_3.py +apache_beam/internal/test_data/module_3_modified.py +apache_beam/internal/test_data/module_with_default_argument.py +apache_beam/io/__init__.py +apache_beam/io/avroio.py +apache_beam/io/avroio_test.py +apache_beam/io/concat_source.py +apache_beam/io/concat_source_test.py +apache_beam/io/debezium.py +apache_beam/io/filebasedio_perf_test.py +apache_beam/io/filebasedsink.py +apache_beam/io/filebasedsink_test.py +apache_beam/io/filebasedsource.py +apache_beam/io/filebasedsource_test.py +apache_beam/io/fileio.py +apache_beam/io/fileio_test.py +apache_beam/io/filesystem.py +apache_beam/io/filesystem_test.py +apache_beam/io/filesystemio.py +apache_beam/io/filesystemio_test.py +apache_beam/io/filesystems.py +apache_beam/io/filesystems_test.py +apache_beam/io/hadoopfilesystem.py +apache_beam/io/hadoopfilesystem_test.py +apache_beam/io/iobase.py +apache_beam/io/iobase_it_test.py +apache_beam/io/iobase_test.py +apache_beam/io/jdbc.py +apache_beam/io/kafka.py +apache_beam/io/kinesis.py +apache_beam/io/localfilesystem.py +apache_beam/io/localfilesystem_test.py +apache_beam/io/mongodbio.py +apache_beam/io/mongodbio_it_test.py +apache_beam/io/mongodbio_test.py +apache_beam/io/parquetio.py +apache_beam/io/parquetio_it_test.py +apache_beam/io/parquetio_test.py +apache_beam/io/range_trackers.py +apache_beam/io/range_trackers_test.py +apache_beam/io/requestresponse.py +apache_beam/io/requestresponse_it_test.py +apache_beam/io/requestresponse_test.py +apache_beam/io/restriction_trackers.py +apache_beam/io/restriction_trackers_test.py +apache_beam/io/snowflake.py +apache_beam/io/source_test_utils.py +apache_beam/io/source_test_utils_test.py +apache_beam/io/sources_test.py +apache_beam/io/textio.py +apache_beam/io/textio_test.py +apache_beam/io/tfrecordio.py +apache_beam/io/tfrecordio_test.py +apache_beam/io/utils.py +apache_beam/io/utils_test.py +apache_beam/io/watermark_estimators.py +apache_beam/io/watermark_estimators_test.py +apache_beam/io/aws/__init__.py +apache_beam/io/aws/s3filesystem.py +apache_beam/io/aws/s3filesystem_test.py +apache_beam/io/aws/s3io.py +apache_beam/io/aws/s3io_test.py +apache_beam/io/aws/clients/__init__.py +apache_beam/io/aws/clients/s3/__init__.py +apache_beam/io/aws/clients/s3/boto3_client.py +apache_beam/io/aws/clients/s3/client_test.py +apache_beam/io/aws/clients/s3/fake_client.py +apache_beam/io/aws/clients/s3/messages.py +apache_beam/io/azure/__init__.py +apache_beam/io/azure/blobstoragefilesystem.py +apache_beam/io/azure/blobstoragefilesystem_test.py +apache_beam/io/azure/blobstorageio.py +apache_beam/io/azure/blobstorageio_test.py +apache_beam/io/components/__init__.py +apache_beam/io/components/adaptive_throttler.py +apache_beam/io/components/adaptive_throttler_test.py +apache_beam/io/components/rate_limiter.py +apache_beam/io/components/rate_limiter_test.py +apache_beam/io/components/util.py +apache_beam/io/external/__init__.py +apache_beam/io/external/generate_sequence.py +apache_beam/io/external/generate_sequence_test.py +apache_beam/io/external/kafka.py +apache_beam/io/external/snowflake.py +apache_beam/io/external/xlang_bigqueryio_it_test.py +apache_beam/io/external/xlang_debeziumio_it_test.py +apache_beam/io/external/xlang_jdbcio_it_test.py +apache_beam/io/external/xlang_kafkaio_it_test.py +apache_beam/io/external/xlang_kafkaio_perf_test.py +apache_beam/io/external/xlang_kinesisio_it_test.py +apache_beam/io/external/xlang_parquetio_test.py +apache_beam/io/external/xlang_snowflakeio_it_test.py +apache_beam/io/external/gcp/__init__.py +apache_beam/io/external/gcp/pubsub.py +apache_beam/io/flink/__init__.py +apache_beam/io/flink/flink_streaming_impulse_source.py +apache_beam/io/flink/flink_streaming_impulse_source_test.py +apache_beam/io/gcp/__init__.py +apache_beam/io/gcp/big_query_query_to_table_it_test.py +apache_beam/io/gcp/big_query_query_to_table_pipeline.py +apache_beam/io/gcp/bigquery.py +apache_beam/io/gcp/bigquery_avro_tools.py +apache_beam/io/gcp/bigquery_avro_tools_test.py +apache_beam/io/gcp/bigquery_biglake_test.py +apache_beam/io/gcp/bigquery_file_loads.py +apache_beam/io/gcp/bigquery_file_loads_test.py +apache_beam/io/gcp/bigquery_geography_it_test.py +apache_beam/io/gcp/bigquery_io_metadata.py +apache_beam/io/gcp/bigquery_io_metadata_test.py +apache_beam/io/gcp/bigquery_io_read_it_test.py +apache_beam/io/gcp/bigquery_io_read_pipeline.py +apache_beam/io/gcp/bigquery_json_it_test.py +apache_beam/io/gcp/bigquery_read_internal.py +apache_beam/io/gcp/bigquery_read_internal_test.py +apache_beam/io/gcp/bigquery_read_it_test.py +apache_beam/io/gcp/bigquery_read_perf_test.py +apache_beam/io/gcp/bigquery_schema_tools.py +apache_beam/io/gcp/bigquery_schema_tools_test.py +apache_beam/io/gcp/bigquery_test.py +apache_beam/io/gcp/bigquery_tools.py +apache_beam/io/gcp/bigquery_tools_test.py +apache_beam/io/gcp/bigquery_write_it_test.py +apache_beam/io/gcp/bigquery_write_perf_test.py +apache_beam/io/gcp/bigtableio.py +apache_beam/io/gcp/bigtableio_it_test.py +apache_beam/io/gcp/bigtableio_test.py +apache_beam/io/gcp/dicomclient.py +apache_beam/io/gcp/dicomio.py +apache_beam/io/gcp/gce_metadata_util.py +apache_beam/io/gcp/gcsfilesystem.py +apache_beam/io/gcp/gcsfilesystem_integration_test.py +apache_beam/io/gcp/gcsfilesystem_test.py +apache_beam/io/gcp/gcsio.py +apache_beam/io/gcp/gcsio_integration_test.py +apache_beam/io/gcp/gcsio_retry.py +apache_beam/io/gcp/gcsio_retry_test.py +apache_beam/io/gcp/gcsio_test.py +apache_beam/io/gcp/pubsub.py +apache_beam/io/gcp/pubsub_integration_test.py +apache_beam/io/gcp/pubsub_io_perf_test.py +apache_beam/io/gcp/pubsub_it_pipeline.py +apache_beam/io/gcp/pubsub_test.py +apache_beam/io/gcp/resource_identifiers.py +apache_beam/io/gcp/spanner.py +apache_beam/io/gcp/spanner_wrapper.py +apache_beam/io/gcp/datastore/__init__.py +apache_beam/io/gcp/datastore/v1new/__init__.py +apache_beam/io/gcp/datastore/v1new/datastore_write_it_pipeline.py +apache_beam/io/gcp/datastore/v1new/datastore_write_it_test.py +apache_beam/io/gcp/datastore/v1new/datastoreio.py +apache_beam/io/gcp/datastore/v1new/datastoreio_test.py +apache_beam/io/gcp/datastore/v1new/helper.py +apache_beam/io/gcp/datastore/v1new/query_splitter.py +apache_beam/io/gcp/datastore/v1new/query_splitter_test.py +apache_beam/io/gcp/datastore/v1new/rampup_throttling_fn.py +apache_beam/io/gcp/datastore/v1new/rampup_throttling_fn_test.py +apache_beam/io/gcp/datastore/v1new/types.py +apache_beam/io/gcp/datastore/v1new/types_test.py +apache_beam/io/gcp/datastore/v1new/util.py +apache_beam/io/gcp/datastore/v1new/util_test.py +apache_beam/io/gcp/experimental/__init__.py +apache_beam/io/gcp/experimental/spannerio.py +apache_beam/io/gcp/experimental/spannerio_read_it_test.py +apache_beam/io/gcp/experimental/spannerio_read_perf_test.py +apache_beam/io/gcp/experimental/spannerio_test.py +apache_beam/io/gcp/experimental/spannerio_write_it_test.py +apache_beam/io/gcp/experimental/spannerio_write_perf_test.py +apache_beam/io/gcp/healthcare/__init__.py +apache_beam/io/gcp/healthcare/dicomclient.py +apache_beam/io/gcp/healthcare/dicomio.py +apache_beam/io/gcp/healthcare/dicomio_integration_test.py +apache_beam/io/gcp/healthcare/dicomio_test.py +apache_beam/io/gcp/internal/__init__.py +apache_beam/io/gcp/internal/clients/__init__.py +apache_beam/io/gcp/internal/clients/bigquery/__init__.py +apache_beam/io/gcp/internal/clients/bigquery/bigquery_v2_client.py +apache_beam/io/gcp/internal/clients/bigquery/bigquery_v2_messages.py +apache_beam/io/gcp/tests/__init__.py +apache_beam/io/gcp/tests/bigquery_matcher.py +apache_beam/io/gcp/tests/bigquery_matcher_test.py +apache_beam/io/gcp/tests/pubsub_matcher.py +apache_beam/io/gcp/tests/pubsub_matcher_test.py +apache_beam/io/gcp/tests/utils.py +apache_beam/io/gcp/tests/utils_test.py +apache_beam/io/gcp/tests/xlang_spannerio_it_test.py +apache_beam/metrics/__init__.py +apache_beam/metrics/cells.pxd +apache_beam/metrics/cells.py +apache_beam/metrics/cells_test.py +apache_beam/metrics/execution.pxd +apache_beam/metrics/execution.py +apache_beam/metrics/execution_test.py +apache_beam/metrics/metric.py +apache_beam/metrics/metric_test.py +apache_beam/metrics/metricbase.py +apache_beam/metrics/monitoring_infos.py +apache_beam/metrics/monitoring_infos_test.py +apache_beam/ml/__init__.py +apache_beam/ml/anomaly/__init__.py +apache_beam/ml/anomaly/aggregations.py +apache_beam/ml/anomaly/aggregations_test.py +apache_beam/ml/anomaly/base.py +apache_beam/ml/anomaly/base_test.py +apache_beam/ml/anomaly/specifiable.py +apache_beam/ml/anomaly/specifiable_test.py +apache_beam/ml/anomaly/thresholds.py +apache_beam/ml/anomaly/thresholds_test.py +apache_beam/ml/anomaly/transforms.py +apache_beam/ml/anomaly/transforms_test.py +apache_beam/ml/anomaly/detectors/__init__.py +apache_beam/ml/anomaly/detectors/iqr.py +apache_beam/ml/anomaly/detectors/iqr_test.py +apache_beam/ml/anomaly/detectors/offline.py +apache_beam/ml/anomaly/detectors/pyod_adapter.py +apache_beam/ml/anomaly/detectors/pyod_adapter_test.py +apache_beam/ml/anomaly/detectors/robust_zscore.py +apache_beam/ml/anomaly/detectors/robust_zscore_test.py +apache_beam/ml/anomaly/detectors/zscore.py +apache_beam/ml/anomaly/detectors/zscore_test.py +apache_beam/ml/anomaly/univariate/__init__.py +apache_beam/ml/anomaly/univariate/base.py +apache_beam/ml/anomaly/univariate/mad.py +apache_beam/ml/anomaly/univariate/mad_test.py +apache_beam/ml/anomaly/univariate/mean.py +apache_beam/ml/anomaly/univariate/mean_test.py +apache_beam/ml/anomaly/univariate/median.py +apache_beam/ml/anomaly/univariate/median_test.py +apache_beam/ml/anomaly/univariate/perf_test.py +apache_beam/ml/anomaly/univariate/quantile.py +apache_beam/ml/anomaly/univariate/quantile_test.py +apache_beam/ml/anomaly/univariate/stdev.py +apache_beam/ml/anomaly/univariate/stdev_test.py +apache_beam/ml/gcp/__init__.py +apache_beam/ml/gcp/cloud_dlp.py +apache_beam/ml/gcp/cloud_dlp_it_test.py +apache_beam/ml/gcp/cloud_dlp_test.py +apache_beam/ml/gcp/naturallanguageml.py +apache_beam/ml/gcp/naturallanguageml_test.py +apache_beam/ml/gcp/naturallanguageml_test_it.py +apache_beam/ml/gcp/recommendations_ai.py +apache_beam/ml/gcp/recommendations_ai_test.py +apache_beam/ml/gcp/recommendations_ai_test_it.py +apache_beam/ml/gcp/videointelligenceml.py +apache_beam/ml/gcp/videointelligenceml_test.py +apache_beam/ml/gcp/videointelligenceml_test_it.py +apache_beam/ml/gcp/visionml.py +apache_beam/ml/gcp/visionml_test.py +apache_beam/ml/gcp/visionml_test_it.py +apache_beam/ml/inference/__init__.py +apache_beam/ml/inference/base.py +apache_beam/ml/inference/base_test.py +apache_beam/ml/inference/gemini_inference.py +apache_beam/ml/inference/gemini_inference_it_test.py +apache_beam/ml/inference/gemini_inference_test.py +apache_beam/ml/inference/huggingface_inference.py +apache_beam/ml/inference/huggingface_inference_it_test.py +apache_beam/ml/inference/huggingface_inference_test.py +apache_beam/ml/inference/model_manager.py +apache_beam/ml/inference/model_manager_it_test.py +apache_beam/ml/inference/model_manager_test.py +apache_beam/ml/inference/onnx_inference.py +apache_beam/ml/inference/onnx_inference_it_test.py +apache_beam/ml/inference/onnx_inference_test.py +apache_beam/ml/inference/pytorch_inference.py +apache_beam/ml/inference/pytorch_inference_it_test.py +apache_beam/ml/inference/pytorch_inference_test.py +apache_beam/ml/inference/sklearn_inference.py +apache_beam/ml/inference/sklearn_inference_it_test.py +apache_beam/ml/inference/sklearn_inference_test.py +apache_beam/ml/inference/tensorflow_inference.py +apache_beam/ml/inference/tensorflow_inference_it_test.py +apache_beam/ml/inference/tensorflow_inference_test.py +apache_beam/ml/inference/tensorrt_inference.py +apache_beam/ml/inference/tensorrt_inference_test.py +apache_beam/ml/inference/utils.py +apache_beam/ml/inference/utils_test.py +apache_beam/ml/inference/vertex_ai_inference.py +apache_beam/ml/inference/vertex_ai_inference_it_test.py +apache_beam/ml/inference/vertex_ai_inference_test.py +apache_beam/ml/inference/vllm_inference.py +apache_beam/ml/inference/xgboost_inference.py +apache_beam/ml/inference/xgboost_inference_it_test.py +apache_beam/ml/inference/xgboost_inference_test.py +apache_beam/ml/rag/__init__.py +apache_beam/ml/rag/test_utils.py +apache_beam/ml/rag/types.py +apache_beam/ml/rag/utils.py +apache_beam/ml/rag/chunking/__init__.py +apache_beam/ml/rag/chunking/base.py +apache_beam/ml/rag/chunking/base_test.py +apache_beam/ml/rag/chunking/langchain.py +apache_beam/ml/rag/chunking/langchain_test.py +apache_beam/ml/rag/embeddings/__init__.py +apache_beam/ml/rag/embeddings/base.py +apache_beam/ml/rag/embeddings/base_test.py +apache_beam/ml/rag/embeddings/huggingface.py +apache_beam/ml/rag/embeddings/huggingface_test.py +apache_beam/ml/rag/embeddings/vertex_ai.py +apache_beam/ml/rag/embeddings/vertex_ai_test.py +apache_beam/ml/rag/enrichment/__init__.py +apache_beam/ml/rag/enrichment/bigquery_vector_search.py +apache_beam/ml/rag/enrichment/bigquery_vector_search_it_test.py +apache_beam/ml/rag/enrichment/milvus_search.py +apache_beam/ml/rag/enrichment/milvus_search_it_test.py +apache_beam/ml/rag/enrichment/milvus_search_test.py +apache_beam/ml/rag/ingestion/__init__.py +apache_beam/ml/rag/ingestion/alloydb.py +apache_beam/ml/rag/ingestion/alloydb_it_test.py +apache_beam/ml/rag/ingestion/base.py +apache_beam/ml/rag/ingestion/base_test.py +apache_beam/ml/rag/ingestion/bigquery.py +apache_beam/ml/rag/ingestion/bigquery_it_test.py +apache_beam/ml/rag/ingestion/cloudsql.py +apache_beam/ml/rag/ingestion/cloudsql_it_test.py +apache_beam/ml/rag/ingestion/jdbc_common.py +apache_beam/ml/rag/ingestion/milvus_search.py +apache_beam/ml/rag/ingestion/milvus_search_it_test.py +apache_beam/ml/rag/ingestion/milvus_search_test.py +apache_beam/ml/rag/ingestion/mysql.py +apache_beam/ml/rag/ingestion/mysql_common.py +apache_beam/ml/rag/ingestion/postgres.py +apache_beam/ml/rag/ingestion/postgres_common.py +apache_beam/ml/rag/ingestion/postgres_it_test.py +apache_beam/ml/rag/ingestion/spanner.py +apache_beam/ml/rag/ingestion/spanner_it_test.py +apache_beam/ml/rag/ingestion/test_utils.py +apache_beam/ml/transforms/__init__.py +apache_beam/ml/transforms/base.py +apache_beam/ml/transforms/base_test.py +apache_beam/ml/transforms/handlers.py +apache_beam/ml/transforms/handlers_test.py +apache_beam/ml/transforms/tft.py +apache_beam/ml/transforms/tft_test.py +apache_beam/ml/transforms/utils.py +apache_beam/ml/transforms/embeddings/__init__.py +apache_beam/ml/transforms/embeddings/huggingface.py +apache_beam/ml/transforms/embeddings/huggingface_test.py +apache_beam/ml/transforms/embeddings/open_ai.py +apache_beam/ml/transforms/embeddings/open_ai_it_test.py +apache_beam/ml/transforms/embeddings/tensorflow_hub.py +apache_beam/ml/transforms/embeddings/tensorflow_hub_test.py +apache_beam/ml/transforms/embeddings/vertex_ai.py +apache_beam/ml/transforms/embeddings/vertex_ai_it_test.py +apache_beam/ml/ts/__init__.py +apache_beam/options/__init__.py +apache_beam/options/pipeline_options.py +apache_beam/options/pipeline_options_context.py +apache_beam/options/pipeline_options_context_test.py +apache_beam/options/pipeline_options_test.py +apache_beam/options/pipeline_options_validator.py +apache_beam/options/pipeline_options_validator_test.py +apache_beam/options/value_provider.py +apache_beam/options/value_provider_test.py +apache_beam/portability/__init__.py +apache_beam/portability/common_urns.py +apache_beam/portability/python_urns.py +apache_beam/portability/utils.py +apache_beam/portability/api/__init__.py +apache_beam/portability/api/standard_coders.yaml +apache_beam/portability/api/org/__init__.py +apache_beam/portability/api/org/apache/__init__.py +apache_beam/portability/api/org/apache/beam/__init__.py +apache_beam/portability/api/org/apache/beam/model/__init__.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/__init__.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/__init__.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/interactive/__init__.py +apache_beam/portability/api/org/apache/beam/model/interactive/v1/__init__.py +apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/job_management/__init__.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/__init__.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/__init__.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/__init__.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_urns.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.pyi +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_grpc.py +apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_urns.py +apache_beam/runners/__init__.py +apache_beam/runners/common.pxd +apache_beam/runners/common.py +apache_beam/runners/common_test.py +apache_beam/runners/pipeline_context.py +apache_beam/runners/pipeline_context_test.py +apache_beam/runners/pipeline_utils.py +apache_beam/runners/pipeline_utils_test.py +apache_beam/runners/render.py +apache_beam/runners/render_test.py +apache_beam/runners/runner.py +apache_beam/runners/runner_test.py +apache_beam/runners/sdf_utils.py +apache_beam/runners/sdf_utils_test.py +apache_beam/runners/trivial_runner.py +apache_beam/runners/trivial_runner_test.py +apache_beam/runners/dask/__init__.py +apache_beam/runners/dask/dask_runner.py +apache_beam/runners/dask/dask_runner_test.py +apache_beam/runners/dask/overrides.py +apache_beam/runners/dask/transform_evaluator.py +apache_beam/runners/dataflow/__init__.py +apache_beam/runners/dataflow/dataflow_exercise_metrics_pipeline.py +apache_beam/runners/dataflow/dataflow_exercise_metrics_pipeline_test.py +apache_beam/runners/dataflow/dataflow_exercise_streaming_metrics_pipeline.py +apache_beam/runners/dataflow/dataflow_exercise_streaming_metrics_pipeline_test.py +apache_beam/runners/dataflow/dataflow_job_service.py +apache_beam/runners/dataflow/dataflow_job_service_test.py +apache_beam/runners/dataflow/dataflow_metrics.py +apache_beam/runners/dataflow/dataflow_metrics_test.py +apache_beam/runners/dataflow/dataflow_runner.py +apache_beam/runners/dataflow/dataflow_runner_test.py +apache_beam/runners/dataflow/ptransform_overrides.py +apache_beam/runners/dataflow/template_runner_test.py +apache_beam/runners/dataflow/test_dataflow_runner.py +apache_beam/runners/dataflow/internal/__init__.py +apache_beam/runners/dataflow/internal/apiclient.py +apache_beam/runners/dataflow/internal/apiclient_test.py +apache_beam/runners/dataflow/internal/names.py +apache_beam/runners/dataflow/internal/clients/__init__.py +apache_beam/runners/dataflow/internal/clients/dataflow/__init__.py +apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_client.py +apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_messages.py +apache_beam/runners/dataflow/internal/clients/dataflow/message_matchers.py +apache_beam/runners/dataflow/internal/clients/dataflow/message_matchers_test.py +apache_beam/runners/direct/__init__.py +apache_beam/runners/direct/bundle_factory.py +apache_beam/runners/direct/clock.py +apache_beam/runners/direct/consumer_tracking_pipeline_visitor.py +apache_beam/runners/direct/consumer_tracking_pipeline_visitor_test.py +apache_beam/runners/direct/direct_metrics.py +apache_beam/runners/direct/direct_metrics_test.py +apache_beam/runners/direct/direct_runner.py +apache_beam/runners/direct/direct_runner_test.py +apache_beam/runners/direct/direct_userstate.py +apache_beam/runners/direct/evaluation_context.py +apache_beam/runners/direct/executor.py +apache_beam/runners/direct/sdf_direct_runner.py +apache_beam/runners/direct/sdf_direct_runner_test.py +apache_beam/runners/direct/test_direct_runner.py +apache_beam/runners/direct/test_stream_impl.py +apache_beam/runners/direct/transform_evaluator.py +apache_beam/runners/direct/util.py +apache_beam/runners/direct/watermark_manager.py +apache_beam/runners/interactive/__init__.py +apache_beam/runners/interactive/augmented_pipeline.py +apache_beam/runners/interactive/augmented_pipeline_test.py +apache_beam/runners/interactive/background_caching_job.py +apache_beam/runners/interactive/background_caching_job_test.py +apache_beam/runners/interactive/cache_manager.py +apache_beam/runners/interactive/cache_manager_test.py +apache_beam/runners/interactive/interactive_beam.py +apache_beam/runners/interactive/interactive_beam_test.py +apache_beam/runners/interactive/interactive_environment.py +apache_beam/runners/interactive/interactive_environment_test.py +apache_beam/runners/interactive/interactive_runner.py +apache_beam/runners/interactive/interactive_runner_test.py +apache_beam/runners/interactive/non_interactive_runner_test.py +apache_beam/runners/interactive/pipeline_fragment.py +apache_beam/runners/interactive/pipeline_fragment_test.py +apache_beam/runners/interactive/pipeline_instrument.py +apache_beam/runners/interactive/pipeline_instrument_test.py +apache_beam/runners/interactive/recording_manager.py +apache_beam/runners/interactive/recording_manager_test.py +apache_beam/runners/interactive/user_pipeline_tracker.py +apache_beam/runners/interactive/user_pipeline_tracker_test.py +apache_beam/runners/interactive/utils.py +apache_beam/runners/interactive/utils_test.py +apache_beam/runners/interactive/caching/__init__.py +apache_beam/runners/interactive/caching/cacheable.py +apache_beam/runners/interactive/caching/expression_cache.py +apache_beam/runners/interactive/caching/expression_cache_test.py +apache_beam/runners/interactive/caching/read_cache.py +apache_beam/runners/interactive/caching/read_cache_test.py +apache_beam/runners/interactive/caching/reify.py +apache_beam/runners/interactive/caching/streaming_cache.py +apache_beam/runners/interactive/caching/streaming_cache_test.py +apache_beam/runners/interactive/caching/write_cache.py +apache_beam/runners/interactive/caching/write_cache_test.py +apache_beam/runners/interactive/dataproc/__init__.py +apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py +apache_beam/runners/interactive/dataproc/dataproc_cluster_manager_test.py +apache_beam/runners/interactive/dataproc/types.py +apache_beam/runners/interactive/display/__init__.py +apache_beam/runners/interactive/display/display_manager.py +apache_beam/runners/interactive/display/interactive_pipeline_graph.py +apache_beam/runners/interactive/display/pcoll_visualization.py +apache_beam/runners/interactive/display/pcoll_visualization_test.py +apache_beam/runners/interactive/display/pipeline_graph.py +apache_beam/runners/interactive/display/pipeline_graph_renderer.py +apache_beam/runners/interactive/display/pipeline_graph_test.py +apache_beam/runners/interactive/messaging/__init__.py +apache_beam/runners/interactive/messaging/interactive_environment_inspector.py +apache_beam/runners/interactive/messaging/interactive_environment_inspector_test.py +apache_beam/runners/interactive/options/__init__.py +apache_beam/runners/interactive/options/capture_control.py +apache_beam/runners/interactive/options/capture_control_test.py +apache_beam/runners/interactive/options/capture_limiters.py +apache_beam/runners/interactive/options/capture_limiters_test.py +apache_beam/runners/interactive/options/interactive_options.py +apache_beam/runners/interactive/sql/__init__.py +apache_beam/runners/interactive/sql/beam_sql_magics.py +apache_beam/runners/interactive/sql/beam_sql_magics_test.py +apache_beam/runners/interactive/sql/sql_chain.py +apache_beam/runners/interactive/sql/sql_chain_test.py +apache_beam/runners/interactive/sql/utils.py +apache_beam/runners/interactive/sql/utils_test.py +apache_beam/runners/interactive/testing/__init__.py +apache_beam/runners/interactive/testing/mock_env.py +apache_beam/runners/interactive/testing/mock_ipython.py +apache_beam/runners/interactive/testing/pipeline_assertion.py +apache_beam/runners/interactive/testing/test_cache_manager.py +apache_beam/runners/interactive/testing/integration/__init__.py +apache_beam/runners/interactive/testing/integration/notebook_executor.py +apache_beam/runners/interactive/testing/integration/screen_diff.py +apache_beam/runners/internal/__init__.py +apache_beam/runners/internal/names.py +apache_beam/runners/job/__init__.py +apache_beam/runners/job/manager.py +apache_beam/runners/job/utils.py +apache_beam/runners/portability/__init__.py +apache_beam/runners/portability/abstract_job_service.py +apache_beam/runners/portability/artifact_service.py +apache_beam/runners/portability/artifact_service_test.py +apache_beam/runners/portability/expansion_service.py +apache_beam/runners/portability/expansion_service_main.py +apache_beam/runners/portability/expansion_service_test.py +apache_beam/runners/portability/flink_runner.py +apache_beam/runners/portability/flink_runner_test.py +apache_beam/runners/portability/flink_uber_jar_job_server.py +apache_beam/runners/portability/flink_uber_jar_job_server_test.py +apache_beam/runners/portability/job_server.py +apache_beam/runners/portability/job_server_test.py +apache_beam/runners/portability/local_job_service.py +apache_beam/runners/portability/local_job_service_main.py +apache_beam/runners/portability/local_job_service_test.py +apache_beam/runners/portability/portable_metrics.py +apache_beam/runners/portability/portable_runner.py +apache_beam/runners/portability/portable_runner_test.py +apache_beam/runners/portability/prism_runner.py +apache_beam/runners/portability/prism_runner_test.py +apache_beam/runners/portability/requirements_cache_it_test.py +apache_beam/runners/portability/samza_runner_test.py +apache_beam/runners/portability/sdk_container_builder.py +apache_beam/runners/portability/sdk_container_builder_test.py +apache_beam/runners/portability/spark_java_job_server_test.py +apache_beam/runners/portability/spark_runner.py +apache_beam/runners/portability/spark_runner_test.py +apache_beam/runners/portability/spark_uber_jar_job_server.py +apache_beam/runners/portability/spark_uber_jar_job_server_test.py +apache_beam/runners/portability/stager.py +apache_beam/runners/portability/stager_test.py +apache_beam/runners/portability/fn_api_runner/__init__.py +apache_beam/runners/portability/fn_api_runner/execution.py +apache_beam/runners/portability/fn_api_runner/fn_runner.py +apache_beam/runners/portability/fn_api_runner/fn_runner_test.py +apache_beam/runners/portability/fn_api_runner/translations.py +apache_beam/runners/portability/fn_api_runner/translations_test.py +apache_beam/runners/portability/fn_api_runner/trigger_manager.py +apache_beam/runners/portability/fn_api_runner/trigger_manager_test.py +apache_beam/runners/portability/fn_api_runner/visualization_tools.py +apache_beam/runners/portability/fn_api_runner/watermark_manager.py +apache_beam/runners/portability/fn_api_runner/worker_handlers.py +apache_beam/runners/portability/fn_api_runner/worker_handlers_test.py +apache_beam/runners/test/__init__.py +apache_beam/runners/worker/__init__.py +apache_beam/runners/worker/bundle_processor.py +apache_beam/runners/worker/bundle_processor_test.py +apache_beam/runners/worker/channel_factory.py +apache_beam/runners/worker/crossplatform_time.h +apache_beam/runners/worker/crossplatform_unistd.h +apache_beam/runners/worker/data_plane.py +apache_beam/runners/worker/data_plane_test.py +apache_beam/runners/worker/data_sampler.py +apache_beam/runners/worker/data_sampler_test.py +apache_beam/runners/worker/log_handler.py +apache_beam/runners/worker/log_handler_test.py +apache_beam/runners/worker/logger.py +apache_beam/runners/worker/logger_test.py +apache_beam/runners/worker/opcounters.pxd +apache_beam/runners/worker/opcounters.py +apache_beam/runners/worker/opcounters_test.py +apache_beam/runners/worker/operation_specs.py +apache_beam/runners/worker/operations.pxd +apache_beam/runners/worker/operations.py +apache_beam/runners/worker/sdk_worker.py +apache_beam/runners/worker/sdk_worker_main.py +apache_beam/runners/worker/sdk_worker_main_test.py +apache_beam/runners/worker/sdk_worker_test.py +apache_beam/runners/worker/sideinputs.py +apache_beam/runners/worker/sideinputs_test.py +apache_beam/runners/worker/statecache.py +apache_beam/runners/worker/statecache_test.py +apache_beam/runners/worker/statesampler.py +apache_beam/runners/worker/statesampler_fast.pxd +apache_beam/runners/worker/statesampler_fast.pyx +apache_beam/runners/worker/statesampler_slow.py +apache_beam/runners/worker/statesampler_test.py +apache_beam/runners/worker/worker_id_interceptor.py +apache_beam/runners/worker/worker_id_interceptor_test.py +apache_beam/runners/worker/worker_pool_main.py +apache_beam/runners/worker/worker_status.py +apache_beam/runners/worker/worker_status_test.py +apache_beam/testing/__init__.py +apache_beam/testing/datatype_inference.py +apache_beam/testing/datatype_inference_test.py +apache_beam/testing/extra_assertions.py +apache_beam/testing/extra_assertions_test.py +apache_beam/testing/fast_test_utils.pxd +apache_beam/testing/fast_test_utils.pyx +apache_beam/testing/metric_result_matchers.py +apache_beam/testing/metric_result_matchers_test.py +apache_beam/testing/pipeline_verifiers.py +apache_beam/testing/pipeline_verifiers_test.py +apache_beam/testing/synthetic_pipeline.py +apache_beam/testing/synthetic_pipeline_test.py +apache_beam/testing/test_pipeline.py +apache_beam/testing/test_pipeline_test.py +apache_beam/testing/test_stream.py +apache_beam/testing/test_stream_it_test.py +apache_beam/testing/test_stream_service.py +apache_beam/testing/test_stream_service_test.py +apache_beam/testing/test_stream_test.py +apache_beam/testing/test_utils.py +apache_beam/testing/test_utils_test.py +apache_beam/testing/util.py +apache_beam/testing/util_test.py +apache_beam/testing/analyzers/__init__.py +apache_beam/testing/analyzers/constants.py +apache_beam/testing/analyzers/github_issues_utils.py +apache_beam/testing/analyzers/load_test_perf_analysis.py +apache_beam/testing/analyzers/perf_analysis.py +apache_beam/testing/analyzers/perf_analysis_test.py +apache_beam/testing/analyzers/perf_analysis_utils.py +apache_beam/testing/benchmarks/__init__.py +apache_beam/testing/benchmarks/chicago_taxi/__init__.py +apache_beam/testing/benchmarks/chicago_taxi/preprocess.py +apache_beam/testing/benchmarks/chicago_taxi/process_tfma.py +apache_beam/testing/benchmarks/chicago_taxi/setup.py +apache_beam/testing/benchmarks/chicago_taxi/tfdv_analyze_and_validate.py +apache_beam/testing/benchmarks/chicago_taxi/trainer/__init__.py +apache_beam/testing/benchmarks/chicago_taxi/trainer/model.py +apache_beam/testing/benchmarks/chicago_taxi/trainer/task.py +apache_beam/testing/benchmarks/chicago_taxi/trainer/taxi.py +apache_beam/testing/benchmarks/cloudml/__init__.py +apache_beam/testing/benchmarks/cloudml/cloudml_benchmark_constants_lib.py +apache_beam/testing/benchmarks/cloudml/cloudml_benchmark_test.py +apache_beam/testing/benchmarks/cloudml/criteo_tft/__init__.py +apache_beam/testing/benchmarks/cloudml/criteo_tft/criteo.py +apache_beam/testing/benchmarks/cloudml/pipelines/__init__.py +apache_beam/testing/benchmarks/cloudml/pipelines/workflow.py +apache_beam/testing/benchmarks/inference/__init__.py +apache_beam/testing/benchmarks/inference/pytorch_image_classification_benchmarks.py +apache_beam/testing/benchmarks/inference/pytorch_language_modeling_benchmarks.py +apache_beam/testing/benchmarks/inference/pytorch_sentiment_benchmarks.py +apache_beam/testing/benchmarks/inference/tensorflow_mnist_classification_cost_benchmark.py +apache_beam/testing/benchmarks/inference/vllm_gemma_benchmarks.py +apache_beam/testing/benchmarks/nexmark/__init__.py +apache_beam/testing/benchmarks/nexmark/monitor.py +apache_beam/testing/benchmarks/nexmark/nexmark_launcher.py +apache_beam/testing/benchmarks/nexmark/nexmark_perf.py +apache_beam/testing/benchmarks/nexmark/nexmark_util.py +apache_beam/testing/benchmarks/nexmark/models/__init__.py +apache_beam/testing/benchmarks/nexmark/models/auction_bid.py +apache_beam/testing/benchmarks/nexmark/models/field_name.py +apache_beam/testing/benchmarks/nexmark/models/nexmark_model.py +apache_beam/testing/benchmarks/nexmark/queries/__init__.py +apache_beam/testing/benchmarks/nexmark/queries/nexmark_query_util.py +apache_beam/testing/benchmarks/nexmark/queries/query0.py +apache_beam/testing/benchmarks/nexmark/queries/query1.py +apache_beam/testing/benchmarks/nexmark/queries/query10.py +apache_beam/testing/benchmarks/nexmark/queries/query11.py +apache_beam/testing/benchmarks/nexmark/queries/query12.py +apache_beam/testing/benchmarks/nexmark/queries/query2.py +apache_beam/testing/benchmarks/nexmark/queries/query3.py +apache_beam/testing/benchmarks/nexmark/queries/query4.py +apache_beam/testing/benchmarks/nexmark/queries/query5.py +apache_beam/testing/benchmarks/nexmark/queries/query6.py +apache_beam/testing/benchmarks/nexmark/queries/query7.py +apache_beam/testing/benchmarks/nexmark/queries/query8.py +apache_beam/testing/benchmarks/nexmark/queries/query9.py +apache_beam/testing/benchmarks/nexmark/queries/winning_bids.py +apache_beam/testing/benchmarks/wordcount/__init__.py +apache_beam/testing/benchmarks/wordcount/wordcount.py +apache_beam/testing/data/trigger_transcripts.yaml +apache_beam/testing/load_tests/__init__.py +apache_beam/testing/load_tests/co_group_by_key_test.py +apache_beam/testing/load_tests/combine_test.py +apache_beam/testing/load_tests/dataflow_cost_benchmark.py +apache_beam/testing/load_tests/dataflow_cost_consts.py +apache_beam/testing/load_tests/group_by_key_test.py +apache_beam/testing/load_tests/load_test.py +apache_beam/testing/load_tests/load_test_metrics_utils.py +apache_beam/testing/load_tests/microbenchmarks_test.py +apache_beam/testing/load_tests/pardo_test.py +apache_beam/testing/load_tests/sideinput_test.py +apache_beam/tools/__init__.py +apache_beam/tools/coders_microbenchmark.py +apache_beam/tools/distribution_counter_microbenchmark.py +apache_beam/tools/fn_api_runner_microbenchmark.py +apache_beam/tools/map_fn_microbenchmark.py +apache_beam/tools/microbenchmarks_test.py +apache_beam/tools/runtime_type_check_microbenchmark.py +apache_beam/tools/sideinput_microbenchmark.py +apache_beam/tools/teststream_microbenchmark.py +apache_beam/tools/utils.py +apache_beam/transforms/__init__.py +apache_beam/transforms/async_dofn.py +apache_beam/transforms/async_dofn_test.py +apache_beam/transforms/batch_dofn_test.py +apache_beam/transforms/combinefn_lifecycle_pipeline.py +apache_beam/transforms/combinefn_lifecycle_test.py +apache_beam/transforms/combiners.py +apache_beam/transforms/combiners_test.py +apache_beam/transforms/core.py +apache_beam/transforms/core_it_test.py +apache_beam/transforms/core_test.py +apache_beam/transforms/create_source.py +apache_beam/transforms/create_test.py +apache_beam/transforms/cy_combiners.pxd +apache_beam/transforms/cy_combiners.py +apache_beam/transforms/cy_dataflow_distribution_counter.pxd +apache_beam/transforms/cy_dataflow_distribution_counter.pyx +apache_beam/transforms/dataflow_distribution_counter_test.py +apache_beam/transforms/deduplicate.py +apache_beam/transforms/deduplicate_test.py +apache_beam/transforms/display.py +apache_beam/transforms/display_test.py +apache_beam/transforms/dofn_lifecycle_test.py +apache_beam/transforms/enrichment.py +apache_beam/transforms/enrichment_it_test.py +apache_beam/transforms/enrichment_test.py +apache_beam/transforms/environments.py +apache_beam/transforms/environments_test.py +apache_beam/transforms/error_handling.py +apache_beam/transforms/error_handling_test.py +apache_beam/transforms/external.py +apache_beam/transforms/external_it_test.py +apache_beam/transforms/external_java.py +apache_beam/transforms/external_test.py +apache_beam/transforms/external_transform_provider.py +apache_beam/transforms/external_transform_provider_it_test.py +apache_beam/transforms/fully_qualified_named_transform.py +apache_beam/transforms/fully_qualified_named_transform_test.py +apache_beam/transforms/managed.py +apache_beam/transforms/managed_iceberg_it_test.py +apache_beam/transforms/maven_repository_url_test.py +apache_beam/transforms/periodicsequence.py +apache_beam/transforms/periodicsequence_it_test.py +apache_beam/transforms/periodicsequence_test.py +apache_beam/transforms/ptransform.py +apache_beam/transforms/ptransform_test.py +apache_beam/transforms/py_dataflow_distribution_counter.py +apache_beam/transforms/resources.py +apache_beam/transforms/resources_test.py +apache_beam/transforms/sideinputs.py +apache_beam/transforms/sideinputs_test.py +apache_beam/transforms/sql.py +apache_beam/transforms/sql_test.py +apache_beam/transforms/stats.pxd +apache_beam/transforms/stats.py +apache_beam/transforms/stats_test.py +apache_beam/transforms/timestamped_value_type_test.py +apache_beam/transforms/timeutil.py +apache_beam/transforms/transforms_keyword_only_args_test.py +apache_beam/transforms/trigger.py +apache_beam/transforms/trigger_test.py +apache_beam/transforms/userstate.py +apache_beam/transforms/userstate_test.py +apache_beam/transforms/util.py +apache_beam/transforms/util_test.py +apache_beam/transforms/validate_runner_xlang_test.py +apache_beam/transforms/window.py +apache_beam/transforms/window_test.py +apache_beam/transforms/write_ptransform_test.py +apache_beam/transforms/enrichment_handlers/__init__.py +apache_beam/transforms/enrichment_handlers/bigquery.py +apache_beam/transforms/enrichment_handlers/bigquery_it_test.py +apache_beam/transforms/enrichment_handlers/bigquery_test.py +apache_beam/transforms/enrichment_handlers/bigtable.py +apache_beam/transforms/enrichment_handlers/bigtable_it_test.py +apache_beam/transforms/enrichment_handlers/bigtable_test.py +apache_beam/transforms/enrichment_handlers/cloudsql.py +apache_beam/transforms/enrichment_handlers/cloudsql_it_test.py +apache_beam/transforms/enrichment_handlers/cloudsql_test.py +apache_beam/transforms/enrichment_handlers/feast_feature_store.py +apache_beam/transforms/enrichment_handlers/feast_feature_store_it_test.py +apache_beam/transforms/enrichment_handlers/feast_feature_store_test.py +apache_beam/transforms/enrichment_handlers/utils.py +apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py +apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store_it_test.py +apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store_test.py +apache_beam/transforms/xlang/__init__.py +apache_beam/transforms/xlang/io.py +apache_beam/typehints/__init__.py +apache_beam/typehints/arrow_batching_microbenchmark.py +apache_beam/typehints/arrow_type_compatibility.py +apache_beam/typehints/arrow_type_compatibility_test.py +apache_beam/typehints/batch.py +apache_beam/typehints/batch_test.py +apache_beam/typehints/decorators.py +apache_beam/typehints/decorators_test.py +apache_beam/typehints/intrinsic_one_ops.py +apache_beam/typehints/intrinsic_one_ops_test.py +apache_beam/typehints/native_type_compatibility.py +apache_beam/typehints/native_type_compatibility_test.py +apache_beam/typehints/opcodes.py +apache_beam/typehints/pandas_type_compatibility.py +apache_beam/typehints/pandas_type_compatibility_test.py +apache_beam/typehints/pytorch_type_compatibility.py +apache_beam/typehints/pytorch_type_compatibility_test.py +apache_beam/typehints/row_type.py +apache_beam/typehints/row_type_test.py +apache_beam/typehints/schema_registry.py +apache_beam/typehints/schemas.py +apache_beam/typehints/schemas_test.py +apache_beam/typehints/sharded_key_type.py +apache_beam/typehints/sharded_key_type_test.py +apache_beam/typehints/tagged_output_typehints_test.py +apache_beam/typehints/trivial_inference.py +apache_beam/typehints/trivial_inference_test.py +apache_beam/typehints/typecheck.py +apache_beam/typehints/typecheck_test.py +apache_beam/typehints/typed_pipeline_test.py +apache_beam/typehints/typehints.py +apache_beam/typehints/typehints_test.py +apache_beam/typehints/testing/__init__.py +apache_beam/typehints/testing/strategies.py +apache_beam/utils/__init__.py +apache_beam/utils/annotations.py +apache_beam/utils/annotations_test.py +apache_beam/utils/counters.pxd +apache_beam/utils/counters.py +apache_beam/utils/counters_test.py +apache_beam/utils/histogram.py +apache_beam/utils/histogram_test.py +apache_beam/utils/interactive_utils.py +apache_beam/utils/interactive_utils_test.py +apache_beam/utils/logger.py +apache_beam/utils/logger_test.py +apache_beam/utils/multi_process_shared.py +apache_beam/utils/multi_process_shared_test.py +apache_beam/utils/plugin.py +apache_beam/utils/processes.py +apache_beam/utils/processes_test.py +apache_beam/utils/profiler.py +apache_beam/utils/profiler_test.py +apache_beam/utils/proto_utils.py +apache_beam/utils/proto_utils_test.py +apache_beam/utils/python_callable.py +apache_beam/utils/python_callable_test.py +apache_beam/utils/retry.py +apache_beam/utils/retry_test.py +apache_beam/utils/sentinel.py +apache_beam/utils/sharded_key.py +apache_beam/utils/shared.py +apache_beam/utils/shared_test.py +apache_beam/utils/subprocess_server.py +apache_beam/utils/subprocess_server_test.py +apache_beam/utils/thread_pool_executor.py +apache_beam/utils/thread_pool_executor_test.py +apache_beam/utils/timestamp.py +apache_beam/utils/timestamp_test.py +apache_beam/utils/transform_service_launcher.py +apache_beam/utils/urns.py +apache_beam/utils/windowed_value.pxd +apache_beam/utils/windowed_value.py +apache_beam/utils/windowed_value_test.py +apache_beam/yaml/__init__.py +apache_beam/yaml/cache_provider_artifacts.py +apache_beam/yaml/conftest.py +apache_beam/yaml/generate_yaml_docs.py +apache_beam/yaml/integration_tests.py +apache_beam/yaml/json_utils.py +apache_beam/yaml/json_utils_test.py +apache_beam/yaml/main.py +apache_beam/yaml/main_test.py +apache_beam/yaml/options.py +apache_beam/yaml/pipeline.schema.yaml +apache_beam/yaml/programming_guide_test.py +apache_beam/yaml/readme_test.py +apache_beam/yaml/standard_io.yaml +apache_beam/yaml/standard_providers.yaml +apache_beam/yaml/yaml_combine.py +apache_beam/yaml/yaml_combine_test.py +apache_beam/yaml/yaml_enrichment.py +apache_beam/yaml/yaml_enrichment_test.py +apache_beam/yaml/yaml_errors.py +apache_beam/yaml/yaml_io.py +apache_beam/yaml/yaml_io_test.py +apache_beam/yaml/yaml_join.py +apache_beam/yaml/yaml_join_test.py +apache_beam/yaml/yaml_mapping.py +apache_beam/yaml/yaml_mapping_test.py +apache_beam/yaml/yaml_ml.py +apache_beam/yaml/yaml_ml_test.py +apache_beam/yaml/yaml_provider.py +apache_beam/yaml/yaml_provider_unit_test.py +apache_beam/yaml/yaml_specifiable.py +apache_beam/yaml/yaml_specifiable_test.py +apache_beam/yaml/yaml_testing.py +apache_beam/yaml/yaml_testing_test.py +apache_beam/yaml/yaml_transform.py +apache_beam/yaml/yaml_transform_scope_test.py +apache_beam/yaml/yaml_transform_test.py +apache_beam/yaml/yaml_transform_unit_test.py +apache_beam/yaml/yaml_udf_test.py +apache_beam/yaml/yaml_utils.py +apache_beam/yaml/yaml_utils_test.py +apache_beam/yaml/docs/yaml-combine.md +apache_beam/yaml/docs/yaml-errors.md +apache_beam/yaml/docs/yaml-inline-python.md +apache_beam/yaml/docs/yaml-join.md +apache_beam/yaml/docs/yaml-providers.md +apache_beam/yaml/docs/yaml-schema.md +apache_beam/yaml/docs/yaml-testing.md +apache_beam/yaml/docs/yaml-udf.md +apache_beam/yaml/docs/yaml.md +apache_beam/yaml/examples/__init__.py +apache_beam/yaml/examples/testing/__init__.py +apache_beam/yaml/examples/testing/examples_test.py +apache_beam/yaml/examples/testing/input_data.py \ No newline at end of file diff --git a/sdks/python/apache_beam.egg-info/dependency_links.txt b/sdks/python/apache_beam.egg-info/dependency_links.txt new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/sdks/python/apache_beam.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/sdks/python/apache_beam.egg-info/not-zip-safe b/sdks/python/apache_beam.egg-info/not-zip-safe new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/sdks/python/apache_beam.egg-info/not-zip-safe @@ -0,0 +1 @@ + diff --git a/sdks/python/apache_beam.egg-info/requires.txt b/sdks/python/apache_beam.egg-info/requires.txt new file mode 100644 index 000000000000..878544061085 --- /dev/null +++ b/sdks/python/apache_beam.egg-info/requires.txt @@ -0,0 +1,272 @@ +cryptography<48.0.0,>=39.0.0 +fastavro<2,>=0.23.6 +fasteners<1.0,>=0.3 +grpcio!=1.48.0,!=1.59.*,!=1.60.*,!=1.61.*,!=1.62.0,!=1.62.1,!=1.66.*,!=1.67.*,!=1.68.*,!=1.69.*,!=1.70.*,<2,>=1.33.1 +httplib2<0.32.0,>=0.8 +jsonpickle<4.0.0,>=3.0.0 +numpy<2.5.0,>=1.14.3 +objsize<0.8.0,>=0.6.1 +packaging>=22.0 +pillow<13,>=12.1.1 +pymongo<5.0.0,>=3.8.0 +proto-plus<2,>=1.7.1 +protobuf!=4.0.*,!=4.21.*,!=4.22.0,!=4.23.*,!=4.24.*,<7.0.0.dev0,>=3.20.3 +python-dateutil<3,>=2.8.0 +pytz>=2018.3 +requests<3.0.0,>=2.32.4 +sortedcontainers>=2.4.0 +typing-extensions>=3.7.0 +zstandard<1,>=0.18.0 +pyyaml<7.0.0,>=3.12 +beartype<0.23.0,>=0.21.0 +pyarrow<24.0.0,>=6.0.1 +pyarrow-hotfix<1 + +[:python_version < "3.11"] +envoy-data-plane<0.3.0 + +[:python_version >= "3.11"] +envoy-data-plane<2,>=1.0.3 + +[aws] +boto3<2,>=1.9 + +[azure] +azure-storage-blob<13,>=12.3.2 +azure-core<2,>=1.7.0 +azure-identity<2,>=1.12.0 + +[dask] +distributed>=2024.4.2 +dask>=2024.4.2 + +[dataframe] +pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3 + +[dill] +dill<0.3.2,>=0.3.1.1 + +[docs] +jinja2<3.2,>=3.0 +Sphinx<8.0,>=7.0.0 +docstring-parser<1.0,>=0.15 +docutils>=0.18.1 +markdown +pandas<2.3.0 +openai +virtualenv-clone<1.0,>=0.5 + +[gcp] +cachetools<7,>=3.1.0 +google-api-core<3,>=2.0.0 +google-auth<3,>=1.18.0 +google-auth-httplib2<0.3.0,>=0.1.0 +google-cloud-datastore<3,>=2.0.0 +google-cloud-pubsub<3,>=2.1.0 +google-cloud-storage<3,>=2.18.2 +google-cloud-bigquery<4,>=2.0.0 +google-cloud-bigquery-storage<3,>=2.6.3 +google-cloud-core<3,>=2.0.0 +google-cloud-bigtable<3,>=2.19.0 +google-cloud-build<4,>=3.35.0 +google-cloud-spanner<4,>=3.0.0 +google-cloud-dlp<4,>=3.0.0 +google-cloud-kms<4,>=3.0.0 +google-cloud-language<3,>=2.0 +google-cloud-secret-manager<3,>=2.0 +google-cloud-videointelligence<3,>=2.0 +google-cloud-vision<4,>=2 +google-cloud-recommendations-ai<0.11.0,>=0.1.0 +google-cloud-aiplatform<2.0,>=1.26.0 +cloud-sql-python-connector<2.0.0,>=1.18.2 +python-tds>=1.16.1 +pg8000>=1.31.5 +PyMySQL>=1.1.0 +keyrings.google-artifactregistry-auth +orjson<4,>=3.9.7 +regex>=2020.6.8 + +[gcp:python_version < "3.13"] +google-apitools<0.5.32,>=0.5.31 + +[gcp:python_version >= "3.13"] +google-apitools>=0.5.35 + +[hadoop] +hdfs<3.0.0,>=2.1.0 + +[interactive] +facets-overview<2,>=1.1.0 +google-cloud-dataproc<6,>=5.0.0 +ipython<9,>=7 +ipykernel<7,>=6 +ipywidgets<9,>=8 +jupyter-client!=6.1.13,<8.2.1,>=6.1.11 +pydot<2,>=1.2.0 +timeloop<2,>=1.0.2 +nbformat<6,>=5.0.5 +nbconvert<8,>=6.2.0 +pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3 + +[interactive_test] +needle<1,>=0.5.0 +chromedriver-binary<118,>=117 +pillow<10,>=7.1.1 +urllib3<2,>=1.21.1 + +[milvus] +pymilvus<3.0.0,>=2.5.10 + +[ml_cpu] +tensorflow>=2.12.0 +torch==2.8.0+cpu +transformers<4.56.0,>=4.28.0 +absl-py>=0.12.0 + +[ml_test] +datatable +dill +tensorflow_transform<1.15.0,>=1.14.0 +numpy<2 +embeddings>=0.0.4 +onnxruntime +langchain +sentence-transformers>=2.2.2 +skl2onnx +pyod>=0.7.6 +tensorflow +absl-py>=0.12.0 +tensorflow-hub +tf2onnx +torch +transformers + +[ml_test:python_version < "3.11"] +protobuf<4 + +[onnx] +onnxruntime==1.13.1 +torch==1.13.1 +tensorflow==2.11.0 +tf2onnx==1.13.0 +skl2onnx==1.13 +transformers==4.25.1 +absl-py>=0.12.0 + +[p310_ml_test] +datatable +embeddings>=0.0.4 +onnxruntime +langchain +sentence-transformers>=2.2.2 +skl2onnx +pyod>=0.7.6 +tensorflow +absl-py>=0.12.0 +tensorflow-hub +tf2onnx +torch +transformers + +[p312_ml_test] +datatable +embeddings>=0.0.4 +onnxruntime +langchain +sentence-transformers>=2.2.2 +skl2onnx +pyod>=0.7.6 +tensorflow +absl-py>=0.12.0 +tensorflow-hub +tf2onnx +torch +transformers + +[p313_ml_test] +embeddings>=0.0.4 +onnxruntime +langchain +sentence-transformers>=2.2.2 +skl2onnx +pyod>=0.7.6 +tensorflow +absl-py>=0.12.0 +tensorflow-hub +tf2onnx +torch +transformers +pymilvus<3.0.0,>=2.5.10 + +[redis] +redis<6,>=5.0.0 + +[tensorflow] +tensorflow<2.21,>=2.12rc1 +absl-py>=0.12.0 + +[tensorflow-hub] +tensorflow-hub<0.16.0,>=0.14.0 + +[test] +cloud-sql-python-connector[pg8000]<2.0.0,>=1.0.0 +docstring-parser<1.0,>=0.15 +freezegun>=0.3.12 +jinja2<3.2,>=3.0 +joblib>=1.0.1 +mock<6.0.0,>=1.0.1 +pandas<2.3.0 +parameterized<0.10.0,>=0.7.1 +pyhamcrest!=1.10.0,<3.0.0,>=1.9 +requests_mock<2.0,>=1.7 +tenacity<9,>=8.0.0 +pytest<9.0,>=7.1.2 +pytest-xdist<4,>=2.5.0 +pytest-timeout<3,>=2.1.0 +scikit-learn<1.8.0,>=0.20.0 +sqlalchemy<3.0,>=1.3 +psycopg2-binary<3.0,>=2.8.5 +testcontainers[kafka,milvus,mysql]<5.0.0,>=4.0.0 +cryptography>=41.0.2 +hypothesis<6.148.4,>5.0.0 +virtualenv-clone<1.0,>=0.5 +python-tds>=1.16.1 +sqlalchemy-pytds>=1.0.2 +pg8000>=1.31.5 +PyMySQL>=1.1.0 +oracledb>=3.1.1 + +[tfrecord] +crcmod<2.0,>=1.7 + +[tft] +tensorflow_transform<1.15.0,>=1.14.0 +numpy<2 +dill + +[torch] +torch<2.8.0,>=1.9.0 + +[transformers] +transformers<4.56.0,>=4.28.0 +tensorflow>=2.12.0 +torch>=1.9.0 + +[vllm] +openai==1.107.1 +vllm==0.10.1.1 +triton==3.3.1 + +[xgboost] +xgboost<2.1.3,>=1.6.0 +datatable==1.0.0 + +[yaml] +docstring-parser<1.0,>=0.15 +jinja2<3.2,>=3.0 +virtualenv-clone<1.0,>=0.5 +jsonschema<5.0.0,>=4.0.0 +pandas!=1.5.0,!=1.5.1,<2.3,>=1.4.3 + +[yaml:python_version < "3.12"] +js2py<1,>=0.74 diff --git a/sdks/python/apache_beam.egg-info/top_level.txt b/sdks/python/apache_beam.egg-info/top_level.txt new file mode 100644 index 000000000000..9ac90b8ed7d7 --- /dev/null +++ b/sdks/python/apache_beam.egg-info/top_level.txt @@ -0,0 +1 @@ +apache_beam diff --git a/sdks/python/apache_beam/coders/coder_impl.c b/sdks/python/apache_beam/coders/coder_impl.c new file mode 100644 index 000000000000..af4108253ae0 --- /dev/null +++ b/sdks/python/apache_beam/coders/coder_impl.c @@ -0,0 +1,133568 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.coders.coder_impl", + "sources": [ + "apache_beam/coders/coder_impl.py" + ] + }, + "module_name": "apache_beam.coders.coder_impl" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__coders__coder_impl +#define __PYX_HAVE_API__apache_beam__coders__coder_impl +/* Early includes */ +#include +#include +#include +#include +#include "math.h" +#include "pythread.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/coders/coder_impl.py", + "", + "apache_beam/coders/coder_impl.pxd", + "cpython/type.pxd", + "apache_beam/coders/stream.pxd", + "apache_beam/utils/windowed_value.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* BufferFormatStructs.proto */ +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + const struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + const __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + const __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + +/* MemviewSliceStruct.proto */ +struct __pyx_memoryview_obj; +typedef struct { + struct __pyx_memoryview_obj *memview; + char *data; + Py_ssize_t shape[8]; + Py_ssize_t strides[8]; + Py_ssize_t suboffsets[8]; +} __Pyx_memviewslice; +#define __Pyx_MemoryView_Len(m) (m.shape[0]) +#define __Pyx_MEMVIEW_DIRECT 1 +#define __Pyx_MEMVIEW_PTR 2 +#define __Pyx_MEMVIEW_FULL 4 +#define __Pyx_MEMVIEW_CONTIG 8 +#define __Pyx_MEMVIEW_STRIDED 16 +#define __Pyx_MEMVIEW_FOLLOW 32 +#define __Pyx_IS_C_CONTIG 1 +#define __Pyx_IS_F_CONTIG 2 +#define __Pyx_MEMSLICE_INIT { 0, 0, { 0 }, { 0 }, { 0 } } +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr; +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr; +struct __pyx_array_obj; +struct __pyx_MemviewEnum_obj; +struct __pyx_memoryview_obj; +struct __pyx_memoryviewslice_obj; +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all; + +/* "stream.pxd":26 + * cdef size_t pos + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_byte(self, unsigned char val) + * cpdef write_var_int64(self, libc.stdint.int64_t v) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":46 + * cdef size_t count + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_var_int64(self, libc.stdint.int64_t val) + * cpdef write_var_int32(self, libc.stdint.int64_t val) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":74 + * cpdef double read_bigendian_double(self) except? -1 + * cpdef float read_bigendian_float(self) except? -1 + * cpdef bytes read_all(self, bint nested=*) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all { + int __pyx_n; + int nested; +}; +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create; + +/* "windowed_value.pxd":55 + * + * @cython.locals(wv=WindowedValue) + * cpdef WindowedValue create( # <<<<<<<<<<<<<< + * object value, int64_t timestamp_micros, object windows, object pane_info=*) + * +*/ +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create { + int __pyx_n; + PyObject *pane_info; +}; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size; + +/* "apache_beam/coders/coder_impl.pxd":30 + * libc.stdint.int64_t abs "llabs"(libc.stdint.int64_t) + * + * ctypedef char* char_ptr # <<<<<<<<<<<<<< + * + * from .stream cimport InputStream, OutputStream +*/ +typedef char *__pyx_t_11apache_beam_6coders_10coder_impl_char_ptr; + +/* "apache_beam/coders/coder_impl.pxd":49 + * cpdef bytes encode_nested(self, value) + * cpdef decode_nested(self, bytes encoded) + * cpdef estimate_size(self, value, bint nested=?) # <<<<<<<<<<<<<< + * @cython.locals(varint_size=int, bits=libc.stdint.uint64_t) + * @cython.overflowcheck(False) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":53 + * @cython.overflowcheck(False) + * cpdef int _get_nested_size(self, int inner_size, bint nested) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":159 + * + * @cython.locals(c=CoderImpl) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":210 + * @cython.locals(typed_value=windowed_value._IntervalWindowBase, + * span_millis=libc.stdint.int64_t) + * cpdef estimate_size(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":255 + * + * @cython.locals(c=CoderImpl) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * @cython.locals(timestamp=libc.stdint.int64_t) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":245 + * return self.decode_from_stream(create_InputStream(encoded), False) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":284 + * return self._decoder(encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return self._get_nested_size(self._size_estimator(value), nested) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":288 + * return self._get_nested_size(self._size_estimator(value), nested) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":393 + * _ITERABLE_LIKE_TYPES.add(t) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":738 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # Note that booleans are encoded the same way regardless of nesting. + * return 1 +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":791 + * return result + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":847 + * return in_stream.read_bigendian_int16() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A short is encoded as 2 bytes, regardless of nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":863 + * return in_stream.read_bigendian_float() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A float is encoded as 4 bytes, regardless of nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":879 + * return in_stream.read_bigendian_double() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A double is encoded as 8 bytes, regardless of nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":961 + * return Timestamp(micros=millis * 1000) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of + * # nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1055 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1092 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1120 + * return self._value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return 0 +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1158 + * ]) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1361 + * return self._construct_from_sequence(elements) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1369 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1531 + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1699 + * value, self._timestamp, self._windows, self._pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.py":1734 + * return self._value_coder.decode(in_stream.read(value_length)) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":21 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * cdef char* data + * cdef size_t buffer_size +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtab; + char *data; + size_t buffer_size; + size_t pos; +}; + + +/* "stream.pxd":43 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * cdef size_t count + * +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t count; +}; + + +/* "stream.pxd":58 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * cdef size_t pos + * cdef bytes all +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtab; + size_t pos; + PyObject *all; + char *allc; +}; + + +/* "windowed_value.pxd":27 + * cdef list _BYTE_TO_PANE_INFO + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class PaneInfo(object): + * cdef readonly bint _is_first +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo { + PyObject_HEAD + int _is_first; + int _is_last; + int _timing; + int _index; + int _nonspeculative_index; + unsigned char _encoded_byte; +}; + + +/* "windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab; + PyObject *value; + PyObject *windows; + PyObject *pane_info; + int64_t timestamp_micros; + PyObject *timestamp_object; +}; + + +/* "windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab; +}; + + +/* "windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv; +}; + + +/* "windowed_value.pxd":59 + * + * + * cdef class _IntervalWindowBase(object): # <<<<<<<<<<<<<< + * cdef object _start_object + * cdef readonly int64_t _start_micros +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase { + PyObject_HEAD + PyObject *_start_object; + int64_t _start_micros; + PyObject *_end_object; + int64_t _end_micros; +}; + + +/* "apache_beam/coders/coder_impl.pxd":42 + * cdef bint is_compiled + * + * cdef class CoderImpl(object): # <<<<<<<<<<<<<< + * cpdef encode_to_stream(self, value, OutputStream stream, bint nested) + * cpdef decode_from_stream(self, InputStream stream, bint nested) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtab; +}; + + +/* "apache_beam/coders/coder_impl.pxd":56 + * + * + * cdef class SimpleCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":60 + * + * + * cdef class StreamCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":64 + * + * + * cdef class CallbackCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _encoder + * cdef object _decoder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; + PyObject *_encoder; + PyObject *_decoder; + PyObject *_size_estimator; +}; + + +/* "apache_beam/coders/coder_impl.pxd":79 + * cdef set _ITERABLE_LIKE_TYPES + * + * cdef class FastPrimitivesCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl fallback_coder_impl + * cdef CoderImpl iterable_coder_impl +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *fallback_coder_impl; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *iterable_coder_impl; + PyObject *requires_deterministic_step_label; + int warn_deterministic_fallback; + int force_use_dill; + int use_relative_filepaths; +}; + + +/* "apache_beam/coders/coder_impl.pxd":102 + * + * + * cdef class MapCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _key_coder + * cdef CoderImpl _value_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_key_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; + int _is_deterministic; +}; + + +/* "apache_beam/coders/coder_impl.pxd":108 + * + * + * cdef class BytesCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":112 + * + * + * cdef class BooleanCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":116 + * + * + * cdef class BigEndianShortCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":120 + * + * + * cdef class SinglePrecisionFloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":124 + * + * + * cdef class FloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":128 + * + * + * cdef class TimestampCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object timestamp_class + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *timestamp_class; +}; + + +/* "apache_beam/coders/coder_impl.pxd":133 + * + * cdef list small_ints + * cdef class VarIntCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int64_t) + * cpdef bytes encode(self, value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":138 + * + * + * cdef class VarInt32CoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int32_t) + * cpdef bytes encode(self, value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":143 + * + * + * cdef class SingletonCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _value + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; + PyObject *_value; +}; + + +/* "apache_beam/coders/coder_impl.pxd":147 + * + * + * cdef class AbstractComponentCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _coder_impls + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *_coder_impls; +}; + + +/* "apache_beam/coders/coder_impl.pxd":162 + * + * + * cdef class TupleCoderImpl(AbstractComponentCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":166 + * + * + * cdef class SequenceCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _elem_coder + * cdef object _read_state +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_elem_coder; + PyObject *_read_state; + PyObject *_write_state; + int _write_state_threshold; +}; + + +/* "apache_beam/coders/coder_impl.pxd":179 + * + * + * cdef class TupleSequenceCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":183 + * + * + * cdef class _AbstractIterable: # <<<<<<<<<<<<<< + * cdef object _contents + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable { + PyObject_HEAD + PyObject *_contents; +}; + + +/* "apache_beam/coders/coder_impl.pxd":187 + * + * + * cdef class IterableCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * cdef bint _use_abstract_iterable + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; + int _use_abstract_iterable; +}; + + +/* "apache_beam/coders/coder_impl.pxd":191 + * + * + * cdef class ListCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":197 + * cdef object IntervalWindow + * + * cdef class IntervalWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint64_t _to_normal_time(self, libc.stdint.int64_t value) + * cdef libc.stdint.int64_t _from_normal_time(self, libc.stdint.uint64_t value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":217 + * + * + * cdef class PaneInfoCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef int _choose_encoding(self, windowed_value.PaneInfo value) + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":232 + * + * + * cdef class _OrderedUnionCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _types + * cdef tuple _coder_impls +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *_types; + PyObject *_coder_impls; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_fallback_coder_impl; +}; + + +/* "apache_beam/coders/coder_impl.pxd":244 + * + * + * cdef class WindowedValueCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values.""" + * cdef CoderImpl _value_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_timestamp_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_windows_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_pane_info_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":264 + * + * + * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values with constant timestamp, windows and pane info.""" + * cdef readonly libc.stdint.int64_t _timestamp +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base; + int64_t _timestamp; + PyObject *_windows; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *_pane_info; +}; + + +/* "apache_beam/coders/coder_impl.pxd":271 + * + * + * cdef class LengthPrefixCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _value_coder + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":275 + * + * + * cdef class RowColumnEncoder: # <<<<<<<<<<<<<< + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1 + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1 +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtab; +}; + + +/* "apache_beam/coders/coder_impl.pxd":280 + * + * + * cdef class GenericRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * cdef object column + * cdef CoderImpl coder_impl +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; + PyObject *column; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *coder_impl; +}; + + +/* "apache_beam/coders/coder_impl.pxd":285 + * + * + * cdef class RowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object schema + * cdef int num_fields +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *schema; + int num_fields; + PyObject *field_names; + PyObject *field_nullable; + PyObject *constructor; + PyObject *encoding_positions; + PyObject *encoding_positions_argsort; + int encoding_positions_are_trivial; + PyObject *components; + int has_nullable_fields; +}; + + +/* "apache_beam/coders/coder_impl.pxd":315 + * + * + * cdef class LogicalTypeCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object logical_type + * cdef CoderImpl representation_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *logical_type; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *representation_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":323 + * + * + * cdef class BigIntegerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":327 + * + * + * cdef class DecimalCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.py":163 + * return out.get() + * + * def decode_all(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all { + PyObject_HEAD + PyObject *__pyx_v_encoded; + PyObject *__pyx_v_input_stream; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self; +}; + + +/* "apache_beam/coders/coder_impl.py":504 + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: + * if any(field.kw_only for field in init_fields): # <<<<<<<<<<<<<< + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_field; +}; + + +/* "apache_beam/coders/coder_impl.py":653 + * + * + * def _unpickle_type_2_67_0(bs): # <<<<<<<<<<<<<< + * """ + * Decode special type with <=2.67.0 compatibility. +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 { + PyObject_HEAD + PyObject *__pyx_v_bs; +}; + + +/* "apache_beam/coders/coder_impl.py":1214 + * self._tail = tail + * + * def __iter__(self): # <<<<<<<<<<<<<< + * # type: () -> Iterator[Any] + * for elem in self._head: +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ { + PyObject_HEAD + PyObject *__pyx_v_elem; + PyObject *__pyx_v_self; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); +}; + + +/* "apache_beam/coders/coder_impl.py":1914 + * class RowCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): # <<<<<<<<<<<<<< + * self.schema = schema + * self.num_fields = len(self.schema.fields) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ { + PyObject_HEAD + PyObject *__pyx_v_components; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self; +}; + + +/* "apache_beam/coders/coder_impl.py":1924 + * # should never be duplicate encoding positions. + * enc_posx = list( + * set(field.encoding_position for field in self.schema.fields)) # <<<<<<<<<<<<<< + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_field; +}; + + +/* "apache_beam/coders/coder_impl.py":1932 + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( + * field.encoding_position for field in self.schema.fields) # <<<<<<<<<<<<<< + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) + * self.encoding_positions_are_trivial = self.encoding_positions == list( +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_field; +}; + + +/* "apache_beam/coders/coder_impl.py":1937 + * range(len(self.encoding_positions))) + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() # <<<<<<<<<<<<<< + * for i in self.encoding_positions) + * self.has_nullable_fields = any( +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr { + PyObject_HEAD + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *__pyx_outer_scope; + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_i; +}; + + +/* "apache_beam/coders/coder_impl.py":1940 + * for i in self.encoding_positions) + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_field; +}; + + +/* "View.MemoryView":110 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname("__pyx_array") + * cdef class array: +*/ +struct __pyx_array_obj { + PyObject_HEAD + struct __pyx_vtabstruct_array *__pyx_vtab; + char *data; + Py_ssize_t len; + char *format; + int ndim; + Py_ssize_t *_shape; + Py_ssize_t *_strides; + Py_ssize_t itemsize; + PyObject *mode; + PyObject *_format; + void (*callback_free_data)(void *); + int free_data; + int dtype_is_object; +}; + + +/* "View.MemoryView":299 + * + * + * @cname('__pyx_MemviewEnum') # <<<<<<<<<<<<<< + * cdef class Enum(object): + * cdef object name +*/ +struct __pyx_MemviewEnum_obj { + PyObject_HEAD + PyObject *name; +}; + + +/* "View.MemoryView":334 + * + * + * @cname('__pyx_memoryview') # <<<<<<<<<<<<<< + * cdef class memoryview: + * +*/ +struct __pyx_memoryview_obj { + PyObject_HEAD + struct __pyx_vtabstruct_memoryview *__pyx_vtab; + PyObject *obj; + PyObject *_size; + void *_unused; + PyThread_type_lock lock; + __pyx_atomic_int_type acquisition_count; + Py_buffer view; + int flags; + int dtype_is_object; + __Pyx_TypeInfo const *typeinfo; +}; + + +/* "View.MemoryView":951 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): +*/ +struct __pyx_memoryviewslice_obj { + struct __pyx_memoryview_obj __pyx_base; + __Pyx_memviewslice from_slice; + PyObject *from_object; + PyObject *(*to_object_func)(char *); + int (*to_dtype_func)(char *, PyObject *); +}; + + + +/* "stream.pxd":21 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * cdef char* data + * cdef size_t buffer_size +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream { + PyObject *(*write)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args); + PyObject *(*write_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch); + PyObject *(*write_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, float, int __pyx_skip_dispatch); + PyObject *(*get)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + size_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + PyObject *(*extend)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, size_t); + PyObject *(*_clear)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream; + + +/* "stream.pxd":43 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * cdef size_t count + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t (*get_count)(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream; + + +/* "stream.pxd":58 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * cdef size_t pos + * cdef bytes all +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream { + Py_ssize_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, size_t, int __pyx_skip_dispatch); + long (*read_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + uint64_t (*read_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int16_t (*read_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + double (*read_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + float (*read_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read_all)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream; + + +/* "windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; + + +/* "windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + + +/* "windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + + +/* "apache_beam/coders/coder_impl.py":130 + * + * + * class CoderImpl(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, stream, nested): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl { + PyObject *(*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch); + PyObject *(*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch); + PyObject *(*encode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*decode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*encode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*decode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*estimate_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args); + int (*_get_nested_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, int, int, int __pyx_skip_dispatch); + PyObject *(*get_estimated_size_and_observables)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + + +/* "apache_beam/coders/coder_impl.py":214 + * + * + * class SimpleCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":231 + * + * + * class StreamCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":254 + * + * + * class CallbackCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":374 + * + * + * class FastPrimitivesCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*encode_special_deterministic)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*encode_type_2_67_0)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*encode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*decode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":743 + * + * + * class MapCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":686 + * + * + * class BytesCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":712 + * + * + * class BooleanCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":837 + * + * + * class BigEndianShortCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":853 + * + * + * class SinglePrecisionFloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":869 + * + * + * class FloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":935 + * + * + * class TimestampCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1023 + * + * + * class VarIntCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1067 + * + * + * class VarInt32CoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1098 + * + * + * class SingletonCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1125 + * + * + * class AbstractComponentCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*_extract_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*_construct_from_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1199 + * + * + * class TupleCoderImpl(AbstractComponentCoderImpl): # <<<<<<<<<<<<<< + * """A coder for tuple objects.""" + * def _extract_components(self, value): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1234 + * + * + * class SequenceCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*_construct_from_sequence)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1397 + * + * + * class TupleSequenceCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1435 + * + * + * class IterableCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1452 + * + * + * class ListCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":889 + * + * + * class IntervalWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, int64_t); + int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, uint64_t); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1480 + * + * + * class PaneInfoCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + int (*_choose_encoding)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1545 + * + * + * class _OrderedUnionCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * def __init__(self, coder_impl_types, fallback_coder_impl): + * assert len(coder_impl_types) < 128 +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1576 + * + * + * class WindowedValueCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, int64_t); + int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, uint64_t); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1671 + * + * + * class ParamWindowedValueCoderImpl(WindowedValueCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1715 + * + * + * class LengthPrefixCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":1860 + * + * + * class RowColumnEncoder: # <<<<<<<<<<<<<< + * ROW_ENCODERS = {1: 12345} + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder { + int (*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + int (*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl.py":1893 + * + * + * class GenericRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * def __init__(self, coder_impl, column): + * self.coder_impl = coder_impl +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + + +/* "apache_beam/coders/coder_impl.py":1912 + * + * + * class RowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*decode_batch_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*encode_batch_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":2088 + * + * + * class LogicalTypeCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * def __init__(self, logical_type, representation_coder): + * self.logical_type = logical_type +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":2102 + * + * + * class BigIntegerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + + +/* "apache_beam/coders/coder_impl.py":2123 + * + * + * class DecimalCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + + +/* "View.MemoryView":110 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname("__pyx_array") + * cdef class array: +*/ + +struct __pyx_vtabstruct_array { + PyObject *(*get_memview)(struct __pyx_array_obj *); +}; +static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; + + +/* "View.MemoryView":334 + * + * + * @cname('__pyx_memoryview') # <<<<<<<<<<<<<< + * cdef class memoryview: + * +*/ + +struct __pyx_vtabstruct_memoryview { + char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); + PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); + PyObject *(*_get_base)(struct __pyx_memoryview_obj *); +}; +static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; + + +/* "View.MemoryView":951 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): +*/ + +struct __pyx_vtabstruct__memoryviewslice { + struct __pyx_vtabstruct_memoryview __pyx_base; +}; +static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyMemoryError_Check.proto */ +#define __Pyx_PyExc_MemoryError_Check(obj) __Pyx_TypeCheck(obj, PyExc_MemoryError) + +/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto (used by CIntToPyUnicode) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto (used by CIntToPyUnicode) */ +#include + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* DivInt[Py_ssize_t].proto */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant); + +/* UnaryNegOverflows.proto */ +#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PySequenceMultiply.proto */ +#define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul) +#if !CYTHON_USE_TYPE_SLOTS +#define __Pyx_PySequence_Multiply PySequence_Repeat +#else +static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul); +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* PyObjectFormat.proto */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); +#else +#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +#endif + +/* SetItemInt.proto */ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* PyIndexError_Check.proto */ +#define __Pyx_PyExc_IndexError_Check(obj) __Pyx_TypeCheck(obj, PyExc_IndexError) + +/* DivInt[long].proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant); + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* PyRuntimeError_Check.proto */ +#define __Pyx_PyExc_RuntimeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeError) + +/* PyOverflowError_Check.proto */ +#define __Pyx_PyExc_OverflowError_Check(obj) __Pyx_TypeCheck(obj, PyExc_OverflowError) + +/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* pyfrozenset_new.proto (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* PySetContains.proto */ +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* decode_c_string_utf16.proto (used by decode_c_bytes) */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto (used by decode_bytes) */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* decode_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(string); + size = PyBytes_GET_SIZE(string); +#else + if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) { + return NULL; + } +#endif + return __Pyx_decode_c_bytes( + as_c_string, size, + start, stop, encoding, errors, decode_func); +} + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* CallUnboundCMethod1.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* UnicodeAsUCS4.proto (used by object_ord) */ +static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); + +/* object_ord.proto */ +#define __Pyx_PyObject_Ord(c)\ + (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) +static long __Pyx__PyObject_Ord(PyObject* c); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* DivInt[int64_t].proto */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t, int64_t, int b_is_constant); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2)) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) +#endif + +/* PyRange_Check.proto */ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) + #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* ListAppend.proto (used by append) */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* pyint_simplify.proto */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* PyImportError_Check.proto */ +#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError) + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* ModInt[long].proto */ +static CYTHON_INLINE long __Pyx_mod_long(long, long, int b_is_constant); + +/* IterNextPlain.proto (used by IterNext) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* IterNext.proto */ +#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); + +/* PyLongCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallNextTpTraverse.proto */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/* CallNextTpClear.proto */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* Globals.proto */ +static PyObject* __Pyx_Globals(void); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* ClassMethod.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include "descrobject.h" +#endif +CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +/* MemviewRefcount.proto */ +static CYTHON_INLINE int __pyx_add_acquisition_count_locked( + __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); +static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( + __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); +#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count) +#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) +#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__) +static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); +static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int); + +/* MemviewSliceIsContig.proto */ +static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); + +/* OverlappingSlices.proto */ +static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize); + +/* MemviewSliceInit.proto */ +static int __Pyx_init_memviewslice( + struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference); + +/* IsLittleEndian.proto (used by BufferFormatCheck) */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto (used by MemviewSliceValidateAndInit) */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + const __Pyx_TypeInfo* type); + +/* TypeInfoCompare.proto (used by MemviewSliceValidateAndInit) */ +static int __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b); + +/* MemviewSliceValidateAndInit.export */ +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + const __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(PyObject *, int writable_flag); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int16_t __Pyx_PyLong_As_int16_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value); + +/* MemviewSliceCopy.proto */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/ +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type_2_67_0(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, int64_t __pyx_v_value); /* proto*/ +static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, uint64_t __pyx_v_value); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_value); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, int64_t __pyx_v_value); /* proto*/ +static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, uint64_t __pyx_v_value); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size *__pyx_optional_args); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython.view" */ + +/* Module declarations from "cython.dataclasses" */ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "apache_beam.coders.stream" */ + +/* Module declarations from "apache_beam.utils" */ + +/* Module declarations from "apache_beam.utils.windowed_value" */ +static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp) +static PyObject **__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO (*__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO) +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*__pyx_f_11apache_beam_5utils_14windowed_value_create)(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args); /*proto*/ + +/* Module declarations from "apache_beam.coders.coder_impl" */ +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_loads = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_dumps = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_past_unicode = 0; +static int __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_NoneType = 0; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE; +static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_small_ints = 0; +static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow = 0; +static int __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN; +static int __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST; +static uint64_t __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT; +static int64_t __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros; +static int64_t __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros; +static PyObject *__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__; +static PyObject *__pyx_collections_abc_Sequence = 0; +static PyObject *generic = 0; +static PyObject *strided = 0; +static PyObject *indirect = 0; +static PyObject *contiguous = 0; +static PyObject *indirect_contiguous = 0; +static int __pyx_memoryview_thread_locks_used; +static PyThread_type_lock __pyx_memoryview_thread_locks[8]; +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarInt32CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__OrderedUnionCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *, PyObject *); /*proto*/ +static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/ +static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char const *, char *); /*proto*/ +static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo const *); /*proto*/ +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ +static PyObject *_unellipsify(PyObject *, int); /*proto*/ +static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ +static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ +static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ +static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ +static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ +static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/ +static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/ +static int __pyx_memoryview_err_no_memory(void); /*proto*/ +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ +static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn_uint8_t = { "uint8_t", NULL, sizeof(uint8_t), { 0 }, 0, __PYX_IS_UNSIGNED(uint8_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(uint8_t), 0 }; +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.coders.coder_impl" +extern int __pyx_module_is_main_apache_beam__coders__coder_impl; +int __pyx_module_is_main_apache_beam__coders__coder_impl = 0; + +/* Implementation of "apache_beam.coders.coder_impl" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin___import__; +static PyObject *__pyx_builtin_Ellipsis; +static PyObject *__pyx_builtin_id; +/* #### Code section: string_decls ### */ +static const char __pyx_k_c[] = "c"; +static const char __pyx_k__9[] = ""; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_fortran[] = "fortran"; +static const char __pyx_k_value_2[] = "_value"; +static const char __pyx_k_contents_2[] = "_contents"; +static const char __pyx_k_coder_impls_2[] = "_coder_impls"; +static const char __pyx_k_value_coder_2[] = "_value_coder"; +static const char __pyx_k_timestamp_class[] = "timestamp_class"; +static const char __pyx_k_coder_impl_column[] = "coder_impl, column"; +static const char __pyx_k_coder_impls__fallback_coder_imp[] = "_coder_impls, _fallback_coder_impl, _types"; +static const char __pyx_k_components_constructor_encoding[] = "components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema"; +static const char __pyx_k_decoder__encoder__size_estimato[] = "_decoder, _encoder, _size_estimator"; +static const char __pyx_k_elem_coder__read_state__use_abs[] = "_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold"; +static const char __pyx_k_elem_coder__read_state__write_s[] = "_elem_coder, _read_state, _write_state, _write_state_threshold"; +static const char __pyx_k_is_deterministic__key_coder__va[] = "_is_deterministic, _key_coder, _value_coder"; +static const char __pyx_k_pane_info__pane_info_coder__tim[] = "_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder"; +static const char __pyx_k_pane_info_coder__timestamp_code[] = "_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder"; +static const char __pyx_k_Coder_implementations_The_actual[] = "Coder implementations.\n\nThe actual encode/decode implementations are split off from coders to\nallow conditional (compiled/pure) implementations, which can be used to\nencode many elements with minimal overhead.\n\nThis module may be optionally compiled with Cython, using the corresponding\ncoder_impl.pxd file for type hints. In particular, because CoderImpls are\nnever pickled and sent across the wire (unlike Coders themselves) the workers\ncan use compiled Impls even if the main program does not (or vice versa).\n\nFor internal use only; no backwards-compatibility guarantees.\n"; +static const char __pyx_k_fallback_coder_impl_force_use_di[] = "fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback"; +static const char __pyx_k_logical_type_representation_code[] = "logical_type, representation_coder"; +/* #### Code section: decls ### */ +static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ +static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_typ, PyObject *__pyx_v_x); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_15decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_2decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoder, PyObject *__pyx_v_decoder, PyObject *__pyx_v_size_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_10decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_message_type); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_plus_type); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl__verify_dill_compat(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_fallback_coder_impl, PyObject *__pyx_v_requires_deterministic_step_label, PyObject *__pyx_v_force_use_dill, PyObject *__pyx_v_use_relative_filepaths); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(PyObject *__pyx_v_t); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_type_2_67_0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_4_unpickle_named_tuple_2_67_0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_6_unpickle_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_8_unpickle_named_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_key_coder, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_is_deterministic); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unused_value, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl, PyObject *__pyx_v_window_coder_impl); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impls); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_head, PyObject *__pyx_v_tail); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_elem_coder, PyObject *__pyx_v_read_state, PyObject *__pyx_v_write_state, PyObject *__pyx_v_write_state_threshold); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_values); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v_contents); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_left, PyObject *__pyx_v_right); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_use_abstract_iterable, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impl_types, PyObject *__pyx_v_fallback_coder_impl); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_timestamp_coder, PyObject *__pyx_v_window_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_window_coder, PyObject *__pyx_v_payload); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_payload, PyObject *__pyx_v_window_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_end, PyObject *__pyx_v_encoded_window); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_10_create_opaque_window(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_end, PyObject *__pyx_v_encoded_window); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_components); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_logical_type, PyObject *__pyx_v_representation_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14__pyx_unpickle_CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16__pyx_unpickle_SimpleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18__pyx_unpickle_StreamCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20__pyx_unpickle_CallbackCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22__pyx_unpickle_FastPrimitivesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_24__pyx_unpickle_BytesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26__pyx_unpickle_BooleanCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_28__pyx_unpickle_MapCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_30__pyx_unpickle_BigEndianShortCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_32__pyx_unpickle_SinglePrecisionFloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_34__pyx_unpickle_FloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36__pyx_unpickle_IntervalWindowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_38__pyx_unpickle_TimestampCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_40__pyx_unpickle_VarIntCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_42__pyx_unpickle_VarInt32CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_44__pyx_unpickle_SingletonCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_46__pyx_unpickle_AbstractComponentCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_48__pyx_unpickle_TupleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_50__pyx_unpickle_SequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_52__pyx_unpickle_TupleSequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_54__pyx_unpickle__AbstractIterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_56__pyx_unpickle_IterableCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_58__pyx_unpickle_ListCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_60__pyx_unpickle_PaneInfoCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_62__pyx_unpickle__OrderedUnionCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_64__pyx_unpickle_WindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_66__pyx_unpickle_ParamWindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_68__pyx_unpickle_LengthPrefixCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_70__pyx_unpickle_RowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_72__pyx_unpickle_GenericRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_74__pyx_unpickle_RowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_76__pyx_unpickle_LogicalTypeCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_78__pyx_unpickle_BigIntegerCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_80__pyx_unpickle_DecimalCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_OutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_InputStream; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr; + PyObject *__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr; + PyObject *__pyx_type___pyx_array; + PyObject *__pyx_type___pyx_MemviewEnum; + PyObject *__pyx_type___pyx_memoryview; + PyObject *__pyx_type___pyx_memoryviewslice; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr; + PyTypeObject *__pyx_array_type; + PyTypeObject *__pyx_MemviewEnum_type; + PyTypeObject *__pyx_memoryview_type; + PyTypeObject *__pyx_memoryviewslice_type; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_slice[1]; + PyObject *__pyx_tuple[8]; + PyObject *__pyx_codeobj_tab[271]; + PyObject *__pyx_string_tab[989]; + PyObject *__pyx_number_tab[33]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr[8]; +int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_0_3_1_1 __pyx_string_tab[1] +#define __pyx_kp_u_AbstractIterable_s __pyx_string_tab[2] +#define __pyx_kp_u_All_dimensions_preceding_dimensi __pyx_string_tab[3] +#define __pyx_kp_u_Attempted_to_encode_null_for_non __pyx_string_tab[4] +#define __pyx_kp_u_Buffer_view_does_not_expose_stri __pyx_string_tab[5] +#define __pyx_kp_u_CallbackCoderImpl_encoder __pyx_string_tab[6] +#define __pyx_kp_u_Can_only_create_a_buffer_that_is __pyx_string_tab[7] +#define __pyx_kp_u_Cannot_assign_to_read_only_memor __pyx_string_tab[8] +#define __pyx_kp_u_Cannot_create_writable_memory_vi __pyx_string_tab[9] +#define __pyx_kp_u_Cannot_estimate_size_for_integer __pyx_string_tab[10] +#define __pyx_kp_u_Cannot_index_with_type __pyx_string_tab[11] +#define __pyx_kp_u_Cannot_read_state_written_iterab __pyx_string_tab[12] +#define __pyx_kp_u_Cannot_transpose_memoryview_with __pyx_string_tab[13] +#define __pyx_kp_u_Dict_str_np_ndarray __pyx_string_tab[14] +#define __pyx_kp_u_Dill_is_not_installed __pyx_string_tab[15] +#define __pyx_kp_u_Dimension_d_is_not_direct __pyx_string_tab[16] +#define __pyx_kp_u_Empty_shape_tuple_for_cython_arr __pyx_string_tab[17] +#define __pyx_kp_u_Encountered_unexpected_value_for __pyx_string_tab[18] +#define __pyx_kp_u_Expected_0_or_1_got_s __pyx_string_tab[19] +#define __pyx_kp_u_For_internal_use_only_no_backwar __pyx_string_tab[20] +#define __pyx_kp_u_For_internal_use_only_no_backwar_2 __pyx_string_tab[21] +#define __pyx_kp_u_For_internal_use_only_no_backwar_3 __pyx_string_tab[22] +#define __pyx_kp_u_For_internal_use_only_no_backwar_4 __pyx_string_tab[23] +#define __pyx_kp_u_For_internal_use_only_no_backwar_5 __pyx_string_tab[24] +#define __pyx_kp_u_For_internal_use_only_no_backwar_6 __pyx_string_tab[25] +#define __pyx_kp_u_Found_dill_version __pyx_string_tab[26] +#define __pyx_kp_u_Index_out_of_bounds_axis_d __pyx_string_tab[27] +#define __pyx_kp_u_Indirect_dimensions_not_supporte __pyx_string_tab[28] +#define __pyx_kp_u_Integer_value __pyx_string_tab[29] +#define __pyx_kp_u_Invalid_PaneInfoEncoding_s __pyx_string_tab[30] +#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_string_tab[31] +#define __pyx_kp_u_Invalid_shape_in_axis __pyx_string_tab[32] +#define __pyx_kp_u_MemoryView_of __pyx_string_tab[33] +#define __pyx_kp_u_No_fallback __pyx_string_tab[34] +#define __pyx_kp_u_None __pyx_string_tab[35] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[36] +#define __pyx_kp_u_Number_of_components_does_not_ma __pyx_string_tab[37] +#define __pyx_kp_u_OpaqueWindow __pyx_string_tab[38] +#define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_string_tab[39] +#define __pyx_kp_u_Schema_with_id __pyx_string_tab[40] +#define __pyx_kp_u_Step_may_not_be_zero_axis_d __pyx_string_tab[41] +#define __pyx_kp_u_The_object_defines___getstate __pyx_string_tab[42] +#define __pyx_kp_u_This_pipeline_runs_with_the_pipe __pyx_string_tab[43] +#define __pyx_kp_u_Unable_to_convert_item_to_object __pyx_string_tab[44] +#define __pyx_kp_u_Unable_to_deterministically_enco __pyx_string_tab[45] +#define __pyx_kp_u_Unable_to_deterministically_enco_2 __pyx_string_tab[46] +#define __pyx_kp_u_Unable_to_deterministically_orde __pyx_string_tab[47] +#define __pyx_kp_u_Unable_to_deterministically_orde_2 __pyx_string_tab[48] +#define __pyx_kp_u_Unknown_type_tag_x __pyx_string_tab[49] +#define __pyx_kp_u_Using_fallback_deterministic_cod __pyx_string_tab[50] +#define __pyx_kp_u_Value_is_out_of_the_range_for_V __pyx_string_tab[51] +#define __pyx_kp_u__10 __pyx_string_tab[52] +#define __pyx_kp_u__11 __pyx_string_tab[53] +#define __pyx_kp_u__12 __pyx_string_tab[54] +#define __pyx_kp_u__2 __pyx_string_tab[55] +#define __pyx_kp_u__3 __pyx_string_tab[56] +#define __pyx_kp_u__4 __pyx_string_tab[57] +#define __pyx_kp_u__5 __pyx_string_tab[58] +#define __pyx_kp_u__6 __pyx_string_tab[59] +#define __pyx_kp_u_add_note __pyx_string_tab[60] +#define __pyx_kp_u_and __pyx_string_tab[61] +#define __pyx_kp_u_apache_beam_coders_2 __pyx_string_tab[62] +#define __pyx_kp_u_apache_beam_coders_coder_impl_py __pyx_string_tab[63] +#define __pyx_kp_u_apache_beam_coders_slow_stream __pyx_string_tab[64] +#define __pyx_kp_u_apache_beam_coders_stream __pyx_string_tab[65] +#define __pyx_kp_u_at_0x __pyx_string_tab[66] +#define __pyx_kp_u_collections_abc __pyx_string_tab[67] +#define __pyx_kp_u_contiguous_and_direct __pyx_string_tab[68] +#define __pyx_kp_u_contiguous_and_indirect __pyx_string_tab[69] +#define __pyx_kp_u_decoder_2 __pyx_string_tab[70] +#define __pyx_kp_u_disable __pyx_string_tab[71] +#define __pyx_kp_u_enable __pyx_string_tab[72] +#define __pyx_kp_u_for_the_input_of __pyx_string_tab[73] +#define __pyx_kp_u_for_the_input_of_2 __pyx_string_tab[74] +#define __pyx_kp_u_gc __pyx_string_tab[75] +#define __pyx_kp_u_got __pyx_string_tab[76] +#define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_string_tab[77] +#define __pyx_kp_u_has_encoding_positions_set_True __pyx_string_tab[78] +#define __pyx_kp_u_is_out_of_the_encodable_range_f __pyx_string_tab[79] +#define __pyx_kp_u_isenabled __pyx_string_tab[80] +#define __pyx_kp_u_itemsize_0_for_cython_array __pyx_string_tab[81] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[82] +#define __pyx_kp_u_object_2 __pyx_string_tab[83] +#define __pyx_kp_u_of_type __pyx_string_tab[84] +#define __pyx_kp_u_please_provide_a_type_hint_for __pyx_string_tab[85] +#define __pyx_kp_u_strided_and_direct __pyx_string_tab[86] +#define __pyx_kp_u_strided_and_direct_or_indirect __pyx_string_tab[87] +#define __pyx_kp_u_strided_and_indirect __pyx_string_tab[88] +#define __pyx_kp_u_stringsource __pyx_string_tab[89] +#define __pyx_kp_u_unable_to_allocate_array_data __pyx_string_tab[90] +#define __pyx_kp_u_unable_to_allocate_shape_and_str __pyx_string_tab[91] +#define __pyx_kp_u_utf_8 __pyx_string_tab[92] +#define __pyx_n_u_ASCII __pyx_string_tab[93] +#define __pyx_n_u_AbstractComponentCoderImpl __pyx_string_tab[94] +#define __pyx_n_u_AbstractComponentCoderImpl___red __pyx_string_tab[95] +#define __pyx_n_u_AbstractComponentCoderImpl___set __pyx_string_tab[96] +#define __pyx_n_u_AbstractComponentCoderImpl__cons __pyx_string_tab[97] +#define __pyx_n_u_AbstractComponentCoderImpl__extr __pyx_string_tab[98] +#define __pyx_n_u_AbstractComponentCoderImpl_decod __pyx_string_tab[99] +#define __pyx_n_u_AbstractComponentCoderImpl_encod __pyx_string_tab[100] +#define __pyx_n_u_AbstractComponentCoderImpl_estim __pyx_string_tab[101] +#define __pyx_n_u_AbstractComponentCoderImpl_get_e __pyx_string_tab[102] +#define __pyx_n_u_AbstractIterable __pyx_string_tab[103] +#define __pyx_n_u_AbstractIterable___reduce_cytho __pyx_string_tab[104] +#define __pyx_n_u_AbstractIterable___setstate_cyt __pyx_string_tab[105] +#define __pyx_n_u_Any __pyx_string_tab[106] +#define __pyx_n_u_AvroCoderImpl __pyx_string_tab[107] +#define __pyx_n_u_AvroCoderImpl___init __pyx_string_tab[108] +#define __pyx_n_u_AvroCoderImpl_decode __pyx_string_tab[109] +#define __pyx_n_u_AvroCoderImpl_encode __pyx_string_tab[110] +#define __pyx_n_u_AvroRecord __pyx_string_tab[111] +#define __pyx_n_u_BIG_INT_CODER_IMPL __pyx_string_tab[112] +#define __pyx_n_u_BigEndianShortCoderImpl __pyx_string_tab[113] +#define __pyx_n_u_BigEndianShortCoderImpl___reduce __pyx_string_tab[114] +#define __pyx_n_u_BigEndianShortCoderImpl___setsta __pyx_string_tab[115] +#define __pyx_n_u_BigEndianShortCoderImpl_decode_f __pyx_string_tab[116] +#define __pyx_n_u_BigEndianShortCoderImpl_encode_t __pyx_string_tab[117] +#define __pyx_n_u_BigEndianShortCoderImpl_estimate __pyx_string_tab[118] +#define __pyx_n_u_BigIntegerCoderImpl __pyx_string_tab[119] +#define __pyx_n_u_BigIntegerCoderImpl___reduce_cyt __pyx_string_tab[120] +#define __pyx_n_u_BigIntegerCoderImpl___setstate_c __pyx_string_tab[121] +#define __pyx_n_u_BigIntegerCoderImpl_decode_from __pyx_string_tab[122] +#define __pyx_n_u_BigIntegerCoderImpl_encode_to_st __pyx_string_tab[123] +#define __pyx_n_u_BooleanCoderImpl __pyx_string_tab[124] +#define __pyx_n_u_BooleanCoderImpl___reduce_cython __pyx_string_tab[125] +#define __pyx_n_u_BooleanCoderImpl___setstate_cyth __pyx_string_tab[126] +#define __pyx_n_u_BooleanCoderImpl_decode __pyx_string_tab[127] +#define __pyx_n_u_BooleanCoderImpl_decode_from_str __pyx_string_tab[128] +#define __pyx_n_u_BooleanCoderImpl_encode __pyx_string_tab[129] +#define __pyx_n_u_BooleanCoderImpl_encode_to_strea __pyx_string_tab[130] +#define __pyx_n_u_BooleanCoderImpl_estimate_size __pyx_string_tab[131] +#define __pyx_n_u_BoundedWindow __pyx_string_tab[132] +#define __pyx_n_u_ByteCountingOutputStream __pyx_string_tab[133] +#define __pyx_n_u_BytesCoderImpl __pyx_string_tab[134] +#define __pyx_n_u_BytesCoderImpl___reduce_cython __pyx_string_tab[135] +#define __pyx_n_u_BytesCoderImpl___setstate_cython __pyx_string_tab[136] +#define __pyx_n_u_BytesCoderImpl_decode __pyx_string_tab[137] +#define __pyx_n_u_BytesCoderImpl_decode_from_strea __pyx_string_tab[138] +#define __pyx_n_u_BytesCoderImpl_encode __pyx_string_tab[139] +#define __pyx_n_u_BytesCoderImpl_encode_to_stream __pyx_string_tab[140] +#define __pyx_n_u_BytesIO __pyx_string_tab[141] +#define __pyx_n_u_Callable __pyx_string_tab[142] +#define __pyx_n_u_CallbackCoderImpl __pyx_string_tab[143] +#define __pyx_n_u_CallbackCoderImpl___reduce_cytho __pyx_string_tab[144] +#define __pyx_n_u_CallbackCoderImpl___setstate_cyt __pyx_string_tab[145] +#define __pyx_n_u_CallbackCoderImpl__default_size __pyx_string_tab[146] +#define __pyx_n_u_CallbackCoderImpl_decode __pyx_string_tab[147] +#define __pyx_n_u_CallbackCoderImpl_decode_from_st __pyx_string_tab[148] +#define __pyx_n_u_CallbackCoderImpl_encode __pyx_string_tab[149] +#define __pyx_n_u_CallbackCoderImpl_encode_to_stre __pyx_string_tab[150] +#define __pyx_n_u_CallbackCoderImpl_estimate_size __pyx_string_tab[151] +#define __pyx_n_u_CallbackCoderImpl_get_estimated __pyx_string_tab[152] +#define __pyx_n_u_CloudPickleConfig __pyx_string_tab[153] +#define __pyx_n_u_CoderImpl __pyx_string_tab[154] +#define __pyx_n_u_CoderImpl___reduce_cython __pyx_string_tab[155] +#define __pyx_n_u_CoderImpl___setstate_cython __pyx_string_tab[156] +#define __pyx_n_u_CoderImpl__get_nested_size __pyx_string_tab[157] +#define __pyx_n_u_CoderImpl_decode __pyx_string_tab[158] +#define __pyx_n_u_CoderImpl_decode_all __pyx_string_tab[159] +#define __pyx_n_u_CoderImpl_decode_from_stream __pyx_string_tab[160] +#define __pyx_n_u_CoderImpl_decode_nested __pyx_string_tab[161] +#define __pyx_n_u_CoderImpl_encode __pyx_string_tab[162] +#define __pyx_n_u_CoderImpl_encode_all __pyx_string_tab[163] +#define __pyx_n_u_CoderImpl_encode_nested __pyx_string_tab[164] +#define __pyx_n_u_CoderImpl_encode_to_stream __pyx_string_tab[165] +#define __pyx_n_u_CoderImpl_estimate_size __pyx_string_tab[166] +#define __pyx_n_u_CoderImpl_get_estimated_size_and __pyx_string_tab[167] +#define __pyx_n_u_ConcatSequence __pyx_string_tab[168] +#define __pyx_n_u_ConcatSequence___eq __pyx_string_tab[169] +#define __pyx_n_u_ConcatSequence___hash __pyx_string_tab[170] +#define __pyx_n_u_ConcatSequence___init __pyx_string_tab[171] +#define __pyx_n_u_ConcatSequence___iter __pyx_string_tab[172] +#define __pyx_n_u_ConcatSequence___reduce __pyx_string_tab[173] +#define __pyx_n_u_DATACLASS_KW_ONLY_TYPE __pyx_string_tab[174] +#define __pyx_n_u_DEFAULT_BUFFER_SIZE __pyx_string_tab[175] +#define __pyx_n_u_Decimal __pyx_string_tab[176] +#define __pyx_n_u_DecimalCoderImpl __pyx_string_tab[177] +#define __pyx_n_u_DecimalCoderImpl___reduce_cython __pyx_string_tab[178] +#define __pyx_n_u_DecimalCoderImpl___setstate_cyth __pyx_string_tab[179] +#define __pyx_n_u_DecimalCoderImpl_decode_from_str __pyx_string_tab[180] +#define __pyx_n_u_DecimalCoderImpl_encode_to_strea __pyx_string_tab[181] +#define __pyx_n_u_DeterministicProtoCoderImpl __pyx_string_tab[182] +#define __pyx_n_u_DeterministicProtoCoderImpl_enco __pyx_string_tab[183] +#define __pyx_n_u_Dict __pyx_string_tab[184] +#define __pyx_n_u_EARLY __pyx_string_tab[185] +#define __pyx_n_u_ENCODE_NULL __pyx_string_tab[186] +#define __pyx_n_u_ENCODE_PRESENT __pyx_string_tab[187] +#define __pyx_n_u_ENUM_TYPE __pyx_string_tab[188] +#define __pyx_n_u_Ellipsis __pyx_string_tab[189] +#define __pyx_n_u_Enum __pyx_string_tab[190] +#define __pyx_n_u_FIRST __pyx_string_tab[191] +#define __pyx_n_u_FastPrimitivesCoderImpl __pyx_string_tab[192] +#define __pyx_n_u_FastPrimitivesCoderImpl___reduce __pyx_string_tab[193] +#define __pyx_n_u_FastPrimitivesCoderImpl___setsta __pyx_string_tab[194] +#define __pyx_n_u_FastPrimitivesCoderImpl__determi __pyx_string_tab[195] +#define __pyx_n_u_FastPrimitivesCoderImpl_decode_f __pyx_string_tab[196] +#define __pyx_n_u_FastPrimitivesCoderImpl_encode_s __pyx_string_tab[197] +#define __pyx_n_u_FastPrimitivesCoderImpl_encode_t __pyx_string_tab[198] +#define __pyx_n_u_FastPrimitivesCoderImpl_get_esti __pyx_string_tab[199] +#define __pyx_n_u_FastPrimitivesCoderImpl_register __pyx_string_tab[200] +#define __pyx_n_u_FloatCoderImpl __pyx_string_tab[201] +#define __pyx_n_u_FloatCoderImpl___reduce_cython __pyx_string_tab[202] +#define __pyx_n_u_FloatCoderImpl___setstate_cython __pyx_string_tab[203] +#define __pyx_n_u_FloatCoderImpl_decode_from_strea __pyx_string_tab[204] +#define __pyx_n_u_FloatCoderImpl_encode_to_stream __pyx_string_tab[205] +#define __pyx_n_u_FloatCoderImpl_estimate_size __pyx_string_tab[206] +#define __pyx_n_u_GenericRowColumnEncoder __pyx_string_tab[207] +#define __pyx_n_u_GenericRowColumnEncoder___reduce __pyx_string_tab[208] +#define __pyx_n_u_GenericRowColumnEncoder___setsta __pyx_string_tab[209] +#define __pyx_n_u_GenericRowColumnEncoder_finalize __pyx_string_tab[210] +#define __pyx_n_u_GenericRowColumnEncoder_null_fla __pyx_string_tab[211] +#define __pyx_n_u_InputStream __pyx_string_tab[212] +#define __pyx_n_u_IntervalWindow __pyx_string_tab[213] +#define __pyx_n_u_IntervalWindowCoderImpl __pyx_string_tab[214] +#define __pyx_n_u_IntervalWindowCoderImpl___reduce __pyx_string_tab[215] +#define __pyx_n_u_IntervalWindowCoderImpl___setsta __pyx_string_tab[216] +#define __pyx_n_u_IntervalWindowCoderImpl_decode_f __pyx_string_tab[217] +#define __pyx_n_u_IntervalWindowCoderImpl_encode_t __pyx_string_tab[218] +#define __pyx_n_u_IntervalWindowCoderImpl_estimate __pyx_string_tab[219] +#define __pyx_n_u_Iterable __pyx_string_tab[220] +#define __pyx_n_u_IterableCoderImpl __pyx_string_tab[221] +#define __pyx_n_u_IterableCoderImpl___reduce_cytho __pyx_string_tab[222] +#define __pyx_n_u_IterableCoderImpl___setstate_cyt __pyx_string_tab[223] +#define __pyx_n_u_IterableCoderImpl__construct_fro __pyx_string_tab[224] +#define __pyx_n_u_IterableStateReader __pyx_string_tab[225] +#define __pyx_n_u_IterableStateWriter __pyx_string_tab[226] +#define __pyx_n_u_Iterator __pyx_string_tab[227] +#define __pyx_n_u_LOGGER __pyx_string_tab[228] +#define __pyx_n_u_LengthPrefixCoderImpl __pyx_string_tab[229] +#define __pyx_n_u_LengthPrefixCoderImpl___reduce_c __pyx_string_tab[230] +#define __pyx_n_u_LengthPrefixCoderImpl___setstate __pyx_string_tab[231] +#define __pyx_n_u_LengthPrefixCoderImpl_decode_fro __pyx_string_tab[232] +#define __pyx_n_u_LengthPrefixCoderImpl_encode_to __pyx_string_tab[233] +#define __pyx_n_u_LengthPrefixCoderImpl_estimate_s __pyx_string_tab[234] +#define __pyx_n_u_List __pyx_string_tab[235] +#define __pyx_n_u_ListCoderImpl __pyx_string_tab[236] +#define __pyx_n_u_ListCoderImpl___reduce_cython __pyx_string_tab[237] +#define __pyx_n_u_ListCoderImpl___setstate_cython __pyx_string_tab[238] +#define __pyx_n_u_ListCoderImpl__construct_from_se __pyx_string_tab[239] +#define __pyx_n_u_LogicalTypeCoderImpl __pyx_string_tab[240] +#define __pyx_n_u_LogicalTypeCoderImpl___reduce_cy __pyx_string_tab[241] +#define __pyx_n_u_LogicalTypeCoderImpl___setstate __pyx_string_tab[242] +#define __pyx_n_u_LogicalTypeCoderImpl_decode_from __pyx_string_tab[243] +#define __pyx_n_u_LogicalTypeCoderImpl_encode_to_s __pyx_string_tab[244] +#define __pyx_n_u_MAX_TIMESTAMP __pyx_string_tab[245] +#define __pyx_n_u_MIN_TIMESTAMP __pyx_string_tab[246] +#define __pyx_n_u_MapCoderImpl __pyx_string_tab[247] +#define __pyx_n_u_MapCoderImpl___reduce_cython __pyx_string_tab[248] +#define __pyx_n_u_MapCoderImpl___setstate_cython __pyx_string_tab[249] +#define __pyx_n_u_MapCoderImpl_decode_from_stream __pyx_string_tab[250] +#define __pyx_n_u_MapCoderImpl_encode_to_stream __pyx_string_tab[251] +#define __pyx_n_u_MapCoderImpl_estimate_size __pyx_string_tab[252] +#define __pyx_n_u_NESTED_STATE_TYPE __pyx_string_tab[253] +#define __pyx_n_u_None __pyx_string_tab[254] +#define __pyx_n_u_NullableCoderImpl __pyx_string_tab[255] +#define __pyx_n_u_NullableCoderImpl___init __pyx_string_tab[256] +#define __pyx_n_u_NullableCoderImpl_decode_from_st __pyx_string_tab[257] +#define __pyx_n_u_NullableCoderImpl_encode_to_stre __pyx_string_tab[258] +#define __pyx_n_u_NullableCoderImpl_estimate_size __pyx_string_tab[259] +#define __pyx_n_u_ONE_INDEX __pyx_string_tab[260] +#define __pyx_n_u_ObservableMixin __pyx_string_tab[261] +#define __pyx_n_u_Observables __pyx_string_tab[262] +#define __pyx_n_u_OpaqueWindow_2 __pyx_string_tab[263] +#define __pyx_n_u_OpaqueWindow___eq __pyx_string_tab[264] +#define __pyx_n_u_OpaqueWindow___hash __pyx_string_tab[265] +#define __pyx_n_u_OpaqueWindow___init __pyx_string_tab[266] +#define __pyx_n_u_OpaqueWindow___repr __pyx_string_tab[267] +#define __pyx_n_u_Optional __pyx_string_tab[268] +#define __pyx_n_u_OrderedUnionCoderImpl __pyx_string_tab[269] +#define __pyx_n_u_OrderedUnionCoderImpl___reduce __pyx_string_tab[270] +#define __pyx_n_u_OrderedUnionCoderImpl___setstat __pyx_string_tab[271] +#define __pyx_n_u_OrderedUnionCoderImpl_decode_fr __pyx_string_tab[272] +#define __pyx_n_u_OrderedUnionCoderImpl_encode_to __pyx_string_tab[273] +#define __pyx_n_u_OutputStream __pyx_string_tab[274] +#define __pyx_n_u_PaneInfoCoderImpl __pyx_string_tab[275] +#define __pyx_n_u_PaneInfoCoderImpl___reduce_cytho __pyx_string_tab[276] +#define __pyx_n_u_PaneInfoCoderImpl___setstate_cyt __pyx_string_tab[277] +#define __pyx_n_u_PaneInfoCoderImpl_decode_from_st __pyx_string_tab[278] +#define __pyx_n_u_PaneInfoCoderImpl_encode_to_stre __pyx_string_tab[279] +#define __pyx_n_u_PaneInfoCoderImpl_estimate_size __pyx_string_tab[280] +#define __pyx_n_u_PaneInfoEncoding __pyx_string_tab[281] +#define __pyx_n_u_PaneInfoTiming __pyx_string_tab[282] +#define __pyx_n_u_ParamWindowedValueCoderImpl __pyx_string_tab[283] +#define __pyx_n_u_ParamWindowedValueCoderImpl___re __pyx_string_tab[284] +#define __pyx_n_u_ParamWindowedValueCoderImpl___se __pyx_string_tab[285] +#define __pyx_n_u_ParamWindowedValueCoderImpl__fro __pyx_string_tab[286] +#define __pyx_n_u_ParamWindowedValueCoderImpl_deco __pyx_string_tab[287] +#define __pyx_n_u_ParamWindowedValueCoderImpl_enco __pyx_string_tab[288] +#define __pyx_n_u_ParamWindowedValueCoderImpl_get __pyx_string_tab[289] +#define __pyx_n_u_ParseFromString __pyx_string_tab[290] +#define __pyx_n_u_PicklingError __pyx_string_tab[291] +#define __pyx_n_u_ProtoCoderImpl __pyx_string_tab[292] +#define __pyx_n_u_ProtoCoderImpl___init __pyx_string_tab[293] +#define __pyx_n_u_ProtoCoderImpl_decode __pyx_string_tab[294] +#define __pyx_n_u_ProtoCoderImpl_encode __pyx_string_tab[295] +#define __pyx_n_u_ProtoPlusCoderImpl __pyx_string_tab[296] +#define __pyx_n_u_ProtoPlusCoderImpl___init __pyx_string_tab[297] +#define __pyx_n_u_ProtoPlusCoderImpl_decode __pyx_string_tab[298] +#define __pyx_n_u_ProtoPlusCoderImpl_encode __pyx_string_tab[299] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[300] +#define __pyx_n_u_ROW_ENCODERS __pyx_string_tab[301] +#define __pyx_n_u_RowCoderImpl __pyx_string_tab[302] +#define __pyx_n_u_RowCoderImpl___reduce_cython __pyx_string_tab[303] +#define __pyx_n_u_RowCoderImpl___setstate_cython __pyx_string_tab[304] +#define __pyx_n_u_RowCoderImpl__row_column_encoder __pyx_string_tab[305] +#define __pyx_n_u_RowCoderImpl_decode_batch_from_s __pyx_string_tab[306] +#define __pyx_n_u_RowCoderImpl_decode_from_stream __pyx_string_tab[307] +#define __pyx_n_u_RowCoderImpl_encode_batch_to_str __pyx_string_tab[308] +#define __pyx_n_u_RowCoderImpl_encode_to_stream __pyx_string_tab[309] +#define __pyx_n_u_RowColumnEncoder __pyx_string_tab[310] +#define __pyx_n_u_RowColumnEncoder___reduce_cython __pyx_string_tab[311] +#define __pyx_n_u_RowColumnEncoder___setstate_cyth __pyx_string_tab[312] +#define __pyx_n_u_RowColumnEncoder_create __pyx_string_tab[313] +#define __pyx_n_u_RowColumnEncoder_finalize_write __pyx_string_tab[314] +#define __pyx_n_u_RowColumnEncoder_null_flags __pyx_string_tab[315] +#define __pyx_n_u_RowColumnEncoder_register __pyx_string_tab[316] +#define __pyx_n_u_SLOW_STREAM __pyx_string_tab[317] +#define __pyx_n_u_Sequence __pyx_string_tab[318] +#define __pyx_n_u_SequenceCoderImpl __pyx_string_tab[319] +#define __pyx_n_u_SequenceCoderImpl___reduce_cytho __pyx_string_tab[320] +#define __pyx_n_u_SequenceCoderImpl___setstate_cyt __pyx_string_tab[321] +#define __pyx_n_u_SequenceCoderImpl__construct_fro __pyx_string_tab[322] +#define __pyx_n_u_SequenceCoderImpl_decode_from_st __pyx_string_tab[323] +#define __pyx_n_u_SequenceCoderImpl_encode_to_stre __pyx_string_tab[324] +#define __pyx_n_u_SequenceCoderImpl_estimate_size __pyx_string_tab[325] +#define __pyx_n_u_SequenceCoderImpl_get_estimated __pyx_string_tab[326] +#define __pyx_n_u_SerializePartialToString __pyx_string_tab[327] +#define __pyx_n_u_Set __pyx_string_tab[328] +#define __pyx_n_u_ShardedKey __pyx_string_tab[329] +#define __pyx_n_u_ShardedKeyCoderImpl __pyx_string_tab[330] +#define __pyx_n_u_ShardedKeyCoderImpl___init __pyx_string_tab[331] +#define __pyx_n_u_ShardedKeyCoderImpl_decode_from __pyx_string_tab[332] +#define __pyx_n_u_ShardedKeyCoderImpl_encode_to_st __pyx_string_tab[333] +#define __pyx_n_u_ShardedKeyCoderImpl_estimate_siz __pyx_string_tab[334] +#define __pyx_n_u_SimpleCoderImpl __pyx_string_tab[335] +#define __pyx_n_u_SimpleCoderImpl___reduce_cython __pyx_string_tab[336] +#define __pyx_n_u_SimpleCoderImpl___setstate_cytho __pyx_string_tab[337] +#define __pyx_n_u_SimpleCoderImpl_decode_from_stre __pyx_string_tab[338] +#define __pyx_n_u_SimpleCoderImpl_encode_to_stream __pyx_string_tab[339] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl __pyx_string_tab[340] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl_2 __pyx_string_tab[341] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl_3 __pyx_string_tab[342] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl_de __pyx_string_tab[343] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl_en __pyx_string_tab[344] +#define __pyx_n_u_SinglePrecisionFloatCoderImpl_es __pyx_string_tab[345] +#define __pyx_n_u_SingletonCoderImpl __pyx_string_tab[346] +#define __pyx_n_u_SingletonCoderImpl___reduce_cyth __pyx_string_tab[347] +#define __pyx_n_u_SingletonCoderImpl___setstate_cy __pyx_string_tab[348] +#define __pyx_n_u_SingletonCoderImpl_decode __pyx_string_tab[349] +#define __pyx_n_u_SingletonCoderImpl_decode_from_s __pyx_string_tab[350] +#define __pyx_n_u_SingletonCoderImpl_encode __pyx_string_tab[351] +#define __pyx_n_u_SingletonCoderImpl_encode_to_str __pyx_string_tab[352] +#define __pyx_n_u_SingletonCoderImpl_estimate_size __pyx_string_tab[353] +#define __pyx_n_u_StrUtf8Coder __pyx_string_tab[354] +#define __pyx_n_u_StreamCoderImpl __pyx_string_tab[355] +#define __pyx_n_u_StreamCoderImpl___reduce_cython __pyx_string_tab[356] +#define __pyx_n_u_StreamCoderImpl___setstate_cytho __pyx_string_tab[357] +#define __pyx_n_u_StreamCoderImpl_decode __pyx_string_tab[358] +#define __pyx_n_u_StreamCoderImpl_encode __pyx_string_tab[359] +#define __pyx_n_u_StreamCoderImpl_estimate_size __pyx_string_tab[360] +#define __pyx_n_u_TWO_INDICES __pyx_string_tab[361] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[362] +#define __pyx_n_u_Timer __pyx_string_tab[363] +#define __pyx_n_u_TimerCoderImpl __pyx_string_tab[364] +#define __pyx_n_u_TimerCoderImpl___init __pyx_string_tab[365] +#define __pyx_n_u_TimerCoderImpl_decode_from_strea __pyx_string_tab[366] +#define __pyx_n_u_TimerCoderImpl_encode_to_stream __pyx_string_tab[367] +#define __pyx_n_u_Timestamp __pyx_string_tab[368] +#define __pyx_n_u_TimestampCoderImpl __pyx_string_tab[369] +#define __pyx_n_u_TimestampCoderImpl___reduce_cyth __pyx_string_tab[370] +#define __pyx_n_u_TimestampCoderImpl___setstate_cy __pyx_string_tab[371] +#define __pyx_n_u_TimestampCoderImpl_decode_from_s __pyx_string_tab[372] +#define __pyx_n_u_TimestampCoderImpl_encode_to_str __pyx_string_tab[373] +#define __pyx_n_u_TimestampCoderImpl_estimate_size __pyx_string_tab[374] +#define __pyx_n_u_TimestampPrefixingOpaqueWindowCo __pyx_string_tab[375] +#define __pyx_n_u_TimestampPrefixingOpaqueWindowCo_2 __pyx_string_tab[376] +#define __pyx_n_u_TimestampPrefixingOpaqueWindowCo_3 __pyx_string_tab[377] +#define __pyx_n_u_TimestampPrefixingOpaqueWindowCo_4 __pyx_string_tab[378] +#define __pyx_n_u_TimestampPrefixingOpaqueWindowCo_5 __pyx_string_tab[379] +#define __pyx_n_u_TimestampPrefixingWindowCoderImp __pyx_string_tab[380] +#define __pyx_n_u_TimestampPrefixingWindowCoderImp_2 __pyx_string_tab[381] +#define __pyx_n_u_TimestampPrefixingWindowCoderImp_3 __pyx_string_tab[382] +#define __pyx_n_u_TimestampPrefixingWindowCoderImp_4 __pyx_string_tab[383] +#define __pyx_n_u_TimestampPrefixingWindowCoderImp_5 __pyx_string_tab[384] +#define __pyx_n_u_Tuple __pyx_string_tab[385] +#define __pyx_n_u_TupleCoderImpl __pyx_string_tab[386] +#define __pyx_n_u_TupleCoderImpl___reduce_cython __pyx_string_tab[387] +#define __pyx_n_u_TupleCoderImpl___setstate_cython __pyx_string_tab[388] +#define __pyx_n_u_TupleCoderImpl__construct_from_c __pyx_string_tab[389] +#define __pyx_n_u_TupleCoderImpl__extract_componen __pyx_string_tab[390] +#define __pyx_n_u_TupleSequenceCoderImpl __pyx_string_tab[391] +#define __pyx_n_u_TupleSequenceCoderImpl___reduce __pyx_string_tab[392] +#define __pyx_n_u_TupleSequenceCoderImpl___setstat __pyx_string_tab[393] +#define __pyx_n_u_TupleSequenceCoderImpl__construc __pyx_string_tab[394] +#define __pyx_n_u_Type __pyx_string_tab[395] +#define __pyx_n_u_UNKNOWN __pyx_string_tab[396] +#define __pyx_n_u_VarInt32CoderImpl __pyx_string_tab[397] +#define __pyx_n_u_VarInt32CoderImpl___reduce_cytho __pyx_string_tab[398] +#define __pyx_n_u_VarInt32CoderImpl___setstate_cyt __pyx_string_tab[399] +#define __pyx_n_u_VarInt32CoderImpl_decode __pyx_string_tab[400] +#define __pyx_n_u_VarInt32CoderImpl_decode_from_st __pyx_string_tab[401] +#define __pyx_n_u_VarInt32CoderImpl_encode __pyx_string_tab[402] +#define __pyx_n_u_VarInt32CoderImpl_encode_to_stre __pyx_string_tab[403] +#define __pyx_n_u_VarInt32CoderImpl_estimate_size __pyx_string_tab[404] +#define __pyx_n_u_VarIntCoderImpl __pyx_string_tab[405] +#define __pyx_n_u_VarIntCoderImpl___reduce_cython __pyx_string_tab[406] +#define __pyx_n_u_VarIntCoderImpl___setstate_cytho __pyx_string_tab[407] +#define __pyx_n_u_VarIntCoderImpl_decode __pyx_string_tab[408] +#define __pyx_n_u_VarIntCoderImpl_decode_from_stre __pyx_string_tab[409] +#define __pyx_n_u_VarIntCoderImpl_encode __pyx_string_tab[410] +#define __pyx_n_u_VarIntCoderImpl_encode_to_stream __pyx_string_tab[411] +#define __pyx_n_u_VarIntCoderImpl_estimate_size __pyx_string_tab[412] +#define __pyx_n_u_View_MemoryView __pyx_string_tab[413] +#define __pyx_n_u_WindowedValueCoderImpl __pyx_string_tab[414] +#define __pyx_n_u_WindowedValueCoderImpl___reduce __pyx_string_tab[415] +#define __pyx_n_u_WindowedValueCoderImpl___setstat __pyx_string_tab[416] +#define __pyx_n_u_WindowedValueCoderImpl_decode_fr __pyx_string_tab[417] +#define __pyx_n_u_WindowedValueCoderImpl_encode_to __pyx_string_tab[418] +#define __pyx_n_u_WindowedValueCoderImpl_get_estim __pyx_string_tab[419] +#define __pyx_n_u__9 __pyx_string_tab[420] +#define __pyx_n_u_abc __pyx_string_tab[421] +#define __pyx_n_u_allocate_buffer __pyx_string_tab[422] +#define __pyx_n_u_any __pyx_string_tab[423] +#define __pyx_n_u_apache_beam_coders __pyx_string_tab[424] +#define __pyx_n_u_apache_beam_coders_avro_record __pyx_string_tab[425] +#define __pyx_n_u_apache_beam_coders_coder_impl __pyx_string_tab[426] +#define __pyx_n_u_apache_beam_coders_coders __pyx_string_tab[427] +#define __pyx_n_u_apache_beam_internal __pyx_string_tab[428] +#define __pyx_n_u_apache_beam_internal_cloudpickle __pyx_string_tab[429] +#define __pyx_n_u_apache_beam_transforms __pyx_string_tab[430] +#define __pyx_n_u_apache_beam_transforms_window __pyx_string_tab[431] +#define __pyx_n_u_apache_beam_typehints_schemas __pyx_string_tab[432] +#define __pyx_n_u_apache_beam_utils __pyx_string_tab[433] +#define __pyx_n_u_apache_beam_utils_sharded_key __pyx_string_tab[434] +#define __pyx_n_u_apache_beam_utils_timestamp __pyx_string_tab[435] +#define __pyx_n_u_append __pyx_string_tab[436] +#define __pyx_n_u_argsort __pyx_string_tab[437] +#define __pyx_n_u_as_tuple __pyx_string_tab[438] +#define __pyx_n_u_astype __pyx_string_tab[439] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[440] +#define __pyx_n_u_atomic_type __pyx_string_tab[441] +#define __pyx_n_u_axis __pyx_string_tab[442] +#define __pyx_n_u_base __pyx_string_tab[443] +#define __pyx_n_u_base_2 __pyx_string_tab[444] +#define __pyx_n_u_base_error __pyx_string_tab[445] +#define __pyx_n_u_big __pyx_string_tab[446] +#define __pyx_n_u_bit_length __pyx_string_tab[447] +#define __pyx_n_u_bool __pyx_string_tab[448] +#define __pyx_n_u_boolean_coder_impl __pyx_string_tab[449] +#define __pyx_n_u_bs __pyx_string_tab[450] +#define __pyx_n_u_buf __pyx_string_tab[451] +#define __pyx_n_u_byteorder __pyx_string_tab[452] +#define __pyx_n_u_bytes __pyx_string_tab[453] +#define __pyx_n_u_c __pyx_string_tab[454] +#define __pyx_n_u_class __pyx_string_tab[455] +#define __pyx_n_u_class_getitem __pyx_string_tab[456] +#define __pyx_n_u_clear_bit __pyx_string_tab[457] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[458] +#define __pyx_n_u_close __pyx_string_tab[459] +#define __pyx_n_u_cloudpickle __pyx_string_tab[460] +#define __pyx_n_u_cloudpickle_pickler __pyx_string_tab[461] +#define __pyx_n_u_cls __pyx_string_tab[462] +#define __pyx_n_u_coder_impl __pyx_string_tab[463] +#define __pyx_n_u_coder_impl_row_encoders __pyx_string_tab[464] +#define __pyx_n_u_coder_impl_types __pyx_string_tab[465] +#define __pyx_n_u_coder_impls __pyx_string_tab[466] +#define __pyx_n_u_column __pyx_string_tab[467] +#define __pyx_n_u_columns __pyx_string_tab[468] +#define __pyx_n_u_components __pyx_string_tab[469] +#define __pyx_n_u_config __pyx_string_tab[470] +#define __pyx_n_u_construct_from_components __pyx_string_tab[471] +#define __pyx_n_u_construct_from_sequence __pyx_string_tab[472] +#define __pyx_n_u_contents __pyx_string_tab[473] +#define __pyx_n_u_count __pyx_string_tab[474] +#define __pyx_n_u_create __pyx_string_tab[475] +#define __pyx_n_u_create_InputStream __pyx_string_tab[476] +#define __pyx_n_u_create_OutputStream __pyx_string_tab[477] +#define __pyx_n_u_create_opaque_window __pyx_string_tab[478] +#define __pyx_n_u_dataclass_params __pyx_string_tab[479] +#define __pyx_n_u_dataclasses __pyx_string_tab[480] +#define __pyx_n_u_decimal __pyx_string_tab[481] +#define __pyx_n_u_decode __pyx_string_tab[482] +#define __pyx_n_u_decode_all __pyx_string_tab[483] +#define __pyx_n_u_decode_batch_from_stream __pyx_string_tab[484] +#define __pyx_n_u_decode_from_stream __pyx_string_tab[485] +#define __pyx_n_u_decode_nested __pyx_string_tab[486] +#define __pyx_n_u_decoder __pyx_string_tab[487] +#define __pyx_n_u_default_size_estimator __pyx_string_tab[488] +#define __pyx_n_u_deserialize __pyx_string_tab[489] +#define __pyx_n_u_dest __pyx_string_tab[490] +#define __pyx_n_u_deterministic __pyx_string_tab[491] +#define __pyx_n_u_deterministic_encoding_error_ms __pyx_string_tab[492] +#define __pyx_n_u_dict __pyx_string_tab[493] +#define __pyx_n_u_dict_2 __pyx_string_tab[494] +#define __pyx_n_u_dict_value __pyx_string_tab[495] +#define __pyx_n_u_dill __pyx_string_tab[496] +#define __pyx_n_u_doc __pyx_string_tab[497] +#define __pyx_n_u_dtype __pyx_string_tab[498] +#define __pyx_n_u_dtype_is_object __pyx_string_tab[499] +#define __pyx_n_u_dumps __pyx_string_tab[500] +#define __pyx_n_u_dynamic_timer_tag __pyx_string_tab[501] +#define __pyx_n_u_elem __pyx_string_tab[502] +#define __pyx_n_u_elem_coder __pyx_string_tab[503] +#define __pyx_n_u_encode __pyx_string_tab[504] +#define __pyx_n_u_encode_all __pyx_string_tab[505] +#define __pyx_n_u_encode_batch_to_stream __pyx_string_tab[506] +#define __pyx_n_u_encode_nested __pyx_string_tab[507] +#define __pyx_n_u_encode_to_stream __pyx_string_tab[508] +#define __pyx_n_u_encoded __pyx_string_tab[509] +#define __pyx_n_u_encoded_window __pyx_string_tab[510] +#define __pyx_n_u_encoder __pyx_string_tab[511] +#define __pyx_n_u_encoding_position __pyx_string_tab[512] +#define __pyx_n_u_encoding_positions_set __pyx_string_tab[513] +#define __pyx_n_u_end __pyx_string_tab[514] +#define __pyx_n_u_enter __pyx_string_tab[515] +#define __pyx_n_u_enum __pyx_string_tab[516] +#define __pyx_n_u_enumerate __pyx_string_tab[517] +#define __pyx_n_u_eq __pyx_string_tab[518] +#define __pyx_n_u_error __pyx_string_tab[519] +#define __pyx_n_u_estimate_size __pyx_string_tab[520] +#define __pyx_n_u_estimated_size __pyx_string_tab[521] +#define __pyx_n_u_exit __pyx_string_tab[522] +#define __pyx_n_u_exponent __pyx_string_tab[523] +#define __pyx_n_u_extract_components __pyx_string_tab[524] +#define __pyx_n_u_fallback_coder_impl __pyx_string_tab[525] +#define __pyx_n_u_fastavro __pyx_string_tab[526] +#define __pyx_n_u_field __pyx_string_tab[527] +#define __pyx_n_u_field_type __pyx_string_tab[528] +#define __pyx_n_u_fields __pyx_string_tab[529] +#define __pyx_n_u_fields_2 __pyx_string_tab[530] +#define __pyx_n_u_filepath_interceptor __pyx_string_tab[531] +#define __pyx_n_u_fillvalue __pyx_string_tab[532] +#define __pyx_n_u_finalize_write __pyx_string_tab[533] +#define __pyx_n_u_fire_timestamp __pyx_string_tab[534] +#define __pyx_n_u_fits_in_64_bits __pyx_string_tab[535] +#define __pyx_n_u_flags __pyx_string_tab[536] +#define __pyx_n_u_force_use_dill __pyx_string_tab[537] +#define __pyx_n_u_format __pyx_string_tab[538] +#define __pyx_n_u_fortran __pyx_string_tab[539] +#define __pyx_n_u_from_bytes __pyx_string_tab[540] +#define __pyx_n_u_from_proto __pyx_string_tab[541] +#define __pyx_n_u_frozen __pyx_string_tab[542] +#define __pyx_n_u_func __pyx_string_tab[543] +#define __pyx_n_u_genexpr __pyx_string_tab[544] +#define __pyx_n_u_get __pyx_string_tab[545] +#define __pyx_n_u_getLogger __pyx_string_tab[546] +#define __pyx_n_u_get_count __pyx_string_tab[547] +#define __pyx_n_u_get_estimated_size_and_observabl __pyx_string_tab[548] +#define __pyx_n_u_get_impl __pyx_string_tab[549] +#define __pyx_n_u_get_nested_size __pyx_string_tab[550] +#define __pyx_n_u_get_relative_path __pyx_string_tab[551] +#define __pyx_n_u_get_varint_size __pyx_string_tab[552] +#define __pyx_n_u_getstate __pyx_string_tab[553] +#define __pyx_n_u_getvalue __pyx_string_tab[554] +#define __pyx_n_u_hash __pyx_string_tab[555] +#define __pyx_n_u_head __pyx_string_tab[556] +#define __pyx_n_u_head_2 __pyx_string_tab[557] +#define __pyx_n_u_hold_timestamp __pyx_string_tab[558] +#define __pyx_n_u_i __pyx_string_tab[559] +#define __pyx_n_u_id __pyx_string_tab[560] +#define __pyx_n_u_id_generator __pyx_string_tab[561] +#define __pyx_n_u_import __pyx_string_tab[562] +#define __pyx_n_u_in __pyx_string_tab[563] +#define __pyx_n_u_in_stream __pyx_string_tab[564] +#define __pyx_n_u_index __pyx_string_tab[565] +#define __pyx_n_u_init __pyx_string_tab[566] +#define __pyx_n_u_init_2 __pyx_string_tab[567] +#define __pyx_n_u_init___locals_genexpr __pyx_string_tab[568] +#define __pyx_n_u_inner_size __pyx_string_tab[569] +#define __pyx_n_u_input_stream __pyx_string_tab[570] +#define __pyx_n_u_int __pyx_string_tab[571] +#define __pyx_n_u_io __pyx_string_tab[572] +#define __pyx_n_u_is_coroutine __pyx_string_tab[573] +#define __pyx_n_u_is_dataclass __pyx_string_tab[574] +#define __pyx_n_u_is_deterministic __pyx_string_tab[575] +#define __pyx_n_u_is_first __pyx_string_tab[576] +#define __pyx_n_u_is_last __pyx_string_tab[577] +#define __pyx_n_u_islice __pyx_string_tab[578] +#define __pyx_n_u_items __pyx_string_tab[579] +#define __pyx_n_u_itemsize __pyx_string_tab[580] +#define __pyx_n_u_iter __pyx_string_tab[581] +#define __pyx_n_u_iterable_coder_uses_abstract_it __pyx_string_tab[582] +#define __pyx_n_u_itertools __pyx_string_tab[583] +#define __pyx_n_u_json __pyx_string_tab[584] +#define __pyx_n_u_key __pyx_string_tab[585] +#define __pyx_n_u_key_coder __pyx_string_tab[586] +#define __pyx_n_u_key_coder_impl __pyx_string_tab[587] +#define __pyx_n_u_key_coder_impl_2 __pyx_string_tab[588] +#define __pyx_n_u_kw_only __pyx_string_tab[589] +#define __pyx_n_u_lambda __pyx_string_tab[590] +#define __pyx_n_u_len __pyx_string_tab[591] +#define __pyx_n_u_length __pyx_string_tab[592] +#define __pyx_n_u_loads __pyx_string_tab[593] +#define __pyx_n_u_logging __pyx_string_tab[594] +#define __pyx_n_u_logical_type __pyx_string_tab[595] +#define __pyx_n_u_main __pyx_string_tab[596] +#define __pyx_n_u_max_timestamp __pyx_string_tab[597] +#define __pyx_n_u_memview __pyx_string_tab[598] +#define __pyx_n_u_message_types __pyx_string_tab[599] +#define __pyx_n_u_metaclass __pyx_string_tab[600] +#define __pyx_n_u_micros __pyx_string_tab[601] +#define __pyx_n_u_mode __pyx_string_tab[602] +#define __pyx_n_u_module __pyx_string_tab[603] +#define __pyx_n_u_mro_entries __pyx_string_tab[604] +#define __pyx_n_u_name __pyx_string_tab[605] +#define __pyx_n_u_name_2 __pyx_string_tab[606] +#define __pyx_n_u_named_tuple_from_schema __pyx_string_tab[607] +#define __pyx_n_u_ndim __pyx_string_tab[608] +#define __pyx_n_u_nested __pyx_string_tab[609] +#define __pyx_n_u_new __pyx_string_tab[610] +#define __pyx_n_u_next __pyx_string_tab[611] +#define __pyx_n_u_nonspeculative_index __pyx_string_tab[612] +#define __pyx_n_u_np __pyx_string_tab[613] +#define __pyx_n_u_null_flags __pyx_string_tab[614] +#define __pyx_n_u_null_indicator __pyx_string_tab[615] +#define __pyx_n_u_nullable __pyx_string_tab[616] +#define __pyx_n_u_numpy __pyx_string_tab[617] +#define __pyx_n_u_obj __pyx_string_tab[618] +#define __pyx_n_u_object __pyx_string_tab[619] +#define __pyx_n_u_observable __pyx_string_tab[620] +#define __pyx_n_u_other __pyx_string_tab[621] +#define __pyx_n_u_out __pyx_string_tab[622] +#define __pyx_n_u_pack __pyx_string_tab[623] +#define __pyx_n_u_pane_info __pyx_string_tab[624] +#define __pyx_n_u_pane_info_coder_impl __pyx_string_tab[625] +#define __pyx_n_u_paneinfo __pyx_string_tab[626] +#define __pyx_n_u_parse_schema __pyx_string_tab[627] +#define __pyx_n_u_parsed_schema __pyx_string_tab[628] +#define __pyx_n_u_payload __pyx_string_tab[629] +#define __pyx_n_u_pb __pyx_string_tab[630] +#define __pyx_n_u_pickle __pyx_string_tab[631] +#define __pyx_n_u_pop __pyx_string_tab[632] +#define __pyx_n_u_prepare __pyx_string_tab[633] +#define __pyx_n_u_proto __pyx_string_tab[634] +#define __pyx_n_u_proto_message __pyx_string_tab[635] +#define __pyx_n_u_proto_message_type __pyx_string_tab[636] +#define __pyx_n_u_proto_plus_type __pyx_string_tab[637] +#define __pyx_n_u_proto_utils __pyx_string_tab[638] +#define __pyx_n_u_pyx_capi __pyx_string_tab[639] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[640] +#define __pyx_n_u_pyx_result __pyx_string_tab[641] +#define __pyx_n_u_pyx_state __pyx_string_tab[642] +#define __pyx_n_u_pyx_type __pyx_string_tab[643] +#define __pyx_n_u_pyx_unpickle_AbstractComponent __pyx_string_tab[644] +#define __pyx_n_u_pyx_unpickle_BigEndianShortCod __pyx_string_tab[645] +#define __pyx_n_u_pyx_unpickle_BigIntegerCoderIm __pyx_string_tab[646] +#define __pyx_n_u_pyx_unpickle_BooleanCoderImpl __pyx_string_tab[647] +#define __pyx_n_u_pyx_unpickle_BytesCoderImpl __pyx_string_tab[648] +#define __pyx_n_u_pyx_unpickle_CallbackCoderImpl __pyx_string_tab[649] +#define __pyx_n_u_pyx_unpickle_CoderImpl __pyx_string_tab[650] +#define __pyx_n_u_pyx_unpickle_DecimalCoderImpl __pyx_string_tab[651] +#define __pyx_n_u_pyx_unpickle_Enum __pyx_string_tab[652] +#define __pyx_n_u_pyx_unpickle_FastPrimitivesCod __pyx_string_tab[653] +#define __pyx_n_u_pyx_unpickle_FloatCoderImpl __pyx_string_tab[654] +#define __pyx_n_u_pyx_unpickle_GenericRowColumnE __pyx_string_tab[655] +#define __pyx_n_u_pyx_unpickle_IntervalWindowCod __pyx_string_tab[656] +#define __pyx_n_u_pyx_unpickle_IterableCoderImpl __pyx_string_tab[657] +#define __pyx_n_u_pyx_unpickle_LengthPrefixCoder __pyx_string_tab[658] +#define __pyx_n_u_pyx_unpickle_ListCoderImpl __pyx_string_tab[659] +#define __pyx_n_u_pyx_unpickle_LogicalTypeCoderI __pyx_string_tab[660] +#define __pyx_n_u_pyx_unpickle_MapCoderImpl __pyx_string_tab[661] +#define __pyx_n_u_pyx_unpickle_PaneInfoCoderImpl __pyx_string_tab[662] +#define __pyx_n_u_pyx_unpickle_ParamWindowedValu __pyx_string_tab[663] +#define __pyx_n_u_pyx_unpickle_RowCoderImpl __pyx_string_tab[664] +#define __pyx_n_u_pyx_unpickle_RowColumnEncoder __pyx_string_tab[665] +#define __pyx_n_u_pyx_unpickle_SequenceCoderImpl __pyx_string_tab[666] +#define __pyx_n_u_pyx_unpickle_SimpleCoderImpl __pyx_string_tab[667] +#define __pyx_n_u_pyx_unpickle_SinglePrecisionFl __pyx_string_tab[668] +#define __pyx_n_u_pyx_unpickle_SingletonCoderImp __pyx_string_tab[669] +#define __pyx_n_u_pyx_unpickle_StreamCoderImpl __pyx_string_tab[670] +#define __pyx_n_u_pyx_unpickle_TimestampCoderImp __pyx_string_tab[671] +#define __pyx_n_u_pyx_unpickle_TupleCoderImpl __pyx_string_tab[672] +#define __pyx_n_u_pyx_unpickle_TupleSequenceCode __pyx_string_tab[673] +#define __pyx_n_u_pyx_unpickle_VarInt32CoderImpl __pyx_string_tab[674] +#define __pyx_n_u_pyx_unpickle_VarIntCoderImpl __pyx_string_tab[675] +#define __pyx_n_u_pyx_unpickle_WindowedValueCode __pyx_string_tab[676] +#define __pyx_n_u_pyx_unpickle__AbstractIterable __pyx_string_tab[677] +#define __pyx_n_u_pyx_unpickle__OrderedUnionCode __pyx_string_tab[678] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[679] +#define __pyx_n_u_qualname __pyx_string_tab[680] +#define __pyx_n_u_read_all __pyx_string_tab[681] +#define __pyx_n_u_read_byte __pyx_string_tab[682] +#define __pyx_n_u_read_state __pyx_string_tab[683] +#define __pyx_n_u_record __pyx_string_tab[684] +#define __pyx_n_u_reduce __pyx_string_tab[685] +#define __pyx_n_u_reduce_cython __pyx_string_tab[686] +#define __pyx_n_u_reduce_ex __pyx_string_tab[687] +#define __pyx_n_u_register __pyx_string_tab[688] +#define __pyx_n_u_register_iterable_like_type __pyx_string_tab[689] +#define __pyx_n_u_repr __pyx_string_tab[690] +#define __pyx_n_u_representation_coder __pyx_string_tab[691] +#define __pyx_n_u_requires_deterministic_step_labe __pyx_string_tab[692] +#define __pyx_n_u_return __pyx_string_tab[693] +#define __pyx_n_u_row_coders_registered __pyx_string_tab[694] +#define __pyx_n_u_row_column_encoders __pyx_string_tab[695] +#define __pyx_n_u_scaleb __pyx_string_tab[696] +#define __pyx_n_u_schema __pyx_string_tab[697] +#define __pyx_n_u_schemaless_reader __pyx_string_tab[698] +#define __pyx_n_u_schemaless_writer __pyx_string_tab[699] +#define __pyx_n_u_self __pyx_string_tab[700] +#define __pyx_n_u_send __pyx_string_tab[701] +#define __pyx_n_u_set_name __pyx_string_tab[702] +#define __pyx_n_u_setdefault __pyx_string_tab[703] +#define __pyx_n_u_setstate __pyx_string_tab[704] +#define __pyx_n_u_setstate_cython __pyx_string_tab[705] +#define __pyx_n_u_shape __pyx_string_tab[706] +#define __pyx_n_u_shard_id __pyx_string_tab[707] +#define __pyx_n_u_shard_id_2 __pyx_string_tab[708] +#define __pyx_n_u_shard_id_coder_impl __pyx_string_tab[709] +#define __pyx_n_u_signed __pyx_string_tab[710] +#define __pyx_n_u_size __pyx_string_tab[711] +#define __pyx_n_u_size_estimator __pyx_string_tab[712] +#define __pyx_n_u_skip_reset_dynamic_type_state __pyx_string_tab[713] +#define __pyx_n_u_slow_stream __pyx_string_tab[714] +#define __pyx_n_u_start __pyx_string_tab[715] +#define __pyx_n_u_state __pyx_string_tab[716] +#define __pyx_n_u_staticmethod __pyx_string_tab[717] +#define __pyx_n_u_step __pyx_string_tab[718] +#define __pyx_n_u_stop __pyx_string_tab[719] +#define __pyx_n_u_stream __pyx_string_tab[720] +#define __pyx_n_u_struct __pyx_string_tab[721] +#define __pyx_n_u_successor __pyx_string_tab[722] +#define __pyx_n_u_sum __pyx_string_tab[723] +#define __pyx_n_u_super __pyx_string_tab[724] +#define __pyx_n_u_t __pyx_string_tab[725] +#define __pyx_n_u_tag_coder_impl __pyx_string_tab[726] +#define __pyx_n_u_tail __pyx_string_tab[727] +#define __pyx_n_u_tail_2 __pyx_string_tab[728] +#define __pyx_n_u_test __pyx_string_tab[729] +#define __pyx_n_u_throw __pyx_string_tab[730] +#define __pyx_n_u_timestamp __pyx_string_tab[731] +#define __pyx_n_u_timestamp_coder __pyx_string_tab[732] +#define __pyx_n_u_timestamp_coder_impl __pyx_string_tab[733] +#define __pyx_n_u_timestamp_micros __pyx_string_tab[734] +#define __pyx_n_u_timing __pyx_string_tab[735] +#define __pyx_n_u_to_bytes __pyx_string_tab[736] +#define __pyx_n_u_to_language_type __pyx_string_tab[737] +#define __pyx_n_u_to_representation_type __pyx_string_tab[738] +#define __pyx_n_u_typ __pyx_string_tab[739] +#define __pyx_n_u_type __pyx_string_tab[740] +#define __pyx_n_u_typing __pyx_string_tab[741] +#define __pyx_n_u_uint8 __pyx_string_tab[742] +#define __pyx_n_u_unpack __pyx_string_tab[743] +#define __pyx_n_u_unpickle_named_tuple __pyx_string_tab[744] +#define __pyx_n_u_unpickle_named_tuple_2_67_0 __pyx_string_tab[745] +#define __pyx_n_u_unpickle_type __pyx_string_tab[746] +#define __pyx_n_u_unpickle_type_2_67_0 __pyx_string_tab[747] +#define __pyx_n_u_unpickle_type_2_67_0_locals_lam __pyx_string_tab[748] +#define __pyx_n_u_unused_value __pyx_string_tab[749] +#define __pyx_n_u_update __pyx_string_tab[750] +#define __pyx_n_u_use_abstract_iterable __pyx_string_tab[751] +#define __pyx_n_u_use_relative_filepaths __pyx_string_tab[752] +#define __pyx_n_u_use_setstate __pyx_string_tab[753] +#define __pyx_n_u_user_key __pyx_string_tab[754] +#define __pyx_n_u_userstate __pyx_string_tab[755] +#define __pyx_n_u_value __pyx_string_tab[756] +#define __pyx_n_u_value_coder __pyx_string_tab[757] +#define __pyx_n_u_value_coder_2 __pyx_string_tab[758] +#define __pyx_n_u_values __pyx_string_tab[759] +#define __pyx_n_u_verify_dill_compat __pyx_string_tab[760] +#define __pyx_n_u_version __pyx_string_tab[761] +#define __pyx_n_u_warning __pyx_string_tab[762] +#define __pyx_n_u_window_coder __pyx_string_tab[763] +#define __pyx_n_u_window_coder_impl __pyx_string_tab[764] +#define __pyx_n_u_window_coder_impl_2 __pyx_string_tab[765] +#define __pyx_n_u_windowed_value __pyx_string_tab[766] +#define __pyx_n_u_windowed_value_coder __pyx_string_tab[767] +#define __pyx_n_u_windows __pyx_string_tab[768] +#define __pyx_n_u_windows_coder_impl __pyx_string_tab[769] +#define __pyx_n_u_write __pyx_string_tab[770] +#define __pyx_n_u_write_byte __pyx_string_tab[771] +#define __pyx_n_u_write_state __pyx_string_tab[772] +#define __pyx_n_u_write_state_threshold __pyx_string_tab[773] +#define __pyx_n_u_wv __pyx_string_tab[774] +#define __pyx_n_u_x __pyx_string_tab[775] +#define __pyx_n_u_zeros __pyx_string_tab[776] +#define __pyx_n_u_zip __pyx_string_tab[777] +#define __pyx_n_u_zip_longest __pyx_string_tab[778] +#define __pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P __pyx_string_tab[779] +#define __pyx_kp_b_PyObject_int_int64_t_uint64_t_un __pyx_string_tab[780] +#define __pyx_kp_b__7 __pyx_string_tab[781] +#define __pyx_kp_b__8 __pyx_string_tab[782] +#define __pyx_kp_b__9 __pyx_string_tab[783] +#define __pyx_kp_b_iso88591_0_q __pyx_string_tab[784] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[785] +#define __pyx_kp_b_iso88591_1E_Rwa_a_a_1_B_b0C3a_U_2_a_ar_a __pyx_string_tab[786] +#define __pyx_kp_b_iso88591_1F __pyx_string_tab[787] +#define __pyx_kp_b_iso88591_1F_2 __pyx_string_tab[788] +#define __pyx_kp_b_iso88591_1L_4q __pyx_string_tab[789] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[790] +#define __pyx_kp_b_iso88591_1_3 __pyx_string_tab[791] +#define __pyx_kp_b_iso88591_1_4 __pyx_string_tab[792] +#define __pyx_kp_b_iso88591_1_5 __pyx_string_tab[793] +#define __pyx_kp_b_iso88591_1_6 __pyx_string_tab[794] +#define __pyx_kp_b_iso88591_1_D_Qa_1D_Qd_U_1_s_Q_i_a_i_a_l __pyx_string_tab[795] +#define __pyx_kp_b_iso88591_1_D_S_oQe1_s_oQe1_oQe1_1 __pyx_string_tab[796] +#define __pyx_kp_b_iso88591_1_d_D_WAQ_2_Ba __pyx_string_tab[797] +#define __pyx_kp_b_iso88591_1_q_war_a_1A_1G4s_1D __pyx_string_tab[798] +#define __pyx_kp_b_iso88591_2Q_M_q_z __pyx_string_tab[799] +#define __pyx_kp_b_iso88591_2_6 __pyx_string_tab[800] +#define __pyx_kp_b_iso88591_31F __pyx_string_tab[801] +#define __pyx_kp_b_iso88591_31_q_2_1_5Qa_r __pyx_string_tab[802] +#define __pyx_kp_b_iso88591_3a_a_auA __pyx_string_tab[803] +#define __pyx_kp_b_iso88591_3at7_1 __pyx_string_tab[804] +#define __pyx_kp_b_iso88591_3awb __pyx_string_tab[805] +#define __pyx_kp_b_iso88591_4AV1 __pyx_string_tab[806] +#define __pyx_kp_b_iso88591_4_1A __pyx_string_tab[807] +#define __pyx_kp_b_iso88591_4_1_A_wc_2Rr_AT_CuIQd __pyx_string_tab[808] +#define __pyx_kp_b_iso88591_4_5Q_M_0_a __pyx_string_tab[809] +#define __pyx_kp_b_iso88591_4_5Qha __pyx_string_tab[810] +#define __pyx_kp_b_iso88591_4_5Qj __pyx_string_tab[811] +#define __pyx_kp_b_iso88591_4_Q_4A __pyx_string_tab[812] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[813] +#define __pyx_kp_b_iso88591_4q_2 __pyx_string_tab[814] +#define __pyx_kp_b_iso88591_4q_c_Qa __pyx_string_tab[815] +#define __pyx_kp_b_iso88591_4wavYaq __pyx_string_tab[816] +#define __pyx_kp_b_iso88591_4xs __pyx_string_tab[817] +#define __pyx_kp_b_iso88591_4y __pyx_string_tab[818] +#define __pyx_kp_b_iso88591_4y_y __pyx_string_tab[819] +#define __pyx_kp_b_iso88591_4z_1_e1A_vQgQ __pyx_string_tab[820] +#define __pyx_kp_b_iso88591_5 __pyx_string_tab[821] +#define __pyx_kp_b_iso88591_5QfA __pyx_string_tab[822] +#define __pyx_kp_b_iso88591_5_1 __pyx_string_tab[823] +#define __pyx_kp_b_iso88591_5_2 __pyx_string_tab[824] +#define __pyx_kp_b_iso88591_5_3 __pyx_string_tab[825] +#define __pyx_kp_b_iso88591_5_QnA __pyx_string_tab[826] +#define __pyx_kp_b_iso88591_5__Cq_2R_aq __pyx_string_tab[827] +#define __pyx_kp_b_iso88591_5__Cq_a_a_s_q __pyx_string_tab[828] +#define __pyx_kp_b_iso88591_6 __pyx_string_tab[829] +#define __pyx_kp_b_iso88591_6_q_IQha __pyx_string_tab[830] +#define __pyx_kp_b_iso88591_7_aq __pyx_string_tab[831] +#define __pyx_kp_b_iso88591_8_q __pyx_string_tab[832] +#define __pyx_kp_b_iso88591_9 __pyx_string_tab[833] +#define __pyx_kp_b_iso88591_9IQa __pyx_string_tab[834] +#define __pyx_kp_b_iso88591_9O1 __pyx_string_tab[835] +#define __pyx_kp_b_iso88591_9O1_4_G1IU_1 __pyx_string_tab[836] +#define __pyx_kp_b_iso88591_9_2 __pyx_string_tab[837] +#define __pyx_kp_b_iso88591_9_3 __pyx_string_tab[838] +#define __pyx_kp_b_iso88591_9_Q_U_1_D_a_d_2_a_AWA_1 __pyx_string_tab[839] +#define __pyx_kp_b_iso88591_9_uCq_l_Qk_e5_i_a_F_A_E_aq_l_Qk __pyx_string_tab[840] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[841] +#define __pyx_kp_b_iso88591_AQ __pyx_string_tab[842] +#define __pyx_kp_b_iso88591_AQ_A_M_4AQ_Zq __pyx_string_tab[843] +#define __pyx_kp_b_iso88591_AQ_vS_Kq_3a_A_4_T_Q_T_q_k_aq_k __pyx_string_tab[844] +#define __pyx_kp_b_iso88591_AU_2Q_1E_q_A_Q __pyx_string_tab[845] +#define __pyx_kp_b_iso88591_AV1 __pyx_string_tab[846] +#define __pyx_kp_b_iso88591_AXT __pyx_string_tab[847] +#define __pyx_kp_b_iso88591_AY_DA_z_Bc_0_1_3_3a_1_d_4A_8_A __pyx_string_tab[848] +#define __pyx_kp_b_iso88591_A_A_5_q_s_S_Q_s_i_a_XS_oQ_q_s_i __pyx_string_tab[849] +#define __pyx_kp_b_iso88591_A_D_Qa_1D_QgWA_t1_b_b_4_V2Q_t_r __pyx_string_tab[850] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_0_AWKwa_0_A __pyx_string_tab[851] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg __pyx_string_tab[852] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_2_awk_PQ_2 __pyx_string_tab[853] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1 __pyx_string_tab[854] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_8_AWKwVW_8 __pyx_string_tab[855] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_awk_awk __pyx_string_tab[856] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_U_d_7_U __pyx_string_tab[857] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G __pyx_string_tab[858] +#define __pyx_kp_b_iso88591_A_M_1A_Zq __pyx_string_tab[859] +#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[860] +#define __pyx_kp_b_iso88591_A_s_Q_3a_j_T_9_Q_m1A_Q_Q __pyx_string_tab[861] +#define __pyx_kp_b_iso88591_Cq_vS_Q_s_Q_A_r __pyx_string_tab[862] +#define __pyx_kp_b_iso88591_D_0_A_t_Kt1 __pyx_string_tab[863] +#define __pyx_kp_b_iso88591_D_1_1 __pyx_string_tab[864] +#define __pyx_kp_b_iso88591_D_9O3nCq_S_s_q_s_q_q_q_r __pyx_string_tab[865] +#define __pyx_kp_b_iso88591_D_WAQ_q_1A_vQa __pyx_string_tab[866] +#define __pyx_kp_b_iso88591_E_1 __pyx_string_tab[867] +#define __pyx_kp_b_iso88591_IYaq_3k_7 __pyx_string_tab[868] +#define __pyx_kp_b_iso88591_IZq_vS_Q_s_Q_A_r __pyx_string_tab[869] +#define __pyx_kp_b_iso88591_I_A_I_A_q_O9E_U_t_T_D_1A_Bc_2_1 __pyx_string_tab[870] +#define __pyx_kp_b_iso88591_I_A_a_G81JgQaq_1 __pyx_string_tab[871] +#define __pyx_kp_b_iso88591_Ks __pyx_string_tab[872] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[873] +#define __pyx_kp_b_iso88591_Q_1G5_3d __pyx_string_tab[874] +#define __pyx_kp_b_iso88591_Q_4_QgYa __pyx_string_tab[875] +#define __pyx_kp_b_iso88591_Q_Q_a_z_1_Rwd_l_Q_1_Q_1 __pyx_string_tab[876] +#define __pyx_kp_b_iso88591_Q_T_Qa_Q_U_3c_a_m1A_a_A_s_Bb_Qd __pyx_string_tab[877] +#define __pyx_kp_b_iso88591_Q_Zq_t1 __pyx_string_tab[878] +#define __pyx_kp_b_iso88591_Q_a_3d __pyx_string_tab[879] +#define __pyx_kp_b_iso88591_Q_q_N_5_gQ_1 __pyx_string_tab[880] +#define __pyx_kp_b_iso88591_Q_r_IS_Zq __pyx_string_tab[881] +#define __pyx_kp_b_iso88591_Q_z_1_S_4_QgYa __pyx_string_tab[882] +#define __pyx_kp_b_iso88591_Q_z_1_S_Q_Q_M_A_a_1_1 __pyx_string_tab[883] +#define __pyx_kp_b_iso88591_Q_z_1_S_Q_Q_M_A_a_1_1E1DA_O_1E1 __pyx_string_tab[884] +#define __pyx_kp_b_iso88591_Q_z_1_S_a_3j_A __pyx_string_tab[885] +#define __pyx_kp_b_iso88591_Qa __pyx_string_tab[886] +#define __pyx_kp_b_iso88591_Qc_t1_y_az_q_K_e1_M_7_q_y_K_e1 __pyx_string_tab[887] +#define __pyx_kp_b_iso88591_Qd __pyx_string_tab[888] +#define __pyx_kp_b_iso88591_Qd_1 __pyx_string_tab[889] +#define __pyx_kp_b_iso88591_Qd_81_a_q_T_1_a_S __pyx_string_tab[890] +#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[891] +#define __pyx_kp_b_iso88591_QgYgT_1 __pyx_string_tab[892] +#define __pyx_kp_b_iso88591_T_4q_G1F_a_vWE_Q_q_t_S_RRYY_aae __pyx_string_tab[893] +#define __pyx_kp_b_iso88591_T_A_G1F_a_vWE_Q_q_t_S_RRYYZ_q_5 __pyx_string_tab[894] +#define __pyx_kp_b_iso88591_T_D_4_dRS_G1F_a_vWE_Q_q_t_WE_D __pyx_string_tab[895] +#define __pyx_kp_b_iso88591_T_D_4q_G1F_a_vWE_Q_q_t_WE_D_cQU __pyx_string_tab[896] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t87_q_34q_QR_34 __pyx_string_tab[897] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_G1_q_34q_QR_3 __pyx_string_tab[898] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_gQ_q_2_awk_PQ __pyx_string_tab[899] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_4q_RYYZ_4q __pyx_string_tab[900] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_6d_7_WTU_6d __pyx_string_tab[901] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_t1G_gQ_t1G __pyx_string_tab[902] +#define __pyx_kp_b_iso88591_T_Qa_s_4_c_AQ_Jaq_U_3c_a_m1A_U __pyx_string_tab[903] +#define __pyx_kp_b_iso88591_T_Qd_AV_fAQ __pyx_string_tab[904] +#define __pyx_kp_b_iso88591_T_T_d_G1F_a_vWE_Q_q_t_we3d_q_q __pyx_string_tab[905] +#define __pyx_kp_b_iso88591_T_a_A_T_c_a_AT __pyx_string_tab[906] +#define __pyx_kp_b_iso88591_T_d_4I_Mnnr_s_P_P_T_T_b_b_f_f_w __pyx_string_tab[907] +#define __pyx_kp_b_iso88591_T_d_5T_dJ_aapptt_D_D_E_G1F_a_vW __pyx_string_tab[908] +#define __pyx_kp_b_iso88591_T_d_G1F_a_vWE_Q_q_t_we3d_q_8_AW __pyx_string_tab[909] +#define __pyx_kp_b_iso88591_T_t_5NdRaaeef_G1F_a_vWE_Q_q_t_u __pyx_string_tab[910] +#define __pyx_kp_b_iso88591_T_t_D_VVZZ_C_C_a_G1F_a_vWE_Q_q __pyx_string_tab[911] +#define __pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW __pyx_string_tab[912] +#define __pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW_2 __pyx_string_tab[913] +#define __pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW_3 __pyx_string_tab[914] +#define __pyx_kp_b_iso88591_U_Q_wc_wb_wb_Qa __pyx_string_tab[915] +#define __pyx_kp_b_iso88591_WAXQ __pyx_string_tab[916] +#define __pyx_kp_b_iso88591_Y_1_wb_wb_wb_9AWG2Q __pyx_string_tab[917] +#define __pyx_kp_b_iso88591_Yj_c_Q_Q_4q_T_1_Q_Ja_B __pyx_string_tab[918] +#define __pyx_kp_b_iso88591__13 __pyx_string_tab[919] +#define __pyx_kp_b_iso88591__14 __pyx_string_tab[920] +#define __pyx_kp_b_iso88591__15 __pyx_string_tab[921] +#define __pyx_kp_b_iso88591__16 __pyx_string_tab[922] +#define __pyx_kp_b_iso88591__17 __pyx_string_tab[923] +#define __pyx_kp_b_iso88591__18 __pyx_string_tab[924] +#define __pyx_kp_b_iso88591__19 __pyx_string_tab[925] +#define __pyx_kp_b_iso88591_a __pyx_string_tab[926] +#define __pyx_kp_b_iso88591_a_1 __pyx_string_tab[927] +#define __pyx_kp_b_iso88591_a_3j __pyx_string_tab[928] +#define __pyx_kp_b_iso88591_a_Ry_a __pyx_string_tab[929] +#define __pyx_kp_b_iso88591_a_V4q __pyx_string_tab[930] +#define __pyx_kp_b_iso88591_a_a __pyx_string_tab[931] +#define __pyx_kp_b_iso88591_a_s_awd_e3e5_5 __pyx_string_tab[932] +#define __pyx_kp_b_iso88591_a_t1D __pyx_string_tab[933] +#define __pyx_kp_b_iso88591_aq __pyx_string_tab[934] +#define __pyx_kp_b_iso88591_ar_a __pyx_string_tab[935] +#define __pyx_kp_b_iso88591_as_A __pyx_string_tab[936] +#define __pyx_kp_b_iso88591_auL_Q_vU __pyx_string_tab[937] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[938] +#define __pyx_kp_b_iso88591_b_1HA_4_5Qha __pyx_string_tab[939] +#define __pyx_kp_b_iso88591_b_1HA_Zt6_1 __pyx_string_tab[940] +#define __pyx_kp_b_iso88591_b_T_AWHA __pyx_string_tab[941] +#define __pyx_kp_b_iso88591_b_T_q __pyx_string_tab[942] +#define __pyx_kp_b_iso88591_d_1_V9AT_A_aq_D_Qa_7_q_3a_j_AQ __pyx_string_tab[943] +#define __pyx_kp_b_iso88591_d_4q_Rs_q_t6_q_V4was_fAV6_1_q __pyx_string_tab[944] +#define __pyx_kp_b_iso88591_h_q_N_5_d_1E __pyx_string_tab[945] +#define __pyx_kp_b_iso88591_h_q_N_5_d_QgQ __pyx_string_tab[946] +#define __pyx_kp_b_iso88591_j_r_A_Q_3a_V_3a_V_3a_V9AQ_3a_V9 __pyx_string_tab[947] +#define __pyx_kp_b_iso88591_k __pyx_string_tab[948] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[949] +#define __pyx_kp_b_iso88591_q_0_kQR_0_7_q_nno_1 __pyx_string_tab[950] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1 __pyx_string_tab[951] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1 __pyx_string_tab[952] +#define __pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1 __pyx_string_tab[953] +#define __pyx_kp_b_iso88591_q_0_kQR_7_7q8PP___1 __pyx_string_tab[954] +#define __pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1 __pyx_string_tab[955] +#define __pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1 __pyx_string_tab[956] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1 __pyx_string_tab[957] +#define __pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1 __pyx_string_tab[958] +#define __pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1 __pyx_string_tab[959] +#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1 __pyx_string_tab[960] +#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_ZZhhi_1 __pyx_string_tab[961] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1 __pyx_string_tab[962] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1 __pyx_string_tab[963] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1 __pyx_string_tab[964] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_a_nA_1 __pyx_string_tab[965] +#define __pyx_kp_b_iso88591_q_1 __pyx_string_tab[966] +#define __pyx_kp_b_iso88591_q_1_2 __pyx_string_tab[967] +#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[968] +#define __pyx_kp_b_iso88591_q_2Q __pyx_string_tab[969] +#define __pyx_kp_b_iso88591_q_4uAQ __pyx_string_tab[970] +#define __pyx_kp_b_iso88591_q_A_AWAWF_hd_t1_5_1_a_2T_Rs_Q_C __pyx_string_tab[971] +#define __pyx_kp_b_iso88591_q_C5_Qe_U_Qe_uA_t5_1_Q_1_Q_1_q __pyx_string_tab[972] +#define __pyx_kp_b_iso88591_q_a __pyx_string_tab[973] +#define __pyx_kp_b_iso88591_q_a_2 __pyx_string_tab[974] +#define __pyx_kp_b_iso88591_q_q_Yl_k_q_Q_m_1 __pyx_string_tab[975] +#define __pyx_kp_b_iso88591_q_t_6a_q_1_d_9_Q_1Kq_q_YfA_1_A __pyx_string_tab[976] +#define __pyx_kp_b_iso88591_r __pyx_string_tab[977] +#define __pyx_kp_b_iso88591_s_9Cq_Qa_3d_q __pyx_string_tab[978] +#define __pyx_kp_b_iso88591_t1_1_2_q_q_Rt_1C_Q_q_r_O1_1 __pyx_string_tab[979] +#define __pyx_kp_b_iso88591_t1_Q_r __pyx_string_tab[980] +#define __pyx_kp_b_iso88591_t1_aq_Q __pyx_string_tab[981] +#define __pyx_kp_b_iso88591_t1_q_a_3m4r_V1_8_Q __pyx_string_tab[982] +#define __pyx_kp_b_iso88591_t_1Kq_1_Q_Qd_y __pyx_string_tab[983] +#define __pyx_kp_b_iso88591_vRq_fBb_3b_3a_U_S_S_E_JgWA_vQoQ __pyx_string_tab[984] +#define __pyx_kp_b_iso88591_vS_AT_AT_Q __pyx_string_tab[985] +#define __pyx_kp_b_iso88591_wawk_T_s_q_1A_L_Q_r_3a_T_t1_9A __pyx_string_tab[986] +#define __pyx_kp_b_struct___pyx_obj_11apache_beam_5 __pyx_string_tab[987] +#define __pyx_n_b_O __pyx_string_tab[988] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_neg_1 __pyx_number_tab[1] +#define __pyx_int_1 __pyx_number_tab[2] +#define __pyx_int_2 __pyx_number_tab[3] +#define __pyx_int_4 __pyx_number_tab[4] +#define __pyx_int_8 __pyx_number_tab[5] +#define __pyx_int_103 __pyx_number_tab[6] +#define __pyx_int_104 __pyx_number_tab[7] +#define __pyx_int_105 __pyx_number_tab[8] +#define __pyx_int_1000 __pyx_number_tab[9] +#define __pyx_int_12345 __pyx_number_tab[10] +#define __pyx_int_65536 __pyx_number_tab[11] +#define __pyx_int_4374576 __pyx_number_tab[12] +#define __pyx_int_45818781 __pyx_number_tab[13] +#define __pyx_int_51847764 __pyx_number_tab[14] +#define __pyx_int_107408500 __pyx_number_tab[15] +#define __pyx_int_112010984 __pyx_number_tab[16] +#define __pyx_int_113116285 __pyx_number_tab[17] +#define __pyx_int_120365723 __pyx_number_tab[18] +#define __pyx_int_125553672 __pyx_number_tab[19] +#define __pyx_int_125584289 __pyx_number_tab[20] +#define __pyx_int_134056825 __pyx_number_tab[21] +#define __pyx_int_136983863 __pyx_number_tab[22] +#define __pyx_int_140927196 __pyx_number_tab[23] +#define __pyx_int_192480703 __pyx_number_tab[24] +#define __pyx_int_196964917 __pyx_number_tab[25] +#define __pyx_int_238750788 __pyx_number_tab[26] +#define __pyx_int_254493075 __pyx_number_tab[27] +#define __pyx_int_260527683 __pyx_number_tab[28] +#define __pyx_int_264067927 __pyx_number_tab[29] +#define __pyx_int_4294967295 __pyx_number_tab[30] +#define __pyx_int_0x7fffffffffffffff __pyx_number_tab[31] +#define __pyx_int_neg_9223372036854775808 __pyx_number_tab[32] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr); + Py_CLEAR(clear_module_state->__pyx_array_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_array); + Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum); + Py_CLEAR(clear_module_state->__pyx_memoryview_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview); + Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } + for (int i=0; i<8; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<271; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<989; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<33; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr); + Py_VISIT(traverse_module_state->__pyx_array_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_array); + Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum); + Py_VISIT(traverse_module_state->__pyx_memoryview_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview); + Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } + for (int i=0; i<8; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<271; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<989; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<33; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/coders/coder_impl.py":90 + * + * is_compiled = False + * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1 # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING or SLOW_STREAM: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12lambda = {"lambda", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_x = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 90, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda", 0) < (0)) __PYX_ERR(0, 90, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, i); __PYX_ERR(0, 90, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + } + __pyx_v_x = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 90, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(__pyx_self, __pyx_v_x); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_9223372036854775808, __pyx_v_x, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { + __Pyx_DECREF(__pyx_t_1); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":102 + * is_compiled = cython.compiled + * except ImportError: + * globals()['cython'] = type('fake_cython', (), {'cast': lambda typ, x: x}) # <<<<<<<<<<<<<< + * + * else: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13lambda1 = {"lambda1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_typ = 0; + PyObject *__pyx_v_x = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_typ,&__pyx_mstate_global->__pyx_n_u_x,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 102, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 102, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 102, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda1", 0) < (0)) __PYX_ERR(0, 102, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, i); __PYX_ERR(0, 102, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 102, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 102, __pyx_L3_error) + } + __pyx_v_typ = values[0]; + __pyx_v_x = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 102, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(__pyx_self, __pyx_v_typ, __pyx_v_x); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_typ, PyObject *__pyx_v_x) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_x); + __pyx_r = __pyx_v_x; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + +/* Python wrapper */ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_shape = 0; + Py_ssize_t __pyx_v_itemsize; + PyObject *__pyx_v_format = 0; + PyObject *__pyx_v_mode = 0; + int __pyx_v_allocate_buffer; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_itemsize,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_allocate_buffer,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 129, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 129, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c)); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 129, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c)); + } + __pyx_v_shape = ((PyObject*)values[0]); + __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 129, __pyx_L3_error) + __pyx_v_format = values[2]; + __pyx_v_mode = values[3]; + if (values[4]) { + __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L3_error) + } else { + + /* "View.MemoryView":130 + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, + * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< + * + * cdef int idx +*/ + __pyx_v_allocate_buffer = ((int)1); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 129, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 129, __pyx_L1_error) + if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 129, __pyx_L1_error) + } + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); + + /* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { + int __pyx_v_idx; + Py_ssize_t __pyx_v_dim; + char __pyx_v_order; + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + char *__pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11[5]; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_format); + + /* "View.MemoryView":135 + * cdef Py_ssize_t dim + * + * self.ndim = len(shape) # <<<<<<<<<<<<<< + * self.itemsize = itemsize + * +*/ + if (unlikely(__pyx_v_shape == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 135, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 135, __pyx_L1_error) + __pyx_v_self->ndim = ((int)__pyx_t_1); + + /* "View.MemoryView":136 + * + * self.ndim = len(shape) + * self.itemsize = itemsize # <<<<<<<<<<<<<< + * + * if not self.ndim: +*/ + __pyx_v_self->itemsize = __pyx_v_itemsize; + + /* "View.MemoryView":138 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError, "Empty shape tuple for cython.array" + * +*/ + __pyx_t_2 = (!(__pyx_v_self->ndim != 0)); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":139 + * + * if not self.ndim: + * raise ValueError, "Empty shape tuple for cython.array" # <<<<<<<<<<<<<< + * + * if itemsize <= 0: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Empty_shape_tuple_for_cython_arr, 0, 0); + __PYX_ERR(1, 139, __pyx_L1_error) + + /* "View.MemoryView":138 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError, "Empty shape tuple for cython.array" + * +*/ + } + + /* "View.MemoryView":141 + * raise ValueError, "Empty shape tuple for cython.array" + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError, "itemsize <= 0 for cython.array" + * +*/ + __pyx_t_2 = (__pyx_v_itemsize <= 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":142 + * + * if itemsize <= 0: + * raise ValueError, "itemsize <= 0 for cython.array" # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_itemsize_0_for_cython_array, 0, 0); + __PYX_ERR(1, 142, __pyx_L1_error) + + /* "View.MemoryView":141 + * raise ValueError, "Empty shape tuple for cython.array" + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError, "itemsize <= 0 for cython.array" + * +*/ + } + + /* "View.MemoryView":144 + * raise ValueError, "itemsize <= 0 for cython.array" + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string +*/ + __pyx_t_2 = PyBytes_Check(__pyx_v_format); + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "View.MemoryView":145 + * + * if not isinstance(format, bytes): + * format = format.encode('ASCII') # <<<<<<<<<<<<<< + * self._format = format # keep a reference to the byte string + * self.format = self._format +*/ + __pyx_t_5 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":144 + * raise ValueError, "itemsize <= 0 for cython.array" + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string +*/ + } + + /* "View.MemoryView":146 + * if not isinstance(format, bytes): + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< + * self.format = self._format + * +*/ + __pyx_t_4 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_4); + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 146, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(__pyx_v_self->_format); + __pyx_v_self->_format = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":147 + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + * self.format = self._format # <<<<<<<<<<<<<< + * + * +*/ + if (unlikely(__pyx_v_self->_format == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(1, 147, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error) + __pyx_v_self->format = __pyx_t_7; + + /* "View.MemoryView":150 + * + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< + * self._strides = self._shape + self.ndim + * +*/ + __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); + + /* "View.MemoryView":151 + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) + * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< + * + * if not self._shape: +*/ + __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); + + /* "View.MemoryView":153 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate shape and strides." + * +*/ + __pyx_t_3 = (!(__pyx_v_self->_shape != 0)); + if (unlikely(__pyx_t_3)) { + + /* "View.MemoryView":154 + * + * if not self._shape: + * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_shape_and_str, 0, 0); + __PYX_ERR(1, 154, __pyx_L1_error) + + /* "View.MemoryView":153 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate shape and strides." + * +*/ + } + + /* "View.MemoryView":157 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." +*/ + __pyx_t_8 = 0; + __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 157, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); + #endif + ++__pyx_t_1; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_9; + __pyx_v_idx = __pyx_t_8; + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":158 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim +*/ + __pyx_t_3 = (__pyx_v_dim <= 0); + if (unlikely(__pyx_t_3)) { + + /* "View.MemoryView":159 + * for idx, dim in enumerate(shape): + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<< + * self._shape[idx] = dim + * +*/ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis; + __pyx_t_11[1] = __pyx_t_5; + __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_11[3] = __pyx_t_10; + __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127); + if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __PYX_ERR(1, 159, __pyx_L1_error) + + /* "View.MemoryView":158 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim +*/ + } + + /* "View.MemoryView":160 + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim # <<<<<<<<<<<<<< + * + * cdef char order +*/ + (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; + + /* "View.MemoryView":157 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":163 + * + * cdef char order + * if mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' +*/ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 163, __pyx_L1_error) + if (__pyx_t_3) { + + /* "View.MemoryView":164 + * cdef char order + * if mode == 'c': + * order = b'C' # <<<<<<<<<<<<<< + * self.mode = u'c' + * elif mode == 'fortran': +*/ + __pyx_v_order = 'C'; + + /* "View.MemoryView":165 + * if mode == 'c': + * order = b'C' + * self.mode = u'c' # <<<<<<<<<<<<<< + * elif mode == 'fortran': + * order = b'F' +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_c); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_c; + + /* "View.MemoryView":163 + * + * cdef char order + * if mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":166 + * order = b'C' + * self.mode = u'c' + * elif mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' +*/ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 166, __pyx_L1_error) + if (likely(__pyx_t_3)) { + + /* "View.MemoryView":167 + * self.mode = u'c' + * elif mode == 'fortran': + * order = b'F' # <<<<<<<<<<<<<< + * self.mode = u'fortran' + * else: +*/ + __pyx_v_order = 'F'; + + /* "View.MemoryView":168 + * elif mode == 'fortran': + * order = b'F' + * self.mode = u'fortran' # <<<<<<<<<<<<<< + * else: + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_fortran); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_fortran; + + /* "View.MemoryView":166 + * order = b'C' + * self.mode = u'c' + * elif mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":170 + * self.mode = u'fortran' + * else: + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<< + * + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) +*/ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __PYX_ERR(1, 170, __pyx_L1_error) + } + __pyx_L11:; + + /* "View.MemoryView":172 + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" + * + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<< + * + * self.free_data = allocate_buffer +*/ + __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); + + /* "View.MemoryView":174 + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) + * + * self.free_data = allocate_buffer # <<<<<<<<<<<<<< + * self.dtype_is_object = format == b'O' + * +*/ + __pyx_v_self->free_data = __pyx_v_allocate_buffer; + + /* "View.MemoryView":175 + * + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< + * + * if allocate_buffer: +*/ + __pyx_t_12 = PyObject_RichCompare(__pyx_v_format, __pyx_mstate_global->__pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_3; + + /* "View.MemoryView":177 + * self.dtype_is_object = format == b'O' + * + * if allocate_buffer: # <<<<<<<<<<<<<< + * _allocate_buffer(self) + * +*/ + if (__pyx_v_allocate_buffer) { + + /* "View.MemoryView":178 + * + * if allocate_buffer: + * _allocate_buffer(self) # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + __pyx_t_8 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 178, __pyx_L1_error) + + /* "View.MemoryView":177 + * self.dtype_is_object = format == b'O' + * + * if allocate_buffer: # <<<<<<<<<<<<<< + * _allocate_buffer(self) + * +*/ + } + + /* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_format); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":180 + * _allocate_buffer(self) + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 +*/ + +/* Python wrapper */ +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_bufmode; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + char *__pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + Py_ssize_t *__pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + if (unlikely(__pyx_v_info == NULL)) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":182 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 # <<<<<<<<<<<<<< + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": +*/ + __pyx_v_bufmode = -1; + + /* "View.MemoryView":183 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":184 + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": +*/ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 184, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":185 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":184 + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":186 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): +*/ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":187 + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." +*/ + __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":186 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): +*/ + } + __pyx_L4:; + + /* "View.MemoryView":188 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data +*/ + __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0)); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":189 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Can_only_create_a_buffer_that_is, 0, 0); + __PYX_ERR(1, 189, __pyx_L1_error) + + /* "View.MemoryView":188 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data +*/ + } + + /* "View.MemoryView":183 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + } + + /* "View.MemoryView":190 + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data # <<<<<<<<<<<<<< + * info.len = self.len + * +*/ + __pyx_t_2 = __pyx_v_self->data; + __pyx_v_info->buf = __pyx_t_2; + + /* "View.MemoryView":191 + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data + * info.len = self.len # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: +*/ + __pyx_t_3 = __pyx_v_self->len; + __pyx_v_info->len = __pyx_t_3; + + /* "View.MemoryView":193 + * info.len = self.len + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":194 + * + * if flags & PyBUF_STRIDES: + * info.ndim = self.ndim # <<<<<<<<<<<<<< + * info.shape = self._shape + * info.strides = self._strides +*/ + __pyx_t_4 = __pyx_v_self->ndim; + __pyx_v_info->ndim = __pyx_t_4; + + /* "View.MemoryView":195 + * if flags & PyBUF_STRIDES: + * info.ndim = self.ndim + * info.shape = self._shape # <<<<<<<<<<<<<< + * info.strides = self._strides + * else: +*/ + __pyx_t_5 = __pyx_v_self->_shape; + __pyx_v_info->shape = __pyx_t_5; + + /* "View.MemoryView":196 + * info.ndim = self.ndim + * info.shape = self._shape + * info.strides = self._strides # <<<<<<<<<<<<<< + * else: + * info.ndim = 1 +*/ + __pyx_t_5 = __pyx_v_self->_strides; + __pyx_v_info->strides = __pyx_t_5; + + /* "View.MemoryView":193 + * info.len = self.len + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":198 + * info.strides = self._strides + * else: + * info.ndim = 1 # <<<<<<<<<<<<<< + * info.shape = &self.len if flags & PyBUF_ND else NULL + * info.strides = NULL +*/ + /*else*/ { + __pyx_v_info->ndim = 1; + + /* "View.MemoryView":199 + * else: + * info.ndim = 1 + * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<< + * info.strides = NULL + * +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + __pyx_t_5 = (&__pyx_v_self->len); + } else { + __pyx_t_5 = NULL; + } + __pyx_v_info->shape = __pyx_t_5; + + /* "View.MemoryView":200 + * info.ndim = 1 + * info.shape = &self.len if flags & PyBUF_ND else NULL + * info.strides = NULL # <<<<<<<<<<<<<< + * + * info.suboffsets = NULL +*/ + __pyx_v_info->strides = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":202 + * info.strides = NULL + * + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = self.itemsize + * info.readonly = 0 +*/ + __pyx_v_info->suboffsets = NULL; + + /* "View.MemoryView":203 + * + * info.suboffsets = NULL + * info.itemsize = self.itemsize # <<<<<<<<<<<<<< + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL +*/ + __pyx_t_3 = __pyx_v_self->itemsize; + __pyx_v_info->itemsize = __pyx_t_3; + + /* "View.MemoryView":204 + * info.suboffsets = NULL + * info.itemsize = self.itemsize + * info.readonly = 0 # <<<<<<<<<<<<<< + * info.format = self.format if flags & PyBUF_FORMAT else NULL + * info.obj = self +*/ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":205 + * info.itemsize = self.itemsize + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<< + * info.obj = self + * +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_self->format; + } else { + __pyx_t_2 = NULL; + } + __pyx_v_info->format = __pyx_t_2; + + /* "View.MemoryView":206 + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL + * info.obj = self # <<<<<<<<<<<<<< + * + * def __dealloc__(array self): +*/ + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":180 + * _allocate_buffer(self) + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":208 + * info.obj = self + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) +*/ + +/* Python wrapper */ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_t_1; + int __pyx_t_2; + + /* "View.MemoryView":209 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: +*/ + __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":210 + * def __dealloc__(array self): + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) # <<<<<<<<<<<<<< + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: +*/ + __pyx_v_self->callback_free_data(__pyx_v_self->data); + + /* "View.MemoryView":209 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":211 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) +*/ + if (__pyx_v_self->free_data) { + } else { + __pyx_t_1 = __pyx_v_self->free_data; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->data != NULL); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":212 + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":213 + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<< + * free(self.data) + * PyObject_Free(self._shape) +*/ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); + + /* "View.MemoryView":212 + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) +*/ + } + + /* "View.MemoryView":214 + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) # <<<<<<<<<<<<<< + * PyObject_Free(self._shape) + * +*/ + free(__pyx_v_self->data); + + /* "View.MemoryView":211 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) +*/ + } + __pyx_L3:; + + /* "View.MemoryView":215 + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) + * PyObject_Free(self._shape) # <<<<<<<<<<<<<< + * + * @property +*/ + PyObject_Free(__pyx_v_self->_shape); + + /* "View.MemoryView":208 + * info.obj = self + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) +*/ + + /* function exit code */ +} + +/* "View.MemoryView":217 + * PyObject_Free(self._shape) + * + * @property # <<<<<<<<<<<<<< + * def memview(self): + * return self.get_memview() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":219 + * @property + * def memview(self): + * return self.get_memview() # <<<<<<<<<<<<<< + * + * @cname('get_memview') +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":217 + * PyObject_Free(self._shape) + * + * @property # <<<<<<<<<<<<<< + * def memview(self): + * return self.get_memview() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":221 + * return self.get_memview() + * + * @cname('get_memview') # <<<<<<<<<<<<<< + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE +*/ + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_memview", 0); + + /* "View.MemoryView":223 + * @cname('get_memview') + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< + * return memoryview(self, flags, self.dtype_is_object) + * +*/ + __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); + + /* "View.MemoryView":224 + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":221 + * return self.get_memview() + * + * @cname('get_memview') # <<<<<<<<<<<<<< + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":226 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + + /* "View.MemoryView":227 + * + * def __len__(self): + * return self._shape[0] # <<<<<<<<<<<<<< + * + * def __getattr__(self, attr): +*/ + __pyx_r = (__pyx_v_self->_shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":226 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":229 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getattr__", 0); + + /* "View.MemoryView":230 + * + * def __getattr__(self, attr): + * return getattr(self.memview, attr) # <<<<<<<<<<<<<< + * + * def __getitem__(self, item): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":229 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":232 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":233 + * + * def __getitem__(self, item): + * return self.memview[item] # <<<<<<<<<<<<<< + * + * def __setitem__(self, item, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":232 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":235 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * +*/ + +/* Python wrapper */ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + + /* "View.MemoryView":236 + * + * def __setitem__(self, item, value): + * self.memview[item] = value # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 236, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":235 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":245 + * pass + * + * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<< + * cdef int _allocate_buffer(array self) except -1: + * +*/ + +static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_i; + PyObject **__pyx_v_p; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":252 + * cdef PyObject **p + * + * self.free_data = True # <<<<<<<<<<<<<< + * self.data = malloc(self.len) + * if not self.data: +*/ + __pyx_v_self->free_data = 1; + + /* "View.MemoryView":253 + * + * self.free_data = True + * self.data = malloc(self.len) # <<<<<<<<<<<<<< + * if not self.data: + * raise MemoryError, "unable to allocate array data." +*/ + __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); + + /* "View.MemoryView":254 + * self.free_data = True + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate array data." + * +*/ + __pyx_t_1 = (!(__pyx_v_self->data != 0)); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":255 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_array_data, 0, 0); + __PYX_ERR(1, 255, __pyx_L1_error) + + /* "View.MemoryView":254 + * self.free_data = True + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate array data." + * +*/ + } + + /* "View.MemoryView":257 + * raise MemoryError, "unable to allocate array data." + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len // self.itemsize): +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":258 + * + * if self.dtype_is_object: + * p = self.data # <<<<<<<<<<<<<< + * for i in range(self.len // self.itemsize): + * p[i] = Py_None +*/ + __pyx_v_p = ((PyObject **)__pyx_v_self->data); + + /* "View.MemoryView":259 + * if self.dtype_is_object: + * p = self.data + * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<< + * p[i] = Py_None + * Py_INCREF(Py_None) +*/ + if (unlikely(__pyx_v_self->itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 259, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 259, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize, 0); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":260 + * p = self.data + * for i in range(self.len // self.itemsize): + * p[i] = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * return 0 +*/ + (__pyx_v_p[__pyx_v_i]) = Py_None; + + /* "View.MemoryView":261 + * for i in range(self.len // self.itemsize): + * p[i] = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * return 0 + * +*/ + Py_INCREF(Py_None); + } + + /* "View.MemoryView":257 + * raise MemoryError, "unable to allocate array data." + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len // self.itemsize): +*/ + } + + /* "View.MemoryView":262 + * p[i] = Py_None + * Py_INCREF(Py_None) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":245 + * pass + * + * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<< + * cdef int _allocate_buffer(array self) except -1: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":265 + * + * + * @cname("__pyx_array_new") # <<<<<<<<<<<<<< + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result +*/ + +static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char const *__pyx_v_c_mode, char *__pyx_v_buf) { + struct __pyx_array_obj *__pyx_v_result = 0; + PyObject *__pyx_v_mode = 0; + struct __pyx_array_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("array_cwrapper", 0); + + /* "View.MemoryView":268 + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<< + * + * if buf is NULL: +*/ + __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f'); + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran); + __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c); + __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c; + } + __pyx_v_mode = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":270 + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. + * + * if buf is NULL: # <<<<<<<<<<<<<< + * result = array.__new__(array, shape, itemsize, format, mode) + * else: +*/ + __pyx_t_2 = (__pyx_v_buf == NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":271 + * + * if buf is NULL: + * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<< + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) +*/ + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_mode); + __Pyx_GIVEREF(__pyx_v_mode); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":270 + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. + * + * if buf is NULL: # <<<<<<<<<<<<<< + * result = array.__new__(array, shape, itemsize, format, mode) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":273 + * result = array.__new__(array, shape, itemsize, format, mode) + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<< + * result.data = buf + * +*/ + /*else*/ { + __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_mode); + __Pyx_GIVEREF(__pyx_v_mode); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 273, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":274 + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) + * result.data = buf # <<<<<<<<<<<<<< + * + * return result +*/ + __pyx_v_result->data = __pyx_v_buf; + } + __pyx_L3:; + + /* "View.MemoryView":276 + * result.data = buf + * + * return result # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":265 + * + * + * @cname("__pyx_array_new") # <<<<<<<<<<<<<< + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_mode); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":302 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): +*/ + +/* Python wrapper */ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 302, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 302, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 302, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error) + } + __pyx_v_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 302, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "View.MemoryView":303 + * cdef object name + * def __init__(self, name): + * self.name = name # <<<<<<<<<<<<<< + * def __repr__(self): + * return self.name +*/ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "View.MemoryView":302 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":304 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":305 + * self.name = name + * def __repr__(self): + * return self.name # <<<<<<<<<<<<<< + * + * cdef generic = Enum("") +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* "View.MemoryView":304 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.name,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->name != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.name is not None + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":348 + * cdef const __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags +*/ + +/* Python wrapper */ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_obj = 0; + int __pyx_v_flags; + int __pyx_v_dtype_is_object; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_dtype_is_object,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 348, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 348, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 348, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_obj = values[0]; + __pyx_v_flags = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error) + if (values[2]) { + __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error) + } else { + __pyx_v_dtype_is_object = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 348, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + Py_intptr_t __pyx_t_4; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "View.MemoryView":349 + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj # <<<<<<<<<<<<<< + * self.flags = flags + * if type(self) is memoryview or obj is not None: +*/ + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + __Pyx_GOTREF(__pyx_v_self->obj); + __Pyx_DECREF(__pyx_v_self->obj); + __pyx_v_self->obj = __pyx_v_obj; + + /* "View.MemoryView":350 + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj + * self.flags = flags # <<<<<<<<<<<<<< + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) +*/ + __pyx_v_self->flags = __pyx_v_flags; + + /* "View.MemoryView":351 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: +*/ + __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type)); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_obj != Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":352 + * self.flags = flags + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None +*/ + __pyx_t_3 = PyObject_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error) + + /* "View.MemoryView":353 + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":354 + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; + + /* "View.MemoryView":355 + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): +*/ + Py_INCREF(Py_None); + + /* "View.MemoryView":353 + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + } + + /* "View.MemoryView":351 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: +*/ + } + + /* "View.MemoryView":357 + * Py_INCREF(Py_None) + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and +*/ + __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED()); + if (__pyx_t_1) { + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L9_bool_binop_done; + } + + /* "View.MemoryView":361 + * if (__pyx_memoryview_thread_locks_used < 8 and + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 +*/ + __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + if (__pyx_t_1) { + + /* "View.MemoryView":362 + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: +*/ + __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + + /* "View.MemoryView":363 + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() +*/ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + } + + /* "View.MemoryView":364 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: +*/ + __pyx_t_1 = (__pyx_v_self->lock == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":365 + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< + * if self.lock is NULL: + * raise MemoryError +*/ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "View.MemoryView":366 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * +*/ + __pyx_t_1 = (__pyx_v_self->lock == NULL); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":367 + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: +*/ + PyErr_NoMemory(); __PYX_ERR(1, 367, __pyx_L1_error) + + /* "View.MemoryView":366 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * +*/ + } + + /* "View.MemoryView":364 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: +*/ + } + + /* "View.MemoryView":357 + * Py_INCREF(Py_None) + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and +*/ + } + + /* "View.MemoryView":369 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":370 + * + * if flags & PyBUF_FORMAT: + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< + * else: + * self.dtype_is_object = dtype_is_object +*/ + __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O'); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00'); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + __pyx_v_self->dtype_is_object = __pyx_t_1; + + /* "View.MemoryView":369 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: +*/ + goto __pyx_L13; + } + + /* "View.MemoryView":372 + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 +*/ + /*else*/ { + __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; + } + __pyx_L13:; + + /* "View.MemoryView":374 + * self.dtype_is_object = dtype_is_object + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<< + * self.typeinfo = NULL + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count))); + __pyx_t_5 = (sizeof(__pyx_atomic_int_type)); + if (unlikely(__pyx_t_5 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 374, __pyx_L1_error) + } + __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(1, 374, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 374, __pyx_L1_error) + #endif + + /* "View.MemoryView":375 + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 + * self.typeinfo = NULL # <<<<<<<<<<<<<< + * + * def __dealloc__(memoryview self): +*/ + __pyx_v_self->typeinfo = NULL; + + /* "View.MemoryView":348 + * cdef const __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":377 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * PyBuffer_Release(&self.view) +*/ + +/* Python wrapper */ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { + int __pyx_v_i; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyThread_type_lock __pyx_t_5; + PyThread_type_lock __pyx_t_6; + + /* "View.MemoryView":378 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: +*/ + __pyx_t_1 = (__pyx_v_self->obj != Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":379 + * def __dealloc__(memoryview self): + * if self.obj is not None: + * PyBuffer_Release(&self.view) # <<<<<<<<<<<<<< + * elif (<__pyx_buffer *> &self.view).obj == Py_None: + * +*/ + PyBuffer_Release((&__pyx_v_self->view)); + + /* "View.MemoryView":378 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":380 + * if self.obj is not None: + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< + * + * (<__pyx_buffer *> &self.view).obj = NULL +*/ + __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":382 + * elif (<__pyx_buffer *> &self.view).obj == Py_None: + * + * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<< + * Py_DECREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL; + + /* "View.MemoryView":383 + * + * (<__pyx_buffer *> &self.view).obj = NULL + * Py_DECREF(Py_None) # <<<<<<<<<<<<<< + * + * cdef int i +*/ + Py_DECREF(Py_None); + + /* "View.MemoryView":380 + * if self.obj is not None: + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< + * + * (<__pyx_buffer *> &self.view).obj = NULL +*/ + } + __pyx_L3:; + + /* "View.MemoryView":387 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: +*/ + __pyx_t_1 = (__pyx_v_self->lock != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":388 + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 +*/ + __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING(); + if (__pyx_t_1) { + __pyx_t_2 = 0; + } else { + __pyx_t_2 = __pyx_memoryview_thread_locks_used; + } + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":389 + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: +*/ + __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock); + if (__pyx_t_1) { + + /* "View.MemoryView":390 + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( +*/ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); + + /* "View.MemoryView":391 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) +*/ + __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used); + if (__pyx_t_1) { + + /* "View.MemoryView":393 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< + * break + * else: +*/ + __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]); + + /* "View.MemoryView":392 + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break +*/ + (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5; + (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6; + + /* "View.MemoryView":391 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) +*/ + } + + /* "View.MemoryView":394 + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break # <<<<<<<<<<<<<< + * else: + * PyThread_free_lock(self.lock) +*/ + goto __pyx_L6_break; + + /* "View.MemoryView":389 + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: +*/ + } + } + /*else*/ { + + /* "View.MemoryView":396 + * break + * else: + * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: +*/ + PyThread_free_lock(__pyx_v_self->lock); + } + __pyx_L6_break:; + + /* "View.MemoryView":387 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: +*/ + } + + /* "View.MemoryView":377 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * PyBuffer_Release(&self.view) +*/ + + /* function exit code */ +} + +/* "View.MemoryView":398 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf +*/ + +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + Py_ssize_t __pyx_v_dim; + char *__pyx_v_itemp; + PyObject *__pyx_v_idx = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + char *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_item_pointer", 0); + + /* "View.MemoryView":400 + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< + * + * for dim, idx in enumerate(index): +*/ + __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); + + /* "View.MemoryView":402 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * +*/ + __pyx_t_1 = 0; + if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { + __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 402, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 402, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 402, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_1; + __pyx_t_1 = (__pyx_t_1 + 1); + + /* "View.MemoryView":403 + * + * for dim, idx in enumerate(index): + * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< + * + * return itemp +*/ + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 403, __pyx_L1_error) + __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 403, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_7; + + /* "View.MemoryView":402 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":405 + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + * return itemp # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_itemp; + goto __pyx_L0; + + /* "View.MemoryView":398 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":408 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_indices = NULL; + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + char *__pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":409 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); + if (__pyx_t_1) { + + /* "View.MemoryView":410 + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: + * return self # <<<<<<<<<<<<<< + * + * have_slices, indices = _unellipsify(index, self.view.ndim) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "View.MemoryView":409 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "View.MemoryView":412 + * return self + * + * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * cdef char *itemp +*/ + __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 412, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 412, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_indices = __pyx_t_4; + __pyx_t_4 = 0; + + /* "View.MemoryView":415 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 415, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":416 + * cdef char *itemp + * if have_slices: + * return memview_slice(self, indices) # <<<<<<<<<<<<<< + * else: + * itemp = self.get_item_pointer(indices) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":415 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: +*/ + } + + /* "View.MemoryView":418 + * return memview_slice(self, indices) + * else: + * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< + * return self.convert_item_to_object(itemp) + * +*/ + /*else*/ { + __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(1, 418, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_5; + + /* "View.MemoryView":419 + * else: + * itemp = self.get_item_pointer(indices) + * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< + * + * def __setitem__(memoryview self, object index, object value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":408 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_indices); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":421 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" +*/ + +/* Python wrapper */ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_obj = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + __Pyx_INCREF(__pyx_v_index); + + /* "View.MemoryView":422 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError, "Cannot assign to read-only memoryview" + * +*/ + if (unlikely(__pyx_v_self->view.readonly)) { + + /* "View.MemoryView":423 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Cannot_assign_to_read_only_memor, 0, 0); + __PYX_ERR(1, 423, __pyx_L1_error) + + /* "View.MemoryView":422 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError, "Cannot assign to read-only memoryview" + * +*/ + } + + /* "View.MemoryView":425 + * raise TypeError, "Cannot assign to read-only memoryview" + * + * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * if have_slices: +*/ + __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 425, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 425, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":427 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj is not None: +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 427, __pyx_L1_error) + if (__pyx_t_4) { + + /* "View.MemoryView":428 + * + * if have_slices: + * obj = self.is_slice(value) # <<<<<<<<<<<<<< + * if obj is not None: + * self.setitem_slice_assignment(self[index], obj) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":429 + * if have_slices: + * obj = self.is_slice(value) + * if obj is not None: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: +*/ + __pyx_t_4 = (__pyx_v_obj != Py_None); + if (__pyx_t_4) { + + /* "View.MemoryView":430 + * obj = self.is_slice(value) + * if obj is not None: + * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< + * else: + * self.setitem_slice_assign_scalar(self[index], value) +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":429 + * if have_slices: + * obj = self.is_slice(value) + * if obj is not None: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":432 + * self.setitem_slice_assignment(self[index], obj) + * else: + * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< + * else: + * self.setitem_indexed(index, value) +*/ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 432, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + + /* "View.MemoryView":427 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj is not None: +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":434 + * self.setitem_slice_assign_scalar(self[index], value) + * else: + * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< + * + * cdef is_slice(self, obj): +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "View.MemoryView":421 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":436 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: +*/ + +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_slice", 0); + __Pyx_INCREF(__pyx_v_obj); + + /* "View.MemoryView":437 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "View.MemoryView":439 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: +*/ + __pyx_t_7 = NULL; + __pyx_t_8 = __Pyx_PyLong_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 439, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "View.MemoryView":440 + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) # <<<<<<<<<<<<<< + * except TypeError: + * return None +*/ + __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 440, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_obj, __pyx_t_8, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 439, __pyx_L4_error) + __Pyx_GOTREF((PyObject *)__pyx_t_6); + } + __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "View.MemoryView":441 + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + * except TypeError: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + + /* "View.MemoryView":442 + * self.dtype_is_object) + * except TypeError: + * return None # <<<<<<<<<<<<<< + * + * return obj +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L7_except_return; + } + goto __pyx_L6_except_error; + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L7_except_return:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L0; + __pyx_L9_try_end:; + } + + /* "View.MemoryView":437 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, +*/ + } + + /* "View.MemoryView":444 + * return None + * + * return obj # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assignment(self, dst, src): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_obj); + __pyx_r = __pyx_v_obj; + goto __pyx_L0; + + /* "View.MemoryView":436 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":446 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice +*/ + +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { + __Pyx_memviewslice __pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_src_slice; + __Pyx_memviewslice __pyx_v_msrc; + __Pyx_memviewslice __pyx_v_mdst; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); + + /* "View.MemoryView":449 + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] + * +*/ + if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error) + __pyx_v_msrc = (__pyx_t_1[0]); + + /* "View.MemoryView":450 + * cdef __Pyx_memviewslice src_slice + * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<< + * + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) +*/ + if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_v_mdst = (__pyx_t_1[0]); + + /* "View.MemoryView":452 + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] + * + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 452, __pyx_L1_error) + + /* "View.MemoryView":446 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":454 + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL +*/ + +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { + int __pyx_v_array[128]; + void *__pyx_v_tmp; + void *__pyx_v_item; + __Pyx_memviewslice *__pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_tmp_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); + + /* "View.MemoryView":456 + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + * cdef int array[128] + * cdef void *tmp = NULL # <<<<<<<<<<<<<< + * cdef void *item + * +*/ + __pyx_v_tmp = NULL; + + /* "View.MemoryView":461 + * cdef __Pyx_memviewslice *dst_slice + * cdef __Pyx_memviewslice tmp_slice + * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< + * + * if self.view.itemsize > sizeof(array): +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 461, __pyx_L1_error) + __pyx_v_dst_slice = __pyx_t_1; + + /* "View.MemoryView":463 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: +*/ + __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))); + if (__pyx_t_2) { + + /* "View.MemoryView":464 + * + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< + * if tmp == NULL: + * raise MemoryError +*/ + __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); + + /* "View.MemoryView":465 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp +*/ + __pyx_t_2 = (__pyx_v_tmp == NULL); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":466 + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * item = tmp + * else: +*/ + PyErr_NoMemory(); __PYX_ERR(1, 466, __pyx_L1_error) + + /* "View.MemoryView":465 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp +*/ + } + + /* "View.MemoryView":467 + * if tmp == NULL: + * raise MemoryError + * item = tmp # <<<<<<<<<<<<<< + * else: + * item = array +*/ + __pyx_v_item = __pyx_v_tmp; + + /* "View.MemoryView":463 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":469 + * item = tmp + * else: + * item = array # <<<<<<<<<<<<<< + * + * try: +*/ + /*else*/ { + __pyx_v_item = ((void *)__pyx_v_array); + } + __pyx_L3:; + + /* "View.MemoryView":471 + * item = array + * + * try: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * ( item)[0] = value +*/ + /*try:*/ { + + /* "View.MemoryView":472 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":473 + * try: + * if self.dtype_is_object: + * ( item)[0] = value # <<<<<<<<<<<<<< + * else: + * self.assign_item_from_object( item, value) +*/ + (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); + + /* "View.MemoryView":472 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":475 + * ( item)[0] = value + * else: + * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L8:; + + /* "View.MemoryView":479 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, +*/ + __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":480 + * + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + * item, self.dtype_is_object) +*/ + __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 480, __pyx_L6_error) + + /* "View.MemoryView":479 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, +*/ + } + + /* "View.MemoryView":481 + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< + * item, self.dtype_is_object) + * finally: +*/ + __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); + } + + /* "View.MemoryView":484 + * item, self.dtype_is_object) + * finally: + * PyMem_Free(tmp) # <<<<<<<<<<<<<< + * + * cdef setitem_indexed(self, index, value): +*/ + /*finally:*/ { + /*normal exit:*/{ + PyMem_Free(__pyx_v_tmp); + goto __pyx_L7; + } + __pyx_L6_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; + { + PyMem_Free(__pyx_v_tmp); + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; + goto __pyx_L1_error; + } + __pyx_L7:; + } + + /* "View.MemoryView":454 + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":486 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) +*/ + +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_indexed", 0); + + /* "View.MemoryView":487 + * + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< + * self.assign_item_from_object(itemp, value) + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 487, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_1; + + /* "View.MemoryView":488 + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":486 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":490 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_v_struct = NULL; + PyObject *__pyx_v_bytesitem = 0; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":493 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef bytes bytesitem + * +*/ + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":496 + * cdef bytes bytesitem + * + * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< + * try: + * result = struct.unpack(self.view.format, bytesitem) +*/ + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "View.MemoryView":498 + * bytesitem = itemp[:self.view.itemsize] + * try: + * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< + * except struct.error: + * raise ValueError, "Unable to convert item to object" +*/ + __pyx_t_5 = __pyx_v_struct; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unpack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + } + + /* "View.MemoryView":502 + * raise ValueError, "Unable to convert item to object" + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result +*/ + /*else:*/ { + __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 502, __pyx_L5_except_error) + __pyx_t_9 = (__pyx_t_8 == 1); + if (__pyx_t_9) { + + /* "View.MemoryView":503 + * else: + * if len(self.view.format) == 1: + * return result[0] # <<<<<<<<<<<<<< + * return result + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 503, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L6_except_return; + + /* "View.MemoryView":502 + * raise ValueError, "Unable to convert item to object" + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result +*/ + } + + /* "View.MemoryView":504 + * if len(self.view.format) == 1: + * return result[0] + * return result # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L6_except_return; + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "View.MemoryView":499 + * try: + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: # <<<<<<<<<<<<<< + * raise ValueError, "Unable to convert item to object" + * else: +*/ + __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_5); + __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; + if (__pyx_t_11) { + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 499, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_1); + + /* "View.MemoryView":500 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError, "Unable to convert item to object" # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Unable_to_convert_item_to_object, 0, 0); + __PYX_ERR(1, 500, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } + + /* "View.MemoryView":490 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesitem); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":506 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_v_struct = NULL; + char __pyx_v_c; + PyObject *__pyx_v_bytesvalue = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + char *__pyx_t_10; + char *__pyx_t_11; + Py_ssize_t __pyx_t_12; + char *__pyx_t_13; + char *__pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":509 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef char c + * cdef bytes bytesvalue +*/ + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 509, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":514 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: +*/ + __pyx_t_3 = PyTuple_Check(__pyx_v_value); + if (__pyx_t_3) { + + /* "View.MemoryView":515 + * + * if isinstance(value, tuple): + * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< + * else: + * bytesvalue = struct.pack(self.view.format, value) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 515, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 515, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":514 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":517 + * bytesvalue = struct.pack(self.view.format, *value) + * else: + * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< + * + * for i, c in enumerate(bytesvalue): +*/ + /*else*/ { + __pyx_t_6 = __pyx_v_struct; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 517, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":519 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * +*/ + __pyx_t_8 = 0; + if (unlikely(__pyx_v_bytesvalue == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); + __PYX_ERR(1, 519, __pyx_L1_error) + } + __Pyx_INCREF(__pyx_v_bytesvalue); + __pyx_t_9 = __pyx_v_bytesvalue; + __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely(__pyx_t_11 == ((char *)NULL))) __PYX_ERR(1, 519, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 519, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_11 + __pyx_t_12); + for (__pyx_t_14 = __pyx_t_11; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) { + __pyx_t_10 = __pyx_t_14; + __pyx_v_c = (__pyx_t_10[0]); + + /* "View.MemoryView":520 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + __pyx_v_i = __pyx_t_8; + + /* "View.MemoryView":519 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * +*/ + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":520 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "View.MemoryView":506 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":522 + * itemp[i] = c + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: +*/ + +/* Python wrapper */ +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t *__pyx_t_3; + char *__pyx_t_4; + void *__pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + if (unlikely(__pyx_v_info == NULL)) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":524 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * +*/ + __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":525 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError, "Cannot create writable memory view from read-only memoryview" # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Cannot_create_writable_memory_vi, 0, 0); + __PYX_ERR(1, 525, __pyx_L1_error) + + /* "View.MemoryView":524 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * +*/ + } + + /* "View.MemoryView":527 + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":528 + * + * if flags & PyBUF_ND: + * info.shape = self.view.shape # <<<<<<<<<<<<<< + * else: + * info.shape = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.shape; + __pyx_v_info->shape = __pyx_t_3; + + /* "View.MemoryView":527 + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":530 + * info.shape = self.view.shape + * else: + * info.shape = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: +*/ + /*else*/ { + __pyx_v_info->shape = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":532 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":533 + * + * if flags & PyBUF_STRIDES: + * info.strides = self.view.strides # <<<<<<<<<<<<<< + * else: + * info.strides = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.strides; + __pyx_v_info->strides = __pyx_t_3; + + /* "View.MemoryView":532 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":535 + * info.strides = self.view.strides + * else: + * info.strides = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_INDIRECT: +*/ + /*else*/ { + __pyx_v_info->strides = NULL; + } + __pyx_L7:; + + /* "View.MemoryView":537 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":538 + * + * if flags & PyBUF_INDIRECT: + * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< + * else: + * info.suboffsets = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.suboffsets; + __pyx_v_info->suboffsets = __pyx_t_3; + + /* "View.MemoryView":537 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":540 + * info.suboffsets = self.view.suboffsets + * else: + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: +*/ + /*else*/ { + __pyx_v_info->suboffsets = NULL; + } + __pyx_L8:; + + /* "View.MemoryView":542 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":543 + * + * if flags & PyBUF_FORMAT: + * info.format = self.view.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL +*/ + __pyx_t_4 = __pyx_v_self->view.format; + __pyx_v_info->format = __pyx_t_4; + + /* "View.MemoryView":542 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":545 + * info.format = self.view.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.buf = self.view.buf +*/ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L9:; + + /* "View.MemoryView":547 + * info.format = NULL + * + * info.buf = self.view.buf # <<<<<<<<<<<<<< + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize +*/ + __pyx_t_5 = __pyx_v_self->view.buf; + __pyx_v_info->buf = __pyx_t_5; + + /* "View.MemoryView":548 + * + * info.buf = self.view.buf + * info.ndim = self.view.ndim # <<<<<<<<<<<<<< + * info.itemsize = self.view.itemsize + * info.len = self.view.len +*/ + __pyx_t_6 = __pyx_v_self->view.ndim; + __pyx_v_info->ndim = __pyx_t_6; + + /* "View.MemoryView":549 + * info.buf = self.view.buf + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< + * info.len = self.view.len + * info.readonly = self.view.readonly +*/ + __pyx_t_7 = __pyx_v_self->view.itemsize; + __pyx_v_info->itemsize = __pyx_t_7; + + /* "View.MemoryView":550 + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + * info.len = self.view.len # <<<<<<<<<<<<<< + * info.readonly = self.view.readonly + * info.obj = self +*/ + __pyx_t_7 = __pyx_v_self->view.len; + __pyx_v_info->len = __pyx_t_7; + + /* "View.MemoryView":551 + * info.itemsize = self.view.itemsize + * info.len = self.view.len + * info.readonly = self.view.readonly # <<<<<<<<<<<<<< + * info.obj = self + * +*/ + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_v_info->readonly = __pyx_t_1; + + /* "View.MemoryView":552 + * info.len = self.view.len + * info.readonly = self.view.readonly + * info.obj = self # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":522 + * itemp[i] = c + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":555 + * + * + * @property # <<<<<<<<<<<<<< + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":557 + * @property + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< + * transpose_memslice(&result.from_slice) + * return result +*/ + __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 557, __pyx_L1_error) + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":558 + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 558, __pyx_L1_error) + + /* "View.MemoryView":559 + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + * return result # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":555 + * + * + * @property # <<<<<<<<<<<<<< + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":561 + * return result + * + * @property # <<<<<<<<<<<<<< + * def base(self): + * return self._get_base() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":563 + * @property + * def base(self): + * return self._get_base() # <<<<<<<<<<<<<< + * + * cdef _get_base(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":561 + * return result + * + * @property # <<<<<<<<<<<<<< + * def base(self): + * return self._get_base() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":565 + * return self._get_base() + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.obj + * +*/ + +static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_base", 0); + + /* "View.MemoryView":566 + * + * cdef _get_base(self): + * return self.obj # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->obj); + __pyx_r = __pyx_v_self->obj; + goto __pyx_L0; + + /* "View.MemoryView":565 + * return self._get_base() + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.obj + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":568 + * return self.obj + * + * @property # <<<<<<<<<<<<<< + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_7genexpr__pyx_v_length; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":570 + * @property + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]); + __pyx_t_5 = PyLong_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } /* exit inner scope */ + __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":568 + * return self.obj + * + * @property # <<<<<<<<<<<<<< + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":572 + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def strides(self): + * if self.view.strides == NULL: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_8genexpr1__pyx_v_stride; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":574 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError, "Buffer view does not expose strides" +*/ + __pyx_t_1 = (__pyx_v_self->view.strides == NULL); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":576 + * if self.view.strides == NULL: + * + * raise ValueError, "Buffer view does not expose strides" # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Buffer_view_does_not_expose_stri, 0, 0); + __PYX_ERR(1, 576, __pyx_L1_error) + + /* "View.MemoryView":574 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError, "Buffer view does not expose strides" +*/ + } + + /* "View.MemoryView":578 + * raise ValueError, "Buffer view does not expose strides" + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]); + __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } /* exit inner scope */ + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":572 + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def strides(self): + * if self.view.strides == NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":580 + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def suboffsets(self): + * if self.view.suboffsets == NULL: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":582 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * +*/ + __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":583 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[0], __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":582 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * +*/ + } + + /* "View.MemoryView":585 + * return (-1,) * self.view.ndim + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]); + __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } /* exit inner scope */ + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":580 + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def suboffsets(self): + * if self.view.suboffsets == NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":587 + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def ndim(self): + * return self.view.ndim +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":589 + * @property + * def ndim(self): + * return self.view.ndim # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":587 + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def ndim(self): + * return self.view.ndim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":591 + * return self.view.ndim + * + * @property # <<<<<<<<<<<<<< + * def itemsize(self): + * return self.view.itemsize +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":593 + * @property + * def itemsize(self): + * return self.view.itemsize # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":591 + * return self.view.ndim + * + * @property # <<<<<<<<<<<<<< + * def itemsize(self): + * return self.view.itemsize +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":595 + * return self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def nbytes(self): + * return self.size * self.view.itemsize +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":597 + * @property + * def nbytes(self): + * return self.size * self.view.itemsize # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":595 + * return self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def nbytes(self): + * return self.size * self.view.itemsize +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":599 + * return self.size * self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def size(self): + * if self._size is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":601 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * +*/ + __pyx_t_1 = (__pyx_v_self->_size == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":602 + * def size(self): + * if self._size is None: + * result = 1 # <<<<<<<<<<<<<< + * + * for length in self.view.shape[:self.view.ndim]: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_v_result = __pyx_mstate_global->__pyx_int_1; + + /* "View.MemoryView":604 + * result = 1 + * + * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< + * result *= length + * +*/ + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_t_5 = PyLong_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":605 + * + * for length in self.view.shape[:self.view.ndim]: + * result *= length # <<<<<<<<<<<<<< + * + * self._size = result +*/ + __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); + __pyx_t_5 = 0; + } + + /* "View.MemoryView":607 + * result *= length + * + * self._size = result # <<<<<<<<<<<<<< + * + * return self._size +*/ + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + __Pyx_GOTREF(__pyx_v_self->_size); + __Pyx_DECREF(__pyx_v_self->_size); + __pyx_v_self->_size = __pyx_v_result; + + /* "View.MemoryView":601 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * +*/ + } + + /* "View.MemoryView":609 + * self._size = result + * + * return self._size # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_size); + __pyx_r = __pyx_v_self->_size; + goto __pyx_L0; + + /* "View.MemoryView":599 + * return self.size * self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def size(self): + * if self._size is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":611 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":612 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * +*/ + __pyx_t_1 = (__pyx_v_self->view.ndim >= 1); + if (__pyx_t_1) { + + /* "View.MemoryView":613 + * def __len__(self): + * if self.view.ndim >= 1: + * return self.view.shape[0] # <<<<<<<<<<<<<< + * + * return 0 +*/ + __pyx_r = (__pyx_v_self->view.shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":612 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * +*/ + } + + /* "View.MemoryView":615 + * return self.view.shape[0] + * + * return 0 # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":611 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":617 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":618 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":619 + * def __repr__(self): + * return "" % (self.base.__class__.__name__, + * id(self)) # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_0x; + __pyx_t_4[3] = __pyx_t_3; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__3; + + /* "View.MemoryView":618 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * +*/ + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":617 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":621 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3[3]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "View.MemoryView":622 + * + * def __str__(self): + * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of; + __pyx_t_3[1] = __pyx_t_2; + __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_object_2; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":621 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":625 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_c_contig", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_c_contig", 0); + + /* "View.MemoryView":628 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 628, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":629 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< + * + * def is_f_contig(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":625 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":631 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_f_contig", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_f_contig", 0); + + /* "View.MemoryView":634 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 634, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":635 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< + * + * def copy(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":631 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":637 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_mslice; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy", 0); + + /* "View.MemoryView":639 + * def copy(self): + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &mslice) +*/ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); + + /* "View.MemoryView":641 + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + * + * slice_copy(self, &mslice) # <<<<<<<<<<<<<< + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, + * self.view.itemsize, +*/ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); + + /* "View.MemoryView":642 + * + * slice_copy(self, &mslice) + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_C_CONTIGUOUS, +*/ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 642, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":647 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< + * + * def copy_fortran(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":637 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":649 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy_fortran", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy_fortran", 0); + + /* "View.MemoryView":651 + * def copy_fortran(self): + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &src) +*/ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); + + /* "View.MemoryView":653 + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + * + * slice_copy(self, &src) # <<<<<<<<<<<<<< + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, + * self.view.itemsize, +*/ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); + + /* "View.MemoryView":654 + * + * slice_copy(self, &src) + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_F_CONTIGUOUS, +*/ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 654, __pyx_L1_error) + __pyx_v_dst = __pyx_t_1; + + /* "View.MemoryView":659 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":649 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":662 + * + * + * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<< + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) +*/ + +static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo const *__pyx_v_typeinfo) { + struct __pyx_memoryview_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); + + /* "View.MemoryView":664 + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< + * result.typeinfo = typeinfo + * return result +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_o, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":665 + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_v_result->typeinfo = __pyx_v_typeinfo; + + /* "View.MemoryView":666 + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_check') +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":662 + * + * + * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<< + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":668 + * return result + * + * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<< + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) +*/ + +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { + int __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":670 + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) # <<<<<<<<<<<<<< + * + * cdef tuple _unellipsify(object index, int ndim): +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type); + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":668 + * return result + * + * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<< + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":672 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with +*/ + +static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_idx; + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_v_result = NULL; + int __pyx_v_have_slices; + int __pyx_v_seen_ellipsis; + PyObject *__pyx_v_item = NULL; + Py_ssize_t __pyx_v_nslices; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6[3]; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unellipsify", 0); + + /* "View.MemoryView":678 + * """ + * cdef Py_ssize_t idx + * tup = index if isinstance(index, tuple) else (index,) # <<<<<<<<<<<<<< + * + * result = [slice(None)] * ndim +*/ + __pyx_t_2 = PyTuple_Check(__pyx_v_index); + if (__pyx_t_2) { + __Pyx_INCREF(((PyObject*)__pyx_v_index)); + __pyx_t_1 = __pyx_v_index; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_index); + __Pyx_GIVEREF(__pyx_v_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 678, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_v_tup = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":680 + * tup = index if isinstance(index, tuple) else (index,) + * + * result = [slice(None)] * ndim # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False +*/ + __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 680, __pyx_L1_error); + } + } + __pyx_v_result = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":681 + * + * result = [slice(None)] * ndim + * have_slices = False # <<<<<<<<<<<<<< + * seen_ellipsis = False + * idx = 0 +*/ + __pyx_v_have_slices = 0; + + /* "View.MemoryView":682 + * result = [slice(None)] * ndim + * have_slices = False + * seen_ellipsis = False # <<<<<<<<<<<<<< + * idx = 0 + * for item in tup: +*/ + __pyx_v_seen_ellipsis = 0; + + /* "View.MemoryView":683 + * have_slices = False + * seen_ellipsis = False + * idx = 0 # <<<<<<<<<<<<<< + * for item in tup: + * if item is Ellipsis: +*/ + __pyx_v_idx = 0; + + /* "View.MemoryView":684 + * seen_ellipsis = False + * idx = 0 + * for item in tup: # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: +*/ + if (unlikely(__pyx_v_tup == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 684, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 684, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":685 + * idx = 0 + * for item in tup: + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * idx += ndim - len(tup) +*/ + __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); + if (__pyx_t_2) { + + /* "View.MemoryView":686 + * for item in tup: + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * idx += ndim - len(tup) + * seen_ellipsis = True +*/ + __pyx_t_2 = (!__pyx_v_seen_ellipsis); + if (__pyx_t_2) { + + /* "View.MemoryView":687 + * if item is Ellipsis: + * if not seen_ellipsis: + * idx += ndim - len(tup) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * have_slices = True +*/ + if (unlikely(__pyx_v_tup == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 687, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5)); + + /* "View.MemoryView":688 + * if not seen_ellipsis: + * idx += ndim - len(tup) + * seen_ellipsis = True # <<<<<<<<<<<<<< + * have_slices = True + * else: +*/ + __pyx_v_seen_ellipsis = 1; + + /* "View.MemoryView":686 + * for item in tup: + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * idx += ndim - len(tup) + * seen_ellipsis = True +*/ + } + + /* "View.MemoryView":689 + * idx += ndim - len(tup) + * seen_ellipsis = True + * have_slices = True # <<<<<<<<<<<<<< + * else: + * if isinstance(item, slice): +*/ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":685 + * idx = 0 + * for item in tup: + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * idx += ndim - len(tup) +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":691 + * have_slices = True + * else: + * if isinstance(item, slice): # <<<<<<<<<<<<<< + * have_slices = True + * elif not PyIndex_Check(item): +*/ + /*else*/ { + __pyx_t_2 = PySlice_Check(__pyx_v_item); + if (__pyx_t_2) { + + /* "View.MemoryView":692 + * else: + * if isinstance(item, slice): + * have_slices = True # <<<<<<<<<<<<<< + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" +*/ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":691 + * have_slices = True + * else: + * if isinstance(item, slice): # <<<<<<<<<<<<<< + * have_slices = True + * elif not PyIndex_Check(item): +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":693 + * if isinstance(item, slice): + * have_slices = True + * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item +*/ + __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0)); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":694 + * have_slices = True + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" # <<<<<<<<<<<<<< + * result[idx] = item + * idx += 1 +*/ + __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type; + __pyx_t_6[1] = __pyx_t_3; + __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_t_7, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(1, 694, __pyx_L1_error) + + /* "View.MemoryView":693 + * if isinstance(item, slice): + * have_slices = True + * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item +*/ + } + __pyx_L7:; + + /* "View.MemoryView":695 + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item # <<<<<<<<<<<<<< + * idx += 1 + * +*/ + if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 695, __pyx_L1_error) + } + __pyx_L5:; + + /* "View.MemoryView":696 + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item + * idx += 1 # <<<<<<<<<<<<<< + * + * nslices = ndim - idx +*/ + __pyx_v_idx = (__pyx_v_idx + 1); + + /* "View.MemoryView":684 + * seen_ellipsis = False + * idx = 0 + * for item in tup: # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":698 + * idx += 1 + * + * nslices = ndim - idx # <<<<<<<<<<<<<< + * return have_slices or nslices, tuple(result) + * +*/ + __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx); + + /* "View.MemoryView":699 + * + * nslices = ndim - idx + * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: +*/ + __Pyx_XDECREF(__pyx_r); + if (!__pyx_v_have_slices) { + } else { + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_L9_bool_binop_done:; + __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 699, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 699, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_7 = 0; + __pyx_r = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":672 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":701 + * return have_slices or nslices, tuple(result) + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: +*/ + +static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_suboffset; + int __pyx_r; + Py_ssize_t *__pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":702 + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" +*/ + __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); + for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { + __pyx_t_1 = __pyx_t_3; + __pyx_v_suboffset = (__pyx_t_1[0]); + + /* "View.MemoryView":703 + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag +*/ + __pyx_t_4 = (__pyx_v_suboffset >= 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":704 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" # <<<<<<<<<<<<<< + * return 0 # return type just used as an error flag + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Indirect_dimensions_not_supporte, 0, 0); + __PYX_ERR(1, 704, __pyx_L1_error) + + /* "View.MemoryView":703 + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag +*/ + } + } + + /* "View.MemoryView":705 + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":701 + * return have_slices or nslices, tuple(result) + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":711 + * + * + * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<< + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim +*/ + +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { + int __pyx_v_new_ndim; + int __pyx_v_suboffset_dim; + int __pyx_v_dim; + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + __Pyx_memviewslice *__pyx_v_p_src; + struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; + __Pyx_memviewslice *__pyx_v_p_dst; + int *__pyx_v_p_suboffset_dim; + Py_ssize_t __pyx_v_start; + Py_ssize_t __pyx_v_stop; + Py_ssize_t __pyx_v_step; + Py_ssize_t __pyx_v_cindex; + int __pyx_v_have_start; + int __pyx_v_have_stop; + int __pyx_v_have_step; + PyObject *__pyx_v_index = NULL; + struct __pyx_memoryview_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + struct __pyx_memoryview_obj *__pyx_t_3; + char *__pyx_t_4; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + Py_ssize_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memview_slice", 0); + + /* "View.MemoryView":713 + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< + * cdef bint negative_step + * cdef __Pyx_memviewslice src, dst +*/ + __pyx_v_new_ndim = 0; + __pyx_v_suboffset_dim = -1; + + /* "View.MemoryView":720 + * + * + * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< + * + * cdef _memoryviewslice memviewsliceobj +*/ + (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); + + /* "View.MemoryView":724 + * cdef _memoryviewslice memviewsliceobj + * + * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_memview->view.ndim > 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(1, 724, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 724, __pyx_L1_error) + #endif + + /* "View.MemoryView":726 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":727 + * + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview # <<<<<<<<<<<<<< + * p_src = &memviewsliceobj.from_slice + * else: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error) + __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":728 + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, &src) +*/ + __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); + + /* "View.MemoryView":726 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":730 + * p_src = &memviewsliceobj.from_slice + * else: + * slice_copy(memview, &src) # <<<<<<<<<<<<<< + * p_src = &src + * +*/ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); + + /* "View.MemoryView":731 + * else: + * slice_copy(memview, &src) + * p_src = &src # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_p_src = (&__pyx_v_src); + } + __pyx_L3:; + + /* "View.MemoryView":737 + * + * + * dst.memview = p_src.memview # <<<<<<<<<<<<<< + * dst.data = p_src.data + * +*/ + __pyx_t_3 = __pyx_v_p_src->memview; + __pyx_v_dst.memview = __pyx_t_3; + + /* "View.MemoryView":738 + * + * dst.memview = p_src.memview + * dst.data = p_src.data # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_v_p_src->data; + __pyx_v_dst.data = __pyx_t_4; + + /* "View.MemoryView":743 + * + * + * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< + * cdef int *p_suboffset_dim = &suboffset_dim + * cdef Py_ssize_t start, stop, step, cindex +*/ + __pyx_v_p_dst = (&__pyx_v_dst); + + /* "View.MemoryView":744 + * + * cdef __Pyx_memviewslice *p_dst = &dst + * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< + * cdef Py_ssize_t start, stop, step, cindex + * cdef bint have_start, have_stop, have_step +*/ + __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); + + /* "View.MemoryView":748 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * cindex = index +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { + __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 748, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_2); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 748, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_dim = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "View.MemoryView":749 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * cindex = index + * slice_memviewslice( +*/ + __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":750 + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): + * cindex = index # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 750, __pyx_L1_error) + __pyx_v_cindex = __pyx_t_9; + + /* "View.MemoryView":751 + * if PyIndex_Check(index): + * cindex = index + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, +*/ + __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 751, __pyx_L1_error) + + /* "View.MemoryView":749 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * cindex = index + * slice_memviewslice( +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":757 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 +*/ + __pyx_t_1 = (__pyx_v_index == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":758 + * False) + * elif index is None: + * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 +*/ + (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; + + /* "View.MemoryView":759 + * elif index is None: + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 +*/ + (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; + + /* "View.MemoryView":760 + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< + * new_ndim += 1 + * else: +*/ + (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; + + /* "View.MemoryView":761 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 # <<<<<<<<<<<<<< + * else: + * start = index.start or 0 +*/ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + + /* "View.MemoryView":757 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":763 + * new_ndim += 1 + * else: + * start = index.start or 0 # <<<<<<<<<<<<<< + * stop = index.stop or 0 + * step = index.step or 0 +*/ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L7_bool_binop_done:; + __pyx_v_start = __pyx_t_9; + + /* "View.MemoryView":764 + * else: + * start = index.start or 0 + * stop = index.stop or 0 # <<<<<<<<<<<<<< + * step = index.step or 0 + * +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L9_bool_binop_done:; + __pyx_v_stop = __pyx_t_9; + + /* "View.MemoryView":765 + * start = index.start or 0 + * stop = index.stop or 0 + * step = index.step or 0 # <<<<<<<<<<<<<< + * + * have_start = index.start is not None +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 765, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 765, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L11_bool_binop_done:; + __pyx_v_step = __pyx_t_9; + + /* "View.MemoryView":767 + * step = index.step or 0 + * + * have_start = index.start is not None # <<<<<<<<<<<<<< + * have_stop = index.stop is not None + * have_step = index.step is not None +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_start = __pyx_t_1; + + /* "View.MemoryView":768 + * + * have_start = index.start is not None + * have_stop = index.stop is not None # <<<<<<<<<<<<<< + * have_step = index.step is not None + * +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_stop = __pyx_t_1; + + /* "View.MemoryView":769 + * have_start = index.start is not None + * have_stop = index.stop is not None + * have_step = index.step is not None # <<<<<<<<<<<<<< + * + * slice_memviewslice( +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_step = __pyx_t_1; + + /* "View.MemoryView":771 + * have_step = index.step is not None + * + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, +*/ + __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 771, __pyx_L1_error) + + /* "View.MemoryView":777 + * have_start, have_stop, have_step, + * True) + * new_ndim += 1 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): +*/ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + } + __pyx_L6:; + + /* "View.MemoryView":748 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * cindex = index +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":779 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":780 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "View.MemoryView":781 + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< + * memviewsliceobj.to_dtype_func, + * memview.dtype_is_object) +*/ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) } + + /* "View.MemoryView":782 + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * else: +*/ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 782, __pyx_L1_error) } + + /* "View.MemoryView":780 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, +*/ + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 780, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":779 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, +*/ + } + + /* "View.MemoryView":785 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * +*/ + /*else*/ { + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "View.MemoryView":786 + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "View.MemoryView":785 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":711 + * + * + * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<< + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":793 + * + * + * @cname('__pyx_memoryview_slice_memviewslice') # <<<<<<<<<<<<<< + * cdef int slice_memviewslice( + * __Pyx_memviewslice *dst, +*/ + +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { + Py_ssize_t __pyx_v_new_shape; + int __pyx_v_negative_step; + int __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":814 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: +*/ + __pyx_t_1 = (!__pyx_v_is_slice); + if (__pyx_t_1) { + + /* "View.MemoryView":816 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: +*/ + __pyx_t_1 = (__pyx_v_start < 0); + if (__pyx_t_1) { + + /* "View.MemoryView":817 + * + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if not 0 <= start < shape: + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) +*/ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":816 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: +*/ + } + + /* "View.MemoryView":818 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) + * else: +*/ + __pyx_t_1 = (0 <= __pyx_v_start); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); + } + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "View.MemoryView":819 + * start += shape + * if not 0 <= start < shape: + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 819, __pyx_L1_error) + + /* "View.MemoryView":818 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) + * else: +*/ + } + + /* "View.MemoryView":814 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":822 + * else: + * + * if have_step: # <<<<<<<<<<<<<< + * negative_step = step < 0 + * if step == 0: +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_have_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":823 + * + * if have_step: + * negative_step = step < 0 # <<<<<<<<<<<<<< + * if step == 0: + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) +*/ + __pyx_v_negative_step = (__pyx_v_step < 0); + + /* "View.MemoryView":824 + * if have_step: + * negative_step = step < 0 + * if step == 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: +*/ + __pyx_t_2 = (__pyx_v_step == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":825 + * negative_step = step < 0 + * if step == 0: + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * negative_step = False +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 825, __pyx_L1_error) + + /* "View.MemoryView":824 + * if have_step: + * negative_step = step < 0 + * if step == 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: +*/ + } + + /* "View.MemoryView":822 + * else: + * + * if have_step: # <<<<<<<<<<<<<< + * negative_step = step < 0 + * if step == 0: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":827 + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: + * negative_step = False # <<<<<<<<<<<<<< + * step = 1 + * +*/ + /*else*/ { + __pyx_v_negative_step = 0; + + /* "View.MemoryView":828 + * else: + * negative_step = False + * step = 1 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_step = 1; + } + __pyx_L6:; + + /* "View.MemoryView":831 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape +*/ + __pyx_t_2 = (__pyx_v_have_start != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":832 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: +*/ + __pyx_t_2 = (__pyx_v_start < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":833 + * if have_start: + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if start < 0: + * start = 0 +*/ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":834 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: +*/ + __pyx_t_2 = (__pyx_v_start < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":835 + * start += shape + * if start < 0: + * start = 0 # <<<<<<<<<<<<<< + * elif start >= shape: + * if negative_step: +*/ + __pyx_v_start = 0; + + /* "View.MemoryView":834 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: +*/ + } + + /* "View.MemoryView":832 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":836 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 +*/ + __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape); + if (__pyx_t_2) { + + /* "View.MemoryView":837 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + if (__pyx_v_negative_step) { + + /* "View.MemoryView":838 + * elif start >= shape: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = shape +*/ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":837 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":840 + * start = shape - 1 + * else: + * start = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: +*/ + /*else*/ { + __pyx_v_start = __pyx_v_shape; + } + __pyx_L11:; + + /* "View.MemoryView":836 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 +*/ + } + __pyx_L9:; + + /* "View.MemoryView":831 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":842 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + /*else*/ { + if (__pyx_v_negative_step) { + + /* "View.MemoryView":843 + * else: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = 0 +*/ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":842 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + goto __pyx_L12; + } + + /* "View.MemoryView":845 + * start = shape - 1 + * else: + * start = 0 # <<<<<<<<<<<<<< + * + * if have_stop: +*/ + /*else*/ { + __pyx_v_start = 0; + } + __pyx_L12:; + } + __pyx_L8:; + + /* "View.MemoryView":847 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape +*/ + __pyx_t_2 = (__pyx_v_have_stop != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":848 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: +*/ + __pyx_t_2 = (__pyx_v_stop < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":849 + * if have_stop: + * if stop < 0: + * stop += shape # <<<<<<<<<<<<<< + * if stop < 0: + * stop = 0 +*/ + __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); + + /* "View.MemoryView":850 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: +*/ + __pyx_t_2 = (__pyx_v_stop < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":851 + * stop += shape + * if stop < 0: + * stop = 0 # <<<<<<<<<<<<<< + * elif stop > shape: + * stop = shape +*/ + __pyx_v_stop = 0; + + /* "View.MemoryView":850 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: +*/ + } + + /* "View.MemoryView":848 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: +*/ + goto __pyx_L14; + } + + /* "View.MemoryView":852 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: +*/ + __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape); + if (__pyx_t_2) { + + /* "View.MemoryView":853 + * stop = 0 + * elif stop > shape: + * stop = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: +*/ + __pyx_v_stop = __pyx_v_shape; + + /* "View.MemoryView":852 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: +*/ + } + __pyx_L14:; + + /* "View.MemoryView":847 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape +*/ + goto __pyx_L13; + } + + /* "View.MemoryView":855 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: +*/ + /*else*/ { + if (__pyx_v_negative_step) { + + /* "View.MemoryView":856 + * else: + * if negative_step: + * stop = -1 # <<<<<<<<<<<<<< + * else: + * stop = shape +*/ + __pyx_v_stop = -1L; + + /* "View.MemoryView":855 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: +*/ + goto __pyx_L16; + } + + /* "View.MemoryView":858 + * stop = -1 + * else: + * stop = shape # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_v_stop = __pyx_v_shape; + } + __pyx_L16:; + } + __pyx_L13:; + + /* "View.MemoryView":862 + * + * with cython.cdivision(True): + * new_shape = (stop - start) // step # <<<<<<<<<<<<<< + * + * if (stop - start) - step * new_shape: +*/ + __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); + + /* "View.MemoryView":864 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * +*/ + __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":865 + * + * if (stop - start) - step * new_shape: + * new_shape += 1 # <<<<<<<<<<<<<< + * + * if new_shape < 0: +*/ + __pyx_v_new_shape = (__pyx_v_new_shape + 1); + + /* "View.MemoryView":864 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * +*/ + } + + /* "View.MemoryView":867 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * +*/ + __pyx_t_2 = (__pyx_v_new_shape < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":868 + * + * if new_shape < 0: + * new_shape = 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_new_shape = 0; + + /* "View.MemoryView":867 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * +*/ + } + + /* "View.MemoryView":871 + * + * + * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset +*/ + (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); + + /* "View.MemoryView":872 + * + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< + * dst.suboffsets[new_ndim] = suboffset + * +*/ + (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; + + /* "View.MemoryView":873 + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< + * + * +*/ + (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; + } + __pyx_L3:; + + /* "View.MemoryView":876 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: +*/ + __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":877 + * + * if suboffset_dim[0] < 0: + * dst.data += start * stride # <<<<<<<<<<<<<< + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride +*/ + __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); + + /* "View.MemoryView":876 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: +*/ + goto __pyx_L19; + } + + /* "View.MemoryView":879 + * dst.data += start * stride + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< + * + * if suboffset >= 0: +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_suboffset_dim[0]); + (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); + } + __pyx_L19:; + + /* "View.MemoryView":881 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: +*/ + __pyx_t_2 = (__pyx_v_suboffset >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":882 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset +*/ + __pyx_t_2 = (!__pyx_v_is_slice); + if (__pyx_t_2) { + + /* "View.MemoryView":883 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: +*/ + __pyx_t_2 = (__pyx_v_new_ndim == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":884 + * if not is_slice: + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " +*/ + __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":883 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: +*/ + goto __pyx_L22; + } + + /* "View.MemoryView":886 + * dst.data = ( dst.data)[0] + suboffset + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< + * "must be indexed and not sliced", dim) + * else: +*/ + /*else*/ { + + /* "View.MemoryView":887 + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " + * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< + * else: + * suboffset_dim[0] = new_ndim +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 886, __pyx_L1_error) + } + __pyx_L22:; + + /* "View.MemoryView":882 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset +*/ + goto __pyx_L21; + } + + /* "View.MemoryView":889 + * "must be indexed and not sliced", dim) + * else: + * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< + * + * return 0 +*/ + /*else*/ { + (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; + } + __pyx_L21:; + + /* "View.MemoryView":881 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: +*/ + } + + /* "View.MemoryView":891 + * suboffset_dim[0] = new_ndim + * + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":793 + * + * + * @cname('__pyx_memoryview_slice_memviewslice') # <<<<<<<<<<<<<< + * cdef int slice_memviewslice( + * __Pyx_memviewslice *dst, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":896 + * + * + * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<< + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: +*/ + +static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_suboffset; + Py_ssize_t __pyx_v_itemsize; + char *__pyx_v_resultp; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[3]; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pybuffer_index", 0); + + /* "View.MemoryView":899 + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< + * cdef Py_ssize_t itemsize = view.itemsize + * cdef char *resultp +*/ + __pyx_v_suboffset = -1L; + + /* "View.MemoryView":900 + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< + * cdef char *resultp + * +*/ + __pyx_t_1 = __pyx_v_view->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":903 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len // itemsize + * stride = itemsize +*/ + __pyx_t_2 = (__pyx_v_view->ndim == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":904 + * + * if view.ndim == 0: + * shape = view.len // itemsize # <<<<<<<<<<<<<< + * stride = itemsize + * else: +*/ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 904, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 904, __pyx_L1_error) + } + __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0); + + /* "View.MemoryView":905 + * if view.ndim == 0: + * shape = view.len // itemsize + * stride = itemsize # <<<<<<<<<<<<<< + * else: + * shape = view.shape[dim] +*/ + __pyx_v_stride = __pyx_v_itemsize; + + /* "View.MemoryView":903 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len // itemsize + * stride = itemsize +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":907 + * stride = itemsize + * else: + * shape = view.shape[dim] # <<<<<<<<<<<<<< + * stride = view.strides[dim] + * if view.suboffsets != NULL: +*/ + /*else*/ { + __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); + + /* "View.MemoryView":908 + * else: + * shape = view.shape[dim] + * stride = view.strides[dim] # <<<<<<<<<<<<<< + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] +*/ + __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); + + /* "View.MemoryView":909 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * +*/ + __pyx_t_2 = (__pyx_v_view->suboffsets != NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":910 + * stride = view.strides[dim] + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< + * + * if index < 0: +*/ + __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); + + /* "View.MemoryView":909 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * +*/ + } + } + __pyx_L3:; + + /* "View.MemoryView":912 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: +*/ + __pyx_t_2 = (__pyx_v_index < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":913 + * + * if index < 0: + * index += view.shape[dim] # <<<<<<<<<<<<<< + * if index < 0: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" +*/ + __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); + + /* "View.MemoryView":914 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + __pyx_t_2 = (__pyx_v_index < 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":915 + * index += view.shape[dim] + * if index < 0: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< + * + * if index >= shape: +*/ + __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a; + __pyx_t_4[1] = __pyx_t_3; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127); + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 915, __pyx_L1_error) + + /* "View.MemoryView":914 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + } + + /* "View.MemoryView":912 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: +*/ + } + + /* "View.MemoryView":917 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":918 + * + * if index >= shape: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< + * + * resultp = bufp + index * stride +*/ + __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a; + __pyx_t_4[1] = __pyx_t_5; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127); + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 918, __pyx_L1_error) + + /* "View.MemoryView":917 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + } + + /* "View.MemoryView":920 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * resultp = bufp + index * stride # <<<<<<<<<<<<<< + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset +*/ + __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); + + /* "View.MemoryView":921 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * +*/ + __pyx_t_2 = (__pyx_v_suboffset >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":922 + * resultp = bufp + index * stride + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< + * + * return resultp +*/ + __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":921 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * +*/ + } + + /* "View.MemoryView":924 + * resultp = ( resultp)[0] + suboffset + * + * return resultp # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_resultp; + goto __pyx_L0; + + /* "View.MemoryView":896 + * + * + * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<< + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":929 + * + * + * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<< + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim +*/ + +static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { + int __pyx_v_ndim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + int __pyx_v_i; + int __pyx_v_j; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + long __pyx_t_3; + long __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":931 + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< + * + * cdef Py_ssize_t *shape = memslice.shape +*/ + __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; + __pyx_v_ndim = __pyx_t_1; + + /* "View.MemoryView":933 + * cdef int ndim = memslice.memview.view.ndim + * + * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< + * cdef Py_ssize_t *strides = memslice.strides + * +*/ + __pyx_t_2 = __pyx_v_memslice->shape; + __pyx_v_shape = __pyx_t_2; + + /* "View.MemoryView":934 + * + * cdef Py_ssize_t *shape = memslice.shape + * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_v_memslice->strides; + __pyx_v_strides = __pyx_t_2; + + /* "View.MemoryView":938 + * + * cdef int i, j + * for i in range(ndim // 2): # <<<<<<<<<<<<<< + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] +*/ + __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1); + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":939 + * cdef int i, j + * for i in range(ndim // 2): + * j = ndim - 1 - i # <<<<<<<<<<<<<< + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] +*/ + __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); + + /* "View.MemoryView":940 + * for i in range(ndim // 2): + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< + * shape[i], shape[j] = shape[j], shape[i] + * +*/ + __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); + __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); + (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; + (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; + + /* "View.MemoryView":941 + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: +*/ + __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); + __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); + (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; + (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; + + /* "View.MemoryView":943 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * +*/ + __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0); + __pyx_t_7 = __pyx_t_8; + __pyx_L6_bool_binop_done:; + if (__pyx_t_7) { + + /* "View.MemoryView":944 + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< + * + * return 0 +*/ + __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 944, __pyx_L1_error) + + /* "View.MemoryView":943 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * +*/ + } + } + + /* "View.MemoryView":946 + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":929 + * + * + * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<< + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":964 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * +*/ + +/* Python wrapper */ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + + /* "View.MemoryView":965 + * + * def __dealloc__(self): + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): +*/ + __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1); + + /* "View.MemoryView":964 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * +*/ + + /* function exit code */ +} + +/* "View.MemoryView":967 + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) +*/ + +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":968 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: +*/ + __pyx_t_1 = (__pyx_v_self->to_object_func != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":969 + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) # <<<<<<<<<<<<<< + * else: + * return memoryview.convert_item_to_object(self, itemp) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":968 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: +*/ + } + + /* "View.MemoryView":971 + * return self.to_object_func(itemp) + * else: + * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":967 + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":973 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) +*/ + +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":974 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: +*/ + __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":975 + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< + * else: + * memoryview.assign_item_from_object(self, itemp, value) +*/ + __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 975, __pyx_L1_error) + + /* "View.MemoryView":974 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":977 + * self.to_dtype_func(itemp, value) + * else: + * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< + * + * cdef _get_base(self): +*/ + /*else*/ { + __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":973 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":979 + * memoryview.assign_item_from_object(self, itemp, value) + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.from_object + * +*/ + +static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_base", 0); + + /* "View.MemoryView":980 + * + * cdef _get_base(self): + * return self.from_object # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->from_object); + __pyx_r = __pyx_v_self->from_object; + goto __pyx_L0; + + /* "View.MemoryView":979 + * memoryview.assign_item_from_object(self, itemp, value) + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.from_object + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":999 + * pass # ignore failure, it's a minor issue + * + * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<< + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, + * int ndim, +*/ + +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_TypeInfo const *__pyx_t_4; + Py_buffer __pyx_t_5; + Py_ssize_t *__pyx_t_6; + Py_ssize_t *__pyx_t_7; + Py_ssize_t *__pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_fromslice", 0); + + /* "View.MemoryView":1008 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":1009 + * + * if memviewslice.memview == Py_None: + * return None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "View.MemoryView":1008 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "View.MemoryView":1014 + * + * + * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<< + * + * result.from_slice = memviewslice +*/ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_mstate_global->__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1016 + * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) + * + * result.from_slice = memviewslice # <<<<<<<<<<<<<< + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * +*/ + __pyx_v_result->from_slice = __pyx_v_memviewslice; + + /* "View.MemoryView":1017 + * + * result.from_slice = memviewslice + * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< + * + * result.from_object = ( memviewslice.memview)._get_base() +*/ + __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); + + /* "View.MemoryView":1019 + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + * result.from_object = ( memviewslice.memview)._get_base() # <<<<<<<<<<<<<< + * result.typeinfo = memviewslice.memview.typeinfo + * +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_result->from_object); + __Pyx_DECREF(__pyx_v_result->from_object); + __pyx_v_result->from_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":1020 + * + * result.from_object = ( memviewslice.memview)._get_base() + * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< + * + * result.view = memviewslice.memview.view +*/ + __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; + __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; + + /* "View.MemoryView":1022 + * result.typeinfo = memviewslice.memview.typeinfo + * + * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< + * result.view.buf = memviewslice.data + * result.view.ndim = ndim +*/ + __pyx_t_5 = __pyx_v_memviewslice.memview->view; + __pyx_v_result->__pyx_base.view = __pyx_t_5; + + /* "View.MemoryView":1023 + * + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None +*/ + __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); + + /* "View.MemoryView":1024 + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data + * result.view.ndim = ndim # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; + + /* "View.MemoryView":1025 + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; + + /* "View.MemoryView":1026 + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: +*/ + Py_INCREF(Py_None); + + /* "View.MemoryView":1028 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: +*/ + __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1029 + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< + * else: + * result.flags = PyBUF_RECORDS_RO +*/ + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; + + /* "View.MemoryView":1028 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":1031 + * result.flags = PyBUF_RECORDS + * else: + * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< + * + * result.view.shape = result.from_slice.shape +*/ + /*else*/ { + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; + } + __pyx_L4:; + + /* "View.MemoryView":1033 + * result.flags = PyBUF_RECORDS_RO + * + * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< + * result.view.strides = result.from_slice.strides + * +*/ + __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); + + /* "View.MemoryView":1034 + * + * result.view.shape = result.from_slice.shape + * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); + + /* "View.MemoryView":1037 + * + * + * result.view.suboffsets = NULL # <<<<<<<<<<<<<< + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: +*/ + __pyx_v_result->__pyx_base.view.suboffsets = NULL; + + /* "View.MemoryView":1038 + * + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets +*/ + __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_v_suboffset = (__pyx_t_6[0]); + + /* "View.MemoryView":1039 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break +*/ + __pyx_t_1 = (__pyx_v_suboffset >= 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1040 + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); + + /* "View.MemoryView":1041 + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + * break # <<<<<<<<<<<<<< + * + * result.view.len = result.view.itemsize +*/ + goto __pyx_L6_break; + + /* "View.MemoryView":1039 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break +*/ + } + } + __pyx_L6_break:; + + /* "View.MemoryView":1043 + * break + * + * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< + * for length in result.view.shape[:ndim]: + * result.view.len *= length +*/ + __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + + /* "View.MemoryView":1044 + * + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< + * result.view.len *= length + * +*/ + __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_t_2 = PyLong_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1045 + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: + * result.view.len *= length # <<<<<<<<<<<<<< + * + * result.to_object_func = to_object_func +*/ + __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + } + + /* "View.MemoryView":1047 + * result.view.len *= length + * + * result.to_object_func = to_object_func # <<<<<<<<<<<<<< + * result.to_dtype_func = to_dtype_func + * +*/ + __pyx_v_result->to_object_func = __pyx_v_to_object_func; + + /* "View.MemoryView":1048 + * + * result.to_object_func = to_object_func + * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< + * + * return result +*/ + __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; + + /* "View.MemoryView":1050 + * result.to_dtype_func = to_dtype_func + * + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":999 + * pass # ignore failure, it's a minor issue + * + * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<< + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, + * int ndim, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1052 + * return result + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, + * __Pyx_memviewslice *mslice) except NULL: +*/ + +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { + struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; + __Pyx_memviewslice *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_slice_from_memview", 0); + + /* "View.MemoryView":1056 + * __Pyx_memviewslice *mslice) except NULL: + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":1057 + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): + * obj = memview # <<<<<<<<<<<<<< + * return &obj.from_slice + * else: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1058 + * if isinstance(memview, _memoryviewslice): + * obj = memview + * return &obj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, mslice) +*/ + __pyx_r = (&__pyx_v_obj->from_slice); + goto __pyx_L0; + + /* "View.MemoryView":1056 + * __Pyx_memviewslice *mslice) except NULL: + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice +*/ + } + + /* "View.MemoryView":1060 + * return &obj.from_slice + * else: + * slice_copy(memview, mslice) # <<<<<<<<<<<<<< + * return mslice + * +*/ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); + + /* "View.MemoryView":1061 + * else: + * slice_copy(memview, mslice) + * return mslice # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_slice_copy') +*/ + __pyx_r = __pyx_v_mslice; + goto __pyx_L0; + } + + /* "View.MemoryView":1052 + * return result + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, + * __Pyx_memviewslice *mslice) except NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1063 + * return mslice + * + * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<< + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: + * cdef int dim +*/ + +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { + int __pyx_v_dim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + Py_ssize_t *__pyx_v_suboffsets; + Py_ssize_t *__pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + + /* "View.MemoryView":1068 + * cdef (Py_ssize_t*) shape, strides, suboffsets + * + * shape = memview.view.shape # <<<<<<<<<<<<<< + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets +*/ + __pyx_t_1 = __pyx_v_memview->view.shape; + __pyx_v_shape = __pyx_t_1; + + /* "View.MemoryView":1069 + * + * shape = memview.view.shape + * strides = memview.view.strides # <<<<<<<<<<<<<< + * suboffsets = memview.view.suboffsets + * +*/ + __pyx_t_1 = __pyx_v_memview->view.strides; + __pyx_v_strides = __pyx_t_1; + + /* "View.MemoryView":1070 + * shape = memview.view.shape + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< + * + * dst.memview = <__pyx_memoryview *> memview +*/ + __pyx_t_1 = __pyx_v_memview->view.suboffsets; + __pyx_v_suboffsets = __pyx_t_1; + + /* "View.MemoryView":1072 + * suboffsets = memview.view.suboffsets + * + * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< + * dst.data = memview.view.buf + * +*/ + __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); + + /* "View.MemoryView":1073 + * + * dst.memview = <__pyx_memoryview *> memview + * dst.data = memview.view.buf # <<<<<<<<<<<<<< + * + * for dim in range(memview.view.ndim): +*/ + __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); + + /* "View.MemoryView":1075 + * dst.data = memview.view.buf + * + * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] +*/ + __pyx_t_2 = __pyx_v_memview->view.ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_dim = __pyx_t_4; + + /* "View.MemoryView":1076 + * + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 +*/ + (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); + + /* "View.MemoryView":1077 + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * +*/ + (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); + + /* "View.MemoryView":1078 + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object') +*/ + __pyx_t_6 = (__pyx_v_suboffsets != 0); + if (__pyx_t_6) { + __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); + } else { + __pyx_t_5 = -1L; + } + (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; + } + + /* "View.MemoryView":1063 + * return mslice + * + * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<< + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: + * cdef int dim +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1080 + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<< + * cdef memoryview_copy(memoryview memview): + * "Create a new memoryview object" +*/ + +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { + __Pyx_memviewslice __pyx_v_memviewslice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy", 0); + + /* "View.MemoryView":1084 + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< + * return memoryview_copy_from_slice(memview, &memviewslice) + * +*/ + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); + + /* "View.MemoryView":1085 + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) + * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object_from_slice') +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1080 + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<< + * cdef memoryview_copy(memoryview memview): + * "Create a new memoryview object" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1087 + * return memoryview_copy_from_slice(memview, &memviewslice) + * + * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<< + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): + * """ +*/ + +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { + PyObject *(*__pyx_v_to_object_func)(char *); + int (*__pyx_v_to_dtype_func)(char *, PyObject *); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *(*__pyx_t_2)(char *); + int (*__pyx_t_3)(char *, PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); + + /* "View.MemoryView":1095 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":1096 + * + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: +*/ + __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; + __pyx_v_to_object_func = __pyx_t_2; + + /* "View.MemoryView":1097 + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< + * else: + * to_object_func = NULL +*/ + __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; + __pyx_v_to_dtype_func = __pyx_t_3; + + /* "View.MemoryView":1095 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1099 + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + * to_object_func = NULL # <<<<<<<<<<<<<< + * to_dtype_func = NULL + * +*/ + /*else*/ { + __pyx_v_to_object_func = NULL; + + /* "View.MemoryView":1100 + * else: + * to_object_func = NULL + * to_dtype_func = NULL # <<<<<<<<<<<<<< + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, +*/ + __pyx_v_to_dtype_func = NULL; + } + __pyx_L3:; + + /* "View.MemoryView":1102 + * to_dtype_func = NULL + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< + * to_object_func, to_dtype_func, + * memview.dtype_is_object) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "View.MemoryView":1104 + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + * to_object_func, to_dtype_func, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1087 + * return memoryview_copy_from_slice(memview, &memviewslice) + * + * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<< + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): + * """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1110 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< + * return -arg if arg < 0 else arg + * +*/ + +static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + + /* "View.MemoryView":1111 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: + * return -arg if arg < 0 else arg # <<<<<<<<<<<<<< + * + * @cname('__pyx_get_best_slice_order') +*/ + __pyx_t_2 = (__pyx_v_arg < 0); + if (__pyx_t_2) { + __pyx_t_1 = (-__pyx_v_arg); + } else { + __pyx_t_1 = __pyx_v_arg; + } + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":1110 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< + * return -arg if arg < 0 else arg + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1113 + * return -arg if arg < 0 else arg + * + * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<< + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: + * """ +*/ + +static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_c_stride; + Py_ssize_t __pyx_v_f_stride; + char __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1119 + * """ + * cdef int i + * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< + * cdef Py_ssize_t f_stride = 0 + * +*/ + __pyx_v_c_stride = 0; + + /* "View.MemoryView":1120 + * cdef int i + * cdef Py_ssize_t c_stride = 0 + * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): +*/ + __pyx_v_f_stride = 0; + + /* "View.MemoryView":1122 + * cdef Py_ssize_t f_stride = 0 + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] +*/ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1123 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break +*/ + __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1124 + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1125 + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * for i in range(ndim): +*/ + goto __pyx_L4_break; + + /* "View.MemoryView":1123 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break +*/ + } + } + __pyx_L4_break:; + + /* "View.MemoryView":1127 + * break + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] +*/ + __pyx_t_1 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_1; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1128 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break +*/ + __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1129 + * for i in range(ndim): + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1130 + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): +*/ + goto __pyx_L7_break; + + /* "View.MemoryView":1128 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break +*/ + } + } + __pyx_L7_break:; + + /* "View.MemoryView":1132 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: +*/ + __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)); + if (__pyx_t_2) { + + /* "View.MemoryView":1133 + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + * return 'C' # <<<<<<<<<<<<<< + * else: + * return 'F' +*/ + __pyx_r = 'C'; + goto __pyx_L0; + + /* "View.MemoryView":1132 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: +*/ + } + + /* "View.MemoryView":1135 + * return 'C' + * else: + * return 'F' # <<<<<<<<<<<<<< + * + * @cython.cdivision(True) +*/ + /*else*/ { + __pyx_r = 'F'; + goto __pyx_L0; + } + + /* "View.MemoryView":1113 + * return -arg if arg < 0 else arg + * + * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<< + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: + * """ +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1137 + * return 'F' + * + * @cython.cdivision(True) # <<<<<<<<<<<<<< + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, + * char *dst_data, Py_ssize_t *dst_strides, +*/ + +static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; + Py_ssize_t __pyx_v_dst_extent; + Py_ssize_t __pyx_v_src_stride; + Py_ssize_t __pyx_v_dst_stride; + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + + /* "View.MemoryView":1145 + * + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] +*/ + __pyx_v_src_extent = (__pyx_v_src_shape[0]); + + /* "View.MemoryView":1146 + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] +*/ + __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); + + /* "View.MemoryView":1147 + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_stride = dst_strides[0] + * +*/ + __pyx_v_src_stride = (__pyx_v_src_strides[0]); + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: +*/ + __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); + + /* "View.MemoryView":1150 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): +*/ + __pyx_t_1 = (__pyx_v_ndim == 1); + if (__pyx_t_1) { + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + __pyx_t_2 = (__pyx_v_src_stride > 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_dst_stride > 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + + /* "View.MemoryView":1152 + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: +*/ + __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); + if (__pyx_t_2) { + __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); + } + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + if (__pyx_t_1) { + + /* "View.MemoryView":1153 + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): +*/ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":1155 + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride +*/ + /*else*/ { + __pyx_t_3 = __pyx_v_dst_extent; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1156 + * else: + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< + * src_data += src_stride + * dst_data += dst_stride +*/ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); + + /* "View.MemoryView":1157 + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * else: +*/ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1158 + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): +*/ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L4:; + + /* "View.MemoryView":1150 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1160 + * dst_data += dst_stride + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * _copy_strided_to_strided(src_data, src_strides + 1, + * dst_data, dst_strides + 1, +*/ + /*else*/ { + __pyx_t_3 = __pyx_v_dst_extent; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1161 + * else: + * for i in range(dst_extent): + * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< + * dst_data, dst_strides + 1, + * src_shape + 1, dst_shape + 1, +*/ + _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); + + /* "View.MemoryView":1165 + * src_shape + 1, dst_shape + 1, + * ndim - 1, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * +*/ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1166 + * ndim - 1, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, +*/ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1137 + * return 'F' + * + * @cython.cdivision(True) # <<<<<<<<<<<<<< + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, + * char *dst_data, Py_ssize_t *dst_strides, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1168 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: +*/ + +static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + + /* "View.MemoryView":1171 + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: + * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< + * src.shape, dst.shape, ndim, itemsize) + * +*/ + _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1168 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1174 + * src.shape, dst.shape, ndim, itemsize) + * + * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<< + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" +*/ + +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_size; + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + + /* "View.MemoryView":1177 + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<< + * + * for shape in src.shape[:ndim]: +*/ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_size = __pyx_t_1; + + /* "View.MemoryView":1179 + * cdef Py_ssize_t shape, size = src.memview.view.itemsize + * + * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<< + * size *= shape + * +*/ + __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim); + for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_v_shape = (__pyx_t_2[0]); + + /* "View.MemoryView":1180 + * + * for shape in src.shape[:ndim]: + * size *= shape # <<<<<<<<<<<<<< + * + * return size +*/ + __pyx_v_size = (__pyx_v_size * __pyx_v_shape); + } + + /* "View.MemoryView":1182 + * size *= shape + * + * return size # <<<<<<<<<<<<<< + * + * @cname('__pyx_fill_contig_strides_array') +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "View.MemoryView":1174 + * src.shape, dst.shape, ndim, itemsize) + * + * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<< + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1184 + * return size + * + * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<< + * cdef Py_ssize_t fill_contig_strides_array( + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, +*/ + +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { + int __pyx_v_idx; + Py_ssize_t __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1194 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride +*/ + __pyx_t_1 = (__pyx_v_order == 'F'); + if (__pyx_t_1) { + + /* "View.MemoryView":1195 + * + * if order == 'F': + * for idx in range(ndim): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride *= shape[idx] +*/ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_idx = __pyx_t_4; + + /* "View.MemoryView":1196 + * if order == 'F': + * for idx in range(ndim): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride *= shape[idx] + * else: +*/ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1197 + * for idx in range(ndim): + * strides[idx] = stride + * stride *= shape[idx] # <<<<<<<<<<<<<< + * else: + * for idx in range(ndim - 1, -1, -1): +*/ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + + /* "View.MemoryView":1194 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1199 + * stride *= shape[idx] + * else: + * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride *= shape[idx] +*/ + /*else*/ { + for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { + __pyx_v_idx = __pyx_t_2; + + /* "View.MemoryView":1200 + * else: + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride *= shape[idx] + * +*/ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1201 + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride + * stride *= shape[idx] # <<<<<<<<<<<<<< + * + * return stride +*/ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + } + __pyx_L3:; + + /* "View.MemoryView":1203 + * stride *= shape[idx] + * + * return stride # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_data_to_temp') +*/ + __pyx_r = __pyx_v_stride; + goto __pyx_L0; + + /* "View.MemoryView":1184 + * return size + * + * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<< + * cdef Py_ssize_t fill_contig_strides_array( + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1205 + * return stride + * + * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<< + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, + * __Pyx_memviewslice *tmpslice, +*/ + +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { + int __pyx_v_i; + void *__pyx_v_result; + size_t __pyx_v_itemsize; + size_t __pyx_v_size; + void *__pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + struct __pyx_memoryview_obj *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":1217 + * cdef void *result + * + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef size_t size = slice_get_size(src, ndim) + * +*/ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1218 + * + * cdef size_t itemsize = src.memview.view.itemsize + * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< + * + * result = malloc(size) +*/ + __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); + + /* "View.MemoryView":1220 + * cdef size_t size = slice_get_size(src, ndim) + * + * result = malloc(size) # <<<<<<<<<<<<<< + * if not result: + * _err_no_memory() +*/ + __pyx_v_result = malloc(__pyx_v_size); + + /* "View.MemoryView":1221 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err_no_memory() + * +*/ + __pyx_t_2 = (!(__pyx_v_result != 0)); + if (__pyx_t_2) { + + /* "View.MemoryView":1222 + * result = malloc(size) + * if not result: + * _err_no_memory() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1222, __pyx_L1_error) + + /* "View.MemoryView":1221 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err_no_memory() + * +*/ + } + + /* "View.MemoryView":1225 + * + * + * tmpslice.data = result # <<<<<<<<<<<<<< + * tmpslice.memview = src.memview + * for i in range(ndim): +*/ + __pyx_v_tmpslice->data = ((char *)__pyx_v_result); + + /* "View.MemoryView":1226 + * + * tmpslice.data = result + * tmpslice.memview = src.memview # <<<<<<<<<<<<<< + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] +*/ + __pyx_t_4 = __pyx_v_src->memview; + __pyx_v_tmpslice->memview = __pyx_t_4; + + /* "View.MemoryView":1227 + * tmpslice.data = result + * tmpslice.memview = src.memview + * for i in range(ndim): # <<<<<<<<<<<<<< + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 +*/ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1228 + * tmpslice.memview = src.memview + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< + * tmpslice.suboffsets[i] = -1 + * +*/ + (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); + + /* "View.MemoryView":1229 + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) +*/ + (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1231 + * tmpslice.suboffsets[i] = -1 + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) # <<<<<<<<<<<<<< + * + * +*/ + (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); + + /* "View.MemoryView":1234 + * + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 +*/ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * +*/ + __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1236 + * for i in range(ndim): + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< + * + * if slice_is_contig(src[0], order, ndim): +*/ + (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * +*/ + } + } + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1239 + * + * if slice_is_contig(src[0], order, ndim): + * memcpy(result, src.data, size) # <<<<<<<<<<<<<< + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) +*/ + (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":1241 + * memcpy(result, src.data, size) + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< + * + * return result +*/ + /*else*/ { + copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); + } + __pyx_L9:; + + /* "View.MemoryView":1243 + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + * + * return result # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":1205 + * return stride + * + * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<< + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, + * __Pyx_memviewslice *tmpslice, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1247 + * + * + * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<< + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: +*/ + +static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[7]; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err_extents", 0); + + /* "View.MemoryView":1250 + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_dim') +*/ + __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_got; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_and; + __pyx_t_4[5] = __pyx_t_3; + __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127); + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 1250, __pyx_L1_error) + + /* "View.MemoryView":1247 + * + * + * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<< + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1252 + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" + * + * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<< + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim +*/ + +static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err_dim", 0); + __Pyx_INCREF(__pyx_v_msg); + + /* "View.MemoryView":1254 + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err') +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 1254, __pyx_L1_error) + + /* "View.MemoryView":1252 + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" + * + * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<< + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1256 + * raise error, msg % dim + * + * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<< + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg +*/ + +static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err", 0); + __Pyx_INCREF(__pyx_v_msg); + + /* "View.MemoryView":1258 + * @cname('__pyx_memoryview_err') + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_no_memory') +*/ + __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0); + __PYX_ERR(1, 1258, __pyx_L1_error) + + /* "View.MemoryView":1256 + * raise error, msg % dim + * + * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<< + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1260 + * raise error, msg + * + * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<< + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError +*/ + +static int __pyx_memoryview_err_no_memory(void) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + + /* "View.MemoryView":1262 + * @cname('__pyx_memoryview_err_no_memory') + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError # <<<<<<<<<<<<<< + * + * +*/ + PyErr_NoMemory(); __PYX_ERR(1, 1262, __pyx_L1_error) + + /* "View.MemoryView":1260 + * raise error, msg + * + * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<< + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1265 + * + * + * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<< + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, + * __Pyx_memviewslice dst, +*/ + +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { + void *__pyx_v_tmpdata; + size_t __pyx_v_itemsize; + int __pyx_v_i; + char __pyx_v_order; + int __pyx_v_broadcasting; + int __pyx_v_direct_copy; + __Pyx_memviewslice __pyx_v_tmp; + int __pyx_v_ndim; + int __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + void *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":1274 + * Check for overlapping memory and verify the shapes. + * """ + * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i +*/ + __pyx_v_tmpdata = NULL; + + /* "View.MemoryView":1275 + * """ + * cdef void *tmpdata = NULL + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) +*/ + __pyx_t_1 = __pyx_v_src.memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1277 + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< + * cdef bint broadcasting = False + * cdef bint direct_copy = False +*/ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); + + /* "View.MemoryView":1278 + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False # <<<<<<<<<<<<<< + * cdef bint direct_copy = False + * cdef __Pyx_memviewslice tmp +*/ + __pyx_v_broadcasting = 0; + + /* "View.MemoryView":1279 + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False + * cdef bint direct_copy = False # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice tmp + * +*/ + __pyx_v_direct_copy = 0; + + /* "View.MemoryView":1282 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: +*/ + __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1283 + * + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) +*/ + __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); + + /* "View.MemoryView":1282 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1284 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * +*/ + __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1285 + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< + * + * cdef int ndim = max(src_ndim, dst_ndim) +*/ + __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); + + /* "View.MemoryView":1284 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * +*/ + } + __pyx_L3:; + + /* "View.MemoryView":1287 + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * + * for i in range(ndim): +*/ + __pyx_t_3 = __pyx_v_dst_ndim; + __pyx_t_4 = __pyx_v_src_ndim; + __pyx_t_2 = (__pyx_t_3 > __pyx_t_4); + if (__pyx_t_2) { + __pyx_t_5 = __pyx_t_3; + } else { + __pyx_t_5 = __pyx_t_4; + } + __pyx_v_ndim = __pyx_t_5; + + /* "View.MemoryView":1289 + * cdef int ndim = max(src_ndim, dst_ndim) + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: +*/ + __pyx_t_5 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_5; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1290 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True +*/ + __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])); + if (__pyx_t_2) { + + /* "View.MemoryView":1291 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 +*/ + __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1292 + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + * broadcasting = True # <<<<<<<<<<<<<< + * src.strides[i] = 0 + * else: +*/ + __pyx_v_broadcasting = 1; + + /* "View.MemoryView":1293 + * if src.shape[i] == 1: + * broadcasting = True + * src.strides[i] = 0 # <<<<<<<<<<<<<< + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) +*/ + (__pyx_v_src.strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1291 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":1295 + * src.strides[i] = 0 + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< + * + * if src.suboffsets[i] >= 0: +*/ + /*else*/ { + __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1295, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":1290 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True +*/ + } + + /* "View.MemoryView":1297 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * +*/ + __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1298 + * + * if src.suboffsets[i] >= 0: + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< + * + * if slices_overlap(&src, &dst, ndim, itemsize): +*/ + __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1298, __pyx_L1_error) + + /* "View.MemoryView":1297 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * +*/ + } + } + + /* "View.MemoryView":1300 + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): +*/ + __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + if (__pyx_t_2) { + + /* "View.MemoryView":1302 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * +*/ + __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim)); + if (__pyx_t_2) { + + /* "View.MemoryView":1303 + * + * if not slice_is_contig(src, order, ndim): + * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) +*/ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); + + /* "View.MemoryView":1302 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * +*/ + } + + /* "View.MemoryView":1305 + * order = get_best_order(&dst, ndim) + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< + * src = tmp + * +*/ + __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1305, __pyx_L1_error) + __pyx_v_tmpdata = __pyx_t_7; + + /* "View.MemoryView":1306 + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + * src = tmp # <<<<<<<<<<<<<< + * + * if not broadcasting: +*/ + __pyx_v_src = __pyx_v_tmp; + + /* "View.MemoryView":1300 + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): +*/ + } + + /* "View.MemoryView":1308 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = (!__pyx_v_broadcasting); + if (__pyx_t_2) { + + /* "View.MemoryView":1311 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1312 + * + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) +*/ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); + + /* "View.MemoryView":1311 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): +*/ + goto __pyx_L12; + } + + /* "View.MemoryView":1313 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1314 + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< + * + * if direct_copy: +*/ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); + + /* "View.MemoryView":1313 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * +*/ + } + __pyx_L12:; + + /* "View.MemoryView":1316 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + if (__pyx_v_direct_copy) { + + /* "View.MemoryView":1318 + * if direct_copy: + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1319 + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) +*/ + (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); + + /* "View.MemoryView":1320 + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * free(tmpdata) + * return 0 +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1321 + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * +*/ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1322 + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * if order == 'F' == get_best_order(&dst, ndim): +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1316 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + } + + /* "View.MemoryView":1308 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":1324 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = (__pyx_v_order == 'F'); + if (__pyx_t_2) { + __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); + } + if (__pyx_t_2) { + + /* "View.MemoryView":1327 + * + * + * transpose_memslice(&src) # <<<<<<<<<<<<<< + * transpose_memslice(&dst) + * +*/ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error) + + /* "View.MemoryView":1328 + * + * transpose_memslice(&src) + * transpose_memslice(&dst) # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1328, __pyx_L1_error) + + /* "View.MemoryView":1324 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":1330 + * transpose_memslice(&dst) + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1331 + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * +*/ + copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1332 + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * + * free(tmpdata) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1334 + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * +*/ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1335 + * + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_broadcast_leading') +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1265 + * + * + * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<< + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, + * __Pyx_memviewslice dst, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1337 + * return 0 + * + * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<< + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, + * int ndim, +*/ + +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { + int __pyx_v_i; + int __pyx_v_offset; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":1342 + * int ndim_other) noexcept nogil: + * cdef int i + * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): +*/ + __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); + + /* "View.MemoryView":1344 + * cdef int offset = ndim_other - ndim + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] +*/ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1345 + * + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] +*/ + (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); + + /* "View.MemoryView":1346 + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * +*/ + (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1347 + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< + * + * for i in range(offset): +*/ + (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); + } + + /* "View.MemoryView":1349 + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + * for i in range(offset): # <<<<<<<<<<<<<< + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] +*/ + __pyx_t_1 = __pyx_v_offset; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1350 + * + * for i in range(offset): + * mslice.shape[i] = 1 # <<<<<<<<<<<<<< + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 +*/ + (__pyx_v_mslice->shape[__pyx_v_i]) = 1; + + /* "View.MemoryView":1351 + * for i in range(offset): + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< + * mslice.suboffsets[i] = -1 + * +*/ + (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); + + /* "View.MemoryView":1352 + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * +*/ + (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1337 + * return 0 + * + * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<< + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, + * int ndim, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1359 + * + * + * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<< + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * +*/ + +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { + + /* "View.MemoryView":1362 + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * +*/ + if (__pyx_v_dtype_is_object) { + + /* "View.MemoryView":1363 + * + * if dtype_is_object: + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') +*/ + __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1362 + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * +*/ + } + + /* "View.MemoryView":1359 + * + * + * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<< + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1365 + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + + /* "View.MemoryView":1369 + * Py_ssize_t *strides, int ndim, + * bint inc) noexcept with gil: + * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') +*/ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1365 + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + + /* function exit code */ + __Pyx_PyGILState_Release(__pyx_gilstate_save); +} + +/* "View.MemoryView":1371 + * refcount_objects_in_slice(data, shape, strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, bint inc) noexcept: +*/ + +static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1375 + * Py_ssize_t *strides, int ndim, bint inc) noexcept: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * + * for i in range(shape[0]): +*/ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1377 + * cdef Py_ssize_t stride = strides[0] + * + * for i in range(shape[0]): # <<<<<<<<<<<<<< + * if ndim == 1: + * if inc: +*/ + __pyx_t_1 = (__pyx_v_shape[0]); + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1378 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) +*/ + __pyx_t_4 = (__pyx_v_ndim == 1); + if (__pyx_t_4) { + + /* "View.MemoryView":1379 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: +*/ + if (__pyx_v_inc) { + + /* "View.MemoryView":1380 + * if ndim == 1: + * if inc: + * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * Py_DECREF(( data)[0]) +*/ + Py_INCREF((((PyObject **)__pyx_v_data)[0])); + + /* "View.MemoryView":1379 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":1382 + * Py_INCREF(( data)[0]) + * else: + * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) +*/ + /*else*/ { + Py_DECREF((((PyObject **)__pyx_v_data)[0])); + } + __pyx_L6:; + + /* "View.MemoryView":1378 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":1384 + * Py_DECREF(( data)[0]) + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<< + * + * data += stride +*/ + /*else*/ { + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); + } + __pyx_L5:; + + /* "View.MemoryView":1386 + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) + * + * data += stride # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1371 + * refcount_objects_in_slice(data, shape, strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, bint inc) noexcept: +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1391 + * + * + * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, + * size_t itemsize, void *item, +*/ + +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { + + /* "View.MemoryView":1395 + * size_t itemsize, void *item, + * bint dtype_is_object) noexcept nogil: + * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1396 + * bint dtype_is_object) noexcept nogil: + * refcount_copying(dst, dtype_is_object, ndim, inc=False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<< + * refcount_copying(dst, dtype_is_object, ndim, inc=True) + * +*/ + __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1397 + * refcount_copying(dst, dtype_is_object, ndim, inc=False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1391 + * + * + * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, + * size_t itemsize, void *item, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1400 + * + * + * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + +static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_extent; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + + /* "View.MemoryView":1405 + * size_t itemsize, void *item) noexcept nogil: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t extent = shape[0] + * +*/ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1406 + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] + * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: +*/ + __pyx_v_extent = (__pyx_v_shape[0]); + + /* "View.MemoryView":1408 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) +*/ + __pyx_t_1 = (__pyx_v_ndim == 1); + if (__pyx_t_1) { + + /* "View.MemoryView":1409 + * + * if ndim == 1: + * for i in range(extent): # <<<<<<<<<<<<<< + * memcpy(data, item, itemsize) + * data += stride +*/ + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1410 + * if ndim == 1: + * for i in range(extent): + * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< + * data += stride + * else: +*/ + (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); + + /* "View.MemoryView":1411 + * for i in range(extent): + * memcpy(data, item, itemsize) + * data += stride # <<<<<<<<<<<<<< + * else: + * for i in range(extent): +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1408 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1413 + * data += stride + * else: + * for i in range(extent): # <<<<<<<<<<<<<< + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) + * data += stride +*/ + /*else*/ { + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1414 + * else: + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<< + * data += stride + * +*/ + __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1415 + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) + * data += stride # <<<<<<<<<<<<<< + * +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1400 + * + * + * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + + /* function exit code */ +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') # <<<<<<<<<<<<<< + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, __pyx_k_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":132 + * class CoderImpl(object): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":136 + * + * """Reads object from potentially-nested encoding in stream.""" + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 136, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":132 + * class CoderImpl(object): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream, "Reads object from potentially-nested encoding in stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 132, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 132, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 132, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 132, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 132, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 132, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 132, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 132, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 132, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":138 + * raise NotImplementedError + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":142 + * + * """Reads object from potentially-nested encoding in stream.""" + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 142, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":138 + * raise NotImplementedError + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream, "Reads object from potentially-nested encoding in stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 138, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 138, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 138, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 138, __pyx_L3_error) + } + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 138, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":144 + * raise NotImplementedError + * + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":148 + * + * """Encodes an object to an unnested string.""" + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 148, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":144 + * raise NotImplementedError + * + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode, "Encodes an object to an unnested string."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 144, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 144, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 144, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 144, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":150 + * raise NotImplementedError + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":154 + * + * """Decodes an object to an unnested string.""" + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def encode_all(self, values): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 154, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":150 + * raise NotImplementedError + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode, "Decodes an object to an unnested string."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 150, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 150, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 150, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 150, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":156 + * raise NotImplementedError + * + * def encode_all(self, values): # <<<<<<<<<<<<<< + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all = {"encode_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_values = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_all (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 156, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 156, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_all", 0) < (0)) __PYX_ERR(0, 156, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_all", 1, 1, 1, i); __PYX_ERR(0, 156, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 156, __pyx_L3_error) + } + __pyx_v_values = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_all", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 156, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_values); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_values) { + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_all", 0); + + /* "apache_beam/coders/coder_impl.py":158 + * def encode_all(self, values): + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() # <<<<<<<<<<<<<< + * for value in values: + * self.encode_to_stream(value, out, True) +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __pyx_t_3 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_out = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":159 + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() + * for value in values: # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, True) + * return out.get() +*/ + if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) { + __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 159, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 159, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + } else { + __pyx_t_3 = __pyx_t_6(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 159, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":160 + * out = create_OutputStream() + * for value in values: + * self.encode_to_stream(value, out, True) # <<<<<<<<<<<<<< + * return out.get() + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":159 + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() + * for value in values: # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, True) + * return out.get() +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":161 + * for value in values: + * self.encode_to_stream(value, out, True) + * return out.get() # <<<<<<<<<<<<<< + * + * def decode_all(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":156 + * raise NotImplementedError + * + * def encode_all(self, values): # <<<<<<<<<<<<<< + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":163 + * return out.get() + * + * def decode_all(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all = {"decode_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_all (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 163, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 163, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_all", 0) < (0)) __PYX_ERR(0, 163, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_all", 1, 1, 1, i); __PYX_ERR(0, 163, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 163, __pyx_L3_error) + } + __pyx_v_encoded = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_all", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 163, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_all", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 163, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __pyx_cur_scope->__pyx_v_encoded = __pyx_v_encoded; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_encoded); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_encoded); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_decode_all, __pyx_mstate_global->__pyx_n_u_CoderImpl_decode_all, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_all", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 163, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":165 + * def decode_all(self, encoded): + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) # <<<<<<<<<<<<<< + * while input_stream.size() > 0: + * yield self.decode_from_stream(input_stream, True) +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream); + __pyx_t_3 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_input_stream = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":166 + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) + * while input_stream.size() > 0: # <<<<<<<<<<<<<< + * yield self.decode_from_stream(input_stream, True) + * +*/ + while (1) { + __pyx_t_3 = __pyx_cur_scope->__pyx_v_input_stream; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_size, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_5) break; + + /* "apache_beam/coders/coder_impl.py":167 + * input_stream = create_InputStream(encoded) + * while input_stream.size() > 0: + * yield self.decode_from_stream(input_stream, True) # <<<<<<<<<<<<<< + * + * def encode_nested(self, value): +*/ + if (!(likely(((__pyx_cur_scope->__pyx_v_input_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_cur_scope->__pyx_v_input_stream, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->decode_from_stream(__pyx_cur_scope->__pyx_v_self, ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_cur_scope->__pyx_v_input_stream), 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 167, __pyx_L1_error) + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/coders/coder_impl.py":163 + * return out.get() + * + * def decode_all(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("decode_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":169 + * yield self.decode_from_stream(input_stream, True) + * + * def encode_nested(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_nested", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":171 + * def encode_nested(self, value): + * # type: (Any) -> bytes + * out = create_OutputStream() # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, True) + * return out.get() +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_out = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":172 + * # type: (Any) -> bytes + * out = create_OutputStream() + * self.encode_to_stream(value, out, True) # <<<<<<<<<<<<<< + * return out.get() + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":173 + * out = create_OutputStream() + * self.encode_to_stream(value, out, True) + * return out.get() # <<<<<<<<<<<<<< + * + * def decode_nested(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":169 + * yield self.decode_from_stream(input_stream, True) + * + * def encode_nested(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested = {"encode_nested", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_nested (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 169, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_nested", 0) < (0)) __PYX_ERR(0, 169, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_nested", 1, 1, 1, i); __PYX_ERR(0, 169, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_nested", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 169, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_nested", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":175 + * return out.get() + * + * def decode_nested(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), True) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_nested", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":177 + * def decode_nested(self, encoded): + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), True) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->decode_from_stream(__pyx_v_self, ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_t_1), 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":175 + * return out.get() + * + * def decode_nested(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), True) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested = {"decode_nested", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_nested (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 175, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 175, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_nested", 0) < (0)) __PYX_ERR(0, 175, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_nested", 1, 1, 1, i); __PYX_ERR(0, 175, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 175, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_nested", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 175, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_15decode_nested(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_15decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_nested", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":179 + * return self.decode_from_stream(create_InputStream(encoded), True) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":183 + * + * """Estimates the encoded size of the given value, in bytes.""" + * out = ByteCountingOutputStream() # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, nested) + * return out.get_count() +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_out = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":184 + * """Estimates the encoded size of the given value, in bytes.""" + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * return out.get_count() + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":185 + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) + * return out.get_count() # <<<<<<<<<<<<<< + * + * def _get_nested_size(self, inner_size, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_count, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":179 + * return self.decode_from_stream(create_InputStream(encoded), True) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size, "Estimates the encoded size of the given value, in bytes."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 179, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 179, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 179, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 179, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 179, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 179, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 179, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 179, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl->estimate_size(__pyx_v_self, __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":187 + * return out.get_count() + * + * def _get_nested_size(self, inner_size, nested): # <<<<<<<<<<<<<< + * if not nested: + * return inner_size +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_varint_size; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_nested_size", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_nested_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_inner_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_8; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":188 + * + * def _get_nested_size(self, inner_size, nested): + * if not nested: # <<<<<<<<<<<<<< + * return inner_size + * varint_size = get_varint_size(inner_size) +*/ + __pyx_t_9 = (!__pyx_v_nested); + if (__pyx_t_9) { + + /* "apache_beam/coders/coder_impl.py":189 + * def _get_nested_size(self, inner_size, nested): + * if not nested: + * return inner_size # <<<<<<<<<<<<<< + * varint_size = get_varint_size(inner_size) + * return varint_size + inner_size +*/ + __pyx_r = __pyx_v_inner_size; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":188 + * + * def _get_nested_size(self, inner_size, nested): + * if not nested: # <<<<<<<<<<<<<< + * return inner_size + * varint_size = get_varint_size(inner_size) +*/ + } + + /* "apache_beam/coders/coder_impl.py":190 + * if not nested: + * return inner_size + * varint_size = get_varint_size(inner_size) # <<<<<<<<<<<<<< + * return varint_size + inner_size + * +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_inner_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_varint_size = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":191 + * return inner_size + * varint_size = get_varint_size(inner_size) + * return varint_size + inner_size # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __pyx_r = (__pyx_v_varint_size + __pyx_v_inner_size); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":187 + * return out.get_count() + * + * def _get_nested_size(self, inner_size, nested): # <<<<<<<<<<<<<< + * if not nested: + * return inner_size +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size = {"_get_nested_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_inner_size; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_nested_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inner_size,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 187, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_nested_size", 0) < (0)) __PYX_ERR(0, 187, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_nested_size", 1, 2, 2, i); __PYX_ERR(0, 187, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + } + __pyx_v_inner_size = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_inner_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L3_error) + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_get_nested_size", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 187, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_inner_size, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_nested_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(__pyx_v_self, __pyx_v_inner_size, __pyx_v_nested, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":193 + * return varint_size + inner_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":211 + * whose elements are 2-tuples of (obj, coder_impl) as described above. + * """ + * return self.estimate_size(value, nested), [] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->estimate_size(__pyx_v_self, __pyx_v_value, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 211, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 211, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":193 + * return varint_size + inner_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables, "Returns estimated size of value along with any nested observables.\n\n The list of nested observables is returned as a list of 2-tuples of\n (obj, coder_impl), where obj is an instance of observable.ObservableMixin,\n and coder_impl is the CoderImpl that can be used to encode elements sent by\n obj to its observers.\n\n Arguments:\n value: the value whose encoded size is to be estimated.\n nested: whether the value is nested.\n\n Returns:\n The estimated encoded size of the given value and a list of observables\n whose elements are 2-tuples of (obj, coder_impl) as described above.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 193, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 193, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 193, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 193, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 193, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 193, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 193, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 193, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl->get_estimated_size_and_observables(__pyx_v_self, __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":218 + * + * Subclass of CoderImpl implementing stream methods using encode/decode.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":222 + * + * """Reads object from potentially-nested encoding in stream.""" + * stream.write(self.encode(value), nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":218 + * + * Subclass of CoderImpl implementing stream methods using encode/decode.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream, "Reads object from potentially-nested encoding in stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 218, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 218, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 218, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":224 + * stream.write(self.encode(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":228 + * + * """Reads object from potentially-nested encoding in stream.""" + * return self.decode(stream.read_all(nested)) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":224 + * stream.write(self.encode(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream, "Reads object from potentially-nested encoding in stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 224, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 224, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 224, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + } + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":235 + * + * Subclass of CoderImpl implementing encode/decode using stream methods.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":237 + * def encode(self, value): + * # type: (Any) -> bytes + * out = create_OutputStream() # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, False) + * return out.get() +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_out = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":238 + * # type: (Any) -> bytes + * out = create_OutputStream() + * self.encode_to_stream(value, out, False) # <<<<<<<<<<<<<< + * return out.get() + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":239 + * out = create_OutputStream() + * self.encode_to_stream(value, out, False) + * return out.get() # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":235 + * + * Subclass of CoderImpl implementing encode/decode using stream methods.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 235, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 235, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 235, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 235, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":241 + * return out.get() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), False) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":243 + * def decode(self, encoded): + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), False) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_t_1), 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":241 + * return out.get() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), False) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 241, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 241, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 241, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 241, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 241, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_2decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_2decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":245 + * return self.decode_from_stream(create_InputStream(encoded), False) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":249 + * + * """Estimates the encoded size of the given value, in bytes.""" + * out = ByteCountingOutputStream() # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, nested) + * return out.get_count() +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_out = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":250 + * """Estimates the encoded size of the given value, in bytes.""" + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * return out.get_count() + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":251 + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) + * return out.get_count() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_count, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":245 + * return self.decode_from_stream(create_InputStream(encoded), False) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size, "Estimates the encoded size of the given value, in bytes."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 245, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 245, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 245, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 245, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":262 + * is not overwritten. + * """ + * def __init__(self, encoder, decoder, size_estimator=None): # <<<<<<<<<<<<<< + * self._encoder = encoder + * self._decoder = decoder +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_encoder = 0; + PyObject *__pyx_v_decoder = 0; + PyObject *__pyx_v_size_estimator = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoder,&__pyx_mstate_global->__pyx_n_u_decoder,&__pyx_mstate_global->__pyx_n_u_size_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 262, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 262, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 262, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 262, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 262, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_encoder = values[0]; + __pyx_v_decoder = values[1]; + __pyx_v_size_estimator = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 262, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_encoder, __pyx_v_decoder, __pyx_v_size_estimator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoder, PyObject *__pyx_v_decoder, PyObject *__pyx_v_size_estimator) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":263 + * """ + * def __init__(self, encoder, decoder, size_estimator=None): + * self._encoder = encoder # <<<<<<<<<<<<<< + * self._decoder = decoder + * self._size_estimator = size_estimator or self._default_size_estimator +*/ + __Pyx_INCREF(__pyx_v_encoder); + __Pyx_GIVEREF(__pyx_v_encoder); + __Pyx_GOTREF(__pyx_v_self->_encoder); + __Pyx_DECREF(__pyx_v_self->_encoder); + __pyx_v_self->_encoder = __pyx_v_encoder; + + /* "apache_beam/coders/coder_impl.py":264 + * def __init__(self, encoder, decoder, size_estimator=None): + * self._encoder = encoder + * self._decoder = decoder # <<<<<<<<<<<<<< + * self._size_estimator = size_estimator or self._default_size_estimator + * +*/ + __Pyx_INCREF(__pyx_v_decoder); + __Pyx_GIVEREF(__pyx_v_decoder); + __Pyx_GOTREF(__pyx_v_self->_decoder); + __Pyx_DECREF(__pyx_v_self->_decoder); + __pyx_v_self->_decoder = __pyx_v_decoder; + + /* "apache_beam/coders/coder_impl.py":265 + * self._encoder = encoder + * self._decoder = decoder + * self._size_estimator = size_estimator or self._default_size_estimator # <<<<<<<<<<<<<< + * + * def _default_size_estimator(self, value): +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_size_estimator); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 265, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_size_estimator); + __pyx_t_1 = __pyx_v_size_estimator; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_default_size_estimator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_size_estimator); + __Pyx_DECREF(__pyx_v_self->_size_estimator); + __pyx_v_self->_size_estimator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":262 + * is not overwritten. + * """ + * def __init__(self, encoder, decoder, size_estimator=None): # <<<<<<<<<<<<<< + * self._encoder = encoder + * self._decoder = decoder +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":267 + * self._size_estimator = size_estimator or self._default_size_estimator + * + * def _default_size_estimator(self, value): # <<<<<<<<<<<<<< + * return len(self.encode(value)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator = {"_default_size_estimator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_default_size_estimator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 267, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 267, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_default_size_estimator", 0) < (0)) __PYX_ERR(0, 267, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_default_size_estimator", 1, 1, 1, i); __PYX_ERR(0, 267, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 267, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_default_size_estimator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 267, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl._default_size_estimator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_default_size_estimator", 0); + + /* "apache_beam/coders/coder_impl.py":268 + * + * def _default_size_estimator(self, value): + * return len(self.encode(value)) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, stream, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 268, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":267 + * self._size_estimator = size_estimator or self._default_size_estimator + * + * def _default_size_estimator(self, value): # <<<<<<<<<<<<<< + * return len(self.encode(value)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl._default_size_estimator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":270 + * return len(self.encode(value)) + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * return stream.write(self._encoder(value), nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":272 + * def encode_to_stream(self, value, stream, nested): + * # type: (Any, create_OutputStream, bool) -> None + * return stream.write(self._encoder(value), nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_encoder); + __pyx_t_4 = __pyx_v_self->_encoder; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":270 + * return len(self.encode(value)) + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * return stream.write(self._encoder(value), nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 270, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 270, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 270, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 270, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 270, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 270, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":274 + * return stream.write(self._encoder(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._decoder(stream.read_all(nested)) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":276 + * def decode_from_stream(self, stream, nested): + * # type: (create_InputStream, bool) -> Any + * return self._decoder(stream.read_all(nested)) # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_decoder); + __pyx_t_4 = __pyx_v_self->_decoder; + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":274 + * return stream.write(self._encoder(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._decoder(stream.read_all(nested)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 274, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 274, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 274, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 274, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 274, __pyx_L3_error) + } + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 274, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":278 + * return self._decoder(stream.read_all(nested)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return self._encoder(value) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":279 + * + * def encode(self, value): + * return self._encoder(value) # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_encoder); + __pyx_t_4 = __pyx_v_self->_encoder; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":278 + * return self._decoder(stream.read_all(nested)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return self._encoder(value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 278, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 278, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 278, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 278, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 278, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 278, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":281 + * return self._encoder(value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._decoder(encoded) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":282 + * + * def decode(self, encoded): + * return self._decoder(encoded) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_decoder); + __pyx_t_4 = __pyx_v_self->_decoder; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":281 + * return self._encoder(value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._decoder(encoded) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 281, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 281, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 281, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 281, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 281, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 281, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_10decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_10decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":284 + * return self._decoder(encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return self._get_nested_size(self._size_estimator(value), nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":286 + * def estimate_size(self, value, nested=False): + * # type: (Any, bool) -> int + * return self._get_nested_size(self._size_estimator(value), nested) # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_size_estimator); + __pyx_t_4 = __pyx_v_self->_size_estimator; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_nested_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_t_7, __pyx_v_nested, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":284 + * return self._decoder(encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return self._get_nested_size(self._size_estimator(value), nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 284, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 284, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 284, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 284, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 284, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 284, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 284, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 284, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":288 + * return self._get_nested_size(self._size_estimator(value), nested) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":291 + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # CallbackCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":293 + * if isinstance(value, observable.ObservableMixin): + * # CallbackCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] # <<<<<<<<<<<<<< + * + * return self.estimate_size(value, nested), [] +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 293, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 293, __pyx_L1_error); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 293, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 293, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 293, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":291 + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # CallbackCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] +*/ + } + + /* "apache_beam/coders/coder_impl.py":295 + * return 1, [(value, self)] + * + * return self.estimate_size(value, nested), [] # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.nested = __pyx_v_nested; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 295, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 295, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":288 + * return self._get_nested_size(self._size_estimator(value), nested) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 288, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 288, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 288, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 288, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 288, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 288, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 288, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 288, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":297 + * return self.estimate_size(value, nested), [] + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % ( + * self._encoder, self._decoder) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3[5]; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/coders/coder_impl.py":298 + * + * def __repr__(self): + * return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % ( # <<<<<<<<<<<<<< + * self._encoder, self._decoder) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":299 + * def __repr__(self): + * return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % ( + * self._encoder, self._decoder) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->_encoder), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->_decoder), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_CallbackCoderImpl_encoder; + __pyx_t_3[1] = __pyx_t_1; + __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_decoder_2; + __pyx_t_3[3] = __pyx_t_2; + __pyx_t_3[4] = __pyx_mstate_global->__pyx_kp_u__6; + + /* "apache_beam/coders/coder_impl.py":298 + * + * def __repr__(self): + * return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % ( # <<<<<<<<<<<<<< + * self._encoder, self._decoder) + * +*/ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":297 + * return self.estimate_size(value, nested), [] + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % ( + * self._encoder, self._decoder) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._decoder, self._encoder, self._size_estimator) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_decoder); + __Pyx_GIVEREF(__pyx_v_self->_decoder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_decoder) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_encoder); + __Pyx_GIVEREF(__pyx_v_self->_encoder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_encoder) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_size_estimator); + __Pyx_GIVEREF(__pyx_v_self->_size_estimator); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_size_estimator) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._decoder, self._encoder, self._size_estimator) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._decoder, self._encoder, self._size_estimator) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._decoder, self._encoder, self._size_estimator) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->_decoder != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_encoder != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_size_estimator != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None + * if use_setstate: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_140927196); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_140927196); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_140927196) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, None), state + * else: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_140927196); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_140927196); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_140927196) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":304 + * class ProtoCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): # <<<<<<<<<<<<<< + * self.proto_message_type = proto_message_type + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_proto_message_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_proto_message_type,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 304, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 304, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 304, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 304, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 304, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 304, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 304, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_proto_message_type = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 304, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_proto_message_type); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_message_type) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":305 + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): + * self.proto_message_type = proto_message_type # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_proto_message_type, __pyx_v_proto_message_type) < (0)) __PYX_ERR(0, 305, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":304 + * class ProtoCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): # <<<<<<<<<<<<<< + * self.proto_message_type = proto_message_type + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":307 + * self.proto_message_type = proto_message_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 307, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 307, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 307, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, i); __PYX_ERR(0, 307, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 307, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 307, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + + /* "apache_beam/coders/coder_impl.py":308 + * + * def encode(self, value): + * return value.SerializePartialToString() # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_SerializePartialToString, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":307 + * self.proto_message_type = proto_message_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":310 + * return value.SerializePartialToString() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * proto_message = self.proto_message_type() + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 310, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 310, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 310, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 310, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, i); __PYX_ERR(0, 310, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 310, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 310, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_encoded = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 310, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_encoded); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_v_proto_message = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + + /* "apache_beam/coders/coder_impl.py":311 + * + * def decode(self, encoded): + * proto_message = self.proto_message_type() # <<<<<<<<<<<<<< + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". + * return proto_message +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_proto_message_type, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_proto_message = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":312 + * def decode(self, encoded): + * proto_message = self.proto_message_type() + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". # <<<<<<<<<<<<<< + * return proto_message + * +*/ + __pyx_t_2 = __pyx_v_proto_message; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ParseFromString, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":313 + * proto_message = self.proto_message_type() + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". + * return proto_message # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_proto_message); + __pyx_r = __pyx_v_proto_message; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":310 + * return value.SerializePartialToString() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * proto_message = self.proto_message_type() + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_proto_message); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":318 + * class DeterministicProtoCoderImpl(ProtoCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString(deterministic=True) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 318, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 318, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, i); __PYX_ERR(0, 318, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 318, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 318, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 318, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + + /* "apache_beam/coders/coder_impl.py":319 + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): + * return value.SerializePartialToString(deterministic=True) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deterministic, Py_True, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_SerializePartialToString, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":318 + * class DeterministicProtoCoderImpl(ProtoCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString(deterministic=True) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":324 + * class ProtoPlusCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_plus_type): # <<<<<<<<<<<<<< + * # type: (Type[proto.Message]) -> None + * self.proto_plus_type = proto_plus_type +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_proto_plus_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_proto_plus_type,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 324, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 324, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 324, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 324, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 324, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 324, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 324, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_proto_plus_type = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 324, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_proto_plus_type); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_plus_type) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":326 + * def __init__(self, proto_plus_type): + * # type: (Type[proto.Message]) -> None + * self.proto_plus_type = proto_plus_type # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_proto_plus_type, __pyx_v_proto_plus_type) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":324 + * class ProtoPlusCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_plus_type): # <<<<<<<<<<<<<< + * # type: (Type[proto.Message]) -> None + * self.proto_plus_type = proto_plus_type +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":328 + * self.proto_plus_type = proto_plus_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value._pb.SerializePartialToString(deterministic=True) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 328, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 328, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 328, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 328, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, i); __PYX_ERR(0, 328, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 328, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 328, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 328, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + + /* "apache_beam/coders/coder_impl.py":329 + * + * def encode(self, value): + * return value._pb.SerializePartialToString(deterministic=True) # <<<<<<<<<<<<<< + * + * def decode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_pb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deterministic, Py_True, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_SerializePartialToString, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":328 + * self.proto_plus_type = proto_plus_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value._pb.SerializePartialToString(deterministic=True) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":331 + * return value._pb.SerializePartialToString(deterministic=True) + * + * def decode(self, value): # <<<<<<<<<<<<<< + * return self.proto_plus_type.deserialize(value) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 331, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 331, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 331, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, i); __PYX_ERR(0, 331, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 331, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 331, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + + /* "apache_beam/coders/coder_impl.py":332 + * + * def decode(self, value): + * return self.proto_plus_type.deserialize(value) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_proto_plus_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deserialize, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":331 + * return value._pb.SerializePartialToString(deterministic=True) + * + * def decode(self, value): # <<<<<<<<<<<<<< + * return self.proto_plus_type.deserialize(value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":362 + * + * + * def _verify_dill_compat(): # <<<<<<<<<<<<<< + * base_error = ( + * "This pipeline runs with the pipeline option " +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1_verify_dill_compat(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_1_verify_dill_compat = {"_verify_dill_compat", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_1_verify_dill_compat, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1_verify_dill_compat(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_verify_dill_compat (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl__verify_dill_compat(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl__verify_dill_compat(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_v_base_error = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_verify_dill_compat", 0); + + /* "apache_beam/coders/coder_impl.py":364 + * def _verify_dill_compat(): + * base_error = ( + * "This pipeline runs with the pipeline option " # <<<<<<<<<<<<<< + * "--update_compatibility_version=2.67.0 or earlier. " + * "When running with this option on SDKs 2.68.0 or " +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_This_pipeline_runs_with_the_pipe); + __pyx_v_base_error = __pyx_mstate_global->__pyx_kp_u_This_pipeline_runs_with_the_pipe; + + /* "apache_beam/coders/coder_impl.py":368 + * "When running with this option on SDKs 2.68.0 or " + * "later, you must ensure dill==0.3.1.1 is installed.") + * if not dill: # <<<<<<<<<<<<<< + * raise RuntimeError(base_error + ". Dill is not installed.") + * if dill.__version__ != "0.3.1.1": +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/coders/coder_impl.py":369 + * "later, you must ensure dill==0.3.1.1 is installed.") + * if not dill: + * raise RuntimeError(base_error + ". Dill is not installed.") # <<<<<<<<<<<<<< + * if dill.__version__ != "0.3.1.1": + * raise RuntimeError(base_error + f". Found dill version '{dill.__version__}") +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_v_base_error, __pyx_mstate_global->__pyx_kp_u_Dill_is_not_installed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 369, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":368 + * "When running with this option on SDKs 2.68.0 or " + * "later, you must ensure dill==0.3.1.1 is installed.") + * if not dill: # <<<<<<<<<<<<<< + * raise RuntimeError(base_error + ". Dill is not installed.") + * if dill.__version__ != "0.3.1.1": +*/ + } + + /* "apache_beam/coders/coder_impl.py":370 + * if not dill: + * raise RuntimeError(base_error + ". Dill is not installed.") + * if dill.__version__ != "0.3.1.1": # <<<<<<<<<<<<<< + * raise RuntimeError(base_error + f". Found dill version '{dill.__version__}") + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_version); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_0_3_1_1, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/coders/coder_impl.py":371 + * raise RuntimeError(base_error + ". Dill is not installed.") + * if dill.__version__ != "0.3.1.1": + * raise RuntimeError(base_error + f". Found dill version '{dill.__version__}") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_version); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Found_dill_version, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_base_error, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 371, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":370 + * if not dill: + * raise RuntimeError(base_error + ". Dill is not installed.") + * if dill.__version__ != "0.3.1.1": # <<<<<<<<<<<<<< + * raise RuntimeError(base_error + f". Found dill version '{dill.__version__}") + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":362 + * + * + * def _verify_dill_compat(): # <<<<<<<<<<<<<< + * base_error = ( + * "This pipeline runs with the pipeline option " +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._verify_dill_compat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_base_error); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":376 + * class FastPrimitivesCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * fallback_coder_impl, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_fallback_coder_impl = 0; + PyObject *__pyx_v_requires_deterministic_step_label = 0; + PyObject *__pyx_v_force_use_dill = 0; + PyObject *__pyx_v_use_relative_filepaths = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fallback_coder_impl,&__pyx_mstate_global->__pyx_n_u_requires_deterministic_step_labe,&__pyx_mstate_global->__pyx_n_u_force_use_dill,&__pyx_mstate_global->__pyx_n_u_use_relative_filepaths,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 376, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 376, __pyx_L3_error) + + /* "apache_beam/coders/coder_impl.py":379 + * self, + * fallback_coder_impl, + * requires_deterministic_step_label=None, # <<<<<<<<<<<<<< + * force_use_dill=False, + * use_relative_filepaths=True): +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/coders/coder_impl.py":380 + * fallback_coder_impl, + * requires_deterministic_step_label=None, + * force_use_dill=False, # <<<<<<<<<<<<<< + * use_relative_filepaths=True): + * self.fallback_coder_impl = fallback_coder_impl +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + + /* "apache_beam/coders/coder_impl.py":381 + * requires_deterministic_step_label=None, + * force_use_dill=False, + * use_relative_filepaths=True): # <<<<<<<<<<<<<< + * self.fallback_coder_impl = fallback_coder_impl + * self.iterable_coder_impl = IterableCoderImpl(self) +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, i); __PYX_ERR(0, 376, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 376, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/coders/coder_impl.py":379 + * self, + * fallback_coder_impl, + * requires_deterministic_step_label=None, # <<<<<<<<<<<<<< + * force_use_dill=False, + * use_relative_filepaths=True): +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/coders/coder_impl.py":380 + * fallback_coder_impl, + * requires_deterministic_step_label=None, + * force_use_dill=False, # <<<<<<<<<<<<<< + * use_relative_filepaths=True): + * self.fallback_coder_impl = fallback_coder_impl +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + + /* "apache_beam/coders/coder_impl.py":381 + * requires_deterministic_step_label=None, + * force_use_dill=False, + * use_relative_filepaths=True): # <<<<<<<<<<<<<< + * self.fallback_coder_impl = fallback_coder_impl + * self.iterable_coder_impl = IterableCoderImpl(self) +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True)); + } + __pyx_v_fallback_coder_impl = values[0]; + __pyx_v_requires_deterministic_step_label = values[1]; + __pyx_v_force_use_dill = values[2]; + __pyx_v_use_relative_filepaths = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 376, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_fallback_coder_impl, __pyx_v_requires_deterministic_step_label, __pyx_v_force_use_dill, __pyx_v_use_relative_filepaths); + + /* "apache_beam/coders/coder_impl.py":376 + * class FastPrimitivesCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * fallback_coder_impl, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_fallback_coder_impl, PyObject *__pyx_v_requires_deterministic_step_label, PyObject *__pyx_v_force_use_dill, PyObject *__pyx_v_use_relative_filepaths) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":382 + * force_use_dill=False, + * use_relative_filepaths=True): + * self.fallback_coder_impl = fallback_coder_impl # <<<<<<<<<<<<<< + * self.iterable_coder_impl = IterableCoderImpl(self) + * self.requires_deterministic_step_label = requires_deterministic_step_label +*/ + __pyx_t_1 = __pyx_v_fallback_coder_impl; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->fallback_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v_self->fallback_coder_impl); + __pyx_v_self->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":383 + * use_relative_filepaths=True): + * self.fallback_coder_impl = fallback_coder_impl + * self.iterable_coder_impl = IterableCoderImpl(self) # <<<<<<<<<<<<<< + * self.requires_deterministic_step_label = requires_deterministic_step_label + * self.warn_deterministic_fallback = True +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->iterable_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v_self->iterable_coder_impl); + __pyx_v_self->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":384 + * self.fallback_coder_impl = fallback_coder_impl + * self.iterable_coder_impl = IterableCoderImpl(self) + * self.requires_deterministic_step_label = requires_deterministic_step_label # <<<<<<<<<<<<<< + * self.warn_deterministic_fallback = True + * self.force_use_dill = force_use_dill +*/ + __Pyx_INCREF(__pyx_v_requires_deterministic_step_label); + __Pyx_GIVEREF(__pyx_v_requires_deterministic_step_label); + __Pyx_GOTREF(__pyx_v_self->requires_deterministic_step_label); + __Pyx_DECREF(__pyx_v_self->requires_deterministic_step_label); + __pyx_v_self->requires_deterministic_step_label = __pyx_v_requires_deterministic_step_label; + + /* "apache_beam/coders/coder_impl.py":385 + * self.iterable_coder_impl = IterableCoderImpl(self) + * self.requires_deterministic_step_label = requires_deterministic_step_label + * self.warn_deterministic_fallback = True # <<<<<<<<<<<<<< + * self.force_use_dill = force_use_dill + * self.use_relative_filepaths = use_relative_filepaths +*/ + __pyx_v_self->warn_deterministic_fallback = 1; + + /* "apache_beam/coders/coder_impl.py":386 + * self.requires_deterministic_step_label = requires_deterministic_step_label + * self.warn_deterministic_fallback = True + * self.force_use_dill = force_use_dill # <<<<<<<<<<<<<< + * self.use_relative_filepaths = use_relative_filepaths + * +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force_use_dill); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_v_self->force_use_dill = __pyx_t_4; + + /* "apache_beam/coders/coder_impl.py":387 + * self.warn_deterministic_fallback = True + * self.force_use_dill = force_use_dill + * self.use_relative_filepaths = use_relative_filepaths # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_use_relative_filepaths); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_v_self->use_relative_filepaths = __pyx_t_4; + + /* "apache_beam/coders/coder_impl.py":376 + * class FastPrimitivesCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * fallback_coder_impl, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":389 + * self.use_relative_filepaths = use_relative_filepaths + * + * @staticmethod # <<<<<<<<<<<<<< + * def register_iterable_like_type(t): + * _ITERABLE_LIKE_TYPES.add(t) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type = {"register_iterable_like_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_t = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("register_iterable_like_type (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_t,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 389, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 389, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register_iterable_like_type", 0) < (0)) __PYX_ERR(0, 389, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register_iterable_like_type", 1, 1, 1, i); __PYX_ERR(0, 389, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 389, __pyx_L3_error) + } + __pyx_v_t = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("register_iterable_like_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 389, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.register_iterable_like_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(__pyx_v_t); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(PyObject *__pyx_v_t) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("register_iterable_like_type", 0); + + /* "apache_beam/coders/coder_impl.py":391 + * @staticmethod + * def register_iterable_like_type(t): + * _ITERABLE_LIKE_TYPES.add(t) # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); + __PYX_ERR(0, 391, __pyx_L1_error) + } + __pyx_t_1 = PySet_Add(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, __pyx_v_t); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 391, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":389 + * self.use_relative_filepaths = use_relative_filepaths + * + * @staticmethod # <<<<<<<<<<<<<< + * def register_iterable_like_type(t): + * _ITERABLE_LIKE_TYPES.add(t) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.register_iterable_like_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":393 + * _ITERABLE_LIKE_TYPES.add(t) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":395 + * def get_estimated_size_and_observables(self, value, nested=False): + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # FastPrimitivesCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":397 + * if isinstance(value, observable.ObservableMixin): + * # FastPrimitivesCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] # <<<<<<<<<<<<<< + * + * out = ByteCountingOutputStream() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":395 + * def get_estimated_size_and_observables(self, value, nested=False): + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # FastPrimitivesCoderImpl can presumably encode the elements too. + * return 1, [(value, self)] +*/ + } + + /* "apache_beam/coders/coder_impl.py":399 + * return 1, [(value, self)] + * + * out = ByteCountingOutputStream() # <<<<<<<<<<<<<< + * self.encode_to_stream(value, out, nested) + * return out.get_count(), [] +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_out = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":400 + * + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * return out.get_count(), [] + * +*/ + if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":401 + * out = ByteCountingOutputStream() + * self.encode_to_stream(value, out, nested) + * return out.get_count(), [] # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, stream, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_count, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 401, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 401, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":393 + * _ITERABLE_LIKE_TYPES.add(t) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 393, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 393, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 393, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 393, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 393, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 393, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 393, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 393, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 393, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":403 + * return out.get_count(), [] + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_dict_value = 0; + int64_t __pyx_v_int_value; + PyObject *__pyx_v_unicode_value = 0; + PyTypeObject *__pyx_v_t = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_ordered_kvs = NULL; + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int64_t __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + double __pyx_t_15; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_16; + unsigned char __pyx_t_17; + Py_ssize_t __pyx_t_18; + PyObject *(*__pyx_t_19)(PyObject *); + PyObject *__pyx_t_20 = NULL; + int __pyx_t_21; + char const *__pyx_t_22; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + PyObject *__pyx_t_28 = NULL; + PyObject *(*__pyx_t_29)(PyObject *); + Py_ssize_t __pyx_t_30; + char const *__pyx_t_31; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_INCREF(__pyx_v_value); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":405 + * def encode_to_stream(self, value, stream, nested): + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) # <<<<<<<<<<<<<< + * if value is None: + * stream.write_byte(NONE_TYPE) +*/ + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); + __pyx_v_t = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value))); + + /* "apache_beam/coders/coder_impl.py":406 + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) + * if value is None: # <<<<<<<<<<<<<< + * stream.write_byte(NONE_TYPE) + * elif t is int: +*/ + __pyx_t_7 = (__pyx_v_value == Py_None); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":407 + * t = type(value) + * if value is None: + * stream.write_byte(NONE_TYPE) # <<<<<<<<<<<<<< + * elif t is int: + * # In Python 3, an int may be larger than 64 bits. +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":406 + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) + * if value is None: # <<<<<<<<<<<<<< + * stream.write_byte(NONE_TYPE) + * elif t is int: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":408 + * if value is None: + * stream.write_byte(NONE_TYPE) + * elif t is int: # <<<<<<<<<<<<<< + * # In Python 3, an int may be larger than 64 bits. + * # We need to check whether value fits into a 64 bit integer before +*/ + __pyx_t_7 = (__pyx_v_t == (&PyLong_Type)); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":412 + * # We need to check whether value fits into a 64 bit integer before + * # writing the marker byte. + * try: # <<<<<<<<<<<<<< + * # In Cython-compiled code this will throw an overflow error + * # when value does not fit into int64. +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":415 + * # In Cython-compiled code this will throw an overflow error + * # when value does not fit into int64. + * int_value = value # <<<<<<<<<<<<<< + * # If Cython is not used, we must do a (slower) check ourselves. + * if not TYPE_CHECKING and not is_compiled: +*/ + __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 415, __pyx_L4_error) + __pyx_v_int_value = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":417 + * int_value = value + * # If Cython is not used, we must do a (slower) check ourselves. + * if not TYPE_CHECKING and not is_compiled: # <<<<<<<<<<<<<< + * if not fits_in_64_bits(value): + * raise OverflowError() +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 417, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = (!__pyx_t_12); + if (__pyx_t_13) { + } else { + __pyx_t_7 = __pyx_t_13; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_13 = (!__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled); + __pyx_t_7 = __pyx_t_13; + __pyx_L11_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":418 + * # If Cython is not used, we must do a (slower) check ourselves. + * if not TYPE_CHECKING and not is_compiled: + * if not fits_in_64_bits(value): # <<<<<<<<<<<<<< + * raise OverflowError() + * stream.write_byte(INT_TYPE) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fits_in_64_bits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 418, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = (!__pyx_t_7); + if (unlikely(__pyx_t_13)) { + + /* "apache_beam/coders/coder_impl.py":419 + * if not TYPE_CHECKING and not is_compiled: + * if not fits_in_64_bits(value): + * raise OverflowError() # <<<<<<<<<<<<<< + * stream.write_byte(INT_TYPE) + * stream.write_var_int64(int_value) +*/ + __pyx_t_4 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 419, __pyx_L4_error) + + /* "apache_beam/coders/coder_impl.py":418 + * # If Cython is not used, we must do a (slower) check ourselves. + * if not TYPE_CHECKING and not is_compiled: + * if not fits_in_64_bits(value): # <<<<<<<<<<<<<< + * raise OverflowError() + * stream.write_byte(INT_TYPE) +*/ + } + + /* "apache_beam/coders/coder_impl.py":417 + * int_value = value + * # If Cython is not used, we must do a (slower) check ourselves. + * if not TYPE_CHECKING and not is_compiled: # <<<<<<<<<<<<<< + * if not fits_in_64_bits(value): + * raise OverflowError() +*/ + } + + /* "apache_beam/coders/coder_impl.py":420 + * if not fits_in_64_bits(value): + * raise OverflowError() + * stream.write_byte(INT_TYPE) # <<<<<<<<<<<<<< + * stream.write_var_int64(int_value) + * except OverflowError: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":421 + * raise OverflowError() + * stream.write_byte(INT_TYPE) + * stream.write_var_int64(int_value) # <<<<<<<<<<<<<< + * except OverflowError: + * stream.write_byte(UNKNOWN_TYPE) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_v_int_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":412 + * # We need to check whether value fits into a 64 bit integer before + * # writing the marker byte. + * try: # <<<<<<<<<<<<<< + * # In Cython-compiled code this will throw an overflow error + * # when value does not fit into int64. +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":422 + * stream.write_byte(INT_TYPE) + * stream.write_var_int64(int_value) + * except OverflowError: # <<<<<<<<<<<<<< + * stream.write_byte(UNKNOWN_TYPE) + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) +*/ + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError)))); + if (__pyx_t_14) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 422, __pyx_L6_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":423 + * stream.write_var_int64(int_value) + * except OverflowError: + * stream.write_byte(UNKNOWN_TYPE) # <<<<<<<<<<<<<< + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * elif t is float: +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":424 + * except OverflowError: + * stream.write_byte(UNKNOWN_TYPE) + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) # <<<<<<<<<<<<<< + * elif t is float: + * stream.write_byte(FLOAT_TYPE) +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L5_exception_handled; + } + goto __pyx_L6_except_error; + + /* "apache_beam/coders/coder_impl.py":412 + * # We need to check whether value fits into a 64 bit integer before + * # writing the marker byte. + * try: # <<<<<<<<<<<<<< + * # In Cython-compiled code this will throw an overflow error + * # when value does not fit into int64. +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L9_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":408 + * if value is None: + * stream.write_byte(NONE_TYPE) + * elif t is int: # <<<<<<<<<<<<<< + * # In Python 3, an int may be larger than 64 bits. + * # We need to check whether value fits into a 64 bit integer before +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":425 + * stream.write_byte(UNKNOWN_TYPE) + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * elif t is float: # <<<<<<<<<<<<<< + * stream.write_byte(FLOAT_TYPE) + * stream.write_bigendian_double(value) +*/ + __pyx_t_13 = (__pyx_v_t == (&PyFloat_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":426 + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * elif t is float: + * stream.write_byte(FLOAT_TYPE) # <<<<<<<<<<<<<< + * stream.write_bigendian_double(value) + * elif t is bytes: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":427 + * elif t is float: + * stream.write_byte(FLOAT_TYPE) + * stream.write_bigendian_double(value) # <<<<<<<<<<<<<< + * elif t is bytes: + * stream.write_byte(BYTES_TYPE) +*/ + __pyx_t_15 = __Pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_double(__pyx_v_stream, __pyx_t_15, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":425 + * stream.write_byte(UNKNOWN_TYPE) + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * elif t is float: # <<<<<<<<<<<<<< + * stream.write_byte(FLOAT_TYPE) + * stream.write_bigendian_double(value) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":428 + * stream.write_byte(FLOAT_TYPE) + * stream.write_bigendian_double(value) + * elif t is bytes: # <<<<<<<<<<<<<< + * stream.write_byte(BYTES_TYPE) + * stream.write(value, nested) +*/ + __pyx_t_13 = (__pyx_v_t == (&PyBytes_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":429 + * stream.write_bigendian_double(value) + * elif t is bytes: + * stream.write_byte(BYTES_TYPE) # <<<<<<<<<<<<<< + * stream.write(value, nested) + * elif t is str: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":430 + * elif t is bytes: + * stream.write_byte(BYTES_TYPE) + * stream.write(value, nested) # <<<<<<<<<<<<<< + * elif t is str: + * unicode_value = value # for typing +*/ + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_16.__pyx_n = 1; + __pyx_t_16.nested = __pyx_v_nested; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_2), 0, &__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":428 + * stream.write_byte(FLOAT_TYPE) + * stream.write_bigendian_double(value) + * elif t is bytes: # <<<<<<<<<<<<<< + * stream.write_byte(BYTES_TYPE) + * stream.write(value, nested) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":431 + * stream.write_byte(BYTES_TYPE) + * stream.write(value, nested) + * elif t is str: # <<<<<<<<<<<<<< + * unicode_value = value # for typing + * stream.write_byte(UNICODE_TYPE) +*/ + __pyx_t_13 = (__pyx_v_t == (&PyUnicode_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":432 + * stream.write(value, nested) + * elif t is str: + * unicode_value = value # for typing # <<<<<<<<<<<<<< + * stream.write_byte(UNICODE_TYPE) + * stream.write(unicode_value.encode('utf-8'), nested) +*/ + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_4))) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_v_unicode_value = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":433 + * elif t is str: + * unicode_value = value # for typing + * stream.write_byte(UNICODE_TYPE) # <<<<<<<<<<<<<< + * stream.write(unicode_value.encode('utf-8'), nested) + * elif t is list or t is tuple: +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":434 + * unicode_value = value # for typing + * stream.write_byte(UNICODE_TYPE) + * stream.write(unicode_value.encode('utf-8'), nested) # <<<<<<<<<<<<<< + * elif t is list or t is tuple: + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) +*/ + if (unlikely(__pyx_v_unicode_value == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 434, __pyx_L1_error) + } + __pyx_t_4 = PyUnicode_AsUTF8String(__pyx_v_unicode_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_16.__pyx_n = 1; + __pyx_t_16.nested = __pyx_v_nested; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_4), 0, &__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":431 + * stream.write_byte(BYTES_TYPE) + * stream.write(value, nested) + * elif t is str: # <<<<<<<<<<<<<< + * unicode_value = value # for typing + * stream.write_byte(UNICODE_TYPE) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":435 + * stream.write_byte(UNICODE_TYPE) + * stream.write(unicode_value.encode('utf-8'), nested) + * elif t is list or t is tuple: # <<<<<<<<<<<<<< + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) + * stream.write_var_int64(len(value)) +*/ + __pyx_t_7 = (__pyx_v_t == (&PyList_Type)); + if (!__pyx_t_7) { + } else { + __pyx_t_13 = __pyx_t_7; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_7 = (__pyx_v_t == (&PyTuple_Type)); + __pyx_t_13 = __pyx_t_7; + __pyx_L16_bool_binop_done:; + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":436 + * stream.write(unicode_value.encode('utf-8'), nested) + * elif t is list or t is tuple: + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) # <<<<<<<<<<<<<< + * stream.write_var_int64(len(value)) + * for e in value: +*/ + __pyx_t_13 = (__pyx_v_t == (&PyList_Type)); + if (__pyx_t_13) { + __pyx_t_17 = __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE; + } else { + __pyx_t_17 = __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE; + } + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":437 + * elif t is list or t is tuple: + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) + * stream.write_var_int64(len(value)) # <<<<<<<<<<<<<< + * for e in value: + * self.encode_to_stream(e, stream, True) +*/ + __pyx_t_18 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_18, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":438 + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) + * stream.write_var_int64(len(value)) + * for e in value: # <<<<<<<<<<<<<< + * self.encode_to_stream(e, stream, True) + * elif t is bool: +*/ + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { + __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); + __pyx_t_18 = 0; + __pyx_t_19 = NULL; + } else { + __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_19 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 438, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_19)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 438, __pyx_L1_error) + #endif + if (__pyx_t_18 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_18; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 438, __pyx_L1_error) + #endif + if (__pyx_t_18 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); + #endif + ++__pyx_t_18; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_19(__pyx_t_2); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 438, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":439 + * stream.write_var_int64(len(value)) + * for e in value: + * self.encode_to_stream(e, stream, True) # <<<<<<<<<<<<<< + * elif t is bool: + * stream.write_byte(BOOL_TYPE) +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_e, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":438 + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) + * stream.write_var_int64(len(value)) + * for e in value: # <<<<<<<<<<<<<< + * self.encode_to_stream(e, stream, True) + * elif t is bool: +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":435 + * stream.write_byte(UNICODE_TYPE) + * stream.write(unicode_value.encode('utf-8'), nested) + * elif t is list or t is tuple: # <<<<<<<<<<<<<< + * stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE) + * stream.write_var_int64(len(value)) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":440 + * for e in value: + * self.encode_to_stream(e, stream, True) + * elif t is bool: # <<<<<<<<<<<<<< + * stream.write_byte(BOOL_TYPE) + * stream.write_byte(value) +*/ + __pyx_t_13 = (__pyx_v_t == (&PyBool_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":441 + * self.encode_to_stream(e, stream, True) + * elif t is bool: + * stream.write_byte(BOOL_TYPE) # <<<<<<<<<<<<<< + * stream.write_byte(value) + * elif t in _ITERABLE_LIKE_TYPES: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":442 + * elif t is bool: + * stream.write_byte(BOOL_TYPE) + * stream.write_byte(value) # <<<<<<<<<<<<<< + * elif t in _ITERABLE_LIKE_TYPES: + * stream.write_byte(ITERABLE_LIKE_TYPE) +*/ + __pyx_t_17 = __Pyx_PyLong_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_17 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":440 + * for e in value: + * self.encode_to_stream(e, stream, True) + * elif t is bool: # <<<<<<<<<<<<<< + * stream.write_byte(BOOL_TYPE) + * stream.write_byte(value) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":443 + * stream.write_byte(BOOL_TYPE) + * stream.write_byte(value) + * elif t in _ITERABLE_LIKE_TYPES: # <<<<<<<<<<<<<< + * stream.write_byte(ITERABLE_LIKE_TYPE) + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 443, __pyx_L1_error) + } + __pyx_t_13 = (__Pyx_PySet_ContainsTF(((PyObject *)__pyx_v_t), __pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 443, __pyx_L1_error) + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":444 + * stream.write_byte(value) + * elif t in _ITERABLE_LIKE_TYPES: + * stream.write_byte(ITERABLE_LIKE_TYPE) # <<<<<<<<<<<<<< + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) + * elif t is dict: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":445 + * elif t in _ITERABLE_LIKE_TYPES: + * stream.write_byte(ITERABLE_LIKE_TYPE) + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) # <<<<<<<<<<<<<< + * elif t is dict: + * dict_value = value # for typing +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":443 + * stream.write_byte(BOOL_TYPE) + * stream.write_byte(value) + * elif t in _ITERABLE_LIKE_TYPES: # <<<<<<<<<<<<<< + * stream.write_byte(ITERABLE_LIKE_TYPE) + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":446 + * stream.write_byte(ITERABLE_LIKE_TYPE) + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) + * elif t is dict: # <<<<<<<<<<<<<< + * dict_value = value # for typing + * stream.write_byte(DICT_TYPE) +*/ + __pyx_t_13 = (__pyx_v_t == (&PyDict_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":447 + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) + * elif t is dict: + * dict_value = value # for typing # <<<<<<<<<<<<<< + * stream.write_byte(DICT_TYPE) + * stream.write_var_int64(len(dict_value)) +*/ + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_v_dict_value = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":448 + * elif t is dict: + * dict_value = value # for typing + * stream.write_byte(DICT_TYPE) # <<<<<<<<<<<<<< + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":449 + * dict_value = value # for typing + * stream.write_byte(DICT_TYPE) + * stream.write_var_int64(len(dict_value)) # <<<<<<<<<<<<<< + * if self.requires_deterministic_step_label is not None: + * try: +*/ + if (unlikely(__pyx_v_dict_value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 449, __pyx_L1_error) + } + __pyx_t_18 = PyDict_Size(__pyx_v_dict_value); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_18, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":450 + * stream.write_byte(DICT_TYPE) + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * try: + * ordered_kvs = sorted(dict_value.items()) +*/ + __pyx_t_13 = (__pyx_v_self->requires_deterministic_step_label != Py_None); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":451 + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":452 + * if self.requires_deterministic_step_label is not None: + * try: + * ordered_kvs = sorted(dict_value.items()) # <<<<<<<<<<<<<< + * except Exception as exn: + * raise TypeError( +*/ + if (unlikely(__pyx_v_dict_value == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 452, __pyx_L22_error) + } + __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_dict_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely((PyList_Sort(__pyx_t_4) < 0))) __PYX_ERR(0, 452, __pyx_L22_error) + __pyx_v_ordered_kvs = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":451 + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: +*/ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L27_try_end; + __pyx_L22_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":453 + * try: + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically order keys of dict for '%s'" % +*/ + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_14) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 453, __pyx_L24_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_exn = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":454 + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: + * raise TypeError( # <<<<<<<<<<<<<< + * "Unable to deterministically order keys of dict for '%s'" % + * self.requires_deterministic_step_label) from exn +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/coders/coder_impl.py":455 + * except Exception as exn: + * raise TypeError( + * "Unable to deterministically order keys of dict for '%s'" % # <<<<<<<<<<<<<< + * self.requires_deterministic_step_label) from exn + * for k, v in ordered_kvs: +*/ + __pyx_t_20 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unable_to_deterministically_orde, __pyx_v_self->requires_deterministic_step_label); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 455, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_20}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/coders/coder_impl.py":456 + * raise TypeError( + * "Unable to deterministically order keys of dict for '%s'" % + * self.requires_deterministic_step_label) from exn # <<<<<<<<<<<<<< + * for k, v in ordered_kvs: + * self.encode_to_stream(k, stream, True) +*/ + __Pyx_Raise(__pyx_t_5, 0, 0, __pyx_v_exn); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 454, __pyx_L33_error) + } + + /* "apache_beam/coders/coder_impl.py":453 + * try: + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically order keys of dict for '%s'" % +*/ + /*finally:*/ { + __pyx_L33_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28); + if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_28); + __pyx_t_14 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25); + __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; + __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22; + goto __pyx_L24_except_error; + } + } + } + goto __pyx_L24_except_error; + + /* "apache_beam/coders/coder_impl.py":451 + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * ordered_kvs = sorted(dict_value.items()) + * except Exception as exn: +*/ + __pyx_L24_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L27_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":457 + * "Unable to deterministically order keys of dict for '%s'" % + * self.requires_deterministic_step_label) from exn + * for k, v in ordered_kvs: # <<<<<<<<<<<<<< + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) +*/ + __pyx_t_1 = __pyx_v_ordered_kvs; __Pyx_INCREF(__pyx_t_1); + __pyx_t_18 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 457, __pyx_L1_error) + #endif + if (__pyx_t_18 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_18; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 457, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_20 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_29 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_20); + index = 0; __pyx_t_4 = __pyx_t_29(__pyx_t_20); if (unlikely(!__pyx_t_4)) goto __pyx_L41_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_29(__pyx_t_20); if (unlikely(!__pyx_t_5)) goto __pyx_L41_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_20), 2) < (0)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_29 = NULL; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + goto __pyx_L42_unpacking_done; + __pyx_L41_unpacking_failed:; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_29 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_L42_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":458 + * self.requires_deterministic_step_label) from exn + * for k, v in ordered_kvs: + * self.encode_to_stream(k, stream, True) # <<<<<<<<<<<<<< + * self.encode_to_stream(v, stream, True) + * else: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_k, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":459 + * for k, v in ordered_kvs: + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) # <<<<<<<<<<<<<< + * else: + * # Loop over dict.items() is optimized by Cython. +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_v, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":457 + * "Unable to deterministically order keys of dict for '%s'" % + * self.requires_deterministic_step_label) from exn + * for k, v in ordered_kvs: # <<<<<<<<<<<<<< + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":450 + * stream.write_byte(DICT_TYPE) + * stream.write_var_int64(len(dict_value)) + * if self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * try: + * ordered_kvs = sorted(dict_value.items()) +*/ + goto __pyx_L21; + } + + /* "apache_beam/coders/coder_impl.py":462 + * else: + * # Loop over dict.items() is optimized by Cython. + * for k, v in dict_value.items(): # <<<<<<<<<<<<<< + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) +*/ + /*else*/ { + __pyx_t_18 = 0; + if (unlikely(__pyx_v_dict_value == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 462, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_dict_value, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_30), (&__pyx_t_21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_30, &__pyx_t_18, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_21); + if (unlikely(__pyx_t_14 == 0)) break; + if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":463 + * # Loop over dict.items() is optimized by Cython. + * for k, v in dict_value.items(): + * self.encode_to_stream(k, stream, True) # <<<<<<<<<<<<<< + * self.encode_to_stream(v, stream, True) + * elif t is set: +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_k, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":464 + * for k, v in dict_value.items(): + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) # <<<<<<<<<<<<<< + * elif t is set: + * stream.write_byte(SET_TYPE) +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_v, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L21:; + + /* "apache_beam/coders/coder_impl.py":446 + * stream.write_byte(ITERABLE_LIKE_TYPE) + * self.iterable_coder_impl.encode_to_stream(value, stream, nested) + * elif t is dict: # <<<<<<<<<<<<<< + * dict_value = value # for typing + * stream.write_byte(DICT_TYPE) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":465 + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) + * elif t is set: # <<<<<<<<<<<<<< + * stream.write_byte(SET_TYPE) + * stream.write_var_int64(len(value)) +*/ + __pyx_t_13 = (__pyx_v_t == (&PySet_Type)); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":466 + * self.encode_to_stream(v, stream, True) + * elif t is set: + * stream.write_byte(SET_TYPE) # <<<<<<<<<<<<<< + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":467 + * elif t is set: + * stream.write_byte(SET_TYPE) + * stream.write_var_int64(len(value)) # <<<<<<<<<<<<<< + * if self.requires_deterministic_step_label is not None: + * try: +*/ + __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_30, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":468 + * stream.write_byte(SET_TYPE) + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * try: + * value = sorted(value) +*/ + __pyx_t_13 = (__pyx_v_self->requires_deterministic_step_label != Py_None); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":469 + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * value = sorted(value) + * except Exception as exn: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":470 + * if self.requires_deterministic_step_label is not None: + * try: + * value = sorted(value) # <<<<<<<<<<<<<< + * except Exception as exn: + * raise TypeError( +*/ + __pyx_t_1 = PySequence_List(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L47_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyList_Sort(__pyx_t_1) < 0))) __PYX_ERR(0, 470, __pyx_L47_error) + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":469 + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * value = sorted(value) + * except Exception as exn: +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L52_try_end; + __pyx_L47_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":471 + * try: + * value = sorted(value) + * except Exception as exn: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically order element of set for '%s'" % +*/ + __pyx_t_21 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_21) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 471, __pyx_L49_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exn = __pyx_t_5; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":472 + * value = sorted(value) + * except Exception as exn: + * raise TypeError( # <<<<<<<<<<<<<< + * "Unable to deterministically order element of set for '%s'" % + * self.requires_deterministic_step_label) from exn +*/ + __pyx_t_20 = NULL; + + /* "apache_beam/coders/coder_impl.py":473 + * except Exception as exn: + * raise TypeError( + * "Unable to deterministically order element of set for '%s'" % # <<<<<<<<<<<<<< + * self.requires_deterministic_step_label) from exn + * for e in value: +*/ + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unable_to_deterministically_orde_2, __pyx_v_self->requires_deterministic_step_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L58_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_3}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L58_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/coders/coder_impl.py":474 + * raise TypeError( + * "Unable to deterministically order element of set for '%s'" % + * self.requires_deterministic_step_label) from exn # <<<<<<<<<<<<<< + * for e in value: + * self.encode_to_stream(e, stream, True) +*/ + __Pyx_Raise(__pyx_t_4, 0, 0, __pyx_v_exn); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 472, __pyx_L58_error) + } + + /* "apache_beam/coders/coder_impl.py":471 + * try: + * value = sorted(value) + * except Exception as exn: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically order element of set for '%s'" % +*/ + /*finally:*/ { + __pyx_L58_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23); + if ( unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __pyx_t_21 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_31 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_24, __pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ErrRestore(__pyx_t_28, __pyx_t_27, __pyx_t_26); + __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; + __pyx_lineno = __pyx_t_21; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_31; + goto __pyx_L49_except_error; + } + } + } + goto __pyx_L49_except_error; + + /* "apache_beam/coders/coder_impl.py":469 + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: + * try: # <<<<<<<<<<<<<< + * value = sorted(value) + * except Exception as exn: +*/ + __pyx_L49_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L52_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":468 + * stream.write_byte(SET_TYPE) + * stream.write_var_int64(len(value)) + * if self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * try: + * value = sorted(value) +*/ + } + + /* "apache_beam/coders/coder_impl.py":475 + * "Unable to deterministically order element of set for '%s'" % + * self.requires_deterministic_step_label) from exn + * for e in value: # <<<<<<<<<<<<<< + * self.encode_to_stream(e, stream, True) + * # All possibly deterministic encodings should be above this clause, +*/ + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { + __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); + __pyx_t_30 = 0; + __pyx_t_19 = NULL; + } else { + __pyx_t_30 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_19 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 475, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_19)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L1_error) + #endif + if (__pyx_t_30 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_30, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_30; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L1_error) + #endif + if (__pyx_t_30 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_30)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_30); + #endif + ++__pyx_t_30; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_19(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 475, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":476 + * self.requires_deterministic_step_label) from exn + * for e in value: + * self.encode_to_stream(e, stream, True) # <<<<<<<<<<<<<< + * # All possibly deterministic encodings should be above this clause, + * # all non-deterministic ones below. +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_e, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":475 + * "Unable to deterministically order element of set for '%s'" % + * self.requires_deterministic_step_label) from exn + * for e in value: # <<<<<<<<<<<<<< + * self.encode_to_stream(e, stream, True) + * # All possibly deterministic encodings should be above this clause, +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":465 + * self.encode_to_stream(k, stream, True) + * self.encode_to_stream(v, stream, True) + * elif t is set: # <<<<<<<<<<<<<< + * stream.write_byte(SET_TYPE) + * stream.write_var_int64(len(value)) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":479 + * # All possibly deterministic encodings should be above this clause, + * # all non-deterministic ones below. + * elif self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * self.encode_special_deterministic(value, stream) + * else: +*/ + __pyx_t_13 = (__pyx_v_self->requires_deterministic_step_label != Py_None); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":480 + * # all non-deterministic ones below. + * elif self.requires_deterministic_step_label is not None: + * self.encode_special_deterministic(value, stream) # <<<<<<<<<<<<<< + * else: + * stream.write_byte(UNKNOWN_TYPE) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_special_deterministic(__pyx_v_self, __pyx_v_value, __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":479 + * # All possibly deterministic encodings should be above this clause, + * # all non-deterministic ones below. + * elif self.requires_deterministic_step_label is not None: # <<<<<<<<<<<<<< + * self.encode_special_deterministic(value, stream) + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":482 + * self.encode_special_deterministic(value, stream) + * else: + * stream.write_byte(UNKNOWN_TYPE) # <<<<<<<<<<<<<< + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * +*/ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":483 + * else: + * stream.write_byte(UNKNOWN_TYPE) + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) # <<<<<<<<<<<<<< + * + * def encode_special_deterministic(self, value, stream): +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":403 + * return out.get_count(), [] + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_dict_value); + __Pyx_XDECREF(__pyx_v_unicode_value); + __Pyx_XDECREF((PyObject *)__pyx_v_t); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_ordered_kvs); + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 403, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 403, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 403, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 403, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 403, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 403, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 403, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 403, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 403, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 403, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 403, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":504 + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: + * if any(field.kw_only for field in init_fields): # <<<<<<<<<<<<<< + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 504, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_2generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl_encode_s, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 504, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 504, __pyx_L1_error) } + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 504, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_mstate_global->__pyx_n_u_kw_only); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":485 + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * + * def encode_special_deterministic(self, value, stream): # <<<<<<<<<<<<<< + * if self.warn_deterministic_fallback: + * _LOGGER.warning( +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + PyObject *__pyx_v_init_fields = NULL; + PyObject *__pyx_v_field = NULL; + PyObject *__pyx_v_values = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_state_value = NULL; + PyObject *__pyx_7genexpr__pyx_v_field = NULL; + PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_2generator2 = 0; + PyObject *__pyx_8genexpr2__pyx_v_field = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10[7]; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + unsigned char __pyx_t_17; + int __pyx_t_18; + PyObject *__pyx_t_19 = NULL; + int __pyx_t_20; + char const *__pyx_t_21; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + char const *__pyx_t_28; + char const *__pyx_t_29; + char const *__pyx_t_30; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_special_deterministic", 0); + + /* "apache_beam/coders/coder_impl.py":486 + * + * def encode_special_deterministic(self, value, stream): + * if self.warn_deterministic_fallback: # <<<<<<<<<<<<<< + * _LOGGER.warning( + * "Using fallback deterministic coder for type '%s' in '%s'. ", +*/ + if (__pyx_v_self->warn_deterministic_fallback) { + + /* "apache_beam/coders/coder_impl.py":487 + * def encode_special_deterministic(self, value, stream): + * if self.warn_deterministic_fallback: + * _LOGGER.warning( # <<<<<<<<<<<<<< + * "Using fallback deterministic coder for type '%s' in '%s'. ", + * type(value), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":490 + * "Using fallback deterministic coder for type '%s' in '%s'. ", + * type(value), + * self.requires_deterministic_step_label) # <<<<<<<<<<<<<< + * self.warn_deterministic_fallback = False + * if isinstance(value, proto_utils.message_types): +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Using_fallback_deterministic_cod, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_self->requires_deterministic_step_label}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":491 + * type(value), + * self.requires_deterministic_step_label) + * self.warn_deterministic_fallback = False # <<<<<<<<<<<<<< + * if isinstance(value, proto_utils.message_types): + * stream.write_byte(PROTO_TYPE) +*/ + __pyx_v_self->warn_deterministic_fallback = 0; + + /* "apache_beam/coders/coder_impl.py":486 + * + * def encode_special_deterministic(self, value, stream): + * if self.warn_deterministic_fallback: # <<<<<<<<<<<<<< + * _LOGGER.warning( + * "Using fallback deterministic coder for type '%s' in '%s'. ", +*/ + } + + /* "apache_beam/coders/coder_impl.py":492 + * self.requires_deterministic_step_label) + * self.warn_deterministic_fallback = False + * if isinstance(value, proto_utils.message_types): # <<<<<<<<<<<<<< + * stream.write_byte(PROTO_TYPE) + * self.encode_type(type(value), stream) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_proto_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_message_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + + /* "apache_beam/coders/coder_impl.py":493 + * self.warn_deterministic_fallback = False + * if isinstance(value, proto_utils.message_types): + * stream.write_byte(PROTO_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * stream.write(value.SerializePartialToString(deterministic=True), True) +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":494 + * if isinstance(value, proto_utils.message_types): + * stream.write_byte(PROTO_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * stream.write(value.SerializePartialToString(deterministic=True), True) + * elif dataclasses.is_dataclass(value): +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":495 + * stream.write_byte(PROTO_TYPE) + * self.encode_type(type(value), stream) + * stream.write(value.SerializePartialToString(deterministic=True), True) # <<<<<<<<<<<<<< + * elif dataclasses.is_dataclass(value): + * if not type(value).__dataclass_params__.frozen: +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deterministic, Py_True, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_SerializePartialToString, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = 1; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_4), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":492 + * self.requires_deterministic_step_label) + * self.warn_deterministic_fallback = False + * if isinstance(value, proto_utils.message_types): # <<<<<<<<<<<<<< + * stream.write_byte(PROTO_TYPE) + * self.encode_type(type(value), stream) +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":496 + * self.encode_type(type(value), stream) + * stream.write(value.SerializePartialToString(deterministic=True), True) + * elif dataclasses.is_dataclass(value): # <<<<<<<<<<<<<< + * if not type(value).__dataclass_params__.frozen: + * raise TypeError( +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dataclasses); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_is_dataclass); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { + + /* "apache_beam/coders/coder_impl.py":497 + * stream.write(value.SerializePartialToString(deterministic=True), True) + * elif dataclasses.is_dataclass(value): + * if not type(value).__dataclass_params__.frozen: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically encode non-frozen '%s' of type '%s' " +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_mstate_global->__pyx_n_u_dataclass_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_frozen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (!__pyx_t_6); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":498 + * elif dataclasses.is_dataclass(value): + * if not type(value).__dataclass_params__.frozen: + * raise TypeError( # <<<<<<<<<<<<<< + * "Unable to deterministically encode non-frozen '%s' of type '%s' " + * "for the input of '%s'" % +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/coders/coder_impl.py":501 + * "Unable to deterministically encode non-frozen '%s' of type '%s' " + * "for the input of '%s'" % + * (value, type(value), self.requires_deterministic_step_label)) # <<<<<<<<<<<<<< + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: +*/ + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_value), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->requires_deterministic_step_label), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Unable_to_deterministically_enco; + __pyx_t_10[1] = __pyx_t_4; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_of_type; + __pyx_t_10[3] = __pyx_t_1; + __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_for_the_input_of; + __pyx_t_10[5] = __pyx_t_9; + __pyx_t_10[6] = __pyx_mstate_global->__pyx_kp_u__4; + + /* "apache_beam/coders/coder_impl.py":499 + * if not type(value).__dataclass_params__.frozen: + * raise TypeError( + * "Unable to deterministically encode non-frozen '%s' of type '%s' " # <<<<<<<<<<<<<< + * "for the input of '%s'" % + * (value, type(value), self.requires_deterministic_step_label)) +*/ + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 7, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 498, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":497 + * stream.write(value.SerializePartialToString(deterministic=True), True) + * elif dataclasses.is_dataclass(value): + * if not type(value).__dataclass_params__.frozen: # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically encode non-frozen '%s' of type '%s' " +*/ + } + + /* "apache_beam/coders/coder_impl.py":502 + * "for the input of '%s'" % + * (value, type(value), self.requires_deterministic_step_label)) + * init_fields = [field for field in dataclasses.fields(value) if field.init] # <<<<<<<<<<<<<< + * try: + * if any(field.kw_only for field in init_fields): +*/ + { /* enter inner scope */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_dataclasses); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { + __pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 502, __pyx_L8_error) + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 502, __pyx_L8_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 502, __pyx_L8_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_11 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12)); + #else + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); + #endif + ++__pyx_t_12; + } + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 502, __pyx_L8_error) + } else { + __pyx_t_11 = __pyx_t_13(__pyx_t_1); + if (unlikely(!__pyx_t_11)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 502, __pyx_L8_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_field, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 502, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_8) { + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_7genexpr__pyx_v_field))) __PYX_ERR(0, 502, __pyx_L8_error) + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field); __pyx_7genexpr__pyx_v_field = 0; + goto __pyx_L13_exit_scope; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field); __pyx_7genexpr__pyx_v_field = 0; + goto __pyx_L1_error; + __pyx_L13_exit_scope:; + } /* exit inner scope */ + __pyx_v_init_fields = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":503 + * (value, type(value), self.requires_deterministic_step_label)) + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: # <<<<<<<<<<<<<< + * if any(field.kw_only for field in init_fields): + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":504 + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: + * if any(field.kw_only for field in init_fields): # <<<<<<<<<<<<<< + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) +*/ + __pyx_t_3 = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_genexpr(NULL, __pyx_v_init_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 504, __pyx_L14_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":505 + * try: + * if any(field.kw_only for field in init_fields): + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * stream.write_var_int64(len(init_fields)) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DATACLASS_KW_ONLY_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_17 = __Pyx_PyLong_As_unsigned_char(__pyx_t_1); if (unlikely((__pyx_t_17 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L14_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":506 + * if any(field.kw_only for field in init_fields): + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * stream.write_var_int64(len(init_fields)) + * for field in init_fields: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":507 + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) + * stream.write_var_int64(len(init_fields)) # <<<<<<<<<<<<<< + * for field in init_fields: + * stream.write(field.name.encode("utf-8"), True) +*/ + __pyx_t_12 = __Pyx_PyList_GET_SIZE(__pyx_v_init_fields); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 507, __pyx_L14_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_12, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":508 + * self.encode_type(type(value), stream) + * stream.write_var_int64(len(init_fields)) + * for field in init_fields: # <<<<<<<<<<<<<< + * stream.write(field.name.encode("utf-8"), True) + * self.encode_to_stream(getattr(value, field.name), stream, True) +*/ + __pyx_t_1 = __pyx_v_init_fields; __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 508, __pyx_L14_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":509 + * stream.write_var_int64(len(init_fields)) + * for field in init_fields: + * stream.write(field.name.encode("utf-8"), True) # <<<<<<<<<<<<<< + * self.encode_to_stream(getattr(value, field.name), stream, True) + * else: # Not using kw_only, we can pass parameters by position. +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_11); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_utf_8}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 509, __pyx_L14_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = 1; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_3), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":510 + * for field in init_fields: + * stream.write(field.name.encode("utf-8"), True) + * self.encode_to_stream(getattr(value, field.name), stream, True) # <<<<<<<<<<<<<< + * else: # Not using kw_only, we can pass parameters by position. + * stream.write_byte(DATACLASS_TYPE) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetAttr(__pyx_v_value, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_t_3, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":508 + * self.encode_type(type(value), stream) + * stream.write_var_int64(len(init_fields)) + * for field in init_fields: # <<<<<<<<<<<<<< + * stream.write(field.name.encode("utf-8"), True) + * self.encode_to_stream(getattr(value, field.name), stream, True) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":504 + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: + * if any(field.kw_only for field in init_fields): # <<<<<<<<<<<<<< + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) + * self.encode_type(type(value), stream) +*/ + goto __pyx_L20; + } + + /* "apache_beam/coders/coder_impl.py":512 + * self.encode_to_stream(getattr(value, field.name), stream, True) + * else: # Not using kw_only, we can pass parameters by position. + * stream.write_byte(DATACLASS_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * values = [getattr(value, field.name) for field in init_fields] +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":513 + * else: # Not using kw_only, we can pass parameters by position. + * stream.write_byte(DATACLASS_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * values = [getattr(value, field.name) for field in init_fields] + * self.iterable_coder_impl.encode_to_stream(values, stream, True) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":514 + * stream.write_byte(DATACLASS_TYPE) + * self.encode_type(type(value), stream) + * values = [getattr(value, field.name) for field in init_fields] # <<<<<<<<<<<<<< + * self.iterable_coder_impl.encode_to_stream(values, stream, True) + * except Exception as e: +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_init_fields; __Pyx_INCREF(__pyx_t_2); + __pyx_t_12 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 514, __pyx_L26_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_field, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_field, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_GetAttr(__pyx_v_value, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 514, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 514, __pyx_L26_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_field); __pyx_8genexpr2__pyx_v_field = 0; + goto __pyx_L30_exit_scope; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_field); __pyx_8genexpr2__pyx_v_field = 0; + goto __pyx_L14_error; + __pyx_L30_exit_scope:; + } /* exit inner scope */ + __pyx_v_values = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":515 + * self.encode_type(type(value), stream) + * values = [getattr(value, field.name) for field in init_fields] + * self.iterable_coder_impl.encode_to_stream(values, stream, True) # <<<<<<<<<<<<<< + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_values, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L20:; + + /* "apache_beam/coders/coder_impl.py":503 + * (value, type(value), self.requires_deterministic_step_label)) + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: # <<<<<<<<<<<<<< + * if any(field.kw_only for field in init_fields): + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) +*/ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L19_try_end; + __pyx_L14_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/coders/coder_impl.py":516 + * values = [getattr(value, field.name) for field in init_fields] + * self.iterable_coder_impl.encode_to_stream(values, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): +*/ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_18) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_11) < 0) __PYX_ERR(0, 516, __pyx_L16_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":517 + * self.iterable_coder_impl.encode_to_stream(values, stream, True) + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e # <<<<<<<<<<<<<< + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): + * stream.write_byte(NAMED_TUPLE_TYPE) +*/ + __pyx_t_9 = NULL; + __pyx_t_19 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_19); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 517, __pyx_L36_error) + } + + /* "apache_beam/coders/coder_impl.py":516 + * values = [getattr(value, field.name) for field in init_fields] + * self.iterable_coder_impl.encode_to_stream(values, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): +*/ + /*finally:*/ { + __pyx_L36_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); + if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __pyx_t_18 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24); + __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; + __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; + goto __pyx_L16_except_error; + } + } + } + goto __pyx_L16_except_error; + + /* "apache_beam/coders/coder_impl.py":503 + * (value, type(value), self.requires_deterministic_step_label)) + * init_fields = [field for field in dataclasses.fields(value) if field.init] + * try: # <<<<<<<<<<<<<< + * if any(field.kw_only for field in init_fields): + * stream.write_byte(DATACLASS_KW_ONLY_TYPE) +*/ + __pyx_L16_except_error:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + goto __pyx_L1_error; + __pyx_L19_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":496 + * self.encode_type(type(value), stream) + * stream.write(value.SerializePartialToString(deterministic=True), True) + * elif dataclasses.is_dataclass(value): # <<<<<<<<<<<<<< + * if not type(value).__dataclass_params__.frozen: + * raise TypeError( +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":518 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): # <<<<<<<<<<<<<< + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) +*/ + __pyx_t_6 = PyTuple_Check(__pyx_v_value); + if (__pyx_t_6) { + } else { + __pyx_t_8 = __pyx_t_6; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_6 = __Pyx_HasAttr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_mstate_global->__pyx_n_u_fields_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_8 = __pyx_t_6; + __pyx_L42_bool_binop_done:; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":519 + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): + * stream.write_byte(NAMED_TUPLE_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * try: +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/coders/coder_impl.py":520 + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * try: + * self.iterable_coder_impl.encode_to_stream(value, stream, True) +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 520, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/coders/coder_impl.py":521 + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) + * try: # <<<<<<<<<<<<<< + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":522 + * self.encode_type(type(value), stream) + * try: + * self.iterable_coder_impl.encode_to_stream(value, stream, True) # <<<<<<<<<<<<<< + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_value, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L44_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/coders/coder_impl.py":521 + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) + * try: # <<<<<<<<<<<<<< + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: +*/ + } + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L49_try_end; + __pyx_L44_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/coders/coder_impl.py":523 + * try: + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, enum.Enum): +*/ + __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_20) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 523, __pyx_L46_except_error) + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":524 + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e # <<<<<<<<<<<<<< + * elif isinstance(value, enum.Enum): + * stream.write_byte(ENUM_TYPE) +*/ + __pyx_t_4 = NULL; + __pyx_t_19 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_19); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_value}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 524, __pyx_L55_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L55_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 524, __pyx_L55_error) + } + + /* "apache_beam/coders/coder_impl.py":523 + * try: + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, enum.Enum): +*/ + /*finally:*/ { + __pyx_L55_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); + if ( unlikely(__Pyx_GetException(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __pyx_t_20 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_28 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ErrRestore(__pyx_t_27, __pyx_t_26, __pyx_t_25); + __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_28; + goto __pyx_L46_except_error; + } + } + } + goto __pyx_L46_except_error; + + /* "apache_beam/coders/coder_impl.py":521 + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) + * try: # <<<<<<<<<<<<<< + * self.iterable_coder_impl.encode_to_stream(value, stream, True) + * except Exception as e: +*/ + __pyx_L46_except_error:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L49_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":518 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, tuple) and hasattr(type(value), '_fields'): # <<<<<<<<<<<<<< + * stream.write_byte(NAMED_TUPLE_TYPE) + * self.encode_type(type(value), stream) +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":525 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, enum.Enum): # <<<<<<<<<<<<<< + * stream.write_byte(ENUM_TYPE) + * self.encode_type(type(value), stream) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":526 + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, enum.Enum): + * stream.write_byte(ENUM_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * # Enum values can be of any type. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ENUM_TYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_17 = __Pyx_PyLong_As_unsigned_char(__pyx_t_2); if (unlikely((__pyx_t_17 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":527 + * elif isinstance(value, enum.Enum): + * stream.write_byte(ENUM_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * # Enum values can be of any type. + * try: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":529 + * self.encode_type(type(value), stream) + * # Enum values can be of any type. + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":530 + * # Enum values can be of any type. + * try: + * self.encode_to_stream(value.value, stream, True) # <<<<<<<<<<<<<< + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L61_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_t_2, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L61_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":529 + * self.encode_type(type(value), stream) + * # Enum values can be of any type. + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: +*/ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L66_try_end; + __pyx_L61_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/coders/coder_impl.py":531 + * try: + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif (hasattr(value, "__getstate__") and +*/ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_18) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_11) < 0) __PYX_ERR(0, 531, __pyx_L63_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":532 + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e # <<<<<<<<<<<<<< + * elif (hasattr(value, "__getstate__") and + * # https://github.com/apache/beam/issues/33020 +*/ + __pyx_t_9 = NULL; + __pyx_t_19 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_19); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L72_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L72_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 532, __pyx_L72_error) + } + + /* "apache_beam/coders/coder_impl.py":531 + * try: + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif (hasattr(value, "__getstate__") and +*/ + /*finally:*/ { + __pyx_L72_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); + if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __pyx_t_18 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_29 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24); + __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; + __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_29; + goto __pyx_L63_except_error; + } + } + } + goto __pyx_L63_except_error; + + /* "apache_beam/coders/coder_impl.py":529 + * self.encode_type(type(value), stream) + * # Enum values can be of any type. + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(value.value, stream, True) + * except Exception as e: +*/ + __pyx_L63_except_error:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + goto __pyx_L1_error; + __pyx_L66_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":525 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif isinstance(value, enum.Enum): # <<<<<<<<<<<<<< + * stream.write_byte(ENUM_TYPE) + * self.encode_type(type(value), stream) +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":533 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif (hasattr(value, "__getstate__") and # <<<<<<<<<<<<<< + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): +*/ + __pyx_t_6 = __Pyx_HasAttr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_getstate); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 533, __pyx_L1_error) + if (__pyx_t_6) { + } else { + __pyx_t_8 = __pyx_t_6; + goto __pyx_L78_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":535 + * elif (hasattr(value, "__getstate__") and + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): # <<<<<<<<<<<<<< + * if not hasattr(value, "__setstate__"): + * raise TypeError( +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __pyx_t_6; + __pyx_L78_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":533 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif (hasattr(value, "__getstate__") and # <<<<<<<<<<<<<< + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): +*/ + if (likely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":536 + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): + * if not hasattr(value, "__setstate__"): # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically encode '%s' of type '%s', " +*/ + __pyx_t_8 = __Pyx_HasAttr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_setstate); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_6 = (!__pyx_t_8); + if (unlikely(__pyx_t_6)) { + + /* "apache_beam/coders/coder_impl.py":537 + * type(value).__reduce__ == object.__reduce__): + * if not hasattr(value, "__setstate__"): + * raise TypeError( # <<<<<<<<<<<<<< + * "Unable to deterministically encode '%s' of type '%s', " + * "for the input of '%s'. The object defines __getstate__ but not " +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/coders/coder_impl.py":541 + * "for the input of '%s'. The object defines __getstate__ but not " + * "__setstate__." % + * (value, type(value), self.requires_deterministic_step_label)) # <<<<<<<<<<<<<< + * stream.write_byte(NESTED_STATE_TYPE) + * self.encode_type(type(value), stream) +*/ + __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_value), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->requires_deterministic_step_label), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Unable_to_deterministically_enco_2; + __pyx_t_10[1] = __pyx_t_11; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_of_type; + __pyx_t_10[3] = __pyx_t_3; + __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_for_the_input_of_2; + __pyx_t_10[5] = __pyx_t_4; + __pyx_t_10[6] = __pyx_mstate_global->__pyx_kp_u_The_object_defines___getstate; + + /* "apache_beam/coders/coder_impl.py":538 + * if not hasattr(value, "__setstate__"): + * raise TypeError( + * "Unable to deterministically encode '%s' of type '%s', " # <<<<<<<<<<<<<< + * "for the input of '%s'. The object defines __getstate__ but not " + * "__setstate__." % +*/ + __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_10, 7, 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 56, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4)); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 537, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":536 + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): + * if not hasattr(value, "__setstate__"): # <<<<<<<<<<<<<< + * raise TypeError( + * "Unable to deterministically encode '%s' of type '%s', " +*/ + } + + /* "apache_beam/coders/coder_impl.py":542 + * "__setstate__." % + * (value, type(value), self.requires_deterministic_step_label)) + * stream.write_byte(NESTED_STATE_TYPE) # <<<<<<<<<<<<<< + * self.encode_type(type(value), stream) + * state_value = value.__getstate__() +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NESTED_STATE_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_17 = __Pyx_PyLong_As_unsigned_char(__pyx_t_1); if (unlikely((__pyx_t_17 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":543 + * (value, type(value), self.requires_deterministic_step_label)) + * stream.write_byte(NESTED_STATE_TYPE) + * self.encode_type(type(value), stream) # <<<<<<<<<<<<<< + * state_value = value.__getstate__() + * try: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":544 + * stream.write_byte(NESTED_STATE_TYPE) + * self.encode_type(type(value), stream) + * state_value = value.__getstate__() # <<<<<<<<<<<<<< + * try: + * self.encode_to_stream(state_value, stream, True) +*/ + __pyx_t_9 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getstate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_state_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":545 + * self.encode_type(type(value), stream) + * state_value = value.__getstate__() + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":546 + * state_value = value.__getstate__() + * try: + * self.encode_to_stream(state_value, stream, True) # <<<<<<<<<<<<<< + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_state_value, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L81_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":545 + * self.encode_type(type(value), stream) + * state_value = value.__getstate__() + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: +*/ + } + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L86_try_end; + __pyx_L81_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/coders/coder_impl.py":547 + * try: + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * else: +*/ + __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_20) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_2) < 0) __PYX_ERR(0, 547, __pyx_L83_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_9); + __pyx_v_e = __pyx_t_9; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":548 + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e # <<<<<<<<<<<<<< + * else: + * raise TypeError(self._deterministic_encoding_error_msg(value)) +*/ + __pyx_t_3 = NULL; + __pyx_t_19 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_19); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_value}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 548, __pyx_L92_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L92_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 548, __pyx_L92_error) + } + + /* "apache_beam/coders/coder_impl.py":547 + * try: + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: # <<<<<<<<<<<<<< + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * else: +*/ + /*finally:*/ { + __pyx_L92_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); + if ( unlikely(__Pyx_GetException(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __pyx_t_20 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_30 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ErrRestore(__pyx_t_27, __pyx_t_26, __pyx_t_25); + __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; + __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_30; + goto __pyx_L83_except_error; + } + } + } + goto __pyx_L83_except_error; + + /* "apache_beam/coders/coder_impl.py":545 + * self.encode_type(type(value), stream) + * state_value = value.__getstate__() + * try: # <<<<<<<<<<<<<< + * self.encode_to_stream(state_value, stream, True) + * except Exception as e: +*/ + __pyx_L83_except_error:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L86_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":533 + * except Exception as e: + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * elif (hasattr(value, "__getstate__") and # <<<<<<<<<<<<<< + * # https://github.com/apache/beam/issues/33020 + * type(value).__reduce__ == object.__reduce__): +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":550 + * raise TypeError(self._deterministic_encoding_error_msg(value)) from e + * else: + * raise TypeError(self._deterministic_encoding_error_msg(value)) # <<<<<<<<<<<<<< + * + * def _deterministic_encoding_error_msg(self, value): +*/ + /*else*/ { + __pyx_t_9 = NULL; + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 550, __pyx_L1_error) + } + __pyx_L4:; + + /* "apache_beam/coders/coder_impl.py":485 + * self.fallback_coder_impl.encode_to_stream(value, stream, nested) + * + * def encode_special_deterministic(self, value, stream): # <<<<<<<<<<<<<< + * if self.warn_deterministic_fallback: + * _LOGGER.warning( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_init_fields); + __Pyx_XDECREF(__pyx_v_field); + __Pyx_XDECREF(__pyx_v_values); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_state_value); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field); + __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_28encode_special_deterministic_2generator2); + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_field); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":552 + * raise TypeError(self._deterministic_encoding_error_msg(value)) + * + * def _deterministic_encoding_error_msg(self, value): # <<<<<<<<<<<<<< + * return ( + * "Unable to deterministically encode '%s' of type '%s', " +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg = {"_deterministic_encoding_error_msg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_deterministic_encoding_error_msg (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 552, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 552, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_deterministic_encoding_error_msg", 0) < (0)) __PYX_ERR(0, 552, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_deterministic_encoding_error_msg", 1, 1, 1, i); __PYX_ERR(0, 552, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 552, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_deterministic_encoding_error_msg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 552, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl._deterministic_encoding_error_msg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[7]; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_deterministic_encoding_error_msg", 0); + + /* "apache_beam/coders/coder_impl.py":553 + * + * def _deterministic_encoding_error_msg(self, value): + * return ( # <<<<<<<<<<<<<< + * "Unable to deterministically encode '%s' of type '%s', " + * "please provide a type hint for the input of '%s'" % +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":556 + * "Unable to deterministically encode '%s' of type '%s', " + * "please provide a type hint for the input of '%s'" % + * (value, type(value), self.requires_deterministic_step_label)) # <<<<<<<<<<<<<< + * + * def encode_type_2_67_0(self, t, stream): +*/ + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_value), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->requires_deterministic_step_label), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Unable_to_deterministically_enco_2; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_of_type; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_please_provide_a_type_hint_for; + __pyx_t_4[5] = __pyx_t_3; + __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__4; + + /* "apache_beam/coders/coder_impl.py":554 + * def _deterministic_encoding_error_msg(self, value): + * return ( + * "Unable to deterministically encode '%s' of type '%s', " # <<<<<<<<<<<<<< + * "please provide a type hint for the input of '%s'" % + * (value, type(value), self.requires_deterministic_step_label)) +*/ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 48 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":552 + * raise TypeError(self._deterministic_encoding_error_msg(value)) + * + * def _deterministic_encoding_error_msg(self, value): # <<<<<<<<<<<<<< + * return ( + * "Unable to deterministically encode '%s' of type '%s', " +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl._deterministic_encoding_error_msg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":558 + * (value, type(value), self.requires_deterministic_step_label)) + * + * def encode_type_2_67_0(self, t, stream): # <<<<<<<<<<<<<< + * """ + * Encode special type with <=2.67.0 compatibility. +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type_2_67_0(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_type_2_67_0", 0); + + /* "apache_beam/coders/coder_impl.py":562 + * Encode special type with <=2.67.0 compatibility. + * """ + * if t not in _pickled_types: # <<<<<<<<<<<<<< + * _verify_dill_compat() + * _pickled_types[t] = dill.dumps(t) +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 562, __pyx_L1_error) + } + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_t, __pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 562, __pyx_L1_error) + if (__pyx_t_1) { + + /* "apache_beam/coders/coder_impl.py":563 + * """ + * if t not in _pickled_types: + * _verify_dill_compat() # <<<<<<<<<<<<<< + * _pickled_types[t] = dill.dumps(t) + * stream.write(_pickled_types[t], True) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_verify_dill_compat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":564 + * if t not in _pickled_types: + * _verify_dill_compat() + * _pickled_types[t] = dill.dumps(t) # <<<<<<<<<<<<<< + * stream.write(_pickled_types[t], True) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dumps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_t}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 564, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, __pyx_v_t, __pyx_t_2) < 0))) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":562 + * Encode special type with <=2.67.0 compatibility. + * """ + * if t not in _pickled_types: # <<<<<<<<<<<<<< + * _verify_dill_compat() + * _pickled_types[t] = dill.dumps(t) +*/ + } + + /* "apache_beam/coders/coder_impl.py":565 + * _verify_dill_compat() + * _pickled_types[t] = dill.dumps(t) + * stream.write(_pickled_types[t], True) # <<<<<<<<<<<<<< + * + * def encode_type(self, t, stream): +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 565, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, __pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = 1; + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_2), 0, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":558 + * (value, type(value), self.requires_deterministic_step_label)) + * + * def encode_type_2_67_0(self, t, stream): # <<<<<<<<<<<<<< + * """ + * Encode special type with <=2.67.0 compatibility. +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_type_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":567 + * stream.write(_pickled_types[t], True) + * + * def encode_type(self, t, stream): # <<<<<<<<<<<<<< + * if self.force_use_dill: + * return self.encode_type_2_67_0(t, stream) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + PyObject *__pyx_v_config = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_type", 0); + + /* "apache_beam/coders/coder_impl.py":568 + * + * def encode_type(self, t, stream): + * if self.force_use_dill: # <<<<<<<<<<<<<< + * return self.encode_type_2_67_0(t, stream) + * +*/ + if (__pyx_v_self->force_use_dill) { + + /* "apache_beam/coders/coder_impl.py":569 + * def encode_type(self, t, stream): + * if self.force_use_dill: + * return self.encode_type_2_67_0(t, stream) # <<<<<<<<<<<<<< + * + * if t not in _pickled_types: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type_2_67_0(__pyx_v_self, __pyx_v_t, __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":568 + * + * def encode_type(self, t, stream): + * if self.force_use_dill: # <<<<<<<<<<<<<< + * return self.encode_type_2_67_0(t, stream) + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":571 + * return self.encode_type_2_67_0(t, stream) + * + * if t not in _pickled_types: # <<<<<<<<<<<<<< + * config = cloudpickle.CloudPickleConfig( + * id_generator=None, +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 571, __pyx_L1_error) + } + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_t, __pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 571, __pyx_L1_error) + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":572 + * + * if t not in _pickled_types: + * config = cloudpickle.CloudPickleConfig( # <<<<<<<<<<<<<< + * id_generator=None, + * skip_reset_dynamic_type_state=True, +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cloudpickle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CloudPickleConfig); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":575 + * id_generator=None, + * skip_reset_dynamic_type_state=True, + * filepath_interceptor=cloudpickle.get_relative_path) # <<<<<<<<<<<<<< + * if not self.use_relative_filepaths: + * config.filepath_interceptor = None +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cloudpickle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_relative_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_id_generator, Py_None, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 572, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_skip_reset_dynamic_type_state, Py_True, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 572, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_filepath_interceptor, __pyx_t_6, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_config = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":576 + * skip_reset_dynamic_type_state=True, + * filepath_interceptor=cloudpickle.get_relative_path) + * if not self.use_relative_filepaths: # <<<<<<<<<<<<<< + * config.filepath_interceptor = None + * _pickled_types[t] = cloudpickle_pickler.dumps(t, config=config) +*/ + __pyx_t_2 = (!__pyx_v_self->use_relative_filepaths); + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":577 + * filepath_interceptor=cloudpickle.get_relative_path) + * if not self.use_relative_filepaths: + * config.filepath_interceptor = None # <<<<<<<<<<<<<< + * _pickled_types[t] = cloudpickle_pickler.dumps(t, config=config) + * stream.write(_pickled_types[t], True) +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_config, __pyx_mstate_global->__pyx_n_u_filepath_interceptor, Py_None) < (0)) __PYX_ERR(0, 577, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":576 + * skip_reset_dynamic_type_state=True, + * filepath_interceptor=cloudpickle.get_relative_path) + * if not self.use_relative_filepaths: # <<<<<<<<<<<<<< + * config.filepath_interceptor = None + * _pickled_types[t] = cloudpickle_pickler.dumps(t, config=config) +*/ + } + + /* "apache_beam/coders/coder_impl.py":578 + * if not self.use_relative_filepaths: + * config.filepath_interceptor = None + * _pickled_types[t] = cloudpickle_pickler.dumps(t, config=config) # <<<<<<<<<<<<<< + * stream.write(_pickled_types[t], True) + * +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cloudpickle_pickler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dumps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_t}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_config, __pyx_v_config, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 578, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, __pyx_v_t, __pyx_t_1) < 0))) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":571 + * return self.encode_type_2_67_0(t, stream) + * + * if t not in _pickled_types: # <<<<<<<<<<<<<< + * config = cloudpickle.CloudPickleConfig( + * id_generator=None, +*/ + } + + /* "apache_beam/coders/coder_impl.py":579 + * config.filepath_interceptor = None + * _pickled_types[t] = cloudpickle_pickler.dumps(t, config=config) + * stream.write(_pickled_types[t], True) # <<<<<<<<<<<<<< + * + * def decode_type(self, stream): +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 579, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, __pyx_v_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.nested = 1; + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":567 + * stream.write(_pickled_types[t], True) + * + * def encode_type(self, t, stream): # <<<<<<<<<<<<<< + * if self.force_use_dill: + * return self.encode_type_2_67_0(t, stream) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_config); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":581 + * stream.write(_pickled_types[t], True) + * + * def decode_type(self, stream): # <<<<<<<<<<<<<< + * if self.force_use_dill: + * return _unpickle_type_2_67_0(stream.read_all(True)) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_5; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_type", 0); + + /* "apache_beam/coders/coder_impl.py":582 + * + * def decode_type(self, stream): + * if self.force_use_dill: # <<<<<<<<<<<<<< + * return _unpickle_type_2_67_0(stream.read_all(True)) + * return _unpickle_type(stream.read_all(True)) +*/ + if (__pyx_v_self->force_use_dill) { + + /* "apache_beam/coders/coder_impl.py":583 + * def decode_type(self, stream): + * if self.force_use_dill: + * return _unpickle_type_2_67_0(stream.read_all(True)) # <<<<<<<<<<<<<< + * return _unpickle_type(stream.read_all(True)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unpickle_type_2_67_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5.__pyx_n = 1; + __pyx_t_5.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":582 + * + * def decode_type(self, stream): + * if self.force_use_dill: # <<<<<<<<<<<<<< + * return _unpickle_type_2_67_0(stream.read_all(True)) + * return _unpickle_type(stream.read_all(True)) +*/ + } + + /* "apache_beam/coders/coder_impl.py":584 + * if self.force_use_dill: + * return _unpickle_type_2_67_0(stream.read_all(True)) + * return _unpickle_type(stream.read_all(True)) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_unpickle_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5.__pyx_n = 1; + __pyx_t_5.nested = 1; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":581 + * stream.write(_pickled_types[t], True) + * + * def decode_type(self, stream): # <<<<<<<<<<<<<< + * if self.force_use_dill: + * return _unpickle_type_2_67_0(stream.read_all(True)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":586 + * return _unpickle_type(stream.read_all(True)) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_t; + int64_t __pyx_v_vlen; + PyObject *__pyx_v_vlist = NULL; + PyObject *__pyx_v_v = NULL; + CYTHON_UNUSED int64_t __pyx_v__; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_cls = NULL; + PyObject *__pyx_v_msg = NULL; + PyObject *__pyx_v_fields = NULL; + PyObject *__pyx_v_field_name = NULL; + PyObject *__pyx_v_state = NULL; + PyObject *__pyx_v_value = NULL; + CYTHON_UNUSED int64_t __pyx_8genexpr3__pyx_v__; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + double __pyx_t_10; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_11; + int __pyx_t_12; + int64_t __pyx_t_13; + int64_t __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":588 + * def decode_from_stream(self, stream, nested): + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() # <<<<<<<<<<<<<< + * if t == NONE_TYPE: + * return None +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_byte(__pyx_v_stream, 0); if (unlikely(__pyx_t_7 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_v_t = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":589 + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() + * if t == NONE_TYPE: # <<<<<<<<<<<<<< + * return None + * elif t == INT_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":590 + * t = stream.read_byte() + * if t == NONE_TYPE: + * return None # <<<<<<<<<<<<<< + * elif t == INT_TYPE: + * return stream.read_var_int64() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":589 + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() + * if t == NONE_TYPE: # <<<<<<<<<<<<<< + * return None + * elif t == INT_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":591 + * if t == NONE_TYPE: + * return None + * elif t == INT_TYPE: # <<<<<<<<<<<<<< + * return stream.read_var_int64() + * elif t == FLOAT_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":592 + * return None + * elif t == INT_TYPE: + * return stream.read_var_int64() # <<<<<<<<<<<<<< + * elif t == FLOAT_TYPE: + * return stream.read_bigendian_double() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":591 + * if t == NONE_TYPE: + * return None + * elif t == INT_TYPE: # <<<<<<<<<<<<<< + * return stream.read_var_int64() + * elif t == FLOAT_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":593 + * elif t == INT_TYPE: + * return stream.read_var_int64() + * elif t == FLOAT_TYPE: # <<<<<<<<<<<<<< + * return stream.read_bigendian_double() + * elif t == BYTES_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":594 + * return stream.read_var_int64() + * elif t == FLOAT_TYPE: + * return stream.read_bigendian_double() # <<<<<<<<<<<<<< + * elif t == BYTES_TYPE: + * return stream.read_all(nested) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_stream, 0); if (unlikely(__pyx_t_10 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":593 + * elif t == INT_TYPE: + * return stream.read_var_int64() + * elif t == FLOAT_TYPE: # <<<<<<<<<<<<<< + * return stream.read_bigendian_double() + * elif t == BYTES_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":595 + * elif t == FLOAT_TYPE: + * return stream.read_bigendian_double() + * elif t == BYTES_TYPE: # <<<<<<<<<<<<<< + * return stream.read_all(nested) + * elif t == UNICODE_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":596 + * return stream.read_bigendian_double() + * elif t == BYTES_TYPE: + * return stream.read_all(nested) # <<<<<<<<<<<<<< + * elif t == UNICODE_TYPE: + * return stream.read_all(nested).decode('utf-8') +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":595 + * elif t == FLOAT_TYPE: + * return stream.read_bigendian_double() + * elif t == BYTES_TYPE: # <<<<<<<<<<<<<< + * return stream.read_all(nested) + * elif t == UNICODE_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":597 + * elif t == BYTES_TYPE: + * return stream.read_all(nested) + * elif t == UNICODE_TYPE: # <<<<<<<<<<<<<< + * return stream.read_all(nested).decode('utf-8') + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":598 + * return stream.read_all(nested) + * elif t == UNICODE_TYPE: + * return stream.read_all(nested).decode('utf-8') # <<<<<<<<<<<<<< + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: + * vlen = stream.read_var_int64() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 598, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":597 + * elif t == BYTES_TYPE: + * return stream.read_all(nested) + * elif t == UNICODE_TYPE: # <<<<<<<<<<<<<< + * return stream.read_all(nested).decode('utf-8') + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":599 + * elif t == UNICODE_TYPE: + * return stream.read_all(nested).decode('utf-8') + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: # <<<<<<<<<<<<<< + * vlen = stream.read_var_int64() + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] +*/ + __pyx_t_12 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE); + if (!__pyx_t_12) { + } else { + __pyx_t_8 = __pyx_t_12; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_12 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE); + if (!__pyx_t_12) { + } else { + __pyx_t_8 = __pyx_t_12; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_12 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE); + __pyx_t_8 = __pyx_t_12; + __pyx_L4_bool_binop_done:; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":600 + * return stream.read_all(nested).decode('utf-8') + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: + * vlen = stream.read_var_int64() # <<<<<<<<<<<<<< + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] + * if t == LIST_TYPE: +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_v_vlen = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":601 + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: + * vlen = stream.read_var_int64() + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] # <<<<<<<<<<<<<< + * if t == LIST_TYPE: + * return vlist +*/ + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __pyx_v_vlen; + __pyx_t_13 = __pyx_t_9; + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_8genexpr3__pyx_v__ = __pyx_t_14; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } /* exit inner scope */ + __pyx_v_vlist = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":602 + * vlen = stream.read_var_int64() + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] + * if t == LIST_TYPE: # <<<<<<<<<<<<<< + * return vlist + * elif t == TUPLE_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":603 + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] + * if t == LIST_TYPE: + * return vlist # <<<<<<<<<<<<<< + * elif t == TUPLE_TYPE: + * return tuple(vlist) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_vlist); + __pyx_r = __pyx_v_vlist; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":602 + * vlen = stream.read_var_int64() + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] + * if t == LIST_TYPE: # <<<<<<<<<<<<<< + * return vlist + * elif t == TUPLE_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":604 + * if t == LIST_TYPE: + * return vlist + * elif t == TUPLE_TYPE: # <<<<<<<<<<<<<< + * return tuple(vlist) + * return set(vlist) +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":605 + * return vlist + * elif t == TUPLE_TYPE: + * return tuple(vlist) # <<<<<<<<<<<<<< + * return set(vlist) + * elif t == DICT_TYPE: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyList_AsTuple(__pyx_v_vlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":604 + * if t == LIST_TYPE: + * return vlist + * elif t == TUPLE_TYPE: # <<<<<<<<<<<<<< + * return tuple(vlist) + * return set(vlist) +*/ + } + + /* "apache_beam/coders/coder_impl.py":606 + * elif t == TUPLE_TYPE: + * return tuple(vlist) + * return set(vlist) # <<<<<<<<<<<<<< + * elif t == DICT_TYPE: + * vlen = stream.read_var_int64() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PySet_New(__pyx_v_vlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":599 + * elif t == UNICODE_TYPE: + * return stream.read_all(nested).decode('utf-8') + * elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE: # <<<<<<<<<<<<<< + * vlen = stream.read_var_int64() + * vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] +*/ + } + + /* "apache_beam/coders/coder_impl.py":607 + * return tuple(vlist) + * return set(vlist) + * elif t == DICT_TYPE: # <<<<<<<<<<<<<< + * vlen = stream.read_var_int64() + * v = {} +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":608 + * return set(vlist) + * elif t == DICT_TYPE: + * vlen = stream.read_var_int64() # <<<<<<<<<<<<<< + * v = {} + * for _ in range(vlen): +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_v_vlen = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":609 + * elif t == DICT_TYPE: + * vlen = stream.read_var_int64() + * v = {} # <<<<<<<<<<<<<< + * for _ in range(vlen): + * k = self.decode_from_stream(stream, True) +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_v = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":610 + * vlen = stream.read_var_int64() + * v = {} + * for _ in range(vlen): # <<<<<<<<<<<<<< + * k = self.decode_from_stream(stream, True) + * v[k] = self.decode_from_stream(stream, True) +*/ + __pyx_t_9 = __pyx_v_vlen; + __pyx_t_13 = __pyx_t_9; + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v__ = __pyx_t_14; + + /* "apache_beam/coders/coder_impl.py":611 + * v = {} + * for _ in range(vlen): + * k = self.decode_from_stream(stream, True) # <<<<<<<<<<<<<< + * v[k] = self.decode_from_stream(stream, True) + * return v +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":612 + * for _ in range(vlen): + * k = self.decode_from_stream(stream, True) + * v[k] = self.decode_from_stream(stream, True) # <<<<<<<<<<<<<< + * return v + * elif t == BOOL_TYPE: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyDict_SetItem(__pyx_v_v, __pyx_v_k, __pyx_t_2) < 0))) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + + /* "apache_beam/coders/coder_impl.py":613 + * k = self.decode_from_stream(stream, True) + * v[k] = self.decode_from_stream(stream, True) + * return v # <<<<<<<<<<<<<< + * elif t == BOOL_TYPE: + * return not not stream.read_byte() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_v); + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":607 + * return tuple(vlist) + * return set(vlist) + * elif t == DICT_TYPE: # <<<<<<<<<<<<<< + * vlen = stream.read_var_int64() + * v = {} +*/ + } + + /* "apache_beam/coders/coder_impl.py":614 + * v[k] = self.decode_from_stream(stream, True) + * return v + * elif t == BOOL_TYPE: # <<<<<<<<<<<<<< + * return not not stream.read_byte() + * elif t == ITERABLE_LIKE_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":615 + * return v + * elif t == BOOL_TYPE: + * return not not stream.read_byte() # <<<<<<<<<<<<<< + * elif t == ITERABLE_LIKE_TYPE: + * return self.iterable_coder_impl.decode_from_stream(stream, nested) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_byte(__pyx_v_stream, 0); if (unlikely(__pyx_t_7 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_t_7 != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":614 + * v[k] = self.decode_from_stream(stream, True) + * return v + * elif t == BOOL_TYPE: # <<<<<<<<<<<<<< + * return not not stream.read_byte() + * elif t == ITERABLE_LIKE_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":616 + * elif t == BOOL_TYPE: + * return not not stream.read_byte() + * elif t == ITERABLE_LIKE_TYPE: # <<<<<<<<<<<<<< + * return self.iterable_coder_impl.decode_from_stream(stream, nested) + * elif t == PROTO_TYPE: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":617 + * return not not stream.read_byte() + * elif t == ITERABLE_LIKE_TYPE: + * return self.iterable_coder_impl.decode_from_stream(stream, nested) # <<<<<<<<<<<<<< + * elif t == PROTO_TYPE: + * cls = self.decode_type(stream) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":616 + * elif t == BOOL_TYPE: + * return not not stream.read_byte() + * elif t == ITERABLE_LIKE_TYPE: # <<<<<<<<<<<<<< + * return self.iterable_coder_impl.decode_from_stream(stream, nested) + * elif t == PROTO_TYPE: +*/ + } + + /* "apache_beam/coders/coder_impl.py":618 + * elif t == ITERABLE_LIKE_TYPE: + * return self.iterable_coder_impl.decode_from_stream(stream, nested) + * elif t == PROTO_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * msg = cls() +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":619 + * return self.iterable_coder_impl.decode_from_stream(stream, nested) + * elif t == PROTO_TYPE: + * cls = self.decode_type(stream) # <<<<<<<<<<<<<< + * msg = cls() + * msg.ParseFromString(stream.read_all(True)) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_cls = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":620 + * elif t == PROTO_TYPE: + * cls = self.decode_type(stream) + * msg = cls() # <<<<<<<<<<<<<< + * msg.ParseFromString(stream.read_all(True)) + * return msg +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_cls); + __pyx_t_4 = __pyx_v_cls; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_msg = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":621 + * cls = self.decode_type(stream) + * msg = cls() + * msg.ParseFromString(stream.read_all(True)) # <<<<<<<<<<<<<< + * return msg + * elif t == DATACLASS_KW_ONLY_TYPE: +*/ + __pyx_t_4 = __pyx_v_msg; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = 1; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ParseFromString, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":622 + * msg = cls() + * msg.ParseFromString(stream.read_all(True)) + * return msg # <<<<<<<<<<<<<< + * elif t == DATACLASS_KW_ONLY_TYPE: + * cls = self.decode_type(stream) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_msg); + __pyx_r = __pyx_v_msg; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":618 + * elif t == ITERABLE_LIKE_TYPE: + * return self.iterable_coder_impl.decode_from_stream(stream, nested) + * elif t == PROTO_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * msg = cls() +*/ + } + + /* "apache_beam/coders/coder_impl.py":623 + * msg.ParseFromString(stream.read_all(True)) + * return msg + * elif t == DATACLASS_KW_ONLY_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * vlen = stream.read_var_int64() +*/ + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DATACLASS_KW_ONLY_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":624 + * return msg + * elif t == DATACLASS_KW_ONLY_TYPE: + * cls = self.decode_type(stream) # <<<<<<<<<<<<<< + * vlen = stream.read_var_int64() + * fields = {} +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_cls = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":625 + * elif t == DATACLASS_KW_ONLY_TYPE: + * cls = self.decode_type(stream) + * vlen = stream.read_var_int64() # <<<<<<<<<<<<<< + * fields = {} + * for _ in range(vlen): +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_v_vlen = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":626 + * cls = self.decode_type(stream) + * vlen = stream.read_var_int64() + * fields = {} # <<<<<<<<<<<<<< + * for _ in range(vlen): + * field_name = stream.read_all(True).decode('utf-8') +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_fields = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":627 + * vlen = stream.read_var_int64() + * fields = {} + * for _ in range(vlen): # <<<<<<<<<<<<<< + * field_name = stream.read_all(True).decode('utf-8') + * fields[field_name] = self.decode_from_stream(stream, True) +*/ + __pyx_t_9 = __pyx_v_vlen; + __pyx_t_13 = __pyx_t_9; + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v__ = __pyx_t_14; + + /* "apache_beam/coders/coder_impl.py":628 + * fields = {} + * for _ in range(vlen): + * field_name = stream.read_all(True).decode('utf-8') # <<<<<<<<<<<<<< + * fields[field_name] = self.decode_from_stream(stream, True) + * return cls(**fields) +*/ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 628, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_t_4, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_field_name, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":629 + * for _ in range(vlen): + * field_name = stream.read_all(True).decode('utf-8') + * fields[field_name] = self.decode_from_stream(stream, True) # <<<<<<<<<<<<<< + * return cls(**fields) + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyDict_SetItem(__pyx_v_fields, __pyx_v_field_name, __pyx_t_1) < 0))) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/coders/coder_impl.py":630 + * field_name = stream.read_all(True).decode('utf-8') + * fields[field_name] = self.decode_from_stream(stream, True) + * return cls(**fields) # <<<<<<<<<<<<<< + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: + * cls = self.decode_type(stream) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDict_Copy(__pyx_v_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":623 + * msg.ParseFromString(stream.read_all(True)) + * return msg + * elif t == DATACLASS_KW_ONLY_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * vlen = stream.read_var_int64() +*/ + } + + /* "apache_beam/coders/coder_impl.py":631 + * fields[field_name] = self.decode_from_stream(stream, True) + * return cls(**fields) + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) +*/ + __pyx_t_12 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE); + if (!__pyx_t_12) { + } else { + __pyx_t_8 = __pyx_t_12; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_12 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE); + __pyx_t_8 = __pyx_t_12; + __pyx_L14_bool_binop_done:; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":632 + * return cls(**fields) + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: + * cls = self.decode_type(stream) # <<<<<<<<<<<<<< + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) + * elif t == ENUM_TYPE: +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_cls = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":633 + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: + * cls = self.decode_type(stream) + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) # <<<<<<<<<<<<<< + * elif t == ENUM_TYPE: + * cls = self.decode_type(stream) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":631 + * fields[field_name] = self.decode_from_stream(stream, True) + * return cls(**fields) + * elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) +*/ + } + + /* "apache_beam/coders/coder_impl.py":634 + * cls = self.decode_type(stream) + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) + * elif t == ENUM_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * return cls(self.decode_from_stream(stream, True)) +*/ + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ENUM_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":635 + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) + * elif t == ENUM_TYPE: + * cls = self.decode_type(stream) # <<<<<<<<<<<<<< + * return cls(self.decode_from_stream(stream, True)) + * elif t == NESTED_STATE_TYPE: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_cls = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":636 + * elif t == ENUM_TYPE: + * cls = self.decode_type(stream) + * return cls(self.decode_from_stream(stream, True)) # <<<<<<<<<<<<<< + * elif t == NESTED_STATE_TYPE: + * cls = self.decode_type(stream) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_cls); + __pyx_t_4 = __pyx_v_cls; + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":634 + * cls = self.decode_type(stream) + * return cls(*self.iterable_coder_impl.decode_from_stream(stream, True)) + * elif t == ENUM_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * return cls(self.decode_from_stream(stream, True)) +*/ + } + + /* "apache_beam/coders/coder_impl.py":637 + * cls = self.decode_type(stream) + * return cls(self.decode_from_stream(stream, True)) + * elif t == NESTED_STATE_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * state = self.decode_from_stream(stream, True) +*/ + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NESTED_STATE_TYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":638 + * return cls(self.decode_from_stream(stream, True)) + * elif t == NESTED_STATE_TYPE: + * cls = self.decode_type(stream) # <<<<<<<<<<<<<< + * state = self.decode_from_stream(stream, True) + * value = cls.__new__(cls) +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_cls = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":639 + * elif t == NESTED_STATE_TYPE: + * cls = self.decode_type(stream) + * state = self.decode_from_stream(stream, True) # <<<<<<<<<<<<<< + * value = cls.__new__(cls) + * value.__setstate__(state) +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_state = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":640 + * cls = self.decode_type(stream) + * state = self.decode_from_stream(stream, True) + * value = cls.__new__(cls) # <<<<<<<<<<<<<< + * value.__setstate__(state) + * return value +*/ + __pyx_t_4 = __pyx_v_cls; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_cls}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_value = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":641 + * state = self.decode_from_stream(stream, True) + * value = cls.__new__(cls) + * value.__setstate__(state) # <<<<<<<<<<<<<< + * return value + * elif t == UNKNOWN_TYPE: +*/ + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_state}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setstate, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":642 + * value = cls.__new__(cls) + * value.__setstate__(state) + * return value # <<<<<<<<<<<<<< + * elif t == UNKNOWN_TYPE: + * return self.fallback_coder_impl.decode_from_stream(stream, nested) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_value); + __pyx_r = __pyx_v_value; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":637 + * cls = self.decode_type(stream) + * return cls(self.decode_from_stream(stream, True)) + * elif t == NESTED_STATE_TYPE: # <<<<<<<<<<<<<< + * cls = self.decode_type(stream) + * state = self.decode_from_stream(stream, True) +*/ + } + + /* "apache_beam/coders/coder_impl.py":643 + * value.__setstate__(state) + * return value + * elif t == UNKNOWN_TYPE: # <<<<<<<<<<<<<< + * return self.fallback_coder_impl.decode_from_stream(stream, nested) + * else: +*/ + __pyx_t_8 = (__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE); + if (likely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":644 + * return value + * elif t == UNKNOWN_TYPE: + * return self.fallback_coder_impl.decode_from_stream(stream, nested) # <<<<<<<<<<<<<< + * else: + * raise ValueError('Unknown type tag %x' % t) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":643 + * value.__setstate__(state) + * return value + * elif t == UNKNOWN_TYPE: # <<<<<<<<<<<<<< + * return self.fallback_coder_impl.decode_from_stream(stream, nested) + * else: +*/ + } + + /* "apache_beam/coders/coder_impl.py":646 + * return self.fallback_coder_impl.decode_from_stream(stream, nested) + * else: + * raise ValueError('Unknown type tag %x' % t) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_t_4 = NULL; + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_type_tag_x, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 646, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":586 + * return _unpickle_type(stream.read_all(True)) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_vlist); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_cls); + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_XDECREF(__pyx_v_fields); + __Pyx_XDECREF(__pyx_v_field_name); + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 586, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 586, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 586, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 586, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 586, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 586, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 586, __pyx_L3_error) + } + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 586, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 586, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.fallback_coder_impl, self.force_use_dill, self.iterable_coder_impl, self.requires_deterministic_step_label, self.use_relative_filepaths, self.warn_deterministic_fallback) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->force_use_dill); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->use_relative_filepaths); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->warn_deterministic_fallback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF((PyObject *)__pyx_v_self->fallback_coder_impl); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->fallback_coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->fallback_coder_impl)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->iterable_coder_impl); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->iterable_coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->iterable_coder_impl)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->requires_deterministic_step_label); + __Pyx_GIVEREF(__pyx_v_self->requires_deterministic_step_label); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->requires_deterministic_step_label) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.fallback_coder_impl, self.force_use_dill, self.iterable_coder_impl, self.requires_deterministic_step_label, self.use_relative_filepaths, self.warn_deterministic_fallback) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v__dict = __pyx_t_4; + __pyx_t_4 = 0; + + /* "(tree fragment)":7 + * state = (self.fallback_coder_impl, self.force_use_dill, self.iterable_coder_impl, self.requires_deterministic_step_label, self.use_relative_filepaths, self.warn_deterministic_fallback) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_6 = (__pyx_v__dict != Py_None); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.fallback_coder_impl, self.force_use_dill, self.iterable_coder_impl, self.requires_deterministic_step_label, self.use_relative_filepaths, self.warn_deterministic_fallback) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, None), state +*/ + /*else*/ { + __pyx_t_6 = (((PyObject *)__pyx_v_self->fallback_coder_impl) != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (((PyObject *)__pyx_v_self->iterable_coder_impl) != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->requires_deterministic_step_label != Py_None); + __pyx_t_5 = __pyx_t_6; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None + * if use_setstate: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_125553672); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_125553672); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_125553672) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, None), state + * else: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_125553672); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_125553672); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_125553672) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":653 + * + * + * def _unpickle_type_2_67_0(bs): # <<<<<<<<<<<<<< + * """ + * Decode special type with <=2.67.0 compatibility. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_type_2_67_0(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_2_unpickle_type_2_67_0, "\n Decode special type with <=2.67.0 compatibility.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_3_unpickle_type_2_67_0 = {"_unpickle_type_2_67_0", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_type_2_67_0, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_2_unpickle_type_2_67_0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_type_2_67_0(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_unpickle_type_2_67_0 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 653, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 653, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_unpickle_type_2_67_0", 0) < (0)) __PYX_ERR(0, 653, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_unpickle_type_2_67_0", 1, 1, 1, i); __PYX_ERR(0, 653, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 653, __pyx_L3_error) + } + __pyx_v_bs = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_unpickle_type_2_67_0", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 653, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_type_2_67_0(__pyx_self, __pyx_v_bs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":666 + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: + * t.__reduce__ = lambda self: ( # <<<<<<<<<<<<<< + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) + * return t +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_unpickle_type_2_67_0_lambda3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21_unpickle_type_2_67_0_lambda3 = {"lambda3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21_unpickle_type_2_67_0_lambda3, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_unpickle_type_2_67_0_lambda3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 666, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda3", 0) < (0)) __PYX_ERR(0, 666, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, i); __PYX_ERR(0, 666, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 666, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type_2_67_0.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda3", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "apache_beam/coders/coder_impl.py":667 + * except pickle.PicklingError: + * t.__reduce__ = lambda self: ( + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) # <<<<<<<<<<<<<< + * return t + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_unpickle_named_tuple_2_67_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(!__pyx_cur_scope->__pyx_v_bs)) { __Pyx_RaiseClosureNameError("bs"); __PYX_ERR(0, 667, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bs); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_bs) != (0)) __PYX_ERR(0, 667, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 667, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 667, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 667, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":666 + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: + * t.__reduce__ = lambda self: ( # <<<<<<<<<<<<<< + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) + * return t +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type_2_67_0.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":653 + * + * + * def _unpickle_type_2_67_0(bs): # <<<<<<<<<<<<<< + * """ + * Decode special type with <=2.67.0 compatibility. +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_type_2_67_0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *__pyx_cur_scope; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unpickle_type_2_67_0", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 653, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_bs = __pyx_v_bs; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bs); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bs); + + /* "apache_beam/coders/coder_impl.py":657 + * Decode special type with <=2.67.0 compatibility. + * """ + * t = _unpickled_types.get(bs, None) # <<<<<<<<<<<<<< + * if t is None: + * _verify_dill_compat() +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 657, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_cur_scope->__pyx_v_bs, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_t = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":658 + * """ + * t = _unpickled_types.get(bs, None) + * if t is None: # <<<<<<<<<<<<<< + * _verify_dill_compat() + * t = _unpickled_types[bs] = dill.loads(bs) +*/ + __pyx_t_2 = (__pyx_v_t == Py_None); + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":659 + * t = _unpickled_types.get(bs, None) + * if t is None: + * _verify_dill_compat() # <<<<<<<<<<<<<< + * t = _unpickled_types[bs] = dill.loads(bs) + * # Fix unpicklable anonymous named tuples for Python 3.6. +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_verify_dill_compat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":660 + * if t is None: + * _verify_dill_compat() + * t = _unpickled_types[bs] = dill.loads(bs) # <<<<<<<<<<<<<< + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dill); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_bs}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_t, __pyx_t_1); + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 660, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_cur_scope->__pyx_v_bs, __pyx_t_1) < 0))) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":662 + * t = _unpickled_types[bs] = dill.loads(bs) + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): # <<<<<<<<<<<<<< + * try: + * pickle.loads(pickle.dumps(t)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_mstate_global->__pyx_n_u_base_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (__pyx_t_1 == ((PyObject *)(&PyTuple_Type))); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_t, __pyx_mstate_global->__pyx_n_u_fields_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_t_2 = __pyx_t_7; + __pyx_L5_bool_binop_done:; + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":663 + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): + * try: # <<<<<<<<<<<<<< + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":664 + * if t.__base__ is tuple and hasattr(t, '_fields'): + * try: + * pickle.loads(pickle.dumps(t)) # <<<<<<<<<<<<<< + * except pickle.PicklingError: + * t.__reduce__ = lambda self: ( +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pickle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_pickle); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_dumps); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_t}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":663 + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): + * try: # <<<<<<<<<<<<<< + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":665 + * try: + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: # <<<<<<<<<<<<<< + * t.__reduce__ = lambda self: ( + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) +*/ + __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pickle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PicklingError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_ErrRestore(__pyx_t_1, __pyx_t_3, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + if (__pyx_t_14) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 665, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + + /* "apache_beam/coders/coder_impl.py":666 + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: + * t.__reduce__ = lambda self: ( # <<<<<<<<<<<<<< + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) + * return t +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21_unpickle_type_2_67_0_lambda3, 0, __pyx_mstate_global->__pyx_n_u_unpickle_type_2_67_0_locals_lam, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_13) < (0)) __PYX_ERR(0, 666, __pyx_L9_except_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + + /* "apache_beam/coders/coder_impl.py":663 + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): + * try: # <<<<<<<<<<<<<< + * pickle.loads(pickle.dumps(t)) + * except pickle.PicklingError: +*/ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L12_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":662 + * t = _unpickled_types[bs] = dill.loads(bs) + * # Fix unpicklable anonymous named tuples for Python 3.6. + * if t.__base__ is tuple and hasattr(t, '_fields'): # <<<<<<<<<<<<<< + * try: + * pickle.loads(pickle.dumps(t)) +*/ + } + + /* "apache_beam/coders/coder_impl.py":658 + * """ + * t = _unpickled_types.get(bs, None) + * if t is None: # <<<<<<<<<<<<<< + * _verify_dill_compat() + * t = _unpickled_types[bs] = dill.loads(bs) +*/ + } + + /* "apache_beam/coders/coder_impl.py":668 + * t.__reduce__ = lambda self: ( + * _unpickle_named_tuple_2_67_0, (bs, tuple(self))) + * return t # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_t); + __pyx_r = __pyx_v_t; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":653 + * + * + * def _unpickle_type_2_67_0(bs): # <<<<<<<<<<<<<< + * """ + * Decode special type with <=2.67.0 compatibility. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_t); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":671 + * + * + * def _unpickle_named_tuple_2_67_0(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type_2_67_0(bs)(*items) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5_unpickle_named_tuple_2_67_0(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_5_unpickle_named_tuple_2_67_0 = {"_unpickle_named_tuple_2_67_0", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_5_unpickle_named_tuple_2_67_0, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5_unpickle_named_tuple_2_67_0(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bs = 0; + PyObject *__pyx_v_items = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_unpickle_named_tuple_2_67_0 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bs,&__pyx_mstate_global->__pyx_n_u_items,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 671, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 671, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 671, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_unpickle_named_tuple_2_67_0", 0) < (0)) __PYX_ERR(0, 671, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple_2_67_0", 1, 2, 2, i); __PYX_ERR(0, 671, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 671, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 671, __pyx_L3_error) + } + __pyx_v_bs = values[0]; + __pyx_v_items = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple_2_67_0", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 671, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_4_unpickle_named_tuple_2_67_0(__pyx_self, __pyx_v_bs, __pyx_v_items); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_4_unpickle_named_tuple_2_67_0(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unpickle_named_tuple_2_67_0", 0); + + /* "apache_beam/coders/coder_impl.py":672 + * + * def _unpickle_named_tuple_2_67_0(bs, items): + * return _unpickle_type_2_67_0(bs)(*items) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unpickle_type_2_67_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bs}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":671 + * + * + * def _unpickle_named_tuple_2_67_0(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type_2_67_0(bs)(*items) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple_2_67_0", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":675 + * + * + * def _unpickle_type(bs): # <<<<<<<<<<<<<< + * if not _unpickled_types.get(bs, None): + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7_unpickle_type(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_7_unpickle_type = {"_unpickle_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_7_unpickle_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7_unpickle_type(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_unpickle_type (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 675, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_unpickle_type", 0) < (0)) __PYX_ERR(0, 675, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_unpickle_type", 1, 1, 1, i); __PYX_ERR(0, 675, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error) + } + __pyx_v_bs = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_unpickle_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_6_unpickle_type(__pyx_self, __pyx_v_bs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_6_unpickle_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unpickle_type", 0); + + /* "apache_beam/coders/coder_impl.py":676 + * + * def _unpickle_type(bs): + * if not _unpickled_types.get(bs, None): # <<<<<<<<<<<<<< + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) + * +*/ + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 676, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_v_bs, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "apache_beam/coders/coder_impl.py":677 + * def _unpickle_type(bs): + * if not _unpickled_types.get(bs, None): + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) # <<<<<<<<<<<<<< + * + * return _unpickled_types[bs] +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cloudpickle_pickler); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_bs}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 677, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_v_bs, __pyx_t_1) < 0))) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":676 + * + * def _unpickle_type(bs): + * if not _unpickled_types.get(bs, None): # <<<<<<<<<<<<<< + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":679 + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) + * + * return _unpickled_types[bs] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 679, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_v_bs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":675 + * + * + * def _unpickle_type(bs): # <<<<<<<<<<<<<< + * if not _unpickled_types.get(bs, None): + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":682 + * + * + * def _unpickle_named_tuple(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type(bs)(*items) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9_unpickle_named_tuple(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9_unpickle_named_tuple = {"_unpickle_named_tuple", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9_unpickle_named_tuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9_unpickle_named_tuple(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bs = 0; + PyObject *__pyx_v_items = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_unpickle_named_tuple (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bs,&__pyx_mstate_global->__pyx_n_u_items,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 682, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 682, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 682, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_unpickle_named_tuple", 0) < (0)) __PYX_ERR(0, 682, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple", 1, 2, 2, i); __PYX_ERR(0, 682, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 682, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 682, __pyx_L3_error) + } + __pyx_v_bs = values[0]; + __pyx_v_items = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 682, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_8_unpickle_named_tuple(__pyx_self, __pyx_v_bs, __pyx_v_items); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_8_unpickle_named_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unpickle_named_tuple", 0); + + /* "apache_beam/coders/coder_impl.py":683 + * + * def _unpickle_named_tuple(bs, items): + * return _unpickle_type(bs)(*items) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unpickle_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bs}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":682 + * + * + * def _unpickle_named_tuple(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type(bs)(*items) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":690 + * + * A coder for bytes/str objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (bytes, create_OutputStream, bool) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_INCREF(__pyx_v_value); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":695 + * # value might be of type np.bytes if passed from encode_batch, and cython + * # does not recognize it as bytes. + * if is_compiled and isinstance(value, np.bytes_): # <<<<<<<<<<<<<< + * value = bytes(value) + * +*/ + if (__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled) { + } else { + __pyx_t_7 = __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled; + goto __pyx_L4_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":696 + * # does not recognize it as bytes. + * if is_compiled and isinstance(value, np.bytes_): + * value = bytes(value) # <<<<<<<<<<<<<< + * + * out.write(value, nested) +*/ + __pyx_t_1 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyBytes_Type), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":695 + * # value might be of type np.bytes if passed from encode_batch, and cython + * # does not recognize it as bytes. + * if is_compiled and isinstance(value, np.bytes_): # <<<<<<<<<<<<<< + * value = bytes(value) + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":698 + * value = bytes(value) + * + * out.write(value, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_9.__pyx_n = 1; + __pyx_t_9.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_2), 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":690 + * + * A coder for bytes/str objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (bytes, create_OutputStream, bool) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 690, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 690, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 690, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 690, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 690, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 690, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 690, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":700 + * out.write(value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> bytes + * return in_stream.read_all(nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":702 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> bytes + * return in_stream.read_all(nested) # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":700 + * out.write(value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> bytes + * return in_stream.read_all(nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 700, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 700, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 700, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 700, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 700, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":704 + * return in_stream.read_all(nested) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert isinstance(value, bytes), (value, type(value)) + * return value +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":705 + * + * def encode(self, value): + * assert isinstance(value, bytes), (value, type(value)) # <<<<<<<<<<<<<< + * return value + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_6 = PyBytes_Check(__pyx_v_value); + if (unlikely(!__pyx_t_6)) { + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 705, __pyx_L1_error); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_TYPE(__pyx_v_value))) != (0)) __PYX_ERR(0, 705, __pyx_L1_error); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 705, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 705, __pyx_L1_error) + #endif + + /* "apache_beam/coders/coder_impl.py":706 + * def encode(self, value): + * assert isinstance(value, bytes), (value, type(value)) + * return value # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":704 + * return in_stream.read_all(nested) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert isinstance(value, bytes), (value, type(value)) + * return value +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 704, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 704, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 704, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 704, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 704, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 704, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":708 + * return value + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return encoded + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":709 + * + * def decode(self, encoded): + * return encoded # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_encoded); + __pyx_r = __pyx_v_encoded; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":708 + * return value + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return encoded + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 708, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 708, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 708, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 708, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 708, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 708, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":716 + * + * A coder for bool objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_byte(1 if value else 0) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + unsigned char __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":717 + * A coder for bool objects.""" + * def encode_to_stream(self, value, out, nested): + * out.write_byte(1 if value else 0) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 717, __pyx_L1_error) + if (__pyx_t_8) { + __pyx_t_7 = 1; + } else { + __pyx_t_7 = 0; + } + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":716 + * + * A coder for bool objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_byte(1 if value else 0) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 716, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 716, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 716, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 716, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 716, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 716, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 716, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 716, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 716, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 716, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":719 + * out.write_byte(1 if value else 0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = in_stream.read_byte() + * if value == 0: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":720 + * + * def decode_from_stream(self, in_stream, nested): + * value = in_stream.read_byte() # <<<<<<<<<<<<<< + * if value == 0: + * return False +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_byte(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":721 + * def decode_from_stream(self, in_stream, nested): + * value = in_stream.read_byte() + * if value == 0: # <<<<<<<<<<<<<< + * return False + * elif value == 1: +*/ + __pyx_t_8 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 721, __pyx_L1_error) + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":722 + * value = in_stream.read_byte() + * if value == 0: + * return False # <<<<<<<<<<<<<< + * elif value == 1: + * return True +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":721 + * def decode_from_stream(self, in_stream, nested): + * value = in_stream.read_byte() + * if value == 0: # <<<<<<<<<<<<<< + * return False + * elif value == 1: +*/ + } + + /* "apache_beam/coders/coder_impl.py":723 + * if value == 0: + * return False + * elif value == 1: # <<<<<<<<<<<<<< + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) +*/ + __pyx_t_8 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 723, __pyx_L1_error) + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":724 + * return False + * elif value == 1: + * return True # <<<<<<<<<<<<<< + * raise ValueError("Expected 0 or 1, got %s" % value) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":723 + * if value == 0: + * return False + * elif value == 1: # <<<<<<<<<<<<<< + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) +*/ + } + + /* "apache_beam/coders/coder_impl.py":725 + * elif value == 1: + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_0_or_1_got_s, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 725, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":719 + * out.write_byte(1 if value else 0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = in_stream.read_byte() + * if value == 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 719, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 719, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 719, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 719, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 719, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 719, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 719, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 719, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":727 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return b'\x01' if value else b'\x00' + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":728 + * + * def encode(self, value): + * return b'\x01' if value else b'\x00' # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 728, __pyx_L1_error) + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__7); + __pyx_t_1 = __pyx_mstate_global->__pyx_kp_b__7; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__8); + __pyx_t_1 = __pyx_mstate_global->__pyx_kp_b__8; + } + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":727 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return b'\x01' if value else b'\x00' + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 727, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 727, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 727, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 727, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 727, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 727, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":730 + * return b'\x01' if value else b'\x00' + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * value = ord(encoded) + * if value == 0: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + long __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":731 + * + * def decode(self, encoded): + * value = ord(encoded) # <<<<<<<<<<<<<< + * if value == 0: + * return False +*/ + __pyx_t_6 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_6 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":732 + * def decode(self, encoded): + * value = ord(encoded) + * if value == 0: # <<<<<<<<<<<<<< + * return False + * elif value == 1: +*/ + __pyx_t_7 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":733 + * value = ord(encoded) + * if value == 0: + * return False # <<<<<<<<<<<<<< + * elif value == 1: + * return True +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":732 + * def decode(self, encoded): + * value = ord(encoded) + * if value == 0: # <<<<<<<<<<<<<< + * return False + * elif value == 1: +*/ + } + + /* "apache_beam/coders/coder_impl.py":734 + * if value == 0: + * return False + * elif value == 1: # <<<<<<<<<<<<<< + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) +*/ + __pyx_t_7 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 734, __pyx_L1_error) + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":735 + * return False + * elif value == 1: + * return True # <<<<<<<<<<<<<< + * raise ValueError("Expected 0 or 1, got %s" % value) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":734 + * if value == 0: + * return False + * elif value == 1: # <<<<<<<<<<<<<< + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) +*/ + } + + /* "apache_beam/coders/coder_impl.py":736 + * elif value == 1: + * return True + * raise ValueError("Expected 0 or 1, got %s" % value) # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_0_or_1_got_s, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 736, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":730 + * return b'\x01' if value else b'\x00' + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * value = ord(encoded) + * if value == 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 730, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 730, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 730, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 730, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 730, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 730, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":738 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # Note that booleans are encoded the same way regardless of nesting. + * return 1 +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":740 + * def estimate_size(self, unused_value, nested=False): + * # Note that booleans are encoded the same way regardless of nesting. + * return 1 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_r = __pyx_mstate_global->__pyx_int_1; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":738 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # Note that booleans are encoded the same way regardless of nesting. + * return 1 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 738, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 738, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 738, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 738, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 738, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 738, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 738, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 738, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BooleanCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BooleanCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":755 + * + * A coder for typing.Mapping objects.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * key_coder, # type: CoderImpl +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_key_coder = 0; + PyObject *__pyx_v_value_coder = 0; + PyObject *__pyx_v_is_deterministic = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key_coder,&__pyx_mstate_global->__pyx_n_u_value_coder,&__pyx_mstate_global->__pyx_n_u_is_deterministic,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 755, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 755, __pyx_L3_error) + + /* "apache_beam/coders/coder_impl.py":759 + * key_coder, # type: CoderImpl + * value_coder, # type: CoderImpl + * is_deterministic=False): # <<<<<<<<<<<<<< + * self._key_coder = key_coder + * self._value_coder = value_coder +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 755, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 755, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 755, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_key_coder = values[0]; + __pyx_v_value_coder = values[1]; + __pyx_v_is_deterministic = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 755, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_key_coder, __pyx_v_value_coder, __pyx_v_is_deterministic); + + /* "apache_beam/coders/coder_impl.py":755 + * + * A coder for typing.Mapping objects.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * key_coder, # type: CoderImpl +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_key_coder, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_is_deterministic) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":760 + * value_coder, # type: CoderImpl + * is_deterministic=False): + * self._key_coder = key_coder # <<<<<<<<<<<<<< + * self._value_coder = value_coder + * self._is_deterministic = is_deterministic +*/ + __pyx_t_1 = __pyx_v_key_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 760, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_key_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_key_coder); + __pyx_v_self->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":761 + * is_deterministic=False): + * self._key_coder = key_coder + * self._value_coder = value_coder # <<<<<<<<<<<<<< + * self._is_deterministic = is_deterministic + * +*/ + __pyx_t_1 = __pyx_v_value_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 761, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_value_coder); + __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":762 + * self._key_coder = key_coder + * self._value_coder = value_coder + * self._is_deterministic = is_deterministic # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, dict_value, out, nested): +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_is_deterministic); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_v_self->_is_deterministic = __pyx_t_2; + + /* "apache_beam/coders/coder_impl.py":755 + * + * A coder for typing.Mapping objects.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * key_coder, # type: CoderImpl +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":764 + * self._is_deterministic = is_deterministic + * + * def encode_to_stream(self, dict_value, out, nested): # <<<<<<<<<<<<<< + * out.write_bigendian_int32(len(dict_value)) + * # Note this implementation always uses nested context when encoding keys +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_dict_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":765 + * + * def encode_to_stream(self, dict_value, out, nested): + * out.write_bigendian_int32(len(dict_value)) # <<<<<<<<<<<<<< + * # Note this implementation always uses nested context when encoding keys + * # and values which differs from Java. See note in docstring. +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_dict_value); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":768 + * # Note this implementation always uses nested context when encoding keys + * # and values which differs from Java. See note in docstring. + * if self._is_deterministic: # <<<<<<<<<<<<<< + * for key, value in sorted(dict_value.items()): + * self._key_coder.encode_to_stream(key, out, True) +*/ + if (__pyx_v_self->_is_deterministic) { + + /* "apache_beam/coders/coder_impl.py":769 + * # and values which differs from Java. See note in docstring. + * if self._is_deterministic: + * for key, value in sorted(dict_value.items()): # <<<<<<<<<<<<<< + * self._key_coder.encode_to_stream(key, out, True) + * self._value_coder.encode_to_stream(value, out, True) +*/ + __pyx_t_2 = __pyx_v_dict_value; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely((PyList_Sort(__pyx_t_2) < 0))) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 769, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 769, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":770 + * if self._is_deterministic: + * for key, value in sorted(dict_value.items()): + * self._key_coder.encode_to_stream(key, out, True) # <<<<<<<<<<<<<< + * self._value_coder.encode_to_stream(value, out, True) + * else: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_key_coder, __pyx_v_key, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":771 + * for key, value in sorted(dict_value.items()): + * self._key_coder.encode_to_stream(key, out, True) + * self._value_coder.encode_to_stream(value, out, True) # <<<<<<<<<<<<<< + * else: + * # This loop is separate from the above so the loop over dict.items() +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_v_value, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":769 + * # and values which differs from Java. See note in docstring. + * if self._is_deterministic: + * for key, value in sorted(dict_value.items()): # <<<<<<<<<<<<<< + * self._key_coder.encode_to_stream(key, out, True) + * self._value_coder.encode_to_stream(value, out, True) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":768 + * # Note this implementation always uses nested context when encoding keys + * # and values which differs from Java. See note in docstring. + * if self._is_deterministic: # <<<<<<<<<<<<<< + * for key, value in sorted(dict_value.items()): + * self._key_coder.encode_to_stream(key, out, True) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":775 + * # This loop is separate from the above so the loop over dict.items() + * # will be optimized by Cython. + * for key, value in dict_value.items(): # <<<<<<<<<<<<<< + * self._key_coder.encode_to_stream(key, out, True) + * self._value_coder.encode_to_stream(value, out, True) +*/ + /*else*/ { + __pyx_t_7 = 0; + if (unlikely(__pyx_v_dict_value == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 775, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_dict_value, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_7, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_10); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":776 + * # will be optimized by Cython. + * for key, value in dict_value.items(): + * self._key_coder.encode_to_stream(key, out, True) # <<<<<<<<<<<<<< + * self._value_coder.encode_to_stream(value, out, True) + * +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_key_coder, __pyx_v_key, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":777 + * for key, value in dict_value.items(): + * self._key_coder.encode_to_stream(key, out, True) + * self._value_coder.encode_to_stream(value, out, True) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_v_value, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":764 + * self._is_deterministic = is_deterministic + * + * def encode_to_stream(self, dict_value, out, nested): # <<<<<<<<<<<<<< + * out.write_bigendian_int32(len(dict_value)) + * # Note this implementation always uses nested context when encoding keys +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_dict_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dict_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 764, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 764, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 764, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 764, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 764, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 764, __pyx_L3_error) + } + __pyx_v_dict_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 764, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_dict_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_dict_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":779 + * self._value_coder.encode_to_stream(value, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * size = in_stream.read_bigendian_int32() + * result = {} +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int32_t __pyx_v_size; + PyObject *__pyx_v_result = NULL; + CYTHON_UNUSED int32_t __pyx_v__; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int32_t __pyx_t_7; + int32_t __pyx_t_8; + int32_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":780 + * + * def decode_from_stream(self, in_stream, nested): + * size = in_stream.read_bigendian_int32() # <<<<<<<<<<<<<< + * result = {} + * for _ in range(size): +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int32(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_v_size = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":781 + * def decode_from_stream(self, in_stream, nested): + * size = in_stream.read_bigendian_int32() + * result = {} # <<<<<<<<<<<<<< + * for _ in range(size): + * # Note this implementation always uses nested context when encoding keys +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_result = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":782 + * size = in_stream.read_bigendian_int32() + * result = {} + * for _ in range(size): # <<<<<<<<<<<<<< + * # Note this implementation always uses nested context when encoding keys + * # and values which differs from Java. See note in docstring. +*/ + __pyx_t_7 = __pyx_v_size; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v__ = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":785 + * # Note this implementation always uses nested context when encoding keys + * # and values which differs from Java. See note in docstring. + * key = self._key_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * value = self._value_coder.decode_from_stream(in_stream, True) + * result[key] = value +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_key_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":786 + * # and values which differs from Java. See note in docstring. + * key = self._key_coder.decode_from_stream(in_stream, True) + * value = self._value_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * result[key] = value + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_value_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":787 + * key = self._key_coder.decode_from_stream(in_stream, True) + * value = self._value_coder.decode_from_stream(in_stream, True) + * result[key] = value # <<<<<<<<<<<<<< + * + * return result +*/ + if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_v_value) < 0))) __PYX_ERR(0, 787, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":789 + * result[key] = value + * + * return result # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":779 + * self._value_coder.encode_to_stream(value, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * size = in_stream.read_bigendian_int32() + * result = {} +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 779, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 779, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 779, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 779, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":791 + * return result + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimate = NULL; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":792 + * + * def estimate_size(self, unused_value, nested=False): + * estimate = 4 # 4 bytes for int32 size prefix # <<<<<<<<<<<<<< + * for key, value in unused_value.items(): + * estimate += self._key_coder.estimate_size(key, True) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_4); + __pyx_v_estimate = __pyx_mstate_global->__pyx_int_4; + + /* "apache_beam/coders/coder_impl.py":793 + * def estimate_size(self, unused_value, nested=False): + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): # <<<<<<<<<<<<<< + * estimate += self._key_coder.estimate_size(key, True) + * estimate += self._value_coder.estimate_size(value, True) +*/ + __pyx_t_7 = 0; + if (unlikely(__pyx_v_unused_value == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 793, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_unused_value, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_9); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":794 + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): + * estimate += self._key_coder.estimate_size(key, True) # <<<<<<<<<<<<<< + * estimate += self._value_coder.estimate_size(value, True) + * return estimate +*/ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_key_coder, __pyx_v_key, 0, &__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_estimate, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_estimate, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":795 + * for key, value in unused_value.items(): + * estimate += self._key_coder.estimate_size(key, True) + * estimate += self._value_coder.estimate_size(value, True) # <<<<<<<<<<<<<< + * return estimate + * +*/ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = 1; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_value_coder, __pyx_v_value, 0, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_estimate, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_estimate, __pyx_t_4); + __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":796 + * estimate += self._key_coder.estimate_size(key, True) + * estimate += self._value_coder.estimate_size(value, True) + * return estimate # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_estimate); + __pyx_r = __pyx_v_estimate; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":791 + * return result + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimate); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 791, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 791, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 791, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 791, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 791, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._is_deterministic, self._key_coder, self._value_coder) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_deterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_key_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_key_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_key_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->_value_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._is_deterministic, self._key_coder, self._value_coder) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._is_deterministic, self._key_coder, self._value_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._key_coder is not None or self._value_coder is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._is_deterministic, self._key_coder, self._value_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._key_coder is not None or self._value_coder is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_key_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->_value_coder) != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._key_coder is not None or self._value_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._key_coder is not None or self._value_coder is not None + * if use_setstate: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MapCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_51847764); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_51847764); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_51847764) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._key_coder is not None or self._value_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, None), state + * else: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MapCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_51847764); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_51847764); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_51847764) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":807 + * ENCODE_PRESENT = 1 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * value_coder # type: CoderImpl +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value_coder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 807, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 807, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 807, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 807, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 807, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 807, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 807, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value_coder = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 807, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_value_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_coder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":811 + * value_coder # type: CoderImpl + * ): + * self._value_coder = value_coder # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value_coder_2, __pyx_v_value_coder) < (0)) __PYX_ERR(0, 811, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":807 + * ENCODE_PRESENT = 1 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * value_coder # type: CoderImpl +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":813 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * if value is None: + * out.write_byte(self.ENCODE_NULL) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_out = 0; + PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 813, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 813, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 813, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 813, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 813, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 813, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, i); __PYX_ERR(0, 813, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 813, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 813, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 813, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 813, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_out = values[2]; + __pyx_v_nested = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 813, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":814 + * + * def encode_to_stream(self, value, out, nested): + * if value is None: # <<<<<<<<<<<<<< + * out.write_byte(self.ENCODE_NULL) + * else: +*/ + __pyx_t_1 = (__pyx_v_value == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/coders/coder_impl.py":815 + * def encode_to_stream(self, value, out, nested): + * if value is None: + * out.write_byte(self.ENCODE_NULL) # <<<<<<<<<<<<<< + * else: + * out.write_byte(self.ENCODE_PRESENT) +*/ + __pyx_t_3 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ENCODE_NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write_byte, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":814 + * + * def encode_to_stream(self, value, out, nested): + * if value is None: # <<<<<<<<<<<<<< + * out.write_byte(self.ENCODE_NULL) + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":817 + * out.write_byte(self.ENCODE_NULL) + * else: + * out.write_byte(self.ENCODE_PRESENT) # <<<<<<<<<<<<<< + * self._value_coder.encode_to_stream(value, out, nested) + * +*/ + /*else*/ { + __pyx_t_4 = __pyx_v_out; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ENCODE_PRESENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write_byte, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":818 + * else: + * out.write_byte(self.ENCODE_PRESENT) + * self._value_coder.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value_coder_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, __pyx_v_out, __pyx_v_nested}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":813 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * if value is None: + * out.write_byte(self.ENCODE_NULL) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":820 + * self._value_coder.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_in_stream = 0; + PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 820, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 820, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 820, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 820, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 820, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, i); __PYX_ERR(0, 820, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 820, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 820, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 820, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_in_stream = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 820, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, PyObject *__pyx_v_nested) { + PyObject *__pyx_v_null_indicator = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":821 + * + * def decode_from_stream(self, in_stream, nested): + * null_indicator = in_stream.read_byte() # <<<<<<<<<<<<<< + * if null_indicator == self.ENCODE_NULL: + * return None +*/ + __pyx_t_2 = __pyx_v_in_stream; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_byte, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_null_indicator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":822 + * def decode_from_stream(self, in_stream, nested): + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: # <<<<<<<<<<<<<< + * return None + * elif null_indicator == self.ENCODE_PRESENT: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ENCODE_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_null_indicator, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/coders/coder_impl.py":823 + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: + * return None # <<<<<<<<<<<<<< + * elif null_indicator == self.ENCODE_PRESENT: + * return self._value_coder.decode_from_stream(in_stream, nested) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":822 + * def decode_from_stream(self, in_stream, nested): + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: # <<<<<<<<<<<<<< + * return None + * elif null_indicator == self.ENCODE_PRESENT: +*/ + } + + /* "apache_beam/coders/coder_impl.py":824 + * if null_indicator == self.ENCODE_NULL: + * return None + * elif null_indicator == self.ENCODE_PRESENT: # <<<<<<<<<<<<<< + * return self._value_coder.decode_from_stream(in_stream, nested) + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ENCODE_PRESENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_null_indicator, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (likely(__pyx_t_4)) { + + /* "apache_beam/coders/coder_impl.py":825 + * return None + * elif null_indicator == self.ENCODE_PRESENT: + * return self._value_coder.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * else: + * raise ValueError( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value_coder_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_in_stream, __pyx_v_nested}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":824 + * if null_indicator == self.ENCODE_NULL: + * return None + * elif null_indicator == self.ENCODE_PRESENT: # <<<<<<<<<<<<<< + * return self._value_coder.decode_from_stream(in_stream, nested) + * else: +*/ + } + + /* "apache_beam/coders/coder_impl.py":827 + * return self._value_coder.decode_from_stream(in_stream, nested) + * else: + * raise ValueError( # <<<<<<<<<<<<<< + * "Encountered unexpected value for null indicator: '%s'" % + * null_indicator) +*/ + /*else*/ { + __pyx_t_5 = NULL; + + /* "apache_beam/coders/coder_impl.py":828 + * else: + * raise ValueError( + * "Encountered unexpected value for null indicator: '%s'" % # <<<<<<<<<<<<<< + * null_indicator) + * +*/ + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Encountered_unexpected_value_for, __pyx_v_null_indicator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 827, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":820 + * self._value_coder.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_null_indicator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":831 + * null_indicator) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * return 1 + ( + * self._value_coder.estimate_size(unused_value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_unused_value = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 831, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 831, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 831, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 831, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 831, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, i); __PYX_ERR(0, 831, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 831, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 831, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 831, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_self = values[0]; + __pyx_v_unused_value = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 831, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unused_value, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + + /* "apache_beam/coders/coder_impl.py":832 + * + * def estimate_size(self, unused_value, nested=False): + * return 1 + ( # <<<<<<<<<<<<<< + * self._value_coder.estimate_size(unused_value) + * if unused_value is not None else 0) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":834 + * return 1 + ( + * self._value_coder.estimate_size(unused_value) + * if unused_value is not None else 0) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = (__pyx_v_unused_value != Py_None); + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":833 + * def estimate_size(self, unused_value, nested=False): + * return 1 + ( + * self._value_coder.estimate_size(unused_value) # <<<<<<<<<<<<<< + * if unused_value is not None else 0) + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value_coder_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_unused_value}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_1 = __pyx_mstate_global->__pyx_int_0; + } + + /* "apache_beam/coders/coder_impl.py":832 + * + * def estimate_size(self, unused_value, nested=False): + * return 1 + ( # <<<<<<<<<<<<<< + * self._value_coder.estimate_size(unused_value) + * if unused_value is not None else 0) +*/ + __pyx_t_3 = __Pyx_PyLong_AddCObj(__pyx_mstate_global->__pyx_int_1, __pyx_t_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":831 + * null_indicator) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * return 1 + ( + * self._value_coder.estimate_size(unused_value) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":839 + * class BigEndianShortCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_bigendian_int16(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int16_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":841 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * out.write_bigendian_int16(value) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_7 = __Pyx_PyLong_As_int16_t(__pyx_v_value); if (unlikely((__pyx_t_7 == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int16(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":839 + * class BigEndianShortCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_bigendian_int16(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 839, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 839, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 839, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 839, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 839, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 839, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 839, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 839, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 839, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 839, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":843 + * out.write_bigendian_int16(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_int16() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int16_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":845 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_int16() # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int16(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int16_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int16_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":843 + * out.write_bigendian_int16(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_int16() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 843, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 843, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 843, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 843, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 843, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 843, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 843, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 843, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":847 + * return in_stream.read_bigendian_int16() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A short is encoded as 2 bytes, regardless of nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":850 + * # type: (Any, bool) -> int + * # A short is encoded as 2 bytes, regardless of nesting. + * return 2 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); + __pyx_r = __pyx_mstate_global->__pyx_int_2; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":847 + * return in_stream.read_bigendian_int16() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A short is encoded as 2 bytes, regardless of nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 847, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 847, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 847, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 847, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 847, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 847, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 847, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 847, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigEndianShortCod); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigEndianShortCod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":855 + * class SinglePrecisionFloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_float(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + float __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":857 + * def encode_to_stream(self, value, out, nested): + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_float(value) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_7 = __Pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_float(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":855 + * class SinglePrecisionFloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_float(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 855, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 855, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 855, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 855, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 855, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 855, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 855, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 855, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 855, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 855, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":859 + * out.write_bigendian_float(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_float() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + float __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":861 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_float() # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_float(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((float)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":859 + * out.write_bigendian_float(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_float() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 859, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 859, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 859, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 859, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 859, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 859, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 859, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 859, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 859, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 859, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":863 + * return in_stream.read_bigendian_float() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A float is encoded as 4 bytes, regardless of nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":866 + * # type: (Any, bool) -> int + * # A float is encoded as 4 bytes, regardless of nesting. + * return 4 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_4); + __pyx_r = __pyx_mstate_global->__pyx_int_4; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":863 + * return in_stream.read_bigendian_float() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A float is encoded as 4 bytes, regardless of nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 863, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 863, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 863, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 863, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 863, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 863, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 863, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 863, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SinglePrecisionFl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SinglePrecisionFl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":871 + * class FloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_double(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + double __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":873 + * def encode_to_stream(self, value, out, nested): + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_double(value) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_double(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":871 + * class FloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_double(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 871, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 871, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 871, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 871, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 871, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 871, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 871, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 871, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 871, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 871, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":875 + * out.write_bigendian_double(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_double() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + double __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":877 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_double() # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":875 + * out.write_bigendian_double(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_double() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 875, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 875, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 875, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 875, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 875, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 875, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 875, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 875, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 875, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":879 + * return in_stream.read_bigendian_double() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A double is encoded as 8 bytes, regardless of nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":882 + * # type: (Any, bool) -> int + * # A double is encoded as 8 bytes, regardless of nesting. + * return 8 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_8); + __pyx_r = __pyx_mstate_global->__pyx_int_8; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":879 + * return in_stream.read_bigendian_double() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A double is encoded as 8 bytes, regardless of nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 879, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 879, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 879, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 879, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 879, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 879, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 879, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 879, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":893 + * + * # TODO: Fn Harness only supports millis. Is this important enough to fix? + * def _to_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT +*/ + +static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, int64_t __pyx_v_value) { + uint64_t __pyx_r; + + /* "apache_beam/coders/coder_impl.py":895 + * def _to_normal_time(self, value): + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT # <<<<<<<<<<<<<< + * + * def _from_normal_time(self, value): +*/ + __pyx_r = (__pyx_v_value - __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":893 + * + * # TODO: Fn Harness only supports millis. Is this important enough to fix? + * def _to_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":897 + * return value - _TIME_SHIFT + * + * def _from_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT +*/ + +static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, uint64_t __pyx_v_value) { + int64_t __pyx_r; + + /* "apache_beam/coders/coder_impl.py":899 + * def _from_normal_time(self, value): + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_r = (__pyx_v_value + __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":897 + * return value - _TIME_SHIFT + * + * def _from_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":901 + * return value + _TIME_SHIFT + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (IntervalWindow, create_OutputStream, bool) -> None + * typed_value = value +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0; + int64_t __pyx_v_span_millis; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":903 + * def encode_to_stream(self, value, out, nested): + * # type: (IntervalWindow, create_OutputStream, bool) -> None + * typed_value = value # <<<<<<<<<<<<<< + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":905 + * typed_value = value + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) # <<<<<<<<<<<<<< + * out.write_bigendian_uint64( + * self._from_normal_time(typed_value._end_micros // 1000)) +*/ + __pyx_v_span_millis = (__Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8, 1) - __Pyx_div_int64_t(__pyx_v_typed_value->_start_micros, 0x3E8, 1)); + + /* "apache_beam/coders/coder_impl.py":907 + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) + * out.write_bigendian_uint64( + * self._from_normal_time(typed_value._end_micros // 1000)) # <<<<<<<<<<<<<< + * out.write_var_int64(span_millis) + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_from_normal_time(__pyx_v_self, __Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8, 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":906 + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) + * out.write_bigendian_uint64( # <<<<<<<<<<<<<< + * self._from_normal_time(typed_value._end_micros // 1000)) + * out.write_var_int64(span_millis) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_uint64(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":908 + * out.write_bigendian_uint64( + * self._from_normal_time(typed_value._end_micros // 1000)) + * out.write_var_int64(span_millis) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_, nested): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_span_millis, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":901 + * return value + _TIME_SHIFT + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (IntervalWindow, create_OutputStream, bool) -> None + * typed_value = value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_typed_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 901, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 901, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 901, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 901, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 901, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 901, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 901, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 901, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 901, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 901, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":910 + * out.write_var_int64(span_millis) + * + * def decode_from_stream(self, in_, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> IntervalWindow + * if not TYPE_CHECKING: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + uint64_t __pyx_t_11; + uint64_t __pyx_t_12; + int64_t __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":912 + * def decode_from_stream(self, in_, nested): + * # type: (create_InputStream, bool) -> IntervalWindow + * if not TYPE_CHECKING: # <<<<<<<<<<<<<< + * global IntervalWindow # pylint: disable=global-variable-not-assigned + * if IntervalWindow is None: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":914 + * if not TYPE_CHECKING: + * global IntervalWindow # pylint: disable=global-variable-not-assigned + * if IntervalWindow is None: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import IntervalWindow + * # instantiating with None is not part of the public interface +*/ + __pyx_t_8 = (__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow == Py_None); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":915 + * global IntervalWindow # pylint: disable=global-variable-not-assigned + * if IntervalWindow is None: + * from apache_beam.transforms.window import IntervalWindow # <<<<<<<<<<<<<< + * # instantiating with None is not part of the public interface + * # pylint: disable=too-many-function-args +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntervalWindow}; + __pyx_t_9 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 915, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_9; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntervalWindow}; + __pyx_t_10 = 0; { + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_10]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + switch (__pyx_t_10) { + case 0: + __Pyx_INCREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + break; + default:; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":914 + * if not TYPE_CHECKING: + * global IntervalWindow # pylint: disable=global-variable-not-assigned + * if IntervalWindow is None: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import IntervalWindow + * # instantiating with None is not part of the public interface +*/ + } + + /* "apache_beam/coders/coder_impl.py":912 + * def decode_from_stream(self, in_, nested): + * # type: (create_InputStream, bool) -> IntervalWindow + * if not TYPE_CHECKING: # <<<<<<<<<<<<<< + * global IntervalWindow # pylint: disable=global-variable-not-assigned + * if IntervalWindow is None: +*/ + } + + /* "apache_beam/coders/coder_impl.py":918 + * # instantiating with None is not part of the public interface + * # pylint: disable=too-many-function-args + * typed_value = IntervalWindow(None, None) # type: ignore[arg-type] # <<<<<<<<<<<<<< + * typed_value._end_micros = ( + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) +*/ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":920 + * typed_value = IntervalWindow(None, None) # type: ignore[arg-type] + * typed_value._end_micros = ( + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) # <<<<<<<<<<<<<< + * typed_value._start_micros = ( + * typed_value._end_micros - 1000 * in_.read_var_int64()) +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_->__pyx_vtab)->read_bigendian_uint64(__pyx_v_in_, 0); if (unlikely(__pyx_t_11 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_to_normal_time(__pyx_v_self, __pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":919 + * # pylint: disable=too-many-function-args + * typed_value = IntervalWindow(None, None) # type: ignore[arg-type] + * typed_value._end_micros = ( # <<<<<<<<<<<<<< + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) + * typed_value._start_micros = ( +*/ + __pyx_v_typed_value->_end_micros = (0x3E8 * __pyx_t_12); + + /* "apache_beam/coders/coder_impl.py":922 + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) + * typed_value._start_micros = ( + * typed_value._end_micros - 1000 * in_.read_var_int64()) # <<<<<<<<<<<<<< + * return typed_value + * +*/ + __pyx_t_13 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_->__pyx_vtab)->read_var_int64(__pyx_v_in_, 0); if (unlikely(__pyx_t_13 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":921 + * typed_value._end_micros = ( + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) + * typed_value._start_micros = ( # <<<<<<<<<<<<<< + * typed_value._end_micros - 1000 * in_.read_var_int64()) + * return typed_value +*/ + __pyx_v_typed_value->_start_micros = (__pyx_v_typed_value->_end_micros - (0x3E8 * __pyx_t_13)); + + /* "apache_beam/coders/coder_impl.py":923 + * typed_value._start_micros = ( + * typed_value._end_micros - 1000 * in_.read_var_int64()) + * return typed_value # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_typed_value); + __pyx_r = ((PyObject *)__pyx_v_typed_value); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":910 + * out.write_var_int64(span_millis) + * + * def decode_from_stream(self, in_, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> IntervalWindow + * if not TYPE_CHECKING: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_typed_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_ = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 910, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 910, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 910, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 910, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 910, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 910, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 910, __pyx_L3_error) + } + __pyx_v_in_ = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 910, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 910, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_", 0))) __PYX_ERR(0, 910, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_in_, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":925 + * return typed_value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # An IntervalWindow is context-insensitive, with a timestamp (8 bytes) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0; + int64_t __pyx_v_span_millis; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":929 + * # An IntervalWindow is context-insensitive, with a timestamp (8 bytes) + * # and a varint timespam. + * typed_value = value # <<<<<<<<<<<<<< + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":931 + * typed_value = value + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) # <<<<<<<<<<<<<< + * return 8 + get_varint_size(span_millis) + * +*/ + __pyx_v_span_millis = (__Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8, 1) - __Pyx_div_int64_t(__pyx_v_typed_value->_start_micros, 0x3E8, 1)); + + /* "apache_beam/coders/coder_impl.py":932 + * span_millis = ( + * typed_value._end_micros // 1000 - typed_value._start_micros // 1000) + * return 8 + get_varint_size(span_millis) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_span_millis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyLong_AddCObj(__pyx_mstate_global->__pyx_int_8, __pyx_t_1, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":925 + * return typed_value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # An IntervalWindow is context-insensitive, with a timestamp (8 bytes) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_typed_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 925, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 925, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 925, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 925, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 925, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 925, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 925, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 925, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IntervalWindowCod); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IntervalWindowCod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":943 + * https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79 + * """ + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_millis = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int64_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":945 + * def encode_to_stream(self, value, out, nested): + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 # <<<<<<<<<<<<<< + * if millis >= 0: + * millis = millis - _TIME_SHIFT +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_FloorDivideObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_millis = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":946 + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 + * if millis >= 0: # <<<<<<<<<<<<<< + * millis = millis - _TIME_SHIFT + * else: +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_millis, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":947 + * millis = value.micros // 1000 + * if millis >= 0: + * millis = millis - _TIME_SHIFT # <<<<<<<<<<<<<< + * else: + * millis = millis + _TIME_SHIFT +*/ + __pyx_t_2 = __Pyx_PyLong_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Subtract(__pyx_v_millis, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":946 + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 + * if millis >= 0: # <<<<<<<<<<<<<< + * millis = millis - _TIME_SHIFT + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":949 + * millis = millis - _TIME_SHIFT + * else: + * millis = millis + _TIME_SHIFT # <<<<<<<<<<<<<< + * out.write_bigendian_int64(millis) + * +*/ + /*else*/ { + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(__pyx_v_millis, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_2); + __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":950 + * else: + * millis = millis + _TIME_SHIFT + * out.write_bigendian_int64(millis) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_v_millis); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":943 + * https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79 + * """ + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_millis); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 943, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 943, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 943, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 943, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 943, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 943, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 943, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":952 + * out.write_bigendian_int64(millis) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_millis = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":954 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() # <<<<<<<<<<<<<< + * if millis < 0: + * millis = millis + _TIME_SHIFT +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 954, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_millis = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":955 + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() + * if millis < 0: # <<<<<<<<<<<<<< + * millis = millis + _TIME_SHIFT + * else: +*/ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_millis, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":956 + * millis = in_stream.read_bigendian_int64() + * if millis < 0: + * millis = millis + _TIME_SHIFT # <<<<<<<<<<<<<< + * else: + * millis = millis - _TIME_SHIFT +*/ + __pyx_t_1 = __Pyx_PyLong_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(__pyx_v_millis, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":955 + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() + * if millis < 0: # <<<<<<<<<<<<<< + * millis = millis + _TIME_SHIFT + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":958 + * millis = millis + _TIME_SHIFT + * else: + * millis = millis - _TIME_SHIFT # <<<<<<<<<<<<<< + * return Timestamp(micros=millis * 1000) + * +*/ + /*else*/ { + __pyx_t_2 = __Pyx_PyLong_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Subtract(__pyx_v_millis, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_1); + __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":959 + * else: + * millis = millis - _TIME_SHIFT + * return Timestamp(micros=millis * 1000) # <<<<<<<<<<<<<< + * + * def estimate_size(self, unused_value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_MultiplyObjC(__pyx_v_millis, __pyx_mstate_global->__pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_micros, __pyx_t_5, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":952 + * out.write_bigendian_int64(millis) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_millis); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 952, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 952, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 952, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 952, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":961 + * return Timestamp(micros=millis * 1000) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of + * # nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_unused_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":964 + * # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of + * # nesting. + * return 8 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_8); + __pyx_r = __pyx_mstate_global->__pyx_int_8; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":961 + * return Timestamp(micros=millis * 1000) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of + * # nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 961, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 961, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 961, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 961, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 961, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 961, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 961, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_unused_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 961, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.timestamp_class,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->timestamp_class); + __Pyx_GIVEREF(__pyx_v_self->timestamp_class); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->timestamp_class) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.timestamp_class,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.timestamp_class,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.timestamp_class is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.timestamp_class,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.timestamp_class is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->timestamp_class != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.timestamp_class is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.timestamp_class is not None + * if use_setstate: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_107408500); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_107408500); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_107408500) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.timestamp_class is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, None), state + * else: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_107408500); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_107408500); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_107408500) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":969 + * class TimerCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): # <<<<<<<<<<<<<< + * self._timestamp_coder_impl = TimestampCoderImpl() + * self._boolean_coder_impl = BooleanCoderImpl() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_key_coder_impl = 0; + PyObject *__pyx_v_window_coder_impl = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_key_coder_impl,&__pyx_mstate_global->__pyx_n_u_window_coder_impl,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 969, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 969, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 969, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 969, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 969, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_key_coder_impl = values[1]; + __pyx_v_window_coder_impl = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 969, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_key_coder_impl, __pyx_v_window_coder_impl); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl, PyObject *__pyx_v_window_coder_impl) { + PyObject *__pyx_v_StrUtf8Coder = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":970 + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): + * self._timestamp_coder_impl = TimestampCoderImpl() # <<<<<<<<<<<<<< + * self._boolean_coder_impl = BooleanCoderImpl() + * self._pane_info_coder_impl = PaneInfoCoderImpl() +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_coder_impl, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":971 + * def __init__(self, key_coder_impl, window_coder_impl): + * self._timestamp_coder_impl = TimestampCoderImpl() + * self._boolean_coder_impl = BooleanCoderImpl() # <<<<<<<<<<<<<< + * self._pane_info_coder_impl = PaneInfoCoderImpl() + * self._key_coder_impl = key_coder_impl +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boolean_coder_impl, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":972 + * self._timestamp_coder_impl = TimestampCoderImpl() + * self._boolean_coder_impl = BooleanCoderImpl() + * self._pane_info_coder_impl = PaneInfoCoderImpl() # <<<<<<<<<<<<<< + * self._key_coder_impl = key_coder_impl + * self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pane_info_coder_impl, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":973 + * self._boolean_coder_impl = BooleanCoderImpl() + * self._pane_info_coder_impl = PaneInfoCoderImpl() + * self._key_coder_impl = key_coder_impl # <<<<<<<<<<<<<< + * self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) + * from apache_beam.coders.coders import StrUtf8Coder +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2, __pyx_v_key_coder_impl) < (0)) __PYX_ERR(0, 973, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":974 + * self._pane_info_coder_impl = PaneInfoCoderImpl() + * self._key_coder_impl = key_coder_impl + * self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) # <<<<<<<<<<<<<< + * from apache_beam.coders.coders import StrUtf8Coder + * self._tag_coder_impl = StrUtf8Coder().get_impl() +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_window_coder_impl}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_windows_coder_impl, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":975 + * self._key_coder_impl = key_coder_impl + * self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) + * from apache_beam.coders.coders import StrUtf8Coder # <<<<<<<<<<<<<< + * self._tag_coder_impl = StrUtf8Coder().get_impl() + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StrUtf8Coder}; + __pyx_t_4 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 975, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_4; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StrUtf8Coder}; + __pyx_t_5 = 0; { + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_5]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + switch (__pyx_t_5) { + case 0: + __Pyx_INCREF(__pyx_t_2); + __pyx_v_StrUtf8Coder = __pyx_t_2; + break; + default:; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":976 + * self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) + * from apache_beam.coders.coders import StrUtf8Coder + * self._tag_coder_impl = StrUtf8Coder().get_impl() # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_v_StrUtf8Coder); + __pyx_t_8 = __pyx_v_StrUtf8Coder; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_2 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tag_coder_impl, __pyx_t_1) < (0)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":969 + * class TimerCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): # <<<<<<<<<<<<<< + * self._timestamp_coder_impl = TimestampCoderImpl() + * self._boolean_coder_impl = BooleanCoderImpl() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_StrUtf8Coder); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":978 + * self._tag_coder_impl = StrUtf8Coder().get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (userstate.Timer, create_OutputStream, bool) -> None + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_out = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 978, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 978, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 978, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 978, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 978, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 978, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, i); __PYX_ERR(0, 978, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 978, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 978, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 978, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 978, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_out = values[2]; + __pyx_v_nested = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 978, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":980 + * def encode_to_stream(self, value, out, nested): + * # type: (userstate.Timer, create_OutputStream, bool) -> None + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) # <<<<<<<<<<<<<< + * self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True) + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_user_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":981 + * # type: (userstate.Timer, create_OutputStream, bool) -> None + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) + * self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True) # <<<<<<<<<<<<<< + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tag_coder_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_dynamic_timer_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_2, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":982 + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) + * self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True) + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) # <<<<<<<<<<<<<< + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) + * if not value.clear_bit: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_windows_coder_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":983 + * self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True) + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) # <<<<<<<<<<<<<< + * if not value.clear_bit: + * self._timestamp_coder_impl.encode_to_stream( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boolean_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_clear_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":984 + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) + * if not value.clear_bit: # <<<<<<<<<<<<<< + * self._timestamp_coder_impl.encode_to_stream( + * value.fire_timestamp, out, True) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_clear_bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":985 + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) + * if not value.clear_bit: + * self._timestamp_coder_impl.encode_to_stream( # <<<<<<<<<<<<<< + * value.fire_timestamp, out, True) + * self._timestamp_coder_impl.encode_to_stream( +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_coder_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/coders/coder_impl.py":986 + * if not value.clear_bit: + * self._timestamp_coder_impl.encode_to_stream( + * value.fire_timestamp, out, True) # <<<<<<<<<<<<<< + * self._timestamp_coder_impl.encode_to_stream( + * value.hold_timestamp, out, True) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_fire_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_2, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":987 + * self._timestamp_coder_impl.encode_to_stream( + * value.fire_timestamp, out, True) + * self._timestamp_coder_impl.encode_to_stream( # <<<<<<<<<<<<<< + * value.hold_timestamp, out, True) + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_coder_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":988 + * value.fire_timestamp, out, True) + * self._timestamp_coder_impl.encode_to_stream( + * value.hold_timestamp, out, True) # <<<<<<<<<<<<<< + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_hold_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":989 + * self._timestamp_coder_impl.encode_to_stream( + * value.hold_timestamp, out, True) + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pane_info_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_paneinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":984 + * self._windows_coder_impl.encode_to_stream(value.windows, out, True) + * self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) + * if not value.clear_bit: # <<<<<<<<<<<<<< + * self._timestamp_coder_impl.encode_to_stream( + * value.fire_timestamp, out, True) +*/ + } + + /* "apache_beam/coders/coder_impl.py":978 + * self._tag_coder_impl = StrUtf8Coder().get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (userstate.Timer, create_OutputStream, bool) -> None + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":991 + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> userstate.Timer + * from apache_beam.transforms import userstate +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_in_stream = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 991, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 991, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 991, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 991, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 991, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, i); __PYX_ERR(0, 991, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 991, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 991, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 991, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_in_stream = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 991, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_v_userstate = NULL; + PyObject *__pyx_v_user_key = NULL; + PyObject *__pyx_v_dynamic_timer_tag = NULL; + PyObject *__pyx_v_windows = NULL; + PyObject *__pyx_v_clear_bit = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":993 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> userstate.Timer + * from apache_beam.transforms import userstate # <<<<<<<<<<<<<< + * user_key = self._key_coder_impl.decode_from_stream(in_stream, True) + * dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True) +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_userstate = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":994 + * # type: (create_InputStream, bool) -> userstate.Timer + * from apache_beam.transforms import userstate + * user_key = self._key_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True) + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_user_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":995 + * from apache_beam.transforms import userstate + * user_key = self._key_coder_impl.decode_from_stream(in_stream, True) + * dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tag_coder_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_dynamic_timer_tag = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":996 + * user_key = self._key_coder_impl.decode_from_stream(in_stream, True) + * dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True) + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) + * if clear_bit: +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_windows_coder_impl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_windows = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":997 + * dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True) + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * if clear_bit: + * return userstate.Timer( +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boolean_coder_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_clear_bit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":998 + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) + * if clear_bit: # <<<<<<<<<<<<<< + * return userstate.Timer( + * user_key=user_key, +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_clear_bit); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 998, __pyx_L1_error) + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":999 + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) + * if clear_bit: + * return userstate.Timer( # <<<<<<<<<<<<<< + * user_key=user_key, + * dynamic_timer_tag=dynamic_timer_tag, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_userstate; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":1006 + * fire_timestamp=None, + * hold_timestamp=None, + * paneinfo=None) # <<<<<<<<<<<<<< + * + * return userstate.Timer( +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 7 : 0)] = {__pyx_t_4, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_user_key, __pyx_v_user_key, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dynamic_timer_tag, __pyx_v_dynamic_timer_tag, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_windows, __pyx_v_windows, __pyx_t_5, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_clear_bit, __pyx_v_clear_bit, __pyx_t_5, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fire_timestamp, Py_None, __pyx_t_5, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hold_timestamp, Py_None, __pyx_t_5, __pyx_callargs+1, 5) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_paneinfo, Py_None, __pyx_t_5, __pyx_callargs+1, 6) < (0)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_Timer, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":998 + * windows = self._windows_coder_impl.decode_from_stream(in_stream, True) + * clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True) + * if clear_bit: # <<<<<<<<<<<<<< + * return userstate.Timer( + * user_key=user_key, +*/ + } + + /* "apache_beam/coders/coder_impl.py":1008 + * paneinfo=None) + * + * return userstate.Timer( # <<<<<<<<<<<<<< + * user_key=user_key, + * dynamic_timer_tag=dynamic_timer_tag, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_v_userstate; + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/coders/coder_impl.py":1013 + * windows=windows, + * clear_bit=clear_bit, + * fire_timestamp=self._timestamp_coder_impl.decode_from_stream( # <<<<<<<<<<<<<< + * in_stream, True), + * hold_timestamp=self._timestamp_coder_impl.decode_from_stream( +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_coder_impl); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_8); + + /* "apache_beam/coders/coder_impl.py":1014 + * clear_bit=clear_bit, + * fire_timestamp=self._timestamp_coder_impl.decode_from_stream( + * in_stream, True), # <<<<<<<<<<<<<< + * hold_timestamp=self._timestamp_coder_impl.decode_from_stream( + * in_stream, True), +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_in_stream, Py_True}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/coders/coder_impl.py":1015 + * fire_timestamp=self._timestamp_coder_impl.decode_from_stream( + * in_stream, True), + * hold_timestamp=self._timestamp_coder_impl.decode_from_stream( # <<<<<<<<<<<<<< + * in_stream, True), + * paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True)) +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_coder_impl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_8); + + /* "apache_beam/coders/coder_impl.py":1016 + * in_stream, True), + * hold_timestamp=self._timestamp_coder_impl.decode_from_stream( + * in_stream, True), # <<<<<<<<<<<<<< + * paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True)) + * +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_in_stream, Py_True}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + + /* "apache_beam/coders/coder_impl.py":1017 + * hold_timestamp=self._timestamp_coder_impl.decode_from_stream( + * in_stream, True), + * paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pane_info_coder_impl); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __pyx_t_11; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_in_stream, Py_True}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 7 : 0)] = {__pyx_t_5, NULL}; + __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_user_key, __pyx_v_user_key, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dynamic_timer_tag, __pyx_v_dynamic_timer_tag, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_windows, __pyx_v_windows, __pyx_t_11, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_clear_bit, __pyx_v_clear_bit, __pyx_t_11, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fire_timestamp, __pyx_t_4, __pyx_t_11, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hold_timestamp, __pyx_t_9, __pyx_t_11, __pyx_callargs+1, 5) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_paneinfo, __pyx_t_10, __pyx_t_11, __pyx_callargs+1, 6) < (0)) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_Timer, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":991 + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> userstate.Timer + * from apache_beam.transforms import userstate +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_userstate); + __Pyx_XDECREF(__pyx_v_user_key); + __Pyx_XDECREF(__pyx_v_dynamic_timer_tag); + __Pyx_XDECREF(__pyx_v_windows); + __Pyx_XDECREF(__pyx_v_clear_bit); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1027 + * + * A coder for int objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * try: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int64_t __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14[4]; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + char const *__pyx_t_17; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1029 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * try: # <<<<<<<<<<<<<< + * out.write_var_int64(value) + * except OverflowError as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":1030 + * # type: (int, create_OutputStream, bool) -> None + * try: + * out.write_var_int64(value) # <<<<<<<<<<<<<< + * except OverflowError as e: + * raise OverflowError( +*/ + __pyx_t_10 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L3_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_10, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1029 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * try: # <<<<<<<<<<<<<< + * out.write_var_int64(value) + * except OverflowError as e: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1031 + * try: + * out.write_var_int64(value) + * except OverflowError as e: # <<<<<<<<<<<<<< + * raise OverflowError( + * f"Integer value '{value}' is out of the encodable range for " +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError)))); + if (__pyx_t_11) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 1031, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_e = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":1032 + * out.write_var_int64(value) + * except OverflowError as e: + * raise OverflowError( # <<<<<<<<<<<<<< + * f"Integer value '{value}' is out of the encodable range for " + * f"VarIntCoder. This coder is limited to values that fit " +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/coders/coder_impl.py":1033 + * except OverflowError as e: + * raise OverflowError( + * f"Integer value '{value}' is out of the encodable range for " # <<<<<<<<<<<<<< + * f"VarIntCoder. This coder is limited to values that fit " + * f"within a 64-bit signed integer (-(2**63) to 2**63 - 1). " +*/ + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1033, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_12); + + /* "apache_beam/coders/coder_impl.py":1036 + * f"VarIntCoder. This coder is limited to values that fit " + * f"within a 64-bit signed integer (-(2**63) to 2**63 - 1). " + * f"Original error: {e}") from e # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1036, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Integer_value; + __pyx_t_14[1] = __pyx_t_12; + __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_is_out_of_the_encodable_range_f; + __pyx_t_14[3] = __pyx_t_13; + + /* "apache_beam/coders/coder_impl.py":1033 + * except OverflowError as e: + * raise OverflowError( + * f"Integer value '{value}' is out of the encodable range for " # <<<<<<<<<<<<<< + * f"VarIntCoder. This coder is limited to values that fit " + * f"within a 64-bit signed integer (-(2**63) to 2**63 - 1). " +*/ + __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 4, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 162 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13)); + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1033, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_15}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/coders/coder_impl.py":1036 + * f"VarIntCoder. This coder is limited to values that fit " + * f"within a 64-bit signed integer (-(2**63) to 2**63 - 1). " + * f"Original error: {e}") from e # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __Pyx_Raise(__pyx_t_5, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1032, __pyx_L14_error) + } + + /* "apache_beam/coders/coder_impl.py":1031 + * try: + * out.write_var_int64(value) + * except OverflowError as e: # <<<<<<<<<<<<<< + * raise OverflowError( + * f"Integer value '{value}' is out of the encodable range for " +*/ + /*finally:*/ { + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); + if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __pyx_t_11 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20); + __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; + goto __pyx_L5_except_error; + } + } + } + goto __pyx_L5_except_error; + + /* "apache_beam/coders/coder_impl.py":1029 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * try: # <<<<<<<<<<<<<< + * out.write_var_int64(value) + * except OverflowError as e: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":1027 + * + * A coder for int objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * try: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1027, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1027, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1027, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1027, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1027, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1027, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1027, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1027, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1027, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1027, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1038 + * f"Original error: {e}") from e + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1040 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int64() # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1038 + * f"Original error: {e}") from e + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1038, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1038, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1038, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1038, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1038, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1038, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1038, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1038, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1042 + * return in_stream.read_var_int64() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int64_t __pyx_v_ivalue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int64_t __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1043 + * + * def encode(self, value): + * ivalue = value # type cast # <<<<<<<<<<<<<< + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] +*/ + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_v_ivalue = __pyx_t_6; + + /* "apache_beam/coders/coder_impl.py":1044 + * def encode(self, value): + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): # <<<<<<<<<<<<<< + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) +*/ + __pyx_t_7 = (0 <= __pyx_v_ivalue); + if (__pyx_t_7) { + __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_small_ints; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1044, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_v_ivalue < __pyx_t_8); + } + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1045 + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] # <<<<<<<<<<<<<< + * return StreamCoderImpl.encode(self, value) + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1045, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, __pyx_v_ivalue, int64_t, 1, __Pyx_PyLong_From_int64_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1045, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1044 + * def encode(self, value): + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): # <<<<<<<<<<<<<< + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1046 + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1042 + * return in_stream.read_var_int64() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1042, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1042, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 1042, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 1042, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1042, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1042, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1048 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1049 + * + * def decode(self, encoded): + * if len(encoded) == 1: # <<<<<<<<<<<<<< + * i = ord(encoded) + * if 0 <= i < 128: +*/ + if (unlikely(__pyx_v_encoded == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1049, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyBytes_GET_SIZE(__pyx_v_encoded); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 == 1); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1050 + * def decode(self, encoded): + * if len(encoded) == 1: + * i = ord(encoded) # <<<<<<<<<<<<<< + * if 0 <= i < 128: + * return i +*/ + __pyx_t_8 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_8 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_v_i = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":1051 + * if len(encoded) == 1: + * i = ord(encoded) + * if 0 <= i < 128: # <<<<<<<<<<<<<< + * return i + * return StreamCoderImpl.decode(self, encoded) +*/ + __pyx_t_7 = (0 <= __pyx_v_i); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_i < 0x80); + } + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1052 + * i = ord(encoded) + * if 0 <= i < 128: + * return i # <<<<<<<<<<<<<< + * return StreamCoderImpl.decode(self, encoded) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1051 + * if len(encoded) == 1: + * i = ord(encoded) + * if 0 <= i < 128: # <<<<<<<<<<<<<< + * return i + * return StreamCoderImpl.decode(self, encoded) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1049 + * + * def decode(self, encoded): + * if len(encoded) == 1: # <<<<<<<<<<<<<< + * i = ord(encoded) + * if 0 <= i < 128: +*/ + } + + /* "apache_beam/coders/coder_impl.py":1053 + * if 0 <= i < 128: + * return i + * return StreamCoderImpl.decode(self, encoded) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1048 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1048, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1048, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 1048, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 1048, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1048, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1048, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1055 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13[4]; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + char const *__pyx_t_16; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1058 + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. + * try: # <<<<<<<<<<<<<< + * return get_varint_size(value) + * except OverflowError as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":1059 + * # Note that VarInts are encoded the same way regardless of nesting. + * try: + * return get_varint_size(value) # <<<<<<<<<<<<<< + * except OverflowError as e: + * raise OverflowError( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L7_try_return; + + /* "apache_beam/coders/coder_impl.py":1058 + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. + * try: # <<<<<<<<<<<<<< + * return get_varint_size(value) + * except OverflowError as e: +*/ + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1060 + * try: + * return get_varint_size(value) + * except OverflowError as e: # <<<<<<<<<<<<<< + * raise OverflowError( + * f"Cannot estimate size for integer value '{value}'. " +*/ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError)))); + if (__pyx_t_10) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1060, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_e = __pyx_t_4; + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":1061 + * return get_varint_size(value) + * except OverflowError as e: + * raise OverflowError( # <<<<<<<<<<<<<< + * f"Cannot estimate size for integer value '{value}'. " + * f"Value is out of the range for VarIntCoder (64-bit signed integer). " +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/coders/coder_impl.py":1062 + * except OverflowError as e: + * raise OverflowError( + * f"Cannot estimate size for integer value '{value}'. " # <<<<<<<<<<<<<< + * f"Value is out of the range for VarIntCoder (64-bit signed integer). " + * f"Original error: {e}") from e +*/ + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1062, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/coders/coder_impl.py":1064 + * f"Cannot estimate size for integer value '{value}'. " + * f"Value is out of the range for VarIntCoder (64-bit signed integer). " + * f"Original error: {e}") from e # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1064, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_estimate_size_for_integer; + __pyx_t_13[1] = __pyx_t_11; + __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_Value_is_out_of_the_range_for_V; + __pyx_t_13[3] = __pyx_t_12; + + /* "apache_beam/coders/coder_impl.py":1062 + * except OverflowError as e: + * raise OverflowError( + * f"Cannot estimate size for integer value '{value}'. " # <<<<<<<<<<<<<< + * f"Value is out of the range for VarIntCoder (64-bit signed integer). " + * f"Original error: {e}") from e +*/ + __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 86 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12)); + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1062, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_14}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/coders/coder_impl.py":1064 + * f"Cannot estimate size for integer value '{value}'. " + * f"Value is out of the range for VarIntCoder (64-bit signed integer). " + * f"Original error: {e}") from e # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(__pyx_t_5, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1061, __pyx_L14_error) + } + + /* "apache_beam/coders/coder_impl.py":1060 + * try: + * return get_varint_size(value) + * except OverflowError as e: # <<<<<<<<<<<<<< + * raise OverflowError( + * f"Cannot estimate size for integer value '{value}'. " +*/ + /*finally:*/ { + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); + if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __pyx_t_10 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); + __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; + __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; + goto __pyx_L5_except_error; + } + } + } + goto __pyx_L5_except_error; + + /* "apache_beam/coders/coder_impl.py":1058 + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. + * try: # <<<<<<<<<<<<<< + * return get_varint_size(value) + * except OverflowError as e: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L7_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L0; + } + + /* "apache_beam/coders/coder_impl.py":1055 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1055, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1055, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1055, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1055, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1055, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1055, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1055, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1055, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1071 + * + * A coder for int32 objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_var_int32(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1073 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * out.write_var_int32(value) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int32(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1071 + * + * A coder for int32 objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_var_int32(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1071, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1071, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1071, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1071, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1071, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1071, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1071, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1071, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1071, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1071, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1071, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1075 + * out.write_var_int32(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int32() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int32_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1077 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int32() # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int32(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1077, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1075 + * out.write_var_int32(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int32() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1075, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1075, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1075, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1075, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1075, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1075, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1075, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1075, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1075, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1079 + * return in_stream.read_var_int32() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int32_t __pyx_v_ivalue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1080 + * + * def encode(self, value): + * ivalue = value # type cast # <<<<<<<<<<<<<< + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] +*/ + __pyx_t_6 = __Pyx_PyLong_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_v_ivalue = __pyx_t_6; + + /* "apache_beam/coders/coder_impl.py":1081 + * def encode(self, value): + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): # <<<<<<<<<<<<<< + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) +*/ + __pyx_t_7 = (0 <= __pyx_v_ivalue); + if (__pyx_t_7) { + __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_small_ints; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1081, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_v_ivalue < __pyx_t_8); + } + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1082 + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] # <<<<<<<<<<<<<< + * return StreamCoderImpl.encode(self, value) + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1082, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, __pyx_v_ivalue, int32_t, 1, __Pyx_PyLong_From_int32_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1082, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1081 + * def encode(self, value): + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): # <<<<<<<<<<<<<< + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1083 + * if 0 <= ivalue < len(small_ints): + * return small_ints[ivalue] + * return StreamCoderImpl.encode(self, value) # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1079 + * return in_stream.read_var_int32() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1079, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1079, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 1079, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 1079, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1079, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1079, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1085 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1086 + * + * def decode(self, encoded): + * if len(encoded) == 1: # <<<<<<<<<<<<<< + * i = ord(encoded) + * if 0 <= i < 128: +*/ + if (unlikely(__pyx_v_encoded == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1086, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyBytes_GET_SIZE(__pyx_v_encoded); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 == 1); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1087 + * def decode(self, encoded): + * if len(encoded) == 1: + * i = ord(encoded) # <<<<<<<<<<<<<< + * if 0 <= i < 128: + * return i +*/ + __pyx_t_8 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_8 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_v_i = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":1088 + * if len(encoded) == 1: + * i = ord(encoded) + * if 0 <= i < 128: # <<<<<<<<<<<<<< + * return i + * return StreamCoderImpl.decode(self, encoded) +*/ + __pyx_t_7 = (0 <= __pyx_v_i); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_i < 0x80); + } + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1089 + * i = ord(encoded) + * if 0 <= i < 128: + * return i # <<<<<<<<<<<<<< + * return StreamCoderImpl.decode(self, encoded) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1088 + * if len(encoded) == 1: + * i = ord(encoded) + * if 0 <= i < 128: # <<<<<<<<<<<<<< + * return i + * return StreamCoderImpl.decode(self, encoded) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1086 + * + * def decode(self, encoded): + * if len(encoded) == 1: # <<<<<<<<<<<<<< + * i = ord(encoded) + * if 0 <= i < 128: +*/ + } + + /* "apache_beam/coders/coder_impl.py":1090 + * if 0 <= i < 128: + * return i + * return StreamCoderImpl.decode(self, encoded) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1085 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1085, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1085, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 1085, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 1085, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1085, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1085, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1092 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1095 + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. + * return get_varint_size(int(value) & 0xFFFFFFFF) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyNumber_And(__pyx_t_5, __pyx_mstate_global->__pyx_int_4294967295); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1092 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1092, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1092, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1092, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1092, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1092, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1092, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1092, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1092, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarInt32CoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_VarInt32CoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarInt32CoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarInt32CoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_VarInt32CoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarInt32CoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarInt32CoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarInt32CoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1102 + * + * A coder that always encodes exactly one value.""" + * def __init__(self, value): # <<<<<<<<<<<<<< + * self._value = value + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1102, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1102, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1102, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 1102, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1102, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1102, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1103 + * A coder that always encodes exactly one value.""" + * def __init__(self, value): + * self._value = value # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, stream, nested): +*/ + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->_value); + __Pyx_DECREF(__pyx_v_self->_value); + __pyx_v_self->_value = __pyx_v_value; + + /* "apache_beam/coders/coder_impl.py":1102 + * + * A coder that always encodes exactly one value.""" + * def __init__(self, value): # <<<<<<<<<<<<<< + * self._value = value + * +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1105 + * self._value = value + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * pass +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1107 + * def encode_to_stream(self, value, stream, nested): + * # type: (Any, create_OutputStream, bool) -> None + * pass # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1105 + * self._value = value + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * pass +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1105, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1105, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1105, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1105, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1105, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1105, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1105, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 1105, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1109 + * pass + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._value +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1111 + * def decode_from_stream(self, stream, nested): + * # type: (create_InputStream, bool) -> Any + * return self._value # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_value); + __pyx_r = __pyx_v_self->_value; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1109 + * pass + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._value +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1109, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1109, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1109, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1109, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1109, __pyx_L3_error) + } + __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1109, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1113 + * return self._value + * + * def encode(self, value): # <<<<<<<<<<<<<< + * b = b'' # avoid byte vs str vs unicode error + * return b +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1114 + * + * def encode(self, value): + * b = b'' # avoid byte vs str vs unicode error # <<<<<<<<<<<<<< + * return b + * +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__9); + __pyx_v_b = __pyx_mstate_global->__pyx_kp_b__9; + + /* "apache_beam/coders/coder_impl.py":1115 + * def encode(self, value): + * b = b'' # avoid byte vs str vs unicode error + * return b # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_b); + __pyx_r = __pyx_v_b; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1113 + * return self._value + * + * def encode(self, value): # <<<<<<<<<<<<<< + * b = b'' # avoid byte vs str vs unicode error + * return b +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1113, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1113, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 1113, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 1113, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1113, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1113, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1117 + * return b + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._value + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_encoded}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1118 + * + * def decode(self, encoded): + * return self._value # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_value); + __pyx_r = __pyx_v_self->_value; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1117 + * return b + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1117, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1117, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 1117, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, i); __PYX_ERR(0, 1117, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1117, __pyx_L3_error) + } + __pyx_v_encoded = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1117, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_8decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_encoded); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1120 + * return self._value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return 0 +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1122 + * def estimate_size(self, value, nested=False): + * # type: (Any, bool) -> int + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_r = __pyx_mstate_global->__pyx_int_0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1120 + * return self._value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1120, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1120, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1120, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1120, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_value); + __Pyx_GIVEREF(__pyx_v_self->_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_value) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._value is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._value is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_value != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._value is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._value is not None + * if use_setstate: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_196964917); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_196964917); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_196964917) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._value is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, None), state + * else: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_196964917); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_196964917); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_196964917) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1129 + * + * CoderImpl for coders that are comprised of several component coders.""" + * def __init__(self, coder_impls): # <<<<<<<<<<<<<< + * for c in coder_impls: + * assert isinstance(c, CoderImpl), c +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_coder_impls = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_coder_impls,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1129, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1129, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 1129, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1129, __pyx_L3_error) + } + __pyx_v_coder_impls = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1129, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_coder_impls); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impls) { + PyObject *__pyx_v_c = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1130 + * CoderImpl for coders that are comprised of several component coders.""" + * def __init__(self, coder_impls): + * for c in coder_impls: # <<<<<<<<<<<<<< + * assert isinstance(c, CoderImpl), c + * self._coder_impls = tuple(coder_impls) +*/ + if (likely(PyList_CheckExact(__pyx_v_coder_impls)) || PyTuple_CheckExact(__pyx_v_coder_impls)) { + __pyx_t_1 = __pyx_v_coder_impls; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_coder_impls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1130, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1130, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1130, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1131 + * def __init__(self, coder_impls): + * for c in coder_impls: + * assert isinstance(c, CoderImpl), c # <<<<<<<<<<<<<< + * self._coder_impls = tuple(coder_impls) + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_c, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + if (unlikely(!__pyx_t_5)) { + __pyx_t_4 = PyTuple_Pack(1, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1131, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1131, __pyx_L1_error) + #endif + + /* "apache_beam/coders/coder_impl.py":1130 + * CoderImpl for coders that are comprised of several component coders.""" + * def __init__(self, coder_impls): + * for c in coder_impls: # <<<<<<<<<<<<<< + * assert isinstance(c, CoderImpl), c + * self._coder_impls = tuple(coder_impls) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1132 + * for c in coder_impls: + * assert isinstance(c, CoderImpl), c + * self._coder_impls = tuple(coder_impls) # <<<<<<<<<<<<<< + * + * def _extract_components(self, value): +*/ + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_coder_impls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_coder_impls); + __Pyx_DECREF(__pyx_v_self->_coder_impls); + __pyx_v_self->_coder_impls = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1129 + * + * CoderImpl for coders that are comprised of several component coders.""" + * def __init__(self, coder_impls): # <<<<<<<<<<<<<< + * for c in coder_impls: + * assert isinstance(c, CoderImpl), c +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_c); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1134 + * self._coder_impls = tuple(coder_impls) + * + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_extract_components", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1135 + * + * def _extract_components(self, value): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def _construct_from_components(self, components): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1135, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1134 + * self._coder_impls = tuple(coder_impls) + * + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components = {"_extract_components", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_extract_components (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1134, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1134, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_extract_components", 0) < (0)) __PYX_ERR(0, 1134, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_extract_components", 1, 1, 1, i); __PYX_ERR(0, 1134, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1134, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_extract_components", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1134, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_extract_components", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1137 + * raise NotImplementedError + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_components, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_components", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_components}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1138 + * + * def _construct_from_components(self, components): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1138, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1137 + * raise NotImplementedError + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components = {"_construct_from_components", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_components = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_components (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1137, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1137, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_components", 0) < (0)) __PYX_ERR(0, 1137, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_components", 1, 1, 1, i); __PYX_ERR(0, 1137, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1137, __pyx_L3_error) + } + __pyx_v_components = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_components", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1137, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_components", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1140 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0; + PyObject *__pyx_v_values = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1142 + * def encode_to_stream(self, value, out, nested): + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) # <<<<<<<<<<<<<< + * if len(self._coder_impls) != len(values): + * raise ValueError('Number of components does not match number of coders.') +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_extract_components(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1143 + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) + * if len(self._coder_impls) != len(values): # <<<<<<<<<<<<<< + * raise ValueError('Number of components does not match number of coders.') + * for i in range(0, len(self._coder_impls)): +*/ + __pyx_t_1 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1143, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1143, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_t_9 = (__pyx_t_7 != __pyx_t_8); + if (unlikely(__pyx_t_9)) { + + /* "apache_beam/coders/coder_impl.py":1144 + * values = self._extract_components(value) + * if len(self._coder_impls) != len(values): + * raise ValueError('Number of components does not match number of coders.') # <<<<<<<<<<<<<< + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast +*/ + __pyx_t_2 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Number_of_components_does_not_ma}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1144, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1143 + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) + * if len(self._coder_impls) != len(values): # <<<<<<<<<<<<<< + * raise ValueError('Number of components does not match number of coders.') + * for i in range(0, len(self._coder_impls)): +*/ + } + + /* "apache_beam/coders/coder_impl.py":1145 + * if len(self._coder_impls) != len(values): + * raise ValueError('Number of components does not match number of coders.') + * for i in range(0, len(self._coder_impls)): # <<<<<<<<<<<<<< + * c = self._coder_impls[i] # type cast + * c.encode_to_stream( +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_4); + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1145, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + { + __pyx_t_1 = __pyx_t_10(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1145, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1146 + * raise ValueError('Number of components does not match number of coders.') + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast # <<<<<<<<<<<<<< + * c.encode_to_stream( + * values[i], out, nested or i + 1 < len(self._coder_impls)) +*/ + if (unlikely(__pyx_v_self->_coder_impls == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1146, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_coder_impls, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1146, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1148 + * c = self._coder_impls[i] # type cast + * c.encode_to_stream( + * values[i], out, nested or i + 1 < len(self._coder_impls)) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__pyx_v_nested) { + } else { + __pyx_t_9 = __pyx_v_nested; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_t_5 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1148, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __pyx_t_11; + __pyx_L6_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1147 + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast + * c.encode_to_stream( # <<<<<<<<<<<<<< + * values[i], out, nested or i + 1 < len(self._coder_impls)) + * +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->encode_to_stream(__pyx_v_c, __pyx_t_1, __pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1145 + * if len(self._coder_impls) != len(values): + * raise ValueError('Number of components does not match number of coders.') + * for i in range(0, len(self._coder_impls)): # <<<<<<<<<<<<<< + * c = self._coder_impls[i] # type cast + * c.encode_to_stream( +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1140 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c); + __Pyx_XDECREF(__pyx_v_values); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1140, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1140, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1140, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1140, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1140, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1140, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1140, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1140, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1140, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1140, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1150 + * values[i], out, nested or i + 1 < len(self._coder_impls)) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_8genexpr5__pyx_v_i = NULL; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_8genexpr5__pyx_v_c = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1152 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ # <<<<<<<<<<<<<< + * c.decode_from_stream( + * in_stream, nested or i + 1 < len(self._coder_impls)) +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1155 + * c.decode_from_stream( + * in_stream, nested or i + 1 < len(self._coder_impls)) + * for i, c in enumerate(self._coder_impls) # <<<<<<<<<<<<<< + * ]) + * +*/ + __pyx_t_4 = __pyx_v_self->_coder_impls; __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1155, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); + #endif + ++__pyx_t_7; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1155, __pyx_L5_error) + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_5)); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_i, __pyx_t_2); + __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1154 + * return self._construct_from_components([ + * c.decode_from_stream( + * in_stream, nested or i + 1 < len(self._coder_impls)) # <<<<<<<<<<<<<< + * for i, c in enumerate(self._coder_impls) + * ]) +*/ + if (!__pyx_v_nested) { + } else { + __pyx_t_8 = __pyx_v_nested; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_8genexpr5__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_3); + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1154, __pyx_L5_error) + } + __pyx_t_9 = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1154, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1154, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1154, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_8 = __pyx_t_11; + __pyx_L8_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1153 + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ + * c.decode_from_stream( # <<<<<<<<<<<<<< + * in_stream, nested or i + 1 < len(self._coder_impls)) + * for i, c in enumerate(self._coder_impls) +*/ + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_8genexpr5__pyx_v_c->__pyx_vtab)->decode_from_stream(__pyx_8genexpr5__pyx_v_c, __pyx_v_in_stream, __pyx_t_8, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1153, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_10); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 1152, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/coders/coder_impl.py":1155 + * c.decode_from_stream( + * in_stream, nested or i + 1 < len(self._coder_impls)) + * for i, c in enumerate(self._coder_impls) # <<<<<<<<<<<<<< + * ]) + * +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF((PyObject *)__pyx_8genexpr5__pyx_v_c); __pyx_8genexpr5__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_i); __pyx_8genexpr5__pyx_v_i = 0; + goto __pyx_L11_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF((PyObject *)__pyx_8genexpr5__pyx_v_c); __pyx_8genexpr5__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_i); __pyx_8genexpr5__pyx_v_i = 0; + goto __pyx_L1_error; + __pyx_L11_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/coders/coder_impl.py":1152 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ # <<<<<<<<<<<<<< + * c.decode_from_stream( + * in_stream, nested or i + 1 < len(self._coder_impls)) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_construct_from_components(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1150 + * values[i], out, nested or i + 1 < len(self._coder_impls)) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_i); + __Pyx_XDECREF((PyObject *)__pyx_8genexpr5__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1150, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1150, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1150, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1150, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1150, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1150, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1150, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1150, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1150, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1158 + * ]) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimated_size = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1163 + * """Estimates the encoded size of the given value, in bytes.""" + * # TODO(ccy): This ignores sizes of observable components. + * estimated_size, _ = (self.get_estimated_size_and_observables(value)) # <<<<<<<<<<<<<< + * return estimated_size + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1163, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_estimated_size = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v__ = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1164 + * # TODO(ccy): This ignores sizes of observable components. + * estimated_size, _ = (self.get_estimated_size_and_observables(value)) + * return estimated_size # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_estimated_size); + __pyx_r = __pyx_v_estimated_size; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1158 + * ]) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size, "Estimates the encoded size of the given value, in bytes."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1158, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1158, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1158, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1158, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1158, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1158, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1158, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1158, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1166 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0; + PyObject *__pyx_v_values = NULL; + PyObject *__pyx_v_estimated_size = NULL; + PyObject *__pyx_v_observables = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_child_size = NULL; + PyObject *__pyx_v_child_observables = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_t_10; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1170 + * + * """Returns estimated size of value along with any nested observables.""" + * values = self._extract_components(value) # <<<<<<<<<<<<<< + * estimated_size = 0 + * observables = [] # type: Observables +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_extract_components(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1171 + * """Returns estimated size of value along with any nested observables.""" + * values = self._extract_components(value) + * estimated_size = 0 # <<<<<<<<<<<<<< + * observables = [] # type: Observables + * for i in range(0, len(self._coder_impls)): +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_estimated_size = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1172 + * values = self._extract_components(value) + * estimated_size = 0 + * observables = [] # type: Observables # <<<<<<<<<<<<<< + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_observables = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1173 + * estimated_size = 0 + * observables = [] # type: Observables + * for i in range(0, len(self._coder_impls)): # <<<<<<<<<<<<<< + * c = self._coder_impls[i] # type cast + * child_size, child_observables = ( +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_4); + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1173, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + { + __pyx_t_1 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1173, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1174 + * observables = [] # type: Observables + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast # <<<<<<<<<<<<<< + * child_size, child_observables = ( + * c.get_estimated_size_and_observables( +*/ + if (unlikely(__pyx_v_self->_coder_impls == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1174, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_coder_impls, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1177 + * child_size, child_observables = ( + * c.get_estimated_size_and_observables( + * values[i], nested=nested or i + 1 < len(self._coder_impls))) # <<<<<<<<<<<<<< + * estimated_size += child_size + * observables += child_observables +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__pyx_v_nested) { + } else { + __pyx_t_9 = __pyx_v_nested; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __pyx_v_self->_coder_impls; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_t_5 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1177, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __pyx_t_10; + __pyx_L5_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1176 + * c = self._coder_impls[i] # type cast + * child_size, child_observables = ( + * c.get_estimated_size_and_observables( # <<<<<<<<<<<<<< + * values[i], nested=nested or i + 1 < len(self._coder_impls))) + * estimated_size += child_size +*/ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.nested = __pyx_t_9; + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_c, __pyx_t_1, 0, &__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1175, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); + index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + + /* "apache_beam/coders/coder_impl.py":1175 + * for i in range(0, len(self._coder_impls)): + * c = self._coder_impls[i] # type cast + * child_size, child_observables = ( # <<<<<<<<<<<<<< + * c.get_estimated_size_and_observables( + * values[i], nested=nested or i + 1 < len(self._coder_impls))) +*/ + __Pyx_XDECREF_SET(__pyx_v_child_size, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_child_observables, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1178 + * c.get_estimated_size_and_observables( + * values[i], nested=nested or i + 1 < len(self._coder_impls))) + * estimated_size += child_size # <<<<<<<<<<<<<< + * observables += child_observables + * return estimated_size, observables +*/ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_child_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1179 + * values[i], nested=nested or i + 1 < len(self._coder_impls))) + * estimated_size += child_size + * observables += child_observables # <<<<<<<<<<<<<< + * return estimated_size, observables + * +*/ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_child_observables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1173 + * estimated_size = 0 + * observables = [] # type: Observables + * for i in range(0, len(self._coder_impls)): # <<<<<<<<<<<<<< + * c = self._coder_impls[i] # type cast + * child_size, child_observables = ( +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1180 + * estimated_size += child_size + * observables += child_observables + * return estimated_size, observables # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_estimated_size); + __Pyx_GIVEREF(__pyx_v_estimated_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_estimated_size) != (0)) __PYX_ERR(0, 1180, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_observables); + __Pyx_GIVEREF(__pyx_v_observables); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_observables) != (0)) __PYX_ERR(0, 1180, __pyx_L1_error); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1166 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c); + __Pyx_XDECREF(__pyx_v_values); + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v_observables); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_child_size); + __Pyx_XDECREF(__pyx_v_child_observables); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables, "Returns estimated size of value along with any nested observables."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1166, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1166, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1166, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 1166, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 1166, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1166, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1166, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1166, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._coder_impls,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_coder_impls); + __Pyx_GIVEREF(__pyx_v_self->_coder_impls); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_coder_impls) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._coder_impls is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._coder_impls is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_coder_impls != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._coder_impls is not None + * if use_setstate: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_264067927); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_264067927); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_264067927) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, None), state + * else: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_264067927); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_264067927); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_264067927) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1185 + * class AvroCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): # <<<<<<<<<<<<<< + * self.parsed_schema = parse_schema(json.loads(schema)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_schema = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_schema,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1185, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1185, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1185, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1185, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1185, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1185, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1185, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_schema = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1185, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_schema); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1186 + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): + * self.parsed_schema = parse_schema(json.loads(schema)) # <<<<<<<<<<<<<< + * + * def encode(self, value): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_parse_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_json); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_schema}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_parsed_schema, __pyx_t_1) < (0)) __PYX_ERR(0, 1186, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1185 + * class AvroCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): # <<<<<<<<<<<<<< + * self.parsed_schema = parse_schema(json.loads(schema)) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1188 + * self.parsed_schema = parse_schema(json.loads(schema)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1188, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1188, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1188, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 1188, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, i); __PYX_ERR(0, 1188, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1188, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1188, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1188, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_v_buf = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode", 0); + + /* "apache_beam/coders/coder_impl.py":1189 + * + * def encode(self, value): + * assert issubclass(type(value), AvroRecord) # <<<<<<<<<<<<<< + * with BytesIO() as buf: + * schemaless_writer(buf, self.parsed_schema, value.record) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AvroRecord); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsSubclass(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1189, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1189, __pyx_L1_error) + #endif + + /* "apache_beam/coders/coder_impl.py":1190 + * def encode(self, value): + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: # <<<<<<<<<<<<<< + * schemaless_writer(buf, self.parsed_schema, value.record) + * return buf.getvalue() +*/ + /*with:*/ { + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BytesIO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = NULL; + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1190, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_7 = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + __pyx_v_buf = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/coders/coder_impl.py":1191 + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: + * schemaless_writer(buf, self.parsed_schema, value.record) # <<<<<<<<<<<<<< + * return buf.getvalue() + * +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_schemaless_writer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_parsed_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1191, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_record); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1191, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_buf, __pyx_t_3, __pyx_t_11}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1191, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/coders/coder_impl.py":1192 + * with BytesIO() as buf: + * schemaless_writer(buf, self.parsed_schema, value.record) + * return buf.getvalue() # <<<<<<<<<<<<<< + * + * def decode(self, encoded): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_buf; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getvalue, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1192, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/coders/coder_impl.py":1190 + * def encode(self, value): + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: # <<<<<<<<<<<<<< + * schemaless_writer(buf, self.parsed_schema, value.record) + * return buf.getvalue() +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_11) < 0) __PYX_ERR(0, 1190, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1190, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_2 < (0)) __PYX_ERR(0, 1190, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_2); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_11); + __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; + __PYX_ERR(0, 1190, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_10 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/coders/coder_impl.py":1188 + * self.parsed_schema = parse_schema(json.loads(schema)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1194 + * return buf.getvalue() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * with BytesIO(encoded) as buf: + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode = {"decode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1194, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode", 0) < (0)) __PYX_ERR(0, 1194, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, i); __PYX_ERR(0, 1194, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1194, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1194, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_encoded = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1194, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_encoded); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) { + PyObject *__pyx_v_buf = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode", 0); + + /* "apache_beam/coders/coder_impl.py":1195 + * + * def decode(self, encoded): + * with BytesIO(encoded) as buf: # <<<<<<<<<<<<<< + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) + * +*/ + /*with:*/ { + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BytesIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_encoded}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = NULL; + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1195, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_6 = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + __pyx_v_buf = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":1196 + * def decode(self, encoded): + * with BytesIO(encoded) as buf: + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AvroRecord); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schemaless_reader); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1196, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_parsed_schema); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1196, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_10); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_buf, __pyx_t_12}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/coders/coder_impl.py":1195 + * + * def decode(self, encoded): + * with BytesIO(encoded) as buf: # <<<<<<<<<<<<<< + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) + * +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1195, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1195, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_14 < (0)) __PYX_ERR(0, 1195, __pyx_L9_except_error) + __pyx_t_15 = (!__pyx_t_14); + if (unlikely(__pyx_t_15)) { + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_3, __pyx_t_2); + __pyx_t_6 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 1195, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_5) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2], NULL); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_9 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_5) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2], NULL); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/coders/coder_impl.py":1194 + * return buf.getvalue() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * with BytesIO(encoded) as buf: + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1201 + * class TupleCoderImpl(AbstractComponentCoderImpl): + * """A coder for tuple objects.""" + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * return tuple(value) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_extract_components", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1202 + * """A coder for tuple objects.""" + * def _extract_components(self, value): + * return tuple(value) # <<<<<<<<<<<<<< + * + * def _construct_from_components(self, components): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1201 + * class TupleCoderImpl(AbstractComponentCoderImpl): + * """A coder for tuple objects.""" + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * return tuple(value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components = {"_extract_components", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_extract_components (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1201, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1201, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_extract_components", 0) < (0)) __PYX_ERR(0, 1201, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_extract_components", 1, 1, 1, i); __PYX_ERR(0, 1201, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1201, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_extract_components", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1201, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_extract_components", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1204 + * return tuple(value) + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_components", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_components}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1205 + * + * def _construct_from_components(self, components): + * return tuple(components) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1204 + * return tuple(value) + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components = {"_construct_from_components", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_components = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_components (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1204, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_components", 0) < (0)) __PYX_ERR(0, 1204, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_components", 1, 1, 1, i); __PYX_ERR(0, 1204, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1204, __pyx_L3_error) + } + __pyx_v_components = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_components", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1204, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_components", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._coder_impls,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base._coder_impls); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._coder_impls); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._coder_impls) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._coder_impls is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._coder_impls,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._coder_impls is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->__pyx_base._coder_impls != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._coder_impls is not None + * if use_setstate: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_264067927); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_264067927); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_264067927) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, None), state + * else: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_264067927); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_264067927); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_264067927) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1209 + * + * class _ConcatSequence(object): + * def __init__(self, head, tail): # <<<<<<<<<<<<<< + * # type: (Iterable[Any], Iterable[Any]) -> None + * self._head = head +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_head = 0; + PyObject *__pyx_v_tail = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_head,&__pyx_mstate_global->__pyx_n_u_tail,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1209, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1209, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1209, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1209, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_head = values[1]; + __pyx_v_tail = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(__pyx_self, __pyx_v_self, __pyx_v_head, __pyx_v_tail); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_head, PyObject *__pyx_v_tail) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1211 + * def __init__(self, head, tail): + * # type: (Iterable[Any], Iterable[Any]) -> None + * self._head = head # <<<<<<<<<<<<<< + * self._tail = tail + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_head_2, __pyx_v_head) < (0)) __PYX_ERR(0, 1211, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1212 + * # type: (Iterable[Any], Iterable[Any]) -> None + * self._head = head + * self._tail = tail # <<<<<<<<<<<<<< + * + * def __iter__(self): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tail_2, __pyx_v_tail) < (0)) __PYX_ERR(0, 1212, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1209 + * + * class _ConcatSequence(object): + * def __init__(self, head, tail): # <<<<<<<<<<<<<< + * # type: (Iterable[Any], Iterable[Any]) -> None + * self._head = head +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":1214 + * self._tail = tail + * + * def __iter__(self): # <<<<<<<<<<<<<< + * # type: () -> Iterator[Any] + * for elem in self._head: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1214, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1214, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__iter__", 0) < (0)) __PYX_ERR(0, 1214, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 1214, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1214, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1214, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__iter__", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1214, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_iter, __pyx_mstate_global->__pyx_n_u_ConcatSequence___iter, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + case 2: goto __pyx_L10_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 1214, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":1216 + * def __iter__(self): + * # type: () -> Iterator[Any] + * for elem in self._head: # <<<<<<<<<<<<<< + * yield elem + * for elem in self._tail: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_head_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1216, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1216, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1216, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elem); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elem, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1217 + * # type: () -> Iterator[Any] + * for elem in self._head: + * yield elem # <<<<<<<<<<<<<< + * for elem in self._tail: + * yield elem +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); + __pyx_r = __pyx_cur_scope->__pyx_v_elem; + __Pyx_XGIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1217, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1216 + * def __iter__(self): + * # type: () -> Iterator[Any] + * for elem in self._head: # <<<<<<<<<<<<<< + * yield elem + * for elem in self._tail: +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1218 + * for elem in self._head: + * yield elem + * for elem in self._tail: # <<<<<<<<<<<<<< + * yield elem + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_tail_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1218, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1218, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_4(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1218, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elem); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elem, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1219 + * yield elem + * for elem in self._tail: + * yield elem # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem); + __pyx_r = __pyx_cur_scope->__pyx_v_elem; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 2; + return __pyx_r; + __pyx_L10_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1219, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1218 + * for elem in self._head: + * yield elem + * for elem in self._tail: # <<<<<<<<<<<<<< + * yield elem + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/coders/coder_impl.py":1214 + * self._tail = tail + * + * def __iter__(self): # <<<<<<<<<<<<<< + * # type: () -> Iterator[Any] + * for elem in self._head: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1221 + * yield elem + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return list(self) == list(other) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1221, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 1221, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 1221, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1221, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/coders/coder_impl.py":1222 + * + * def __eq__(self, other): + * return list(self) == list(other) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PySequence_List(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1221 + * yield elem + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return list(self) == list(other) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1224 + * return list(self) == list(other) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1224, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1224, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 1224, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 1224, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1224, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1224, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/coders/coder_impl.py":1225 + * + * def __hash__(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1225, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1224 + * return list(self) == list(other) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1227 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return list, (list(self), ) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1227, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1227, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce__", 0) < (0)) __PYX_ERR(0, 1227, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, i); __PYX_ERR(0, 1227, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1227, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1227, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/coders/coder_impl.py":1228 + * + * def __reduce__(self): + * return list, (list(self), ) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1228, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)(&PyList_Type)); + __Pyx_GIVEREF((PyObject *)(&PyList_Type)); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyList_Type))) != (0)) __PYX_ERR(0, 1228, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1228, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1227 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return list, (list(self), ) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1270 + * _DEFAULT_BUFFER_SIZE = 64 * 1024 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * elem_coder, # type: CoderImpl +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_elem_coder = 0; + PyObject *__pyx_v_read_state = 0; + PyObject *__pyx_v_write_state = 0; + PyObject *__pyx_v_write_state_threshold = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elem_coder,&__pyx_mstate_global->__pyx_n_u_read_state,&__pyx_mstate_global->__pyx_n_u_write_state,&__pyx_mstate_global->__pyx_n_u_write_state_threshold,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1270, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1270, __pyx_L3_error) + + /* "apache_beam/coders/coder_impl.py":1273 + * self, + * elem_coder, # type: CoderImpl + * read_state=None, # type: Optional[IterableStateReader] # <<<<<<<<<<<<<< + * write_state=None, # type: Optional[IterableStateWriter] + * write_state_threshold=0 # type: int +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/coders/coder_impl.py":1274 + * elem_coder, # type: CoderImpl + * read_state=None, # type: Optional[IterableStateReader] + * write_state=None, # type: Optional[IterableStateWriter] # <<<<<<<<<<<<<< + * write_state_threshold=0 # type: int + * ): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, i); __PYX_ERR(0, 1270, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1270, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/coders/coder_impl.py":1273 + * self, + * elem_coder, # type: CoderImpl + * read_state=None, # type: Optional[IterableStateReader] # <<<<<<<<<<<<<< + * write_state=None, # type: Optional[IterableStateWriter] + * write_state_threshold=0 # type: int +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/coders/coder_impl.py":1274 + * elem_coder, # type: CoderImpl + * read_state=None, # type: Optional[IterableStateReader] + * write_state=None, # type: Optional[IterableStateWriter] # <<<<<<<<<<<<<< + * write_state_threshold=0 # type: int + * ): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + } + __pyx_v_elem_coder = values[0]; + __pyx_v_read_state = values[1]; + __pyx_v_write_state = values[2]; + __pyx_v_write_state_threshold = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1270, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_elem_coder, __pyx_v_read_state, __pyx_v_write_state, __pyx_v_write_state_threshold); + + /* "apache_beam/coders/coder_impl.py":1270 + * _DEFAULT_BUFFER_SIZE = 64 * 1024 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * elem_coder, # type: CoderImpl +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_elem_coder, PyObject *__pyx_v_read_state, PyObject *__pyx_v_write_state, PyObject *__pyx_v_write_state_threshold) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1277 + * write_state_threshold=0 # type: int + * ): + * self._elem_coder = elem_coder # <<<<<<<<<<<<<< + * self._read_state = read_state + * self._write_state = write_state +*/ + __pyx_t_1 = __pyx_v_elem_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1277, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_elem_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_elem_coder); + __pyx_v_self->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1278 + * ): + * self._elem_coder = elem_coder + * self._read_state = read_state # <<<<<<<<<<<<<< + * self._write_state = write_state + * self._write_state_threshold = write_state_threshold +*/ + __Pyx_INCREF(__pyx_v_read_state); + __Pyx_GIVEREF(__pyx_v_read_state); + __Pyx_GOTREF(__pyx_v_self->_read_state); + __Pyx_DECREF(__pyx_v_self->_read_state); + __pyx_v_self->_read_state = __pyx_v_read_state; + + /* "apache_beam/coders/coder_impl.py":1279 + * self._elem_coder = elem_coder + * self._read_state = read_state + * self._write_state = write_state # <<<<<<<<<<<<<< + * self._write_state_threshold = write_state_threshold + * +*/ + __Pyx_INCREF(__pyx_v_write_state); + __Pyx_GIVEREF(__pyx_v_write_state); + __Pyx_GOTREF(__pyx_v_self->_write_state); + __Pyx_DECREF(__pyx_v_self->_write_state); + __pyx_v_self->_write_state = __pyx_v_write_state; + + /* "apache_beam/coders/coder_impl.py":1280 + * self._read_state = read_state + * self._write_state = write_state + * self._write_state_threshold = write_state_threshold # <<<<<<<<<<<<<< + * + * def _construct_from_sequence(self, values): +*/ + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_write_state_threshold); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_v_self->_write_state_threshold = __pyx_t_2; + + /* "apache_beam/coders/coder_impl.py":1270 + * _DEFAULT_BUFFER_SIZE = 64 * 1024 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * elem_coder, # type: CoderImpl +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1282 + * self._write_state_threshold = write_state_threshold + * + * def _construct_from_sequence(self, values): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_values}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1283 + * + * def _construct_from_sequence(self, values): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1283, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1282 + * self._write_state_threshold = write_state_threshold + * + * def _construct_from_sequence(self, values): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_values = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1282, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_sequence", 0) < (0)) __PYX_ERR(0, 1282, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, i); __PYX_ERR(0, 1282, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error) + } + __pyx_v_values = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1282, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_values); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_values) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_values, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1285 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Sequence, create_OutputStream, bool) -> None + * # Compatible with Java's IterableLikeCoder. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_buffer = 0; + int64_t __pyx_v_target_buffer_size; + int64_t __pyx_v_index; + int64_t __pyx_v_prev_index; + PyObject *__pyx_v_elem = NULL; + PyObject *__pyx_v_value_iter = NULL; + PyObject *__pyx_v_start_size = NULL; + PyObject *__pyx_v_tail = NULL; + PyObject *__pyx_v_state_token = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + int64_t __pyx_t_11; + int __pyx_t_12; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1288 + * # type: (Sequence, create_OutputStream, bool) -> None + * # Compatible with Java's IterableLikeCoder. + * if hasattr(value, '__len__') and self._write_state is None: # <<<<<<<<<<<<<< + * out.write_bigendian_int32(len(value)) + * for elem in value: +*/ + __pyx_t_8 = __Pyx_HasAttr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error) + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->_write_state == Py_None); + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1289 + * # Compatible with Java's IterableLikeCoder. + * if hasattr(value, '__len__') and self._write_state is None: + * out.write_bigendian_int32(len(value)) # <<<<<<<<<<<<<< + * for elem in value: + * self._elem_coder.encode_to_stream(elem, out, True) +*/ + __pyx_t_9 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1290 + * if hasattr(value, '__len__') and self._write_state is None: + * out.write_bigendian_int32(len(value)) + * for elem in value: # <<<<<<<<<<<<<< + * self._elem_coder.encode_to_stream(elem, out, True) + * else: +*/ + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { + __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); + __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1290, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1290, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1290, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_10(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1290, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1291 + * out.write_bigendian_int32(len(value)) + * for elem in value: + * self._elem_coder.encode_to_stream(elem, out, True) # <<<<<<<<<<<<<< + * else: + * # We don't know the size without traversing it so use a fixed size buffer +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_elem_coder, __pyx_v_elem, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1290 + * if hasattr(value, '__len__') and self._write_state is None: + * out.write_bigendian_int32(len(value)) + * for elem in value: # <<<<<<<<<<<<<< + * self._elem_coder.encode_to_stream(elem, out, True) + * else: +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1288 + * # type: (Sequence, create_OutputStream, bool) -> None + * # Compatible with Java's IterableLikeCoder. + * if hasattr(value, '__len__') and self._write_state is None: # <<<<<<<<<<<<<< + * out.write_bigendian_int32(len(value)) + * for elem in value: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1298 + * + * # -1 to indicate that the length is not known. + * out.write_bigendian_int32(-1) # <<<<<<<<<<<<<< + * buffer = create_OutputStream() + * if self._write_state is None: +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, -1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1299 + * # -1 to indicate that the length is not known. + * out.write_bigendian_int32(-1) + * buffer = create_OutputStream() # <<<<<<<<<<<<<< + * if self._write_state is None: + * target_buffer_size = self._DEFAULT_BUFFER_SIZE +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_v_buffer = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1300 + * out.write_bigendian_int32(-1) + * buffer = create_OutputStream() + * if self._write_state is None: # <<<<<<<<<<<<<< + * target_buffer_size = self._DEFAULT_BUFFER_SIZE + * else: +*/ + __pyx_t_7 = (__pyx_v_self->_write_state == Py_None); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1301 + * buffer = create_OutputStream() + * if self._write_state is None: + * target_buffer_size = self._DEFAULT_BUFFER_SIZE # <<<<<<<<<<<<<< + * else: + * target_buffer_size = min( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_target_buffer_size = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":1300 + * out.write_bigendian_int32(-1) + * buffer = create_OutputStream() + * if self._write_state is None: # <<<<<<<<<<<<<< + * target_buffer_size = self._DEFAULT_BUFFER_SIZE + * else: +*/ + goto __pyx_L9; + } + + /* "apache_beam/coders/coder_impl.py":1303 + * target_buffer_size = self._DEFAULT_BUFFER_SIZE + * else: + * target_buffer_size = min( # <<<<<<<<<<<<<< + * self._DEFAULT_BUFFER_SIZE, self._write_state_threshold) + * prev_index = index = -1 +*/ + /*else*/ { + + /* "apache_beam/coders/coder_impl.py":1304 + * else: + * target_buffer_size = min( + * self._DEFAULT_BUFFER_SIZE, self._write_state_threshold) # <<<<<<<<<<<<<< + * prev_index = index = -1 + * # Don't want to miss out on fast list iteration optimization. +*/ + __pyx_t_12 = __pyx_v_self->_write_state_threshold; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_target_buffer_size = __pyx_t_11; + } + __pyx_L9:; + + /* "apache_beam/coders/coder_impl.py":1305 + * target_buffer_size = min( + * self._DEFAULT_BUFFER_SIZE, self._write_state_threshold) + * prev_index = index = -1 # <<<<<<<<<<<<<< + * # Don't want to miss out on fast list iteration optimization. + * value_iter = value if isinstance(value, (list, tuple)) else iter(value) +*/ + __pyx_v_prev_index = -1L; + __pyx_v_index = -1L; + + /* "apache_beam/coders/coder_impl.py":1307 + * prev_index = index = -1 + * # Don't want to miss out on fast list iteration optimization. + * value_iter = value if isinstance(value, (list, tuple)) else iter(value) # <<<<<<<<<<<<<< + * start_size = out.size() + * for elem in value_iter: +*/ + __pyx_t_8 = PyList_Check(__pyx_v_value); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_8 = PyTuple_Check(__pyx_v_value); + __pyx_t_7 = __pyx_t_8; + __pyx_L10_bool_binop_done:; + if (__pyx_t_7) { + __Pyx_INCREF(__pyx_v_value); + __pyx_t_4 = __pyx_v_value; + } else { + __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_v_value_iter = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1308 + * # Don't want to miss out on fast list iteration optimization. + * value_iter = value if isinstance(value, (list, tuple)) else iter(value) + * start_size = out.size() # <<<<<<<<<<<<<< + * for elem in value_iter: + * index += 1 +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->size(__pyx_v_out, 0); if (unlikely(__pyx_t_6 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_FromSize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_start_size = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1309 + * value_iter = value if isinstance(value, (list, tuple)) else iter(value) + * start_size = out.size() + * for elem in value_iter: # <<<<<<<<<<<<<< + * index += 1 + * self._elem_coder.encode_to_stream(elem, buffer, True) +*/ + if (likely(PyList_CheckExact(__pyx_v_value_iter)) || PyTuple_CheckExact(__pyx_v_value_iter)) { + __pyx_t_4 = __pyx_v_value_iter; __Pyx_INCREF(__pyx_t_4); + __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value_iter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1309, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1309, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1309, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_10(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1309, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1310 + * start_size = out.size() + * for elem in value_iter: + * index += 1 # <<<<<<<<<<<<<< + * self._elem_coder.encode_to_stream(elem, buffer, True) + * if buffer.size() > target_buffer_size: +*/ + __pyx_v_index = (__pyx_v_index + 1); + + /* "apache_beam/coders/coder_impl.py":1311 + * for elem in value_iter: + * index += 1 + * self._elem_coder.encode_to_stream(elem, buffer, True) # <<<<<<<<<<<<<< + * if buffer.size() > target_buffer_size: + * out.write_var_int64(index - prev_index) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_elem_coder, __pyx_v_elem, __pyx_v_buffer, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1312 + * index += 1 + * self._elem_coder.encode_to_stream(elem, buffer, True) + * if buffer.size() > target_buffer_size: # <<<<<<<<<<<<<< + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->size(__pyx_v_buffer, 0); if (unlikely(__pyx_t_6 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 > __pyx_v_target_buffer_size); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1313 + * self._elem_coder.encode_to_stream(elem, buffer, True) + * if buffer.size() > target_buffer_size: + * out.write_var_int64(index - prev_index) # <<<<<<<<<<<<<< + * out.write(buffer.get()) + * prev_index = index +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, (__pyx_v_index - __pyx_v_prev_index), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1314 + * if buffer.size() > target_buffer_size: + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) # <<<<<<<<<<<<<< + * prev_index = index + * buffer = create_OutputStream() +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->get(__pyx_v_buffer, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1315 + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) + * prev_index = index # <<<<<<<<<<<<<< + * buffer = create_OutputStream() + * if (self._write_state is not None and +*/ + __pyx_v_prev_index = __pyx_v_index; + + /* "apache_beam/coders/coder_impl.py":1316 + * out.write(buffer.get()) + * prev_index = index + * buffer = create_OutputStream() # <<<<<<<<<<<<<< + * if (self._write_state is not None and + * out.size() - start_size > self._write_state_threshold): +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1316, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_buffer, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1317 + * prev_index = index + * buffer = create_OutputStream() + * if (self._write_state is not None and # <<<<<<<<<<<<<< + * out.size() - start_size > self._write_state_threshold): + * tail = ( +*/ + __pyx_t_8 = (__pyx_v_self->_write_state != Py_None); + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L16_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":1318 + * buffer = create_OutputStream() + * if (self._write_state is not None and + * out.size() - start_size > self._write_state_threshold): # <<<<<<<<<<<<<< + * tail = ( + * value_iter[index + +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->size(__pyx_v_out, 0); if (unlikely(__pyx_t_6 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_v_start_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_self->_write_state_threshold); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_L16_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1317 + * prev_index = index + * buffer = create_OutputStream() + * if (self._write_state is not None and # <<<<<<<<<<<<<< + * out.size() - start_size > self._write_state_threshold): + * tail = ( +*/ + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1322 + * value_iter[index + + * 1:] if isinstance(value_iter, + * (list, tuple)) else value_iter) # <<<<<<<<<<<<<< + * state_token = self._write_state(tail, self._elem_coder) + * out.write_var_int64(-1) +*/ + __pyx_t_8 = PyList_Check(__pyx_v_value_iter); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L18_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":1321 + * tail = ( + * value_iter[index + + * 1:] if isinstance(value_iter, # <<<<<<<<<<<<<< + * (list, tuple)) else value_iter) + * state_token = self._write_state(tail, self._elem_coder) +*/ + __pyx_t_8 = PyTuple_Check(__pyx_v_value_iter); + __pyx_t_7 = __pyx_t_8; + __pyx_L18_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1320 + * out.size() - start_size > self._write_state_threshold): + * tail = ( + * value_iter[index + # <<<<<<<<<<<<<< + * 1:] if isinstance(value_iter, + * (list, tuple)) else value_iter) +*/ + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_value_iter, (__pyx_v_index + 1), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + + /* "apache_beam/coders/coder_impl.py":1322 + * value_iter[index + + * 1:] if isinstance(value_iter, + * (list, tuple)) else value_iter) # <<<<<<<<<<<<<< + * state_token = self._write_state(tail, self._elem_coder) + * out.write_var_int64(-1) +*/ + __Pyx_INCREF(__pyx_v_value_iter); + __pyx_t_1 = __pyx_v_value_iter; + } + __pyx_v_tail = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1323 + * 1:] if isinstance(value_iter, + * (list, tuple)) else value_iter) + * state_token = self._write_state(tail, self._elem_coder) # <<<<<<<<<<<<<< + * out.write_var_int64(-1) + * out.write(state_token, True) +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_self->_write_state); + __pyx_t_2 = __pyx_v_self->_write_state; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_tail, ((PyObject *)__pyx_v_self->_elem_coder)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_state_token = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1324 + * (list, tuple)) else value_iter) + * state_token = self._write_state(tail, self._elem_coder) + * out.write_var_int64(-1) # <<<<<<<<<<<<<< + * out.write(state_token, True) + * break +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1325 + * state_token = self._write_state(tail, self._elem_coder) + * out.write_var_int64(-1) + * out.write(state_token, True) # <<<<<<<<<<<<<< + * break + * else: +*/ + __pyx_t_1 = __pyx_v_state_token; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.nested = 1; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_1), 0, &__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1326 + * out.write_var_int64(-1) + * out.write(state_token, True) + * break # <<<<<<<<<<<<<< + * else: + * if index > prev_index: +*/ + goto __pyx_L13_break; + + /* "apache_beam/coders/coder_impl.py":1317 + * prev_index = index + * buffer = create_OutputStream() + * if (self._write_state is not None and # <<<<<<<<<<<<<< + * out.size() - start_size > self._write_state_threshold): + * tail = ( +*/ + } + + /* "apache_beam/coders/coder_impl.py":1312 + * index += 1 + * self._elem_coder.encode_to_stream(elem, buffer, True) + * if buffer.size() > target_buffer_size: # <<<<<<<<<<<<<< + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1309 + * value_iter = value if isinstance(value, (list, tuple)) else iter(value) + * start_size = out.size() + * for elem in value_iter: # <<<<<<<<<<<<<< + * index += 1 + * self._elem_coder.encode_to_stream(elem, buffer, True) +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L20_for_else; + __pyx_L13_break:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L21_for_end; + /*else*/ { + __pyx_L20_for_else:; + + /* "apache_beam/coders/coder_impl.py":1328 + * break + * else: + * if index > prev_index: # <<<<<<<<<<<<<< + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) +*/ + __pyx_t_7 = (__pyx_v_index > __pyx_v_prev_index); + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1329 + * else: + * if index > prev_index: + * out.write_var_int64(index - prev_index) # <<<<<<<<<<<<<< + * out.write(buffer.get()) + * out.write_var_int64(0) +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, (__pyx_v_index - __pyx_v_prev_index), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1330 + * if index > prev_index: + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) # <<<<<<<<<<<<<< + * out.write_var_int64(0) + * +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->get(__pyx_v_buffer, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_4), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1328 + * break + * else: + * if index > prev_index: # <<<<<<<<<<<<<< + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1331 + * out.write_var_int64(index - prev_index) + * out.write(buffer.get()) + * out.write_var_int64(0) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L21_for_end:; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1285 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Sequence, create_OutputStream, bool) -> None + * # Compatible with Java's IterableLikeCoder. +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_buffer); + __Pyx_XDECREF(__pyx_v_elem); + __Pyx_XDECREF(__pyx_v_value_iter); + __Pyx_XDECREF(__pyx_v_start_size); + __Pyx_XDECREF(__pyx_v_tail); + __Pyx_XDECREF(__pyx_v_state_token); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1285, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1285, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1285, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1285, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1285, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1285, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1285, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1285, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1333 + * out.write_var_int64(0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Sequence + * size = in_stream.read_bigendian_int32() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int32_t __pyx_v_size; + PyObject *__pyx_v_elements = NULL; + int64_t __pyx_v_count; + CYTHON_UNUSED int64_t __pyx_v__; + PyObject *__pyx_v_state_token = NULL; + CYTHON_UNUSED int32_t __pyx_8genexpr6__pyx_v__; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int32_t __pyx_t_7; + int __pyx_t_8; + int32_t __pyx_t_9; + int32_t __pyx_t_10; + int64_t __pyx_t_11; + int64_t __pyx_t_12; + int64_t __pyx_t_13; + int __pyx_t_14; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1335 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> Sequence + * size = in_stream.read_bigendian_int32() # <<<<<<<<<<<<<< + * + * if size >= 0: +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int32(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_v_size = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1337 + * size = in_stream.read_bigendian_int32() + * + * if size >= 0: # <<<<<<<<<<<<<< + * elements = [ + * self._elem_coder.decode_from_stream(in_stream, True) +*/ + __pyx_t_8 = (__pyx_v_size >= 0); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1338 + * + * if size >= 0: + * elements = [ # <<<<<<<<<<<<<< + * self._elem_coder.decode_from_stream(in_stream, True) + * for _ in range(size) +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/coders/coder_impl.py":1340 + * elements = [ + * self._elem_coder.decode_from_stream(in_stream, True) + * for _ in range(size) # <<<<<<<<<<<<<< + * ] # type: Iterable[Any] + * else: +*/ + __pyx_t_7 = __pyx_v_size; + __pyx_t_9 = __pyx_t_7; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_8genexpr6__pyx_v__ = __pyx_t_10; + + /* "apache_beam/coders/coder_impl.py":1339 + * if size >= 0: + * elements = [ + * self._elem_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * for _ in range(size) + * ] # type: Iterable[Any] +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_elem_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } /* exit inner scope */ + __pyx_v_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1337 + * size = in_stream.read_bigendian_int32() + * + * if size >= 0: # <<<<<<<<<<<<<< + * elements = [ + * self._elem_coder.decode_from_stream(in_stream, True) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1343 + * ] # type: Iterable[Any] + * else: + * elements = [] # <<<<<<<<<<<<<< + * count = in_stream.read_var_int64() + * while count > 0: +*/ + /*else*/ { + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1344 + * else: + * elements = [] + * count = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * while count > 0: + * for _ in range(count): +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_v_count = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":1345 + * elements = [] + * count = in_stream.read_var_int64() + * while count > 0: # <<<<<<<<<<<<<< + * for _ in range(count): + * elements.append(self._elem_coder.decode_from_stream(in_stream, True)) +*/ + while (1) { + __pyx_t_8 = (__pyx_v_count > 0); + if (!__pyx_t_8) break; + + /* "apache_beam/coders/coder_impl.py":1346 + * count = in_stream.read_var_int64() + * while count > 0: + * for _ in range(count): # <<<<<<<<<<<<<< + * elements.append(self._elem_coder.decode_from_stream(in_stream, True)) + * count = in_stream.read_var_int64() +*/ + __pyx_t_11 = __pyx_v_count; + __pyx_t_12 = __pyx_t_11; + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { + __pyx_v__ = __pyx_t_13; + + /* "apache_beam/coders/coder_impl.py":1347 + * while count > 0: + * for _ in range(count): + * elements.append(self._elem_coder.decode_from_stream(in_stream, True)) # <<<<<<<<<<<<<< + * count = in_stream.read_var_int64() + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_elem_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_elements, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/coders/coder_impl.py":1348 + * for _ in range(count): + * elements.append(self._elem_coder.decode_from_stream(in_stream, True)) + * count = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * + * if count == -1: +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_v_count = __pyx_t_11; + } + + /* "apache_beam/coders/coder_impl.py":1350 + * count = in_stream.read_var_int64() + * + * if count == -1: # <<<<<<<<<<<<<< + * if self._read_state is None: + * raise ValueError( +*/ + __pyx_t_8 = (__pyx_v_count == -1L); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1351 + * + * if count == -1: + * if self._read_state is None: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Cannot read state-written iterable without state reader.') +*/ + __pyx_t_8 = (__pyx_v_self->_read_state == Py_None); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":1352 + * if count == -1: + * if self._read_state is None: + * raise ValueError( # <<<<<<<<<<<<<< + * 'Cannot read state-written iterable without state reader.') + * +*/ + __pyx_t_2 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cannot_read_state_written_iterab}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1352, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1351 + * + * if count == -1: + * if self._read_state is None: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Cannot read state-written iterable without state reader.') +*/ + } + + /* "apache_beam/coders/coder_impl.py":1355 + * 'Cannot read state-written iterable without state reader.') + * + * state_token = in_stream.read_all(True) # <<<<<<<<<<<<<< + * elements = _ConcatSequence( + * elements, self._read_state(state_token, self._elem_coder)) +*/ + __pyx_t_15.__pyx_n = 1; + __pyx_t_15.nested = 1; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_state_token = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1356 + * + * state_token = in_stream.read_all(True) + * elements = _ConcatSequence( # <<<<<<<<<<<<<< + * elements, self._read_state(state_token, self._elem_coder)) + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConcatSequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":1357 + * state_token = in_stream.read_all(True) + * elements = _ConcatSequence( + * elements, self._read_state(state_token, self._elem_coder)) # <<<<<<<<<<<<<< + * + * return self._construct_from_sequence(elements) +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->_read_state); + __pyx_t_16 = __pyx_v_self->_read_state; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_16))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_16, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_state_token, ((PyObject *)__pyx_v_self->_elem_coder)}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_elements, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1350 + * count = in_stream.read_var_int64() + * + * if count == -1: # <<<<<<<<<<<<<< + * if self._read_state is None: + * raise ValueError( +*/ + } + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1359 + * elements, self._read_state(state_token, self._elem_coder)) + * + * return self._construct_from_sequence(elements) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_construct_from_sequence(__pyx_v_self, __pyx_v_elements, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1333 + * out.write_var_int64(0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Sequence + * size = in_stream.read_bigendian_int32() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_elements); + __Pyx_XDECREF(__pyx_v_state_token); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1333, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1333, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1333, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1333, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1361 + * return self._construct_from_sequence(elements) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimated_size = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1366 + * """Estimates the encoded size of the given value, in bytes.""" + * # TODO(ccy): This ignores element sizes. + * estimated_size, _ = (self.get_estimated_size_and_observables(value)) # <<<<<<<<<<<<<< + * return estimated_size + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1366, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_estimated_size = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v__ = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1367 + * # TODO(ccy): This ignores element sizes. + * estimated_size, _ = (self.get_estimated_size_and_observables(value)) + * return estimated_size # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_estimated_size); + __pyx_r = __pyx_v_estimated_size; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1361 + * return self._construct_from_sequence(elements) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size, "Estimates the encoded size of the given value, in bytes."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1361, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1361, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1361, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1361, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1361, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1361, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1361, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1361, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1369 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimated_size = NULL; + PyObject *__pyx_v_observables = NULL; + PyObject *__pyx_v_elem = NULL; + PyObject *__pyx_v_child_size = NULL; + PyObject *__pyx_v_child_observables = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1373 + * + * """Returns estimated size of value along with any nested observables.""" + * estimated_size = 0 # <<<<<<<<<<<<<< + * # Size of 32-bit integer storing number of elements. + * estimated_size += 4 +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_estimated_size = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1375 + * estimated_size = 0 + * # Size of 32-bit integer storing number of elements. + * estimated_size += 4 # <<<<<<<<<<<<<< + * if isinstance(value, observable.ObservableMixin): + * return estimated_size, [(value, self._elem_coder)] +*/ + __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_estimated_size, __pyx_mstate_global->__pyx_int_4, 4, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1376 + * # Size of 32-bit integer storing number of elements. + * estimated_size += 4 + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * return estimated_size, [(value, self._elem_coder)] + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1377 + * estimated_size += 4 + * if isinstance(value, observable.ObservableMixin): + * return estimated_size, [(value, self._elem_coder)] # <<<<<<<<<<<<<< + * + * observables = [] # type: Observables +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 1377, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_elem_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_elem_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_elem_coder)) != (0)) __PYX_ERR(0, 1377, __pyx_L1_error); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1377, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_estimated_size); + __Pyx_GIVEREF(__pyx_v_estimated_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_estimated_size) != (0)) __PYX_ERR(0, 1377, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1377, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1376 + * # Size of 32-bit integer storing number of elements. + * estimated_size += 4 + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * return estimated_size, [(value, self._elem_coder)] + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":1379 + * return estimated_size, [(value, self._elem_coder)] + * + * observables = [] # type: Observables # <<<<<<<<<<<<<< + * for elem in value: + * child_size, child_observables = ( +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_observables = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1380 + * + * observables = [] # type: Observables + * for elem in value: # <<<<<<<<<<<<<< + * child_size, child_observables = ( + * self._elem_coder.get_estimated_size_and_observables( +*/ + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { + __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1380, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1380, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_8; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1380, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); + #endif + ++__pyx_t_8; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_9(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1380, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1382 + * for elem in value: + * child_size, child_observables = ( + * self._elem_coder.get_estimated_size_and_observables( # <<<<<<<<<<<<<< + * elem, nested=True)) + * estimated_size += child_size +*/ + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.nested = 1; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->_elem_coder, __pyx_v_elem, 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1381, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + + /* "apache_beam/coders/coder_impl.py":1381 + * observables = [] # type: Observables + * for elem in value: + * child_size, child_observables = ( # <<<<<<<<<<<<<< + * self._elem_coder.get_estimated_size_and_observables( + * elem, nested=True)) +*/ + __Pyx_XDECREF_SET(__pyx_v_child_size, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_child_observables, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1384 + * self._elem_coder.get_estimated_size_and_observables( + * elem, nested=True)) + * estimated_size += child_size # <<<<<<<<<<<<<< + * observables += child_observables + * # TODO: (https://github.com/apache/beam/issues/18169) Update to use an +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_child_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1385 + * elem, nested=True)) + * estimated_size += child_size + * observables += child_observables # <<<<<<<<<<<<<< + * # TODO: (https://github.com/apache/beam/issues/18169) Update to use an + * # accurate count depending on size and count, currently we are +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_child_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1380 + * + * observables = [] # type: Observables + * for elem in value: # <<<<<<<<<<<<<< + * child_size, child_observables = ( + * self._elem_coder.get_estimated_size_and_observables( +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1394 + * # TODO: More efficient size estimation in the case of state-backed + * # iterables. + * return estimated_size, observables # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_estimated_size); + __Pyx_GIVEREF(__pyx_v_estimated_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_estimated_size) != (0)) __PYX_ERR(0, 1394, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_observables); + __Pyx_GIVEREF(__pyx_v_observables); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_observables) != (0)) __PYX_ERR(0, 1394, __pyx_L1_error); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1369 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v_observables); + __Pyx_XDECREF(__pyx_v_elem); + __Pyx_XDECREF(__pyx_v_child_size); + __Pyx_XDECREF(__pyx_v_child_observables); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables, "Returns estimated size of value along with any nested observables."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1369, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 1369, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 1369, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1369, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1369, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_v_self->_elem_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_elem_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_elem_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_read_state); + __Pyx_GIVEREF(__pyx_v_self->_read_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_read_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_write_state); + __Pyx_GIVEREF(__pyx_v_self->_write_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->_write_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_elem_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_read_state != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_write_state != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1401 + * + * A coder for homogeneous tuple objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_components}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1402 + * A coder for homogeneous tuple objects.""" + * def _construct_from_sequence(self, components): + * return tuple(components) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1401 + * + * A coder for homogeneous tuple objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_components = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1401, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1401, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_sequence", 0) < (0)) __PYX_ERR(0, 1401, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, i); __PYX_ERR(0, 1401, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1401, __pyx_L3_error) + } + __pyx_v_components = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1401, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self), __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base._read_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base._write_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base._read_state != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base._write_state != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, None), state + * else: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1407 + * class _AbstractIterable(object): + * """Wraps an iterable hiding methods that might not always be available.""" + * def __init__(self, contents): # <<<<<<<<<<<<<< + * self._contents = contents + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_contents = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_contents,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1407, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1407, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1407, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 1407, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1407, __pyx_L3_error) + } + __pyx_v_contents = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1407, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self), __pyx_v_contents); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v_contents) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1408 + * """Wraps an iterable hiding methods that might not always be available.""" + * def __init__(self, contents): + * self._contents = contents # <<<<<<<<<<<<<< + * + * def __iter__(self): +*/ + __Pyx_INCREF(__pyx_v_contents); + __Pyx_GIVEREF(__pyx_v_contents); + __Pyx_GOTREF(__pyx_v_self->_contents); + __Pyx_DECREF(__pyx_v_self->_contents); + __pyx_v_self->_contents = __pyx_v_contents; + + /* "apache_beam/coders/coder_impl.py":1407 + * class _AbstractIterable(object): + * """Wraps an iterable hiding methods that might not always be available.""" + * def __init__(self, contents): # <<<<<<<<<<<<<< + * self._contents = contents + * +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1410 + * self._contents = contents + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return iter(self._contents) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__iter__", 0); + + /* "apache_beam/coders/coder_impl.py":1411 + * + * def __iter__(self): + * return iter(self._contents) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->_contents; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1410 + * self._contents = contents + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return iter(self._contents) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1413 + * return iter(self._contents) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * head = [repr(e) for e in itertools.islice(self, 4)] + * if len(head) == 4: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) { + PyObject *__pyx_v_head = NULL; + PyObject *__pyx_8genexpr7__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/coders/coder_impl.py":1414 + * + * def __repr__(self): + * head = [repr(e) for e in itertools.islice(self, 4)] # <<<<<<<<<<<<<< + * if len(head) == 4: + * head[-1] = '...' +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_itertools); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_islice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_int_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1414, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1414, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1414, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L5_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1414, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_e, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Repr(__pyx_8genexpr7__pyx_v_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1414, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_e); __pyx_8genexpr7__pyx_v_e = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_e); __pyx_8genexpr7__pyx_v_e = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_v_head = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1415 + * def __repr__(self): + * head = [repr(e) for e in itertools.islice(self, 4)] + * if len(head) == 4: # <<<<<<<<<<<<<< + * head[-1] = '...' + * return '_AbstractIterable([%s])' % ', '.join(head) +*/ + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_head); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_9 = (__pyx_t_7 == 4); + if (__pyx_t_9) { + + /* "apache_beam/coders/coder_impl.py":1416 + * head = [repr(e) for e in itertools.islice(self, 4)] + * if len(head) == 4: + * head[-1] = '...' # <<<<<<<<<<<<<< + * return '_AbstractIterable([%s])' % ', '.join(head) + * +*/ + if (unlikely((__Pyx_SetItemInt(__pyx_v_head, -1L, __pyx_mstate_global->__pyx_kp_u__10, long, 1, __Pyx_PyLong_From_long, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 1416, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1415 + * def __repr__(self): + * head = [repr(e) for e in itertools.islice(self, 4)] + * if len(head) == 4: # <<<<<<<<<<<<<< + * head[-1] = '...' + * return '_AbstractIterable([%s])' % ', '.join(head) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1417 + * if len(head) == 4: + * head[-1] = '...' + * return '_AbstractIterable([%s])' % ', '.join(head) # <<<<<<<<<<<<<< + * + * # Mostly useful for tests. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__11, __pyx_v_head); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_AbstractIterable_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1413 + * return iter(self._contents) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * head = [repr(e) for e in itertools.islice(self, 4)] + * if len(head) == 4: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_head); + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1420 + * + * # Mostly useful for tests. + * def __eq__(left, right): # <<<<<<<<<<<<<< + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(PyObject *__pyx_v_left, PyObject *__pyx_v_right); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(PyObject *__pyx_v_left, PyObject *__pyx_v_right) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_left), ((PyObject *)__pyx_v_right)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_left, PyObject *__pyx_v_right) { + PyObject *__pyx_v_end = NULL; + PyObject *__pyx_v_a = NULL; + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/coders/coder_impl.py":1421 + * # Mostly useful for tests. + * def __eq__(left, right): + * end = object() # <<<<<<<<<<<<<< + * for a, b in itertools.zip_longest(left, right, fillvalue=end): + * if a != b: +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_end = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1422 + * def __eq__(left, right): + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): # <<<<<<<<<<<<<< + * if a != b: + * return False +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_itertools); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_zip_longest); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_left), __pyx_v_right}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fillvalue, __pyx_v_end, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1422, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1422, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1422, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_7(__pyx_t_5); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1422, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1422, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1423 + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): + * if a != b: # <<<<<<<<<<<<<< + * return False + * return True +*/ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "apache_beam/coders/coder_impl.py":1424 + * for a, b in itertools.zip_longest(left, right, fillvalue=end): + * if a != b: + * return False # <<<<<<<<<<<<<< + * return True + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1423 + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): + * if a != b: # <<<<<<<<<<<<<< + * return False + * return True +*/ + } + + /* "apache_beam/coders/coder_impl.py":1422 + * def __eq__(left, right): + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): # <<<<<<<<<<<<<< + * if a != b: + * return False +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1425 + * if a != b: + * return False + * return True # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1420 + * + * # Mostly useful for tests. + * def __eq__(left, right): # <<<<<<<<<<<<<< + * end = object() + * for a, b in itertools.zip_longest(left, right, fillvalue=end): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_end); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._contents,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_contents); + __Pyx_GIVEREF(__pyx_v_self->_contents); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_contents) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._contents,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._contents,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._contents is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._contents,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._contents is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_contents != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._contents is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._contents is not None + * if use_setstate: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__AbstractIterable); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_125584289); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_125584289); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_125584289) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._contents is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, None), state + * else: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__AbstractIterable); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_125584289); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_125584289); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_125584289) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1439 + * + * A coder for homogeneous iterable objects.""" + * def __init__(self, *args, use_abstract_iterable=None, **kwargs): # <<<<<<<<<<<<<< + * super().__init__(*args, **kwargs) + * if use_abstract_iterable is None: +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_use_abstract_iterable = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; + __Pyx_GOTREF(__pyx_v_kwargs); + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_use_abstract_iterable,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1439, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + default: + case 0: break; + } + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, 0, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 1439, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } else if (unlikely(__pyx_nargs < 0)) { + goto __pyx_L5_argtuple_error; + } else { + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_use_abstract_iterable = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 0, __pyx_nargs); __PYX_ERR(0, 1439, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), __pyx_v_use_abstract_iterable, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_use_abstract_iterable, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_INCREF(__pyx_v_use_abstract_iterable); + + /* "apache_beam/coders/coder_impl.py":1440 + * A coder for homogeneous iterable objects.""" + * def __init__(self, *args, use_abstract_iterable=None, **kwargs): + * super().__init__(*args, **kwargs) # <<<<<<<<<<<<<< + * if use_abstract_iterable is None: + * use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1441 + * def __init__(self, *args, use_abstract_iterable=None, **kwargs): + * super().__init__(*args, **kwargs) + * if use_abstract_iterable is None: # <<<<<<<<<<<<<< + * use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default + * self._use_abstract_iterable = use_abstract_iterable +*/ + __pyx_t_5 = (__pyx_v_use_abstract_iterable == Py_None); + if (__pyx_t_5) { + + /* "apache_beam/coders/coder_impl.py":1442 + * super().__init__(*args, **kwargs) + * if use_abstract_iterable is None: + * use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default # <<<<<<<<<<<<<< + * self._use_abstract_iterable = use_abstract_iterable + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_iterable_coder_uses_abstract_it); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_use_abstract_iterable, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1441 + * def __init__(self, *args, use_abstract_iterable=None, **kwargs): + * super().__init__(*args, **kwargs) + * if use_abstract_iterable is None: # <<<<<<<<<<<<<< + * use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default + * self._use_abstract_iterable = use_abstract_iterable +*/ + } + + /* "apache_beam/coders/coder_impl.py":1443 + * if use_abstract_iterable is None: + * use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default + * self._use_abstract_iterable = use_abstract_iterable # <<<<<<<<<<<<<< + * + * def _construct_from_sequence(self, components): +*/ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_use_abstract_iterable); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_v_self->_use_abstract_iterable = __pyx_t_5; + + /* "apache_beam/coders/coder_impl.py":1439 + * + * A coder for homogeneous iterable objects.""" + * def __init__(self, *args, use_abstract_iterable=None, **kwargs): # <<<<<<<<<<<<<< + * super().__init__(*args, **kwargs) + * if use_abstract_iterable is None: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_use_abstract_iterable); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1445 + * self._use_abstract_iterable = use_abstract_iterable + * + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * if self._use_abstract_iterable: + * return _AbstractIterable(components) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_components}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1446 + * + * def _construct_from_sequence(self, components): + * if self._use_abstract_iterable: # <<<<<<<<<<<<<< + * return _AbstractIterable(components) + * else: +*/ + if (__pyx_v_self->_use_abstract_iterable) { + + /* "apache_beam/coders/coder_impl.py":1447 + * def _construct_from_sequence(self, components): + * if self._use_abstract_iterable: + * return _AbstractIterable(components) # <<<<<<<<<<<<<< + * else: + * return components +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_components}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1446 + * + * def _construct_from_sequence(self, components): + * if self._use_abstract_iterable: # <<<<<<<<<<<<<< + * return _AbstractIterable(components) + * else: +*/ + } + + /* "apache_beam/coders/coder_impl.py":1449 + * return _AbstractIterable(components) + * else: + * return components # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_components); + __pyx_r = __pyx_v_components; + goto __pyx_L0; + } + + /* "apache_beam/coders/coder_impl.py":1445 + * self._use_abstract_iterable = use_abstract_iterable + * + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * if self._use_abstract_iterable: + * return _AbstractIterable(components) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_components = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1445, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1445, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_sequence", 0) < (0)) __PYX_ERR(0, 1445, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, i); __PYX_ERR(0, 1445, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1445, __pyx_L3_error) + } + __pyx_v_components = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1445, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_use_abstract_iterable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base._read_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->__pyx_base._write_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, None), state +*/ + /*else*/ { + __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base._read_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base._write_state != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_260527683); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_260527683); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_260527683) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, None), state + * else: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_260527683); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_260527683); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_260527683) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1456 + * + * A coder for homogeneous list objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return components if isinstance(components, list) else list(components) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_components}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1457 + * A coder for homogeneous list objects.""" + * def _construct_from_sequence(self, components): + * return components if isinstance(components, list) else list(components) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_Check(__pyx_v_components); + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_v_components); + __pyx_t_1 = __pyx_v_components; + } else { + __pyx_t_2 = PySequence_List(__pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1456 + * + * A coder for homogeneous list objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return components if isinstance(components, list) else list(components) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_components = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1456, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1456, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_construct_from_sequence", 0) < (0)) __PYX_ERR(0, 1456, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, i); __PYX_ERR(0, 1456, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1456, __pyx_L3_error) + } + __pyx_v_components = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_construct_from_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1456, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self), __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_from_sequence", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._elem_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base._read_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base._write_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base._read_state != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base._write_state != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ListCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, None), state + * else: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ListCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_120365723); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_120365723); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_120365723) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1484 + * + * Coder for a PaneInfo descriptor.""" + * def _choose_encoding(self, value): # <<<<<<<<<<<<<< + * if ((value._index == 0 and value._nonspeculative_index == 0) or + * value._timing == PaneInfoTiming_UNKNOWN): +*/ + +static int __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_choose_encoding", 0); + + /* "apache_beam/coders/coder_impl.py":1485 + * Coder for a PaneInfo descriptor.""" + * def _choose_encoding(self, value): + * if ((value._index == 0 and value._nonspeculative_index == 0) or # <<<<<<<<<<<<<< + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST +*/ + __pyx_t_2 = (__pyx_v_value->_index == 0); + if (!__pyx_t_2) { + goto __pyx_L5_next_or; + } else { + } + __pyx_t_2 = (__pyx_v_value->_nonspeculative_index == 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_L5_next_or:; + + /* "apache_beam/coders/coder_impl.py":1486 + * def _choose_encoding(self, value): + * if ((value._index == 0 and value._nonspeculative_index == 0) or + * value._timing == PaneInfoTiming_UNKNOWN): # <<<<<<<<<<<<<< + * return PaneInfoEncoding_FIRST + * elif (value._index == value._nonspeculative_index or +*/ + __pyx_t_2 = (__pyx_v_value->_timing == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1485 + * Coder for a PaneInfo descriptor.""" + * def _choose_encoding(self, value): + * if ((value._index == 0 and value._nonspeculative_index == 0) or # <<<<<<<<<<<<<< + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST +*/ + if (__pyx_t_1) { + + /* "apache_beam/coders/coder_impl.py":1487 + * if ((value._index == 0 and value._nonspeculative_index == 0) or + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST # <<<<<<<<<<<<<< + * elif (value._index == value._nonspeculative_index or + * value._timing == windowed_value.PaneInfoTiming.EARLY): +*/ + __pyx_r = __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1485 + * Coder for a PaneInfo descriptor.""" + * def _choose_encoding(self, value): + * if ((value._index == 0 and value._nonspeculative_index == 0) or # <<<<<<<<<<<<<< + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST +*/ + } + + /* "apache_beam/coders/coder_impl.py":1488 + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST + * elif (value._index == value._nonspeculative_index or # <<<<<<<<<<<<<< + * value._timing == windowed_value.PaneInfoTiming.EARLY): + * return PaneInfoEncoding.ONE_INDEX +*/ + __pyx_t_2 = (__pyx_v_value->_index == __pyx_v_value->_nonspeculative_index); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":1489 + * return PaneInfoEncoding_FIRST + * elif (value._index == value._nonspeculative_index or + * value._timing == windowed_value.PaneInfoTiming.EARLY): # <<<<<<<<<<<<<< + * return PaneInfoEncoding.ONE_INDEX + * else: +*/ + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_value->_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":1488 + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST + * elif (value._index == value._nonspeculative_index or # <<<<<<<<<<<<<< + * value._timing == windowed_value.PaneInfoTiming.EARLY): + * return PaneInfoEncoding.ONE_INDEX +*/ + if (__pyx_t_1) { + + /* "apache_beam/coders/coder_impl.py":1490 + * elif (value._index == value._nonspeculative_index or + * value._timing == windowed_value.PaneInfoTiming.EARLY): + * return PaneInfoEncoding.ONE_INDEX # <<<<<<<<<<<<<< + * else: + * return PaneInfoEncoding.TWO_INDICES +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_6; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1488 + * value._timing == PaneInfoTiming_UNKNOWN): + * return PaneInfoEncoding_FIRST + * elif (value._index == value._nonspeculative_index or # <<<<<<<<<<<<<< + * value._timing == windowed_value.PaneInfoTiming.EARLY): + * return PaneInfoEncoding.ONE_INDEX +*/ + } + + /* "apache_beam/coders/coder_impl.py":1492 + * return PaneInfoEncoding.ONE_INDEX + * else: + * return PaneInfoEncoding.TWO_INDICES # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TWO_INDICES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + goto __pyx_L0; + } + + /* "apache_beam/coders/coder_impl.py":1484 + * + * Coder for a PaneInfo descriptor.""" + * def _choose_encoding(self, value): # <<<<<<<<<<<<<< + * if ((value._index == 0 and value._nonspeculative_index == 0) or + * value._timing == PaneInfoTiming_UNKNOWN): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl._choose_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1494 + * return PaneInfoEncoding.TWO_INDICES + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None + * pane_info = value # cast +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_pane_info = 0; + int __pyx_v_encoding_type; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1496 + * def encode_to_stream(self, value, out, nested): + * # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None + * pane_info = value # cast # <<<<<<<<<<<<<< + * encoding_type = self._choose_encoding(pane_info) + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_v_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1497 + * # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None + * pane_info = value # cast + * encoding_type = self._choose_encoding(pane_info) # <<<<<<<<<<<<<< + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) + * if encoding_type == PaneInfoEncoding_FIRST: +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_choose_encoding(__pyx_v_self, __pyx_v_pane_info); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_v_encoding_type = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1498 + * pane_info = value # cast + * encoding_type = self._choose_encoding(pane_info) + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) # <<<<<<<<<<<<<< + * if encoding_type == PaneInfoEncoding_FIRST: + * return +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, (__pyx_v_pane_info->_encoded_byte | (__pyx_v_encoding_type << 4)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1499 + * encoding_type = self._choose_encoding(pane_info) + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) + * if encoding_type == PaneInfoEncoding_FIRST: # <<<<<<<<<<<<<< + * return + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: +*/ + __pyx_t_8 = (__pyx_v_encoding_type == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1500 + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) + * if encoding_type == PaneInfoEncoding_FIRST: + * return # <<<<<<<<<<<<<< + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * out.write_var_int64(value.index) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1499 + * encoding_type = self._choose_encoding(pane_info) + * out.write_byte(pane_info._encoded_byte | (encoding_type << 4)) + * if encoding_type == PaneInfoEncoding_FIRST: # <<<<<<<<<<<<<< + * return + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: +*/ + } + + /* "apache_beam/coders/coder_impl.py":1501 + * if encoding_type == PaneInfoEncoding_FIRST: + * return + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * out.write_var_int64(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1502 + * return + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * out.write_var_int64(value.index) # <<<<<<<<<<<<<< + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * out.write_var_int64(value.index) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1502, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1501 + * if encoding_type == PaneInfoEncoding_FIRST: + * return + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * out.write_var_int64(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1503 + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * out.write_var_int64(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * out.write_var_int64(value.index) + * out.write_var_int64(value.nonspeculative_index) +*/ + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TWO_INDICES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":1504 + * out.write_var_int64(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * out.write_var_int64(value.index) # <<<<<<<<<<<<<< + * out.write_var_int64(value.nonspeculative_index) + * else: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1505 + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * out.write_var_int64(value.index) + * out.write_var_int64(value.nonspeculative_index) # <<<<<<<<<<<<<< + * else: + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1503 + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * out.write_var_int64(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * out.write_var_int64(value.index) + * out.write_var_int64(value.nonspeculative_index) +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1507 + * out.write_var_int64(value.nonspeculative_index) + * else: + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + /*else*/ { + __pyx_t_1 = NULL; + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Invalid_PaneInfoEncoding_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1507, __pyx_L1_error) + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1494 + * return PaneInfoEncoding.TWO_INDICES + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None + * pane_info = value # cast +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_pane_info); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1494, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1494, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1494, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1494, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1494, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1494, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1494, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1494, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1494, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1494, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1509 + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.PaneInfo + * encoded_first_byte = in_stream.read_byte() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_encoded_first_byte; + int __pyx_v_encoding_type; + PyObject *__pyx_v_base = NULL; + int64_t __pyx_v_index; + int64_t __pyx_v_nonspeculative_index; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1511 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> windowed_value.PaneInfo + * encoded_first_byte = in_stream.read_byte() # <<<<<<<<<<<<<< + * base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF] + * assert base is not None +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_byte(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error) + __pyx_v_encoded_first_byte = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1512 + * # type: (create_InputStream, bool) -> windowed_value.PaneInfo + * encoded_first_byte = in_stream.read_byte() + * base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF] # <<<<<<<<<<<<<< + * assert base is not None + * encoding_type = encoded_first_byte >> 4 +*/ + if (unlikely(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1512, __pyx_L1_error) + } + __pyx_t_7 = (__pyx_v_encoded_first_byte & 0xF); + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, __pyx_t_7, long, 1, __Pyx_PyLong_From_long, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_base = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1513 + * encoded_first_byte = in_stream.read_byte() + * base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF] + * assert base is not None # <<<<<<<<<<<<<< + * encoding_type = encoded_first_byte >> 4 + * if encoding_type == PaneInfoEncoding_FIRST: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_8 = (__pyx_v_base != Py_None); + if (unlikely(!__pyx_t_8)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1513, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1513, __pyx_L1_error) + #endif + + /* "apache_beam/coders/coder_impl.py":1514 + * base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF] + * assert base is not None + * encoding_type = encoded_first_byte >> 4 # <<<<<<<<<<<<<< + * if encoding_type == PaneInfoEncoding_FIRST: + * return base +*/ + __pyx_v_encoding_type = (__pyx_v_encoded_first_byte >> 4); + + /* "apache_beam/coders/coder_impl.py":1515 + * assert base is not None + * encoding_type = encoded_first_byte >> 4 + * if encoding_type == PaneInfoEncoding_FIRST: # <<<<<<<<<<<<<< + * return base + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: +*/ + __pyx_t_8 = (__pyx_v_encoding_type == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1516 + * encoding_type = encoded_first_byte >> 4 + * if encoding_type == PaneInfoEncoding_FIRST: + * return base # <<<<<<<<<<<<<< + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * index = in_stream.read_var_int64() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_base); + __pyx_r = __pyx_v_base; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1515 + * assert base is not None + * encoding_type = encoded_first_byte >> 4 + * if encoding_type == PaneInfoEncoding_FIRST: # <<<<<<<<<<<<<< + * return base + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: +*/ + } + + /* "apache_beam/coders/coder_impl.py":1517 + * if encoding_type == PaneInfoEncoding_FIRST: + * return base + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * index = in_stream.read_var_int64() + * if base.timing == windowed_value.PaneInfoTiming.EARLY: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1518 + * return base + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * index = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * if base.timing == windowed_value.PaneInfoTiming.EARLY: + * nonspeculative_index = -1 +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_v_index = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":1519 + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * index = in_stream.read_var_int64() + * if base.timing == windowed_value.PaneInfoTiming.EARLY: # <<<<<<<<<<<<<< + * nonspeculative_index = -1 + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1520 + * index = in_stream.read_var_int64() + * if base.timing == windowed_value.PaneInfoTiming.EARLY: + * nonspeculative_index = -1 # <<<<<<<<<<<<<< + * else: + * nonspeculative_index = index +*/ + __pyx_v_nonspeculative_index = -1L; + + /* "apache_beam/coders/coder_impl.py":1519 + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: + * index = in_stream.read_var_int64() + * if base.timing == windowed_value.PaneInfoTiming.EARLY: # <<<<<<<<<<<<<< + * nonspeculative_index = -1 + * else: +*/ + goto __pyx_L4; + } + + /* "apache_beam/coders/coder_impl.py":1522 + * nonspeculative_index = -1 + * else: + * nonspeculative_index = index # <<<<<<<<<<<<<< + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * index = in_stream.read_var_int64() +*/ + /*else*/ { + __pyx_v_nonspeculative_index = __pyx_v_index; + } + __pyx_L4:; + + /* "apache_beam/coders/coder_impl.py":1517 + * if encoding_type == PaneInfoEncoding_FIRST: + * return base + * elif encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * index = in_stream.read_var_int64() + * if base.timing == windowed_value.PaneInfoTiming.EARLY: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1523 + * else: + * nonspeculative_index = index + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * index = in_stream.read_var_int64() + * nonspeculative_index = in_stream.read_var_int64() +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TWO_INDICES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":1524 + * nonspeculative_index = index + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * index = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * nonspeculative_index = in_stream.read_var_int64() + * else: +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_v_index = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":1525 + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * index = in_stream.read_var_int64() + * nonspeculative_index = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * else: + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_9 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_v_nonspeculative_index = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":1523 + * else: + * nonspeculative_index = index + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * index = in_stream.read_var_int64() + * nonspeculative_index = in_stream.read_var_int64() +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1527 + * nonspeculative_index = in_stream.read_var_int64() + * else: + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) # <<<<<<<<<<<<<< + * return windowed_value.PaneInfo( + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) +*/ + /*else*/ { + __pyx_t_2 = NULL; + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Invalid_PaneInfoEncoding_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1527, __pyx_L1_error) + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1528 + * else: + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) + * return windowed_value.PaneInfo( # <<<<<<<<<<<<<< + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = NULL; + + /* "apache_beam/coders/coder_impl.py":1529 + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) + * return windowed_value.PaneInfo( + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_is_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_is_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyLong_From_int64_t(__pyx_v_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyLong_From_int64_t(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_t_2, __pyx_t_1, __pyx_t_3, __pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_r = ((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1509 + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.PaneInfo + * encoded_first_byte = in_stream.read_byte() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_base); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1509, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1509, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1509, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1509, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1509, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1509, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1509, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1509, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1509, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1531 + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_size = NULL; + int __pyx_v_encoding_type; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1535 + * + * """Estimates the encoded size of the given value, in bytes.""" + * size = 1 # <<<<<<<<<<<<<< + * encoding_type = self._choose_encoding(value) + * if encoding_type == PaneInfoEncoding.ONE_INDEX: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_v_size = __pyx_mstate_global->__pyx_int_1; + + /* "apache_beam/coders/coder_impl.py":1536 + * """Estimates the encoded size of the given value, in bytes.""" + * size = 1 + * encoding_type = self._choose_encoding(value) # <<<<<<<<<<<<<< + * if encoding_type == PaneInfoEncoding.ONE_INDEX: + * size += get_varint_size(value.index) +*/ + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_choose_encoding(__pyx_v_self, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_v_encoding_type = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1537 + * size = 1 + * encoding_type = self._choose_encoding(value) + * if encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * size += get_varint_size(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1538 + * encoding_type = self._choose_encoding(value) + * if encoding_type == PaneInfoEncoding.ONE_INDEX: + * size += get_varint_size(value.index) # <<<<<<<<<<<<<< + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * size += get_varint_size(value.index) +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1537 + * size = 1 + * encoding_type = self._choose_encoding(value) + * if encoding_type == PaneInfoEncoding.ONE_INDEX: # <<<<<<<<<<<<<< + * size += get_varint_size(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1539 + * if encoding_type == PaneInfoEncoding.ONE_INDEX: + * size += get_varint_size(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * size += get_varint_size(value.index) + * size += get_varint_size(value.nonspeculative_index) +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TWO_INDICES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1540 + * size += get_varint_size(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * size += get_varint_size(value.index) # <<<<<<<<<<<<<< + * size += get_varint_size(value.nonspeculative_index) + * return size +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1541 + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: + * size += get_varint_size(value.index) + * size += get_varint_size(value.nonspeculative_index) # <<<<<<<<<<<<<< + * return size + * +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1539 + * if encoding_type == PaneInfoEncoding.ONE_INDEX: + * size += get_varint_size(value.index) + * elif encoding_type == PaneInfoEncoding.TWO_INDICES: # <<<<<<<<<<<<<< + * size += get_varint_size(value.index) + * size += get_varint_size(value.nonspeculative_index) +*/ + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1542 + * size += get_varint_size(value.index) + * size += get_varint_size(value.nonspeculative_index) + * return size # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_size); + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1531 + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size, "Estimates the encoded size of the given value, in bytes."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1531, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1531, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1531, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1531, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1531, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1531, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1531, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1531, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1546 + * + * class _OrderedUnionCoderImpl(StreamCoderImpl): + * def __init__(self, coder_impl_types, fallback_coder_impl): # <<<<<<<<<<<<<< + * assert len(coder_impl_types) < 128 + * self._types, self._coder_impls = zip(*coder_impl_types) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_coder_impl_types = 0; + PyObject *__pyx_v_fallback_coder_impl = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_coder_impl_types,&__pyx_mstate_global->__pyx_n_u_fallback_coder_impl,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1546, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1546, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1546, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1546, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1546, __pyx_L3_error) + } + __pyx_v_coder_impl_types = values[0]; + __pyx_v_fallback_coder_impl = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1546, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v_self), __pyx_v_coder_impl_types, __pyx_v_fallback_coder_impl); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impl_types, PyObject *__pyx_v_fallback_coder_impl) { + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1547 + * class _OrderedUnionCoderImpl(StreamCoderImpl): + * def __init__(self, coder_impl_types, fallback_coder_impl): + * assert len(coder_impl_types) < 128 # <<<<<<<<<<<<<< + * self._types, self._coder_impls = zip(*coder_impl_types) + * self._fallback_coder_impl = fallback_coder_impl +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = PyObject_Length(__pyx_v_coder_impl_types); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 < 0x80); + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1547, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1547, __pyx_L1_error) + #endif + + /* "apache_beam/coders/coder_impl.py":1548 + * def __init__(self, coder_impl_types, fallback_coder_impl): + * assert len(coder_impl_types) < 128 + * self._types, self._coder_impls = zip(*coder_impl_types) # <<<<<<<<<<<<<< + * self._fallback_coder_impl = fallback_coder_impl + * +*/ + __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_coder_impl_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1548, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); + index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 1548, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_5))) __PYX_ERR(0, 1548, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->_types); + __Pyx_DECREF(__pyx_v_self->_types); + __pyx_v_self->_types = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->_coder_impls); + __Pyx_DECREF(__pyx_v_self->_coder_impls); + __pyx_v_self->_coder_impls = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1549 + * assert len(coder_impl_types) < 128 + * self._types, self._coder_impls = zip(*coder_impl_types) + * self._fallback_coder_impl = fallback_coder_impl # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_4 = __pyx_v_fallback_coder_impl; + __Pyx_INCREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1549, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_fallback_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v_self->_fallback_coder_impl); + __pyx_v_self->_fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1546 + * + * class _OrderedUnionCoderImpl(StreamCoderImpl): + * def __init__(self, coder_impl_types, fallback_coder_impl): # <<<<<<<<<<<<<< + * assert len(coder_impl_types) < 128 + * self._types, self._coder_impls = zip(*coder_impl_types) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1551 + * self._fallback_coder_impl = fallback_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * value_t = type(value) + * for (ix, t) in enumerate(self._types): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_ix; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0; + PyTypeObject *__pyx_v_value_t = NULL; + PyObject *__pyx_v_t = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1552 + * + * def encode_to_stream(self, value, out, nested): + * value_t = type(value) # <<<<<<<<<<<<<< + * for (ix, t) in enumerate(self._types): + * if value_t is t: +*/ + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); + __pyx_v_value_t = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value))); + + /* "apache_beam/coders/coder_impl.py":1553 + * def encode_to_stream(self, value, out, nested): + * value_t = type(value) + * for (ix, t) in enumerate(self._types): # <<<<<<<<<<<<<< + * if value_t is t: + * out.write_byte(ix) +*/ + __pyx_t_7 = 0; + __pyx_t_1 = __pyx_v_self->_types; __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); + #endif + ++__pyx_t_8; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_v_ix = __pyx_t_7; + __pyx_t_7 = (__pyx_t_7 + 1); + + /* "apache_beam/coders/coder_impl.py":1554 + * value_t = type(value) + * for (ix, t) in enumerate(self._types): + * if value_t is t: # <<<<<<<<<<<<<< + * out.write_byte(ix) + * c = self._coder_impls[ix] # for typing +*/ + __pyx_t_9 = (__pyx_v_value_t == ((PyTypeObject*)__pyx_v_t)); + if (__pyx_t_9) { + + /* "apache_beam/coders/coder_impl.py":1555 + * for (ix, t) in enumerate(self._types): + * if value_t is t: + * out.write_byte(ix) # <<<<<<<<<<<<<< + * c = self._coder_impls[ix] # for typing + * c.encode_to_stream(value, out, nested) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_ix, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1556 + * if value_t is t: + * out.write_byte(ix) + * c = self._coder_impls[ix] # for typing # <<<<<<<<<<<<<< + * c.encode_to_stream(value, out, nested) + * break +*/ + if (unlikely(__pyx_v_self->_coder_impls == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1556, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_coder_impls, __pyx_v_ix, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_v_c = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1557 + * out.write_byte(ix) + * c = self._coder_impls[ix] # for typing + * c.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * break + * else: +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->encode_to_stream(__pyx_v_c, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1558 + * c = self._coder_impls[ix] # for typing + * c.encode_to_stream(value, out, nested) + * break # <<<<<<<<<<<<<< + * else: + * if self._fallback_coder_impl is None: +*/ + goto __pyx_L4_break; + + /* "apache_beam/coders/coder_impl.py":1554 + * value_t = type(value) + * for (ix, t) in enumerate(self._types): + * if value_t is t: # <<<<<<<<<<<<<< + * out.write_byte(ix) + * c = self._coder_impls[ix] # for typing +*/ + } + + /* "apache_beam/coders/coder_impl.py":1553 + * def encode_to_stream(self, value, out, nested): + * value_t = type(value) + * for (ix, t) in enumerate(self._types): # <<<<<<<<<<<<<< + * if value_t is t: + * out.write_byte(ix) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L6_for_else; + __pyx_L4_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L7_for_end; + /*else*/ { + __pyx_L6_for_else:; + + /* "apache_beam/coders/coder_impl.py":1560 + * break + * else: + * if self._fallback_coder_impl is None: # <<<<<<<<<<<<<< + * raise ValueError("No fallback.") + * out.write_byte(0xFF) +*/ + __pyx_t_9 = (((PyObject *)__pyx_v_self->_fallback_coder_impl) == Py_None); + if (unlikely(__pyx_t_9)) { + + /* "apache_beam/coders/coder_impl.py":1561 + * else: + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") # <<<<<<<<<<<<<< + * out.write_byte(0xFF) + * self._fallback_coder_impl.encode_to_stream(value, out, nested) +*/ + __pyx_t_2 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_No_fallback}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1561, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1560 + * break + * else: + * if self._fallback_coder_impl is None: # <<<<<<<<<<<<<< + * raise ValueError("No fallback.") + * out.write_byte(0xFF) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1562 + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") + * out.write_byte(0xFF) # <<<<<<<<<<<<<< + * self._fallback_coder_impl.encode_to_stream(value, out, nested) + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0xFF, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1563 + * raise ValueError("No fallback.") + * out.write_byte(0xFF) + * self._fallback_coder_impl.encode_to_stream(value, out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->_fallback_coder_impl, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L7_for_end:; + + /* "apache_beam/coders/coder_impl.py":1551 + * self._fallback_coder_impl = fallback_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * value_t = type(value) + * for (ix, t) in enumerate(self._types): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c); + __Pyx_XDECREF((PyObject *)__pyx_v_value_t); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1551, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1551, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1551, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1551, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1551, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1551, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1551, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1551, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1551, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1551, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1565 + * self._fallback_coder_impl.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * ix = in_stream.read_byte() + * if ix == 0xFF: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_ix; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1566 + * + * def decode_from_stream(self, in_stream, nested): + * ix = in_stream.read_byte() # <<<<<<<<<<<<<< + * if ix == 0xFF: + * if self._fallback_coder_impl is None: +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_byte(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_v_ix = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1567 + * def decode_from_stream(self, in_stream, nested): + * ix = in_stream.read_byte() + * if ix == 0xFF: # <<<<<<<<<<<<<< + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") +*/ + __pyx_t_8 = (__pyx_v_ix == 0xFF); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1568 + * ix = in_stream.read_byte() + * if ix == 0xFF: + * if self._fallback_coder_impl is None: # <<<<<<<<<<<<<< + * raise ValueError("No fallback.") + * return self._fallback_coder_impl.decode_from_stream(in_stream, nested) +*/ + __pyx_t_8 = (((PyObject *)__pyx_v_self->_fallback_coder_impl) == Py_None); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":1569 + * if ix == 0xFF: + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") # <<<<<<<<<<<<<< + * return self._fallback_coder_impl.decode_from_stream(in_stream, nested) + * else: +*/ + __pyx_t_2 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_No_fallback}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1569, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1568 + * ix = in_stream.read_byte() + * if ix == 0xFF: + * if self._fallback_coder_impl is None: # <<<<<<<<<<<<<< + * raise ValueError("No fallback.") + * return self._fallback_coder_impl.decode_from_stream(in_stream, nested) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1570 + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") + * return self._fallback_coder_impl.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * else: + * c = self._coder_impls[ix] # for typing +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_fallback_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->_fallback_coder_impl, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1567 + * def decode_from_stream(self, in_stream, nested): + * ix = in_stream.read_byte() + * if ix == 0xFF: # <<<<<<<<<<<<<< + * if self._fallback_coder_impl is None: + * raise ValueError("No fallback.") +*/ + } + + /* "apache_beam/coders/coder_impl.py":1572 + * return self._fallback_coder_impl.decode_from_stream(in_stream, nested) + * else: + * c = self._coder_impls[ix] # for typing # <<<<<<<<<<<<<< + * return c.decode_from_stream(in_stream, nested) + * +*/ + /*else*/ { + if (unlikely(__pyx_v_self->_coder_impls == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1572, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_coder_impls, __pyx_v_ix, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_v_c = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1573 + * else: + * c = self._coder_impls[ix] # for typing + * return c.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->decode_from_stream(__pyx_v_c, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/coders/coder_impl.py":1565 + * self._fallback_coder_impl.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * ix = in_stream.read_byte() + * if ix == 0xFF: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1565, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1565, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1565, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1565, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1565, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1565, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1565, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1565, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._coder_impls, self._fallback_coder_impl, self._types) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_coder_impls); + __Pyx_GIVEREF(__pyx_v_self->_coder_impls); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_coder_impls) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_fallback_coder_impl); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_fallback_coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_fallback_coder_impl)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_types); + __Pyx_GIVEREF(__pyx_v_self->_types); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_types) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._coder_impls, self._fallback_coder_impl, self._types) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._coder_impls, self._fallback_coder_impl, self._types) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._coder_impls is not None or self._fallback_coder_impl is not None or self._types is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._coder_impls, self._fallback_coder_impl, self._types) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._coder_impls is not None or self._fallback_coder_impl is not None or self._types is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->_coder_impls != ((PyObject*)Py_None)); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->_fallback_coder_impl) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_types != ((PyObject*)Py_None)); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None or self._fallback_coder_impl is not None or self._types is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._coder_impls is not None or self._fallback_coder_impl is not None or self._types is not None + * if use_setstate: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OrderedUnionCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_45818781); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_45818781); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_45818781) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._coder_impls is not None or self._fallback_coder_impl is not None or self._types is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, None), state + * else: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OrderedUnionCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_45818781); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_45818781); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_45818781) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__OrderedUnionCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._OrderedUnionCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1585 + * # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we + * # have a BEAM wide consensus on byte representation of timestamps. + * def _to_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT +*/ + +static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, int64_t __pyx_v_value) { + uint64_t __pyx_r; + + /* "apache_beam/coders/coder_impl.py":1587 + * def _to_normal_time(self, value): + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT # <<<<<<<<<<<<<< + * + * def _from_normal_time(self, value): +*/ + __pyx_r = (__pyx_v_value - __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1585 + * # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we + * # have a BEAM wide consensus on byte representation of timestamps. + * def _to_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert "lexicographically ordered unsigned" to signed.""" + * return value - _TIME_SHIFT +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1589 + * return value - _TIME_SHIFT + * + * def _from_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT +*/ + +static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, uint64_t __pyx_v_value) { + int64_t __pyx_r; + + /* "apache_beam/coders/coder_impl.py":1591 + * def _from_normal_time(self, value): + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT # <<<<<<<<<<<<<< + * + * def __init__(self, value_coder, timestamp_coder, window_coder): +*/ + __pyx_r = (__pyx_v_value + __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1589 + * return value - _TIME_SHIFT + * + * def _from_normal_time(self, value): # <<<<<<<<<<<<<< + * """Convert signed to "lexicographically ordered unsigned".""" + * return value + _TIME_SHIFT +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1593 + * return value + _TIME_SHIFT + * + * def __init__(self, value_coder, timestamp_coder, window_coder): # <<<<<<<<<<<<<< + * # TODO(lcwik): Remove the timestamp coder field + * self._value_coder = value_coder +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value_coder = 0; + PyObject *__pyx_v_timestamp_coder = 0; + PyObject *__pyx_v_window_coder = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_coder,&__pyx_mstate_global->__pyx_n_u_timestamp_coder,&__pyx_mstate_global->__pyx_n_u_window_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1593, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1593, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1593, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1593, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1593, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1593, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1593, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1593, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1593, __pyx_L3_error) + } + __pyx_v_value_coder = values[0]; + __pyx_v_timestamp_coder = values[1]; + __pyx_v_window_coder = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1593, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value_coder, __pyx_v_timestamp_coder, __pyx_v_window_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_timestamp_coder, PyObject *__pyx_v_window_coder) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1595 + * def __init__(self, value_coder, timestamp_coder, window_coder): + * # TODO(lcwik): Remove the timestamp coder field + * self._value_coder = value_coder # <<<<<<<<<<<<<< + * self._timestamp_coder = timestamp_coder + * self._windows_coder = TupleSequenceCoderImpl(window_coder) +*/ + __pyx_t_1 = __pyx_v_value_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1595, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_value_coder); + __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1596 + * # TODO(lcwik): Remove the timestamp coder field + * self._value_coder = value_coder + * self._timestamp_coder = timestamp_coder # <<<<<<<<<<<<<< + * self._windows_coder = TupleSequenceCoderImpl(window_coder) + * self._pane_info_coder = PaneInfoCoderImpl() +*/ + __pyx_t_1 = __pyx_v_timestamp_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1596, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_timestamp_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_timestamp_coder); + __pyx_v_self->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1597 + * self._value_coder = value_coder + * self._timestamp_coder = timestamp_coder + * self._windows_coder = TupleSequenceCoderImpl(window_coder) # <<<<<<<<<<<<<< + * self._pane_info_coder = PaneInfoCoderImpl() + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_window_coder}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_windows_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_windows_coder); + __pyx_v_self->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1598 + * self._timestamp_coder = timestamp_coder + * self._windows_coder = TupleSequenceCoderImpl(window_coder) + * self._pane_info_coder = PaneInfoCoderImpl() # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_pane_info_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_pane_info_coder); + __pyx_v_self->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1593 + * return value + _TIME_SHIFT + * + * def __init__(self, value_coder, timestamp_coder, window_coder): # <<<<<<<<<<<<<< + * # TODO(lcwik): Remove the timestamp coder field + * self._value_coder = value_coder +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1600 + * self._pane_info_coder = PaneInfoCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None + * wv = value # type cast +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wv = 0; + int __pyx_v_restore_sign; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1602 + * def encode_to_stream(self, value, out, nested): + * # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None + * wv = value # type cast # <<<<<<<<<<<<<< + * # Avoid creation of Timestamp object. + * restore_sign = -1 if wv.timestamp_micros < 0 else 1 +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1602, __pyx_L1_error) + __pyx_v_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1604 + * wv = value # type cast + * # Avoid creation of Timestamp object. + * restore_sign = -1 if wv.timestamp_micros < 0 else 1 # <<<<<<<<<<<<<< + * out.write_bigendian_uint64( + * # Convert to postive number and divide, since python rounds off to the +*/ + __pyx_t_8 = (__pyx_v_wv->timestamp_micros < 0); + if (__pyx_t_8) { + __pyx_t_7 = -1; + } else { + __pyx_t_7 = 1; + } + __pyx_v_restore_sign = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1614 + * restore_sign * ( + * abs( + * MIN_TIMESTAMP_micros if wv.timestamp_micros < # <<<<<<<<<<<<<< + * MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000))) + * self._windows_coder.encode_to_stream(wv.windows, out, True) +*/ + __pyx_t_8 = (__pyx_v_wv->timestamp_micros < __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros); + if (__pyx_t_8) { + __pyx_t_9 = __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros; + } else { + + /* "apache_beam/coders/coder_impl.py":1615 + * abs( + * MIN_TIMESTAMP_micros if wv.timestamp_micros < + * MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000))) # <<<<<<<<<<<<<< + * self._windows_coder.encode_to_stream(wv.windows, out, True) + * # Default PaneInfo encoded byte representing NO_FIRING. +*/ + __pyx_t_9 = __pyx_v_wv->timestamp_micros; + } + + /* "apache_beam/coders/coder_impl.py":1611 + * # TODO(https://github.com/apache/beam/issues/18190): Clean this up once + * # we have a BEAM wide consensus on precision of timestamps. + * self._from_normal_time( # <<<<<<<<<<<<<< + * restore_sign * ( + * abs( +*/ + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_from_normal_time(__pyx_v_self, (__pyx_v_restore_sign * __Pyx_div_int64_t(llabs(__pyx_t_9), 0x3E8, 1))); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1605 + * # Avoid creation of Timestamp object. + * restore_sign = -1 if wv.timestamp_micros < 0 else 1 + * out.write_bigendian_uint64( # <<<<<<<<<<<<<< + * # Convert to postive number and divide, since python rounds off to the + * # lower negative number. For ex: -3 / 2 = -2, but we expect it to be -1, +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_uint64(__pyx_v_out, __pyx_t_10, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1616 + * MIN_TIMESTAMP_micros if wv.timestamp_micros < + * MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000))) + * self._windows_coder.encode_to_stream(wv.windows, out, True) # <<<<<<<<<<<<<< + * # Default PaneInfo encoded byte representing NO_FIRING. + * self._pane_info_coder.encode_to_stream(wv.pane_info, out, True) +*/ + __pyx_t_1 = __pyx_v_wv->windows; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_windows_coder, __pyx_t_1, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1618 + * self._windows_coder.encode_to_stream(wv.windows, out, True) + * # Default PaneInfo encoded byte representing NO_FIRING. + * self._pane_info_coder.encode_to_stream(wv.pane_info, out, True) # <<<<<<<<<<<<<< + * self._value_coder.encode_to_stream(wv.value, out, nested) + * +*/ + __pyx_t_2 = __pyx_v_wv->pane_info; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_pane_info_coder, __pyx_t_2, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1619 + * # Default PaneInfo encoded byte representing NO_FIRING. + * self._pane_info_coder.encode_to_stream(wv.pane_info, out, True) + * self._value_coder.encode_to_stream(wv.value, out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = __pyx_v_wv->value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1600 + * self._pane_info_coder = PaneInfoCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None + * wv = value # type cast +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_wv); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1600, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1600, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1600, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1600, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1600, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1600, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1600, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1600, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1600, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1600, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1600, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1621 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.WindowedValue + * timestamp = self._to_normal_time(in_stream.read_bigendian_uint64()) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + int64_t __pyx_v_timestamp; + PyObject *__pyx_v_windows = NULL; + PyObject *__pyx_v_pane_info = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + uint64_t __pyx_t_7; + uint64_t __pyx_t_8; + int __pyx_t_9; + struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1623 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> windowed_value.WindowedValue + * timestamp = self._to_normal_time(in_stream.read_bigendian_uint64()) # <<<<<<<<<<<<<< + * # Restore MIN/MAX timestamps to their actual values as encoding incurs loss + * # of precision while converting to millis. +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_uint64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L1_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_to_normal_time(__pyx_v_self, __pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L1_error) + __pyx_v_timestamp = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":1630 + * # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we + * # have a BEAM wide consensus on precision of timestamps. + * if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000): # <<<<<<<<<<<<<< + * timestamp = MIN_TIMESTAMP_micros + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: +*/ + __pyx_t_9 = (__pyx_v_timestamp <= (-__Pyx_div_int64_t(llabs(__pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros), 0x3E8, 1))); + if (__pyx_t_9) { + + /* "apache_beam/coders/coder_impl.py":1631 + * # have a BEAM wide consensus on precision of timestamps. + * if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000): + * timestamp = MIN_TIMESTAMP_micros # <<<<<<<<<<<<<< + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: + * timestamp = MAX_TIMESTAMP_micros +*/ + __pyx_v_timestamp = __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros; + + /* "apache_beam/coders/coder_impl.py":1630 + * # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we + * # have a BEAM wide consensus on precision of timestamps. + * if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000): # <<<<<<<<<<<<<< + * timestamp = MIN_TIMESTAMP_micros + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1632 + * if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000): + * timestamp = MIN_TIMESTAMP_micros + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: # <<<<<<<<<<<<<< + * timestamp = MAX_TIMESTAMP_micros + * else: +*/ + __pyx_t_9 = (__pyx_v_timestamp >= __Pyx_div_int64_t(__pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros, 0x3E8, 1)); + if (__pyx_t_9) { + + /* "apache_beam/coders/coder_impl.py":1633 + * timestamp = MIN_TIMESTAMP_micros + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: + * timestamp = MAX_TIMESTAMP_micros # <<<<<<<<<<<<<< + * else: + * timestamp *= 1000 +*/ + __pyx_v_timestamp = __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros; + + /* "apache_beam/coders/coder_impl.py":1632 + * if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000): + * timestamp = MIN_TIMESTAMP_micros + * elif timestamp >= MAX_TIMESTAMP_micros // 1000: # <<<<<<<<<<<<<< + * timestamp = MAX_TIMESTAMP_micros + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":1635 + * timestamp = MAX_TIMESTAMP_micros + * else: + * timestamp *= 1000 # <<<<<<<<<<<<<< + * + * windows = self._windows_coder.decode_from_stream(in_stream, True) +*/ + /*else*/ { + __pyx_v_timestamp = (__pyx_v_timestamp * 0x3E8); + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":1637 + * timestamp *= 1000 + * + * windows = self._windows_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * # Read PaneInfo encoded byte. + * pane_info = self._pane_info_coder.decode_from_stream(in_stream, True) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_windows_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_windows = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1639 + * windows = self._windows_coder.decode_from_stream(in_stream, True) + * # Read PaneInfo encoded byte. + * pane_info = self._pane_info_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_pane_info_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_pane_info = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1640 + * # Read PaneInfo encoded byte. + * pane_info = self._pane_info_coder.decode_from_stream(in_stream, True) + * value = self._value_coder.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * return windowed_value.create( + * value, +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_value_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1641 + * pane_info = self._pane_info_coder.decode_from_stream(in_stream, True) + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( # <<<<<<<<<<<<<< + * value, + * timestamp, # Avoid creation of Timestamp object. +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1645 + * timestamp, # Avoid creation of Timestamp object. + * windows, + * pane_info) # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.pane_info = __pyx_v_pane_info; + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_v_timestamp, __pyx_v_windows, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1621 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.WindowedValue + * timestamp = self._to_normal_time(in_stream.read_bigendian_uint64()) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_windows); + __Pyx_XDECREF(__pyx_v_pane_info); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1621, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1621, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1621, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1621, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1621, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1621, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1621, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1621, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1647 + * pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimated_size = NULL; + PyObject *__pyx_v_observables = NULL; + PyObject *__pyx_v_value_estimated_size = NULL; + PyObject *__pyx_v_value_observables = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1651 + * + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1651, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1654 + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. + * return 0, [(value, self._value_coder)] # <<<<<<<<<<<<<< + * estimated_size = 0 + * observables = [] # type: Observables +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_value_coder)) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1651 + * + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. +*/ + } + + /* "apache_beam/coders/coder_impl.py":1655 + * # TODO(robertwb): Remove when coders are set correctly. + * return 0, [(value, self._value_coder)] + * estimated_size = 0 # <<<<<<<<<<<<<< + * observables = [] # type: Observables + * value_estimated_size, value_observables = ( +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_estimated_size = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1656 + * return 0, [(value, self._value_coder)] + * estimated_size = 0 + * observables = [] # type: Observables # <<<<<<<<<<<<<< + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_observables = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1659 + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) # <<<<<<<<<<<<<< + * estimated_size += value_estimated_size + * observables += value_observables +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":1658 + * observables = [] # type: Observables + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( # <<<<<<<<<<<<<< + * value.value, nested=nested)) + * estimated_size += value_estimated_size +*/ + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->_value_coder, __pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1657, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + + /* "apache_beam/coders/coder_impl.py":1657 + * estimated_size = 0 + * observables = [] # type: Observables + * value_estimated_size, value_observables = ( # <<<<<<<<<<<<<< + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) +*/ + __pyx_v_value_estimated_size = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_value_observables = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1660 + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) + * estimated_size += value_estimated_size # <<<<<<<<<<<<<< + * observables += value_observables + * estimated_size += ( +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_value_estimated_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1661 + * value.value, nested=nested)) + * estimated_size += value_estimated_size + * observables += value_observables # <<<<<<<<<<<<<< + * estimated_size += ( + * self._timestamp_coder.estimate_size(value.timestamp, nested=True)) +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_value_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1663 + * observables += value_observables + * estimated_size += ( + * self._timestamp_coder.estimate_size(value.timestamp, nested=True)) # <<<<<<<<<<<<<< + * estimated_size += ( + * self._windows_coder.estimate_size(value.windows, nested=True)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_timestamp_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_timestamp_coder, __pyx_t_1, 0, &__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1662 + * estimated_size += value_estimated_size + * observables += value_observables + * estimated_size += ( # <<<<<<<<<<<<<< + * self._timestamp_coder.estimate_size(value.timestamp, nested=True)) + * estimated_size += ( +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1665 + * self._timestamp_coder.estimate_size(value.timestamp, nested=True)) + * estimated_size += ( + * self._windows_coder.estimate_size(value.windows, nested=True)) # <<<<<<<<<<<<<< + * estimated_size += ( + * self._pane_info_coder.estimate_size(value.pane_info, nested=True)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_windows_coder, __pyx_t_1, 0, &__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1664 + * estimated_size += ( + * self._timestamp_coder.estimate_size(value.timestamp, nested=True)) + * estimated_size += ( # <<<<<<<<<<<<<< + * self._windows_coder.estimate_size(value.windows, nested=True)) + * estimated_size += ( +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1667 + * self._windows_coder.estimate_size(value.windows, nested=True)) + * estimated_size += ( + * self._pane_info_coder.estimate_size(value.pane_info, nested=True)) # <<<<<<<<<<<<<< + * return estimated_size, observables + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.nested = 1; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_pane_info_coder, __pyx_t_1, 0, &__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1666 + * estimated_size += ( + * self._windows_coder.estimate_size(value.windows, nested=True)) + * estimated_size += ( # <<<<<<<<<<<<<< + * self._pane_info_coder.estimate_size(value.pane_info, nested=True)) + * return estimated_size, observables +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1668 + * estimated_size += ( + * self._pane_info_coder.estimate_size(value.pane_info, nested=True)) + * return estimated_size, observables # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_estimated_size); + __Pyx_GIVEREF(__pyx_v_estimated_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_estimated_size) != (0)) __PYX_ERR(0, 1668, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_observables); + __Pyx_GIVEREF(__pyx_v_observables); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_observables) != (0)) __PYX_ERR(0, 1668, __pyx_L1_error); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1647 + * pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v_observables); + __Pyx_XDECREF(__pyx_v_value_estimated_size); + __Pyx_XDECREF(__pyx_v_value_observables); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables, "Returns estimated size of value along with any nested observables."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1647, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1647, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 1647, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 1647, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1647, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1647, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self->_pane_info_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_pane_info_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_pane_info_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_timestamp_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_timestamp_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_timestamp_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->_value_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_windows_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_windows_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->_windows_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, None), state +*/ + /*else*/ { + __pyx_t_3 = (((PyObject *)__pyx_v_self->_pane_info_coder) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->_timestamp_coder) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->_value_coder) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->_windows_coder) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None + * if use_setstate: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_113116285); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_113116285); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_113116285) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, None), state + * else: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_113116285); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_113116285); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_113116285) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1679 + * and pane info values during decoding when reconstructing the windowed + * value.""" + * def __init__(self, value_coder, window_coder, payload): # <<<<<<<<<<<<<< + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) + * self._timestamp, self._windows, self._pane_info = self._from_proto( +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value_coder = 0; + PyObject *__pyx_v_window_coder = 0; + PyObject *__pyx_v_payload = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_coder,&__pyx_mstate_global->__pyx_n_u_window_coder,&__pyx_mstate_global->__pyx_n_u_payload,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1679, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1679, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1679, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1679, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1679, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1679, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1679, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1679, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1679, __pyx_L3_error) + } + __pyx_v_value_coder = values[0]; + __pyx_v_window_coder = values[1]; + __pyx_v_payload = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1679, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value_coder, __pyx_v_window_coder, __pyx_v_payload); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_window_coder, PyObject *__pyx_v_payload) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + int64_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1680 + * value.""" + * def __init__(self, value_coder, window_coder, payload): + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) # <<<<<<<<<<<<<< + * self._timestamp, self._windows, self._pane_info = self._from_proto( + * payload, window_coder) +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1680, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_value_coder, ((PyObject *)__pyx_t_4), __pyx_v_window_coder}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1681 + * def __init__(self, value_coder, window_coder, payload): + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) + * self._timestamp, self._windows, self._pane_info = self._from_proto( # <<<<<<<<<<<<<< + * payload, window_coder) + * +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/coders/coder_impl.py":1682 + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) + * self._timestamp, self._windows, self._pane_info = self._from_proto( + * payload, window_coder) # <<<<<<<<<<<<<< + * + * def _from_proto(self, payload, window_coder): +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_payload, __pyx_v_window_coder}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_proto, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1681, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); + index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + + /* "apache_beam/coders/coder_impl.py":1681 + * def __init__(self, value_coder, window_coder, payload): + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) + * self._timestamp, self._windows, self._pane_info = self._from_proto( # <<<<<<<<<<<<<< + * payload, window_coder) + * +*/ + __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_v_self->_timestamp = __pyx_t_8; + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->_windows); + __Pyx_DECREF(__pyx_v_self->_windows); + __pyx_v_self->_windows = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_pane_info); + __Pyx_DECREF((PyObject *)__pyx_v_self->_pane_info); + __pyx_v_self->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1679 + * and pane info values during decoding when reconstructing the windowed + * value.""" + * def __init__(self, value_coder, window_coder, payload): # <<<<<<<<<<<<<< + * super().__init__(value_coder, TimestampCoderImpl(), window_coder) + * self._timestamp, self._windows, self._pane_info = self._from_proto( +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1684 + * payload, window_coder) + * + * def _from_proto(self, payload, window_coder): # <<<<<<<<<<<<<< + * windowed_value_coder = WindowedValueCoderImpl( + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto = {"_from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_payload = 0; + PyObject *__pyx_v_window_coder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_from_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_payload,&__pyx_mstate_global->__pyx_n_u_window_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1684, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1684, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1684, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_proto", 0) < (0)) __PYX_ERR(0, 1684, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_proto", 1, 2, 2, i); __PYX_ERR(0, 1684, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1684, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1684, __pyx_L3_error) + } + __pyx_v_payload = values[0]; + __pyx_v_window_coder = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_from_proto", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1684, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_payload, __pyx_v_window_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_payload, PyObject *__pyx_v_window_coder) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_windowed_value_coder = NULL; + PyObject *__pyx_v_wv = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_from_proto", 0); + + /* "apache_beam/coders/coder_impl.py":1685 + * + * def _from_proto(self, payload, window_coder): + * windowed_value_coder = WindowedValueCoderImpl( # <<<<<<<<<<<<<< + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) + * wv = windowed_value_coder.decode(payload) +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/coders/coder_impl.py":1686 + * def _from_proto(self, payload, window_coder): + * windowed_value_coder = WindowedValueCoderImpl( + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) # <<<<<<<<<<<<<< + * wv = windowed_value_coder.decode(payload) + * return wv.timestamp_micros, wv.windows, wv.pane_info +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1686, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_t_6 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_v_window_coder}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_windowed_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1687 + * windowed_value_coder = WindowedValueCoderImpl( + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) + * wv = windowed_value_coder.decode(payload) # <<<<<<<<<<<<<< + * return wv.timestamp_micros, wv.windows, wv.pane_info + * +*/ + __pyx_t_1 = __pyx_v_payload; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1687, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_windowed_value_coder->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_windowed_value_coder), ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_wv = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1688 + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) + * wv = windowed_value_coder.decode(payload) + * return wv.timestamp_micros, wv.windows, wv.pane_info # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_mstate_global->__pyx_n_u_timestamp_micros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1688, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1688, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 1688, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1684 + * payload, window_coder) + * + * def _from_proto(self, payload, window_coder): # <<<<<<<<<<<<<< + * windowed_value_coder = WindowedValueCoderImpl( + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value_coder); + __Pyx_XDECREF(__pyx_v_wv); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1690 + * return wv.timestamp_micros, wv.windows, wv.pane_info + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * wv = value # type cast + * self._value_coder.encode_to_stream(wv.value, out, nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_wv = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1691 + * + * def encode_to_stream(self, value, out, nested): + * wv = value # type cast # <<<<<<<<<<<<<< + * self._value_coder.encode_to_stream(wv.value, out, nested) + * +*/ + __Pyx_INCREF(__pyx_v_value); + __pyx_v_wv = __pyx_v_value; + + /* "apache_beam/coders/coder_impl.py":1692 + * def encode_to_stream(self, value, out, nested): + * wv = value # type cast + * self._value_coder.encode_to_stream(wv.value, out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->__pyx_base._value_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1690 + * return wv.timestamp_micros, wv.windows, wv.pane_info + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * wv = value # type cast + * self._value_coder.encode_to_stream(wv.value, out, nested) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wv); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1690, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1690, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1690, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1690, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1690, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1690, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1690, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1690, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1690, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1694 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1695 + * + * def decode_from_stream(self, in_stream, nested): + * value = self._value_coder.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * return windowed_value.create( + * value, self._timestamp, self._windows, self._pane_info) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->__pyx_base._value_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1696 + * def decode_from_stream(self, in_stream, nested): + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( # <<<<<<<<<<<<<< + * value, self._timestamp, self._windows, self._pane_info) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1697 + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( + * value, self._timestamp, self._windows, self._pane_info) # <<<<<<<<<<<<<< + * + * def get_estimated_size_and_observables(self, value, nested=False): +*/ + __pyx_t_1 = __pyx_v_self->_windows; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = ((PyObject *)__pyx_v_self->_pane_info); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":1696 + * def decode_from_stream(self, in_stream, nested): + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( # <<<<<<<<<<<<<< + * value, self._timestamp, self._windows, self._pane_info) + * +*/ + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.pane_info = __pyx_t_2; + __pyx_t_4 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_v_self->_timestamp, __pyx_t_1, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1694 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1694, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1694, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1694, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1694, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1694, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1694, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1694, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1694, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1694, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1694, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1699 + * value, self._timestamp, self._windows, self._pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_estimated_size = NULL; + PyObject *__pyx_v_observables = NULL; + PyObject *__pyx_v_value_estimated_size = NULL; + PyObject *__pyx_v_value_observables = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1701 + * def get_estimated_size_and_observables(self, value, nested=False): + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":1704 + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. + * return 0, [(value, self._value_coder)] # <<<<<<<<<<<<<< + * estimated_size = 0 + * observables = [] +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value) != (0)) __PYX_ERR(0, 1704, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._value_coder)) != (0)) __PYX_ERR(0, 1704, __pyx_L1_error); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1704, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1704, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1704, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1701 + * def get_estimated_size_and_observables(self, value, nested=False): + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): # <<<<<<<<<<<<<< + * # Should never be here. + * # TODO(robertwb): Remove when coders are set correctly. +*/ + } + + /* "apache_beam/coders/coder_impl.py":1705 + * # TODO(robertwb): Remove when coders are set correctly. + * return 0, [(value, self._value_coder)] + * estimated_size = 0 # <<<<<<<<<<<<<< + * observables = [] + * value_estimated_size, value_observables = ( +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_estimated_size = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1706 + * return 0, [(value, self._value_coder)] + * estimated_size = 0 + * observables = [] # <<<<<<<<<<<<<< + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_observables = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1709 + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) # <<<<<<<<<<<<<< + * estimated_size += value_estimated_size + * observables += value_observables +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":1708 + * observables = [] + * value_estimated_size, value_observables = ( + * self._value_coder.get_estimated_size_and_observables( # <<<<<<<<<<<<<< + * value.value, nested=nested)) + * estimated_size += value_estimated_size +*/ + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->__pyx_base._value_coder, __pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1707, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1707, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1707, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + + /* "apache_beam/coders/coder_impl.py":1707 + * estimated_size = 0 + * observables = [] + * value_estimated_size, value_observables = ( # <<<<<<<<<<<<<< + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) +*/ + __pyx_v_value_estimated_size = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_value_observables = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1710 + * self._value_coder.get_estimated_size_and_observables( + * value.value, nested=nested)) + * estimated_size += value_estimated_size # <<<<<<<<<<<<<< + * observables += value_observables + * return estimated_size, observables +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_value_estimated_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1711 + * value.value, nested=nested)) + * estimated_size += value_estimated_size + * observables += value_observables # <<<<<<<<<<<<<< + * return estimated_size, observables + * +*/ + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_value_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1712 + * estimated_size += value_estimated_size + * observables += value_observables + * return estimated_size, observables # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_estimated_size); + __Pyx_GIVEREF(__pyx_v_estimated_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_estimated_size) != (0)) __PYX_ERR(0, 1712, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_observables); + __Pyx_GIVEREF(__pyx_v_observables); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_observables) != (0)) __PYX_ERR(0, 1712, __pyx_L1_error); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1699 + * value, self._timestamp, self._windows, self._pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XDECREF(__pyx_v_observables); + __Pyx_XDECREF(__pyx_v_value_estimated_size); + __Pyx_XDECREF(__pyx_v_value_observables); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables, "Returns estimated size of value along with any nested observables."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1699, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1699, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1699, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimated_size_and_observables", 0) < (0)) __PYX_ERR(0, 1699, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, i); __PYX_ERR(0, 1699, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1699, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1699, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1699, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1699, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->__pyx_base.__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.pxd":266 + * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl): + * """A coder for windowed values with constant timestamp, windows and pane info.""" + * cdef readonly libc.stdint.int64_t _timestamp # <<<<<<<<<<<<<< + * cdef readonly object _windows + * cdef readonly windowed_value.PaneInfo _pane_info +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.pxd":267 + * """A coder for windowed values with constant timestamp, windows and pane info.""" + * cdef readonly libc.stdint.int64_t _timestamp + * cdef readonly object _windows # <<<<<<<<<<<<<< + * cdef readonly windowed_value.PaneInfo _pane_info + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_windows); + __pyx_r = __pyx_v_self->_windows; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.pxd":268 + * cdef readonly libc.stdint.int64_t _timestamp + * cdef readonly object _windows + * cdef readonly windowed_value.PaneInfo _pane_info # <<<<<<<<<<<<<< + * + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_pane_info); + __pyx_r = ((PyObject *)__pyx_v_self->_pane_info); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_v_self->_pane_info); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_pane_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_pane_info)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_self->__pyx_base._value_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_windows); + __Pyx_GIVEREF(__pyx_v_self->_windows); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->_windows) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base._windows_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base._windows_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_v_self->__pyx_base._windows_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_pane_info) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._value_coder) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_windows != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._windows_coder) != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None + * if use_setstate: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ParamWindowedValu); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_4374576); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_4374576); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_4374576) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, None), state + * else: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ParamWindowedValu); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_4374576); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_4374576); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_4374576) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1719 + * + * Coder which prefixes the length of the encoded object in the stream.""" + * def __init__(self, value_coder): # <<<<<<<<<<<<<< + * # type: (CoderImpl) -> None + * self._value_coder = value_coder +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value_coder = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1719, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1719, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1719, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 1719, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1719, __pyx_L3_error) + } + __pyx_v_value_coder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1719, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1721 + * def __init__(self, value_coder): + * # type: (CoderImpl) -> None + * self._value_coder = value_coder # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_1 = __pyx_v_value_coder; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1721, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->_value_coder); + __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1719 + * + * Coder which prefixes the length of the encoded object in the stream.""" + * def __init__(self, value_coder): # <<<<<<<<<<<<<< + * # type: (CoderImpl) -> None + * self._value_coder = value_coder +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1723 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * encoded_value = self._value_coder.encode(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_encoded_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1725 + * def encode_to_stream(self, value, out, nested): + * # type: (Any, create_OutputStream, bool) -> None + * encoded_value = self._value_coder.encode(value) # <<<<<<<<<<<<<< + * out.write_var_int64(len(encoded_value)) + * out.write(encoded_value) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode(__pyx_v_self->_value_coder, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_encoded_value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1726 + * # type: (Any, create_OutputStream, bool) -> None + * encoded_value = self._value_coder.encode(value) + * out.write_var_int64(len(encoded_value)) # <<<<<<<<<<<<<< + * out.write(encoded_value) + * +*/ + if (unlikely(__pyx_v_encoded_value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1726, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_GET_SIZE(__pyx_v_encoded_value); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1726, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1727 + * encoded_value = self._value_coder.encode(value) + * out.write_var_int64(len(encoded_value)) + * out.write(encoded_value) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, __pyx_v_encoded_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1723 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * encoded_value = self._value_coder.encode(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_encoded_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1723, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1723, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1723, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1723, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1723, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1723, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1723, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1723, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1723, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1723, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1729 + * out.write(encoded_value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * value_length = in_stream.read_var_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int64_t __pyx_v_value_length; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1731 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> Any + * value_length = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * return self._value_coder.decode(in_stream.read(value_length)) + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L1_error) + __pyx_v_value_length = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":1732 + * # type: (create_InputStream, bool) -> Any + * value_length = in_stream.read_var_int64() + * return self._value_coder.decode(in_stream.read(value_length)) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_value_length, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode(__pyx_v_self->_value_coder, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1729 + * out.write(encoded_value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * value_length = in_stream.read_var_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1729, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1729, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1729, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1729, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 1729, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1729, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1729, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1729, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1729, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1734 + * return self._value_coder.decode(in_stream.read(value_length)) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_v_value_size = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1736 + * def estimate_size(self, value, nested=False): + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) # <<<<<<<<<<<<<< + * return get_varint_size(value_size) + value_size + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_value_coder, __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_value_size = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1737 + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) + * return get_varint_size(value_size) + value_size # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value_size}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_value_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1734 + * return self._value_coder.decode(in_stream.read(value_length)) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1734, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1734, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1734, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1734, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, i); __PYX_ERR(0, 1734, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1734, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1734, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value = values[0]; + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1734, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1734, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._value_coder,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self->_value_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_value_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_value_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._value_coder,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._value_coder,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._value_coder is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._value_coder,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._value_coder is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, None), state +*/ + /*else*/ { + __pyx_t_2 = (((PyObject *)__pyx_v_self->_value_coder) != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._value_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._value_coder is not None + * if use_setstate: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LengthPrefixCoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_134056825); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_134056825); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_134056825) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._value_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, None), state + * else: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LengthPrefixCoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_134056825); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_134056825); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_134056825) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1749 + * encoded user key + * """ + * def __init__(self, key_coder_impl): # <<<<<<<<<<<<<< + * self._shard_id_coder_impl = BytesCoderImpl() + * self._key_coder_impl = key_coder_impl +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_key_coder_impl = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_key_coder_impl,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1749, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1749, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1749, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1749, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1749, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1749, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1749, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_key_coder_impl = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1749, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_key_coder_impl); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1750 + * """ + * def __init__(self, key_coder_impl): + * self._shard_id_coder_impl = BytesCoderImpl() # <<<<<<<<<<<<<< + * self._key_coder_impl = key_coder_impl + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_shard_id_coder_impl, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1751 + * def __init__(self, key_coder_impl): + * self._shard_id_coder_impl = BytesCoderImpl() + * self._key_coder_impl = key_coder_impl # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2, __pyx_v_key_coder_impl) < (0)) __PYX_ERR(0, 1751, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1749 + * encoded user key + * """ + * def __init__(self, key_coder_impl): # <<<<<<<<<<<<<< + * self._shard_id_coder_impl = BytesCoderImpl() + * self._key_coder_impl = key_coder_impl +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1753 + * self._key_coder_impl = key_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (ShardedKey, create_OutputStream, bool) -> None + * self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_out = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1753, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1753, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1753, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1753, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1753, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1753, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, i); __PYX_ERR(0, 1753, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1753, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1753, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1753, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1753, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_out = values[2]; + __pyx_v_nested = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1753, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1755 + * def encode_to_stream(self, value, out, nested): + * # type: (ShardedKey, create_OutputStream, bool) -> None + * self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True) # <<<<<<<<<<<<<< + * self._key_coder_impl.encode_to_stream(value.key, out, True) + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_shard_id_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_shard_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1756 + * # type: (ShardedKey, create_OutputStream, bool) -> None + * self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True) + * self._key_coder_impl.encode_to_stream(value.key, out, True) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_2, __pyx_v_out, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1753 + * self._key_coder_impl = key_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (ShardedKey, create_OutputStream, bool) -> None + * self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1758 + * self._key_coder_impl.encode_to_stream(value.key, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> ShardedKey + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_in_stream = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1758, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1758, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1758, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1758, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1758, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, i); __PYX_ERR(0, 1758, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1758, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1758, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1758, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_in_stream = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1758, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_v_shard_id = NULL; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1760 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> ShardedKey + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * key = self._key_coder_impl.decode_from_stream(in_stream, True) + * return ShardedKey(key=key, shard_id=shard_id) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_shard_id_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_shard_id = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1761 + * # type: (create_InputStream, bool) -> ShardedKey + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) + * key = self._key_coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * return ShardedKey(key=key, shard_id=shard_id) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_in_stream, Py_True}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1762 + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) + * key = self._key_coder_impl.decode_from_stream(in_stream, True) + * return ShardedKey(key=key, shard_id=shard_id) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value, nested=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ShardedKey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_key, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1762, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shard_id_2, __pyx_v_shard_id, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1762, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1758 + * self._key_coder_impl.encode_to_stream(value.key, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> ShardedKey + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_shard_id); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1764 + * return ShardedKey(key=key, shard_id=shard_id) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * estimated_size = 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1764, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1764, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, i); __PYX_ERR(0, 1764, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1764, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1764, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1764, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_v_estimated_size = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + + /* "apache_beam/coders/coder_impl.py":1766 + * def estimate_size(self, value, nested=False): + * # type: (Any, bool) -> int + * estimated_size = 0 # <<<<<<<<<<<<<< + * estimated_size += ( + * self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True)) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_estimated_size = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1768 + * estimated_size = 0 + * estimated_size += ( + * self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True)) # <<<<<<<<<<<<<< + * estimated_size += ( + * self._key_coder_impl.estimate_size(value.key, nested=True)) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_shard_id_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_shard_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nested, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1768, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/coders/coder_impl.py":1767 + * # type: (Any, bool) -> int + * estimated_size = 0 + * estimated_size += ( # <<<<<<<<<<<<<< + * self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True)) + * estimated_size += ( +*/ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1770 + * self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True)) + * estimated_size += ( + * self._key_coder_impl.estimate_size(value.key, nested=True)) # <<<<<<<<<<<<<< + * return estimated_size + * +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_coder_impl_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nested, Py_True, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1770, __pyx_L1_error) + __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/coders/coder_impl.py":1769 + * estimated_size += ( + * self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True)) + * estimated_size += ( # <<<<<<<<<<<<<< + * self._key_coder_impl.estimate_size(value.key, nested=True)) + * return estimated_size +*/ + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":1771 + * estimated_size += ( + * self._key_coder_impl.estimate_size(value.key, nested=True)) + * return estimated_size # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_estimated_size); + __pyx_r = __pyx_v_estimated_size; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1764 + * return ShardedKey(key=key, shard_id=shard_id) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * estimated_size = 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_estimated_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1784 + * encoded window using it's own coder. + * """ + * def __init__(self, window_coder_impl: CoderImpl) -> None: # <<<<<<<<<<<<<< + * self._window_coder_impl = window_coder_impl + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_window_coder_impl,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1784, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1784, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1784, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1784, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1784, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1784, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1784, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_window_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1784, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window_coder_impl), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, 0, "window_coder_impl", 0))) __PYX_ERR(0, 1784, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_window_coder_impl); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1785 + * """ + * def __init__(self, window_coder_impl: CoderImpl) -> None: + * self._window_coder_impl = window_coder_impl # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, stream, nested): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_window_coder_impl_2, ((PyObject *)__pyx_v_window_coder_impl)) < (0)) __PYX_ERR(0, 1785, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1784 + * encoded window using it's own coder. + * """ + * def __init__(self, window_coder_impl: CoderImpl) -> None: # <<<<<<<<<<<<<< + * self._window_coder_impl = window_coder_impl + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1787 + * self._window_coder_impl = window_coder_impl + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested) + * self._window_coder_impl.encode_to_stream(value, stream, nested) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_stream = 0; + PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1787, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1787, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1787, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1787, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1787, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1787, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, i); __PYX_ERR(0, 1787, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1787, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1787, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1787, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1787, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_stream = values[2]; + __pyx_v_nested = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1787, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1788 + * + * def encode_to_stream(self, value, stream, nested): + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested) # <<<<<<<<<<<<<< + * self._window_coder_impl.encode_to_stream(value, stream, nested) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_max_timestamp, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nested); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_t_2, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream), __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1789 + * def encode_to_stream(self, value, stream, nested): + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested) + * self._window_coder_impl.encode_to_stream(value, stream, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_window_coder_impl_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_value, __pyx_v_stream, __pyx_v_nested}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1787 + * self._window_coder_impl = window_coder_impl + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested) + * self._window_coder_impl.encode_to_stream(value, stream, nested) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1791 + * self._window_coder_impl.encode_to_stream(value, stream, nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().decode_from_stream(stream, nested) + * return self._window_coder_impl.decode_from_stream(stream, nested) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_stream = 0; + PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1791, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1791, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1791, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, i); __PYX_ERR(0, 1791, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1791, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1791, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1791, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_stream = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1791, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1792 + * + * def decode_from_stream(self, stream, nested): + * TimestampCoderImpl().decode_from_stream(stream, nested) # <<<<<<<<<<<<<< + * return self._window_coder_impl.decode_from_stream(stream, nested) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 1792, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_nested); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1792, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream), __pyx_t_4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1793 + * def decode_from_stream(self, stream, nested): + * TimestampCoderImpl().decode_from_stream(stream, nested) + * return self._window_coder_impl.decode_from_stream(stream, nested) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_window_coder_impl_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_stream, __pyx_v_nested}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1791 + * self._window_coder_impl.encode_to_stream(value, stream, nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().decode_from_stream(stream, nested) + * return self._window_coder_impl.decode_from_stream(stream, nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1795 + * return self._window_coder_impl.decode_from_stream(stream, nested) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1795, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1795, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1795, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1795, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1795, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, i); __PYX_ERR(0, 1795, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1795, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1795, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1795, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + if (values[2]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1795, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)((int)0)); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1795, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + + /* "apache_beam/coders/coder_impl.py":1796 + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( # <<<<<<<<<<<<<< + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + + * self._window_coder_impl.estimate_size(value, nested)) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1797 + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + # <<<<<<<<<<<<<< + * self._window_coder_impl.estimate_size(value, nested)) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1797, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_max_timestamp, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_t_2, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1798 + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + + * self._window_coder_impl.estimate_size(value, nested)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_window_coder_impl_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_value, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/coders/coder_impl.py":1797 + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + # <<<<<<<<<<<<<< + * self._window_coder_impl.estimate_size(value, nested)) + * +*/ + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 1) < (0)) __PYX_ERR(0, 1797, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1795 + * return self._window_coder_impl.decode_from_stream(stream, nested) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1804 + * + * + * def _create_opaque_window(end, encoded_window): # <<<<<<<<<<<<<< + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11_create_opaque_window(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_11_create_opaque_window = {"_create_opaque_window", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_11_create_opaque_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11_create_opaque_window(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_end = 0; + PyObject *__pyx_v_encoded_window = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_create_opaque_window (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_encoded_window,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1804, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1804, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1804, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_create_opaque_window", 0) < (0)) __PYX_ERR(0, 1804, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_create_opaque_window", 1, 2, 2, i); __PYX_ERR(0, 1804, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1804, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1804, __pyx_L3_error) + } + __pyx_v_end = values[0]; + __pyx_v_encoded_window = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_create_opaque_window", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1804, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_10_create_opaque_window(__pyx_self, __pyx_v_end, __pyx_v_encoded_window); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1811 + * + * class _OpaqueWindow(BoundedWindow): + * def __init__(self, end, encoded_window): # <<<<<<<<<<<<<< + * super().__init__(end) + * self.encoded_window = encoded_window +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_end = 0; + PyObject *__pyx_v_encoded_window = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_encoded_window,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1811, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1811, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1811, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1811, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1811, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1811, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1811, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1811, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1811, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_end = values[1]; + __pyx_v_encoded_window = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1811, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow___init__(__pyx_self, __pyx_v_self, __pyx_v_end, __pyx_v_encoded_window); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_end, PyObject *__pyx_v_encoded_window) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1812 + * class _OpaqueWindow(BoundedWindow): + * def __init__(self, end, encoded_window): + * super().__init__(end) # <<<<<<<<<<<<<< + * self.encoded_window = encoded_window + * +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_5) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(0, 1812, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_end}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1813 + * def __init__(self, end, encoded_window): + * super().__init__(end) + * self.encoded_window = encoded_window # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoded_window, __pyx_v_encoded_window) < (0)) __PYX_ERR(0, 1813, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1811 + * + * class _OpaqueWindow(BoundedWindow): + * def __init__(self, end, encoded_window): # <<<<<<<<<<<<<< + * super().__init__(end) + * self.encoded_window = encoded_window +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1815 + * self.encoded_window = encoded_window + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_3__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_3__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_3__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1815, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1815, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 1815, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 1815, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1815, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1815, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_2__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/coders/coder_impl.py":1816 + * + * def __repr__(self): + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_OpaqueWindow; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__11; + __pyx_t_4[3] = __pyx_t_3; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1815 + * self.encoded_window = encoded_window + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1818 + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.encoded_window) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1818, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 1818, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 1818, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1818, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1818, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/coders/coder_impl.py":1819 + * + * def __hash__(self): + * return hash(self.encoded_window) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 1819, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1818 + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.encoded_window) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1821 + * return hash(self.encoded_window) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * type(self) == type(other) and self.end == other.end and +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_7__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_7__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_7__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_7__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1821, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1821, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1821, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 1821, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 1821, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1821, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1821, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1821, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_6__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/coders/coder_impl.py":1822 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * type(self) == type(other) and self.end == other.end and + * self.encoded_window == other.encoded_window) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1823 + * def __eq__(self, other): + * return ( + * type(self) == type(other) and self.end == other.end and # <<<<<<<<<<<<<< + * self.encoded_window == other.encoded_window) + * +*/ + __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_self)), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1823, __pyx_L1_error) + if (__pyx_t_3) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1823, __pyx_L1_error) + if (__pyx_t_3) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":1824 + * return ( + * type(self) == type(other) and self.end == other.end and + * self.encoded_window == other.encoded_window) # <<<<<<<<<<<<<< + * + * return _OpaqueWindow(end, encoded_window) +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1821 + * return hash(self.encoded_window) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * type(self) == type(other) and self.end == other.end and +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window._OpaqueWindow.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1804 + * + * + * def _create_opaque_window(end, encoded_window): # <<<<<<<<<<<<<< + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_10_create_opaque_window(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_end, PyObject *__pyx_v_encoded_window) { + PyObject *__pyx_v_BoundedWindow = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_create_opaque_window", 0); + + /* "apache_beam/coders/coder_impl.py":1807 + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow + * if _OpaqueWindow is None: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import BoundedWindow + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1 == Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/coders/coder_impl.py":1808 + * global _OpaqueWindow + * if _OpaqueWindow is None: + * from apache_beam.transforms.window import BoundedWindow # <<<<<<<<<<<<<< + * + * class _OpaqueWindow(BoundedWindow): +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedWindow}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedWindow}; + __pyx_t_4 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_4) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __pyx_v_BoundedWindow = __pyx_t_5; + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1810 + * from apache_beam.transforms.window import BoundedWindow + * + * class _OpaqueWindow(BoundedWindow): # <<<<<<<<<<<<<< + * def __init__(self, end, encoded_window): + * super().__init__(end) +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_BoundedWindow); + __Pyx_GIVEREF(__pyx_v_BoundedWindow); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_BoundedWindow) != (0)) __PYX_ERR(0, 1810, __pyx_L1_error); + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5 != __pyx_t_1) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_1) < 0))) __PYX_ERR(0, 1810, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/coders/coder_impl.py":1811 + * + * class _OpaqueWindow(BoundedWindow): + * def __init__(self, end, encoded_window): # <<<<<<<<<<<<<< + * super().__init__(end) + * self.encoded_window = encoded_window +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_1__init__, 0, __pyx_mstate_global->__pyx_n_u_OpaqueWindow___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + PyList_Append(__pyx_t_1, __pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_8) < (0)) __PYX_ERR(0, 1811, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/coders/coder_impl.py":1815 + * self.encoded_window = encoded_window + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_3__repr__, 0, __pyx_mstate_global->__pyx_n_u_OpaqueWindow___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_8) < (0)) __PYX_ERR(0, 1815, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/coders/coder_impl.py":1818 + * return 'OpaqueWindow(%s, %s)' % (self.end, self.encoded_window) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.encoded_window) + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_OpaqueWindow___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_8) < (0)) __PYX_ERR(0, 1818, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/coders/coder_impl.py":1821 + * return hash(self.encoded_window) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * type(self) == type(other) and self.end == other.end and +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21_create_opaque_window_13_OpaqueWindow_7__eq__, 0, __pyx_mstate_global->__pyx_n_u_OpaqueWindow___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_8) < (0)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/coders/coder_impl.py":1810 + * from apache_beam.transforms.window import BoundedWindow + * + * class _OpaqueWindow(BoundedWindow): # <<<<<<<<<<<<<< + * def __init__(self, end, encoded_window): + * super().__init__(end) +*/ + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2, __pyx_t_5, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_CyFunction_InitClassCell(__pyx_t_1, __pyx_t_8) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2, __pyx_t_8) < (0)) __PYX_ERR(0, 1810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1807 + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow + * if _OpaqueWindow is None: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import BoundedWindow + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":1826 + * self.encoded_window == other.encoded_window) + * + * return _OpaqueWindow(end, encoded_window) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_end, __pyx_v_encoded_window}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1804 + * + * + * def _create_opaque_window(end, encoded_window): # <<<<<<<<<<<<<< + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.coders.coder_impl._create_opaque_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_BoundedWindow); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1839 + * length prefixed encoded window + * """ + * def __init__(self) -> None: # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1839, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1839, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1839, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 1839, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1839, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1839, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl___init__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1842 + * pass + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, True) + * stream.write(value.encoded_window, True) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_stream = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1842, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1842, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1842, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1842, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1842, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1842, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, i); __PYX_ERR(0, 1842, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1842, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1842, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1842, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1842, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_stream = values[2]; + __pyx_v_nested = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1842, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1843 + * + * def encode_to_stream(self, value, stream, nested): + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, True) # <<<<<<<<<<<<<< + * stream.write(value.encoded_window, True) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_max_timestamp, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1843, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_t_2, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream), 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1844 + * def encode_to_stream(self, value, stream, nested): + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, True) + * stream.write(value.encoded_window, True) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, stream, nested): +*/ + __pyx_t_2 = __pyx_v_stream; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_1, Py_True}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1842 + * pass + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, True) + * stream.write(value.encoded_window, True) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1846 + * stream.write(value.encoded_window, True) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) + * return _create_opaque_window( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_stream = 0; + CYTHON_UNUSED PyObject *__pyx_v_nested = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1846, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1846, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1846, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1846, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 1846, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, i); __PYX_ERR(0, 1846, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1846, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1846, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1846, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_stream = values[1]; + __pyx_v_nested = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1846, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) { + PyObject *__pyx_v_max_timestamp = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1847 + * + * def decode_from_stream(self, stream, nested): + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) # <<<<<<<<<<<<<< + * return _create_opaque_window( + * max_timestamp.successor(), stream.read_all(True)) +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 1847, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream), 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_max_timestamp = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1848 + * def decode_from_stream(self, stream, nested): + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) + * return _create_opaque_window( # <<<<<<<<<<<<<< + * max_timestamp.successor(), stream.read_all(True)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create_opaque_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":1849 + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) + * return _create_opaque_window( + * max_timestamp.successor(), stream.read_all(True)) # <<<<<<<<<<<<<< + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: +*/ + __pyx_t_6 = __pyx_v_max_timestamp; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_successor, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_7 = __pyx_v_stream; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, Py_True}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_all, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1846 + * stream.write(value.encoded_window, True) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) + * return _create_opaque_window( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_max_timestamp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1851 + * max_timestamp.successor(), stream.read_all(True)) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_7estimate_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_7estimate_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + CYTHON_UNUSED int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1851, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1851, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1851, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1851, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "estimate_size", 0) < (0)) __PYX_ERR(0, 1851, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, i); __PYX_ERR(0, 1851, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1851, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1851, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1851, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + if (values[2]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)((int)0)); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1851, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("estimate_size", 0); + + /* "apache_beam/coders/coder_impl.py":1852 + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( # <<<<<<<<<<<<<< + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + + * len(value.encoded_window)) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1853 + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + # <<<<<<<<<<<<<< + * len(value.encoded_window)) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_max_timestamp, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_t_2, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1854 + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + + * len(value.encoded_window)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_encoded_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":1853 + * def estimate_size(self, value: Any, nested: bool = False) -> int: + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + # <<<<<<<<<<<<<< + * len(value.encoded_window)) + * +*/ + __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 1) < (0)) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1851 + * max_timestamp.successor(), stream.read_all(True)) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingOpaqueWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1863 + * ROW_ENCODERS = {1: 12345} + * + * @classmethod # <<<<<<<<<<<<<< + * def register(cls, field_type, coder_impl): + * cls.ROW_ENCODERS[field_type, coder_impl] = cls +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register(PyObject *__pyx_v_cls, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register = {"register", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register(PyObject *__pyx_v_cls, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_field_type = 0; + PyObject *__pyx_v_coder_impl = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("register (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_field_type,&__pyx_mstate_global->__pyx_n_u_coder_impl,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1863, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1863, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1863, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register", 0) < (0)) __PYX_ERR(0, 1863, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, i); __PYX_ERR(0, 1863, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1863, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1863, __pyx_L3_error) + } + __pyx_v_field_type = values[0]; + __pyx_v_coder_impl = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1863, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(((PyTypeObject*)__pyx_v_cls), __pyx_v_field_type, __pyx_v_coder_impl); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("register", 0); + + /* "apache_beam/coders/coder_impl.py":1865 + * @classmethod + * def register(cls, field_type, coder_impl): + * cls.ROW_ENCODERS[field_type, coder_impl] = cls # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_n_u_ROW_ENCODERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_field_type); + __Pyx_GIVEREF(__pyx_v_field_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field_type) != (0)) __PYX_ERR(0, 1865, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_coder_impl); + __Pyx_GIVEREF(__pyx_v_coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_coder_impl) != (0)) __PYX_ERR(0, 1865, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_v_cls)) < 0))) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1863 + * ROW_ENCODERS = {1: 12345} + * + * @classmethod # <<<<<<<<<<<<<< + * def register(cls, field_type, coder_impl): + * cls.ROW_ENCODERS[field_type, coder_impl] = cls +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1867 + * cls.ROW_ENCODERS[field_type, coder_impl] = cls + * + * @classmethod # <<<<<<<<<<<<<< + * def create(cls, field_type, coder_impl, column): + * global row_coders_registered +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create(PyObject *__pyx_v_cls, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create(PyObject *__pyx_v_cls, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_field_type = 0; + PyObject *__pyx_v_coder_impl = 0; + PyObject *__pyx_v_column = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_field_type,&__pyx_mstate_global->__pyx_n_u_coder_impl,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1867, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1867, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1867, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1867, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(0, 1867, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 1, 3, 3, i); __PYX_ERR(0, 1867, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1867, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1867, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1867, __pyx_L3_error) + } + __pyx_v_field_type = values[0]; + __pyx_v_coder_impl = values[1]; + __pyx_v_column = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1867, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(((PyTypeObject*)__pyx_v_cls), __pyx_v_field_type, __pyx_v_coder_impl, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column) { + CYTHON_UNUSED PyObject *__pyx_v_coder_impl_row_encoders = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + size_t __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + + /* "apache_beam/coders/coder_impl.py":1870 + * def create(cls, field_type, coder_impl, column): + * global row_coders_registered + * if not row_coders_registered: # <<<<<<<<<<<<<< + * try: + * # pylint: disable=unused-import +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_row_coders_registered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "apache_beam/coders/coder_impl.py":1871 + * global row_coders_registered + * if not row_coders_registered: + * try: # <<<<<<<<<<<<<< + * # pylint: disable=unused-import + * from apache_beam.coders import coder_impl_row_encoders +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":1873 + * try: + * # pylint: disable=unused-import + * from apache_beam.coders import coder_impl_row_encoders # <<<<<<<<<<<<<< + * except ImportError: + * pass +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coder_impl_row_encoders}; + __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1873, __pyx_L4_error) + } + __pyx_t_1 = __pyx_t_7; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coder_impl_row_encoders}; + __pyx_t_8 = 0; { + __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_8]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1873, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_9); + switch (__pyx_t_8) { + case 0: + __Pyx_INCREF(__pyx_t_9); + __pyx_v_coder_impl_row_encoders = __pyx_t_9; + break; + default:; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1871 + * global row_coders_registered + * if not row_coders_registered: + * try: # <<<<<<<<<<<<<< + * # pylint: disable=unused-import + * from apache_beam.coders import coder_impl_row_encoders +*/ + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/coders/coder_impl.py":1874 + * # pylint: disable=unused-import + * from apache_beam.coders import coder_impl_row_encoders + * except ImportError: # <<<<<<<<<<<<<< + * pass + * row_coders_registered = True +*/ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L5_exception_handled; + } + goto __pyx_L6_except_error; + + /* "apache_beam/coders/coder_impl.py":1871 + * global row_coders_registered + * if not row_coders_registered: + * try: # <<<<<<<<<<<<<< + * # pylint: disable=unused-import + * from apache_beam.coders import coder_impl_row_encoders +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + __pyx_L9_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":1876 + * except ImportError: + * pass + * row_coders_registered = True # <<<<<<<<<<<<<< + * return cls.ROW_ENCODERS.get((field_type, column.dtype), + * GenericRowColumnEncoder)(coder_impl, column) +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_row_coders_registered, Py_True) < (0)) __PYX_ERR(0, 1876, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1870 + * def create(cls, field_type, coder_impl, column): + * global row_coders_registered + * if not row_coders_registered: # <<<<<<<<<<<<<< + * try: + * # pylint: disable=unused-import +*/ + } + + /* "apache_beam/coders/coder_impl.py":1877 + * pass + * row_coders_registered = True + * return cls.ROW_ENCODERS.get((field_type, column.dtype), # <<<<<<<<<<<<<< + * GenericRowColumnEncoder)(coder_impl, column) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1878 + * row_coders_registered = True + * return cls.ROW_ENCODERS.get((field_type, column.dtype), + * GenericRowColumnEncoder)(coder_impl, column) # <<<<<<<<<<<<<< + * + * def null_flags(self): +*/ + __pyx_t_9 = NULL; + + /* "apache_beam/coders/coder_impl.py":1877 + * pass + * row_coders_registered = True + * return cls.ROW_ENCODERS.get((field_type, column.dtype), # <<<<<<<<<<<<<< + * GenericRowColumnEncoder)(coder_impl, column) + * +*/ + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_n_u_ROW_ENCODERS); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __pyx_t_13; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(__pyx_v_field_type); + __Pyx_GIVEREF(__pyx_v_field_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_field_type) != (0)) __PYX_ERR(0, 1877, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_14); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_14) != (0)) __PYX_ERR(0, 1877, __pyx_L1_error); + __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":1878 + * row_coders_registered = True + * return cls.ROW_ENCODERS.get((field_type, column.dtype), + * GenericRowColumnEncoder)(coder_impl, column) # <<<<<<<<<<<<<< + * + * def null_flags(self): +*/ + __pyx_t_16 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_15, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_16, (3-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_16 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_16 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_coder_impl, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_16, (3-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1867 + * cls.ROW_ENCODERS[field_type, coder_impl] = cls + * + * @classmethod # <<<<<<<<<<<<<< + * def create(cls, field_type, coder_impl, column): + * global row_coders_registered +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_coder_impl_row_encoders); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1880 + * GenericRowColumnEncoder)(coder_impl, column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags = {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("null_flags (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("null_flags", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("null_flags", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("null_flags", 0); + + /* "apache_beam/coders/coder_impl.py":1881 + * + * def null_flags(self): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, index, out): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1881, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1880 + * GenericRowColumnEncoder)(coder_impl, column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.null_flags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1883 + * raise NotImplementedError(type(self)) + * + * def encode_to_stream(self, index, out): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1884 + * + * def encode_to_stream(self, index, out): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, index, in_stream): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1884, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1883 + * raise NotImplementedError(type(self)) + * + * def encode_to_stream(self, index, out): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1886 + * raise NotImplementedError(type(self)) + * + * def decode_from_stream(self, index, in_stream): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1887 + * + * def decode_from_stream(self, index, in_stream): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * def finalize_write(self): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1887, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1886 + * raise NotImplementedError(type(self)) + * + * def decode_from_stream(self, index, in_stream): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1889 + * raise NotImplementedError(type(self)) + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write = {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize_write", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize_write", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize_write", 0); + + /* "apache_beam/coders/coder_impl.py":1890 + * + * def finalize_write(self): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1890, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1889 + * raise NotImplementedError(type(self)) + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.finalize_write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowColumnEncoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowColumnEncoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1894 + * + * class GenericRowColumnEncoder(RowColumnEncoder): + * def __init__(self, coder_impl, column): # <<<<<<<<<<<<<< + * self.coder_impl = coder_impl + * self.column = column +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_coder_impl = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_coder_impl,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1894, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1894, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1894, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1894, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1894, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1894, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1894, __pyx_L3_error) + } + __pyx_v_coder_impl = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1894, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self), __pyx_v_coder_impl, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":1895 + * class GenericRowColumnEncoder(RowColumnEncoder): + * def __init__(self, coder_impl, column): + * self.coder_impl = coder_impl # <<<<<<<<<<<<<< + * self.column = column + * +*/ + __pyx_t_1 = __pyx_v_coder_impl; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1895, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v_self->coder_impl); + __pyx_v_self->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1896 + * def __init__(self, coder_impl, column): + * self.coder_impl = coder_impl + * self.column = column # <<<<<<<<<<<<<< + * + * def null_flags(self): +*/ + __Pyx_INCREF(__pyx_v_column); + __Pyx_GIVEREF(__pyx_v_column); + __Pyx_GOTREF(__pyx_v_self->column); + __Pyx_DECREF(__pyx_v_self->column); + __pyx_v_self->column = __pyx_v_column; + + /* "apache_beam/coders/coder_impl.py":1894 + * + * class GenericRowColumnEncoder(RowColumnEncoder): + * def __init__(self, coder_impl, column): # <<<<<<<<<<<<<< + * self.coder_impl = coder_impl + * self.column = column +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1898 + * self.column = column + * + * def null_flags(self): # <<<<<<<<<<<<<< + * # pylint: disable=singleton-comparison + * return self.column == None # This is an array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags = {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("null_flags (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("null_flags", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("null_flags", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("null_flags", 0); + + /* "apache_beam/coders/coder_impl.py":1900 + * def null_flags(self): + * # pylint: disable=singleton-comparison + * return self.column == None # This is an array. # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, index, out): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->column, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error) + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1898 + * self.column = column + * + * def null_flags(self): # <<<<<<<<<<<<<< + * # pylint: disable=singleton-comparison + * return self.column == None # This is an array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.null_flags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1902 + * return self.column == None # This is an array. + * + * def encode_to_stream(self, index, out): # <<<<<<<<<<<<<< + * self.coder_impl.encode_to_stream(self.column[index], out, True) + * +*/ + +static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1903 + * + * def encode_to_stream(self, index, out): + * self.coder_impl.encode_to_stream(self.column[index], out, True) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, index, in_stream): +*/ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->column, __pyx_v_index, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->coder_impl, __pyx_t_1, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1902 + * return self.column == None # This is an array. + * + * def encode_to_stream(self, index, out): # <<<<<<<<<<<<<< + * self.coder_impl.encode_to_stream(self.column[index], out, True) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1905 + * self.coder_impl.encode_to_stream(self.column[index], out, True) + * + * def decode_from_stream(self, index, in_stream): # <<<<<<<<<<<<<< + * self.column[index] = self.coder_impl.decode_from_stream(in_stream, True) + * +*/ + +static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + + /* "apache_beam/coders/coder_impl.py":1906 + * + * def decode_from_stream(self, index, in_stream): + * self.column[index] = self.coder_impl.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * + * def finalize_write(self): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->coder_impl, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((__Pyx_SetItemInt(__pyx_v_self->column, __pyx_v_index, __pyx_t_1, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 1906, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1905 + * self.coder_impl.encode_to_stream(self.column[index], out, True) + * + * def decode_from_stream(self, index, in_stream): # <<<<<<<<<<<<<< + * self.column[index] = self.coder_impl.decode_from_stream(in_stream, True) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1908 + * self.column[index] = self.coder_impl.decode_from_stream(in_stream, True) + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write = {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize_write", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize_write", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_write", 0); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.coder_impl, self.column) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self->coder_impl); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->coder_impl)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->column); + __Pyx_GIVEREF(__pyx_v_self->column); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->column) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.coder_impl, self.column) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.coder_impl, self.column) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.coder_impl is not None or self.column is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.coder_impl, self.column) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.coder_impl is not None or self.column is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, None), state +*/ + /*else*/ { + __pyx_t_3 = (((PyObject *)__pyx_v_self->coder_impl) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->column != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder_impl is not None or self.column is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.coder_impl is not None or self.column is not None + * if use_setstate: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GenericRowColumnE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_112010984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_112010984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_112010984) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder_impl is not None or self.column is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, None), state + * else: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GenericRowColumnE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_112010984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_112010984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_112010984) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1914 + * class RowCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): # <<<<<<<<<<<<<< + * self.schema = schema + * self.num_fields = len(self.schema.fields) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_schema = 0; + PyObject *__pyx_v_components = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_schema,&__pyx_mstate_global->__pyx_n_u_components,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1914, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1914, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1914, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1914, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1914, __pyx_L3_error) + } + __pyx_v_schema = values[0]; + __pyx_v_components = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1914, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_schema, __pyx_v_components); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":1924 + * # should never be duplicate encoding positions. + * enc_posx = list( + * set(field.encoding_position for field in self.schema.fields)) # <<<<<<<<<<<<<< + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1924, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1924, __pyx_L1_error) + __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1924, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1924, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1924, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1924, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_mstate_global->__pyx_n_u_encoding_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":1932 + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( + * field.encoding_position for field in self.schema.fields) # <<<<<<<<<<<<<< + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) + * self.encoding_positions_are_trivial = self.encoding_positions == list( +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1932, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1932, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1932, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1932, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1932, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1932, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_mstate_global->__pyx_n_u_encoding_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":1937 + * range(len(self.encoding_positions))) + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() # <<<<<<<<<<<<<< + * for i in self.encoding_positions) + * self.has_nullable_fields = any( +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1937, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *) __pyx_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1937, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1938 + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) # <<<<<<<<<<<<<< + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) +*/ + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1938, __pyx_L1_error) } + if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1938, __pyx_L1_error) + } + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1938, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1937 + * range(len(self.encoding_positions))) + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() # <<<<<<<<<<<<<< + * for i in self.encoding_positions) + * self.has_nullable_fields = any( +*/ + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_components)) { __Pyx_RaiseClosureNameError("components"); __PYX_ERR(0, 1937, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1937, __pyx_L1_error) } + __pyx_t_6 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->encoding_positions; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_i}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_components, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1938 + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) # <<<<<<<<<<<<<< + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/coders/coder_impl.py":1937 + * range(len(self.encoding_positions))) + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() # <<<<<<<<<<<<<< + * for i in self.encoding_positions) + * self.has_nullable_fields = any( +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/coders/coder_impl.py":1940 + * for i in self.encoding_positions) + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1940, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1940, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1940, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1940, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1940, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1940, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/coders/coder_impl.py":1939 + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) + * self.has_nullable_fields = any( # <<<<<<<<<<<<<< + * field.type.nullable for field in self.schema.fields) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1940 + * for i in self.encoding_positions) + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + + /* "apache_beam/coders/coder_impl.py":1939 + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) + * self.has_nullable_fields = any( # <<<<<<<<<<<<<< + * field.type.nullable for field in self.schema.fields) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":1940 + * for i in self.encoding_positions) + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1914 + * class RowCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): # <<<<<<<<<<<<<< + * self.schema = schema + * self.num_fields = len(self.schema.fields) +*/ + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_components) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *__pyx_cur_scope; + PyObject *__pyx_v_enc_posx = NULL; + PyObject *__pyx_v_names_no_pos = NULL; + PyObject *__pyx_8genexpr8__pyx_v_f = NULL; + PyObject *__pyx_8genexpr9__pyx_v_field = NULL; + PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator3 = 0; + PyObject *__pyx_9genexpr11__pyx_v_f = NULL; + PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator4 = 0; + PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator5 = 0; + PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator6 = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10[4]; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1914, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __pyx_cur_scope->__pyx_v_components = __pyx_v_components; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_components); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_components); + + /* "apache_beam/coders/coder_impl.py":1915 + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): + * self.schema = schema # <<<<<<<<<<<<<< + * self.num_fields = len(self.schema.fields) + * self.field_names = [f.name for f in self.schema.fields] +*/ + __Pyx_INCREF(__pyx_v_schema); + __Pyx_GIVEREF(__pyx_v_schema); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->schema); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->schema); + __pyx_cur_scope->__pyx_v_self->schema = __pyx_v_schema; + + /* "apache_beam/coders/coder_impl.py":1916 + * def __init__(self, schema, components): + * self.schema = schema + * self.num_fields = len(self.schema.fields) # <<<<<<<<<<<<<< + * self.field_names = [f.name for f in self.schema.fields] + * self.field_nullable = [field.type.nullable for field in self.schema.fields] +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1916, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_cur_scope->__pyx_v_self->num_fields = __pyx_t_2; + + /* "apache_beam/coders/coder_impl.py":1917 + * self.schema = schema + * self.num_fields = len(self.schema.fields) + * self.field_names = [f.name for f in self.schema.fields] # <<<<<<<<<<<<<< + * self.field_nullable = [field.type.nullable for field in self.schema.fields] + * self.constructor = named_tuple_from_schema(schema) +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1917, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1917, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1917, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1917, __pyx_L5_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1917, __pyx_L5_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1917, __pyx_L5_error) + } else { + __pyx_t_3 = __pyx_t_5(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1917, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_f, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr8__pyx_v_f, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1917, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1917, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_f); __pyx_8genexpr8__pyx_v_f = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_f); __pyx_8genexpr8__pyx_v_f = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->field_names); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->field_names); + __pyx_cur_scope->__pyx_v_self->field_names = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1918 + * self.num_fields = len(self.schema.fields) + * self.field_names = [f.name for f in self.schema.fields] + * self.field_nullable = [field.type.nullable for field in self.schema.fields] # <<<<<<<<<<<<<< + * self.constructor = named_tuple_from_schema(schema) + * self.encoding_positions = list(range(len(self.schema.fields))) +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_4); + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1918, __pyx_L12_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1918, __pyx_L12_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1918, __pyx_L12_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1918, __pyx_L12_error) + } else { + __pyx_t_4 = __pyx_t_5(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1918, __pyx_L12_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_field, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr9__pyx_v_field, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nullable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1918, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field); __pyx_8genexpr9__pyx_v_field = 0; + goto __pyx_L16_exit_scope; + __pyx_L12_error:; + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field); __pyx_8genexpr9__pyx_v_field = 0; + goto __pyx_L1_error; + __pyx_L16_exit_scope:; + } /* exit inner scope */ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->field_nullable); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->field_nullable); + __pyx_cur_scope->__pyx_v_self->field_nullable = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1919 + * self.field_names = [f.name for f in self.schema.fields] + * self.field_nullable = [field.type.nullable for field in self.schema.fields] + * self.constructor = named_tuple_from_schema(schema) # <<<<<<<<<<<<<< + * self.encoding_positions = list(range(len(self.schema.fields))) + * if self.schema.encoding_positions_set: +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_named_tuple_from_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_schema}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->constructor); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->constructor); + __pyx_cur_scope->__pyx_v_self->constructor = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1920 + * self.field_nullable = [field.type.nullable for field in self.schema.fields] + * self.constructor = named_tuple_from_schema(schema) + * self.encoding_positions = list(range(len(self.schema.fields))) # <<<<<<<<<<<<<< + * if self.schema.encoding_positions_set: + * # should never be duplicate encoding positions. +*/ + __pyx_t_6 = NULL; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions); + __pyx_cur_scope->__pyx_v_self->encoding_positions = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1921 + * self.constructor = named_tuple_from_schema(schema) + * self.encoding_positions = list(range(len(self.schema.fields))) + * if self.schema.encoding_positions_set: # <<<<<<<<<<<<<< + * # should never be duplicate encoding positions. + * enc_posx = list( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_encoding_positions_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1921, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1924 + * # should never be duplicate encoding positions. + * enc_posx = list( + * set(field.encoding_position for field in self.schema.fields)) # <<<<<<<<<<<<<< + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1923 + * if self.schema.encoding_positions_set: + * # should never be duplicate encoding positions. + * enc_posx = list( # <<<<<<<<<<<<<< + * set(field.encoding_position for field in self.schema.fields)) + * if len(enc_posx) != len(self.schema.fields): +*/ + __pyx_t_1 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_enc_posx = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1925 + * enc_posx = list( + * set(field.encoding_position for field in self.schema.fields)) + * if len(enc_posx) != len(self.schema.fields): # <<<<<<<<<<<<<< + * names_no_pos = ", ".join( + * [f.name for f in self.schema.fields if f.encoding_position is None]) +*/ + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_enc_posx); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1925, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (__pyx_t_2 != __pyx_t_9); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/coders/coder_impl.py":1926 + * set(field.encoding_position for field in self.schema.fields)) + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( # <<<<<<<<<<<<<< + * [f.name for f in self.schema.fields if f.encoding_position is None]) + * raise ValueError( +*/ + { /* enter inner scope */ + + /* "apache_beam/coders/coder_impl.py":1927 + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( + * [f.name for f in self.schema.fields if f.encoding_position is None]) # <<<<<<<<<<<<<< + * raise ValueError( + * f'''Schema with id {schema.id} has encoding_positions_set=True, +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); + __pyx_t_9 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L21_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1927, __pyx_L21_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1927, __pyx_L21_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L21_error) + } else { + __pyx_t_3 = __pyx_t_5(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1927, __pyx_L21_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_f, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr11__pyx_v_f, __pyx_mstate_global->__pyx_n_u_encoding_position); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (__pyx_t_3 == Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr11__pyx_v_f, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1927, __pyx_L21_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); __pyx_9genexpr11__pyx_v_f = 0; + goto __pyx_L26_exit_scope; + __pyx_L21_error:; + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); __pyx_9genexpr11__pyx_v_f = 0; + goto __pyx_L1_error; + __pyx_L26_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/coders/coder_impl.py":1926 + * set(field.encoding_position for field in self.schema.fields)) + * if len(enc_posx) != len(self.schema.fields): + * names_no_pos = ", ".join( # <<<<<<<<<<<<<< + * [f.name for f in self.schema.fields if f.encoding_position is None]) + * raise ValueError( +*/ + __pyx_t_6 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__11, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_names_no_pos = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":1928 + * names_no_pos = ", ".join( + * [f.name for f in self.schema.fields if f.encoding_position is None]) + * raise ValueError( # <<<<<<<<<<<<<< + * f'''Schema with id {schema.id} has encoding_positions_set=True, + * but found fields without encoding_position set: {names_no_pos}''') +*/ + __pyx_t_1 = NULL; + + /* "apache_beam/coders/coder_impl.py":1929 + * [f.name for f in self.schema.fields if f.encoding_position is None]) + * raise ValueError( + * f'''Schema with id {schema.id} has encoding_positions_set=True, # <<<<<<<<<<<<<< + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_mstate_global->__pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1930 + * raise ValueError( + * f'''Schema with id {schema.id} has encoding_positions_set=True, + * but found fields without encoding_position set: {names_no_pos}''') # <<<<<<<<<<<<<< + * self.encoding_positions = list( + * field.encoding_position for field in self.schema.fields) +*/ + __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_names_no_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Schema_with_id; + __pyx_t_10[1] = __pyx_t_4; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_has_encoding_positions_set_True; + __pyx_t_10[3] = __pyx_t_3; + + /* "apache_beam/coders/coder_impl.py":1929 + * [f.name for f in self.schema.fields if f.encoding_position is None]) + * raise ValueError( + * f'''Schema with id {schema.id} has encoding_positions_set=True, # <<<<<<<<<<<<<< + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( +*/ + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 94 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_11}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1928, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1925 + * enc_posx = list( + * set(field.encoding_position for field in self.schema.fields)) + * if len(enc_posx) != len(self.schema.fields): # <<<<<<<<<<<<<< + * names_no_pos = ", ".join( + * [f.name for f in self.schema.fields if f.encoding_position is None]) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1932 + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( + * field.encoding_position for field in self.schema.fields) # <<<<<<<<<<<<<< + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) + * self.encoding_positions_are_trivial = self.encoding_positions == list( +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(NULL, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":1931 + * f'''Schema with id {schema.id} has encoding_positions_set=True, + * but found fields without encoding_position set: {names_no_pos}''') + * self.encoding_positions = list( # <<<<<<<<<<<<<< + * field.encoding_position for field in self.schema.fields) + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) +*/ + __pyx_t_6 = __Pyx_Generator_GetInlinedResult(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions); + __pyx_cur_scope->__pyx_v_self->encoding_positions = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/coders/coder_impl.py":1921 + * self.constructor = named_tuple_from_schema(schema) + * self.encoding_positions = list(range(len(self.schema.fields))) + * if self.schema.encoding_positions_set: # <<<<<<<<<<<<<< + * # should never be duplicate encoding positions. + * enc_posx = list( +*/ + } + + /* "apache_beam/coders/coder_impl.py":1933 + * self.encoding_positions = list( + * field.encoding_position for field in self.schema.fields) + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) # <<<<<<<<<<<<<< + * self.encoding_positions_are_trivial = self.encoding_positions == list( + * range(len(self.encoding_positions))) +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_cur_scope->__pyx_v_self->encoding_positions}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions_argsort); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions_argsort); + __pyx_cur_scope->__pyx_v_self->encoding_positions_argsort = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/coders/coder_impl.py":1935 + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) + * self.encoding_positions_are_trivial = self.encoding_positions == list( + * range(len(self.encoding_positions))) # <<<<<<<<<<<<<< + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() +*/ + __pyx_t_6 = NULL; + __pyx_t_11 = __pyx_cur_scope->__pyx_v_self->encoding_positions; + __Pyx_INCREF(__pyx_t_11); + if (unlikely(__pyx_t_11 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1935, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_t_11); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1935, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/coders/coder_impl.py":1934 + * field.encoding_position for field in self.schema.fields) + * self.encoding_positions_argsort = list(np.argsort(self.encoding_positions)) + * self.encoding_positions_are_trivial = self.encoding_positions == list( # <<<<<<<<<<<<<< + * range(len(self.encoding_positions))) + * self.components = list( +*/ + __pyx_t_11 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_self->encoding_positions, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1934, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_cur_scope->__pyx_v_self->encoding_positions_are_trivial = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":1937 + * range(len(self.encoding_positions))) + * self.components = list( + * components[self.encoding_positions.index(i)].get_impl() # <<<<<<<<<<<<<< + * for i in self.encoding_positions) + * self.has_nullable_fields = any( +*/ + __pyx_t_3 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_v_self->encoding_positions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/coders/coder_impl.py":1936 + * self.encoding_positions_are_trivial = self.encoding_positions == list( + * range(len(self.encoding_positions))) + * self.components = list( # <<<<<<<<<<<<<< + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) +*/ + __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->components); + __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->components); + __pyx_cur_scope->__pyx_v_self->components = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "apache_beam/coders/coder_impl.py":1940 + * for i in self.encoding_positions) + * self.has_nullable_fields = any( + * field.type.nullable for field in self.schema.fields) # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(NULL, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1940, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/coders/coder_impl.py":1939 + * components[self.encoding_positions.index(i)].get_impl() + * for i in self.encoding_positions) + * self.has_nullable_fields = any( # <<<<<<<<<<<<<< + * field.type.nullable for field in self.schema.fields) + * +*/ + __pyx_cur_scope->__pyx_v_self->has_nullable_fields = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":1914 + * class RowCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema, components): # <<<<<<<<<<<<<< + * self.schema = schema + * self.num_fields = len(self.schema.fields) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_enc_posx); + __Pyx_XDECREF(__pyx_v_names_no_pos); + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_f); + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_field); + __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator3); + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); + __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator4); + __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator5); + __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator6); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1942 + * field.type.nullable for field in self.schema.fields) + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_var_int64(self.num_fields) + * attrs = [getattr(value, name) for name in self.field_names] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_i; + int __pyx_v_running; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_component_coder = 0; + PyObject *__pyx_v_attrs = NULL; + int __pyx_v_any_nulls; + PyObject *__pyx_v_attr = NULL; + PyObject *__pyx_9genexpr15__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1943 + * + * def encode_to_stream(self, value, out, nested): + * out.write_var_int64(self.num_fields) # <<<<<<<<<<<<<< + * attrs = [getattr(value, name) for name in self.field_names] + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_self->num_fields, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1944 + * def encode_to_stream(self, value, out, nested): + * out.write_var_int64(self.num_fields) + * attrs = [getattr(value, name) for name in self.field_names] # <<<<<<<<<<<<<< + * + * if self.has_nullable_fields: +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->field_names == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1944, __pyx_L5_error) + } + __pyx_t_2 = __pyx_v_self->field_names; __Pyx_INCREF(__pyx_t_2); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1944, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_name, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetAttr(__pyx_v_value, __pyx_9genexpr15__pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1944, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name); __pyx_9genexpr15__pyx_v_name = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name); __pyx_9genexpr15__pyx_v_name = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_v_attrs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1946 + * attrs = [getattr(value, name) for name in self.field_names] + * + * if self.has_nullable_fields: # <<<<<<<<<<<<<< + * any_nulls = False + * for attr in attrs: +*/ + if (__pyx_v_self->has_nullable_fields) { + + /* "apache_beam/coders/coder_impl.py":1947 + * + * if self.has_nullable_fields: + * any_nulls = False # <<<<<<<<<<<<<< + * for attr in attrs: + * if attr is None: +*/ + __pyx_v_any_nulls = 0; + + /* "apache_beam/coders/coder_impl.py":1948 + * if self.has_nullable_fields: + * any_nulls = False + * for attr in attrs: # <<<<<<<<<<<<<< + * if attr is None: + * any_nulls = True +*/ + __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1948, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1949 + * any_nulls = False + * for attr in attrs: + * if attr is None: # <<<<<<<<<<<<<< + * any_nulls = True + * break +*/ + __pyx_t_8 = (__pyx_v_attr == Py_None); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1950 + * for attr in attrs: + * if attr is None: + * any_nulls = True # <<<<<<<<<<<<<< + * break + * if any_nulls: +*/ + __pyx_v_any_nulls = 1; + + /* "apache_beam/coders/coder_impl.py":1951 + * if attr is None: + * any_nulls = True + * break # <<<<<<<<<<<<<< + * if any_nulls: + * out.write_var_int64((self.num_fields + 7) // 8) +*/ + goto __pyx_L12_break; + + /* "apache_beam/coders/coder_impl.py":1949 + * any_nulls = False + * for attr in attrs: + * if attr is None: # <<<<<<<<<<<<<< + * any_nulls = True + * break +*/ + } + + /* "apache_beam/coders/coder_impl.py":1948 + * if self.has_nullable_fields: + * any_nulls = False + * for attr in attrs: # <<<<<<<<<<<<<< + * if attr is None: + * any_nulls = True +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L14_for_end; + __pyx_L12_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L14_for_end; + __pyx_L14_for_end:; + + /* "apache_beam/coders/coder_impl.py":1952 + * any_nulls = True + * break + * if any_nulls: # <<<<<<<<<<<<<< + * out.write_var_int64((self.num_fields + 7) // 8) + * # Pack the bits, little-endian, in consecutive bytes. +*/ + if (__pyx_v_any_nulls) { + + /* "apache_beam/coders/coder_impl.py":1953 + * break + * if any_nulls: + * out.write_var_int64((self.num_fields + 7) // 8) # <<<<<<<<<<<<<< + * # Pack the bits, little-endian, in consecutive bytes. + * running = 0 +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __Pyx_div_long((__pyx_v_self->num_fields + 7), 8, 1), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1955 + * out.write_var_int64((self.num_fields + 7) // 8) + * # Pack the bits, little-endian, in consecutive bytes. + * running = 0 # <<<<<<<<<<<<<< + * for i, attr in enumerate(attrs): + * if i and i % 8 == 0: +*/ + __pyx_v_running = 0; + + /* "apache_beam/coders/coder_impl.py":1956 + * # Pack the bits, little-endian, in consecutive bytes. + * running = 0 + * for i, attr in enumerate(attrs): # <<<<<<<<<<<<<< + * if i and i % 8 == 0: + * out.write_byte(running) +*/ + __pyx_t_9 = 0; + __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1956, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_v_i = __pyx_t_9; + __pyx_t_9 = (__pyx_t_9 + 1); + + /* "apache_beam/coders/coder_impl.py":1957 + * running = 0 + * for i, attr in enumerate(attrs): + * if i and i % 8 == 0: # <<<<<<<<<<<<<< + * out.write_byte(running) + * running = 0 +*/ + __pyx_t_10 = (__pyx_v_i != 0); + if (__pyx_t_10) { + } else { + __pyx_t_8 = __pyx_t_10; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_10 = (__Pyx_mod_long(__pyx_v_i, 8, 1) == 0); + __pyx_t_8 = __pyx_t_10; + __pyx_L19_bool_binop_done:; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1958 + * for i, attr in enumerate(attrs): + * if i and i % 8 == 0: + * out.write_byte(running) # <<<<<<<<<<<<<< + * running = 0 + * running |= (attr is None) << (i % 8) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_running, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":1959 + * if i and i % 8 == 0: + * out.write_byte(running) + * running = 0 # <<<<<<<<<<<<<< + * running |= (attr is None) << (i % 8) + * out.write_byte(running) +*/ + __pyx_v_running = 0; + + /* "apache_beam/coders/coder_impl.py":1957 + * running = 0 + * for i, attr in enumerate(attrs): + * if i and i % 8 == 0: # <<<<<<<<<<<<<< + * out.write_byte(running) + * running = 0 +*/ + } + + /* "apache_beam/coders/coder_impl.py":1960 + * out.write_byte(running) + * running = 0 + * running |= (attr is None) << (i % 8) # <<<<<<<<<<<<<< + * out.write_byte(running) + * else: +*/ + __pyx_t_8 = (__pyx_v_attr == Py_None); + __pyx_v_running = (__pyx_v_running | (__pyx_t_8 << __Pyx_mod_long(__pyx_v_i, 8, 1))); + + /* "apache_beam/coders/coder_impl.py":1956 + * # Pack the bits, little-endian, in consecutive bytes. + * running = 0 + * for i, attr in enumerate(attrs): # <<<<<<<<<<<<<< + * if i and i % 8 == 0: + * out.write_byte(running) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1961 + * running = 0 + * running |= (attr is None) << (i % 8) + * out.write_byte(running) # <<<<<<<<<<<<<< + * else: + * out.write_byte(0) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_running, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1952 + * any_nulls = True + * break + * if any_nulls: # <<<<<<<<<<<<<< + * out.write_var_int64((self.num_fields + 7) // 8) + * # Pack the bits, little-endian, in consecutive bytes. +*/ + goto __pyx_L15; + } + + /* "apache_beam/coders/coder_impl.py":1963 + * out.write_byte(running) + * else: + * out.write_byte(0) # <<<<<<<<<<<<<< + * else: + * out.write_byte(0) +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L15:; + + /* "apache_beam/coders/coder_impl.py":1946 + * attrs = [getattr(value, name) for name in self.field_names] + * + * if self.has_nullable_fields: # <<<<<<<<<<<<<< + * any_nulls = False + * for attr in attrs: +*/ + goto __pyx_L10; + } + + /* "apache_beam/coders/coder_impl.py":1965 + * out.write_byte(0) + * else: + * out.write_byte(0) # <<<<<<<<<<<<<< + * + * for i in range(self.num_fields): +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L10:; + + /* "apache_beam/coders/coder_impl.py":1967 + * out.write_byte(0) + * + * for i in range(self.num_fields): # <<<<<<<<<<<<<< + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] +*/ + __pyx_t_9 = __pyx_v_self->num_fields; + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "apache_beam/coders/coder_impl.py":1968 + * + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * attr = attrs[i] +*/ + __pyx_t_8 = (!__pyx_v_self->encoding_positions_are_trivial); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1969 + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] # <<<<<<<<<<<<<< + * attr = attrs[i] + * if attr is None: +*/ + if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1969, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1969, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_i = __pyx_t_13; + + /* "apache_beam/coders/coder_impl.py":1968 + * + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * attr = attrs[i] +*/ + } + + /* "apache_beam/coders/coder_impl.py":1970 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * attr = attrs[i] # <<<<<<<<<<<<<< + * if attr is None: + * if not self.field_nullable[i]: +*/ + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1971 + * i = self.encoding_positions_argsort[i] + * attr = attrs[i] + * if attr is None: # <<<<<<<<<<<<<< + * if not self.field_nullable[i]: + * raise ValueError( +*/ + __pyx_t_8 = (__pyx_v_attr == Py_None); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":1972 + * attr = attrs[i] + * if attr is None: + * if not self.field_nullable[i]: # <<<<<<<<<<<<<< + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".".format( +*/ + if (unlikely(__pyx_v_self->field_nullable == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1972, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->field_nullable, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1972, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = (!__pyx_t_8); + if (unlikely(__pyx_t_10)) { + + /* "apache_beam/coders/coder_impl.py":1973 + * if attr is None: + * if not self.field_nullable[i]: + * raise ValueError( # <<<<<<<<<<<<<< + * "Attempted to encode null for non-nullable field \"{}\".".format( + * self.schema.fields[i].name)) +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/coders/coder_impl.py":1974 + * if not self.field_nullable[i]: + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".".format( # <<<<<<<<<<<<<< + * self.schema.fields[i].name)) + * continue +*/ + __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_Attempted_to_encode_null_for_non; + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/coders/coder_impl.py":1975 + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".".format( + * self.schema.fields[i].name)) # <<<<<<<<<<<<<< + * continue + * component_coder = self.components[i] # for typing +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1973, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1972 + * attr = attrs[i] + * if attr is None: + * if not self.field_nullable[i]: # <<<<<<<<<<<<<< + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".".format( +*/ + } + + /* "apache_beam/coders/coder_impl.py":1976 + * "Attempted to encode null for non-nullable field \"{}\".".format( + * self.schema.fields[i].name)) + * continue # <<<<<<<<<<<<<< + * component_coder = self.components[i] # for typing + * component_coder.encode_to_stream(attr, out, True) +*/ + goto __pyx_L22_continue; + + /* "apache_beam/coders/coder_impl.py":1971 + * i = self.encoding_positions_argsort[i] + * attr = attrs[i] + * if attr is None: # <<<<<<<<<<<<<< + * if not self.field_nullable[i]: + * raise ValueError( +*/ + } + + /* "apache_beam/coders/coder_impl.py":1977 + * self.schema.fields[i].name)) + * continue + * component_coder = self.components[i] # for typing # <<<<<<<<<<<<<< + * component_coder.encode_to_stream(attr, out, True) + * +*/ + if (unlikely(__pyx_v_self->components == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1977, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->components, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1977, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_component_coder, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1978 + * continue + * component_coder = self.components[i] # for typing + * component_coder.encode_to_stream(attr, out, True) # <<<<<<<<<<<<<< + * + * def _row_column_encoders(self, columns): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_component_coder->__pyx_vtab)->encode_to_stream(__pyx_v_component_coder, __pyx_v_attr, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_L22_continue:; + } + + /* "apache_beam/coders/coder_impl.py":1942 + * field.type.nullable for field in self.schema.fields) + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_var_int64(self.num_fields) + * attrs = [getattr(value, name) for name in self.field_names] +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_component_coder); + __Pyx_XDECREF(__pyx_v_attrs); + __Pyx_XDECREF(__pyx_v_attr); + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1942, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1942, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1942, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1942, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 1942, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 1942, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1942, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1942, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1942, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1942, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1942, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1980 + * component_coder.encode_to_stream(attr, out, True) + * + * def _row_column_encoders(self, columns): # <<<<<<<<<<<<<< + * return [ + * RowColumnEncoder.create( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders = {"_row_column_encoders", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_columns = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_row_column_encoders (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1980, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1980, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_row_column_encoders", 0) < (0)) __PYX_ERR(0, 1980, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_row_column_encoders", 1, 1, 1, i); __PYX_ERR(0, 1980, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1980, __pyx_L3_error) + } + __pyx_v_columns = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_row_column_encoders", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1980, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl._row_column_encoders", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_columns); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns) { + PyObject *__pyx_9genexpr16__pyx_v_i = NULL; + PyObject *__pyx_9genexpr16__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_row_column_encoders", 0); + + /* "apache_beam/coders/coder_impl.py":1981 + * + * def _row_column_encoders(self, columns): + * return [ # <<<<<<<<<<<<<< + * RowColumnEncoder.create( + * self.schema.fields[i].type.atomic_type, +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/coders/coder_impl.py":1985 + * self.schema.fields[i].type.atomic_type, + * self.components[i], + * columns[name]) for i, name in enumerate(self.field_names) # <<<<<<<<<<<<<< + * ] + * +*/ + __pyx_t_3 = __pyx_v_self->field_names; __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1985, __pyx_L5_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1985, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_name, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_i, __pyx_t_2); + __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1985, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1982 + * def _row_column_encoders(self, columns): + * return [ + * RowColumnEncoder.create( # <<<<<<<<<<<<<< + * self.schema.fields[i].type.atomic_type, + * self.components[i], +*/ + __pyx_t_6 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + __Pyx_INCREF(__pyx_t_6); + + /* "apache_beam/coders/coder_impl.py":1983 + * return [ + * RowColumnEncoder.create( + * self.schema.fields[i].type.atomic_type, # <<<<<<<<<<<<<< + * self.components[i], + * columns[name]) for i, name in enumerate(self.field_names) +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1983, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_9genexpr16__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1983, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1983, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_atomic_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1983, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/coders/coder_impl.py":1984 + * RowColumnEncoder.create( + * self.schema.fields[i].type.atomic_type, + * self.components[i], # <<<<<<<<<<<<<< + * columns[name]) for i, name in enumerate(self.field_names) + * ] +*/ + if (unlikely(__pyx_v_self->components == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1984, __pyx_L5_error) + } + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_self->components, __pyx_9genexpr16__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1984, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/coders/coder_impl.py":1985 + * self.schema.fields[i].type.atomic_type, + * self.components[i], + * columns[name]) for i, name in enumerate(self.field_names) # <<<<<<<<<<<<<< + * ] + * +*/ + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_columns, __pyx_9genexpr16__pyx_v_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1985, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_8, __pyx_t_7, __pyx_t_9}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1982, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1981, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_i); __pyx_9genexpr16__pyx_v_i = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_name); __pyx_9genexpr16__pyx_v_name = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_i); __pyx_9genexpr16__pyx_v_i = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_name); __pyx_9genexpr16__pyx_v_name = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":1980 + * component_coder.encode_to_stream(attr, out, True) + * + * def _row_column_encoders(self, columns): # <<<<<<<<<<<<<< + * return [ + * RowColumnEncoder.create( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl._row_column_encoders", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_i); + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":1988 + * ] + * + * def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_skip_dispatch) { + int __pyx_v_i; + size_t __pyx_v_k; + size_t __pyx_v_n; + __Pyx_memviewslice __pyx_v_null_flags = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_null_bits = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_has_null_bits = { 0, 0, { 0 }, { 0 }, { 0 } }; + PyObject *__pyx_v_attrs = NULL; + PyObject *__pyx_v_null_flags_py = NULL; + long __pyx_v_null_bits_len; + PyObject *__pyx_v_null_bits_py = NULL; + PyObject *__pyx_v_attr = NULL; + PyObject *__pyx_v_attr_null_flags = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_t_11; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_16; + size_t __pyx_t_17; + size_t __pyx_t_18; + long __pyx_t_19; + long __pyx_t_20; + Py_ssize_t __pyx_t_21; + int __pyx_t_22; + int __pyx_t_23; + int __pyx_t_24; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_batch_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_batch_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_columns, ((PyObject *)__pyx_v_out)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":1989 + * + * def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out): + * attrs = self._row_column_encoders(columns) # <<<<<<<<<<<<<< + * n = len(next(iter(columns.values()))) + * if self.has_nullable_fields: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_columns}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_row_column_encoders, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_attrs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1990 + * def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out): + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) # <<<<<<<<<<<<<< + * if self.has_nullable_fields: + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) +*/ + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1990, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_n = __pyx_t_6; + + /* "apache_beam/coders/coder_impl.py":1991 + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) + * if self.has_nullable_fields: # <<<<<<<<<<<<<< + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) + * null_bits_len = (self.num_fields + 7) // 8 +*/ + if (__pyx_v_self->has_nullable_fields) { + + /* "apache_beam/coders/coder_impl.py":1992 + * n = len(next(iter(columns.values()))) + * if self.has_nullable_fields: + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) # <<<<<<<<<<<<<< + * null_bits_len = (self.num_fields + 7) // 8 + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyLong_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_self->num_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1992, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1992, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_8}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_4, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1992, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_null_flags_py = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1993 + * if self.has_nullable_fields: + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) + * null_bits_len = (self.num_fields + 7) // 8 # <<<<<<<<<<<<<< + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) + * for i, attr in enumerate(attrs): +*/ + __pyx_v_null_bits_len = __Pyx_div_long((__pyx_v_self->num_fields + 7), 8, 1); + + /* "apache_beam/coders/coder_impl.py":1994 + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) + * null_bits_len = (self.num_fields + 7) // 8 + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) # <<<<<<<<<<<<<< + * for i, attr in enumerate(attrs): + * attr_null_flags = attr.null_flags() +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_v_null_bits_len); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 1994, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1994, __pyx_L1_error); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_7, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1994, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_null_bits_py = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":1995 + * null_bits_len = (self.num_fields + 7) // 8 + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) + * for i, attr in enumerate(attrs): # <<<<<<<<<<<<<< + * attr_null_flags = attr.null_flags() + * if attr_null_flags is not None and attr_null_flags.any(): +*/ + __pyx_t_9 = 0; + if (likely(PyList_CheckExact(__pyx_v_attrs)) || PyTuple_CheckExact(__pyx_v_attrs)) { + __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1995, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1995, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1995, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1995, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_10(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1995, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_v_i = __pyx_t_9; + __pyx_t_9 = (__pyx_t_9 + 1); + + /* "apache_beam/coders/coder_impl.py":1996 + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) + * for i, attr in enumerate(attrs): + * attr_null_flags = attr.null_flags() # <<<<<<<<<<<<<< + * if attr_null_flags is not None and attr_null_flags.any(): + * null_flags_py[:, i] = attr_null_flags +*/ + __pyx_t_8 = __pyx_v_attr; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_null_flags, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_attr_null_flags, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1997 + * for i, attr in enumerate(attrs): + * attr_null_flags = attr.null_flags() + * if attr_null_flags is not None and attr_null_flags.any(): # <<<<<<<<<<<<<< + * null_flags_py[:, i] = attr_null_flags + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) +*/ + __pyx_t_12 = (__pyx_v_attr_null_flags != Py_None); + if (__pyx_t_12) { + } else { + __pyx_t_11 = __pyx_t_12; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_8 = __pyx_v_attr_null_flags; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_any, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1997, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = __pyx_t_12; + __pyx_L7_bool_binop_done:; + if (__pyx_t_11) { + + /* "apache_beam/coders/coder_impl.py":1998 + * attr_null_flags = attr.null_flags() + * if attr_null_flags is not None and attr_null_flags.any(): + * null_flags_py[:, i] = attr_null_flags # <<<<<<<<<<<<<< + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) + * has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8) +*/ + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 1998, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 1998, __pyx_L1_error); + __pyx_t_4 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_null_flags_py, __pyx_t_8, __pyx_v_attr_null_flags) < 0))) __PYX_ERR(0, 1998, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/coders/coder_impl.py":1999 + * if attr_null_flags is not None and attr_null_flags.any(): + * null_flags_py[:, i] = attr_null_flags + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) # <<<<<<<<<<<<<< + * has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8) + * null_bits = null_bits_py +*/ + __pyx_t_8 = __Pyx_PyLong_From_long(__Pyx_div_long(__pyx_v_i, 8, 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 1999, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1999, __pyx_L1_error); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_null_bits_py, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_From_long(__Pyx_mod_long(__pyx_v_i, 8, 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_13 = PyNumber_Lshift(__pyx_v_attr_null_flags, __pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_null_bits_py, __pyx_t_4, __pyx_t_7) < 0))) __PYX_ERR(0, 1999, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1997 + * for i, attr in enumerate(attrs): + * attr_null_flags = attr.null_flags() + * if attr_null_flags is not None and attr_null_flags.any(): # <<<<<<<<<<<<<< + * null_flags_py[:, i] = attr_null_flags + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) +*/ + } + + /* "apache_beam/coders/coder_impl.py":1995 + * null_bits_len = (self.num_fields + 7) // 8 + * null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8) + * for i, attr in enumerate(attrs): # <<<<<<<<<<<<<< + * attr_null_flags = attr.null_flags() + * if attr_null_flags is not None and attr_null_flags.any(): +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2000 + * null_flags_py[:, i] = attr_null_flags + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) + * has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8) # <<<<<<<<<<<<<< + * null_bits = null_bits_py + * null_flags = null_flags_py +*/ + __pyx_t_13 = __pyx_v_null_bits_py; + __Pyx_INCREF(__pyx_t_13); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, NULL}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_axis, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sum, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_8 = __Pyx_PyLong_NeObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_13}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_has_null_bits = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "apache_beam/coders/coder_impl.py":2001 + * null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8) + * has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8) + * null_bits = null_bits_py # <<<<<<<<<<<<<< + * null_flags = null_flags_py + * else: +*/ + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(__pyx_v_null_bits_py, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 2001, __pyx_L1_error) + __pyx_v_null_bits = __pyx_t_15; + __pyx_t_15.memview = NULL; + __pyx_t_15.data = NULL; + + /* "apache_beam/coders/coder_impl.py":2002 + * has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8) + * null_bits = null_bits_py + * null_flags = null_flags_py # <<<<<<<<<<<<<< + * else: + * has_null_bits = np.zeros((n, ), dtype=np.uint8) +*/ + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(__pyx_v_null_flags_py, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 2002, __pyx_L1_error) + __pyx_v_null_flags = __pyx_t_15; + __pyx_t_15.memview = NULL; + __pyx_t_15.data = NULL; + + /* "apache_beam/coders/coder_impl.py":1991 + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) + * if self.has_nullable_fields: # <<<<<<<<<<<<<< + * null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8) + * null_bits_len = (self.num_fields + 7) // 8 +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":2004 + * null_flags = null_flags_py + * else: + * has_null_bits = np.zeros((n, ), dtype=np.uint8) # <<<<<<<<<<<<<< + * + * for k in range(n): +*/ + /*else*/ { + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyLong_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13) != (0)) __PYX_ERR(0, 2004, __pyx_L1_error); + __pyx_t_13 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2004, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_has_null_bits = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":2006 + * has_null_bits = np.zeros((n, ), dtype=np.uint8) + * + * for k in range(n): # <<<<<<<<<<<<<< + * out.write_var_int64(self.num_fields) + * if has_null_bits[k]: +*/ + __pyx_t_5 = __pyx_v_n; + __pyx_t_16 = __pyx_t_5; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_k = __pyx_t_17; + + /* "apache_beam/coders/coder_impl.py":2007 + * + * for k in range(n): + * out.write_var_int64(self.num_fields) # <<<<<<<<<<<<<< + * if has_null_bits[k]: + * out.write_byte(null_bits_len) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_self->num_fields, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2008 + * for k in range(n): + * out.write_var_int64(self.num_fields) + * if has_null_bits[k]: # <<<<<<<<<<<<<< + * out.write_byte(null_bits_len) + * for i in range(null_bits_len): +*/ + __pyx_t_18 = __pyx_v_k; + __pyx_t_9 = -1; + if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_has_null_bits.shape[0])) __pyx_t_9 = 0; + if (unlikely(__pyx_t_9 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_9); + __PYX_ERR(0, 2008, __pyx_L1_error) + } + __pyx_t_11 = ((*((uint8_t *) ( /* dim=0 */ ((char *) (((uint8_t *) __pyx_v_has_null_bits.data) + __pyx_t_18)) ))) != 0); + if (__pyx_t_11) { + + /* "apache_beam/coders/coder_impl.py":2009 + * out.write_var_int64(self.num_fields) + * if has_null_bits[k]: + * out.write_byte(null_bits_len) # <<<<<<<<<<<<<< + * for i in range(null_bits_len): + * out.write_byte(null_bits[k, i]) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_null_bits_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2010 + * if has_null_bits[k]: + * out.write_byte(null_bits_len) + * for i in range(null_bits_len): # <<<<<<<<<<<<<< + * out.write_byte(null_bits[k, i]) + * else: +*/ + __pyx_t_19 = __pyx_v_null_bits_len; + __pyx_t_20 = __pyx_t_19; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_20; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "apache_beam/coders/coder_impl.py":2011 + * out.write_byte(null_bits_len) + * for i in range(null_bits_len): + * out.write_byte(null_bits[k, i]) # <<<<<<<<<<<<<< + * else: + * out.write_byte(0) +*/ + if (unlikely(!__pyx_v_null_bits.memview)) { __Pyx_RaiseUnboundLocalError("null_bits"); __PYX_ERR(0, 2011, __pyx_L1_error) } + __pyx_t_18 = __pyx_v_k; + __pyx_t_21 = __pyx_v_i; + __pyx_t_22 = -1; + if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_null_bits.shape[0])) __pyx_t_22 = 0; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_null_bits.shape[1]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_22 = 1; + } else if (unlikely(__pyx_t_21 >= __pyx_v_null_bits.shape[1])) __pyx_t_22 = 1; + if (unlikely(__pyx_t_22 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_22); + __PYX_ERR(0, 2011, __pyx_L1_error) + } + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, (*((uint8_t *) ( /* dim=1 */ ((char *) (((uint8_t *) ( /* dim=0 */ (__pyx_v_null_bits.data + __pyx_t_18 * __pyx_v_null_bits.strides[0]) )) + __pyx_t_21)) ))), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/coders/coder_impl.py":2008 + * for k in range(n): + * out.write_var_int64(self.num_fields) + * if has_null_bits[k]: # <<<<<<<<<<<<<< + * out.write_byte(null_bits_len) + * for i in range(null_bits_len): +*/ + goto __pyx_L12; + } + + /* "apache_beam/coders/coder_impl.py":2013 + * out.write_byte(null_bits[k, i]) + * else: + * out.write_byte(0) # <<<<<<<<<<<<<< + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L12:; + + /* "apache_beam/coders/coder_impl.py":2014 + * else: + * out.write_byte(0) + * for i in range(self.num_fields): # <<<<<<<<<<<<<< + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] +*/ + __pyx_t_9 = __pyx_v_self->num_fields; + __pyx_t_22 = __pyx_t_9; + for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) { + __pyx_v_i = __pyx_t_23; + + /* "apache_beam/coders/coder_impl.py":2015 + * out.write_byte(0) + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: +*/ + __pyx_t_11 = (!__pyx_v_self->encoding_positions_are_trivial); + if (__pyx_t_11) { + + /* "apache_beam/coders/coder_impl.py":2016 + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] # <<<<<<<<<<<<<< + * if has_null_bits[k] and null_flags[k, i]: + * if not self.field_nullable[i]: +*/ + if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2016, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_24 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_i = __pyx_t_24; + + /* "apache_beam/coders/coder_impl.py":2015 + * out.write_byte(0) + * for i in range(self.num_fields): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: +*/ + } + + /* "apache_beam/coders/coder_impl.py":2017 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: # <<<<<<<<<<<<<< + * if not self.field_nullable[i]: + * raise ValueError( +*/ + __pyx_t_18 = __pyx_v_k; + __pyx_t_24 = -1; + if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_has_null_bits.shape[0])) __pyx_t_24 = 0; + if (unlikely(__pyx_t_24 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_24); + __PYX_ERR(0, 2017, __pyx_L1_error) + } + __pyx_t_12 = ((*((uint8_t *) ( /* dim=0 */ ((char *) (((uint8_t *) __pyx_v_has_null_bits.data) + __pyx_t_18)) ))) != 0); + if (__pyx_t_12) { + } else { + __pyx_t_11 = __pyx_t_12; + goto __pyx_L19_bool_binop_done; + } + if (unlikely(!__pyx_v_null_flags.memview)) { __Pyx_RaiseUnboundLocalError("null_flags"); __PYX_ERR(0, 2017, __pyx_L1_error) } + __pyx_t_18 = __pyx_v_k; + __pyx_t_21 = __pyx_v_i; + __pyx_t_24 = -1; + if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_null_flags.shape[0])) __pyx_t_24 = 0; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_null_flags.shape[1]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_24 = 1; + } else if (unlikely(__pyx_t_21 >= __pyx_v_null_flags.shape[1])) __pyx_t_24 = 1; + if (unlikely(__pyx_t_24 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_24); + __PYX_ERR(0, 2017, __pyx_L1_error) + } + __pyx_t_12 = ((*((uint8_t *) ( /* dim=1 */ ((char *) (((uint8_t *) ( /* dim=0 */ (__pyx_v_null_flags.data + __pyx_t_18 * __pyx_v_null_flags.strides[0]) )) + __pyx_t_21)) ))) != 0); + __pyx_t_11 = __pyx_t_12; + __pyx_L19_bool_binop_done:; + if (__pyx_t_11) { + + /* "apache_beam/coders/coder_impl.py":2018 + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: + * if not self.field_nullable[i]: # <<<<<<<<<<<<<< + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".". +*/ + if (unlikely(__pyx_v_self->field_nullable == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2018, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->field_nullable, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2018, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + + /* "apache_beam/coders/coder_impl.py":2019 + * if has_null_bits[k] and null_flags[k, i]: + * if not self.field_nullable[i]: + * raise ValueError( # <<<<<<<<<<<<<< + * "Attempted to encode null for non-nullable field \"{}\".". + * format(self.schema.fields[i].name)) +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/coders/coder_impl.py":2021 + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".". + * format(self.schema.fields[i].name)) # <<<<<<<<<<<<<< + * else: + * cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out) +*/ + __pyx_t_3 = __pyx_mstate_global->__pyx_kp_u_Attempted_to_encode_null_for_non; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_mstate_global->__pyx_n_u_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_18 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_18 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_13}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2019, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":2018 + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: + * if not self.field_nullable[i]: # <<<<<<<<<<<<<< + * raise ValueError( + * "Attempted to encode null for non-nullable field \"{}\".". +*/ + } + + /* "apache_beam/coders/coder_impl.py":2017 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if has_null_bits[k] and null_flags[k, i]: # <<<<<<<<<<<<<< + * if not self.field_nullable[i]: + * raise ValueError( +*/ + goto __pyx_L18; + } + + /* "apache_beam/coders/coder_impl.py":2023 + * format(self.schema.fields[i].name)) + * else: + * cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + /*else*/ { + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1)->__pyx_vtab)->encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1), __pyx_v_k, __pyx_v_out); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L18:; + } + } + + /* "apache_beam/coders/coder_impl.py":1988 + * ] + * + * def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_14, 1); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_null_flags, 1); + __PYX_XCLEAR_MEMVIEW(&__pyx_v_null_bits, 1); + __PYX_XCLEAR_MEMVIEW(&__pyx_v_has_null_bits, 1); + __Pyx_XDECREF(__pyx_v_attrs); + __Pyx_XDECREF(__pyx_v_null_flags_py); + __Pyx_XDECREF(__pyx_v_null_bits_py); + __Pyx_XDECREF(__pyx_v_attr); + __Pyx_XDECREF(__pyx_v_attr_null_flags); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream = {"encode_batch_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_columns = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_batch_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_columns,&__pyx_mstate_global->__pyx_n_u_out,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1988, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1988, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1988, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_batch_to_stream", 0) < (0)) __PYX_ERR(0, 1988, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_batch_to_stream", 1, 2, 2, i); __PYX_ERR(0, 1988, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1988, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1988, __pyx_L3_error) + } + __pyx_v_columns = ((PyObject*)values[0]); + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_batch_to_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1988, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 0, "columns", 2))) __PYX_ERR(0, 1988, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1988, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_columns, __pyx_v_out); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_batch_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(__pyx_v_self, __pyx_v_columns, __pyx_v_out, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2025 + * cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) { + int __pyx_v_i; + int64_t __pyx_v_nvals; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_component_coder = 0; + __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_v_null_mask_c; + int64_t __pyx_v_null_mask_len; + CYTHON_UNUSED PyObject *__pyx_v_null_mask_py = NULL; + PyObject *__pyx_v_sorted_components = NULL; + PyObject *__pyx_v_item = NULL; + int __pyx_9genexpr17__pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_t_8; + __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_t_9; + int __pyx_t_10; + int64_t __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + Py_ssize_t __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2026 + * + * def decode_from_stream(self, in_stream, nested): + * nvals = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2026, __pyx_L1_error) + __pyx_v_nvals = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":2027 + * def decode_from_stream(self, in_stream, nested): + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * if null_mask_len: + * # pylint: disable=unused-variable +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2027, __pyx_L1_error) + __pyx_v_null_mask_len = __pyx_t_7; + + /* "apache_beam/coders/coder_impl.py":2028 + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: # <<<<<<<<<<<<<< + * # pylint: disable=unused-variable + * null_mask_c = null_mask_py = in_stream.read(null_mask_len) +*/ + __pyx_t_8 = (__pyx_v_null_mask_len != 0); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":2030 + * if null_mask_len: + * # pylint: disable=unused-variable + * null_mask_c = null_mask_py = in_stream.read(null_mask_len) # <<<<<<<<<<<<<< + * + * # Note that if this coder's schema has *fewer* attributes than the encoded +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_null_mask_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 2030, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2030, __pyx_L1_error) + __pyx_v_null_mask_c = __pyx_t_9; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_null_mask_py = ((PyObject*)__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2028 + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: # <<<<<<<<<<<<<< + * # pylint: disable=unused-variable + * null_mask_c = null_mask_py = in_stream.read(null_mask_len) +*/ + } + + /* "apache_beam/coders/coder_impl.py":2036 + * # here because we only decode as many values as we have coders for. + * + * sorted_components = [] # <<<<<<<<<<<<<< + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_sorted_components = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2037 + * + * sorted_components = [] + * for i in range(min(self.num_fields, nvals)): # <<<<<<<<<<<<<< + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] +*/ + __pyx_t_7 = __pyx_v_nvals; + __pyx_t_10 = __pyx_v_self->num_fields; + __pyx_t_8 = (__pyx_t_7 < __pyx_t_10); + if (__pyx_t_8) { + __pyx_t_11 = __pyx_t_7; + } else { + __pyx_t_11 = __pyx_t_10; + } + __pyx_t_7 = __pyx_t_11; + __pyx_t_11 = __pyx_t_7; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_11; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "apache_beam/coders/coder_impl.py":2038 + * sorted_components = [] + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and +*/ + __pyx_t_8 = (!__pyx_v_self->encoding_positions_are_trivial); + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":2039 + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] # <<<<<<<<<<<<<< + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): +*/ + if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2039, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_i = __pyx_t_12; + + /* "apache_beam/coders/coder_impl.py":2038 + * sorted_components = [] + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and +*/ + } + + /* "apache_beam/coders/coder_impl.py":2040 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * item = None +*/ + __pyx_t_13 = (__pyx_v_null_mask_len != 0); + if (__pyx_t_13) { + } else { + __pyx_t_8 = __pyx_t_13; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_13 = ((__pyx_v_i >> 3) < __pyx_v_null_mask_len); + if (__pyx_t_13) { + } else { + __pyx_t_8 = __pyx_t_13; + goto __pyx_L8_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":2041 + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): # <<<<<<<<<<<<<< + * item = None + * else: +*/ + __pyx_t_13 = (((__pyx_v_null_mask_c[(__pyx_v_i >> 3)]) & (0x01 << (__pyx_v_i & 0x07))) != 0); + __pyx_t_8 = __pyx_t_13; + __pyx_L8_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":2040 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * item = None +*/ + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":2042 + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * item = None # <<<<<<<<<<<<<< + * else: + * component_coder = self.components[i] # for typing +*/ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_item, Py_None); + + /* "apache_beam/coders/coder_impl.py":2040 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * item = None +*/ + goto __pyx_L7; + } + + /* "apache_beam/coders/coder_impl.py":2044 + * item = None + * else: + * component_coder = self.components[i] # for typing # <<<<<<<<<<<<<< + * item = component_coder.decode_from_stream(in_stream, True) + * sorted_components.append(item) +*/ + /*else*/ { + if (unlikely(__pyx_v_self->components == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2044, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->components, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 2044, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_component_coder, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2045 + * else: + * component_coder = self.components[i] # for typing + * item = component_coder.decode_from_stream(in_stream, True) # <<<<<<<<<<<<<< + * sorted_components.append(item) + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_component_coder->__pyx_vtab)->decode_from_stream(__pyx_v_component_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1); + __pyx_t_1 = 0; + } + __pyx_L7:; + + /* "apache_beam/coders/coder_impl.py":2046 + * component_coder = self.components[i] # for typing + * item = component_coder.decode_from_stream(in_stream, True) + * sorted_components.append(item) # <<<<<<<<<<<<<< + * + * # If this coder's schema has more attributes than the encoded value, then +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_sorted_components, __pyx_v_item); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 2046, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":2050 + * # If this coder's schema has more attributes than the encoded value, then + * # the schema must have changed. Populate the unencoded fields with nulls. + * while len(sorted_components) < self.num_fields: # <<<<<<<<<<<<<< + * sorted_components.append(None) + * +*/ + while (1) { + __pyx_t_15 = __Pyx_PyList_GET_SIZE(__pyx_v_sorted_components); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2050, __pyx_L1_error) + __pyx_t_8 = (__pyx_t_15 < __pyx_v_self->num_fields); + if (!__pyx_t_8) break; + + /* "apache_beam/coders/coder_impl.py":2051 + * # the schema must have changed. Populate the unencoded fields with nulls. + * while len(sorted_components) < self.num_fields: + * sorted_components.append(None) # <<<<<<<<<<<<<< + * + * return self.constructor( +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_sorted_components, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 2051, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":2053 + * sorted_components.append(None) + * + * return self.constructor( # <<<<<<<<<<<<<< + * *( + * sorted_components if self.encoding_positions_are_trivial else +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":2055 + * return self.constructor( + * *( + * sorted_components if self.encoding_positions_are_trivial else # <<<<<<<<<<<<<< + * [sorted_components[i] for i in self.encoding_positions])) + * +*/ + if (__pyx_v_self->encoding_positions_are_trivial) { + __Pyx_INCREF(__pyx_v_sorted_components); + __pyx_t_1 = __pyx_v_sorted_components; + } else { + { /* enter inner scope */ + + /* "apache_beam/coders/coder_impl.py":2056 + * *( + * sorted_components if self.encoding_positions_are_trivial else + * [sorted_components[i] for i in self.encoding_positions])) # <<<<<<<<<<<<<< + * + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_self->encoding_positions == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2056, __pyx_L1_error) + } + __pyx_t_4 = __pyx_v_self->encoding_positions; __Pyx_INCREF(__pyx_t_4); + __pyx_t_15 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2056, __pyx_L1_error) + #endif + if (__pyx_t_15 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_15; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2056, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_9genexpr17__pyx_v_i = __pyx_t_10; + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_sorted_components, __pyx_9genexpr17__pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 2056, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } /* exit inner scope */ + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } + + /* "apache_beam/coders/coder_impl.py":2053 + * sorted_components.append(None) + * + * return self.constructor( # <<<<<<<<<<<<<< + * *( + * sorted_components if self.encoding_positions_are_trivial else +*/ + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->constructor, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2025 + * cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_component_coder); + __Pyx_XDECREF(__pyx_v_null_mask_py); + __Pyx_XDECREF(__pyx_v_sorted_components); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2025, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2025, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2025, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 2025, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 2025, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2025, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2025, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2025, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2025, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 2025, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2058 + * [sorted_components[i] for i in self.encoding_positions])) + * + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(dest) + * n = len(next(iter(dest.values()))) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_skip_dispatch) { + int __pyx_v_i; + int64_t __pyx_v_nvals; + size_t __pyx_v_k; + size_t __pyx_v_n; + CYTHON_UNUSED PyObject *__pyx_v_null_mask = 0; + __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_v_null_mask_c; + PyObject *__pyx_v_attrs = NULL; + int64_t __pyx_v_null_mask_len; + PyObject *__pyx_v_attr = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + size_t __pyx_t_7; + size_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int64_t __pyx_t_11; + __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_t_12; + int __pyx_t_13; + int64_t __pyx_t_14; + int __pyx_t_15; + int __pyx_t_16; + PyObject *(*__pyx_t_17)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_batch_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_batch_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_dest, ((PyObject *)__pyx_v_in_stream)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2059 + * + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): + * attrs = self._row_column_encoders(dest) # <<<<<<<<<<<<<< + * n = len(next(iter(dest.values()))) + * for k in range(n): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_dest}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_row_column_encoders, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2059, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_attrs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2060 + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): + * attrs = self._row_column_encoders(dest) + * n = len(next(iter(dest.values()))) # <<<<<<<<<<<<<< + * for k in range(n): + * if in_stream.size() == 0: +*/ + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_dest); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_n = __pyx_t_6; + + /* "apache_beam/coders/coder_impl.py":2061 + * attrs = self._row_column_encoders(dest) + * n = len(next(iter(dest.values()))) + * for k in range(n): # <<<<<<<<<<<<<< + * if in_stream.size() == 0: + * break +*/ + __pyx_t_5 = __pyx_v_n; + __pyx_t_7 = __pyx_t_5; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_k = __pyx_t_8; + + /* "apache_beam/coders/coder_impl.py":2062 + * n = len(next(iter(dest.values()))) + * for k in range(n): + * if in_stream.size() == 0: # <<<<<<<<<<<<<< + * break + * nvals = in_stream.read_var_int64() +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->size(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2062, __pyx_L1_error) + __pyx_t_10 = (__pyx_t_9 == 0); + if (__pyx_t_10) { + + /* "apache_beam/coders/coder_impl.py":2063 + * for k in range(n): + * if in_stream.size() == 0: + * break # <<<<<<<<<<<<<< + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() +*/ + goto __pyx_L4_break; + + /* "apache_beam/coders/coder_impl.py":2062 + * n = len(next(iter(dest.values()))) + * for k in range(n): + * if in_stream.size() == 0: # <<<<<<<<<<<<<< + * break + * nvals = in_stream.read_var_int64() +*/ + } + + /* "apache_beam/coders/coder_impl.py":2064 + * if in_stream.size() == 0: + * break + * nvals = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2064, __pyx_L1_error) + __pyx_v_nvals = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":2065 + * break + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * if null_mask_len: + * # pylint: disable=unused-variable +*/ + __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_v_null_mask_len = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":2066 + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: # <<<<<<<<<<<<<< + * # pylint: disable=unused-variable + * null_mask_c = null_mask = in_stream.read(null_mask_len) +*/ + __pyx_t_10 = (__pyx_v_null_mask_len != 0); + if (__pyx_t_10) { + + /* "apache_beam/coders/coder_impl.py":2068 + * if null_mask_len: + * # pylint: disable=unused-variable + * null_mask_c = null_mask = in_stream.read(null_mask_len) # <<<<<<<<<<<<<< + * + * for i in range(min(self.num_fields, nvals)): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_null_mask_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 2068, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2068, __pyx_L1_error) + __pyx_v_null_mask_c = __pyx_t_12; + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_null_mask, ((PyObject*)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2066 + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() + * if null_mask_len: # <<<<<<<<<<<<<< + * # pylint: disable=unused-variable + * null_mask_c = null_mask = in_stream.read(null_mask_len) +*/ + } + + /* "apache_beam/coders/coder_impl.py":2070 + * null_mask_c = null_mask = in_stream.read(null_mask_len) + * + * for i in range(min(self.num_fields, nvals)): # <<<<<<<<<<<<<< + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] +*/ + __pyx_t_11 = __pyx_v_nvals; + __pyx_t_13 = __pyx_v_self->num_fields; + __pyx_t_10 = (__pyx_t_11 < __pyx_t_13); + if (__pyx_t_10) { + __pyx_t_14 = __pyx_t_11; + } else { + __pyx_t_14 = __pyx_t_13; + } + __pyx_t_11 = __pyx_t_14; + __pyx_t_14 = __pyx_t_11; + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { + __pyx_v_i = __pyx_t_13; + + /* "apache_beam/coders/coder_impl.py":2071 + * + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and +*/ + __pyx_t_10 = (!__pyx_v_self->encoding_positions_are_trivial); + if (__pyx_t_10) { + + /* "apache_beam/coders/coder_impl.py":2072 + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] # <<<<<<<<<<<<<< + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): +*/ + if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 2072, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_i = __pyx_t_15; + + /* "apache_beam/coders/coder_impl.py":2071 + * + * for i in range(min(self.num_fields, nvals)): + * if not self.encoding_positions_are_trivial: # <<<<<<<<<<<<<< + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and +*/ + } + + /* "apache_beam/coders/coder_impl.py":2073 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * continue +*/ + __pyx_t_16 = (__pyx_v_null_mask_len != 0); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_16 = ((__pyx_v_i >> 3) < __pyx_v_null_mask_len); + if (__pyx_t_16) { + } else { + __pyx_t_10 = __pyx_t_16; + goto __pyx_L11_bool_binop_done; + } + + /* "apache_beam/coders/coder_impl.py":2074 + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): # <<<<<<<<<<<<<< + * continue + * else: +*/ + __pyx_t_16 = (((__pyx_v_null_mask_c[(__pyx_v_i >> 3)]) & (0x01 << (__pyx_v_i & 0x07))) != 0); + __pyx_t_10 = __pyx_t_16; + __pyx_L11_bool_binop_done:; + + /* "apache_beam/coders/coder_impl.py":2073 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * continue +*/ + if (__pyx_t_10) { + + /* "apache_beam/coders/coder_impl.py":2075 + * if (null_mask_len and i >> 3 < null_mask_len and + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * continue # <<<<<<<<<<<<<< + * else: + * cython.cast(RowColumnEncoder, +*/ + goto __pyx_L7_continue; + + /* "apache_beam/coders/coder_impl.py":2073 + * if not self.encoding_positions_are_trivial: + * i = self.encoding_positions_argsort[i] + * if (null_mask_len and i >> 3 < null_mask_len and # <<<<<<<<<<<<<< + * null_mask_c[i >> 3] & (0x01 << (i & 0x07))): + * continue +*/ + } + + /* "apache_beam/coders/coder_impl.py":2078 + * else: + * cython.cast(RowColumnEncoder, + * attrs[i]).decode_from_stream(k, in_stream) # <<<<<<<<<<<<<< + * else: + * # Loop variable will be n-1 on normal exit. +*/ + /*else*/ { + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/coders/coder_impl.py":2077 + * continue + * else: + * cython.cast(RowColumnEncoder, # <<<<<<<<<<<<<< + * attrs[i]).decode_from_stream(k, in_stream) + * else: +*/ + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1)->__pyx_vtab)->decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1), __pyx_v_k, __pyx_v_in_stream); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2078, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L7_continue:; + } + } + /*else*/ { + + /* "apache_beam/coders/coder_impl.py":2081 + * else: + * # Loop variable will be n-1 on normal exit. + * k = n # <<<<<<<<<<<<<< + * + * for attr in attrs: +*/ + __pyx_v_k = __pyx_v_n; + } + __pyx_L4_break:; + + /* "apache_beam/coders/coder_impl.py":2083 + * k = n + * + * for attr in attrs: # <<<<<<<<<<<<<< + * attr.finalize_write() + * return k +*/ + if (likely(PyList_CheckExact(__pyx_v_attrs)) || PyTuple_CheckExact(__pyx_v_attrs)) { + __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_17 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_17 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2083, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_17)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2083, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2083, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2083, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_17(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2083, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2084 + * + * for attr in attrs: + * attr.finalize_write() # <<<<<<<<<<<<<< + * return k + * +*/ + __pyx_t_4 = __pyx_v_attr; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize_write, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2083 + * k = n + * + * for attr in attrs: # <<<<<<<<<<<<<< + * attr.finalize_write() + * return k +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2085 + * for attr in attrs: + * attr.finalize_write() + * return k # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2058 + * [sorted_components[i] for i in self.encoding_positions])) + * + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(dest) + * n = len(next(iter(dest.values()))) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_null_mask); + __Pyx_XDECREF(__pyx_v_attrs); + __Pyx_XDECREF(__pyx_v_attr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream = {"decode_batch_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_dest = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_batch_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dest,&__pyx_mstate_global->__pyx_n_u_in_stream,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2058, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2058, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2058, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_batch_from_stream", 0) < (0)) __PYX_ERR(0, 2058, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_batch_from_stream", 1, 2, 2, i); __PYX_ERR(0, 2058, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2058, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2058, __pyx_L3_error) + } + __pyx_v_dest = ((PyObject*)values[0]); + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_batch_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2058, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), (&PyDict_Type), 0, "dest", 2))) __PYX_ERR(0, 2058, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 2058, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_dest, __pyx_v_in_stream); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_batch_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(__pyx_v_self, __pyx_v_dest, __pyx_v_in_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->encoding_positions_are_trivial); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->has_nullable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_self->num_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self->components); + __Pyx_GIVEREF(__pyx_v_self->components); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->components) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->constructor); + __Pyx_GIVEREF(__pyx_v_self->constructor); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->constructor) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->encoding_positions); + __Pyx_GIVEREF(__pyx_v_self->encoding_positions); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->encoding_positions) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->encoding_positions_argsort); + __Pyx_GIVEREF(__pyx_v_self->encoding_positions_argsort); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->encoding_positions_argsort) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->field_names); + __Pyx_GIVEREF(__pyx_v_self->field_names); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->field_names) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->field_nullable); + __Pyx_GIVEREF(__pyx_v_self->field_nullable); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->field_nullable) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_t_3) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->schema); + __Pyx_GIVEREF(__pyx_v_self->schema); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_v_self->schema) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v__dict = __pyx_t_4; + __pyx_t_4 = 0; + + /* "(tree fragment)":7 + * state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_6 = (__pyx_v__dict != Py_None); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, None), state +*/ + /*else*/ { + __pyx_t_6 = (__pyx_v_self->components != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->constructor != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->encoding_positions != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->encoding_positions_argsort != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->field_names != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->field_nullable != ((PyObject*)Py_None)); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->schema != Py_None); + __pyx_t_5 = __pyx_t_6; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None + * if use_setstate: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowCoderImpl); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_254493075); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_254493075); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_254493075) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, None), state + * else: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowCoderImpl); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_254493075); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_254493075); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_254493075) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2089 + * + * class LogicalTypeCoderImpl(StreamCoderImpl): + * def __init__(self, logical_type, representation_coder): # <<<<<<<<<<<<<< + * self.logical_type = logical_type + * self.representation_coder = representation_coder.get_impl() +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_logical_type = 0; + PyObject *__pyx_v_representation_coder = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_logical_type,&__pyx_mstate_global->__pyx_n_u_representation_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2089, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2089, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2089, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 2089, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 2089, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2089, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2089, __pyx_L3_error) + } + __pyx_v_logical_type = values[0]; + __pyx_v_representation_coder = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2089, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_logical_type, __pyx_v_representation_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_logical_type, PyObject *__pyx_v_representation_coder) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl.py":2090 + * class LogicalTypeCoderImpl(StreamCoderImpl): + * def __init__(self, logical_type, representation_coder): + * self.logical_type = logical_type # <<<<<<<<<<<<<< + * self.representation_coder = representation_coder.get_impl() + * +*/ + __Pyx_INCREF(__pyx_v_logical_type); + __Pyx_GIVEREF(__pyx_v_logical_type); + __Pyx_GOTREF(__pyx_v_self->logical_type); + __Pyx_DECREF(__pyx_v_self->logical_type); + __pyx_v_self->logical_type = __pyx_v_logical_type; + + /* "apache_beam/coders/coder_impl.py":2091 + * def __init__(self, logical_type, representation_coder): + * self.logical_type = logical_type + * self.representation_coder = representation_coder.get_impl() # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_2 = __pyx_v_representation_coder; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 2091, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->representation_coder); + __Pyx_DECREF((PyObject *)__pyx_v_self->representation_coder); + __pyx_v_self->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2089 + * + * class LogicalTypeCoderImpl(StreamCoderImpl): + * def __init__(self, logical_type, representation_coder): # <<<<<<<<<<<<<< + * self.logical_type = logical_type + * self.representation_coder = representation_coder.get_impl() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2093 + * self.representation_coder = representation_coder.get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * return self.representation_coder.encode_to_stream( + * self.logical_type.to_representation_type(value), out, nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2094 + * + * def encode_to_stream(self, value, out, nested): + * return self.representation_coder.encode_to_stream( # <<<<<<<<<<<<<< + * self.logical_type.to_representation_type(value), out, nested) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/coders/coder_impl.py":2095 + * def encode_to_stream(self, value, out, nested): + * return self.representation_coder.encode_to_stream( + * self.logical_type.to_representation_type(value), out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_2 = __pyx_v_self->logical_type; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_representation_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/coders/coder_impl.py":2094 + * + * def encode_to_stream(self, value, out, nested): + * return self.representation_coder.encode_to_stream( # <<<<<<<<<<<<<< + * self.logical_type.to_representation_type(value), out, nested) + * +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->representation_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->representation_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2093 + * self.representation_coder = representation_coder.get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * return self.representation_coder.encode_to_stream( + * self.logical_type.to_representation_type(value), out, nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2093, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2093, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2093, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2093, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 2093, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 2093, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2093, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2093, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2093, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2093, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2097 + * self.logical_type.to_representation_type(value), out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * return self.logical_type.to_language_type( + * self.representation_coder.decode_from_stream(in_stream, nested)) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2098 + * + * def decode_from_stream(self, in_stream, nested): + * return self.logical_type.to_language_type( # <<<<<<<<<<<<<< + * self.representation_coder.decode_from_stream(in_stream, nested)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->logical_type; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/coders/coder_impl.py":2099 + * def decode_from_stream(self, in_stream, nested): + * return self.logical_type.to_language_type( + * self.representation_coder.decode_from_stream(in_stream, nested)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->representation_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->representation_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_language_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2097 + * self.logical_type.to_representation_type(value), out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * return self.logical_type.to_language_type( + * self.representation_coder.decode_from_stream(in_stream, nested)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2097, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2097, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2097, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 2097, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 2097, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2097, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2097, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2097, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2097, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 2097, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.logical_type, self.representation_coder) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->logical_type); + __Pyx_GIVEREF(__pyx_v_self->logical_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->logical_type) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->representation_coder); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->representation_coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->representation_coder)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.logical_type, self.representation_coder) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.logical_type, self.representation_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.logical_type is not None or self.representation_coder is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.logical_type, self.representation_coder) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.logical_type is not None or self.representation_coder is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->logical_type != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->representation_coder) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.logical_type is not None or self.representation_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.logical_type is not None or self.representation_coder is not None + * if use_setstate: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LogicalTypeCoderI); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_192480703); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_192480703); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_192480703) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.logical_type is not None or self.representation_coder is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, None), state + * else: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LogicalTypeCoderI); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_192480703); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_192480703); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_192480703) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2107 + * For interoperability with Java SDK, encoding needs to match that of the Java + * SDK BigIntegerCoder.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_byte_length = NULL; + PyObject *__pyx_v_encoded_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2109 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: # <<<<<<<<<<<<<< + * byte_length = ((value + 1).bit_length() + 8) // 8 + * else: +*/ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2109, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "apache_beam/coders/coder_impl.py":2110 + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: + * byte_length = ((value + 1).bit_length() + 8) // 8 # <<<<<<<<<<<<<< + * else: + * byte_length = (value.bit_length() + 8) // 8 +*/ + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_bit_length, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FloorDivideObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_byte_length = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2109 + * def encode_to_stream(self, value, out, nested): + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: # <<<<<<<<<<<<<< + * byte_length = ((value + 1).bit_length() + 8) // 8 + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/coder_impl.py":2112 + * byte_length = ((value + 1).bit_length() + 8) // 8 + * else: + * byte_length = (value.bit_length() + 8) // 8 # <<<<<<<<<<<<<< + * encoded_value = value.to_bytes( + * length=byte_length, byteorder='big', signed=True) +*/ + /*else*/ { + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_bit_length, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FloorDivideObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_byte_length = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/coders/coder_impl.py":2113 + * else: + * byte_length = (value.bit_length() + 8) // 8 + * encoded_value = value.to_bytes( # <<<<<<<<<<<<<< + * length=byte_length, byteorder='big', signed=True) + * out.write(encoded_value, nested) +*/ + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":2114 + * byte_length = (value.bit_length() + 8) // 8 + * encoded_value = value.to_bytes( + * length=byte_length, byteorder='big', signed=True) # <<<<<<<<<<<<<< + * out.write(encoded_value, nested) + * +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_length, __pyx_v_byte_length, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2113, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_byteorder, __pyx_mstate_global->__pyx_n_u_big, __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2113, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_signed, Py_True, __pyx_t_2, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2113, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_bytes, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_encoded_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2115 + * encoded_value = value.to_bytes( + * length=byte_length, byteorder='big', signed=True) + * out.write(encoded_value, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_1 = __pyx_v_encoded_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2115, __pyx_L1_error) + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.nested = __pyx_v_nested; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_1), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2107 + * For interoperability with Java SDK, encoding needs to match that of the Java + * SDK BigIntegerCoder.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_byte_length); + __Pyx_XDECREF(__pyx_v_encoded_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2107, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2107, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2107, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2107, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 2107, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 2107, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2107, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2107, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2107, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2107, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2107, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 2107, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2117 + * out.write(encoded_value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * encoded_value = in_stream.read_all(nested) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_encoded_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2119 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> int + * encoded_value = in_stream.read_all(nested) # <<<<<<<<<<<<<< + * return int.from_bytes(encoded_value, byteorder='big', signed=True) + * +*/ + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.nested = __pyx_v_nested; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_encoded_value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2120 + * # type: (create_InputStream, bool) -> int + * encoded_value = in_stream.read_all(nested) + * return int.from_bytes(encoded_value, byteorder='big', signed=True) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)(&PyLong_Type)); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_encoded_value}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_byteorder, __pyx_mstate_global->__pyx_n_u_big, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2120, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_signed, Py_True, __pyx_t_4, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2120, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_bytes, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2117 + * out.write(encoded_value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * encoded_value = in_stream.read_all(nested) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_encoded_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2117, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2117, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2117, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 2117, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 2117, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2117, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2117, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2117, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 2117, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigIntegerCoderIm); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigIntegerCoderIm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2131 + * BIG_INT_CODER_IMPL = BigIntegerCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (decimal.Decimal, create_OutputStream, bool) -> None + * scale = -value.as_tuple().exponent # type: ignore[operator] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_scale = NULL; + PyObject *__pyx_v_int_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2133 + * def encode_to_stream(self, value, out, nested): + * # type: (decimal.Decimal, create_OutputStream, bool) -> None + * scale = -value.as_tuple().exponent # type: ignore[operator] # <<<<<<<<<<<<<< + * int_value = int(value.scaleb(scale)) + * out.write_var_int64(scale) +*/ + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_tuple, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exponent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_scale = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2134 + * # type: (decimal.Decimal, create_OutputStream, bool) -> None + * scale = -value.as_tuple().exponent # type: ignore[operator] + * int_value = int(value.scaleb(scale)) # <<<<<<<<<<<<<< + * out.write_var_int64(scale) + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) +*/ + __pyx_t_2 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_scale}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scaleb, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_int_value = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2135 + * scale = -value.as_tuple().exponent # type: ignore[operator] + * int_value = int(value.scaleb(scale)) + * out.write_var_int64(scale) # <<<<<<<<<<<<<< + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) + * +*/ + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_v_scale); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2135, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_7, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2136 + * int_value = int(value.scaleb(scale)) + * out.write_var_int64(scale) + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) # <<<<<<<<<<<<<< + * + * def decode_from_stream(self, in_stream, nested): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_BIG_INT_CODER_IMPL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_int_value, ((PyObject *)__pyx_v_out), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl.py":2131 + * BIG_INT_CODER_IMPL = BigIntegerCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (decimal.Decimal, create_OutputStream, bool) -> None + * scale = -value.as_tuple().exponent # type: ignore[operator] +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_scale); + __Pyx_XDECREF(__pyx_v_int_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2131, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2131, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2131, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2131, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode_to_stream", 0) < (0)) __PYX_ERR(0, 2131, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, i); __PYX_ERR(0, 2131, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2131, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2131, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2131, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2131, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 2131, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl.py":2138 + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> decimal.Decimal + * scale = in_stream.read_var_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) { + PyObject *__pyx_v_scale = NULL; + PyObject *__pyx_v_int_value = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/coder_impl.py":2140 + * def decode_from_stream(self, in_stream, nested): + * # type: (create_InputStream, bool) -> decimal.Decimal + * scale = in_stream.read_var_int64() # <<<<<<<<<<<<<< + * int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested) + * value = decimal.Decimal(int_value).scaleb(-scale) +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_scale = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2141 + * # type: (create_InputStream, bool) -> decimal.Decimal + * scale = in_stream.read_var_int64() + * int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested) # <<<<<<<<<<<<<< + * value = decimal.Decimal(int_value).scaleb(-scale) + * return value +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_BIG_INT_CODER_IMPL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_in_stream), __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_int_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2142 + * scale = in_stream.read_var_int64() + * int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested) + * value = decimal.Decimal(int_value).scaleb(-scale) # <<<<<<<<<<<<<< + * return value +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_decimal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_int_value}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Negative(__pyx_v_scale); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scaleb, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl.py":2143 + * int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested) + * value = decimal.Decimal(int_value).scaleb(-scale) + * return value # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_value); + __pyx_r = __pyx_v_value; + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl.py":2138 + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> decimal.Decimal + * scale = in_stream.read_var_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_scale); + __Pyx_XDECREF(__pyx_v_int_value); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_stream,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2138, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "decode_from_stream", 0) < (0)) __PYX_ERR(0, 2138, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, i); __PYX_ERR(0, 2138, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2138, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2138, __pyx_L3_error) + } + __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]); + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2138, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2138, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 2138, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("decode_from_stream", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DecimalCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DecimalCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_CoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_CoderImpl = {"__pyx_unpickle_CoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_CoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_CoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_CoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14__pyx_unpickle_CoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14__pyx_unpickle_CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = CoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_SimpleCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_SimpleCoderImpl = {"__pyx_unpickle_SimpleCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_SimpleCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_SimpleCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SimpleCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16__pyx_unpickle_SimpleCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16__pyx_unpickle_SimpleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = SimpleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SimpleCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SimpleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SimpleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SimpleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SimpleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_StreamCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_StreamCoderImpl = {"__pyx_unpickle_StreamCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_StreamCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_StreamCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_StreamCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StreamCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StreamCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18__pyx_unpickle_StreamCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18__pyx_unpickle_StreamCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = StreamCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = StreamCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = StreamCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = StreamCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = StreamCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_StreamCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_CallbackCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_CallbackCoderImpl = {"__pyx_unpickle_CallbackCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_CallbackCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_CallbackCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_CallbackCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallbackCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallbackCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20__pyx_unpickle_CallbackCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20__pyx_unpickle_CallbackCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') # <<<<<<<<<<<<<< + * __pyx_result = CallbackCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, __pyx_k_decoder__encoder__size_estimato); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') + * __pyx_result = CallbackCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') + * __pyx_result = CallbackCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = CallbackCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') + * __pyx_result = CallbackCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x86660dc, 0xa4a2c07, 0xd79bc1f, b'_decoder, _encoder, _size_estimator') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_decoder); + __Pyx_DECREF(__pyx_v___pyx_result->_decoder); + __pyx_v___pyx_result->_decoder = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_encoder); + __Pyx_DECREF(__pyx_v___pyx_result->_encoder); + __pyx_v___pyx_result->_encoder = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_size_estimator); + __Pyx_DECREF(__pyx_v___pyx_result->_size_estimator); + __pyx_v___pyx_result->_size_estimator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_CallbackCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_FastPrimitivesCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_FastPrimitivesCoderImpl = {"__pyx_unpickle_FastPrimitivesCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_FastPrimitivesCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_FastPrimitivesCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_FastPrimitivesCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastPrimitivesCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastPrimitivesCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22__pyx_unpickle_FastPrimitivesCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22__pyx_unpickle_FastPrimitivesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') # <<<<<<<<<<<<<< + * __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, __pyx_k_fallback_coder_impl_force_use_di); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') + * __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') + * __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') + * __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.force_use_dill = __pyx_state[1]; __pyx_result.iterable_coder_impl = __pyx_state[2]; __pyx_result.requires_deterministic_step_label = __pyx_state[3]; __pyx_result.use_relative_filepaths = __pyx_state[4]; __pyx_result.warn_deterministic_fallback = __pyx_state[5] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.force_use_dill = __pyx_state[1]; __pyx_result.iterable_coder_impl = __pyx_state[2]; __pyx_result.requires_deterministic_step_label = __pyx_state[3]; __pyx_result.use_relative_filepaths = __pyx_state[4]; __pyx_result.warn_deterministic_fallback = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.force_use_dill = __pyx_state[1]; __pyx_result.iterable_coder_impl = __pyx_state[2]; __pyx_result.requires_deterministic_step_label = __pyx_state[3]; __pyx_result.use_relative_filepaths = __pyx_state[4]; __pyx_result.warn_deterministic_fallback = __pyx_state[5] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->fallback_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->fallback_coder_impl); + __pyx_v___pyx_result->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->force_use_dill = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->iterable_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->iterable_coder_impl); + __pyx_v___pyx_result->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->requires_deterministic_step_label); + __Pyx_DECREF(__pyx_v___pyx_result->requires_deterministic_step_label); + __pyx_v___pyx_result->requires_deterministic_step_label = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->use_relative_filepaths = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->warn_deterministic_fallback = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.force_use_dill = __pyx_state[1]; __pyx_result.iterable_coder_impl = __pyx_state[2]; __pyx_result.requires_deterministic_step_label = __pyx_state[3]; __pyx_result.use_relative_filepaths = __pyx_state[4]; __pyx_result.warn_deterministic_fallback = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 6); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.force_use_dill = __pyx_state[1]; __pyx_result.iterable_coder_impl = __pyx_state[2]; __pyx_result.requires_deterministic_step_label = __pyx_state[3]; __pyx_result.use_relative_filepaths = __pyx_state[4]; __pyx_result.warn_deterministic_fallback = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_BytesCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_BytesCoderImpl = {"__pyx_unpickle_BytesCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_BytesCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_BytesCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BytesCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_24__pyx_unpickle_BytesCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_24__pyx_unpickle_BytesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = BytesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BytesCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BytesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BytesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BytesCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BytesCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_BooleanCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_BooleanCoderImpl = {"__pyx_unpickle_BooleanCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_BooleanCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_BooleanCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BooleanCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BooleanCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BooleanCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26__pyx_unpickle_BooleanCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26__pyx_unpickle_BooleanCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = BooleanCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BooleanCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BooleanCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BooleanCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BooleanCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BooleanCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MapCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_MapCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_MapCoderImpl = {"__pyx_unpickle_MapCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_MapCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_MapCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MapCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MapCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MapCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_28__pyx_unpickle_MapCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_28__pyx_unpickle_MapCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MapCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') # <<<<<<<<<<<<<< + * __pyx_result = MapCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, __pyx_k_is_deterministic__key_coder__va); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') + * __pyx_result = MapCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') + * __pyx_result = MapCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MapCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') + * __pyx_result = MapCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MapCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3172254, 0xa5c3328, 0x00bc84d, b'_is_deterministic, _key_coder, _value_coder') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_is_deterministic = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_key_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_key_coder); + __pyx_v___pyx_result->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MapCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_BigEndianShortCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_BigEndianShortCoderImpl = {"__pyx_unpickle_BigEndianShortCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_BigEndianShortCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_BigEndianShortCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BigEndianShortCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigEndianShortCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigEndianShortCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_30__pyx_unpickle_BigEndianShortCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_30__pyx_unpickle_BigEndianShortCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BigEndianShortCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_SinglePrecisionFloatCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_SinglePrecisionFloatCoderImpl = {"__pyx_unpickle_SinglePrecisionFloatCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_SinglePrecisionFloatCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_SinglePrecisionFloatCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SinglePrecisionFloatCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_32__pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_32__pyx_unpickle_SinglePrecisionFloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_FloatCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_FloatCoderImpl = {"__pyx_unpickle_FloatCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_FloatCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_FloatCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_FloatCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_34__pyx_unpickle_FloatCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_34__pyx_unpickle_FloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = FloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = FloatCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = FloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = FloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = FloatCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_FloatCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_IntervalWindowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_IntervalWindowCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_IntervalWindowCoderImpl = {"__pyx_unpickle_IntervalWindowCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_IntervalWindowCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_IntervalWindowCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_IntervalWindowCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalWindowCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalWindowCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_36__pyx_unpickle_IntervalWindowCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36__pyx_unpickle_IntervalWindowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_IntervalWindowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_IntervalWindowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_IntervalWindowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TimestampCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TimestampCoderImpl = {"__pyx_unpickle_TimestampCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TimestampCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TimestampCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_TimestampCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_38__pyx_unpickle_TimestampCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_38__pyx_unpickle_TimestampCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') # <<<<<<<<<<<<<< + * __pyx_result = TimestampCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, __pyx_k_timestamp_class); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') + * __pyx_result = TimestampCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') + * __pyx_result = TimestampCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = TimestampCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') + * __pyx_result = TimestampCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.timestamp_class = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.timestamp_class = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.timestamp_class = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timestamp_class); + __Pyx_DECREF(__pyx_v___pyx_result->timestamp_class); + __pyx_v___pyx_result->timestamp_class = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.timestamp_class = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_TimestampCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.timestamp_class = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_VarIntCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_VarIntCoderImpl = {"__pyx_unpickle_VarIntCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_VarIntCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_VarIntCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_VarIntCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarIntCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarIntCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_40__pyx_unpickle_VarIntCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_40__pyx_unpickle_VarIntCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = VarIntCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarIntCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarIntCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = VarIntCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarIntCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_VarIntCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_VarInt32CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_VarInt32CoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_VarInt32CoderImpl = {"__pyx_unpickle_VarInt32CoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_VarInt32CoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_VarInt32CoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_VarInt32CoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_VarInt32CoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarInt32CoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarInt32CoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarInt32CoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_42__pyx_unpickle_VarInt32CoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_42__pyx_unpickle_VarInt32CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_VarInt32CoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_VarInt32CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = VarInt32CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarInt32CoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarInt32CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = VarInt32CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_VarInt32CoderImpl__set_state(VarInt32CoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarInt32CoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = VarInt32CoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_VarInt32CoderImpl__set_state(VarInt32CoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_VarInt32CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarInt32CoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_VarInt32CoderImpl__set_state(VarInt32CoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarInt32CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_VarInt32CoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_VarInt32CoderImpl__set_state(VarInt32CoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_VarInt32CoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_VarInt32CoderImpl__set_state(VarInt32CoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarInt32CoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle_SingletonCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_45__pyx_unpickle_SingletonCoderImpl = {"__pyx_unpickle_SingletonCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle_SingletonCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle_SingletonCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SingletonCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_44__pyx_unpickle_SingletonCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_44__pyx_unpickle_SingletonCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') # <<<<<<<<<<<<<< + * __pyx_result = SingletonCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, __pyx_k_value_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SingletonCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SingletonCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SingletonCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SingletonCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_value); + __Pyx_DECREF(__pyx_v___pyx_result->_value); + __pyx_v___pyx_result->_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SingletonCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_AbstractComponentCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_AbstractComponentCoderImpl = {"__pyx_unpickle_AbstractComponentCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_AbstractComponentCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_AbstractComponentCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_AbstractComponentCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractComponentCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractComponentCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_46__pyx_unpickle_AbstractComponentCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_46__pyx_unpickle_AbstractComponentCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') # <<<<<<<<<<<<<< + * __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, __pyx_k_coder_impls_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_coder_impls); + __Pyx_DECREF(__pyx_v___pyx_result->_coder_impls); + __pyx_v___pyx_result->_coder_impls = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_AbstractComponentCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_TupleCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_TupleCoderImpl = {"__pyx_unpickle_TupleCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_TupleCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_TupleCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_TupleCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_48__pyx_unpickle_TupleCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_48__pyx_unpickle_TupleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') # <<<<<<<<<<<<<< + * __pyx_result = TupleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, __pyx_k_coder_impls_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = TupleCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = TupleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = TupleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') + * __pyx_result = TupleCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._coder_impls); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._coder_impls); + __pyx_v___pyx_result->__pyx_base._coder_impls = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_TupleCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_SequenceCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_SequenceCoderImpl = {"__pyx_unpickle_SequenceCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_SequenceCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_SequenceCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SequenceCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SequenceCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SequenceCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_50__pyx_unpickle_SequenceCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_50__pyx_unpickle_SequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') # <<<<<<<<<<<<<< + * __pyx_result = SequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, __pyx_k_elem_coder__read_state__write_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = SequenceCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = SequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = SequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_elem_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_elem_coder); + __pyx_v___pyx_result->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_read_state); + __Pyx_DECREF(__pyx_v___pyx_result->_read_state); + __pyx_v___pyx_result->_read_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_write_state); + __Pyx_DECREF(__pyx_v___pyx_result->_write_state); + __pyx_v___pyx_result->_write_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_write_state_threshold = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_TupleSequenceCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_TupleSequenceCoderImpl = {"__pyx_unpickle_TupleSequenceCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_TupleSequenceCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_TupleSequenceCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_TupleSequenceCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleSequenceCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleSequenceCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_52__pyx_unpickle_TupleSequenceCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_52__pyx_unpickle_TupleSequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') # <<<<<<<<<<<<<< + * __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, __pyx_k_elem_coder__read_state__write_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state); + __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state); + __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_TupleSequenceCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle__AbstractIterable(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_55__pyx_unpickle__AbstractIterable = {"__pyx_unpickle__AbstractIterable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle__AbstractIterable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle__AbstractIterable(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__AbstractIterable", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__AbstractIterable", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__AbstractIterable", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_54__pyx_unpickle__AbstractIterable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_54__pyx_unpickle__AbstractIterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') # <<<<<<<<<<<<<< + * __pyx_result = _AbstractIterable.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, __pyx_k_contents_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') + * __pyx_result = _AbstractIterable.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') + * __pyx_result = _AbstractIterable.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _AbstractIterable.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') + * __pyx_result = _AbstractIterable.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): + * __pyx_result._contents = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._contents = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): + * __pyx_result._contents = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_contents); + __Pyx_DECREF(__pyx_v___pyx_result->_contents); + __pyx_v___pyx_result->_contents = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): + * __pyx_result._contents = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._contents = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_IterableCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_IterableCoderImpl = {"__pyx_unpickle_IterableCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_IterableCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_IterableCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_IterableCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IterableCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IterableCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_56__pyx_unpickle_IterableCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_56__pyx_unpickle_IterableCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') # <<<<<<<<<<<<<< + * __pyx_result = IterableCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, __pyx_k_elem_coder__read_state__use_abs); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') + * __pyx_result = IterableCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') + * __pyx_result = IterableCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = IterableCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') + * __pyx_result = IterableCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf875643, 0xe4d5390, 0x3c5c876, b'_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state); + __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_use_abstract_iterable = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state); + __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_3; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_IterableCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_ListCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_ListCoderImpl = {"__pyx_unpickle_ListCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_ListCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_ListCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ListCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_58__pyx_unpickle_ListCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_58__pyx_unpickle_ListCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') # <<<<<<<<<<<<<< + * __pyx_result = ListCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, __pyx_k_elem_coder__read_state__write_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = ListCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = ListCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ListCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') + * __pyx_result = ListCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder); + __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state); + __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state); + __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ListCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_PaneInfoCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_PaneInfoCoderImpl = {"__pyx_unpickle_PaneInfoCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_PaneInfoCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_PaneInfoCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_PaneInfoCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PaneInfoCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PaneInfoCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_60__pyx_unpickle_PaneInfoCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_60__pyx_unpickle_PaneInfoCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_PaneInfoCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OrderedUnionCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle__OrderedUnionCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_63__pyx_unpickle__OrderedUnionCoderImpl = {"__pyx_unpickle__OrderedUnionCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle__OrderedUnionCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle__OrderedUnionCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__OrderedUnionCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__OrderedUnionCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OrderedUnionCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OrderedUnionCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__OrderedUnionCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_62__pyx_unpickle__OrderedUnionCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_62__pyx_unpickle__OrderedUnionCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__OrderedUnionCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__OrderedUnionCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') # <<<<<<<<<<<<<< + * __pyx_result = _OrderedUnionCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, __pyx_k_coder_impls__fallback_coder_imp); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') + * __pyx_result = _OrderedUnionCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') + * __pyx_result = _OrderedUnionCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _OrderedUnionCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__OrderedUnionCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') + * __pyx_result = _OrderedUnionCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0]; __pyx_result._fallback_coder_impl = __pyx_state[1]; __pyx_result._types = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OrderedUnionCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__OrderedUnionCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0]; __pyx_result._fallback_coder_impl = __pyx_state[1]; __pyx_result._types = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__OrderedUnionCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__OrderedUnionCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0]; __pyx_result._fallback_coder_impl = __pyx_state[1]; __pyx_result._types = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_coder_impls); + __Pyx_DECREF(__pyx_v___pyx_result->_coder_impls); + __pyx_v___pyx_result->_coder_impls = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_fallback_coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_fallback_coder_impl); + __pyx_v___pyx_result->_fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_types); + __Pyx_DECREF(__pyx_v___pyx_result->_types); + __pyx_v___pyx_result->_types = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._coder_impls = __pyx_state[0]; __pyx_result._fallback_coder_impl = __pyx_state[1]; __pyx_result._types = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(<_OrderedUnionCoderImpl> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__OrderedUnionCoderImpl__set_state(_OrderedUnionCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._coder_impls = __pyx_state[0]; __pyx_result._fallback_coder_impl = __pyx_state[1]; __pyx_result._types = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__OrderedUnionCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_WindowedValueCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_WindowedValueCoderImpl = {"__pyx_unpickle_WindowedValueCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_WindowedValueCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_WindowedValueCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_WindowedValueCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedValueCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedValueCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_64__pyx_unpickle_WindowedValueCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_64__pyx_unpickle_WindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') # <<<<<<<<<<<<<< + * __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, __pyx_k_pane_info_coder__timestamp_code); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') + * __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') + * __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') + * __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6be047d, 0x87e748d, 0x7f7a287, b'_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_pane_info_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_pane_info_coder); + __pyx_v___pyx_result->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_timestamp_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_timestamp_coder); + __pyx_v___pyx_result->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_windows_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_windows_coder); + __pyx_v___pyx_result->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_WindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_ParamWindowedValueCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_ParamWindowedValueCoderImpl = {"__pyx_unpickle_ParamWindowedValueCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_ParamWindowedValueCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_ParamWindowedValueCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ParamWindowedValueCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ParamWindowedValueCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ParamWindowedValueCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_66__pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_66__pyx_unpickle_ParamWindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') # <<<<<<<<<<<<<< + * __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, __pyx_k_pane_info__pane_info_coder__tim); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') + * __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') + * __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') + * __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_pane_info); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_pane_info); + __pyx_v___pyx_result->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pane_info_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._pane_info_coder); + __pyx_v___pyx_result->__pyx_base._pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_timestamp = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._timestamp_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._timestamp_coder); + __pyx_v___pyx_result->__pyx_base._timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._value_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._value_coder); + __pyx_v___pyx_result->__pyx_base._value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_windows); + __Pyx_DECREF(__pyx_v___pyx_result->_windows); + __pyx_v___pyx_result->_windows = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base._windows_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base._windows_coder); + __pyx_v___pyx_result->__pyx_base._windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_LengthPrefixCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_LengthPrefixCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_LengthPrefixCoderImpl = {"__pyx_unpickle_LengthPrefixCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_LengthPrefixCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_LengthPrefixCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_LengthPrefixCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LengthPrefixCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LengthPrefixCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_68__pyx_unpickle_LengthPrefixCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_68__pyx_unpickle_LengthPrefixCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_LengthPrefixCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') # <<<<<<<<<<<<<< + * __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, __pyx_k_value_coder_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') + * __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') + * __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') + * __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value_coder = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_LengthPrefixCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7fd8b79, 0x057c964, 0x5789e75, b'_value_coder') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value_coder = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value_coder = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_value_coder); + __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result._value_coder = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_LengthPrefixCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value_coder = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_71__pyx_unpickle_RowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_71__pyx_unpickle_RowColumnEncoder = {"__pyx_unpickle_RowColumnEncoder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_71__pyx_unpickle_RowColumnEncoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_71__pyx_unpickle_RowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_RowColumnEncoder", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowColumnEncoder", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowColumnEncoder", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_70__pyx_unpickle_RowColumnEncoder(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_70__pyx_unpickle_RowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = RowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = RowColumnEncoder.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = RowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = RowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = RowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_RowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_GenericRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_73__pyx_unpickle_GenericRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_73__pyx_unpickle_GenericRowColumnEncoder = {"__pyx_unpickle_GenericRowColumnEncoder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_73__pyx_unpickle_GenericRowColumnEncoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_73__pyx_unpickle_GenericRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_GenericRowColumnEncoder", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenericRowColumnEncoder", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenericRowColumnEncoder", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_72__pyx_unpickle_GenericRowColumnEncoder(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_72__pyx_unpickle_GenericRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_GenericRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') # <<<<<<<<<<<<<< + * __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, __pyx_k_coder_impl_column); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') + * __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') + * __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') + * __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_GenericRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6ad26e8, 0xf2b4268, 0xf452421, b'coder_impl, column') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->coder_impl); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->coder_impl); + __pyx_v___pyx_result->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->column); + __Pyx_DECREF(__pyx_v___pyx_result->column); + __pyx_v___pyx_result->column = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_GenericRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_75__pyx_unpickle_RowCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_75__pyx_unpickle_RowCoderImpl = {"__pyx_unpickle_RowCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_75__pyx_unpickle_RowCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_75__pyx_unpickle_RowCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_RowCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_74__pyx_unpickle_RowCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_74__pyx_unpickle_RowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') # <<<<<<<<<<<<<< + * __pyx_result = RowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, __pyx_k_components_constructor_encoding); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') + * __pyx_result = RowCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') + * __pyx_result = RowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = RowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') + * __pyx_result = RowCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->components); + __Pyx_DECREF(__pyx_v___pyx_result->components); + __pyx_v___pyx_result->components = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->constructor); + __Pyx_DECREF(__pyx_v___pyx_result->constructor); + __pyx_v___pyx_result->constructor = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->encoding_positions); + __Pyx_DECREF(__pyx_v___pyx_result->encoding_positions); + __pyx_v___pyx_result->encoding_positions = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->encoding_positions_are_trivial = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->encoding_positions_argsort); + __Pyx_DECREF(__pyx_v___pyx_result->encoding_positions_argsort); + __pyx_v___pyx_result->encoding_positions_argsort = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->field_names); + __Pyx_DECREF(__pyx_v___pyx_result->field_names); + __pyx_v___pyx_result->field_names = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->field_nullable); + __Pyx_DECREF(__pyx_v___pyx_result->field_nullable); + __pyx_v___pyx_result->field_nullable = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_nullable_fields = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->num_fields = __pyx_t_3; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->schema); + __Pyx_DECREF(__pyx_v___pyx_result->schema); + __pyx_v___pyx_result->schema = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 10); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_RowCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_LogicalTypeCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_77__pyx_unpickle_LogicalTypeCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_77__pyx_unpickle_LogicalTypeCoderImpl = {"__pyx_unpickle_LogicalTypeCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_77__pyx_unpickle_LogicalTypeCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_77__pyx_unpickle_LogicalTypeCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_LogicalTypeCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogicalTypeCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogicalTypeCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_76__pyx_unpickle_LogicalTypeCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_76__pyx_unpickle_LogicalTypeCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_LogicalTypeCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') # <<<<<<<<<<<<<< + * __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, __pyx_k_logical_type_representation_code); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') + * __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') + * __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') + * __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_LogicalTypeCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb7905bf, 0x2e68dea, 0x10f5c41, b'logical_type, representation_coder') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->logical_type); + __Pyx_DECREF(__pyx_v___pyx_result->logical_type); + __pyx_v___pyx_result->logical_type = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->representation_coder); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->representation_coder); + __pyx_v___pyx_result->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): + * __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_LogicalTypeCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_79__pyx_unpickle_BigIntegerCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_79__pyx_unpickle_BigIntegerCoderImpl = {"__pyx_unpickle_BigIntegerCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_79__pyx_unpickle_BigIntegerCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_79__pyx_unpickle_BigIntegerCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BigIntegerCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigIntegerCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigIntegerCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_78__pyx_unpickle_BigIntegerCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_78__pyx_unpickle_BigIntegerCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BigIntegerCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DecimalCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_81__pyx_unpickle_DecimalCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_81__pyx_unpickle_DecimalCoderImpl = {"__pyx_unpickle_DecimalCoderImpl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_81__pyx_unpickle_DecimalCoderImpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_81__pyx_unpickle_DecimalCoderImpl(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DecimalCoderImpl", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalCoderImpl", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalCoderImpl", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_80__pyx_unpickle_DecimalCoderImpl(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_80__pyx_unpickle_DecimalCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DecimalCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = DecimalCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = DecimalCoderImpl.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = DecimalCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DecimalCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = DecimalCoderImpl.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DecimalCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DecimalCoderImpl__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl[] = { + {"encode_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"decode_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl_spec = { + "apache_beam.coders.coder_impl.CoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""CoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SimpleCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Subclass of CoderImpl implementing stream methods using encode/decode.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_SimpleCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl_spec = { + "apache_beam.coders.coder_impl.SimpleCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""SimpleCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Subclass of CoderImpl implementing stream methods using encode/decode."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_StreamCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Subclass of CoderImpl implementing encode/decode using stream methods.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_StreamCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl_spec = { + "apache_beam.coders.coder_impl.StreamCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""StreamCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Subclass of CoderImpl implementing encode/decode using stream methods."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_StreamCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + p->_encoder = Py_None; Py_INCREF(Py_None); + p->_decoder = Py_None; Py_INCREF(Py_None); + p->_size_estimator = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_encoder); + Py_CLEAR(p->_decoder); + Py_CLEAR(p->_size_estimator); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_encoder) { + e = (*v)(p->_encoder, a); if (e) return e; + } + if (p->_decoder) { + e = (*v)(p->_decoder, a); if (e) return e; + } + if (p->_size_estimator) { + e = (*v)(p->_size_estimator, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); } + tmp = ((PyObject*)p->_encoder); + p->_encoder = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_decoder); + p->_decoder = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_size_estimator); + p->_size_estimator = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_CallbackCoderImpl[] = { + {"_default_size_estimator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A CoderImpl that calls back to the _impl methods on the Coder itself.\n\n This is the default implementation used if Coder._get_impl()\n is not overwritten.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_CallbackCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl_spec = { + "apache_beam.coders.coder_impl.CallbackCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""CallbackCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A CoderImpl that calls back to the _impl methods on the Coder itself.\n\n This is the default implementation used if Coder._get_impl()\n is not overwritten.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + p->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->requires_deterministic_step_label = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->fallback_coder_impl); + Py_CLEAR(p->iterable_coder_impl); + Py_CLEAR(p->requires_deterministic_step_label); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->fallback_coder_impl) { + e = (*v)(((PyObject *)p->fallback_coder_impl), a); if (e) return e; + } + if (p->iterable_coder_impl) { + e = (*v)(((PyObject *)p->iterable_coder_impl), a); if (e) return e; + } + if (p->requires_deterministic_step_label) { + e = (*v)(p->requires_deterministic_step_label, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); } + tmp = ((PyObject*)p->fallback_coder_impl); + p->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->iterable_coder_impl); + p->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->requires_deterministic_step_label); + p->requires_deterministic_step_label = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl[] = { + {"register_iterable_like_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_deterministic_encoding_error_msg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl_spec = { + "apache_beam.coders.coder_impl.FastPrimitivesCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""FastPrimitivesCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl; + p->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_key_coder); + Py_CLEAR(p->_value_coder); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_key_coder) { + e = (*v)(((PyObject *)p->_key_coder), a); if (e) return e; + } + if (p->_value_coder) { + e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl); } + tmp = ((PyObject*)p->_key_coder); + p->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_value_coder); + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_MapCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Note this implementation always uses nested context when encoding keys\n and values. This differs from Java's MapCoder, which uses\n nested=False if possible for the last value encoded.\n\n This difference is acceptable because MapCoder is not standard. It is only\n used in a standard context by RowCoder which always uses nested context for\n attribute values.\n\n A coder for typing.Mapping objects.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_MapCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl_spec = { + "apache_beam.coders.coder_impl.MapCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""MapCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Note this implementation always uses nested context when encoding keys\n and values. This differs from Java's MapCoder, which uses\n nested=False if possible for the last value encoded.\n\n This difference is acceptable because MapCoder is not standard. It is only\n used in a standard context by RowCoder which always uses nested context for\n attribute values.\n\n A coder for typing.Mapping objects."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BytesCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for bytes/str objects.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_BytesCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl_spec = { + "apache_beam.coders.coder_impl.BytesCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""BytesCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for bytes/str objects."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_BytesCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BooleanCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for bool objects.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_BooleanCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl_spec = { + "apache_beam.coders.coder_impl.BooleanCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""BooleanCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for bool objects."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl_spec = { + "apache_beam.coders.coder_impl.BigEndianShortCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""BigEndianShortCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl_spec = { + "apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""SinglePrecisionFloatCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_FloatCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_FloatCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl_spec = { + "apache_beam.coders.coder_impl.FloatCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""FloatCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_FloatCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + p->timestamp_class = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->timestamp_class); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->timestamp_class) { + e = (*v)(p->timestamp_class, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); } + tmp = ((PyObject*)p->timestamp_class); + p->timestamp_class = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TimestampCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n TODO: SDK agnostic encoding\n For interoperability with Java SDK, encoding needs to match\n that of the Java SDK InstantCoder.\n https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_TimestampCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl_spec = { + "apache_beam.coders.coder_impl.TimestampCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""TimestampCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n TODO: SDK agnostic encoding\n For interoperability with Java SDK, encoding needs to match\n that of the Java SDK InstantCoder.\n https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_VarIntCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for int objects.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_VarIntCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl_spec = { + "apache_beam.coders.coder_impl.VarIntCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""VarIntCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for int objects."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for int32 objects.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl_spec = { + "apache_beam.coders.coder_impl.VarInt32CoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""VarInt32CoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for int32 objects."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + p->_value = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_value); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_value) { + e = (*v)(p->_value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); } + tmp = ((PyObject*)p->_value); + p->_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SingletonCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder that always encodes exactly one value.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_SingletonCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl_spec = { + "apache_beam.coders.coder_impl.SingletonCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""SingletonCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder that always encodes exactly one value."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_coder_impls); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_coder_impls) { + e = (*v)(p->_coder_impls, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); } + tmp = ((PyObject*)p->_coder_impls); + p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n CoderImpl for coders that are comprised of several component coders.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl_spec = { + "apache_beam.coders.coder_impl.AbstractComponentCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""AbstractComponentCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n CoderImpl for coders that are comprised of several component coders."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TupleCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("A coder for tuple objects.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_TupleCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl_spec = { + "apache_beam.coders.coder_impl.TupleCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""TupleCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A coder for tuple objects."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_TupleCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + p->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->_read_state = Py_None; Py_INCREF(Py_None); + p->_write_state = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_elem_coder); + Py_CLEAR(p->_read_state); + Py_CLEAR(p->_write_state); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_elem_coder) { + e = (*v)(((PyObject *)p->_elem_coder), a); if (e) return e; + } + if (p->_read_state) { + e = (*v)(p->_read_state, a); if (e) return e; + } + if (p->_write_state) { + e = (*v)(p->_write_state, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); } + tmp = ((PyObject*)p->_elem_coder); + p->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_read_state); + p->_read_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_write_state); + p->_write_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SequenceCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for sequences.\n\n If the length of the sequence in known we encode the length as a 32 bit\n ``int`` followed by the encoded bytes.\n\n If the length of the sequence is unknown, we encode the length as ``-1``\n followed by the encoding of elements buffered up to 64K bytes before prefixing\n the count of number of elements. A ``0`` is encoded at the end to indicate the\n end of stream.\n\n The resulting encoding would look like this::\n\n -1\n countA element(0) element(1) ... element(countA - 1)\n countB element(0) element(1) ... element(countB - 1)\n ...\n countX element(0) element(1) ... element(countX - 1)\n 0\n\n If writing to state is enabled, the final terminating 0 will instead be\n repaced with::\n\n varInt64(-1)\n len(state_token)\n state_token\n\n where state_token is a bytes object used to retrieve the remainder of the\n iterable via the state API.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl_spec = { + "apache_beam.coders.coder_impl.SequenceCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""SequenceCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for sequences.\n\n If the length of the sequence in known we encode the length as a 32 bit\n ``int`` followed by the encoded bytes.\n\n If the length of the sequence is unknown, we encode the length as ``-1``\n followed by the encoding of elements buffered up to 64K bytes before prefixing\n the count of number of elements. A ``0`` is encoded at the end to indicate the\n end of stream.\n\n The resulting encoding would look like this::\n\n -1\n countA element(0) element(1) ... element(countA - 1)\n countB element(0) element(1) ... element(countB - 1)\n ...\n countX element(0) element(1) ... element(countX - 1)\n 0\n\n If writing to state is enabled, the final terminating 0 will instead be\n repaced with::\n\n varInt64(-1)\n len(state_token)\n state_token\n\n where state_token is a bytes object used to retrieve the remainder of the\n iterable via the state API.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous tuple objects.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl_spec = { + "apache_beam.coders.coder_impl.TupleSequenceCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""TupleSequenceCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous tuple objects."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o); + p->_contents = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_contents); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_contents) { + e = (*v)(p->_contents, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o; + tmp = ((PyObject*)p->_contents); + p->_contents = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl__AbstractIterable[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__}, + {Py_tp_doc, (void *)PyDoc_STR("Wraps an iterable hiding methods that might not always be available.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {Py_tp_iter, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable_spec = { + "apache_beam.coders.coder_impl._AbstractIterable", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""_AbstractIterable", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Wraps an iterable hiding methods that might not always be available."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_IterableCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous iterable objects.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_IterableCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl_spec = { + "apache_beam.coders.coder_impl.IterableCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""IterableCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous iterable objects."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_IterableCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_ListCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous list objects.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_ListCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl_spec = { + "apache_beam.coders.coder_impl.ListCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""ListCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for homogeneous list objects."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_ListCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl_spec = { + "apache_beam.coders.coder_impl.IntervalWindowCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""IntervalWindowCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Coder for a PaneInfo descriptor.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl_spec = { + "apache_beam.coders.coder_impl.PaneInfoCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""PaneInfoCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Coder for a PaneInfo descriptor."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + p->_types = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_types); + Py_CLEAR(p->_coder_impls); + Py_CLEAR(p->_fallback_coder_impl); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_types) { + e = (*v)(p->_types, a); if (e) return e; + } + if (p->_coder_impls) { + e = (*v)(p->_coder_impls, a); if (e) return e; + } + if (p->_fallback_coder_impl) { + e = (*v)(((PyObject *)p->_fallback_coder_impl), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); } + tmp = ((PyObject*)p->_types); + p->_types = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_coder_impls); + p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_fallback_coder_impl); + p->_fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl_spec = { + "apache_beam.coders.coder_impl._OrderedUnionCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""_OrderedUnionCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + p->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_value_coder); + Py_CLEAR(p->_timestamp_coder); + Py_CLEAR(p->_windows_coder); + Py_CLEAR(p->_pane_info_coder); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_value_coder) { + e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e; + } + if (p->_timestamp_coder) { + e = (*v)(((PyObject *)p->_timestamp_coder), a); if (e) return e; + } + if (p->_windows_coder) { + e = (*v)(((PyObject *)p->_windows_coder), a); if (e) return e; + } + if (p->_pane_info_coder) { + e = (*v)(((PyObject *)p->_pane_info_coder), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); } + tmp = ((PyObject*)p->_value_coder); + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_timestamp_coder); + p->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_windows_coder); + p->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_pane_info_coder); + p->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for windowed values.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl_spec = { + "apache_beam.coders.coder_impl.WindowedValueCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""WindowedValueCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for windowed values."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + p->_windows = Py_None; Py_INCREF(Py_None); + p->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_windows); + Py_CLEAR(p->_pane_info); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o; + e = __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o, v, a); if (e) return e; + if (p->_windows) { + e = (*v)(p->_windows, a); if (e) return e; + } + if (p->_pane_info) { + e = (*v)(((PyObject *)p->_pane_info), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o; + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o); + tmp = ((PyObject*)p->_windows); + p->_windows = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_pane_info); + p->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__timestamp(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__windows(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__pane_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl[] = { + {"_from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl[] = { + {"_timestamp", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__timestamp, 0, 0, 0}, + {"_windows", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__windows, 0, 0, 0}, + {"_pane_info", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__pane_info, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for windowed values with constant timestamp, windows and\n pane info. The coder drops timestamp, windows and pane info during\n encoding, and uses the supplied parameterized timestamp, windows\n and pane info values during decoding when reconstructing the windowed\n value.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl_spec = { + "apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""ParamWindowedValueCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A coder for windowed values with constant timestamp, windows and\n pane info. The coder drops timestamp, windows and pane info during\n encoding, and uses the supplied parameterized timestamp, windows\n and pane info values during decoding when reconstructing the windowed\n value."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_value_coder); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_value_coder) { + e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); } + tmp = ((PyObject*)p->_value_coder); + p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Coder which prefixes the length of the encoded object in the stream.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl_spec = { + "apache_beam.coders.coder_impl.LengthPrefixCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""LengthPrefixCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Coder which prefixes the length of the encoded object in the stream."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_RowColumnEncoder[] = { + {"register", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_RowColumnEncoder}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl.RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + p->column = Py_None; Py_INCREF(Py_None); + p->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->column); + Py_CLEAR(p->coder_impl); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->column) { + e = (*v)(p->column, a); if (e) return e; + } + if (p->coder_impl) { + e = (*v)(((PyObject *)p->coder_impl), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); } + tmp = ((PyObject*)p->column); + p->column = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->coder_impl); + p->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder[] = { + {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder_spec = { + "apache_beam.coders.coder_impl.GenericRowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""GenericRowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl; + p->schema = Py_None; Py_INCREF(Py_None); + p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->field_nullable = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->constructor = Py_None; Py_INCREF(Py_None); + p->encoding_positions = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->encoding_positions_argsort = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->components = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->schema); + Py_CLEAR(p->field_names); + Py_CLEAR(p->field_nullable); + Py_CLEAR(p->constructor); + Py_CLEAR(p->encoding_positions); + Py_CLEAR(p->encoding_positions_argsort); + Py_CLEAR(p->components); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->schema) { + e = (*v)(p->schema, a); if (e) return e; + } + if (p->field_names) { + e = (*v)(p->field_names, a); if (e) return e; + } + if (p->field_nullable) { + e = (*v)(p->field_nullable, a); if (e) return e; + } + if (p->constructor) { + e = (*v)(p->constructor, a); if (e) return e; + } + if (p->encoding_positions) { + e = (*v)(p->encoding_positions, a); if (e) return e; + } + if (p->encoding_positions_argsort) { + e = (*v)(p->encoding_positions_argsort, a); if (e) return e; + } + if (p->components) { + e = (*v)(p->components, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl); } + tmp = ((PyObject*)p->schema); + p->schema = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->field_names); + p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->field_nullable); + p->field_nullable = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->constructor); + p->constructor = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->encoding_positions); + p->encoding_positions = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->encoding_positions_argsort); + p->encoding_positions_argsort = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->components); + p->components = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_RowCoderImpl[] = { + {"_row_column_encoders", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_RowCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl_spec = { + "apache_beam.coders.coder_impl.RowCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""RowCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + p->logical_type = Py_None; Py_INCREF(Py_None); + p->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->logical_type); + Py_CLEAR(p->representation_coder); + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->logical_type) { + e = (*v)(p->logical_type, a); if (e) return e; + } + if (p->representation_coder) { + e = (*v)(((PyObject *)p->representation_coder), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); } + tmp = ((PyObject*)p->logical_type); + p->logical_type = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->representation_coder); + p->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl_spec = { + "apache_beam.coders.coder_impl.LogicalTypeCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""LogicalTypeCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n For interoperability with Java SDK, encoding needs to match that of the Java\n SDK BigIntegerCoder.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl_spec = { + "apache_beam.coders.coder_impl.BigIntegerCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""BigIntegerCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n For interoperability with Java SDK, encoding needs to match that of the Java\n SDK BigIntegerCoder."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_DecimalCoderImpl[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n For interoperability with Java SDK, encoding needs to match that of the Java\n SDK BigDecimalCoder.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_10coder_impl_DecimalCoderImpl}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl_spec = { + "apache_beam.coders.coder_impl.DecimalCoderImpl", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""DecimalCoderImpl", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n For interoperability with Java SDK, encoding needs to match that of the Java\n SDK BigDecimalCoder."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_encoded); + Py_CLEAR(p->__pyx_v_input_stream); + Py_CLEAR(p->__pyx_v_self); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_encoded) { + e = (*v)(p->__pyx_v_encoded, a); if (e) return e; + } + if (p->__pyx_v_input_stream) { + e = (*v)(p->__pyx_v_input_stream, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct__decode_all", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct__decode_all", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_field); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_field) { + e = (*v)(p->__pyx_v_field, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_1_genexpr", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_1_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_bs); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_bs) { + e = (*v)(p->__pyx_v_bs, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 *)o; + tmp = ((PyObject*)p->__pyx_v_bs); + p->__pyx_v_bs = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_2__unpickle_type_2_67_0", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_2__unpickle_type_2_67_0", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_elem); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_elem) { + e = (*v)(p->__pyx_v_elem, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(p->__pyx_v_self, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter___spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_3___iter__", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter___slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_3___iter__", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_components); + Py_CLEAR(p->__pyx_v_self); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_components) { + e = (*v)(p->__pyx_v_components, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ *)o; + tmp = ((PyObject*)p->__pyx_v_components); + p->__pyx_v_components = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init___spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_4___init__", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init___slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_4___init__", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_field); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_field) { + e = (*v)(p->__pyx_v_field, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_5_genexpr", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_5_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_field); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_field) { + e = (*v)(p->__pyx_v_field, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_6_genexpr", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_6_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_i); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_7_genexpr", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_7_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_field); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_field) { + e = (*v)(p->__pyx_v_field, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr_spec = { + "apache_beam.coders.coder_impl.__pyx_scope_struct_8_genexpr", + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""__pyx_scope_struct_8_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_array __pyx_vtable_array; + +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_array_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_array_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_array; + p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_array(PyObject *o) { + struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_array___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->mode); + Py_CLEAR(p->_format); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_array___setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { + PyObject *v = PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_array___getattr__(o, n); + } + return v; +} + +static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); +} + +static PyMethodDef __pyx_methods_array[] = { + {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_array[] = { + {"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +#if !CYTHON_COMPILING_IN_LIMITED_API + +static PyBufferProcs __pyx_tp_as_buffer_array = { + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; +#endif +static PyType_Slot __pyx_type___pyx_array_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array}, + {Py_sq_length, (void *)__pyx_array___len__}, + {Py_sq_item, (void *)__pyx_sq_item_array}, + {Py_mp_length, (void *)__pyx_array___len__}, + {Py_mp_subscript, (void *)__pyx_array___getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array}, + {Py_tp_getattro, (void *)__pyx_tp_getattro_array}, + #if defined(Py_bf_getbuffer) + {Py_bf_getbuffer, (void *)__pyx_array_getbuffer}, + #endif + {Py_tp_methods, (void *)__pyx_methods_array}, + {Py_tp_getset, (void *)__pyx_getsets_array}, + {Py_tp_new, (void *)__pyx_tp_new_array}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_array_spec = { + "apache_beam.coders.coder_impl.array", + sizeof(struct __pyx_array_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, + __pyx_type___pyx_array_slots, +}; +#else + +static PySequenceMethods __pyx_tp_as_sequence_array = { + __pyx_array___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_array, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_array = { + __pyx_array___len__, /*mp_length*/ + __pyx_array___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_array = { + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_array = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""array", /*tp_name*/ + sizeof(struct __pyx_array_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_array, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + __pyx_tp_getattro_array, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_array, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_array, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_array, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_MemviewEnum_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_MemviewEnum_obj *)o); + p->name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_Enum(PyObject *o) { + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_Enum(PyObject *o) { + PyObject* tmp; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_Enum[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum}, + {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum}, + {Py_tp_clear, (void *)__pyx_tp_clear_Enum}, + {Py_tp_methods, (void *)__pyx_methods_Enum}, + {Py_tp_init, (void *)__pyx_MemviewEnum___init__}, + {Py_tp_new, (void *)__pyx_tp_new_Enum}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = { + "apache_beam.coders.coder_impl.Enum", + sizeof(struct __pyx_MemviewEnum_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type___pyx_MemviewEnum_slots, +}; +#else + +static PyTypeObject __pyx_type___pyx_MemviewEnum = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""Enum", /*tp_name*/ + sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_Enum, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_MemviewEnum___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_Enum, /*tp_traverse*/ + __pyx_tp_clear_Enum, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_Enum, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_MemviewEnum___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_Enum, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; + +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryview_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryview_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_memoryview; + p->obj = Py_None; Py_INCREF(Py_None); + p->_size = Py_None; Py_INCREF(Py_None); + p->view.obj = NULL; + if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_memoryview(PyObject *o) { + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_memoryview___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->obj); + Py_CLEAR(p->_size); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->obj) { + e = (*v)(p->obj, a); if (e) return e; + } + if (p->_size) { + e = (*v)(p->_size, a); if (e) return e; + } + if (p->view.obj) { + e = (*v)(p->view.obj, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_memoryview(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + tmp = ((PyObject*)p->obj); + p->obj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_size); + p->_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + Py_CLEAR(p->view.obj); + return 0; +} + +static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_memoryview___setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); +} + +static PyMethodDef __pyx_methods_memoryview[] = { + {"is_c_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"is_f_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"copy_fortran", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_memoryview[] = { + {"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0}, + {"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0}, + {"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0}, + {"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0}, + {"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0}, + {"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0}, + {"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0}, + {"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0}, + {"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +#if !CYTHON_COMPILING_IN_LIMITED_API + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; +#endif +static PyType_Slot __pyx_type___pyx_memoryview_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview}, + {Py_tp_repr, (void *)__pyx_memoryview___repr__}, + {Py_sq_length, (void *)__pyx_memoryview___len__}, + {Py_sq_item, (void *)__pyx_sq_item_memoryview}, + {Py_mp_length, (void *)__pyx_memoryview___len__}, + {Py_mp_subscript, (void *)__pyx_memoryview___getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview}, + {Py_tp_str, (void *)__pyx_memoryview___str__}, + #if defined(Py_bf_getbuffer) + {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer}, + #endif + {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview}, + {Py_tp_clear, (void *)__pyx_tp_clear_memoryview}, + {Py_tp_methods, (void *)__pyx_methods_memoryview}, + {Py_tp_getset, (void *)__pyx_getsets_memoryview}, + {Py_tp_new, (void *)__pyx_tp_new_memoryview}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_memoryview_spec = { + "apache_beam.coders.coder_impl.memoryview", + sizeof(struct __pyx_memoryview_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type___pyx_memoryview_slots, +}; +#else + +static PySequenceMethods __pyx_tp_as_sequence_memoryview = { + __pyx_memoryview___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_memoryview, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_memoryview = { + __pyx_memoryview___len__, /*mp_length*/ + __pyx_memoryview___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_memoryview = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""memoryview", /*tp_name*/ + sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_memoryview___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_memoryview___str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_memoryview, /*tp_traverse*/ + __pyx_tp_clear_memoryview, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_memoryview, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_memoryview, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_memoryview, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; + +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryviewslice_obj *p; + PyObject *o = __pyx_tp_new_memoryview(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryviewslice_obj *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; + p->from_object = Py_None; Py_INCREF(Py_None); + p->from_slice.memview = NULL; + return o; +} + +static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_memoryviewslice___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->from_object); + PyObject_GC_Track(o); + __pyx_tp_dealloc_memoryview(o); +} + +static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; + if (p->from_object) { + e = (*v)(p->from_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear__memoryviewslice(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + __pyx_tp_clear_memoryview(o); + tmp = ((PyObject*)p->from_object); + p->from_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1); + return 0; +} + +static PyMethodDef __pyx_methods__memoryviewslice[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice}, + {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice}, + {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice}, + {Py_tp_methods, (void *)__pyx_methods__memoryviewslice}, + {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = { + "apache_beam.coders.coder_impl._memoryviewslice", + sizeof(struct __pyx_memoryviewslice_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, + __pyx_type___pyx_memoryviewslice_slots, +}; +#else + +static PyTypeObject __pyx_type___pyx_memoryviewslice = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl.""_memoryviewslice", /*tp_name*/ + sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_memoryview___repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_memoryview___str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ + PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/ + __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ + __pyx_tp_clear__memoryviewslice, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods__memoryviewslice, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new__memoryviewslice, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_11apache_beam_6coders_10coder_impl_loads = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_dumps = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_past_unicode = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_NoneType = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl__pickled_types = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_small_ints = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow = Py_None; Py_INCREF(Py_None); + __pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__ = Py_None; Py_INCREF(Py_None); + __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None); + generic = Py_None; Py_INCREF(Py_None); + strided = Py_None; Py_INCREF(Py_None); + indirect = Py_None; Py_INCREF(Py_None); + contiguous = Py_None; Py_INCREF(Py_None); + indirect_contiguous = Py_None; Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_int_int64_t_uint64_t_un); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 75; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NoneType, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_dumps, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_loads, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_past_unicode, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode_nested = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode_nested = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl._get_nested_size = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, int, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) __PYX_ERR(0, 130, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl)) __PYX_ERR(0, 214, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SimpleCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl)) __PYX_ERR(0, 254, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.encode_special_deterministic = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.encode_type_2_67_0 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type_2_67_0; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.encode_type = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.decode_type = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl)) __PYX_ERR(0, 374, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl)) __PYX_ERR(0, 743, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MapCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl)) __PYX_ERR(0, 686, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl)) __PYX_ERR(0, 712, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl)) __PYX_ERR(0, 837, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl)) __PYX_ERR(0, 853, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl)) __PYX_ERR(0, 869, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)) __PYX_ERR(0, 935, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl)) __PYX_ERR(0, 1023, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < (0)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl)) __PYX_ERR(0, 1067, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl)) __PYX_ERR(0, 1098, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl._extract_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components; + __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl._construct_from_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl)) __PYX_ERR(0, 1125, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < (0)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base._extract_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base._construct_from_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl)) __PYX_ERR(0, 1199, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TupleCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables; + __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl)) __PYX_ERR(0, 1397, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TupleSequenceCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < (0)) __PYX_ERR(0, 1397, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable)) __PYX_ERR(0, 1405, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable) < (0)) __PYX_ERR(0, 1405, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable = &__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable) < (0)) __PYX_ERR(0, 1405, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AbstractIterable, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable) < (0)) __PYX_ERR(0, 1405, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable) < (0)) __PYX_ERR(0, 1405, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl)) __PYX_ERR(0, 1435, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IterableCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < (0)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl)) __PYX_ERR(0, 1452, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ListCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) < (0)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl._to_normal_time = (uint64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, int64_t))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time; + __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl._from_normal_time = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, uint64_t))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl)) __PYX_ERR(0, 889, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size; + __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl._choose_encoding = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < (0)) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl)) __PYX_ERR(0, 1545, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OrderedUnionCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl._to_normal_time = (uint64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, int64_t))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time; + __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl._from_normal_time = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, uint64_t))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl)) __PYX_ERR(0, 1576, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl)) __PYX_ERR(0, 1671, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl)) __PYX_ERR(0, 1715, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) __PYX_ERR(0, 1860, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder = &__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)) __PYX_ERR(0, 1893, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = &__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_GenericRowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.decode_batch_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.encode_batch_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl)) __PYX_ERR(0, 1912, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_RowCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl)) __PYX_ERR(0, 2088, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LogicalTypeCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < (0)) __PYX_ERR(0, 2088, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl)) __PYX_ERR(0, 2102, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BigIntegerCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < (0)) __PYX_ERR(0, 2102, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl)) __PYX_ERR(0, 2123, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DecimalCoderImpl, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)) __PYX_ERR(0, 163, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 504, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 504, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 504, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0)) __PYX_ERR(0, 653, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0) < (0)) __PYX_ERR(0, 653, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0 = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0) < (0)) __PYX_ERR(0, 653, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2__unpickle_type_2_67_0->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__)) __PYX_ERR(0, 1214, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter___spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__ = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___iter__->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__)) __PYX_ERR(0, 1914, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init___spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__ = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4___init__->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 1924, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 1924, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 1924, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 1932, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 1932, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 1932, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 1937, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 1937, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 1937, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr)) __PYX_ERR(0, 1940, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 1940, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 1940, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_8_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __pyx_vtabptr_array = &__pyx_vtable_array; + __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_array_type)) __PYX_ERR(1, 110, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate->__pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array; + if (!__pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) { + __pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer; + } + #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) + /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ + #elif defined(_MSC_VER) + #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") + #else + #warning "The buffer protocol is not supported in the Limited C-API < 3.11." + #endif + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #else + __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type); + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 299, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + #else + __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; + __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; + __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; + __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; + __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; + __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; + __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; + __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; + __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_memoryview_type)) __PYX_ERR(1, 334, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate->__pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview; + if (!__pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) { + __pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer; + } + #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) + /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ + #elif defined(_MSC_VER) + #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") + #else + #warning "The buffer protocol is not supported in the Limited C-API < 3.11." + #endif + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + #else + __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; + __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; + __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; + __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; + __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + #else + __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.stream"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "OutputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) __PYX_ERR(4, 21, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream)) __PYX_ERR(4, 21, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "ByteCountingOutputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) __PYX_ERR(4, 43, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream)) __PYX_ERR(4, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "InputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) __PYX_ERR(4, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream)) __PYX_ERR(4, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(5, 27, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) __PYX_ERR(5, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 26; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_struct___pyx_obj_11apache_beam_5); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 218; + void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_11apache_beam_5utils_14windowed_value_create, (void (**)(void)) NULL}; + void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_coder_impl(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_coder_impl}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "coder_impl", + __pyx_k_Coder_implementations_The_actual, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_coder_impl(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_coder_impl(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_coder_impl(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + static PyThread_type_lock __pyx_t_7[8]; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int64_t __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'coder_impl' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "coder_impl" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_coder_impl", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__coders__coder_impl) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.coders.coder_impl")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.coders.coder_impl", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "View.MemoryView":100 + * + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "View.MemoryView":101 + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< + * except: + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_collections_abc}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin___import__, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_collections_abc_Sequence); + __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":100 + * + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":102 + * try: + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: # <<<<<<<<<<<<<< + * + * __pyx_collections_abc_Sequence = None +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + + /* "View.MemoryView":104 + * except: + * + * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_collections_abc_Sequence); + __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None); + __Pyx_GIVEREF(Py_None); + goto __pyx_L3_exception_handled; + } + __pyx_L3_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L7_try_end:; + } + + /* "View.MemoryView":239 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "View.MemoryView":240 + * + * try: + * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< + * index = __pyx_collections_abc_Sequence.index + * except: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 240, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":241 + * try: + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< + * except: + * pass +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 241, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 241, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":239 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L15_try_end; + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":242 + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index + * except: # <<<<<<<<<<<<<< + * pass + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L11_exception_handled; + } + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L15_try_end:; + } + + /* "View.MemoryView":307 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct_or_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 307, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(generic); + __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":308 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 308, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(strided); + __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":309 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(indirect); + __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":312 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_direct}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 312, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(contiguous); + __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":313 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 313, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(indirect_contiguous); + __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":321 + * + * + * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< + * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ + * PyThread_allocate_lock(), +*/ + __pyx_memoryview_thread_locks_used = 0; + + /* "View.MemoryView":322 + * + * cdef int __pyx_memoryview_thread_locks_used = 0 + * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< + * PyThread_allocate_lock(), + * PyThread_allocate_lock(), +*/ + __pyx_t_7[0] = PyThread_allocate_lock(); + __pyx_t_7[1] = PyThread_allocate_lock(); + __pyx_t_7[2] = PyThread_allocate_lock(); + __pyx_t_7[3] = PyThread_allocate_lock(); + __pyx_t_7[4] = PyThread_allocate_lock(); + __pyx_t_7[5] = PyThread_allocate_lock(); + __pyx_t_7[6] = PyThread_allocate_lock(); + __pyx_t_7[7] = PyThread_allocate_lock(); + memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); + + /* "View.MemoryView":983 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "View.MemoryView":984 + * + * try: + * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< + * index = __pyx_collections_abc_Sequence.index + * except: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 984, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 984, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":985 + * try: + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< + * except: + * pass +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 985, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 985, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":983 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L23_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":986 + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index + * except: # <<<<<<<<<<<<<< + * pass + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L19_exception_handled; + } + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L23_try_end:; + } + + /* "View.MemoryView":989 + * pass + * + * try: # <<<<<<<<<<<<<< + * if __pyx_collections_abc_Sequence: + * +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "View.MemoryView":990 + * + * try: + * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 990, __pyx_L26_error) + if (__pyx_t_8) { + + /* "View.MemoryView":994 + * + * + * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence.register(array) + * except: +*/ + __pyx_t_5 = __pyx_collections_abc_Sequence; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_memoryviewslice_type)}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":995 + * + * __pyx_collections_abc_Sequence.register(_memoryviewslice) + * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<< + * except: + * pass # ignore failure, it's a minor issue +*/ + __pyx_t_5 = __pyx_collections_abc_Sequence; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_array_type)}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 995, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":990 + * + * try: + * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":989 + * pass + * + * try: # <<<<<<<<<<<<<< + * if __pyx_collections_abc_Sequence: + * +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L31_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":996 + * __pyx_collections_abc_Sequence.register(_memoryviewslice) + * __pyx_collections_abc_Sequence.register(array) + * except: # <<<<<<<<<<<<<< + * pass # ignore failure, it's a minor issue + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L27_exception_handled; + } + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L31_try_end:; + } + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":33 + * # pytype: skip-file + * + * import dataclasses # <<<<<<<<<<<<<< + * import decimal + * import enum +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataclasses, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dataclasses, __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":34 + * + * import dataclasses + * import decimal # <<<<<<<<<<<<<< + * import enum + * import itertools +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_decimal, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_decimal, __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":35 + * import dataclasses + * import decimal + * import enum # <<<<<<<<<<<<<< + * import itertools + * import json +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_enum, __pyx_t_4) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":36 + * import decimal + * import enum + * import itertools # <<<<<<<<<<<<<< + * import json + * import logging +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_itertools, __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":37 + * import enum + * import itertools + * import json # <<<<<<<<<<<<<< + * import logging + * import pickle +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_json, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_json, __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":38 + * import itertools + * import json + * import logging # <<<<<<<<<<<<<< + * import pickle + * from io import BytesIO +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":39 + * import json + * import logging + * import pickle # <<<<<<<<<<<<<< + * from io import BytesIO + * from typing import TYPE_CHECKING +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":40 + * import logging + * import pickle + * from io import BytesIO # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BytesIO}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_io, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BytesIO}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":41 + * import pickle + * from io import BytesIO + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Callable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":42 + * from io import BytesIO + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Callable + * from typing import Dict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":43 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import Callable # <<<<<<<<<<<<<< + * from typing import Dict + * from typing import Iterable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":44 + * from typing import Any + * from typing import Callable + * from typing import Dict # <<<<<<<<<<<<<< + * from typing import Iterable + * from typing import Iterator +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":45 + * from typing import Callable + * from typing import Dict + * from typing import Iterable # <<<<<<<<<<<<<< + * from typing import Iterator + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":46 + * from typing import Dict + * from typing import Iterable + * from typing import Iterator # <<<<<<<<<<<<<< + * from typing import List + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":47 + * from typing import Iterable + * from typing import Iterator + * from typing import List # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Sequence +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":48 + * from typing import Iterator + * from typing import List + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Sequence + * from typing import Set +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":49 + * from typing import List + * from typing import Optional + * from typing import Sequence # <<<<<<<<<<<<<< + * from typing import Set + * from typing import Tuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":50 + * from typing import Optional + * from typing import Sequence + * from typing import Set # <<<<<<<<<<<<<< + * from typing import Tuple + * from typing import Type +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Set}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Set}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":51 + * from typing import Sequence + * from typing import Set + * from typing import Tuple # <<<<<<<<<<<<<< + * from typing import Type + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":52 + * from typing import Set + * from typing import Tuple + * from typing import Type # <<<<<<<<<<<<<< + * + * import numpy as np +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Type}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Type}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":54 + * from typing import Type + * + * import numpy as np # <<<<<<<<<<<<<< + * from fastavro import parse_schema + * from fastavro import schemaless_reader +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_4) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":55 + * + * import numpy as np + * from fastavro import parse_schema # <<<<<<<<<<<<<< + * from fastavro import schemaless_reader + * from fastavro import schemaless_writer +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_parse_schema}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fastavro, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_parse_schema}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":56 + * import numpy as np + * from fastavro import parse_schema + * from fastavro import schemaless_reader # <<<<<<<<<<<<<< + * from fastavro import schemaless_writer + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schemaless_reader}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fastavro, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schemaless_reader}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":57 + * from fastavro import parse_schema + * from fastavro import schemaless_reader + * from fastavro import schemaless_writer # <<<<<<<<<<<<<< + * + * from apache_beam.coders import observable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schemaless_writer}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fastavro, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schemaless_writer}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":59 + * from fastavro import schemaless_writer + * + * from apache_beam.coders import observable # <<<<<<<<<<<<<< + * from apache_beam.coders.avro_record import AvroRecord + * from apache_beam.internal import cloudpickle_pickler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_observable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_observable}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":60 + * + * from apache_beam.coders import observable + * from apache_beam.coders.avro_record import AvroRecord # <<<<<<<<<<<<<< + * from apache_beam.internal import cloudpickle_pickler + * from apache_beam.internal.cloudpickle import cloudpickle +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AvroRecord}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders_avro_record, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AvroRecord}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":61 + * from apache_beam.coders import observable + * from apache_beam.coders.avro_record import AvroRecord + * from apache_beam.internal import cloudpickle_pickler # <<<<<<<<<<<<<< + * from apache_beam.internal.cloudpickle import cloudpickle + * from apache_beam.typehints.schemas import named_tuple_from_schema +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloudpickle_pickler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_internal, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloudpickle_pickler}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":62 + * from apache_beam.coders.avro_record import AvroRecord + * from apache_beam.internal import cloudpickle_pickler + * from apache_beam.internal.cloudpickle import cloudpickle # <<<<<<<<<<<<<< + * from apache_beam.typehints.schemas import named_tuple_from_schema + * from apache_beam.utils import proto_utils +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloudpickle}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_internal_cloudpickle, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloudpickle}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":63 + * from apache_beam.internal import cloudpickle_pickler + * from apache_beam.internal.cloudpickle import cloudpickle + * from apache_beam.typehints.schemas import named_tuple_from_schema # <<<<<<<<<<<<<< + * from apache_beam.utils import proto_utils + * from apache_beam.utils import windowed_value +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_named_tuple_from_schema}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints_schemas, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_named_tuple_from_schema}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":64 + * from apache_beam.internal.cloudpickle import cloudpickle + * from apache_beam.typehints.schemas import named_tuple_from_schema + * from apache_beam.utils import proto_utils # <<<<<<<<<<<<<< + * from apache_beam.utils import windowed_value + * from apache_beam.utils.sharded_key import ShardedKey +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_proto_utils}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_proto_utils}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":65 + * from apache_beam.typehints.schemas import named_tuple_from_schema + * from apache_beam.utils import proto_utils + * from apache_beam.utils import windowed_value # <<<<<<<<<<<<<< + * from apache_beam.utils.sharded_key import ShardedKey + * from apache_beam.utils.timestamp import MAX_TIMESTAMP +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_windowed_value}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_windowed_value}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":66 + * from apache_beam.utils import proto_utils + * from apache_beam.utils import windowed_value + * from apache_beam.utils.sharded_key import ShardedKey # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import MAX_TIMESTAMP + * from apache_beam.utils.timestamp import MIN_TIMESTAMP +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ShardedKey}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_sharded_key, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ShardedKey}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":67 + * from apache_beam.utils import windowed_value + * from apache_beam.utils.sharded_key import ShardedKey + * from apache_beam.utils.timestamp import MAX_TIMESTAMP # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import MIN_TIMESTAMP + * from apache_beam.utils.timestamp import Timestamp +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":68 + * from apache_beam.utils.sharded_key import ShardedKey + * from apache_beam.utils.timestamp import MAX_TIMESTAMP + * from apache_beam.utils.timestamp import MIN_TIMESTAMP # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import Timestamp + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":69 + * from apache_beam.utils.timestamp import MAX_TIMESTAMP + * from apache_beam.utils.timestamp import MIN_TIMESTAMP + * from apache_beam.utils.timestamp import Timestamp # <<<<<<<<<<<<<< + * + * try: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":71 + * from apache_beam.utils.timestamp import Timestamp + * + * try: # <<<<<<<<<<<<<< + * import dill + * except ImportError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":72 + * + * try: + * import dill # <<<<<<<<<<<<<< + * except ImportError: + * dill = None +*/ + __pyx_t_10 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dill, 0, 0, NULL, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 72, __pyx_L35_error) + __pyx_t_4 = __pyx_t_10; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dill, __pyx_t_4) < (0)) __PYX_ERR(0, 72, __pyx_L35_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":71 + * from apache_beam.utils.timestamp import Timestamp + * + * try: # <<<<<<<<<<<<<< + * import dill + * except ImportError: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L40_try_end; + __pyx_L35_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":73 + * try: + * import dill + * except ImportError: # <<<<<<<<<<<<<< + * dill = None + * +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); + if (__pyx_t_11) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_12) < 0) __PYX_ERR(0, 73, __pyx_L37_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_12); + + /* "apache_beam/coders/coder_impl.py":74 + * import dill + * except ImportError: + * dill = None # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dill, Py_None) < (0)) __PYX_ERR(0, 74, __pyx_L37_except_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L36_exception_handled; + } + goto __pyx_L37_except_error; + + /* "apache_beam/coders/coder_impl.py":71 + * from apache_beam.utils.timestamp import Timestamp + * + * try: # <<<<<<<<<<<<<< + * import dill + * except ImportError: +*/ + __pyx_L37_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L36_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L40_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":76 + * dill = None + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * import proto + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":77 + * + * if TYPE_CHECKING: + * import proto # <<<<<<<<<<<<<< + * + * from apache_beam.transforms import userstate +*/ + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_proto, 0, 0, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_12 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_proto, __pyx_t_12) < (0)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":79 + * import proto + * + * from apache_beam.transforms import userstate # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import IntervalWindow + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + } + __pyx_t_12 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_12); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":80 + * + * from apache_beam.transforms import userstate + * from apache_beam.transforms.window import IntervalWindow # <<<<<<<<<<<<<< + * + * try: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntervalWindow}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) + } + __pyx_t_12 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_12); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_IntervalWindow}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":76 + * dill = None + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * import proto + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":82 + * from apache_beam.transforms.window import IntervalWindow + * + * try: # <<<<<<<<<<<<<< + * from . import stream # pylint: disable=unused-import + * except ImportError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":83 + * + * try: + * from . import stream # pylint: disable=unused-import # <<<<<<<<<<<<<< + * except ImportError: + * SLOW_STREAM = True +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_stream}; + __pyx_t_10 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u__9, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_2, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 83, __pyx_L44_error) + } + __pyx_t_12 = __pyx_t_10; + __Pyx_GOTREF(__pyx_t_12); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_stream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_12, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L44_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 83, __pyx_L44_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":82 + * from apache_beam.transforms.window import IntervalWindow + * + * try: # <<<<<<<<<<<<<< + * from . import stream # pylint: disable=unused-import + * except ImportError: +*/ + } + + /* "apache_beam/coders/coder_impl.py":87 + * SLOW_STREAM = True + * else: + * SLOW_STREAM = False # <<<<<<<<<<<<<< + * + * is_compiled = False +*/ + /*else:*/ { + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SLOW_STREAM, Py_False) < (0)) __PYX_ERR(0, 87, __pyx_L46_except_error) + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L49_try_end; + __pyx_L44_error:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":84 + * try: + * from . import stream # pylint: disable=unused-import + * except ImportError: # <<<<<<<<<<<<<< + * SLOW_STREAM = True + * else: +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); + if (__pyx_t_11) { + __Pyx_AddTraceback("apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 84, __pyx_L46_except_error) + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + + /* "apache_beam/coders/coder_impl.py":85 + * from . import stream # pylint: disable=unused-import + * except ImportError: + * SLOW_STREAM = True # <<<<<<<<<<<<<< + * else: + * SLOW_STREAM = False +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SLOW_STREAM, Py_True) < (0)) __PYX_ERR(0, 85, __pyx_L46_except_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L45_exception_handled; + } + goto __pyx_L46_except_error; + + /* "apache_beam/coders/coder_impl.py":82 + * from apache_beam.transforms.window import IntervalWindow + * + * try: # <<<<<<<<<<<<<< + * from . import stream # pylint: disable=unused-import + * except ImportError: +*/ + __pyx_L46_except_error:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + goto __pyx_L1_error; + __pyx_L45_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L49_try_end:; + } + + /* "apache_beam/coders/coder_impl.py":89 + * SLOW_STREAM = False + * + * is_compiled = False # <<<<<<<<<<<<<< + * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1 + * +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 0; + + /* "apache_beam/coders/coder_impl.py":90 + * + * is_compiled = False + * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1 # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING or SLOW_STREAM: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12lambda, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fits_in_64_bits, __pyx_t_4) < (0)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":92 + * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1 + * + * if TYPE_CHECKING or SLOW_STREAM: # <<<<<<<<<<<<<< + * from .slow_stream import ByteCountingOutputStream + * from .slow_stream import InputStream as create_InputStream +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_13) { + } else { + __pyx_t_8 = __pyx_t_13; + goto __pyx_L53_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SLOW_STREAM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __pyx_t_13; + __pyx_L53_bool_binop_done:; + if (__pyx_t_8) { + + /* "apache_beam/coders/coder_impl.py":93 + * + * if TYPE_CHECKING or SLOW_STREAM: + * from .slow_stream import ByteCountingOutputStream # <<<<<<<<<<<<<< + * from .slow_stream import InputStream as create_InputStream + * from .slow_stream import OutputStream as create_OutputStream +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_slow_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_slow_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":94 + * if TYPE_CHECKING or SLOW_STREAM: + * from .slow_stream import ByteCountingOutputStream + * from .slow_stream import InputStream as create_InputStream # <<<<<<<<<<<<<< + * from .slow_stream import OutputStream as create_OutputStream + * from .slow_stream import get_varint_size +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_InputStream}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_slow_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_slow_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_InputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":95 + * from .slow_stream import ByteCountingOutputStream + * from .slow_stream import InputStream as create_InputStream + * from .slow_stream import OutputStream as create_OutputStream # <<<<<<<<<<<<<< + * from .slow_stream import get_varint_size + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputStream}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_slow_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_slow_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":96 + * from .slow_stream import InputStream as create_InputStream + * from .slow_stream import OutputStream as create_OutputStream + * from .slow_stream import get_varint_size # <<<<<<<<<<<<<< + * + * try: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_varint_size}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_slow_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_slow_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_varint_size}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":98 + * from .slow_stream import get_varint_size + * + * try: # <<<<<<<<<<<<<< + * import cython + * is_compiled = cython.compiled +*/ + { + (void)__pyx_t_1; (void)__pyx_t_2; (void)__pyx_t_3; /* mark used */ + /*try:*/ { + + /* "apache_beam/coders/coder_impl.py":100 + * try: + * import cython + * is_compiled = cython.compiled # <<<<<<<<<<<<<< + * except ImportError: + * globals()['cython'] = type('fake_cython', (), {'cast': lambda typ, x: x}) +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 1; + + /* "apache_beam/coders/coder_impl.py":98 + * from .slow_stream import get_varint_size + * + * try: # <<<<<<<<<<<<<< + * import cython + * is_compiled = cython.compiled +*/ + } + } + + /* "apache_beam/coders/coder_impl.py":92 + * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1 + * + * if TYPE_CHECKING or SLOW_STREAM: # <<<<<<<<<<<<<< + * from .slow_stream import ByteCountingOutputStream + * from .slow_stream import InputStream as create_InputStream +*/ + goto __pyx_L52; + } + + /* "apache_beam/coders/coder_impl.py":106 + * else: + * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports + * from .stream import ByteCountingOutputStream # <<<<<<<<<<<<<< + * from .stream import InputStream as create_InputStream + * from .stream import OutputStream as create_OutputStream +*/ + /*else*/ { + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_stream, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":107 + * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports + * from .stream import ByteCountingOutputStream + * from .stream import InputStream as create_InputStream # <<<<<<<<<<<<<< + * from .stream import OutputStream as create_OutputStream + * from .stream import get_varint_size +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_InputStream}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_stream, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_InputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":108 + * from .stream import ByteCountingOutputStream + * from .stream import InputStream as create_InputStream + * from .stream import OutputStream as create_OutputStream # <<<<<<<<<<<<<< + * from .stream import get_varint_size + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputStream}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_stream, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputStream}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":109 + * from .stream import InputStream as create_InputStream + * from .stream import OutputStream as create_OutputStream + * from .stream import get_varint_size # <<<<<<<<<<<<<< + * + * # Make it possible to import create_InputStream and other cdef-classes +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_varint_size}; + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_stream, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_apache_beam_coders_stream, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_varint_size}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":113 + * # Make it possible to import create_InputStream and other cdef-classes + * # from apache_beam.coders.coder_impl when Cython codepath is used. + * globals()['create_InputStream'] = create_InputStream # <<<<<<<<<<<<<< + * globals()['create_OutputStream'] = create_OutputStream + * globals()['ByteCountingOutputStream'] = ByteCountingOutputStream +*/ + __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create_InputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream) < 0))) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":114 + * # from apache_beam.coders.coder_impl when Cython codepath is used. + * globals()['create_InputStream'] = create_InputStream + * globals()['create_OutputStream'] = create_OutputStream # <<<<<<<<<<<<<< + * globals()['ByteCountingOutputStream'] = ByteCountingOutputStream + * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports +*/ + __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create_OutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream) < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":115 + * globals()['create_InputStream'] = create_InputStream + * globals()['create_OutputStream'] = create_OutputStream + * globals()['ByteCountingOutputStream'] = ByteCountingOutputStream # <<<<<<<<<<<<<< + * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports + * is_compiled = True +*/ + __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream) < 0))) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":117 + * globals()['ByteCountingOutputStream'] = ByteCountingOutputStream + * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports + * is_compiled = True # <<<<<<<<<<<<<< + * + * _LOGGER = logging.getLogger(__name__) +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 1; + } + __pyx_L52:; + + /* "apache_beam/coders/coder_impl.py":119 + * is_compiled = True + * + * _LOGGER = logging.getLogger(__name__) # <<<<<<<<<<<<<< + * + * _TIME_SHIFT = 1 << 63 +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LOGGER, __pyx_t_4) < (0)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":121 + * _LOGGER = logging.getLogger(__name__) + * + * _TIME_SHIFT = 1 << 63 # <<<<<<<<<<<<<< + * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros + * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros +*/ + __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT = 0x8000000000000000; + + /* "apache_beam/coders/coder_impl.py":122 + * + * _TIME_SHIFT = 1 << 63 + * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros # <<<<<<<<<<<<<< + * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = __Pyx_PyLong_As_int64_t(__pyx_t_14); if (unlikely((__pyx_t_15 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros = __pyx_t_15; + + /* "apache_beam/coders/coder_impl.py":123 + * _TIME_SHIFT = 1 << 63 + * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros + * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros # <<<<<<<<<<<<<< + * + * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable] +*/ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_15 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_15 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros = __pyx_t_15; + + /* "apache_beam/coders/coder_impl.py":125 + * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros + * + * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable] # <<<<<<<<<<<<<< + * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes] + * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']] +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Callable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyList_Pack(2, ((PyObject *)(&PyBytes_Type)), __pyx_mstate_global->__pyx_n_u_CoderImpl); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Iterable); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = PyTuple_Pack(2, __pyx_t_14, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IterableStateReader, __pyx_t_12) < (0)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":126 + * + * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable] + * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes] # <<<<<<<<<<<<<< + * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']] + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Callable); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Iterable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyList_Pack(2, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_CoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_Pack(2, __pyx_t_4, ((PyObject *)(&PyBytes_Type))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IterableStateWriter, __pyx_t_4) < (0)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":127 + * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable] + * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes] + * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_observable); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ObservableMixin); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = PyTuple_Pack(2, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_CoderImpl); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Observables, __pyx_t_12) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":132 + * class CoderImpl(object): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":138 + * raise NotImplementedError + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_decode_from_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":144 + * raise NotImplementedError + * + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":150 + * raise NotImplementedError + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":156 + * raise NotImplementedError + * + * def encode_all(self, values): # <<<<<<<<<<<<<< + * # type: (Iterable[Any]) -> bytes + * out = create_OutputStream() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_encode_all, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_encode_all, __pyx_t_12) < (0)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":163 + * return out.get() + * + * def decode_all(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Iterator[Any] + * input_stream = create_InputStream(encoded) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_decode_all, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_decode_all, __pyx_t_12) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":169 + * yield self.decode_from_stream(input_stream, True) + * + * def encode_nested(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_encode_nested, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_encode_nested, __pyx_t_12) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":175 + * return out.get() + * + * def decode_nested(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), True) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_decode_nested, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_decode_nested, __pyx_t_12) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":179 + * return self.decode_from_stream(create_InputStream(encoded), True) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":187 + * return out.get_count() + * + * def _get_nested_size(self, inner_size, nested): # <<<<<<<<<<<<<< + * if not nested: + * return inner_size +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl__get_nested_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_get_nested_size, __pyx_t_12) < (0)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":193 + * return varint_size + inner_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl_get_estimated_size_and, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_12) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":218 + * + * Subclass of CoderImpl implementing stream methods using encode/decode.""" + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":224 + * stream.write(self.encode(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleCoderImpl_decode_from_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleCoderImpl___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":235 + * + * Subclass of CoderImpl implementing encode/decode using stream methods.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * # type: (Any) -> bytes + * out = create_OutputStream() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":241 + * return out.get() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * # type: (bytes) -> Any + * return self.decode_from_stream(create_InputStream(encoded), False) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":245 + * return self.decode_from_stream(create_InputStream(encoded), False) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_StreamCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StreamCoderImpl___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":267 + * self._size_estimator = size_estimator or self._default_size_estimator + * + * def _default_size_estimator(self, value): # <<<<<<<<<<<<<< + * return len(self.encode(value)) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl__default_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_default_size_estimator, __pyx_t_12) < (0)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":270 + * return len(self.encode(value)) + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * return stream.write(self._encoder(value), nested) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_encode_to_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":274 + * return stream.write(self._encoder(value), nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._decoder(stream.read_all(nested)) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_decode_from_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":278 + * return self._decoder(stream.read_all(nested)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return self._encoder(value) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":281 + * return self._encoder(value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._decoder(encoded) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":284 + * return self._decoder(encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return self._get_nested_size(self._size_estimator(value), nested) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":288 + * return self._get_nested_size(self._size_estimator(value), nested) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * # TODO(robertwb): Remove this once all coders are correct. +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl_get_estimated, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_12) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CallbackCoderImpl, (type(self), 0x86660dc, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CallbackCoderImpl___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":302 + * + * + * class ProtoCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): +*/ + __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_14 != __pyx_t_12) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 302, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":304 + * class ProtoCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): # <<<<<<<<<<<<<< + * self.proto_message_type = proto_message_type + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_12) < (0)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":307 + * self.proto_message_type = proto_message_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString() + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode, 0, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":310 + * return value.SerializePartialToString() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * proto_message = self.proto_message_type() + * proto_message.ParseFromString(encoded) # This is in effect "ParsePartial". +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode, 0, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":302 + * + * + * class ProtoCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_message_type): +*/ + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl, __pyx_t_14, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":316 + * + * + * class DeterministicProtoCoderImpl(ProtoCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ProtoCoderImpl); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_DeterministicProtoCoderImpl, __pyx_mstate_global->__pyx_n_u_DeterministicProtoCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_14 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 316, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":318 + * class DeterministicProtoCoderImpl(ProtoCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): # <<<<<<<<<<<<<< + * return value.SerializePartialToString(deterministic=True) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode, 0, __pyx_mstate_global->__pyx_n_u_DeterministicProtoCoderImpl_enco, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_4) < (0)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":316 + * + * + * class DeterministicProtoCoderImpl(ProtoCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode(self, value): +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DeterministicProtoCoderImpl, __pyx_t_14, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DeterministicProtoCoderImpl, __pyx_t_4) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":322 + * + * + * class ProtoPlusCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_plus_type): +*/ + __pyx_t_14 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5 != __pyx_t_14) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":324 + * class ProtoPlusCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_plus_type): # <<<<<<<<<<<<<< + * # type: (Type[proto.Message]) -> None + * self.proto_plus_type = proto_plus_type +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_14) < (0)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":328 + * self.proto_plus_type = proto_plus_type + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return value._pb.SerializePartialToString(deterministic=True) + * +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode, 0, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_14) < (0)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":331 + * return value._pb.SerializePartialToString(deterministic=True) + * + * def decode(self, value): # <<<<<<<<<<<<<< + * return self.proto_plus_type.deserialize(value) + * +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode, 0, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_14) < (0)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":322 + * + * + * class ProtoPlusCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, proto_plus_type): +*/ + __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ProtoPlusCoderImpl, __pyx_t_14) < (0)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":335 + * + * + * UNKNOWN_TYPE = 0xFF # <<<<<<<<<<<<<< + * NONE_TYPE = 0 + * INT_TYPE = 1 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE = 0xFF; + + /* "apache_beam/coders/coder_impl.py":336 + * + * UNKNOWN_TYPE = 0xFF + * NONE_TYPE = 0 # <<<<<<<<<<<<<< + * INT_TYPE = 1 + * FLOAT_TYPE = 2 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE = 0; + + /* "apache_beam/coders/coder_impl.py":337 + * UNKNOWN_TYPE = 0xFF + * NONE_TYPE = 0 + * INT_TYPE = 1 # <<<<<<<<<<<<<< + * FLOAT_TYPE = 2 + * BYTES_TYPE = 3 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE = 1; + + /* "apache_beam/coders/coder_impl.py":338 + * NONE_TYPE = 0 + * INT_TYPE = 1 + * FLOAT_TYPE = 2 # <<<<<<<<<<<<<< + * BYTES_TYPE = 3 + * UNICODE_TYPE = 4 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE = 2; + + /* "apache_beam/coders/coder_impl.py":339 + * INT_TYPE = 1 + * FLOAT_TYPE = 2 + * BYTES_TYPE = 3 # <<<<<<<<<<<<<< + * UNICODE_TYPE = 4 + * BOOL_TYPE = 9 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE = 3; + + /* "apache_beam/coders/coder_impl.py":340 + * FLOAT_TYPE = 2 + * BYTES_TYPE = 3 + * UNICODE_TYPE = 4 # <<<<<<<<<<<<<< + * BOOL_TYPE = 9 + * LIST_TYPE = 5 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE = 4; + + /* "apache_beam/coders/coder_impl.py":341 + * BYTES_TYPE = 3 + * UNICODE_TYPE = 4 + * BOOL_TYPE = 9 # <<<<<<<<<<<<<< + * LIST_TYPE = 5 + * TUPLE_TYPE = 6 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE = 9; + + /* "apache_beam/coders/coder_impl.py":342 + * UNICODE_TYPE = 4 + * BOOL_TYPE = 9 + * LIST_TYPE = 5 # <<<<<<<<<<<<<< + * TUPLE_TYPE = 6 + * DICT_TYPE = 7 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE = 5; + + /* "apache_beam/coders/coder_impl.py":343 + * BOOL_TYPE = 9 + * LIST_TYPE = 5 + * TUPLE_TYPE = 6 # <<<<<<<<<<<<<< + * DICT_TYPE = 7 + * SET_TYPE = 8 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE = 6; + + /* "apache_beam/coders/coder_impl.py":344 + * LIST_TYPE = 5 + * TUPLE_TYPE = 6 + * DICT_TYPE = 7 # <<<<<<<<<<<<<< + * SET_TYPE = 8 + * ITERABLE_LIKE_TYPE = 10 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE = 7; + + /* "apache_beam/coders/coder_impl.py":345 + * TUPLE_TYPE = 6 + * DICT_TYPE = 7 + * SET_TYPE = 8 # <<<<<<<<<<<<<< + * ITERABLE_LIKE_TYPE = 10 + * +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE = 8; + + /* "apache_beam/coders/coder_impl.py":346 + * DICT_TYPE = 7 + * SET_TYPE = 8 + * ITERABLE_LIKE_TYPE = 10 # <<<<<<<<<<<<<< + * + * PROTO_TYPE = 100 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE = 10; + + /* "apache_beam/coders/coder_impl.py":348 + * ITERABLE_LIKE_TYPE = 10 + * + * PROTO_TYPE = 100 # <<<<<<<<<<<<<< + * DATACLASS_TYPE = 101 + * NAMED_TUPLE_TYPE = 102 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE = 0x64; + + /* "apache_beam/coders/coder_impl.py":349 + * + * PROTO_TYPE = 100 + * DATACLASS_TYPE = 101 # <<<<<<<<<<<<<< + * NAMED_TUPLE_TYPE = 102 + * ENUM_TYPE = 103 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE = 0x65; + + /* "apache_beam/coders/coder_impl.py":350 + * PROTO_TYPE = 100 + * DATACLASS_TYPE = 101 + * NAMED_TUPLE_TYPE = 102 # <<<<<<<<<<<<<< + * ENUM_TYPE = 103 + * NESTED_STATE_TYPE = 104 +*/ + __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE = 0x66; + + /* "apache_beam/coders/coder_impl.py":351 + * DATACLASS_TYPE = 101 + * NAMED_TUPLE_TYPE = 102 + * ENUM_TYPE = 103 # <<<<<<<<<<<<<< + * NESTED_STATE_TYPE = 104 + * DATACLASS_KW_ONLY_TYPE = 105 +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ENUM_TYPE, __pyx_mstate_global->__pyx_int_103) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":352 + * NAMED_TUPLE_TYPE = 102 + * ENUM_TYPE = 103 + * NESTED_STATE_TYPE = 104 # <<<<<<<<<<<<<< + * DATACLASS_KW_ONLY_TYPE = 105 + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NESTED_STATE_TYPE, __pyx_mstate_global->__pyx_int_104) < (0)) __PYX_ERR(0, 352, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":353 + * ENUM_TYPE = 103 + * NESTED_STATE_TYPE = 104 + * DATACLASS_KW_ONLY_TYPE = 105 # <<<<<<<<<<<<<< + * + * # Types that can be encoded as iterables, but are not literally +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DATACLASS_KW_ONLY_TYPE, __pyx_mstate_global->__pyx_int_105) < (0)) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":359 + * # through encoding, only the elements. This is particularly useful + * # for the value list types created in GroupByKey. + * _ITERABLE_LIKE_TYPES = set() # type: Set[Type] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, ((PyObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":362 + * + * + * def _verify_dill_compat(): # <<<<<<<<<<<<<< + * base_error = ( + * "This pipeline runs with the pipeline option " +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_1_verify_dill_compat, 0, __pyx_mstate_global->__pyx_n_u_verify_dill_compat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_verify_dill_compat, __pyx_t_5) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":389 + * self.use_relative_filepaths = use_relative_filepaths + * + * @staticmethod # <<<<<<<<<<<<<< + * def register_iterable_like_type(t): + * _ITERABLE_LIKE_TYPES.add(t) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl_register, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_register_iterable_like_type, __pyx_t_5) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_12 = NULL; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_register_iterable_like_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_register_iterable_like_type, __pyx_t_5) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":393 + * _ITERABLE_LIKE_TYPES.add(t) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * if isinstance(value, observable.ObservableMixin): +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl_get_esti, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_5) < (0)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":403 + * return out.get_count(), [] + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * t = type(value) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl_encode_t, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":552 + * raise TypeError(self._deterministic_encoding_error_msg(value)) + * + * def _deterministic_encoding_error_msg(self, value): # <<<<<<<<<<<<<< + * return ( + * "Unable to deterministically encode '%s' of type '%s', " +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl__determi, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_deterministic_encoding_error_ms, __pyx_t_5) < (0)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":586 + * return _unpickle_type(stream.read_all(True)) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * t = stream.read_byte() +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl_decode_f, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x77bcc08, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FastPrimitivesCoderImpl___setsta, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":649 + * + * + * _pickled_types = {} # type: Dict[type, bytes] # <<<<<<<<<<<<<< + * _unpickled_types = {} # type: Dict[bytes, type] + * +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl__pickled_types, ((PyObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":650 + * + * _pickled_types = {} # type: Dict[type, bytes] + * _unpickled_types = {} # type: Dict[bytes, type] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, ((PyObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":653 + * + * + * def _unpickle_type_2_67_0(bs): # <<<<<<<<<<<<<< + * """ + * Decode special type with <=2.67.0 compatibility. +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_3_unpickle_type_2_67_0, 0, __pyx_mstate_global->__pyx_n_u_unpickle_type_2_67_0, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unpickle_type_2_67_0, __pyx_t_5) < (0)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":671 + * + * + * def _unpickle_named_tuple_2_67_0(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type_2_67_0(bs)(*items) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_5_unpickle_named_tuple_2_67_0, 0, __pyx_mstate_global->__pyx_n_u_unpickle_named_tuple_2_67_0, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unpickle_named_tuple_2_67_0, __pyx_t_5) < (0)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":675 + * + * + * def _unpickle_type(bs): # <<<<<<<<<<<<<< + * if not _unpickled_types.get(bs, None): + * _unpickled_types[bs] = cloudpickle_pickler.loads(bs) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_7_unpickle_type, 0, __pyx_mstate_global->__pyx_n_u_unpickle_type, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unpickle_type, __pyx_t_5) < (0)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":682 + * + * + * def _unpickle_named_tuple(bs, items): # <<<<<<<<<<<<<< + * return _unpickle_type(bs)(*items) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9_unpickle_named_tuple, 0, __pyx_mstate_global->__pyx_n_u_unpickle_named_tuple, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unpickle_named_tuple, __pyx_t_5) < (0)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":690 + * + * A coder for bytes/str objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (bytes, create_OutputStream, bool) -> None + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":700 + * out.write(value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> bytes + * return in_stream.read_all(nested) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl_decode_from_strea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":704 + * return in_stream.read_all(nested) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert isinstance(value, bytes), (value, type(value)) + * return value +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_5) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":708 + * return value + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return encoded + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_5) < (0)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BytesCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BytesCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":716 + * + * A coder for bool objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_byte(1 if value else 0) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl_encode_to_strea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":719 + * out.write_byte(1 if value else 0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = in_stream.read_byte() + * if value == 0: +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl_decode_from_str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":727 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * return b'\x01' if value else b'\x00' + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_5) < (0)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":730 + * return b'\x01' if value else b'\x00' + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * value = ord(encoded) + * if value == 0: +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_5) < (0)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":738 + * raise ValueError("Expected 0 or 1, got %s" % value) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # Note that booleans are encoded the same way regardless of nesting. + * return 1 +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_5) < (0)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanCoderImpl___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":764 + * self._is_deterministic = is_deterministic + * + * def encode_to_stream(self, dict_value, out, nested): # <<<<<<<<<<<<<< + * out.write_bigendian_int32(len(dict_value)) + * # Note this implementation always uses nested context when encoding keys +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":779 + * self._value_coder.encode_to_stream(value, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * size = in_stream.read_bigendian_int32() + * result = {} +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapCoderImpl_decode_from_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":791 + * return result + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * estimate = 4 # 4 bytes for int32 size prefix + * for key, value in unused_value.items(): +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_5) < (0)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MapCoderImpl, (type(self), 0x3172254, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MapCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":799 + * + * + * class NullableCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (__pyx_t_4 != __pyx_t_5) { + if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 799, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":804 + * A coder for typing.Optional objects.""" + * + * ENCODE_NULL = 0 # <<<<<<<<<<<<<< + * ENCODE_PRESENT = 1 + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ENCODE_NULL, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 804, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":805 + * + * ENCODE_NULL = 0 + * ENCODE_PRESENT = 1 # <<<<<<<<<<<<<< + * + * def __init__( +*/ + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ENCODE_PRESENT, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":807 + * ENCODE_PRESENT = 1 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * value_coder # type: CoderImpl +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_5) < (0)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":813 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * if value is None: + * out.write_byte(self.ENCODE_NULL) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream, 0, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl_encode_to_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":820 + * self._value_coder.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * null_indicator = in_stream.read_byte() + * if null_indicator == self.ENCODE_NULL: +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream, 0, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl_decode_from_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":831 + * null_indicator) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * return 1 + ( + * self._value_coder.estimate_size(unused_value) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size, 0, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_5) < (0)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":799 + * + * + * class NullableCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NullableCoderImpl, __pyx_t_5) < (0)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":839 + * class BigEndianShortCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_bigendian_int16(value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl_encode_t, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":843 + * out.write_bigendian_int16(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_int16() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl_decode_f, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":847 + * return in_stream.read_bigendian_int16() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A short is encoded as 2 bytes, regardless of nesting. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl_estimate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigEndianShortCoderImpl___setsta, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":855 + * class SinglePrecisionFloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_float(value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl_en, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":859 + * out.write_bigendian_float(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_float() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl_de, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":863 + * return in_stream.read_bigendian_float() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A float is encoded as 4 bytes, regardless of nesting. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl_es, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SinglePrecisionFloatCoderImpl_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":871 + * class FloatCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (float, create_OutputStream, bool) -> None + * out.write_bigendian_double(value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":875 + * out.write_bigendian_double(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> float + * return in_stream.read_bigendian_double() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl_decode_from_strea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":879 + * return in_stream.read_bigendian_double() + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # A double is encoded as 8 bytes, regardless of nesting. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FloatCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":885 + * + * + * if not TYPE_CHECKING: # <<<<<<<<<<<<<< + * IntervalWindow = None + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_13 = (!__pyx_t_8); + if (__pyx_t_13) { + + /* "apache_beam/coders/coder_impl.py":886 + * + * if not TYPE_CHECKING: + * IntervalWindow = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "apache_beam/coders/coder_impl.py":885 + * + * + * if not TYPE_CHECKING: # <<<<<<<<<<<<<< + * IntervalWindow = None + * +*/ + } + + /* "apache_beam/coders/coder_impl.py":901 + * return value + _TIME_SHIFT + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (IntervalWindow, create_OutputStream, bool) -> None + * typed_value = value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl_encode_t, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":910 + * out.write_var_int64(span_millis) + * + * def decode_from_stream(self, in_, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> IntervalWindow + * if not TYPE_CHECKING: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl_decode_f, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":925 + * return typed_value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # An IntervalWindow is context-insensitive, with a timestamp (8 bytes) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl_estimate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowCoderImpl___setsta, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":943 + * https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79 + * """ + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Timestamp, create_OutputStream, bool) -> None + * millis = value.micros // 1000 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl_encode_to_str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":952 + * out.write_bigendian_int64(millis) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Timestamp + * millis = in_stream.read_bigendian_int64() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl_decode_from_s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":961 + * return Timestamp(micros=millis * 1000) + * + * def estimate_size(self, unused_value, nested=False): # <<<<<<<<<<<<<< + * # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of + * # nesting. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x666ec74, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TimestampCoderImpl___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":967 + * + * + * class TimerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): +*/ + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_12 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 967, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":969 + * class TimerCoderImpl(StreamCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): # <<<<<<<<<<<<<< + * self._timestamp_coder_impl = TimestampCoderImpl() + * self._boolean_coder_impl = BooleanCoderImpl() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_4) < (0)) __PYX_ERR(0, 969, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":978 + * self._tag_coder_impl = StrUtf8Coder().get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (userstate.Timer, create_OutputStream, bool) -> None + * self._key_coder_impl.encode_to_stream(value.user_key, out, True) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream, 0, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":991 + * self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> userstate.Timer + * from apache_beam.transforms import userstate +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream, 0, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl_decode_from_strea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 991, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":967 + * + * + * class TimerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, key_coder_impl, window_coder_impl): +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl, __pyx_t_12, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TimerCoderImpl, __pyx_t_4) < (0)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1020 + * + * + * small_ints = [chr(_).encode('latin-1') for _ in range(128)] # <<<<<<<<<<<<<< + * + * +*/ + { /* enter inner scope */ + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1020, __pyx_L64_error) + __Pyx_GOTREF(__pyx_t_12); + for (__pyx_t_9 = 0; __pyx_t_9 < 0x80; __pyx_t_9+=1) { + __pyx_t_14 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1020, __pyx_L64_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__); + __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __pyx_t_14 = 0; + __pyx_t_11 = __Pyx_PyLong_As_int(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L64_error) + __pyx_t_14 = PyUnicode_FromOrdinal(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1020, __pyx_L64_error) + __Pyx_GOTREF(__pyx_t_14); + if (unlikely(__pyx_t_14 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 1020, __pyx_L64_error) + } + __pyx_t_5 = PyUnicode_AsLatin1String(((PyObject*)__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1020, __pyx_L64_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1020, __pyx_L64_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_GOTREF(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__); + __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__, Py_None); + goto __pyx_L67_exit_scope; + __pyx_L64_error:; + __Pyx_GOTREF(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__); + __Pyx_DECREF_SET(__pyx_8genexpr4__pyx_v_11apache_beam_6coders_10coder_impl__, Py_None); + goto __pyx_L1_error; + __pyx_L67_exit_scope:; + } /* exit inner scope */ + __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, ((PyObject*)__pyx_t_12)); + __Pyx_GIVEREF(__pyx_t_12); + __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1027 + * + * A coder for int objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * try: +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1038 + * f"Original error: {e}") from e + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int64() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl_decode_from_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1042 + * return in_stream.read_var_int64() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1048 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1055 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarIntCoderImpl___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1071 + * + * A coder for int32 objects.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * out.write_var_int32(value) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl_encode_to_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1075 + * out.write_var_int32(value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * return in_stream.read_var_int32() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl_decode_from_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1079 + * return in_stream.read_var_int32() + * + * def encode(self, value): # <<<<<<<<<<<<<< + * ivalue = value # type cast + * if 0 <= ivalue < len(small_ints): +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1085 + * return StreamCoderImpl.encode(self, value) + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * if len(encoded) == 1: + * i = ord(encoded) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 1085, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1092 + * return StreamCoderImpl.decode(self, encoded) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * # Note that VarInts are encoded the same way regardless of nesting. +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 1092, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_VarInt32CoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_VarInt32CoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17VarInt32CoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_VarInt32CoderImpl___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1105 + * self._value = value + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * pass +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl_encode_to_str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1109 + * pass + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._value +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl_decode_from_s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1113 + * return self._value + * + * def encode(self, value): # <<<<<<<<<<<<<< + * b = b'' # avoid byte vs str vs unicode error + * return b +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1117 + * return b + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * return self._value + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1120 + * return self._value + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * return 0 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonCoderImpl___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1134 + * self._coder_impls = tuple(coder_impls) + * + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl__extr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_extract_components, __pyx_t_12) < (0)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1137 + * raise NotImplementedError + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl__cons, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[134])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_components, __pyx_t_12) < (0)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1140 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * values = self._extract_components(value) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl_encod, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[135])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1150 + * values[i], out, nested or i + 1 < len(self._coder_impls)) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * return self._construct_from_components([ +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl_decod, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[136])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1158 + * ]) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl_estim, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[137])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_12) < (0)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1166 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl_get_e, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[138])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_12) < (0)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl___red, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[139])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractComponentCoderImpl___set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[140])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1183 + * + * + * class AvroCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): +*/ + __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5 != __pyx_t_12) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 1183, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1185 + * class AvroCoderImpl(SimpleCoderImpl): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): # <<<<<<<<<<<<<< + * self.parsed_schema = parse_schema(json.loads(schema)) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[141])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_12) < (0)) __PYX_ERR(0, 1185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1188 + * self.parsed_schema = parse_schema(json.loads(schema)) + * + * def encode(self, value): # <<<<<<<<<<<<<< + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode, 0, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl_encode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[142])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encode, __pyx_t_12) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1194 + * return buf.getvalue() + * + * def decode(self, encoded): # <<<<<<<<<<<<<< + * with BytesIO(encoded) as buf: + * return AvroRecord(schemaless_reader(buf, self.parsed_schema)) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode, 0, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl_decode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[143])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_decode, __pyx_t_12) < (0)) __PYX_ERR(0, 1194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1183 + * + * + * class AvroCoderImpl(SimpleCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, schema): +*/ + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AvroCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1201 + * class TupleCoderImpl(AbstractComponentCoderImpl): + * """A coder for tuple objects.""" + * def _extract_components(self, value): # <<<<<<<<<<<<<< + * return tuple(value) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleCoderImpl__extract_componen, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[144])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl, __pyx_mstate_global->__pyx_n_u_extract_components, __pyx_t_5) < (0)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1204 + * return tuple(value) + * + * def _construct_from_components(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleCoderImpl__construct_from_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[145])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_components, __pyx_t_5) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[146])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleCoderImpl, (type(self), 0xfbd5b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[147])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1208 + * + * + * class _ConcatSequence(object): # <<<<<<<<<<<<<< + * def __init__(self, head, tail): + * # type: (Iterable[Any], Iterable[Any]) -> None +*/ + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[5]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConcatSequence, __pyx_mstate_global->__pyx_n_u_ConcatSequence, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[5]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[5]) < 0))) __PYX_ERR(0, 1208, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":1209 + * + * class _ConcatSequence(object): + * def __init__(self, head, tail): # <<<<<<<<<<<<<< + * # type: (Iterable[Any], Iterable[Any]) -> None + * self._head = head +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ConcatSequence___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[148])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_12) < (0)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1214 + * self._tail = tail + * + * def __iter__(self): # <<<<<<<<<<<<<< + * # type: () -> Iterator[Any] + * for elem in self._head: +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_ConcatSequence___iter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_12) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1221 + * yield elem + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return list(self) == list(other) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__, 0, __pyx_mstate_global->__pyx_n_u_ConcatSequence___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[149])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_12) < (0)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1224 + * return list(self) == list(other) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__, 0, __pyx_mstate_global->__pyx_n_u_ConcatSequence___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[150])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_12) < (0)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1227 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return list, (list(self), ) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__, 0, __pyx_mstate_global->__pyx_n_u_ConcatSequence___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[151])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_12) < (0)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1208 + * + * + * class _ConcatSequence(object): # <<<<<<<<<<<<<< + * def __init__(self, head, tail): + * # type: (Iterable[Any], Iterable[Any]) -> None +*/ + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ConcatSequence, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ConcatSequence, __pyx_t_12) < (0)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1231 + * + * + * FastPrimitivesCoderImpl.register_iterable_like_type(_ConcatSequence) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_14 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + __Pyx_INCREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConcatSequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register_iterable_like_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1268 + * + * # Default buffer size of 64kB of handling iterables of unknown length. + * _DEFAULT_BUFFER_SIZE = 64 * 1024 # <<<<<<<<<<<<<< + * + * def __init__( +*/ + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_DEFAULT_BUFFER_SIZE, __pyx_mstate_global->__pyx_int_65536) < (0)) __PYX_ERR(0, 1268, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1282 + * self._write_state_threshold = write_state_threshold + * + * def _construct_from_sequence(self, values): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl__construct_fro, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[152])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_sequence, __pyx_t_5) < (0)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1285 + * raise NotImplementedError + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Sequence, create_OutputStream, bool) -> None + * # Compatible with Java's IterableLikeCoder. +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl_encode_to_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[153])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1333 + * out.write_var_int64(0) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Sequence + * size = in_stream.read_bigendian_int32() +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl_decode_from_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[154])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_5) < (0)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1361 + * return self._construct_from_sequence(elements) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[155])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_5) < (0)) __PYX_ERR(0, 1361, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1369 + * return estimated_size + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl_get_estimated, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[156])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_5) < (0)) __PYX_ERR(0, 1369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[157])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SequenceCoderImpl___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[158])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1401 + * + * A coder for homogeneous tuple objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return tuple(components) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleSequenceCoderImpl__construc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[159])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_sequence, __pyx_t_5) < (0)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleSequenceCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[160])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TupleSequenceCoderImpl___setstat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[161])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractIterable___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[162])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__AbstractIterable, (type(self), 0x77c43a1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractIterable___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[163])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1428 + * + * + * FastPrimitivesCoderImpl.register_iterable_like_type(_AbstractIterable) # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/21167): Enable using abstract +*/ + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable)}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register_iterable_like_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1432 + * # TODO(https://github.com/apache/beam/issues/21167): Enable using abstract + * # iterables permanently + * _iterable_coder_uses_abstract_iterable_by_default = False # <<<<<<<<<<<<<< + * + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_iterable_coder_uses_abstract_it, Py_False) < (0)) __PYX_ERR(0, 1432, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1445 + * self._use_abstract_iterable = use_abstract_iterable + * + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * if self._use_abstract_iterable: + * return _AbstractIterable(components) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IterableCoderImpl__construct_fro, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[164])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_sequence, __pyx_t_5) < (0)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IterableCoderImpl___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[165])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IterableCoderImpl, (type(self), 0xf875643, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IterableCoderImpl___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[166])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1456 + * + * A coder for homogeneous list objects.""" + * def _construct_from_sequence(self, components): # <<<<<<<<<<<<<< + * return components if isinstance(components, list) else list(components) + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListCoderImpl__construct_from_se, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[167])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl, __pyx_mstate_global->__pyx_n_u_construct_from_sequence, __pyx_t_5) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[168])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ListCoderImpl, (type(self), 0x72ca29b, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ListCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[169])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1460 + * + * + * class PaneInfoEncoding(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[7]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[7]) { + if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[7]) < 0))) __PYX_ERR(0, 1460, __pyx_L1_error) + } + + /* "apache_beam/coders/coder_impl.py":1470 + * """ + * + * FIRST = 0 # <<<<<<<<<<<<<< + * ONE_INDEX = 1 + * TWO_INDICES = 2 +*/ + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_FIRST, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1470, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1471 + * + * FIRST = 0 + * ONE_INDEX = 1 # <<<<<<<<<<<<<< + * TWO_INDICES = 2 + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ONE_INDEX, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1471, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1472 + * FIRST = 0 + * ONE_INDEX = 1 + * TWO_INDICES = 2 # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_TWO_INDICES, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 1472, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1460 + * + * + * class PaneInfoEncoding(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding, __pyx_t_5, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding, __pyx_t_12) < (0)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1476 + * + * # These are cdef'd to ints to optimized the common case. + * PaneInfoTiming_UNKNOWN = windowed_value.PaneInfoTiming.UNKNOWN # <<<<<<<<<<<<<< + * PaneInfoEncoding_FIRST = PaneInfoEncoding.FIRST + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UNKNOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = __Pyx_PyLong_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":1477 + * # These are cdef'd to ints to optimized the common case. + * PaneInfoTiming_UNKNOWN = windowed_value.PaneInfoTiming.UNKNOWN + * PaneInfoEncoding_FIRST = PaneInfoEncoding.FIRST # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PaneInfoEncoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FIRST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST = __pyx_t_11; + + /* "apache_beam/coders/coder_impl.py":1494 + * return PaneInfoEncoding.TWO_INDICES + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None + * pane_info = value # cast +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl_encode_to_stre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[170])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1509 + * raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.PaneInfo + * encoded_first_byte = in_stream.read_byte() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl_decode_from_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[171])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1531 + * base.is_first, base.is_last, base.timing, index, nonspeculative_index) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl_estimate_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[172])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[173])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfoCoderImpl___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[174])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1551 + * self._fallback_coder_impl = fallback_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * value_t = type(value) + * for (ix, t) in enumerate(self._types): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OrderedUnionCoderImpl_encode_to, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[175])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1565 + * self._fallback_coder_impl.encode_to_stream(value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * ix = in_stream.read_byte() + * if ix == 0xFF: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OrderedUnionCoderImpl_decode_fr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[176])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OrderedUnionCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[177])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OrderedUnionCoderImpl, (type(self), 0x2bb239d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OrderedUnionCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22_OrderedUnionCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OrderedUnionCoderImpl___setstat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[178])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1600 + * self._pane_info_coder = PaneInfoCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None + * wv = value # type cast +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl_encode_to, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[179])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1621 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> windowed_value.WindowedValue + * timestamp = self._to_normal_time(in_stream.read_bigendian_uint64()) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl_decode_fr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[180])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1621, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1647 + * pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> Tuple[int, Observables] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl_get_estim, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[181])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_4) < (0)) __PYX_ERR(0, 1647, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[182])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x6be047d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValueCoderImpl___setstat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[183])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1684 + * payload, window_coder) + * + * def _from_proto(self, payload, window_coder): # <<<<<<<<<<<<<< + * windowed_value_coder = WindowedValueCoderImpl( + * BytesCoderImpl(), TimestampCoderImpl(), window_coder) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl__fro, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[184])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_4) < (0)) __PYX_ERR(0, 1684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1690 + * return wv.timestamp_micros, wv.windows, wv.pane_info + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * wv = value # type cast + * self._value_coder.encode_to_stream(wv.value, out, nested) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl_enco, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[185])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1694 + * self._value_coder.encode_to_stream(wv.value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * value = self._value_coder.decode_from_stream(in_stream, nested) + * return windowed_value.create( +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl_deco, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[186])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1694, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1699 + * value, self._timestamp, self._windows, self._pane_info) + * + * def get_estimated_size_and_observables(self, value, nested=False): # <<<<<<<<<<<<<< + * """Returns estimated size of value along with any nested observables.""" + * if isinstance(value, observable.ObservableMixin): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl_get, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[187])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_t_4) < (0)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl___re, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[188])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x042c030, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ParamWindowedValueCoderImpl___se, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[189])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1723 + * self._value_coder = value_coder + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (Any, create_OutputStream, bool) -> None + * encoded_value = self._value_coder.encode(value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl_encode_to, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[190])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1729 + * out.write(encoded_value) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> Any + * value_length = in_stream.read_var_int64() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl_decode_fro, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[191])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1734 + * return self._value_coder.decode(in_stream.read(value_length)) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * value_size = self._value_coder.estimate_size(value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl_estimate_s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[192])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl___reduce_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[193])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x7fd8b79, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LengthPrefixCoderImpl___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[194])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1740 + * + * + * class ShardedKeyCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_5 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1740, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1749 + * encoded user key + * """ + * def __init__(self, key_coder_impl): # <<<<<<<<<<<<<< + * self._shard_id_coder_impl = BytesCoderImpl() + * self._key_coder_impl = key_coder_impl +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[195])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_4) < (0)) __PYX_ERR(0, 1749, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1753 + * self._key_coder_impl = key_coder_impl + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (ShardedKey, create_OutputStream, bool) -> None + * self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream, 0, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl_encode_to_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[196])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1758 + * self._key_coder_impl.encode_to_stream(value.key, out, True) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> ShardedKey + * shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream, 0, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl_decode_from, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[197])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1758, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1764 + * return ShardedKey(key=key, shard_id=shard_id) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * estimated_size = 0 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size, 0, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl_estimate_siz, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[198])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_4) < (0)) __PYX_ERR(0, 1764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1740 + * + * + * class ShardedKeyCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl, __pyx_t_5, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ShardedKeyCoderImpl, __pyx_t_4) < (0)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1774 + * + * + * class TimestampPrefixingWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_14 != __pyx_t_5) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1774, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1784 + * encoded window using it's own coder. + * """ + * def __init__(self, window_coder_impl: CoderImpl) -> None: # <<<<<<<<<<<<<< + * self._window_coder_impl = window_coder_impl + * +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_window_coder_impl, __pyx_mstate_global->__pyx_n_u_CoderImpl) < (0)) __PYX_ERR(0, 1784, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 1784, __pyx_L1_error) + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[199])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_16, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_16) < (0)) __PYX_ERR(0, 1784, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1787 + * self._window_coder_impl = window_coder_impl + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested) + * self._window_coder_impl.encode_to_stream(value, stream, nested) +*/ + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[200])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_16) < (0)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1791 + * self._window_coder_impl.encode_to_stream(value, stream, nested) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().decode_from_stream(stream, nested) + * return self._window_coder_impl.decode_from_stream(stream, nested) +*/ + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp_4, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[201])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_16) < (0)) __PYX_ERR(0, 1791, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1795 + * return self._window_coder_impl.decode_from_stream(stream, nested) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + __pyx_t_16 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_Any) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_nested, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error) + __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp_5, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[202])); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_17); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_17, __pyx_t_5); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_17, __pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_17) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "apache_beam/coders/coder_impl.py":1774 + * + * + * class TimestampPrefixingWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp, __pyx_t_14, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_17); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingWindowCoderImp, __pyx_t_17) < (0)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":1801 + * + * + * _OpaqueWindow = None # <<<<<<<<<<<<<< + * + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OpaqueWindow_2, Py_None) < (0)) __PYX_ERR(0, 1801, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1804 + * + * + * def _create_opaque_window(end, encoded_window): # <<<<<<<<<<<<<< + * # This is lazy to avoid circular import issues. + * global _OpaqueWindow +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_11_create_opaque_window, 0, __pyx_mstate_global->__pyx_n_u_create_opaque_window, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[203])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_opaque_window, __pyx_t_14) < (0)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":1829 + * + * + * class TimestampPrefixingOpaqueWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_14 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (__pyx_t_12 != __pyx_t_14) { + if (unlikely((PyDict_SetItemString(__pyx_t_17, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 1829, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/coders/coder_impl.py":1839 + * length prefixed encoded window + * """ + * def __init__(self) -> None: # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_1__init__, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[204])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_16, __pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_init_2, __pyx_t_16) < (0)) __PYX_ERR(0, 1839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1842 + * pass + * + * def encode_to_stream(self, value, stream, nested): # <<<<<<<<<<<<<< + * TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, True) + * stream.write(value.encoded_window, True) +*/ + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_3encode_to_stream, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[205])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_16) < (0)) __PYX_ERR(0, 1842, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1846 + * stream.write(value.encoded_window, True) + * + * def decode_from_stream(self, stream, nested): # <<<<<<<<<<<<<< + * max_timestamp = TimestampCoderImpl().decode_from_stream(stream, True) + * return _create_opaque_window( +*/ + __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_5decode_from_stream, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo_4, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[206])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16); + #endif + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_16) < (0)) __PYX_ERR(0, 1846, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/coders/coder_impl.py":1851 + * max_timestamp.successor(), stream.read_all(True)) + * + * def estimate_size(self, value: Any, nested: bool = False) -> int: # <<<<<<<<<<<<<< + * return ( + * TimestampCoderImpl().estimate_size(value.max_timestamp()) + +*/ + __pyx_t_16 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_14 = PyTuple_Pack(1, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_Any) < (0)) __PYX_ERR(0, 1851, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_nested, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 1851, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1851, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39TimestampPrefixingOpaqueWindowCoderImpl_7estimate_size, 0, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo_5, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[207])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_14); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_16); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_t_5) < (0)) __PYX_ERR(0, 1851, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/coders/coder_impl.py":1829 + * + * + * class TimestampPrefixingOpaqueWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo, __pyx_t_12, __pyx_t_17, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TimestampPrefixingOpaqueWindowCo, __pyx_t_5) < (0)) __PYX_ERR(0, 1829, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1857 + * + * + * row_coders_registered = False # <<<<<<<<<<<<<< + * + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_row_coders_registered, Py_False) < (0)) __PYX_ERR(0, 1857, __pyx_L1_error) + + /* "apache_beam/coders/coder_impl.py":1861 + * + * class RowColumnEncoder: + * ROW_ENCODERS = {1: 12345} # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_12345) < (0)) __PYX_ERR(0, 1861, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_ROW_ENCODERS, __pyx_t_12) < (0)) __PYX_ERR(0, 1861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1863 + * ROW_ENCODERS = {1: 12345} + * + * @classmethod # <<<<<<<<<<<<<< + * def register(cls, field_type, coder_impl): + * cls.ROW_ENCODERS[field_type, coder_impl] = cls +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder_register, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[208])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_register, __pyx_t_12) < (0)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_register); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_register, __pyx_t_4) < (0)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":1867 + * cls.ROW_ENCODERS[field_type, coder_impl] = cls + * + * @classmethod # <<<<<<<<<<<<<< + * def create(cls, field_type, coder_impl, column): + * global row_coders_registered +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder_create, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[209])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_4) < (0)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_create); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_12) < (0)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1880 + * GenericRowColumnEncoder)(coder_impl, column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder_null_flags, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[210])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_null_flags, __pyx_t_12) < (0)) __PYX_ERR(0, 1880, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1889 + * raise NotImplementedError(type(self)) + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder_finalize_write, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[211])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_finalize_write, __pyx_t_12) < (0)) __PYX_ERR(0, 1889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[212])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowColumnEncoder, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowColumnEncoder___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[213])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1898 + * self.column = column + * + * def null_flags(self): # <<<<<<<<<<<<<< + * # pylint: disable=singleton-comparison + * return self.column == None # This is an array. +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GenericRowColumnEncoder_null_fla, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[214])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_null_flags, __pyx_t_12) < (0)) __PYX_ERR(0, 1898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1908 + * self.column[index] = self.coder_impl.decode_from_stream(in_stream, True) + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GenericRowColumnEncoder_finalize, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[215])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_finalize_write, __pyx_t_12) < (0)) __PYX_ERR(0, 1908, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GenericRowColumnEncoder___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[216])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0x6ad26e8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GenericRowColumnEncoder___setsta, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[217])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1942 + * field.type.nullable for field in self.schema.fields) + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * out.write_var_int64(self.num_fields) + * attrs = [getattr(value, name) for name in self.field_names] +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl_encode_to_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[218])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1980 + * component_coder.encode_to_stream(attr, out, True) + * + * def _row_column_encoders(self, columns): # <<<<<<<<<<<<<< + * return [ + * RowColumnEncoder.create( +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl__row_column_encoder, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[219])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_row_column_encoders, __pyx_t_12) < (0)) __PYX_ERR(0, 1980, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1988 + * ] + * + * def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(columns) + * n = len(next(iter(columns.values()))) +*/ + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_columns, __pyx_mstate_global->__pyx_kp_u_Dict_str_np_ndarray) < (0)) __PYX_ERR(0, 1988, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl_encode_batch_to_str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[220])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_batch_to_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 1988, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":2025 + * cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * nvals = in_stream.read_var_int64() + * null_mask_len = in_stream.read_var_int64() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl_decode_from_stream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[221])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_4) < (0)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl.py":2058 + * [sorted_components[i] for i in self.encoding_positions])) + * + * def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream): # <<<<<<<<<<<<<< + * attrs = self._row_column_encoders(dest) + * n = len(next(iter(dest.values()))) +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dest, __pyx_mstate_global->__pyx_kp_u_Dict_str_np_ndarray) < (0)) __PYX_ERR(0, 2058, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl_decode_batch_from_s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[222])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_batch_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2058, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[223])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_RowCoderImpl, (type(self), 0xf2b4193, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_RowCoderImpl___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[224])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2093 + * self.representation_coder = representation_coder.get_impl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * return self.representation_coder.encode_to_stream( + * self.logical_type.to_representation_type(value), out, nested) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LogicalTypeCoderImpl_encode_to_s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[225])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2093, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2097 + * self.logical_type.to_representation_type(value), out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * return self.logical_type.to_language_type( + * self.representation_coder.decode_from_stream(in_stream, nested)) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LogicalTypeCoderImpl_decode_from, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[226])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LogicalTypeCoderImpl___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[227])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0xb7905bf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LogicalTypeCoderImpl___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[228])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2107 + * For interoperability with Java SDK, encoding needs to match that of the Java + * SDK BigIntegerCoder.""" + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (int, create_OutputStream, bool) -> None + * if value < 0: +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigIntegerCoderImpl_encode_to_st, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[229])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2117 + * out.write(encoded_value, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> int + * encoded_value = in_stream.read_all(nested) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigIntegerCoderImpl_decode_from, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[230])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigIntegerCoderImpl___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[231])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BigIntegerCoderImpl___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[232])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2129 + * SDK BigDecimalCoder.""" + * + * BIG_INT_CODER_IMPL = BigIntegerCoderImpl() # <<<<<<<<<<<<<< + * + * def encode_to_stream(self, value, out, nested): +*/ + __pyx_t_4 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2129, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_12); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_mstate_global->__pyx_n_u_BIG_INT_CODER_IMPL, ((PyObject *)__pyx_t_12)) < (0)) __PYX_ERR(0, 2129, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2131 + * BIG_INT_CODER_IMPL = BigIntegerCoderImpl() + * + * def encode_to_stream(self, value, out, nested): # <<<<<<<<<<<<<< + * # type: (decimal.Decimal, create_OutputStream, bool) -> None + * scale = -value.as_tuple().exponent # type: ignore[operator] +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DecimalCoderImpl_encode_to_strea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[233])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_mstate_global->__pyx_n_u_encode_to_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":2138 + * self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested) + * + * def decode_from_stream(self, in_stream, nested): # <<<<<<<<<<<<<< + * # type: (create_InputStream, bool) -> decimal.Decimal + * scale = in_stream.read_var_int64() +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DecimalCoderImpl_decode_from_str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[234])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_mstate_global->__pyx_n_u_decode_from_stream, __pyx_t_12) < (0)) __PYX_ERR(0, 2138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DecimalCoderImpl___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[235])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state) +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DecimalCoderImpl___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[236])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_12) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_CoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[237])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_SimpleCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[238])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_StreamCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_StreamCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[239])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_StreamCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_CallbackCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CallbackCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[240])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CallbackCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77bcc08, 0x086771f, 0x6e743eb, b'fallback_coder_impl, force_use_dill, iterable_coder_impl, requires_deterministic_step_label, use_relative_filepaths, warn_deterministic_fallback') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_FastPrimitivesCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FastPrimitivesCod, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[241])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FastPrimitivesCod, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_BytesCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BytesCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[242])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BytesCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_BooleanCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BooleanCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[243])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BooleanCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_MapCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MapCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[244])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MapCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_BigEndianShortCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigEndianShortCod, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[245])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigEndianShortCod, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_SinglePrecisionFloatCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SinglePrecisionFl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[246])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SinglePrecisionFl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_FloatCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FloatCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[247])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FloatCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_IntervalWindowCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IntervalWindowCod, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[248])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IntervalWindowCod, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x666ec74, 0x95d62e5, 0x11860ce, b'timestamp_class') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TimestampCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TimestampCoderImp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[249])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TimestampCoderImp, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_VarIntCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarIntCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[250])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarIntCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_VarInt32CoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_VarInt32CoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarInt32CoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[251])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_VarInt32CoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_45__pyx_unpickle_SingletonCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonCoderImp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[252])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonCoderImp, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xfbd5b57, 0x24d57b6, 0x56b63b6, b'_coder_impls') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_AbstractComponentCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AbstractComponent, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[253])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AbstractComponent, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_TupleCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[254])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_SequenceCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SequenceCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[255])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SequenceCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_TupleSequenceCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleSequenceCode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[256])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TupleSequenceCode, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x77c43a1, 0x6800c7c, 0xcbf6c60, b'_contents') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_55__pyx_unpickle__AbstractIterable, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__AbstractIterable, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[257])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__AbstractIterable, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_IterableCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IterableCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[258])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IterableCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x72ca29b, 0x185d0a4, 0xb581fbd, b'_elem_coder, _read_state, _write_state, _write_state_threshold') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_ListCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ListCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[259])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ListCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_PaneInfoCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PaneInfoCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[260])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PaneInfoCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OrderedUnionCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x2bb239d, 0x93ef4d9, 0x9c1351e, b'_coder_impls, _fallback_coder_impl, _types') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_63__pyx_unpickle__OrderedUnionCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OrderedUnionCode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[261])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OrderedUnionCode, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_WindowedValueCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedValueCode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[262])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedValueCode, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x042c030, 0xc4f2637, 0x861f76a, b'_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_ParamWindowedValueCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ParamWindowedValu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[263])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ParamWindowedValu, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_LengthPrefixCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LengthPrefixCoder, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[264])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LengthPrefixCoder, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_71__pyx_unpickle_RowColumnEncoder, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowColumnEncoder, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[265])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowColumnEncoder, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_73__pyx_unpickle_GenericRowColumnEncoder, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GenericRowColumnE, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[266])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GenericRowColumnE, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xf2b4193, 0x540fa75, 0x0c10601, b'components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_75__pyx_unpickle_RowCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[267])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_RowCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_77__pyx_unpickle_LogicalTypeCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LogicalTypeCoderI, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[268])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_LogicalTypeCoderI, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_79__pyx_unpickle_BigIntegerCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigIntegerCoderIm, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[269])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BigIntegerCoderIm, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_81__pyx_unpickle_DecimalCoderImpl, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DecimalCoderImpl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[270])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DecimalCoderImpl, __pyx_t_12) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/coders/coder_impl.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_12 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_12) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.coders.coder_impl"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 101, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 619, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "View.MemoryView":583 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_neg_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[0], 0, __pyx_mstate_global->__pyx_int_neg_1) != (0)) __PYX_ERR(1, 583, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "View.MemoryView":680 + * tup = index if isinstance(index, tuple) else (index,) + * + * result = [slice(None)] * ndim # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False +*/ + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + + /* "apache_beam/coders/coder_impl.py":918 + * # instantiating with None is not part of the public interface + * # pylint: disable=too-many-function-args + * typed_value = IntervalWindow(None, None) # type: ignore[arg-type] # <<<<<<<<<<<<<< + * typed_value._end_micros = ( + * 1000 * self._to_normal_time(in_.read_bigendian_uint64())) +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "apache_beam/coders/coder_impl.py":1190 + * def encode(self, value): + * assert issubclass(type(value), AvroRecord) + * with BytesIO() as buf: # <<<<<<<<<<<<<< + * schemaless_writer(buf, self.parsed_schema, value.record) + * return buf.getvalue() +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/coders/coder_impl.py":179 + * return self.decode_from_stream(create_InputStream(encoded), True) + * + * def estimate_size(self, value, nested=False): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> int + * +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + + /* "apache_beam/coders/coder_impl.py":1208 + * + * + * class _ConcatSequence(object): # <<<<<<<<<<<<<< + * def __init__(self, head, tail): + * # type: (Iterable[Any], Iterable[Any]) -> None +*/ + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + + /* "apache_beam/coders/coder_impl.py":1460 + * + * + * class PaneInfoEncoding(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<8; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 10; } index[] = {{2},{7},{23},{68},{53},{35},{26},{54},{37},{60},{40},{24},{56},{52},{21},{24},{26},{34},{53},{23},{61},{101},{408},{202},{312},{307},{22},{29},{33},{15},{28},{45},{22},{15},{12},{4},{179},{53},{13},{37},{15},{30},{56},{192},{32},{47},{36},{55},{57},{19},{58},{86},{3},{2},{1},{1},{1},{1},{1},{1},{8},{5},{19},{32},{30},{25},{6},{15},{23},{25},{10},{7},{6},{20},{21},{2},{6},{35},{94},{162},{9},{30},{50},{8},{11},{48},{20},{32},{22},{14},{30},{37},{5},{5},{26},{44},{46},{53},{46},{45},{43},{40},{61},{17},{35},{37},{3},{13},{22},{20},{20},{10},{18},{23},{41},{43},{42},{40},{37},{19},{37},{39},{38},{36},{16},{34},{36},{23},{35},{23},{33},{30},{13},{24},{14},{32},{34},{21},{33},{21},{31},{7},{8},{17},{35},{37},{41},{24},{36},{24},{34},{31},{52},{17},{9},{27},{29},{26},{16},{20},{28},{23},{16},{20},{23},{26},{23},{44},{15},{22},{24},{24},{24},{26},{22},{20},{7},{16},{34},{36},{35},{33},{27},{34},{4},{5},{11},{14},{9},{8},{4},{5},{23},{41},{43},{57},{42},{69},{40},{58},{51},{14},{32},{34},{33},{31},{28},{23},{41},{43},{38},{34},{11},{14},{23},{41},{43},{42},{40},{37},{8},{17},{35},{37},{42},{19},{19},{8},{7},{21},{39},{41},{40},{38},{35},{4},{13},{31},{33},{38},{20},{38},{40},{39},{37},{13},{13},{12},{30},{32},{31},{29},{26},{17},{4},{17},{26},{36},{34},{31},{9},{15},{11},{13},{20},{22},{22},{22},{8},{22},{40},{42},{41},{39},{12},{17},{35},{37},{36},{34},{31},{16},{14},{27},{45},{47},{39},{46},{44},{62},{15},{13},{14},{23},{21},{21},{18},{27},{25},{25},{20},{12},{12},{30},{32},{33},{37},{31},{35},{29},{16},{34},{36},{23},{31},{27},{25},{11},{8},{17},{35},{37},{42},{36},{34},{31},{52},{24},{3},{10},{19},{28},{38},{36},{33},{15},{33},{35},{34},{32},{29},{47},{49},{48},{46},{43},{18},{36},{38},{25},{37},{25},{35},{32},{12},{15},{33},{35},{22},{22},{29},{11},{13},{5},{14},{23},{33},{31},{9},{18},{36},{38},{37},{35},{32},{39},{48},{56},{58},{53},{33},{42},{50},{52},{47},{5},{14},{32},{34},{41},{34},{22},{40},{42},{47},{4},{7},{17},{35},{37},{24},{36},{24},{34},{31},{15},{33},{35},{22},{34},{22},{32},{29},{15},{22},{40},{42},{41},{39},{57},{0},{3},{15},{3},{18},{30},{29},{25},{20},{32},{22},{29},{29},{17},{29},{27},{6},{7},{8},{6},{18},{11},{4},{4},{8},{10},{3},{10},{4},{19},{2},{3},{9},{6},{1},{9},{17},{9},{18},{5},{11},{19},{3},{10},{23},{16},{11},{6},{7},{10},{6},{26},{24},{8},{5},{6},{18},{19},{21},{20},{11},{7},{6},{10},{24},{18},{13},{7},{23},{11},{4},{13},{33},{8},{5},{10},{4},{7},{5},{15},{5},{17},{4},{10},{6},{10},{22},{13},{16},{7},{14},{7},{17},{22},{3},{9},{4},{9},{6},{5},{13},{14},{8},{8},{19},{19},{8},{5},{10},{6},{7},{20},{9},{14},{14},{15},{5},{14},{6},{7},{10},{11},{6},{8},{7},{3},{9},{9},{34},{8},{16},{17},{15},{12},{8},{8},{4},{5},{14},{1},{2},{12},{10},{3},{9},{5},{4},{8},{25},{10},{12},{3},{2},{13},{12},{16},{8},{7},{6},{5},{8},{8},{49},{9},{4},{3},{9},{14},{15},{7},{8},{7},{6},{5},{7},{12},{8},{13},{7},{13},{13},{6},{4},{10},{15},{4},{8},{23},{4},{6},{7},{4},{20},{2},{10},{14},{8},{5},{3},{6},{10},{5},{3},{4},{9},{21},{8},{12},{13},{7},{3},{6},{3},{11},{5},{13},{18},{15},{11},{12},{14},{12},{11},{10},{41},{38},{34},{31},{29},{32},{24},{31},{19},{38},{29},{38},{38},{32},{36},{28},{35},{27},{32},{42},{27},{31},{32},{30},{44},{33},{30},{33},{29},{37},{32},{30},{37},{32},{37},{14},{12},{8},{9},{10},{6},{10},{17},{13},{8},{27},{8},{20},{33},{6},{21},{20},{6},{6},{17},{17},{4},{4},{12},{10},{12},{19},{5},{9},{8},{20},{6},{4},{14},{29},{11},{5},{5},{12},{4},{4},{6},{6},{9},{3},{5},{1},{15},{4},{5},{8},{5},{9},{15},{21},{16},{6},{8},{16},{22},{3},{4},{6},{5},{6},{21},{28},{14},{21},{39},{12},{6},{21},{22},{12},{8},{9},{5},{11},{12},{6},{19},{11},{7},{12},{17},{18},{14},{20},{7},{19},{5},{10},{11},{21},{2},{1},{5},{3},{11},{54},{558},{1},{1},{0},{11},{2},{130},{11},{11},{21},{10},{7},{12},{10},{11},{227},{84},{50},{59},{32},{11},{11},{78},{58},{17},{24},{11},{16},{60},{31},{26},{21},{29},{9},{9},{19},{21},{13},{13},{19},{41},{12},{11},{15},{16},{11},{18},{47},{63},{11},{21},{13},{11},{12},{13},{11},{30},{12},{11},{76},{191},{2},{11},{48},{661},{57},{11},{21},{136},{170},{417},{89},{89},{90},{90},{90},{89},{92},{89},{46},{15},{83},{51},{40},{27},{121},{38},{26},{32},{51},{223},{52},{10},{2},{40},{22},{96},{117},{29},{33},{57},{42},{46},{83},{144},{62},{12},{121},{20},{16},{49},{11},{26},{135},{115},{177},{130},{98},{99},{98},{100},{98},{97},{109},{44},{116},{61},{352},{272},{112},{143},{184},{135},{135},{134},{50},{21},{54},{67},{2},{2},{9},{12},{7},{16},{5},{10},{20},{38},{21},{16},{15},{46},{13},{12},{25},{16},{40},{11},{33},{42},{39},{36},{119},{106},{41},{46},{621},{11},{2},{59},{57},{59},{57},{59},{59},{56},{58},{55},{58},{58},{59},{58},{59},{58},{55},{10},{12},{12},{15},{13},{309},{149},{11},{11},{58},{209},{31},{51},{93},{32},{24},{57},{51},{82},{49},{376},{224},{1}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (11064 bytes) */ +const char* const cstring = "(\265/\375`\334|uY\001\312!\325=H\320\354\314\003\000_\274\000V\340[\324K\263\350WO\341\0268\205[\340\024\276\306\270)\331\301v\262\340$,Jk\266\223\026%\267\3460\025\321`[I\037\361\244S\203m\030\025O;\364b\200\207^\375\003?w\276n\021\n\212\003\247\003\376\003\276\357\032\035\213\266\272\331U\363<[8:\257\026\355\325\232\265d977:/\375j\361\334\310\306V\352\3235\207u\222\234\325\272\340\232\325\324\350\320h\332\215\316X\323b\351V\016\017M\363\334\274`\272VA\317f\343\315j\244\215\254\234\326;\316g\235\2438\363\206\246=\244\231S\262\351\271B\371\232\356\025\314\205\362>\363+\232\222\243\233\237i\272\246\271\031\272[8\223\346&\007\307\245e-\026l\245i6.\232r\225\241<]}\306\036\332}V\336m\251\326\245\326\251G\271\326\236d\265\026W.\327j66X\271yV\024wH\246\354\014'W6\355a\031\343\267\351\223\362\276S3\236<\267\351\303\226$\353Ov\247\350\202P&\246\354\246*\\\tQZ^RRXNVB\337M\235y\366[hR\341\354J\2231u\337\271\320\377\360\223\220\304\251\244Rj\212w\263T\231\211!mdJ\376,\010\375\016u\357\251\242\251\025\210\272\315mz\253\033\325e\2715\240\244f\304\010\241\212(\212\353\312a\241\210R\362\320\233\266\025\227\227\223\325\312q;\241\310u~LB\334\366\274\363\223\227\334C\2174}7QS\307K\235O=\252##\303WVe=\033\204\275\002k\206\326\270y\256\233\2130/\"\213\214.Uve%LQv\rO\256\232j\216&v\257\265\3478\255\3212\024S\351\312=\364T\356g[\307s\344\254s\222\334h\n;\251qv\267KT\307\276D\336\317]\223\322\333\363\036\242*GC6\355\2057W(\242\246?M\266\363\336\367I\332\370\352\322\300e%\247\225\023\242\353i\206+\356\323\027G\323\227x\013\323\327\016NL*\225\"S\241\212\356Ai\272J\356\327TUY\027J7\177\366I\330m\341-u\245V\356\303\212\036\207\362\023\355AY\224\227z\323\204r\322S\335\304\231\246\324\207\252\316\353\237\2553\331\035_\303\037\363\226#\315\\\347\221\245\031\226g\347%\247\365xO\317u\321\347d;\032\232\036t\256\362\336S\236\017Q,\264X/\227n\275`'\353\016K\316K\317S\005\2056\223\271jNB\356{\266\036\356\007\275\267y\241G9\347k\211nRTo\250\213\243;\307f\256d\007[\232\232^\205\211\341\030\206&\223""\330\371^7\2133O\323f\372\255\352Rr\245\227\353\346\205\020xg\303s\243kM7\301\205*\252pA+\325MR\341\2035\365\233DY\224m\211h\217\301(!\237\325z\3700&@\245\022\n\202\241\266\344\363]T\200(J\354\270%F\305,\006\376\312\005\t\2366\346\013S0\024\333`\032\230\0043\230\211\334]\033\000#\030\213E\274\262\227\345\035\2756\267\304}\3710J1x\205\343\227>\r\223\367\271\370.JA\024\254\301\365`}&>\023\305|b\000\243\274g\013R\202G\270f\013B1\2425}\032\024A\213R0\346\036p{k\322\n\360YP\240Z\035\337\304\351M\271e\033k=\332P\313\362\251|\2437\366\232l|\226\017\203\024\024\375\220\214 >\305\252Y\364C*W\204D\350\267\223]\344\213\370\346U\275\003\334\031\337\005)\210\"\201\212k`\025\234\000\365\253\221U2\204\035\177\304!\360\372\356\027\301\307\317\220?\344\0140\013\214\202S\004|\001\245_\222u\342\0070\007\034\202O\002|\000\276\322\257\345\267Z\360m\260\350\021\014\375$\210\237\006V\361\010n\004O\256\000\214 \306\317\260\000a\224\330n\201\212_A\n\356\230\007\313\340\025\221\317\341\266ZU\333A\232O>\013\322\214\"\241jw1H\034\212\027\220\202!\022\240\220\353\245\323\232\301h0Y\316\013\226\243C\303\031_3\327\r\350\345\032a75\264\225k\006\272\201\301h@\264\032\327\204\231\006\201\314n\2024""\250\373\255\353 \323\367\255\202@ P\327\240Y\005\327\215n\335\320\214\262\026\315\245A \020\210DY\026\004\253\031s4\214\207F\367r@)\260\036\307\241\351\251U\323C\377\361\341u\256;\272n\236\326\272w3\373\332K\336Y\224]\240a^4\013\31260Y\034\272\317\324\347\264>\315\355\375\312U\266\353X\266\367\222\353V\325\354\351\245Y\336N\276m\274wte=\327*Gy\347?\274<7\273\323\332\373t\023eul\357!\2656\325Mv\366T\265\346\\\253\251jSu\257Tuz\333\252\312s>\355\241*\252\375\017\217\353\314\022E\3155]OV\327\323\2254y\327q\235\271ug/wz\236Z\317\354\322\246\333g\214\346\365\240i\357\320\375\326\335w\324,\315\3224\3133\315\225\233\3474_5\307\241\354Mk\315;\333]^\2727o|=UN\352\234\337*?\315\233\3567o\256:\226k\275\226\270\355\365F{eWul\251\273\251\311\324\367\265\354\274\253Z\353Tk\217\262\236\354\275\237\344\252y\347\372$\365\272\271\326Z\223\272w\233\266\3513Mm\332\2336\234i\323\232\367m\323\244\251K=\232\256\251I\242=\326\353\276\375\232v\034W\325\255O\323\263]\354bWI\021\335\232\264m\221\307M\226\226W\r\366\252\360\322aO\225]\271\315\313Ua\325\232\260\232\265V.X\2156kp\363:\253\367&i\366x\205\231\347\263\224\346\315\225\317p\306\226\2146\273\231\245\336&\353\253&W\331L\246k0\331\215\313\374\017\177\351\237^g\317\234\326\254\206w\265\344\272\275\352L\032\252\303\313\025\246W\225\257\272\243\346\217\211\003k\3214\253\365R\367\313\205\223\2033\322f-\034\027M[\030qh\270\364\346&\347F\326\262\261\201\335\370\232l\326O\324\325q\373\274i~[[\250\216=\323\025/\225\221\346j\343wz\326h\336c\2368\276\2563\375\214\021q]\247\265\217\271\346\004\r\\\324\003\004\261\227\000\tSl\022\303\250b\016\177P\270=\237'\335\016\n\376\214\013\363\251~k\303D\311@{\302\210Ai\314\242v6S\204`\004\357\200Y\207o\315\210Q\240\340W\206x\"\236\230S\245o\262k/\020h-Pry \026\305\266\216\301CC$\333\226\240\206\212\243\204\210F\22072\340\324\202\220\346X\013\262a\236\027'\242\244\204\350\243\3322dc\021SP\001\367Rh\200\222\037\244~\nv\201\371[\362\366\214\237\201\201\302\230U.\010\216\013^\202\002\177\004\t\\\276\037-\261""\366#\336@#\266\264\020,c\"`\002\325\202\035x\300Z_h]\277\224\014\023\017\200\025\270$\214\374\217Q\254\366f\270&\025;y\325\022:\375S\205\227\344WX\301\307\037\333\024\237\211\324}\000B\355\016N\200\322\370:_I\354\227\000\301Gp\372\264\016\007b\035.\360f\010Q`dDM\000q?\010\262\215\207\025\354\314\0322\374\014:?\001\020\246\224g\346\0200\300\257g\303%sm\347\363\200\025~5\222\334@5\317d\037\006x\361\013 \273\234\346X\316\017\300\213w\\\022\263\204\200\025@\0142\316#V\355\346\r\344\375*\2141)^\000\340\317\245Z\215\215/\203\004\352G\243\372\344\004|\2621\2170I\n\350\332H\321(\330\364\262\334\016\031\332\274\337\2267\344b\200\260\023`\361\347\333K\261\223e\362(\327b\226\031<\001\357@\374X~\034\277\231\017\211\211\201\251D\216\000\373\327\344\205qEz\006\224x\016\240d\021\013\311\357\256L\326~\300\253\230\000\024\301\230\314\"\342u\241P\371<\017\227l)\332\035\006\214\017\257\020\370!|\035\016|\324K\262\345\234\311\367xCo\030\"\340\227\374\022\324[\272V4x\204;8^2\000\201\031\204k\000\300w\221w\3421v\t\301\266\227\327\022\301E\2710\333\3272\272l\273\333\021\237i\0042\225**\334\020\322\274a\261mi7\220\230\020\005G\2429\026\020\263\343X\314`\007+0\360\r\240>J\256i\221_N\260\207\213\335[\300\305\211\371X\261*F\201O\336\356\272\2706\030\301\361b\277\037\357\352n\227\327V\264\033\030\301\235[\341\206\224\202;\345\r0\3567_I\020J\307\255[{5T\311\221~\253\335,C\225P\345$%tQ1\320*\225\016[\216Y\025k}0Jt\0308\261\213\230\362\222\210\274l\00430H\020N\032\254h\332\271\271\034\037\355\213\252e\377J~\032\346q\036iq7\230*\020\334\364\270\200\007\217\267Bs\323\270\326:0{\023\270:\263\315\245\001\361\351\271&\004\302\340\252\243\23052\346S\214\002\031f\362\212R\177\365\202\210mG\311@\005\211\362\300\352B|5\264[\236I\360\023\250N5\255\007\201\216\333\211\312W!\360\017|?\363\352b%g\313\2637L\3613\371}\210\275\023\000~\254\034\203\372\351\310\017\010\204\200\014~+\005\337D\376\340SA\366\202p\004m\"|d\270\314\254\367\306\367\007\037\200\016wme-K\353M\275\366g\356\004X6\203\366d\316\325\220F\0278\001FL4\217@T\036\361\343\306\240\300\027\314\337\361K(N\365t\370\0352\374\0143?\007\213/\340\315\313\337\301\010\314\334\317\311|\013\360\n\217\205/\002)0\370\026^\023\r\340\004\227\017\227\3744\344\233\t\350\257\246\3457x\017l\240\306O\302\202_ze\266\203\037\243\350\234\237\323\000\246\004\237\210!\357\014i\3736\332\247=\370'p\312\353\307b\371')\207\317A\302/\201(\305\013:~\317E\274\340\364\366\004\370\247\220\2264\371\370\036\373\227K\001\371%\007^Q*[\330)X\307\301\207\305\213\300\267\3028\375\235\335iB\313f\\\0049\306\237\352\307i?\035\337v\301\322\301\346\255\305:\376\016\005N\204J\203d\"\202\370s\242\002\276\214\227\261\275\355\227\267\323\036hM\276\235\014\204\342W\004\210\211\314c\010\315A\273\203zS \377\3034\312\023\342Z\210\210\227\013\355G8\301\366\"\230\000\373\204\374&~71;\362G:+\334\370\241\037\003""\231\227\364\220E\254\261\003{\300(2_\306\305\2065\336P\364\347\322\267@\265(\022?\032Sp\336\215\334\220\021p\007\227\207\345\265\031C\255M\305\363Z\250!\010\316!\236\017\000\351\343\235\264:\261y\004\326`JX\014\001Y;;\"\030,t\366\340>\256\374\345\352{V\264E\0348\2102d\010\211\210I\360\375\2332\277Y\3735\332geV1+s{1\370\036\361\314\353\335\002\247\023\332\214a\366/B?\226\034\203at\341\302h6\033\255V\242\021#D @\250\252\326\242\013\027D\263\231h\034\177\376\317\356\357\364\327\030>\006\013\337\302\315\203/j\211X,\377\275\372\325\375\267\206\257\201\302/\177#$\237\304\"\221V#\020 F\336\217Tu\244\323\215r\271\321\336#\034\234\021\005\n\243VK$\022!\332\355D:\235\250C\007\021\34744!\021!\330\317^\370\027v\376\316\354\363\225\021nt\273\215l\266\221\216\316(6\212\211>|\020\361x\242\333Md\263\211h4QNN\250\257\350Gq\276\007\320\345\362I\2618\362\243\311%\177\3047\276$\357\007\225\223\217F\202b4\232U@\233\324\212\330\302{cF`\232\350\266\323\216\0364\022\333K\223ru(t\214@e\304f\035\332\257\001\023\374`\344\227\331\374\341W\361\013ApU\261\rj\226\305~\n\370A\256\220w\261K\334\202\202aN\350\355\337t\276N\354\223\300\017`\352g\352\250]\210\210\264h\303\006Q\255&\262\261\021\255D+\221\004\020\250\304\010\017\337C\377]\302g\311\035r+\256\225\300\021'\237\365\226\234\3768\323f\337\006(r\222i1\203\013\343\273g\034\020\302\317\306\3070\254\377^\367u\374\363\375\367\206\277\201\347\363\310\276,\346\223\344Y\000\017\241\344\223b\034n\214oA\025\352\323\334\t\n\325\033\214\266\250\2441\014\224\202\034e\212d\004\200\000\200\000s@ P\240\350D2\244L\327Q\017\224\350,e\247!\221(\034\204\321\014\0032\220\002\020@\000\020H\000\004\004\000\004`\000\205\201T\265\257\000@\340\226\247\026`L\"m+\204\323\311\230\013\332\312\341(\177\2537\232b\365\003QW\363\024\266\245\322~\256\204\335\370\212\373\246\365g\217\005\\X9\272y&\2422\314\214\355\320\302_\354+\250\016_\217m\306;\023i\246\003L*X\004R\276\237\031\030H\367\304\251\323\202\332\020\334\006\337\236\377\233\356v\201\255\222e#\244S\026C\003L\001Ki""\232\021\217\017HuY\017\311\213C\2225I\211\334\022L*\255I\314\212W\252I.\3542\342@\223\313\260Y\315-\rO\350\246\255\234\244I\004;v2\361W\273=*\017!\006+M\335i\017\n;}o\344\347\305c\2348\300\320^<\365\2119+\\5#\277\340om\243\273\257\311\020`\255M\343\270\341\336J\324\347\006\371:!\3605\372\177O\256\342=\002\253\0225%\000VPp\351|\302C\267\006_\345p\024\336\035\317\244\263['\000\021G\325\314\026\373\223$\033\245\350\334p\366| \343;\200\n\250\001\245\356\230\026\316\236M\246\0162\275\304\370\246@\027d\315\315q\302\334my\014x\336\030\346+\013\254\224\243\014\026\244(\307\345\233d\202O\230\213\367\003\001\216\261\351a\306\026\013\177\264W\031/t\021h\345,\301\217D\231\215\217\235\003mX\252\323a\332F\262\314=\316g\230\372\033\2070%\231\204\202\010\217cr\230N\237e\261\227jw\255,fe\323\225A\205\323\334\233\261mw\355T\177[\030\177r\3452\347\255X&B8\016\363qY\007\340\265\347\224\364G\221\331R\022\370\337qgGq(\226%$\206XGd\357\351\323\204\254`\t\304\312\247r<\217/\370\240-\221\026\rahM$\357v\2505:\005mK>JO\276\353\320\304\031\341\t&\351\225\344A\2760Q\250\344 \301\335\217&\322\251\035\251\365\227\314\211x\375T\227\242\334\322\260\000\311<\025\231\265bf\304\"C\357\311P\204\225\013\312D\206G\275^\"0\305\006\304\373\014\036;\025\002%\206(\235m6\206\\\033\211\312<\320s\272\031\231p\304\023B\331D\333T\312\362\234l\263`qp\t?\314\377\337\014\300\001J\353\302\373\277\236\253t[F\311\003\005%\324&tl!\250\3150\350\262\241\256\033\215\324\030\261\321|\310Q\202\005\360\22470\200\260\275\215B\210}\t\344\320\n\002Ta\315KM\032*^\247\355\321\204\322Z\234e\202\022,[\204\\\273F\331\225\201\032N4\307\033\260\346\217\222\231\253\3210\031iV#\370\362\001#wZ\n\263>\261\371\346>(0\200\246\365\003\355\357\323\253=e\217.\236(\375\210\363\033\302\210\324#\345\315\345\214/\354\264\225\225\261\312=r\240\247\360\305\006\2058\265;\177G\3640\344\255\366\212\353c\332\350\230\035\037r]\313\377\005\312v/:\347gn\304%\3719\357Gw\333\210\t\356\327\226\325\350\tY\220\342\327xh\271x\032\257{e\010z\305\225\006GB\273""\235\035i\344\321{\270\005{`\316?P\374\213u\346}Q\343I\262\315\233D\366~\034\237]\322R\205Vz\230\334\222\246l\315\203\267\020\031z\256\225\031\263\021\201\332\027\324\375wn\302\031\336\031\256\362\235g\350\362\020\265D\343\260\021\365\024\237\221\322cb,/\315\374@\337\243\007i\274\211\377\nc\306\366r\321-G\002\202\323\374\035\332q\242\234<\0039Lh\022\331\2754V\227!g\034\343y\330d\367\230\004\036\r\274\030\304\352\213\221\375Fd\267xZ\353\361\246C\211\367\323\377L\266O\377\034\223jk\177+\014\372Z\016\207\322\316\255:#=!\032\305\335,\264d\271\3670\"%e\247\025\241l\267EA\312\341f\226\221\\o\344;\343\025\272\327\272\330\366[l%\211f\305\277\005\241\371\215\004\315\305\244O8\260=\33511;\273#\306\372\n(\212>\337\273\037\213\232\036\230\362o\262\303\254\275&~\247A*I\031\021x\032&\275\033\222g\004\320\001\023t?h\262R\326\344\037\226Z\361\246\301\nX\376\252\256D\010\347K\252\002\325)]\214\231x+\3722\344\021\311\263{O%\222\232r\013~\362\037\026\316\001\305\000\246!\243\335\251\242\017\330Sb\036\006 \275<\010]\265\303\324\032\241\343\275\300&G_\t|\322\031#\246}\227]U_\035\3752\323\037\025M\276n\356\232j\301\\\373\354\274\025\332\366\340\372uM\210+\014\317\236\031d\313\350w\372K\032\330`\200\242\000\027\254\366\274k\361\306'U\t5/\003B\2534\251dgO\274b)\305\206\021\226?\377I\215\2344W\276\232\010@\2145\373\234\365u\354\375Ve\376\\\033\214GO`|o\210/\022W\007\307\034k4PJ\366m\337\226\312\204\273\354n\002\353m\312\276\003c\333\225\271h\205\227\235,\244A\245\n\323i.\2024\273J\261\246\206\357$#\257?\364Y\t\t\205\346\222\211t\024Y%\340\265\267\276\rXc\027K\357\374>}\202M\256\031\257\026\373x\270i\326y\017\363\331\212\316\351U\245\265eqT\217\333O\233^\236\35280\321Xx-\177\013\356\t[\031\252\020O\365\304/,\333\r\2665\341I\r\263Q<]{\2035\215\223\245\220\007i\245\276x\245\005\355P\346\342g\026\247\374\241\262B?3\225\362\222z\0244\305\375\3052\350r\335\254\326\031\213\365M\246\234\342\031\363\036\363\350y\215\362\000\305f%\213\357\200\356\377x;\360\324\022p\010\016\347\272z\364\370\216\252\3526i\014\341!\262\t\3057H\325\036+;\000\017\231\\a\253\365\037\253\371\026\353]\346\017\251\315\306\215a+d\3023\257\314\373\220\205\034=\274\226\267\254r,9-\251\377\004\\\252A!8\334~\t9\360 \347""\322&A\377\341\261\365\227\002\013\360!\032L@'\316\240\306:_\017F\240Y\243\306\253x\245O\321\034\2637x\207\034i\255\337\266\030\260\346\363\016\321\222\366\203\t\264#\316\360\007\227\253\">\320\356\227\326\030\230\025\357! \265e\020\333J\261\2708\316\277\351\326r\025\033`\377\243\325\223\342A\304\373\360iT\177\2344i\266RH\365\225x\334}\250\375\254\343\034\264S\261\007\265\374\016\372u\270\317\373\031\321\332\240\323D\323\201\201\266\233K:z\277\371?\223`\210\353\315\357\003J\001\301\267\275\270\277aj\200\031\225EX\330\306\311\027T}~\032A\273\276\177\333\301\331\213,\372g\024fg\272#0\017\034Y\302\317\221\357\025\343\023\2210\325}\035\357\246\244\227\205\326Z\340\250\215\373e\224\024\246\276\212m\024\361\307\264\325\2145\271\242\255\356\247zq.p>\001\267L\215\352\200\341\2442\346f2\372\"n\206C5\264\302\352p\361\311FM\333|\252\227\365^\204\tgA\240\256V\330\340\036\342\370)j\030\375\033\220\220`\035\211\351\017\226h-\244\246\323\336\355\276\235\336\237\205\033}\245\372\017)\207\212\030\316=+\272\027\351\235\201}9\260\3324\360\035\nW\263O\371\334E\212\255\224(B}\030\001ux&\0258\256,\240\036\020{C\330\234\310\372\236\262\254\025>\025n\252\312\212)\353\002j\224M\370e\316\216}\266e\323L\347\220\001j#^A:@m\010\224\035\3271\335\360r\255\205^(\320*\304\330\002^c\364\371&P\0253z!`\3447\005R8\271\"j=\235p\310\233n\354.\341\375D\263\351\305\014u\304\365:j\323/\254q\313R\300B\003\350JU!\202Y\037\261\341R\254\0144!\323\002\237\246P\377\200\312\364Z\"\322u\223\3651\356\217N;MR\343\017\313\271 t\377\\\2231\225*\001\220\027\031\231\3271\257\344\004\221\340\227I\225X$\365^\334j\001H\211\002\237\013\204\315\325\003\302k\304\204\313\333\277\3109\376\036\232*\365\337\304\371\211\253\322\323\025\361a\322\003\323f\034\322\246\342\330\035X@\352\335\220\242j\013\371;\347\035\274A\t\0220\315\351t\334M&\00420\343\007>\261Dt\2324,L\036\356\240\213\324\300\342=I\005\367R\226tZ\247\004\021\366\037\020L\020\345jt\016(\365\\{\371\270\311<\034\303\240\272U\360\351\017\301\331y\022\006\024\372\004\217""\2442\306\206\360\247P\261\200\032\352\361\004H\362a J\316\356\n\234\027\265P\010B\n\204\240\211\035\307\206\376\265\244\341n\272\313R\266-\353\223R\262\245\341e\2777\\\r\206u\261\316\331K\264\214\026\273Z\200\022QH\315\301\227D\357%\221\351\247\3117\030'\177\331\353;\022\306\232\343\224s\257b\312\300h\304`\321\315\031\252\363\2770\340,g\311\"R\236\241\233\267C\tJ\"j\251\223\032`y)\373\354\365PH\3042\373\025\231+\245\215Ddj\274pz\331\337g\376\007n\350\351\244\275\257_\213\317n\311n:,\202+\247\252\025\010\222\215@\365\273\213:\274\246\022B\327u\325\301\353P\336\010\234+\210k\024%=\342\201\323I\035\371pJmDt\357\321\267\223\351\017\214u\224\203q\022\336)\240\305y\202w\026t\234^\373\324n\275\367S\276\356N_\031\220\222 \362\016\370\201\246\224\033\276l\352\006\254\355\256\024\260A\262\240\330\373Y\350\373\007P\026\274\323\244)E\025\275\226\336\352n\227\343Y\361(hX\037\276\241\376\212\272\347\235\016\200\366\206\323gZ\211\256\037/\225\3461\365(\026\275\014\217\266\337?\372\245\240u)\0022\233\375\375A\032\300\246U\301d[\225\356U\332\367It\334\370h\256\225\243\"&\233\322\025x\024<\353&=\035\0104\032\r\224\265$2\000\\\201\025@\305\231\321\311\334\301\307\227\210\306\310\316\352!\3152\305\231M>\256\034U;\322h\030}0\236\300s\024\261\234m\320\203u\362\256\"\202\361\372\333#@\032\244e\031t\262\264\036\362\230\217\025\206\0256\207A\374s\311<\200\372\270+ZA. \365\220\353BW\352\370_\227\0139\351\231\344z\320)\211\351\034\033\266'\310I\313w\214+\316*=S\242\364\227\234\212\257fC\272w \346\242\204\243\335\276\224j,\253\033\373\035)\324\326\372\236.z5\226@r\343D\311$n\342\366\333\276\013\231E5\337\345\300\366\232\336\302Gsl\317\317\210\233g\351\205\024w)\234\021\232\014\320\361\242{\371.1\325;\250o\323\220R\347|\275\335>\232p\324O\274\260V)\341m&J\242\374C|/\357\372\257u\317h\023\257\341y\347\\\360\003\177o\";XiS\271\035\256\027E\033\024I\017\335\003\222!\222\264\t\203u\024:*\256\266\200\342\330A\232\203\317O\250\233a\210\364agu^)\237\350\236\277\373\320\270l\253\230\335\310)\257c\016""\000 \204 f\242\241\010\253\260\301\223\277\014m\255\221\232G\362\226\307\322\332*0I\354\243\314\253\370\276@\372\004\220\31452\311b\210p\200R\360\226\320J,\351\265\225$r1\014\324\361j\235\270&\354K\231\231}3\265\030\361hd\302\031\254\034\264J\206\333\246&\337T\330*\205i_\255\331\230\345\333O[\002+=\204\321b\023?\264\2651g,\356\3606\333=i\036d\373I\313\027\372\021\016\014\330Cq\311\302\242G\270\205\010I\356\010\257\360\203\001\233\rZ\256\243\231\354nx\227R\021\372;\\\026\177\021\007\312P\320\010\301\023DU\022\354k\220\227\361\376W$\351\374u\351dn\n\352fh\214\351^'\314\215\337\251\353f\206t\225\307\014\316V\017oh<\352@\364\200yTpk\357\210#XB\007u|\3705\205\332bu\001s[H\327\003\372\256<\tC\374*Z\276x\240\340\244qT\026;u\210\316\276\230\272\234rJJ%\223\312\021\272dn\255w\r`\201\"\300,}\303:\206e.,G\201\352\276FX\351\276\033)\350\343\232\306\362\347v6\350\315\247\005\036\231>#2DF\003\032\201\367\"\330U\327@r\246\370\247a\242r\272n\335?\371\263\220\033^\270Z\330\347$X""\335K\277g\021\232\274\036]\364I=\304=\266A\375\356\032\036\210\361)\212\214\r\260\300\032\002BP\014\264\0254\333\000\315\275\273\313\005\213p\355\213\016\263#\2533\363z/y\312\300\240\273\024\020\367\007\363(\354\363\260\220!\207\032@\351\235\004\035\265gNK\207\303\336\256@c\247\275\235c\023\323\277\214\020\347\317+\030\212\r!\367\377\252\t\031Z\307\330@\313\243X\233\2711vQP&\330\350\360\311\322\340'\204Y\231]w\027gK\\\360;$\372\272\226\033n\274\240\265\nb}\371\225a\220\243\224\252\224\235\327\304r1\230\257\204<\276\2313\214\301\246\231\004\206\333/\210\204\240\346t\232\271E\270\200\220\024\227\370[\261\210\234\275Nx\236\312ACk\277l\353\017D\n\214-C\312\201\374\001\212\250x\337\005i\335j\322\306\270\357\312\270\r$f-%o\025\221\311j\214$\366\351Qb\300\315^6 \024>dpP\017j\344\0039\203\377^\330\031\234]\313*&\016\252\230hF\232$G\357p\236\255\231\207\232\302\207\005\347\217\2263MQ{\326i6\323\361&[Xf\220\375\303\035\3322\000\364r^\344`\003+\241@?tD{<\343\013\237\223\3601\\\r?\327'\0104\3403.\323\007\020S\261V%\r\023\373\204\257vP\3505'\233R\032\003W\003\030[\276\217\211\024\001\324\007\034\326T\r\340\277\367\177\311UO\337\277$B\331\267\330\322\263\334\330_\003\330\201j)\305.3\264\370\304G\232\240d\256\274\330ikz\375T\363\210\270\374\026\206\277 \3614\014q\200n\027o\365\226\004\350\301h\016\024x\252s\212y\211P\350\024F\321F\211!\024\030\027\207\317\300\326\031\345\352.k*V\np\017\365\356\242\2322[\344\r\200\324F\033?\310$rs\251<+<\006\2231\222\307\362\367\033\235\233\177\255\013\300\204\014\022\004\327R\241\t*I\205\241z\202|]\374\024\031W\275\262\231\354\023\374\335^\r|\357Axni\036z\346\034\366\214\334\376\003\254\340\035\376\001\343ZY\216\217\347\272\323J\214\365\361kW\276w\252\320\315\320\355\005w\032|!\247\216NM\002M\255\\\274\000\351,\215\030p\033\213JB\201\333O\314\341A\010\237\304G\3506\216\005\313\272\354\247\036\002 \272l\202\201\022S&\033\330\264\374~MM\242(\037!\204N\"\026\214\277?i\231\357\267\351\257\327\r\373\362\t\360{\317\362\320\345.W\366\351\2048\223FE\304""\025\216\013F\0249\220\2172VRJ\007\300\352\"\310\2544\t\317\004\037I\030\316j\343\267\017\325m\214%\261\337\024&\"j\254t\017\351\307#\230\323a$\306Et\002\220\234;Y\032:\345\223\250_\016\270^\341\343\343\221\210\374\305\221\013\355\022-\016\323y%\277N\320\006{\326\340H\334^\005\237\352\006%)t\367@\233\233\2514f\006\335-xR\235\2671\023?\320[J\027\366\272\204E\263\004djgG.zT\031R\240\021\223;V\310\275~\003\214}\201\240S\373N\322\320\305\331\315\036\3600\350\024H(\344\257O\365p/\023\3103\372,\030G\262\320AW\r\365\371\251\013\217\345\240E\327:\021e\3633\373\021\350\245\033z=\n\037\365?\2135\272\317\013\207\204\342\2371x\352\367\023\277\010\016y\031\307 \3742t\003c\215p\302O\275\317Kn\352+.\234p\000_\300\306\341\361\3352\276\220 P\236'\251\327;\013%=#\252v\222\370\360\214D{\t!\256\300\255O\300\205\240\022h$#\222A\331\313\365\021\277\361\227'\306\263\322xP\013\232-\301\023\025b\241\217\250\002\3549\304q\3705\373\227lJ\263f\262\301\214\352_\360\341q\020\355\336\016'?\n\353\302\244\024n\346\014\370M\202\250\237\204\312y^\320\023R\270\363\010\271\373e1\230\033\010H\300[\023R\245\235\013\320Q\315T\240\022\334\273\032\354\236\264\244\256\321\222\321\"c\3254\033\355\213\2355V\336N\351\333\255\353\252w\314K\265\224\305=`\344\341\237,\216\2516,\177\363z \344\207&A\266\007(g]\244Y\t\037}\315\213\341vQ\250E5\322z*=\217\320\2439_#1 \313-I\221;\n\225\363\265^YU\225\370\\\2408R\212\212\325m\340f\202\201`\307S\377\232\236\341\034\220\\RUi\310\024^\"\013\351\022!\341\327\215\207\355:@\266#\236\013\311D\244X\t\314\233<\310\"\302\350%\003\242L\303\t\264\331\002+\224\235}\254\360\370\240 \360P6\0263\023SrB\202\311q=p\226\010MP\273\007O\223\r\254\033<\337MAx\023\342\330r\323\340\016\337!\032U\201\033h\213g\030Kk\221\241\212\232\332\237\261Nf\311\313\004\247\221N\327\3518\014\251uPW\351^V\221OHik\203\223\366\320%\372\250\237\274qnW\n(\306\203\301O\250\316\341\377\362%I'\274\013=\300\224h;M\027-\310u\207$s\275\220Z[\351\217\324?\242\350\335\205-8\321uh\350\0218\354\366Hd\362\217#\370e\03451""\321\007A\271\236\031[\316LC\273\326b\346\345\006\352m\313x\210\032r\272\357\025\177\006\031\222s\032'\253P~z\3742\211L\324\003A%\365\007\261\356_\301\t\256p\361\241\365Zui\2251G\030\335q\252\243\245\341\272Bh\202\312h\217JO\037\221\222\314\313\025\365z\322d\352U\334\245PM\334\300Z\322\021r\3730`\342\r\205\n\305F\010D\005s\\\266\365\315\354\334d>\177\021\326\212\217\301%\306\017\023\3364\036x86\212\0071`\321/\024\304\000r\034%\343i\037\000N\311j\311\340\002G\274\021\310S\"\025R\371\301}`\010.\3358\266 (c\312\013\\\032W\236]C\032U]\246W\372ui\353\251B\025\301\n\305'\2001\310\340\"L\t\272\321\3117RQEH\r\031\005\326\261!\342\267\357\r\235\262\315\311\3048\375 %\360\342\345X\254\355\272\244;K\251\235$\2157\230o\227)\335A\247\223?R,E\231\376\237u\226\364FY'a\256~(V\266\025Aw\r\2310R\017\301\0044\000\345[K\014}\264\251\265>\353\344Q\376X\341RQ\257r\017\200 &\330\352\032>\tU\253\377\307O\2068\337\376\014\224Y\240j\371\227\330;\310*\245\350\317\022\237\310\024\261c\007\227\325\025\217K\372}""\215\226\212\341G\264\031c?"; + PyObject *data = __Pyx_DecompressString(cstring, 11064, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (10435 bytes) */ +const char* const cstring = "BZh91AY&SY\262_\206.\000\014w\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`._{\332}\347x}QfR\307\320\003@Rn\347x\0357{g[\034\333p`t\323\251\333\323P\233K\325O\\\236\363\273U\336\\x'\242\274u1\311\232\332\364:\\\325&MV\233\033j\353\247[f\263\274\343\225\346\356\350\232\316D\300\n\367x\360)\346\024\000\000\003^\000\031\017\270\364\000/a(\204&\220\303@L\t\264M\032b&\001\032\236\2154\364\003I\243HzH\364\236\223\322=\023\324\364\3205=L\324\311\264&1M\002H\200&\200I\224\3214\247\251\351\352\236\322\236\n{Jzi\224= \364\233\022\r2\006@h\000\006\203\324\032h\000\320=A\246@\211\022MM2\232i\211\246\t\200Cdz\215&\231\246\211\344\365&F\362x1\023&*hf\220\365\r'\223)\266\220i\345\010$\324\204\022\0325\023OF\232)\351\251\220~\220\236\324jhi\211\246\201\220\320\321\223j\000\000\001\240\323#A\240\000\006\222\243M\030\232d0\21524\323C#L 22i\221\220\320\0314\000\3234F\200\r\032d\311\243@h\036\240\221\021\0014\t\212`ja\021\342\243\311\223\t=\005=\0325\014\321\251\265<\223\324\017P\r\0324hi\220\321\243#A\352yC\267\360\301\370\231\377\300!\264\020\304f3\346\010\3270\211g\\w%\tE#\201\262\344\323\013:\252\207\247\347T\021\025=J\247\357\372\266={\225l\267\\ \236\024\201\000?\247[\2140\364\273\017\254G\372\226s'a\021\204 \211H\261/\007q\225\030\034Y\2771\371\377\026\037\360\177\327\315\007\315\363:\023\003\217\224D\002\377\300%\007\211\200\240\005\000C\272\360\201\211\206\274[\227i\177\024\010\206\231\310\214\000\001\025!\002X\226 \244\n\0062\224\003\002\212\214\254,@\303\247\000\002\204V!\253\010\014\014D\010\300\363\310\030\3061\344@\243'1\321\354\316\375U\317u\327-\215od\271\363gxg`z\357\372/~?\357\013\314\3754\317\327\367\320C:\352f\241\241\240hN\247g\325n\255b\343\326mGj\304y1\307h\231\034dvH\343\265\231h\267\035\313\275Dn_\243\355\257\351\251I\237t\371\321\376s\347\354j\230\023\002&\004B\370}o\317\372#\203v\355\333\r\333wl\335\273v\355\333\273\236S\312!\261\000\332lm\266\304\002$\005\005\005\026\n\261DE\"\301\031\024\005\212A\006\020R,""\202\212\210\250\210\301D\024a\026@\0261X\"\210\252\261b\200(,PR\"\nD\001\000\335\324\352u\t\3249\316I\316)\"R\214Ob\2764\201x\202\340V\245\313\n\307\233\342\005\364D\032$\265`X\211\"\221d#\031\"+$D\200#\010\262a\2232oq\322\037\342\306\346k<\363>=\2222\005\230\204*\225*\252\215\t\302\034'\216N\ra\346$I\272B\033\202\033\225Q@\202\310\n\210\250\212\254\030\"*\253\030\306*\251\026@\022\014\204d\004\332(\014\246\200YH\325F\000\367\267\025\020\216\ru\324\212\005\364\202\251#\221\226L;\013$\003\373\246\333t6\206\3046\210\230\314\266\206Y\354\250\254-\231\205\"4\257\274\006a\006-!fm6\276\251\370\216\327\367\274_a\037>\004/\177\345;.\234E\230\345\325\254M\221b\014\343\343;\035>^\307.zD\213\260\336\220\343\335\325\315\\\340ND\207\314\010\"\254YQ\005\212\002\2020\214\023Z\243n\335\253z\003\241_e\254cX\335\320A\274\322\002\322\222\347j/E\306v\360M\r\n!R\244\221$\250\"\006\310^\322\322\"\016&P\227\003\207\213\006\203!\275\241G\240\222\313z\006\212\002\222\235\233\215.\\\367\3567\026\222h3\2138\rdg\004_{\311\343\020\340\2070\014 u\237=z\035{\251V\016\357\252j \014K\0169\320a\306\342 \316\rR\020I\013\247\346v\350]\016\300\364\255\357fv\006\204H\260\352h8\337f\327f\031\207\216\375ZM\006\2171}\341\203\215_\215\014\221\\\220\025\001\320\031$\263\032u\025\245\313\357[\276\005\342\201\271\336WA\261\030i&\013\020\222\271\247h\025\214cG\203\264)W\221@\2117T\374\350\326%\240\364\244c\031v\347qL\355\24288BL\271d\334\021\337\006k3NH\346 \314\354Z\354c\266|\264\027V\2231\262a\233c\006\306\313\247Y\253\260\033\010\350\315\272!\304\235,\360\226\020\006\0260\213\005\t\223\234\272\341*k\316/\206L\266v\300d\226f\026\313:\317c@\323<)\347\313\220M\010h\360\372\260v\271\271\266\306\333h\216\253\014^\340g\0238$.\020\377^\nl bM\232\300\261\203\260tF\210\\\371r\315\265\301\266\320\203G\305\317+`\333e\261E\252Z\235\331\245\025\251\3144\010\362\030O\013 \360N\004QG(*v\252FAM\314\272\264 \233\300\343\363\301\3028\"i\342\300l\254e\2742\337\241\214\217:\341\272\354\254e\342\030jc\301\372\3634]\263\2440""\214\037b%3\353\236m\244\264\233\266A\276\353Z\027\321\032b\001\320\003#H\376\211\014#\022\273z\250D\001\3511/\225\257\216\017\204\365z\374/\335\254v\236\2650\210*\333/\255\031\077\077\207\023\356aI\206\376\233\353\237\333\315\351\341\000\373:8g\237\265\352\351\017\23334_\227\263'!\313\233~\2066\274r\205\225\026\203}yd\217\237]G;?\316\266\304*K\016\314\336\006\371$\355\227\341\342\302h\034\217\303\375:\225M\3039\320\3611\245\252>[\342\006\352\035\331)\316n\356\347\375\260W\022\233\337\230\3674\223}\237\177.5/\251\233\360^D/V\310m\2332\323\254Y\316\304\007,\337\324\326hk+\301\\\206\261\037Ai\\\261xhA\3121\206\234p\320R\235\310\311\230Q\333\344\204m{y\372\332\325\014\241a\317\241Y\266\244\217\374?\300Q\267I^\227\0106\324\246\357\335m\356\2721j\214\353\215`\326I\376\010\365&\332\223\324\363\352\263\213\351zT\253\353\3157\\e5\342\222k\216\215\330\034\334l\266Kmrh\320Vos\023\215\360\\\355\031\276~\003\245\303\014\014\334<\233\021\333\\\361\226\326\320\032Wn\341Z\004\242?\024i\306\370\340\246\213'\241\036\376y1\233\351\323\020\340\267\017\352{\276\231\355\373\361!\352z\354yE\370?K\313\354\3753\307G\353S\326o\312\317\340\200U\003\356\372=\307\242\007z\314#\0001Y,2zK\256\267*\227\302\031,\276U\n\221Z\337)K\243\021-(y2-\200\021\r\326\234\007\304\221H\324\331\0232\231;\3348\203\"\016\013\304\273\222\022 \026o\245\362f\014o83sd\3255HK\260\323J\311\203|\273/\272\235\327<\215\374\2672D\036\246aZ\255\277\177\257a\353}H|9,\226K$\217\340\357\245\313\253\244t\353{\355\204r\036\312\030\374\366\232\t\232\206\234\r\361\266\333-\221\245i\323a\252\246\223#7\364,U\217\020\265bbf\307\277\317\325\257\363\373\020\224n\360:\371+\261\265\032\250\252\252\032\005\354\261\n(\234\230\243\305j\245\212\025j\225j\242UK\004\213\246\311?yi\002\224|\226\032\021\245;\236P\271\203\346T\nTYD\243B{\326\177\311\353\343\352\374\233\230\275\256\275BnTB\014d\245\240\310\242\244\037p\245B\260\312\206JI\223\365g)w\353A\304\251I*\366Q\2414\310\213i\373-f\274\231%\344\264\027\213w\213\270\364t\333f5\262[f\375\343M""\325#*\202%M\242\325X\355;\2437\002\371{\031]\262h\233&\001ur\360u\214\242t\311\255\325\213\010.\034\353\2652f\241\254.\365s3R\253\331\203\236U\272=\370z\256\354\013\312wvK\355\353\363~wS\323\333\231\234\351\345.\213\255\305\221\003\237U\355\201T\224CV\002\310Sf\230\026`,\t\231\3144\374\271\027\270\363\220\004E\"\030\210\361\211\303U_A\311\316\306\"\307\031\323\207?{\237\177K\010\366\036\311\243\243\273\330\262M\212(\275\310\276\302w\333\270\233\304\340\231\017P\323:Y\2334Q\231Y\033\265\211]l\243\032U\344\300\003;\031\2302\024z\246\340\016'\356\263\207\227\230\232\016\217s\226\335\032 \"\"\002\354\221\216\255\341]7\201\311\366\260,\304y\372f2eRZ6`\210{\353K\237\030\341\235\245S\225v\251'u\022\346\244D\314\3200C\211\254\221H\226H\355)\022W7\325\344\217:\r\273\226b\374\003\000\303\227k\331\301\305\264G\233\236\235t\377C\302|(9\210\001\3028\016\027\010\343}\366\rR\320\267\275\251\370\332\016\0363Q\004\315Q\252\325}=\265[lq\2729F\022\324\354:44\321\032\005)T~\377\276g\336\331\243\322\351\3129J\366b\254\224X\213B\004\236O'\305\024\302\215HU!\244 ]^\345\254+.\016\017C/\213\307\361\353\316\272\232\243\303\336\273o\270\255\312,\005\255o\361.\2601<\236\037bd\374\216\231\213\026+\207\335\342\366\305QT\317\275{\307\001\3237s!\034\302\244J7\266\345Z\006LReI\250\222\251\352\023O\302o\347\245\330\334\253^{%\222\304\226\205\342\\Z\373H\225\003\"\212\331E\014\255\315\325\225*P\231\250Q\244W|}\022?\004\351c\347\306JM\277\305\354\034O\372\244!\354>\003\362P\377\036\372\365\375\207\230{S\365\364\031\333\204g\031\037\255\302t\255\276\211\r\177Yv5\027w\346\346\022\371\177#\374\376H\005\231\2403C43S\001L\004\207w\214E;\251\214(\020c\000\nk\0173\016\342\215:8&QN\001u`\330.`\023t\315;\275\335\037|\235\r\351g\001\307\022\311\325\022\310\226\310\216\257\267\360\331R\2667\017Nr$\230\207\037\032\262Q\247\023\030\277E\\\237E\312\005\327(\361\206\334\367\215\232\024\025T\215\335Z\231f\310\247\351\215\374\027\371\032\260(/2x:\301Mgs\256\035JH\214\365\352\007\034\251CZ\323_\274\316\023\312\271""\301\362\315\344\304o\234\342g'\223\270\314b\360\201\213^\223\244\343\010\336\326\235\\\316t\266c\312y\3276\303E\264i\337*L\304\247<\354\371g\367\221#*\326\225\266\220\211LC,\247\t\323Kf\327\315\344\332Q\3459\030\316sby\351\nejd\331N\325\235K\312\370\261\006\035\356\330\274g\360\351H\322\366\322\017\206\2334\347\r\032yi\235\250L\322\217\245`Q\357\035\264\204\355] \371h\362b7\316q3\223\313\315A(\210\300\244\275\277Y//\224\270a\014&\276\316\210\376\014\373\3342\332\266\313\242\242\266\365\342\303\345V1\254m\013\026\251\\\246\210S\"\"\247M\nf\000\221b\232IBJC\001\260\210\2242\305]\232\376\275\235\217D\216\255on\315\231\017\212~\220\033n\312\310\010\375\022!\220@<\222F\220?\355s\312\363\235rm\361\0233\nG\246\211r\2035l%\200\002\341qL\252~\230y\257Z\245\265\025\370\t\220k\254T\336~\213\025U\345U\300\255XM\005Y\014z\202P\021\023\005\002\216\177\301>\365\335\032T\250\316%\213,\021%\313K\363&\004\301>\234&\351\241\241\014$0\303\017\2733>%\322\375\262\257\226\220\236\205\365\253\200\263\234\2209\352\031\225\201\004\002\367kx\225\230:\202=\236\261a\327S\254\372Q\030\337\233\324V\330fl\315A\367\203\274\035=?\323fggvBH\220\221\373-\226m\244\334\261-\311\004\204\231p3\304q\t\255\231\2320\310'i\333m\266\353\315\301a\3621\3465K\013e\215h\363\231:\375\377?\301@\233\231%\230\253\241A\254j\023\245\312(Q\376\247\267\277\314\315l\310\373\232{\253UN\306\315\003`y\373*\2224{@hz\232J\231p\374C_\225\032f\374\266\365\255d\361I\271\026j\014\241\326z\344WsZ\213\005=sl\220\247\321\356S\310\r\204\025\212\211\\\224\346\255VU\352\025\213\324\351\331\203\256\200d\252um\212]\021\351\014h\371m\342S\027\362o\256jG\374X\227\354_\225\024\003\263w\231\274\360\303\350\206\032g\216\217\231\021\000\325u\262\345\275\304\303\263\253=\0206\214\025\265,X\331nb\301\244\345k\201\364H\021\001\344H\021\007\220\026\"\203\275L\t\247\016\366P\372WF\345\032v\247\005Hr\n\"Ka\nx\251\3043\006\207\201f\013\004\317t\220\241i\3622\301\007\000\312\350=:\371f>H\361\255\000@\316-\374\\\234'GJ\364O?;\201\336\335\221c\247\343""\342F\302\241P*%-\243\331\355\365\010\024mZ[U\356<\351\245\035W\305\036\007+\030\312\365\320\250\325\207\226\034\274\272*uFS\315\216\267\271\317,\316|\273rc\0065\253%\243Ik+JIW\301\347\r&\261\300\375\251\266DK!dK6L\324s\351\265B\245fU\024Mz\307Ps\242\023e\214\221`\242\240\321\001\313\261'j\026=\231\005T5\353I\251[\201\316\034j1\263\017D\304\271\323\034\305~\333\260\352\266%\222\344\221t\306\237\240t\t\034\313\241\035\013\240KA} \200\007\316\3041g\355\326\256\256\212c4\312\342V\305\236\246\320\213\317\231\020\2052\2353\204\341\360\3474vi\026~\246\222\346\330l\350ot\330V\n\325\267\033\341\372\374\0108\003Z\326L\362\370\354Z\265\035\213\203\200#\351\275z\364\243c\361J\210\210\210\210\210\210#\203d\270ch\3757\024\326\204\265\256\240\3437-\313\214^\217F\300\371\203\300n;\303\310\313,\262\313\227\303\352d\010\364\314Bq11\014I~@\366\373\275\327\333\344\305\027\030\030\032=M\247\220\277r\033*\030r2)R+\021n\207):~BC\0149\376\035l\034\222$S\221\371{L\243(\2016gH,oT/\001\014#\020\340O\\I}0\035\216\342@;\272\254}SC!\203\224U\025E\302\353\026DC\r\322\335w\236\305\"\2176\016\343\345\354\301\220\243\332\301\343\334\273\033\033\034\372s\217\226\026O\261\234\021\027\031_$\261\263\330j\030\347G\331\306\245X\242\212<\336\375wi\237\211\320:R\352pU\031\374*:\333\363}\005\036:)\021\024\004\351\017!j\253!,\026\240\205\2558\322\367\013\225B\206\003c\030\211\001\374\277b\226L\315\016\030\267\347e\034\333\007\265\365\3719o\313.Y\374\373\374\006[6zSH\223\033j\322\"\031\243\227\232\320m\007f1\257\321\204p~\317\017\211\032\200\2433\264\r\244Ku\317\213\020\035\016\226R+uD\006WI\030\315\024`%-H\t\026\372\222\201<|P\266e\227\315\337?\255\n\337\2674\273\344b\267\234[fQm\232[oQ\203\n\023Z\261 3\224\256\254o\235\325,+nRa\346\323F\261-\2305,\365\001\301\314\020\304[5\005\030F\010d\007f\022f\236\355:R\tD6\253\000B-\212\224b\t\026\206Q\211V\250\362\2645\246\227g\002P\220~x.l\021T\213 B\030\3622\200\035y\201\244\274\374u\033\005z\014\204\216Z\262t v\236N\243\236\\cl\255\007E\3543\002\013\267\255\210S""\000i\001*\270u\262\331::o\252\"\252\252\252\252\252\212\250\212\250\212\210\252\252\257\0229\315\243\325=\363\305\332\370\tG\020q\007FBf\312+H+M\352\315'\223\217&\231z$\004:\375gn\347\306\327v*\303\031v\327&\256t\234\023y\275\305\355{\210\365>\357\3737Z\271\245\306\327n\333@\263F#2)\343\235Y\023-U\034***\251\373\252<\250:\312\324E8L#\244A\362\244\233lW\204\2028\305\314\377#\0106\252\231\217\321\021\220A\253\350i\005\tGP\265 \2413\024\206QR\211\352)\365\376!\204m\240\364Mi\r\366|\335\343\315P\006\023t\204\207F\n\243\016\021\226\2510\303\031$\224\\\364\355\244b\203d\233D-\000\333\326\022\354\250\263\260\276\t\021\344J\375\274v\366b\342\206^\010\243\346\366KN\000\340\323\310\301O\010#\036\000#\341\023H\026b~\343n\360\254\270\326Mz\215\340\273j[\317QS\350\225\333\304\"yf\322\266+\216a-\202\2738R1\013\212\361e\026R[m\203Te-\204\200\214\204\207wA,\242\244\3125\020\341\020\355YPgl\321\265 \2162Z\344\310r\231\013\026\177\n\363\363\246\001\307+\225\254P\322\r!\021\210\211\276 \370\030\001\256\315\274\013_?\350\017\231\220\031\246\2508\306b\004\377]sm\255H{\326\245\262\3409\022[$\001@\210\203^|\242S\211\207\021\212\212e\030X\210\234\221\316k!{D\322\027J\272\"Q\246%|\321>S8\275X\322\201\037\020\037p\352\312\201\361\236\213\017O\352!\245r@\273)\201\323\247M\327$\331\372\351+\315W\027\277\272\3240\353\215-p\363\001\304\034\253\230%D}]\233\274\257\300\300\303_\236D\265V\002\213M\226\nU\r|\264F\246\010\204\220D\3157:?\001\364`h\302\321\006\037[$\257Am\232ZL\240\025\000\215$\273\337;D\266\317'/t\355\327b\313*\252\242*\252\242\252#\000\025\201\0058 2\024\203\366u\353\355\255Zb\300\3113\2712\275\354QQ3\025!\344\330\316\325\331\"h\302\352\201\227\320.T\266\230\316\306\r\330r{\374qi\r\241\224:C)\223\240B\252\240\324\251`\022\213\002\302\311\262\031\222\001\275s\001\275.n\316\033\2673\021\206\266C\204\233\236\344\310\317\300\312\304\2229\321\022\"\204\220\252\320hi\"\256b\205\203\225O-@\244\225i\021t&`,x\353C}\327\244Z\264.\300!s\330\024[\014\222]Y\236\3722\271\\\0311\213'\001M\331""\324\030\224\253\001\263&\"\032H@C@\241&\001\r\005\305QJ\305\226\265\000\356\003\016\274$Ekc\276B\351!\025\302\215\"\tlc>*\325\311@\000\326\257\203\034\302f\025\225\336\314\222\013C\277\025\336\235\351w\213\275\036@\360\257Y/\\&\023\234}\217\031o\027\313\307\247\324\241\304\335<<\022\355\356\305]\217b\264\356q\305\256\225;\010\277\013\311\263\321u\322\254\257\016a\0107\302A\030\250\"\016Ne\233\020\243(Fb\376[\t\007T\202A \027l\\\270):w\005 \201Q3\021)D;\302E#)\340\250@\244\351\334\024\254T\333\336\201\232\226\tI\304*\"\031\255\241\223T\032*\343CC)\312\371`.i!\235\314\340d\302\302DI.S\224\215\020\237\000\3304\256\376 \353Tf\021\305\001`\002\006\360`.\313\254\247e\n\252\252\252\252\252\252\252\252\252\252\252\252\252\252\252\212\346g-\301\226\200\006\375\223z\341p\322\263r\255\004\212\270fi\000:\354\033\320\235\230f\314\256FL\3638a\244\001\240@\306\n\340]\326_)\016\371\231\367\222\312R\272\272(\222\025\270Xh\375aBlL\301]2\244\232\026\256\337\244l\211\202\342\014l\334\351B\031q\210(\n\"\260\003\301\241H$uT&\242\323\2233q\315\251\226y\000\207\205**\353\004R\317*\202<\256\"\220D\355\006\274W\244-:\367m\213\235p\266\356\001\227\236\330\325\001\351\3236\021f\314u\210Y\007b\025\035^\014\000\317U\310\371f\274\036\347\016\365jc\243\341\325\243n\357|Mi\373I3!^\360\301\"\363\0221dZ\306wS\031Z!\256\361\216M'<\201\244U\316g\305\334`]z\246\267\300\265\203\225$\340\274UZ$ \027V\325( \231\355\275\324R\nB\260\224\237FN&bu\312\324\027\243)\321\010\360\236'\207\006\300\342\226\316V\265\320\275\244\030\027\2266Px&9\\\007,\027\035'v\273\024E\266\323m\3044Y\262\352mxY\232\333\321m\244:\2757cCj\215\224\224\222t\272[\371\310E\366\341\"\220\361\350\031ugd\014\310\303\230=\021\220F-\276\310\"\301\260A|P\327\215\216\037\000\032\246%`\214\354oU\223\020\276\324D\245\316\370\212\005\364\276_M\035\024\014:8t\222\361\240/Z\340\211\323@\265<\257Q\250T\316\021\207!g&\021g\027\031\204o\352*\246\315\362\010\222\307\325p\005\210m\001Fg\203\326\323B\266\241#\317\225\323\243~\363xo\336o\375\215|y\371\232K""\020\037\004\n\004\0213\"|\020Hg\334\334\\#\252\273xlJ0\270\267\233\266\332\006\344\031\0066\243\2132\021Dq/\251~\201\261\325\n\202uO\207\205p\234!\303\302\274\307J\337\267\223\247'4Ad\352J)\032\na\314GwRb\0368\250,\310A#A\360J\365Gg\035\262\370\340\313\010@\203\024\242\005\2545\353:\344\370\373\376+ur\231\222}\372%\003\006&\036\025\320\224\005J\217\250\237w\004\222\034s\350\031v\3436k\306'%\335\270\207f\335\242e|\037\025Qs-\216\354#\334\260w\243U\275\317(\364(\226\267D(/c\250\016\220\021\223\007\236\210!\222\006\001\206\276\004Gd\03610\216{0S\360#\263.\360\325M\035\242\354\310\351\351\001\261\200\232\030\003K:\302\327a\323\243f\2227^9\243\344\356\021\216\350\310\206\267\"\210A\205`\344\003y\312\327t.\276M\2222\247+v>\323Cu\274Tt!\\\305\3401\232[\216\275@\323\316&\004$\306\331\344\363\275F\333\310\371C\277\260\215\323\367\006\234\t\230l\371\337\272\034o\034\255i%(\374\341vGD.\363J\301\n\315\036\031\221\325\245}2\322Z\023d<\333\302\205 \250\214^]\311Z\222\212\010\365\330\213RU`&\014=@\365\017\\7n\365\263$k|N\373\305\343\360||\210\016\323\271\301\334\367\237\035\010\304\265\000\2503c\026e\261dx\263\236$\217\024\003\312\354q\363o\243\031\024\360$\010)\t% QJ\312X\021D\210\300cU$\235\345\274k\323.\211{Q\320\270\035`\372\204\322\272\300\235\276\227+w\244\255\"q\212]\0019.Kb\020\0206\233m\266\230\331\327\004\245(\201\223\014@]\001,\221EDF2]\013h\303\224.\261\035\\\2112c\240\241\204\017j\330\357&\274W5\221\236U\314\225\310\303\353i(\2502\002\033b`\032Z\237\271\nP\345\243\233_G\274%\334\260\271\356\347\177\312e)\014\033\267:\032&\t\312\r\256\350rO\024\001\021\007\234+s: c/\204\271\316\203\242\365\263\274\375\023\232\366\240\004d\322\002\030\022\326-L\262B\025\320\341\002\215\316\020\3459p\000S(2j\\1\026J5I`\251X\023\263\265\312I=\226\030\310E\026\010Q\t\026\240\033\364\261\315n)Z\220\257\001\217\333H@\257h\0204\2210\020=\211G\307\r\261\026\2615\002X\301\036C\241\323\356\343\242\321\235\256\320\035\370\203\336\252\366*\334\230\247\027\"\212*\212\242\250\247h\221\222\366\221""\250@2*\2137-(\340<\250d\\\277\021(hjq\034\210v\r2&d%\220\000\357\010(2 \223eo\006LR\\@~9\300\334\321bMY0\010\n\014\221+\324A\2406D\320\021\347](\031\230dZ)\346\\Jj\254\201\014A\304\211\010h1:\353\304K\310L\353\024B\325\224\233\304\341C\302uUTQ7\373\363\247}\004#\357\256\265M\244\363&\301\266\2046\024HPp \340\305P80\352\242\242\252*\320\230\301,]I\214[\010\027\201W\210\327(\242\250\022I\305z\335\214\252#\360$2\262S&\354\254\005\373\373\234\232{\224j\221(U\021^\370a\346!\331^\256V\301UUE\025T\240\302\274{\026m{K2\301\007R\003\237\211?\034t\326\200y\254\027j44\220\332HG\205\240XD!\000T$\234\366\301\251&\366\2766\251\036]\004\206\273a[\304\226\r4\214\222\r@\261\004\016\030l4\243\243(\254\225EfL\314\003\211\000\311L\\\247\362$\020\256<\227\362\014.*,\024B\361|\210\016\335\374\367X\255F\252\3020G\270J\250\0267\n\214\255e\327\245Z\271*\210\250\363\353K\010u7%q&\246\020\276\211\244\033M\240\331\234P\036\002\201\226\271q\301\262\3566\362\252\362\233\001\336a\204\037A\23130\314\311\0262F\026Yb\221\204\023\033\213\027\235\270ye\374N\343\334\351u\003\034\324\252\252\253\t\355\023\257\206\233\2201\326\353\363\356\317\316\220\331\215\205k\320\340\317u\226\271J\311\334s\004\266\333I6\026z\251\220\264\235\020X\301]n\244 \343bl\256Z\301\224\332T$\200h\253\030\251\njK\263$F\030\014\333,\3430\305}\220\215K\204\334\200\357\263\016F\346\261\221\001\215\306\211\030\351m\027Fa\230c\332\226\\\262B,\215a\333$\360\004\350J\376\276\275]\026\251\265\261\250\360\266CPc\271\036\037\205\004\034\204\010\217\2428 \005y\341\002\036:\360\206\225\247\301@\020I\023\214]\316\205\346\t\3219B$\332D\334\306\251\274K\340X8h\206\302\3030h\203\030!\022\035#J\235$)\3642\023,cM\274p\341\030\240\200\200\203\021D\210w\251I#\021Hma\010\005\302\td/W\264\244\253\324!a\002^\020\264\004\352\014\242YC\262\030\256Z\242\3641@C\252&qE\273Ut\364+\010]\002G\244\221\217u)\312\240\234\007B\016\363\322\2314\231\204x\315\246d\305T\334 F\321#]_7\254\264Nf\230Z$\361\031\033H^\354\3170\314\347\223\3403\031cIP\210\201]\013[\340""\303\260\236\267\256\302H\345,\004\364\026\214\014+\020\177\231\302\346\306\2010\367\230@\351\202\346m\210`6LA\032\222<\275\302\251\"\251s\235\323\230:\022\356\235&\253qw\232\373y\364\221\331\356\311b\346 \201\336p:I\356\216\255\346}\270QU\326\334-\013e\346\303\271r\304a\252g\327\315\n\360(o\331\265ey\202\307\002E\213\030\221z\326\243\251,\272\261\017\201\r\257RE\310\370\331\301\016w\212\250p\206\232\206\271\322\323z:\241\226U\234\375\212F\236\202\362\312\025\253c2\002\356\353\250\262zV\004Fgtp\336\\\367\033\363\242\305/$\215\004:\252\325\244\203\205\347\340{5\034\005\272U\352\276\273Y\241\322o\2139\317\277\254\002+\223\224\231\327uu\356\014\336\256\002v\021\206Zf\367\236R\322\234\337\217w7+\226\252\274\241\221\233\241\367&(\010\200\322\035$\266\324\350\026d\200d\305\236T`\037k\010 \220\032Np\311q\370\235P\034\030\200\202\231{i\247\372Q\250\rY\244\325\227\227E\225\267\256\355^OL\001\200\026\r^\242\3127\216\017Ve\031\306\006w\034\243\246`\213!\"%\316\033VF\304\304\006jL$-G]\216\315\330\331\277\241\263]l\231Q^\\#\006\331\342\261\254%\001Y\025\003\022\030\341i\227_\217N\025\244\322\362\262d\243\310;\010\342\021\204gd\010\"F\344\367d\260\204\327X\024\022\002B\343\237$\027\253(\314\242\241\225\223\247\341\212\032Vre!\0354\020n\221\275\235[A\000\366h\253I\006\321\216\t!\230\320P\351g\222o\304\320\334pe.Ac\025b\002\310,\222*\222q4>C!`\332$\342c\303$\r[\370\027\327|1\331l\\\234MB\242\354f.\036v\024CV2-.\352\003\250\016t#\234]GP\272\204U\025E<^\226\\\207/\304\305\300\270\022A\334H\250oD\314$\254Hblb\023Gj\366Y\327}W!}\374\251{H}90\210d\2630\202\244S\342\346\361\336\216m\357_\311(\021\032\252\213\265.\236|\335\276pL\"\327\020\265#!Y\231\331:Y=\225\2363r\277\204\343Q\3545\0107/""\337/\212*\243\277\337\351\003\247\247\274.\367{\332\r\274;\301\020\266\2554\356@qR\311\243\226?M\021\014\266R5\320\342\\]h\357\227}\035\251\001\267i\267hve\324y\310\326\230\233Chc@\206\306\322\3624\305\233T\244\206\005\203'c\357s}\313\337\rK/.B\262\027\0215(\231g~\305\331\261l\026\300\326\033\003b\336#\333[\326u\3141\245\350\337,\016T4 \373\223PN\210k\332`\274\375\355&\215\001\234\361[\331\334\305\234bd%6\352\225'\201\224<\254\320\247\005\2552\355\351\332\323\006]S\302\254v\017\017H$Q\244\225\245p\017Tc@\303\334\361\000\202\271\326\214P\221\265\034\373\227\032H\204d\315v\301\025B\330\220\302\233\017h`\372\240%H$g\026M43\3112W\255%\000\223&O\313\030\243\310\334\375++\315H+CC\341\241JP\310+M#\177C\333?c\321\364\337\344\373\037\354\362\333\216\005\033\2522\314\317g\265*\356\210\273\363]\357\346>\247\313\225\210\251\364\341\023\2315\027\243\341\303\334\315\310\252\224\252\342\341]\335[L\033\205I\002\366&%\336l\270D\374~\310vo\343\">L;\251\204\023Q!I\002\023\2312&\221\0241z\267\243\315\367O[\370Y\243\264\333\265\225O\215j\273\005\275AqUd\231\300\360\371\341\340\371\357\206G\265\346\226;\3237\327\376\372\336a\305UjeV\247\002\034\021\257M\351\211~\317\211\267{\001\202\037\315\332\346\220\005_\307\357\374\024\n\014x_$\244/\361\370?\207\341\312\240d\322\226%m\0245\233\327\001\377\020\036`\373\303\357\373\036\251\366\317i\347\267)\377mp}\315\021\315\240\002A\002\341\003\374\325<\"\377\254\240s!\302\325\032\363\301\315\333\336\031\365\202\337\036\322fw\036\345p\226$H\366\306\201`L\330\331\251\336\250)`\315\000\300E\037fX,\347\320\343\340\331\341\340\360\202\2508 \355\246\000m\025\003vw\0346\007\267A\311k(.Gb\245\2303\372-\273\377\233\362;{{S\016ZG\232;\217\356\231\216w\267Zs\363s\231\030t\\\021\250\271\202\300x\013\r\273y\307\203\274\303\227\3721\034\335\030\263 \216\220\272\272a\353\0177}Q\217\033I1\213*\037:dP\366z6r\236\347\252\231\313\313!\322;\275.\026(\"[Q\227f\014\272\2516&\372\242s\037\231?\343\0223\255\343\214\353\"6Ab\335\336\342\346$\021\335\347\350vMeB@\300\352\232X\270\003BAo\304C\221\246@\3308\031\230m\351\346^\344\274\365s\300\202 \032 \367zs\344\001\231\252=Y\307wT\266\240\375\033\033\226=\256t$?1\025\322\271\373\2418\210\002\334\300\227\351\312\374\3359\245|\375\036oG\251\321\314;\323\322\344`\365\022nb\3024\357\232\206\272\221\035..\177\226/\210s\365}\226\343\020\0244\002 r\364\016e\311\320\346G\203\245\337\027:i\212\367u\363\365\270wz\r\267\243\224\236\351\276\344\001<\2708\025\335x\022[\2704\267\003V\222\007\217\341\331\273\270\270\274\352}\2227\016V\302WE\305\036\036/4\r\235\265\3028\307\222\277G\010C;\217\212qUQ\033\004_h}\201\306[\203\277\300Y\203\021\337c\260\0161\264\\\276#\277/&\377\303\223U\353S\203X\036\265y\333\206\377\177\364\362\362P\331[^9>\003\3629z\n\025\316b\214M\000\350\n\276\337\217\273i\365\177ZL#\223\365=mS$\246\345!\266\351\273\001\030\246\300\t\035\236\257\001\330\017\352=\376.O}\0149\010\026e[\203/\206\2042-\221\016\241\261\273\224\217\313\274F\336\373&\335\3026\227D\"\334Hqq\245.$<3\022;\357\245P\356S\360\357\371\303\203\276\026\371n>\0248\370\243\000\030;\205n""Q\360\24461\332\331\277\344\360\366@\342\245\010W\032\342\375\017'd+9[ud\007\":\375\275\277\224l-\336\"8B'\220\356\251p'\275\312\257\226\252\t\335\305\263\335\034_\220q\2028C\361r\327,\014+D\204\023\221\033G(\032KI$V\317G\321\333\336\201\366\200\341&T\316\340\373\013cv\347\003\022\006Fd\333\263\261\342\333\343o\377 \335\346\340\331\263cJP\342\351\362\2124\300P\337\374\320\005\317G\321=\036\357\245\335\365\274c\272\334\020\320\252\311-\2120\010\n\030~?O}\035\377\2408\001\036\211#c\273\360\3608a\2361!\364L\007\255\367\377\354\237\374\321h/K\231\375\217t\357\310h\363\220x\034\337\"\216U\347\356t.\230\321C\237\275\336|\034W\363\367`j\n\363\334\030\370\371\273\2309\327\230Pr\371\373\260\261\366<\362\212B\253\375\335\005\246 \373\335\342Jr\034\274\202\032\335\305\345\307\316\310\037\266>y\336j\013!P\220pc\313CG\207\221\036\350\347xNpy\361\005\025\376\036_\0061Ax\230\326\267\033\204S\353\307\214\037\307O\277\310)\335\306\3166\177Nl\177L\207\301\365QTVsqr\235NF//\211\257\375-\306\365\246\017\261\202\260\341\371\361\210\251\342Q\276&\007\037!\333\025G\000@\034\274\234\03761?fz\005\031\310\303\032\343\002\005\027\021C\312\234\333\354\346\343kQU\0163\220\215\202@q\035\325n(\030@@b\361n\230\273X\232;\312\337\213\342\341\036\337\362pF)\300'd\261\272\275\246\356\265<\2104\354\210\335\317\223y\233\252t\355\233l\3537\334\357\260@\263\263\343(\252\353Qo\177\\\323\322\324\240\225\033\322\366\3704v\024/\351\014\371F\261\013\311\365\251\2363\234\210X\361\333f\321k\200Z\351\231\3327\361y\232\3622\302W\021S\036\212\235]\033n\341jq\273u\370\032\362+X2\010PO\243\370\240\"\242u\326\036\371\211\016DC\366$Hz\254\214;\237\\\256\235\025^\355\016\211\354y\302+\025$'\261\333\2179G{\304\007\230\036Q\351\372J\"\017v\241\351\233\204\360\002\304f\270\314\031?\347\335\235l\333\265\361P3vO\234]\021\216\363s\212\251\341B\247\331]uJ\325\326\355\2069J\334G\223""\206\311g\306\232\356\364\0345\231P\003\322\ngj\212\276:~|\267ys\247\2757\313\314\236\003\212+~\371s\315\035\215\357>\237x\357\352K*\345z{^S\021\206\263*ee\356kd\311\263&A\"\nD\024 \223\357w\220\365\364\000X'trC\321\343r\243v:<\n\316\367{\300\035L\337u\027\303\315\357'`\220\024\271\203 \024Q\003x\202c\204\211\244p\374\027\3005X\260\272\225\340\322\003\222\200L_d/\3374\027=4\207\227_E{\004v\035v\017\322\201L>\231\020[\255(U/\207^\243\357\025\365#\\k}>\006\221\352 \20015L\301\265\302\220\247/75wws0`IzNbQ\0231\022\224A\221\016L3\221\022\020z\n\210F (\232\004?\315\370\225\345~H;y<\370w\277g\267\263-N\310\321/N\250\327I\245\223\236\214\243\225k,iU\2260\265\023\016\341\022\351\200\2131\344\037'\003\343\031k\265\275Z\260\320t\241\250\234\027 P\362\300\002\264\224\251]Xy\005\204\214\024*\021\000\007\267u\255yY\242\366\2579\031$\324\372^\376l`\020L\213\207\200\226T,\"2\306\252\340\202D\002\213\013.\025\204\t2\034\325\304\265\260\261$L\246\271Be\375y\030\243\016\247\322Nra\034A9\214\034+\252\220\214;\241(\211\214I\267s5\"\320\223\2462N\025f\215\212\024jr\341T[\250\232\005\305\340P\"\236\003\314\305N\247\036\\\300v\310|\300\207f\014\234\205\206`\322\262&!K0i9z\021w@\001.\352\364X0\304\223Vh\325HtgHP\240b\360\240\212\240\210\201K\000\270\267\025\t\030S\002i\265U\231u\027X\273\245Wj\304\013\245x\207j\233i\020ni\351\273u8\271eo\205\206\023i\301ai3\010\251\250c\020\344\213!\201,\201\016X\325\270\200\000\311\272\242\n\004\330\201X\214N\270\322'V,VERa\327\036?c\177\231r\256\216.{\376M\231\201-1\267W\016\273\276\023\2209;\360Cc\030\333m6\205\026#\330i_\315T\017\317+\365\273z\346\316+[\360\234\274S\240\332\270\272\331\353\241\252\340\226\001\234\261\214\316*\214]\267\377\213\271\"\234(HY/\303\027\000"; + PyObject *data = __Pyx_DecompressString(cstring, 10435, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (11328 bytes) */ +const char* const cstring = "x\332\325}\311[\023Y\367?\004d\022\320(Nmk\007\025q\214\342\334N\335\021\320\246E\246\2008tw\275ER@\332\220\204T\"\242\375\252\313,\263\3142\313,\263\3142K\226\265\3142\177B\377\t\337\3179\267\252RS\002=\274\317\357\371\371\330\251\252{\317\235\3169\367L\367\\\373~\340z\360fp,8&\205V\324LZ\216d\2462JZ^\211+\027\336\216\250\277^\014\305\343\201hlCI\250\261dB\r\244\322JD\211\306\022k\215\302\300H4\260\221U3\201\025%\020KD\225\017J4 '\242\201D2\023P\3431\200\2072\031e#\225Ay&\031P\022\221dT\t$\262\350x5\231\006X\342*}\320\220\201\325\230\022\217\006\316|\372\357\231\340\223\354\352\252\222\016\274\217)[\201hRQ\271?\345C*\251*\001L4\026U\324q9\036_\221#\357\306\321azj#\025\177+:O?\032\227\023\201d\"\276\035\210\244\0259\243\004\344\300\212\350.\263.g\00215\020I&2\261\265l2\253b\316\201\re#\231\336\016\242\025\r\"\253jl-AsE\343\350U\356G@\320dt \275\343\255t,\3033\027\000b\272\253\351\344F\253\266\212\232\211mPk5\366Qa$\304\022\031e\215V+\307\263J`T\207cl\006\266b\231\365@f;\325(\247\256\201\003\364p\225\306\317(\211@L'\032C'\263\031Q\315\220J\332X\030\310\233P\031\201\215)\211\3561R\014\224\315XH=\021\213d\336\002\321W\002\211T0\021\225\323iy\373\327``\"\006\272\305\0045b\t\214\022\217+\321\340\204\225\031\364Z\321\343$\010\277\035P\327e\314?\223M\305\305z#\333\230e\"\310\235N\202fY\254?\r\376\310&@a\264\302\253@\005s\010\261\n\3150\"g\222\351\373\201\321\021ut\322\000\273\036\000\304\330\225\300\032F\034Q\237\352\270L'\344x \213\205\022\001\036`:\001\342\223-9\035U\257F\222\033)9\023[\211\305c\230\331ZV\006V2\212\242\006\377Q\343\276\276@ \024`\356\343I\203`\330%\301\331T\006XA\177\311\225\3371\341\177a\020B\027o@4\346\r\205\215\020I\307V\210\311\347\344\2042\225X5\312R@W\220\246\345Q\216\236\"\330$h&\366L\224\366Af=\255( \034m\025%\221\tl\311\333\352}\301!2\2305\261\006\362\255l\203\257.<\235Z\010/^\274\242\327\2413k\355j2\036On\241\313\225m\264{/\247\261`c\2324s\263/\301\340\027fg&\245\251\231\211\311W\027\003<1\217\001\255]f\266\222z\247\252\265W*V\225\024\220\225Q""\004\273(\352}\364\226Y7\006\022R\t[@\211d\343@\360{\275\"\010\250\177\225\370`\3674\241\024\375\244\003\357\224m\001\261\270\256#\233q\200\271D\025\375C\305\226\205\334\023\213\344\t'\321>M\263\247?\334] \026\025\250 \341\227X\323\253\014\342\031#\375\333+\211@\260C\230m\001O43H!\025D_\217E\326I\025\254\306>@\304lfc\264w7\344\017\022\344\032\204\233\274\221\002c\3665f\227L\307\326b4\035\321\217\211\r1\216\200R\033(\301\273\307\270\202-\004\216\010i\230\036\204\250\300\221\200\033U\355\223\270p\261\317\212#\275\263,\361\025\004&\240\223[\t1\207\177\235\003\262\211w\t\352\375\377k\304\305\225\304Z\306\230/fcG$@\202@Z\226\006'\245\360^I\263\006\030\235\342\315FJ(\271\032X!\0005pA\376\000\2650\022\2758\345\3264\302R\310\246R\3114$\372\224]\025N%\360\002\3267D\230!\376\356C\332\033u\033\230\325\225\200\2519F#\243\244\024F\261N\322x\243B9\030\300B\025A\330\361\214\036\276`M\370\2224!f;\223\014\254\352FEp&\231Pf\222\330pl3\214\263\306\"\335\026U\342\220\266$e\240\333i3bP6,\022\201\271\311\271\253\267\356\335b\202\244\025\026\370X\330J$\016\223\002t tdc\361\014IZ\"L00\265\032\330Nf\003\tE\210\362\024\340\254\r \t\022\220i\031\026\t\243\254\304e\322'\222\320.\243\272\216%A\206\326O\345\270\252\004g\262\033\230\035\215E\314\2125\260\2304\014(\020\036\034\230\260\300\200\221T\250)y3\253,3]/\314\332(\207E\353\266\223\034\201D5H\031\216\254+\033\262n=D\003\341\214\222B\347\333<\010\224\312G%\235l\020}4\310\\+t \020\270\032K`>\222\264\246d\330N\221$\214\221\341\266\222\244\232\205\301\305u\264O\305R\300x\002\306L6\241\3632\241\303,N\262\212\r\\\275\232ME\251\231m\217J:W>\272\021\274s7\310\306\202\"\247\3431l\371\3002a\027\235&hS\350\375b<\275?\374\rO\262wh\267\220\024\356\2026#=\203\001\374}\311\333\236\310 \270\220H\215M\274&L\301\227r\032\362\201\355\375\300\205;\267\256\256\304 9`\254\263\371\302r\343b00k\010M%\235&{1\030\014^\t\374\020|\210\253\007\342\034\330\357\016\3622\030\263\237'\241Iv\260\307FD\307K<\266\021\323}I\326\021\252\020\320\253`\005\032\230${\300\2235\002\027\256^\270q\351\322\235\233\027\251-\277\005\256\006\306<8&\246\n\334Fi\273\262\223\366\360\021<\r\247\347\222\240\335\262*g\343$\266\240\311\263\021\222d\321,\357#\332\270P\016\357c\350V\222\"\340\377\014*\305\276\177<\312k\347\r\000Z\301+\222ao\244\322\311\367pk1}\256Y'\253\331M\306\207\302\371\215\332x\306]\026`k\306\253\336^\232XS\223\331tDy\2345%\0006n2\302^3-2\000\241*\007=j\205\"\245\036uw<\230\315\254^\275\027\n\217OM\031\261\204qC\005\231.z\363\232\240\211C\201cIj\tk\252\211\275@cO\2412\033\311H\344\233K\r\315\330\252\021\266\006U\355\rZ\354M\321\275\330\364-\200\205\260\2262\311=\200\352\261\002\211\330\260\005\034T\251d\300F\031X\002i\244\344\n\034\203\367D;\325\025\340q\025\270)\340\005\342F|b;\364>\235l\220\330\372\201\006\202\365\355\245\002]\3662\201\025*[@m:\372d\352\031\334\302Ei|vbrA\232z17\375$\2666\t\356\225\023\341u\330vf\313&\305\356\3454\007t-\252\031\250\233\316\315 \235Dn\ng\2450\200t\003\330\272:g\221\347\312<\200\274V\345\002\363\\\221\013\312\265\232d\022R+\321\230\245\343\333c\212n\010\367\374\2340brM\212msv\202\210\t7)n\276\016\0079H\255)Qa\030?\201\367=N\241*\010M\330\310\020\310a\321\005\312\325\006\"l_\036hp\326\273\221`\207\320Q\340UhC\200\035@_\276W""\241e\361T=5KqT\332\334\256x\252\253\300\275\034/\020\327\212<\200t\305)$\225\216\363d\332\r(\026\332\254\334\212\0007\214Xn\263\362\006\032< \254L\340\256\336]\330\216\307\223\331\350\\,\362\016XM&Vck\r\234\266\300eK\0346*ix8P\306\330.d9\221\204\371\267D\234\263N\364\355\302\243\023\177\266n\3652\357\246\026T7A\361_\321c@(\014\2200\302'\350]q|\002u\312\246$\271Ka\322\256{\225\013\355\344Q\016\215\347Un\330y\023\241\305\320\370t(\034\226\236/K\2633\323\257\245\305\327s\223\322\304\344\323\320\322\364\242\364d\351\351Sh\255\360\324\233\311\t%\202\345\304\365\207\271T\347\267\233\037< \\l\341\202q\323\327\005\342$\312\204\325C\233K'3I\313$\233V\351\335\3209\301dha\372\365\344\014)jifizZ\177\235[\230\014O\316,N\316,\275`\344L\306\343\261\224\032S'\021\177\340\000\362SY\315\314\245\311\236G\010\243!\247\232\024\273\021\324\034\320\205\247\246\2406\367T2]\026\366\004\244\ru\255YC7\236\233A\352\350\246\2603\234\001\373\200\301\207dM\307\325\307`|:\373H\357\322\211I\263fp\273\357\237f-\323\312\032\246D\276\256a\037\306c\357\024\n5)O\343I\271a\261\330\277<\250\342\254w\023\303\016\341\201J;\200k\361\216j\253(y\006<\"&\267\220\334\032O\306\263\033\211Iq$\330\244\330=\373\346\200\256e4\003]%_\2220O\247s\315&\024\244c-i5.\257!\216i\332\022dw\201Nqaq\330\277\314\0057)v\257\2459\240k-\315@\335\264i\006\351$RS8+\265\014\277\302x6\326\350,\360X\235\007\210{]n \2073\250\352\262\335\200\014S\373\005>8\265\025-\0231E\021,\025iz\366\331\263\311\205i\016\221\317q\204\334\034\302\263\320=\377f`\2565x\003\272)\343\r\347\244K\023(+U\246!\010\350\277\306\212\254\037\036+qT\273W`\007hB\201\351\344\032\205\034\027!q\032#{\224yL\300\033\312=\017/8\017Dz\2019\361\370\"\364JZ\234z1\031^\014\275\230{15c\371\220Sf3\353\273{\336\216Z\327|m\365\356y\332\252]\363\263UZ\311;\203iNNH\230\353\342$+f>\352\320s0\3146\256\002\323Xr\327\270\247\346\206q\316\317\003\302:I\363Px\326T]/b\037b\211Y\213%h=\266\260}\030V\240\243L\267\001\035\245\272\005\350(M+\2514\025\212\363{i\226\202\340Jt)\201Os\306\336\245""\036a\224fp.\2027\201t\343\267\t\240\023\311V?\3258B3\241]\005\356\231{\201\270&\355\006r\317\327\r\343\234\252\007\204\225\037\234\007\200\306\367\",\031\372J\313\033\202vJ\224\317\020,\253lZ\345\265\336V\300\036+o\001\316\253O\221\315\334\n\314\013U\315\241\335Hk\016\273\273)\210\326\252\362\024#\2079\022\314\376*\236\223d\373\332\215}\207\351ol\032G\261X\213\247\233\300\205s\361\254j\357\322Vb\357\326^e\351\332^\241cD\232\333\376\200\377\310\033\221f\020\271]PV\027f\227%\341\211,\204\027,\026\310BK\233ia\027C\311^\237\206\340\211\260Y'\351\271g\352\202\207\371\264B\307\256V\032/\264\266\261\026<\014+\321\207I\371\205V\266\227\323\330\334\335\354\335\213\275\353\202\021Ip\273\330\277-\014_W\225\341\203\204\247A\273\360\342\302d\350\205\341z\033Os\321\256\002\367\242\274@\\\253\362\000jb\237\270!\335\224s\3038i\343\001a\225s\356\352\335\367q\030\016\006c\034\033:\203\267\305\244\330\320a%\023\026\251H\317\225\355\306[\003\205\356\"s\017z\325y,\327\003\312\265`/\030\333\222\351t\325BX\373\247\007Y]\000n\242:@3\273<#\222rn\3360\033\271\n\334\363\362\002qM\311\r$\250\335\254\334\312\005n\030\301[\315\312\033<\347\001a\345\027K\nRc\255\273\256t\017\353\364^\345\356k\364^\341n\353k\266:d\274\006\033\311\257\336.\344^\275\346\275;\314{v\202\367\350\377\376m""\327\027\txF&\223$\362[\345\204Gz\237W\216 \022T\200\000\312P\361\250m\244\0136\253\264\365i$\234{\225\005#t\210\234\342Cdk=_\343\241$n\325\2734(\362\263m\225\330\304\224O\206\204D\316\333\265\265\314fbqwAP\277\304 !_\324]i\246\212\313\251\224B\267\203\220F\226\316\310\252\304w|p\302\204\001eu;\021\211%\261\3524\262\375(\345\027\201\363\r\034\262q%R\203W\220\365&I\226_>t[\211\255!wO\022\311\347+H\317\220VD\216\206\324\300\355\212\n\232\321m\010\316M\245\027U\212 \313\216\362\246\021D\323_\300\005\224\300G\237H\372\225\320k\2042\206\241\244$\022\276\n\035\352\003\307\252bA\264\345U\022\217t$\2566Fn\274\261\357o8\375\226bN\355n|\253\"< ~\325\206\270\217pZ@s\205\321L\036Sz\250h\217L\024\341\200\213_\311r\214\244\227X\243\177\222^\226dK@\022<\"I\224\335'\260E7g6TK\211\242F\305\311\261\330\235\215d\202fA\r\367.\266%\024\350\351\253MR?\220@hx\261x\315\330\217ew;\244\305\254)\360#\036\374\312\251\241\224\232\215\262$X#Jd\341\037)\246J\"\r3\232\335H\251\321\355\204\314LI\206\256\204\014fNt\306\177\202\335\004\201\033\031\017\336\301\030[\366\203SF\351\327&\364\207\216y\235q\\)\262\336Y\267\330b\210h'8%A\301\3519\377\227\346$y\212s3\036l\342\335!\374`n\220]F\327'\211\271<\254\017#]\333\262\311V\261\215I\330qV/\3770o\213$_Io\204UE^\274$\255f\023\021\272L\300\007\350\330\364\370\213\023\034\244\257\221\032\340}\262\273> \010\336\276\216\344\032\372L+\342\266\230D+\245\002q\373LGm\343\022\003\336x\335\306A\303:\016\021\371g=I\2703\226\036\213EcQ\236\2568I\244q\261J2\236\351\257`\032\276\230&\254i\375|B\177\2722\006b\tt\304s\341$a\263=\230\207X\335\224\276x7\2676\275[\267T\214\350\231\306\233*\241\032\017\272\267+\222\237\365\014h3!\306\314\016\020\214\002j\251\222\254g\2116*W\266\215mNE\031\010p\365w5\231\200.\301_\321\324|\021x\267\177\276\333\222\350\372\325\303\270\274\261\022\225\037K\244\016$]' \\\021E\326""\375\332\032y\361\342\244\216\031S\2226d\340O\262]e\302MW\272\346\212/\025[[\010g\200(\206\324\223\260\367\323Iu\203c\310\370\315b\362\370\263\001\035\217m\221\216\0214\004\204b\375\215\n-\247\013:V\250H\354\334\320\271\006\334\263E?\0372\366\273\206\022\2234\221j\204?\371\315\274\330j\\\202\306\326NmC@\t\031\325`\321$\362\300\211\224\320\305\357R2\253\261\325\244\324xk \217\312\250(E\341}}\202\374\0365?\266\t\211RjE\250\270T2%aK\321\345IE\022{\213\177$\035m\266\017\306\241(I!\022o\371d\323\000\355\021\211\217\310\251\030\341\221\337\327\225\310;5\273!\276 \247H\370\363\273\276o\350U\020\220\336\262\t]\3756\317vv\0006\311\254uC9\263Z\235\020\216\\Pg\265-\231\322Q\351J\022t\3267)w&g9\252)U\312Q\324$\177\307\te\013\3529*\233\244\2448\240\232$p8\241\234\t\026\216z\317t\003'\2145=\300Y\347q\026\357\000\261\236t;\252\\\207\212\256\372\246\347g\016\310\205\346(\330\005\217._\333Yo\217D\273j[\004k=a\255qM'\200=\232\350\250u\307\307\234\000\331\026\023\365\216+8\200\\>\267g}\263\332=\021\312}\317\301Q\357}\224\317@\3573\242\201$mf\345\270\220\370\364o(\220\345\307O2A\370\205E\227\360\002\0339\241\356\203\177\243@\371@\257\342p\253E\242\235\221v@\277\260\207\023\372uO\346*\375\276\260Csc\"J\nJ{E\301\0043\331tB\234H\222Ob\016\010\271\357qN\251bW)+\272?\310\2770\203TI\374\223\021\226\0026\336\240<\342\253*\233\241*\031H\214\031\274\031\266\274\345\326\246\207\327\317W\205$v(\245X\324x\232\005\026\325%nl\221\301a\367\016\324w\261\024\251\016\214m\032\354\204/\036\307r\005\017\337i18\375\304\"P\364\353\311(\341\010\327\242S\006\014yUj\226\257\263\242\353\354\006.\037\303H!\343\3372\225\214\034\203]A?\022\365\206\337u`\3214,\314\027\275\211\363\233\2730\313\204\225\221\341\\\005hJ\266d\361\214\343\302[\326\320\251\231\244\223\356\\\272\235\322\037h\232\205Yw\017\234L\206\272\311\320V\223\304\263\360\206t\347\256t\275Q\307\230\263\177y\202\210\302\206\301iXc\331\004\375\333\023\302\305\022\227n\311fw\031\201Th\232\316\206\243\240R\251\301 \364\257\026\220\341GO.\340.\205\r-\260hy""\027\227\375\350Bolu\233=\004\375\252\257d\\\362\225$\334\322\247\333\274\272s\313\315\254\357\302\322t\225\350\036\231\276\"\373\227\265\023U2\236\226\266\264;\370\207\211*\336x-\226Wb\035E%/`\353\375\007\272\032\255~\214\245\360W\212'q\341\021\352|{V\\\215\276\3246\267M\232\316\374\224\236\274\246\034\255Yi.\304\371POg\333\032a\357F+\353\037\260\210\370\205k\205\267\254\361\206\333\323\342:d\004\333\256\315\376\247\331\325\2266\273\r\320F\211b4\2776ijqr!\364dzR\232\236z.\222\310\302mz\300D\270\211j\233\311MF\201;N\321\346\021\250hc\267\274\315\341g\265\261\325\337\206\033\362\031\364\033#\002\264\251\220Pd@g\3246gv\220\304\371\345m\366$!I\217c\267\261[\004G\014Sk\263\245\361\351\373\264\315\226\316g\024r\211\024\376i\352\351b\333\223\331\331i^u\033\021(,^\033W\002\304\347\324\370\242x{:=\033\322_\351B\233xq!\260mz*\254W\316\204^ AoqinZ\257\232\241t8~\233[\230\005;\360kxR\007\267\000.\315Lq\356\275\376\301\353\345\217\366\266\257\355\265\316\353\345\366\362\321\362f~\354\353p\275\2637\347\257w\036\316\217\345'\013\207\264\223WK\013\245\255\262\\\353\354\326\272O\027\344?\373\333z\007\264~\274\325\372O\024\374\265\203\000\254\r])=\321\202?V\333kC\301\322\212v}\274z\263\212\026=\271\003\332\261\013\245\366\322\241\322\375\362R\005]\367h='\264\023\227J\303\245\033\245_*G*\0144\240\0359_\224\213\351\322\361\362\221\262L\323yP\031\253<\255\016\323\353\345\322X\351iy\370\353p\255s\177\356q\341\233\342Xq\272\274\277r\253\262Ym\377*z_i\327|\350\257\326\331\237\233\320\016\216\024\347\213<~Gn,7\221o\317\017\345\347\363\321\302h\321O\205\373rK\371a,\255\2537w\"?\222W\013g\013\363\265\236\336Z\327`.\226\377\202\206]G\363\261\302\227\222L\020\376z\317\321|\274x\261t\033x\364\327\273\372r#\271,\3207T\370\2654\\\353\331\237\273\225\313\240\257\276\301\\T;t\2654\217V=\375\271\231\302\271\302J\261\243x\243\270P\374\\\236\257\365\037\313o\026|\030(\214\302\333\245\316\322\223\322J\271\275\326\267\277~\320_;\212U\026""\306\265\357n\224\207\3137\313\362\237]m\335\373s\264\376\\O\276\275\206\021\257\201\030\346\272\377\354i\333\327\237\303J\207\362\023\332\361\213%?\246\321\331\375\365s>\254\035G5\255\"Y\230/(\305\261Z\357\261\274\252}\003\222X\013-\257\006^Oj'\201\304\032\026\032\325\276\271R\232\300\314:{\265\336S\205\345b\2508O`7\264\201@\321W\274\204y\313:Aj=\307\013\335\205\315Z\377\301|w~\253 \027\322\305#\300\035>\367c9\241Z?\261\331\263\302\255\202Z\274P\272X\036+O\020\215h\206\324_n\236\320\364\242p\272\270\211\222\375\324\325\307\222\237\310IX\270S\341\327\233h\365\264\302\014\002^\030\326\206Q\300\257\337i\337]+m\032\245hQ\323\231\305\250\275]\236'\276\306\"h\365\242\362!\330\360\004\330\255\275\356\353\250\371\366}\375-\1773/`\202%\271\336y\274\000\334u\003\273\335=D\001\375\247\257\255\243/w*/\347\263\205\220X\370\315\234\014\212\337-\014\027tzt\021=~\300\367M a\253\270Rj\247\271\337*\207\312/+:\367\336\322\016|W\370\003\354\036\"\276\346o\332(\300!F\377\226\220u\014(\214\024\0171\303\244K\207K\241\322\"Q\244?7\016n\233\002\275\242\305a\263\257s\3329,\220\021\250\235\240\375}\234\366\233\271+\000\021(\266\027\207\264\021B\303zE6\007=S\034\326\316R\341\357\264\303\270\267\334\177\265o\301\266\350L\353\007.i\332o\305\366\243\312M\003\252\361\222\357\312G\300\375\363\005t+x\361Vn\013\010z_x\215\235\276i\264\374\200}e\3148\267]h/\370\215\032\3728Z\330\206\354@\021\020\274\257\347\353\037\371[\371\217E\177q\024\342\2049T\001\357\204\352`\353\367\271\371\334Z~^tt[;xQ0\t\255a\265\302\024\351\376\372\t\273\371va\177q\314\nU\nV\364%\336\306\376\367\033\257\235\332\020m\322D%dn\246\303y\324\355\253\365\034\316?\342\315\351+].K\325\361\352\246`\324\205\334\027\320\225\327u\2509\244\220\240\214E<\013\237JW\313je\230\313i\3533K\020\311\357\224u<\334\311\037Eyga\n\242j\335\330Tw\363\347\200\311M\002\276Wi\257\034\255\350\350\374^\033\242\205\213wf\007\331\370\230-\262`?\234\377\2760[\032\323IZx\006Y:UZ\302V\0323{\300\360\324\361\367\025\177\345\274A~\321q\255s\000\373\261!\031\211""\365\007 7\367k'\2615J\237*,@\242\371\253BF=\200l\357\352\317\205r\313D#\226!\215I\022\321\262\340\332\315Z\227?\357'\271\030\327\276!\224\277\253\360\227\002R\201\031h\210C\250o\310\334\376\334\323\374\231|\210\270z2\177\204\320P\353;\224\037-\370!J\343\332\245G\225\371\312\273\035l\211\203\371\336\302w`t\310\346\243,z{\304\222\307!\213\372\016\346\373\n\303\265\301\003$\264c\202\307\210\\?\024\207k\375\220n\205+`\321\377\222$\3227\004i0\177\236w\345q\020#T\2307\367tW\255k 'Q\021\020\245\355\247]\332E\022\013\253\240M2_\377\366T\341\215\340\367\236\\'\2601_c~\r\223\314\356\317='\252\327zY^\030B\245\367\010\020\306\323\375\\X,\016A\264\366\r\344\026\363\337a\263\372k\375\207\362W\261\204\236\301\334;\254\031\252eP\033$V\332\254\r\014ZJ\301`\001-@:o\264r\274\352\327Gh\214\330\005\200\263\240~\310\243\006\030\036&\311eV\035\315\273\353\037\025\273!\223\373\312:\224\002)\271R\350\200h\325\001\007 \241\324\322\245r\210\207\002Z\240\323h\376\254\0317y\202\247\300\240\221\342\361\222\327\354l\210\261T\364i}\247\265\323\220\352\345\356\362\207\312\246\t@6\210mq\226\021{sC\332\300u4\330$\365\335G\330\372X:\n\305\320s\000\014\021\"v\350\005\275\006\177\332i\257\r\036\322\016\301\3660D**\201\337\357\n\233\330\310\367Jc\366/\"\325\000\203\375\\X-\266\004\365\304\177\363)\036'\336wN\357\347\235asz^X\304t0\246\336\013!j\024\004\352.m\326\233b\217\230\2226\350R\376b\341\0061\360\301|\007\033}\307xV\246T\022\232Q;y\005\372\346me_e\236\004\004}\274,\2630\205\254\353\255\367\036\314w\346C\371W`Y\026A\007I\210\236\203e\360Z\013NTC\177\016\222\004\377\230?\234\177\002\305\340\327\276\271^\356\200\232\356\"a\331{8\177S;z\271t\223l)\024\324\211\234\365N\222%\327L]\243\3678\242\215\220\314;Y\r\261\021\227\037\320N\221j;Y\301\367\t\2328!\320\370K\3638Q8\001\203\204j\265\023\230\263v\365\307\252\257\252\213\371nH\217\316!mh\024\254j\230G\204'\222s6\253H\027> S\356\025@\006\213IR\254P\237\365\036\320\330\023\366\024\024\035\240\352Di\300h\201\037*ilD\236\017mP\320$S\270_\\\204\2611Z\361k""\276+\245P+\263t\215\254,\232b\0066\025v\344J\241\213M\307[0\034_VnT\346k]\307\320\341C6\013\306\301\334]G\362\013\320\266\013\005U;s\003\226\257\217\304s_\356,\026\360\232\345E\3177\020\231\357H\362An\235,\334-\216\0243\245\037*\347 \266\373\250\253\333\300e\037I\3033\020\232\357\311J\010\243\023\350\204\352\241\352\215*\217\367\007\206\337,\355+\205A\313\033\345\345J\250\262\200=\3114e\022\232\363\354*\256\222MX\267\231\325Z\357\t\026\333\214\330S,\312!\365\036\210\027\213x\037\310\275\305~\000\326\2127\213r\335\004\321m\354P~\221\366\212\247\205\275?\367\010-\017\027&\212}P\252\304^,I\207\362\022[\254\220\245\227\260\301\016NAa\034\245%\337\205i\341/\235)\205\352\007/`Y\363\245\2106\366\244:L\276\314W6\002\006rL\244g\330%OIK\010Y\276\314\206>\030\202\026\336\203-S\247\037\252#\031\243\035\270^\356\004\017/W\236W\267v\260\000[\311\346?\351x\254<\004\013g\255\362v\247{g\263n/i\377'\035\337(\237+\313\345-\250\322c\332\334|\335^\344\377'=\337\"\265Z9V\335\277sW[\010\327\355Ec\377\244\347{\225N0\340r\365\371\316\226\366r\271n/\372Gh\276T:\007\373f\253\374\256zl\247\275n/\371G\310x\\\211\202\273\356\356\\\326\226~\321~\371\265\356({\371O\372\276V\312\300/zVyP]\333\021\024l\224\260Y\270\317\334\202\303.\323\205\\\315\020\024\312\251\323\206\361\322\375\365\277\330j\277\024O\227\330\306'\237\230\366\016\312U\310\224y]\205\235\245-Jf\310\357\254\301 H\0275\377y\355\004\003\237])\341m\222\335w\255\364M\371ne\264\252\343f*\377\246\260\371\327\3209E\222\261\306}K%\236\t\246>\004\357\341\373\322$l\311a\304~\366\235`\203\200\345\370\010d\346#""\n&\220b\\\314\263'\n\005F\021\233\020\311\347 \214\345'\272\303\372\033\264}\337\021h22\023o\242\360H1\nQ\373\204\344\364\201\034\270WWG\024.9\220\373\242\235&\343\365\262\320k\0247\330\244\255\260\237x\215\270\346\020i\036\263Jx\214\177\024\306\352\375\303l0\367\017h\003d\347\251\305sE\245t\253\244\233:\372\362\330\220\030\325F\357W\206i3\210\315u\017\270\377\271\270F\212\243\3048\035\003\203?\207ap\r\274;O\355a=\235*\260\003\324K.\t>i\233<\203\207\327.h\020\315\017k>x \177\236\023\376\356g\230fk\305\327%Y\224b\376G\363\363\365N2\247\201\331\217y?\374\226o(\326\202\331\236\202\246\336\002F\014\377Q\217\352\320\273p\216\320Cm\220b\027]\034\202\000&\377<\204aHu\217\231\375\017\322~\323\355\007@\324\214\276\204\322\275I\226\227P\270\226}\310C`\377\303\207\253\r\016a\223\277\205i\2572iV\312\276\362Y\350\223(\331\016\306\260,,D\304\r6_{\376[\340\004\374\364&\277)\366\320\210\330u\026|!\344\207qG9\360\323@\024\366a]Lr\237\010+\220l)\357+\377BR\326(\374\2660\003\315}\273\334\005\2356oF\242\006\204\027\225\316\035\006I\303\206\250y#l\325o(\200W<_j\027X\351\022v\247\216\353:\340\302y\0379\214\202i\3544\252[\351B\316\347\240\016M\222\326\202\321o\330\307\242\270\312C\310\235~?9g5AX\362Dt\014\231d\351\371W:\335\247\333\373\277a{Mjc\023d\002SYn\266\360\230\360\256]\243\370\253'\230e>\266%\332\320\001z\235)\016{\321\353wrzY\013h\335\247DX\241f\274GH\234\n,\263iJV\3316\214>\323\311\202\245+b\300GJJyL_!\0059\356\226G\312\264\253\021\306\244&}D\263\335\300\277\032\363\373\026L\036-\235\247h+\225\t^\243\360\227\021\337\271\317\261\334\341\302=\212p\036D8J&q\261Y\330WX\324\206\307(\316\\\343\305\303\267\"w\206,\306\325r\250\321v\r\322u\215\302ke]Y\264\353\033\014d\351\324\316=\240\000\364^\325r\006\004:\006\326\016W:\265\207\013\332\302k\355\365o\332o\262&+\232\262\241md\264L\266\241\270\357\2263\010~?\253>\330Y\203\tP\267\027\311\266i\024C\377`\006o\032C\336./B\310\215VO\356<\323\302\213u{Q\310\034R\363\237+Nh\027h\351_v\2420\337\366<:\035\",\227'+\207+\023\332\217\016\004\250""\232\372Q\373\370\345\317\266\266\037}\343><\306}\317\350\361\314\267L\217e\337o\364\370\315'\371\376:\216N\302\364\337O\362\177\357x\272\017\235\014\233\264\257:\272sd'\242\315/iK\253\332*\010\225\370k\026\362 \353\304=\217|\257xW\030 b\204\233\345[\345\315Jw\345\323\316\2506\277P\267\027\r\377\235\021\310\203\177F\261\361\377\335\020\205\007\244B\377\247h\"Fno\214\300\033\261\332]\375$\230\272\356(\013\377\033c\334!\rX\271[\275\274\263\254-.\325\355E\363\377\306\010\273Z\353\003\026\315N6\3670t\327\027\010\337\303\354\311\302n\377\231\235\342]t=d6\251\361\276\203\034UX\202\214?\\|\202\263\010\037\324=\202\006\344\225B\030\342\324c\221L\327!!Q\311\036\014\345_R\224w\225C\232>\303o\260H\206\021D2N\261\241\260g\024<,nA\304\337D\243 \371\257\rd\\e\261;\212 \317\263\235\261\272\275\204\347\327!\216`:\272\276.\346\374d\307^\301\342?\025\317@\036\322\334\021L\210\024\254\345\3329h\324\312b\325\302p\247\260\262`\271S\2735\2653\244\275Hh\2114\204\214\332>G\262f\316\267H\217E\337\n=V|\253\364X\365m\321c\313\367\211\036\237|\363\035x\314w,\321c\251c\205\036+\035\253\364X\355X\353\370;X\270\212\360\200\242\205_j/\337ho0\243\254\226\205`\374/z\374\334\376\204\006}b\210B\205\036\212\357wz\374\356\333\240\307\206o\223\036\233\276\317\364\370\354\233\244\231Lv\374L\217\237;^\320\343E\207>g\231\036r\307:=\326;6\350\261\321\221\242G\252#C\217L\307\037\364\370\243c\274\223\344q\347D\347\236\211c\301\257v\206\224\310\251jT\373\371W\355W\010\373\224\226\202\252\023\222~\202\2469\341\233\364\375\rLi\367\247IQ\275\322^\275\325\336J\232\264\251m~\320>\010D\205\250\337\020\372\245\345\373\302\364\010\373\336\320\343\r4\010\036\222\203\252)z\244\014\342\376A\217?|_\350\361\3057NX\030\357\010\323#\334\361\206\036o:\336v4\220\361\2602\001\247\354\330\316~-\014\232\275\255;\312\026\355\374\366\267\366\306\005h!\377_\213r\320x\247\013\231\342\343\362\220v{\2064\265\320\264\253{\037\377\021\"\307\331\3628t\352#\354\315\254\266\270\254-\003\3311-\006\"n\376e\371\256\371G\213\031\355\362CR""\377\202\277?\023\202\333u}\377\013=~\361\375\207\036\377\361\311\276\277\240\321(\334\235\205\233\236\321\306\301\017`\206\250\026]\323\326\336\241\247x\373,u8\353{I\217\2270'\3766\032q~7AN\311\377#\364\375\257\247\261Ws\352\177<\215`)\212s\303\273\210\024-\357\204\352\366\222y\241\004\227\362\0278\017\003m\266r\021r\303\017\340Xy\245\200\203>\375\245fqRD\310\340<+\273e\234\266\274*\352\335\274\246\343\2061\321\313\n\371\331\356^\350\3244\204V\317\020\273\340\370\324\021\304\315\177/\261\316\376\"\316\266\365\220\312q\0044nQ\274\207b\313\247\314\300E](\345Z\037\"\310p\260\277\016\347\207\215\031\351/\275\032\222#\370\210\265\217\212\352zdA<4\237^\007w\347\264\360\270\360\026(\016\226d#\215\301<\233\336\337\302sk\377\212\000\313\000\316\247\267\305\241\2228z\246B\340\367bi\010\2078\260\370\250\253\301\262l\216&\323\001J?\231\tGqB\177\216S\026\242\010z\222LR*\267\341g\366\037\324\016\006\370|\233G\240\230\333\030BZ\355\272\233xZ\234\206S\244\320\357\231\342CF\204\010\321@m\353y<\247\264St\222\234-OW\367UE\344\340\270\021TxO\371C\344\251\021\304\3732\223\004\307\013\034\327+\375T\016\351I\017gH\353\350\351\014|\266s\276\270B.\313X\345'\335\021\016P\210\360\010bc\231\342\035\312\364\020!B\356J\214\364\031\226\302q\222\271\215S\257\345\362O\"\215\300\013\254\2179\354\210vt\264\310+\246s+:\341\350\244\250\330K\204\022Ct&FA\262\3438\376\n\331\0169\020\277$V\345\014\017\370\377|\nCg\200u\357xjo\356$\230r\236\203O\310_\241\300\3471q G\346P\267\326u\224}^\342F\030B\013d'\326:9,\334\303\274\206\214\nZ\265\277\304\021\335\315\\_\376l\376%\300\267@\032:\002C\204\023\203\255\222\271W\270\303q\322\001\n=\364\364\346Nc3\373@K\212\333\034)\256k\301\037\310\375\335G\247Hg\364\030\315 E\256iuc8\273\331\003 \207D?\303\357^+\317\013\356\357\242u\032\221\235\220\276\275\364\223\323\001\240\222\016\350-\337\332\341\213\226\303\343\001\035\327\363\256\222\345\3423\216H\366\212\035\321\201\303\3160\334\302\233\210o\361\031\244\3215\016\357\220\264\243\035&F\375\000\036[D\276\214R\035\003""\337\000\361\207\270O\nU\326\366\017p@\025\357YA\r\376\316\373]s\205\351=\3348\247\232\327\303\243t\356\376\023\246\003\254\372Qe\016\270\351\\0\235T\275\204Cj+\203\251-\216@\355\307\372\023\371~^{W\277\310\252\320M\364\363\305^\016\251\332z\266@\2333\245uYgz\004#\177\017\337b\2514\312!\220\036\302\315g\212\235\320y\354\253\212\276j\234\027\213n\223@\251\257xV\370\"\226\356)\272tN;zI\244f\254#\332\3529\013\302\337\220v\204\342>\307\313\236\353\342s\275\021\221\006C_\221\374q>\272\350\022\207|~\027\362\254\210\322e\261v\214r\031\365$\245\007\371wE?2\226p\262\314\221\371\353H*|P}\007G\030\3616\355\360\365r\017\332\262\345\365\007gC\364\200\221\265\037\377\243\375\007\246yR\017\ty5\005>/p\326V\243%4\202vc\242:\303!\223\246\r\265\303\227J\027H\036YZ\342\340D\273\277\250-\256h+\221Vc>\246\014\000\021=\320[B6\320\341e\020vE\3131/\224z(\210fiy\027\352\340\336\2346\207\010\215\324\262\351E\242U\331:(\320\255}\217\370\016\260$\267\232\356\243b\017'\3354Z\")A\273\376cupGn9\344Y\312\246\020'\023zC\244\032i7\237V\023p\314[\215\370}\341'\221\245h6$\2751]\031\254\266\036\360\034m\325\222\265\035\262\013\265[?\355\014\302nl\331r\244\370\212O\241\033-\261s\264\333?\357\004\265W\257[\266\274Zz%\022\023\315\226p_\265G\260\232\327\265\365X\313\246\347i{\2246-M\241\r\265;\323;3pOZ\266\014\226\326awZ[b\303j\217q.\371\273\366\373\273\226MGIx\211h\206\336\364NY\326\356\316\354$p\250\331\212(\017\013\0378\261\263\321\220\224\373\227Jb'\244g\262\202-\352\346\233\310\241\034\323-\014#a\316\307\312\211\245\372<4]\377e\304\373\262\024\247\370\332H\254\353,p\244\224s\321`\323=\305\261\320:\231\226u#\241\202S\026\372r\027\362\254\300n\263\\\353\243\320{\337~N\357\325\223$n@\223\177\013\021\242\322\261H]\230\271$p?\344\2679e\246\217\014\255L\376\006R/\322\310;@\024\377@\356\023\345\200R^\231L=*8\373Z-Np\304\245a\n\230Y\ruC\3057R%nQ\256\203\347\001\333@#C\371\010\033\303z\026\304\017\024\0057\263\334\236Q\326A\355\320Q\221B\202\264,\3161\352\242D\266\347\214\375\256#\3026{O\231\200\272%f\232]\237*""#\225M\233%\246]\033\257\336\336\021IA\337rV(\254\302\373\225\245\352\260\275\350a%[\3253Vn\347E\362\221HI\253\365\035\240\324\323}\305\371\335\n\021\361\377T\035\251r\246#e3u\22589\234\022\230\272\300a>\316\356%\315\305\310z\215\004l:B\0001\317A\266\213\323\244y\361\271\001\277\205b\024\215\363S(\310\321\"7\207\002>\253\235\005\313b0\254\001\210\321\276\275\242]\201\270\247\224\004\266\347\264C\215Cl\375\374\360\202\260*\237Wu\007\006\324x\235_\245|-\262\230\372\3504\275\217\217\326\206(\213\214\022\345\305\017\2476\221s\361\224\370\235\222\037{\370\340\207\016\242\r\277\t~\355\2308\271\241\214p\257\022?i\313\313\332\345\307\025\231B\265zR/J\363\277\"\254\305\362|?g\033SB\220_$\300R\320\360\373\374\270H\2359K'\314\206]\023\315\017\013\313\246qx\366\265\2617\272\t\354;N\356\353\301I%\004.m\304\303\371 X\376hQ\247\000\273\030\204I\0307\343\332(\235V\212r\022\366>X\265\224\2274[id\223\353\235\363Q\336\241\3745\343P\376!6\216\337Z/\016r7\351\244j^\244-\230\363\252\323t\210\210\003\203\365.\312\253e\227g\003\366l\032\273\024\311i\265\000\351\377o\205\363\310\204\266R\rqQ\344N6\016\232\315C\243\021J\t\025\010x\217UmR\276\325*\016\262WL\243\021\371\367u\234\205.\025.\027\303\330\312g\221\001\305i\004\223\"\271\213\022\367\350,y\271l\236\346#\231^\254J?\214\027\333\034\251K\365\306+\321\345\2528\374\242\263\0324\020\347j[0\275\266\300\321C\210\261\236\346\204a2\357Dr!\245p\032\202\253?7-\366\350yj\215\214\273\356>\002K\223\363q\200\323\272\205 \371\215r\320k=\247\310-\251S\026\033;s\210\320PV5\251\312P\235\037?\353v\360\257\325sU\031\030C\341M\010\2601s@\277\220H\346\250\260\230H\006\335A\346V\244p\010\200}|\262=\017\211\367\244\310\311W/9`@a\351>\342\343>VY2gm\201\237\272\213Y\310\265A\277\336\376\001\"\323\235(\350\037\250\035$\347\010\036I\355\344\031\312\346\203B\016\336*\277\200\005\334Oi\003\033|E\004q\023\310[\312\241\247\025C\362\276\00757 \t\373\007\352<\253C\371\2263\022\"\036qrq\0170 n~\342\266\27546f\371\207n\244\333\342:\373\330-\307\2050\333%\324\300\245\013""\215kXW\002\372]\253+\001G\241>\010\337b\304\377\275/E\377z\310\225\200}\002\251\214D\377\214\316\036g\241\377\377\307/\231\215\305?SM=\\\324oU\315\376\037\324\321uV"; + PyObject *data = __Pyx_DecompressString(cstring, 11328, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (32220 bytes) */ +const char* const bytes = ": 0.3.1.1_AbstractIterable([%s])All dimensions preceding dimension %d must be indexed and not slicedAttempted to encode null for non-nullable field \"{}\".Buffer view does not expose stridesCallbackCoderImpl[encoder=Can only create a buffer that is contiguous in memory.Cannot assign to read-only memoryviewCannot create writable memory view from read-only memoryviewCannot estimate size for integer value 'Cannot index with type 'Cannot read state-written iterable without state reader.Cannot transpose memoryview with indirect dimensionsDict[str, np.ndarray]. Dill is not installed.Dimension %d is not directEmpty shape tuple for cython.arrayEncountered unexpected value for null indicator: '%s'Expected 0 or 1, got %sFor internal use only; no backwards-compatibility guarantees.For internal use only; no backwards-compatibility guarantees.\n\n A coder for typing.Optional objects.For internal use only; no backwards-compatibility guarantees.\n\n Encoding used to describe a PaneInfo descriptor. A PaneInfo descriptor\n can be encoded in three different ways: with a single byte (FIRST), with a\n single byte followed by a varint describing a single index (ONE_INDEX) or\n with a single byte followed by two varints describing two separate indices:\n the index and nonspeculative index.\n For internal use only; no backwards-compatibility guarantees.\n\n A coder for sharded user keys.\n\n The encoding and decoding should follow the order:\n shard id byte string\n encoded user key\n For internal use only; no backwards-compatibility guarantees.\n\n A coder for custom window types, which prefix required max_timestamp to\n encoded original window.\n\n The coder encodes and decodes custom window types with following format:\n window's max_timestamp()\n encoded window using it's own coder.\n For internal use only; no backwards-compatibility guarantees.\n\n A coder for unknown window types, which prefix required max_timestamp to\n encoded original window.\n""\n The coder encodes and decodes custom window types with following format:\n window's max_timestamp()\n length prefixed encoded window\n . Found dill version 'Index out of bounds (axis %d)Indirect dimensions not supportedInteger value 'Invalid PaneInfoEncoding: %sInvalid mode, expected 'c' or 'fortran', got Invalid shape in axis ')]add_note and apache_beam.coders.apache_beam/coders/coder_impl.pyapache_beam.coders.slow_streamapache_beam.coders.stream at 0xcollections.abc, decoder=disableenable' for the input of '', for the input of 'gc (got got differing extents in dimension has encoding_positions_set=True,\n but found fields without encoding_position set: ' is out of the encodable range for VarIntCoder. This coder is limited to values that fit within a 64-bit signed integer (-(2**63) to 2**63 - 1). Original error: isenableditemsize <= 0 for cython.arrayno default __reduce__ due to non-trivial __cinit__ object>' of"" type '', please provide a type hint for the input of 'unable to allocate array data.unable to allocate shape and strides.utf-8ASCIIAbstractComponentCoderImplAbstractComponentCoderImpl.__reduce_cython__AbstractComponentCoderImpl.__setstate_cython__AbstractComponentCoderImpl._construct_from_componentsAbstractComponentCoderImpl._extract_componentsAbstractComponentCoderImpl.decode_from_streamAbstractComponentCoderImpl.encode_to_streamAbstractComponentCoderImpl.estimate_sizeAbstractComponentCoderImpl.get_estimated_size_and_observables_AbstractIterable_AbstractIterable.__reduce_cython___AbstractIterable.__setstate_cython__AnyAvroCoderImplAvroCoderImpl.__init__AvroCoderImpl.decodeAvroCoderImpl.encodeAvroRecordBIG_INT_CODER_IMPLBigEndianShortCoderImplBigEndianShortCoderImpl.__reduce_cython__BigEndianShortCoderImpl.__setstate_cython__BigEndianShortCoderImpl.decode_from_streamBigEndianShortCoderImpl.encode_to_streamBigEndianShortCoderImpl.estimate_sizeBigIntegerCoderImplBigIntegerCoderImpl.__reduce_cython__BigIntegerCoderImpl.__setstate_cython__BigIntegerCoderImpl.decode_from_streamBigIntegerCoderImpl.encode_to_streamBooleanCoderImplBooleanCoderImpl.__reduce_cython__BooleanCoderImpl.__setstate_cython__BooleanCoderImpl.decodeBooleanCoderImpl.decode_from_streamBooleanCoderImpl.encodeBooleanCoderImpl.encode_to_streamBooleanCoderImpl.estimate_sizeBoundedWindowByteCountingOutputStreamBytesCoderImplBytesCoderImpl.__reduce_cython__BytesCoderImpl.__setstate_cython__BytesCoderImpl.decodeBytesCoderImpl.decode_from_streamBytesCoderImpl.encodeBytesCoderImpl.encode_to_streamBytesIOCallableCallbackCoderImplCallbackCoderImpl.__reduce_cython__CallbackCoderImpl.__setstate_cython__CallbackCoderImpl._default_size_estimatorCallbackCoderImpl.decodeCallbackCoderImpl.decode_from_streamCallbackCoderImpl.encodeCallbackCoderImpl.encode_to_streamCallbackCoderImpl.estimate_sizeCallbackCoderImpl.get_estimated_size_an""d_observablesCloudPickleConfigCoderImplCoderImpl.__reduce_cython__CoderImpl.__setstate_cython__CoderImpl._get_nested_sizeCoderImpl.decodeCoderImpl.decode_allCoderImpl.decode_from_streamCoderImpl.decode_nestedCoderImpl.encodeCoderImpl.encode_allCoderImpl.encode_nestedCoderImpl.encode_to_streamCoderImpl.estimate_sizeCoderImpl.get_estimated_size_and_observables_ConcatSequence_ConcatSequence.__eq___ConcatSequence.__hash___ConcatSequence.__init___ConcatSequence.__iter___ConcatSequence.__reduce__DATACLASS_KW_ONLY_TYPE_DEFAULT_BUFFER_SIZEDecimalDecimalCoderImplDecimalCoderImpl.__reduce_cython__DecimalCoderImpl.__setstate_cython__DecimalCoderImpl.decode_from_streamDecimalCoderImpl.encode_to_streamDeterministicProtoCoderImplDeterministicProtoCoderImpl.encodeDictEARLYENCODE_NULLENCODE_PRESENTENUM_TYPEEllipsisEnumFIRSTFastPrimitivesCoderImplFastPrimitivesCoderImpl.__reduce_cython__FastPrimitivesCoderImpl.__setstate_cython__FastPrimitivesCoderImpl._deterministic_encoding_error_msgFastPrimitivesCoderImpl.decode_from_streamFastPrimitivesCoderImpl.encode_special_deterministic..genexprFastPrimitivesCoderImpl.encode_to_streamFastPrimitivesCoderImpl.get_estimated_size_and_observablesFastPrimitivesCoderImpl.register_iterable_like_typeFloatCoderImplFloatCoderImpl.__reduce_cython__FloatCoderImpl.__setstate_cython__FloatCoderImpl.decode_from_streamFloatCoderImpl.encode_to_streamFloatCoderImpl.estimate_sizeGenericRowColumnEncoderGenericRowColumnEncoder.__reduce_cython__GenericRowColumnEncoder.__setstate_cython__GenericRowColumnEncoder.finalize_writeGenericRowColumnEncoder.null_flagsInputStreamIntervalWindowIntervalWindowCoderImplIntervalWindowCoderImpl.__reduce_cython__IntervalWindowCoderImpl.__setstate_cython__IntervalWindowCoderImpl.decode_from_streamIntervalWindowCoderImpl.encode_to_streamIntervalWindowCoderImpl.estimate_sizeIterableIterableCoderImplIterableCoderImpl.__reduce_cython__IterableCoderImpl.__setstate_cython__IterableCoderImpl._construct_from_sequenceIterableStateRea""derIterableStateWriterIterator_LOGGERLengthPrefixCoderImplLengthPrefixCoderImpl.__reduce_cython__LengthPrefixCoderImpl.__setstate_cython__LengthPrefixCoderImpl.decode_from_streamLengthPrefixCoderImpl.encode_to_streamLengthPrefixCoderImpl.estimate_sizeListListCoderImplListCoderImpl.__reduce_cython__ListCoderImpl.__setstate_cython__ListCoderImpl._construct_from_sequenceLogicalTypeCoderImplLogicalTypeCoderImpl.__reduce_cython__LogicalTypeCoderImpl.__setstate_cython__LogicalTypeCoderImpl.decode_from_streamLogicalTypeCoderImpl.encode_to_streamMAX_TIMESTAMPMIN_TIMESTAMPMapCoderImplMapCoderImpl.__reduce_cython__MapCoderImpl.__setstate_cython__MapCoderImpl.decode_from_streamMapCoderImpl.encode_to_streamMapCoderImpl.estimate_sizeNESTED_STATE_TYPENoneNullableCoderImplNullableCoderImpl.__init__NullableCoderImpl.decode_from_streamNullableCoderImpl.encode_to_streamNullableCoderImpl.estimate_sizeONE_INDEXObservableMixinObservables_OpaqueWindow_OpaqueWindow.__eq___OpaqueWindow.__hash___OpaqueWindow.__init___OpaqueWindow.__repr__Optional_OrderedUnionCoderImpl_OrderedUnionCoderImpl.__reduce_cython___OrderedUnionCoderImpl.__setstate_cython___OrderedUnionCoderImpl.decode_from_stream_OrderedUnionCoderImpl.encode_to_streamOutputStreamPaneInfoCoderImplPaneInfoCoderImpl.__reduce_cython__PaneInfoCoderImpl.__setstate_cython__PaneInfoCoderImpl.decode_from_streamPaneInfoCoderImpl.encode_to_streamPaneInfoCoderImpl.estimate_sizePaneInfoEncodingPaneInfoTimingParamWindowedValueCoderImplParamWindowedValueCoderImpl.__reduce_cython__ParamWindowedValueCoderImpl.__setstate_cython__ParamWindowedValueCoderImpl._from_protoParamWindowedValueCoderImpl.decode_from_streamParamWindowedValueCoderImpl.encode_to_streamParamWindowedValueCoderImpl.get_estimated_size_and_observablesParseFromStringPicklingErrorProtoCoderImplProtoCoderImpl.__init__ProtoCoderImpl.decodeProtoCoderImpl.encodeProtoPlusCoderImplProtoPlusCoderImpl.__init__ProtoPlusCoderImpl.decodeProtoPlusCoderImpl.encode__Pyx_PyDict_NextRefROW_ENCODERSRow""CoderImplRowCoderImpl.__reduce_cython__RowCoderImpl.__setstate_cython__RowCoderImpl._row_column_encodersRowCoderImpl.decode_batch_from_streamRowCoderImpl.decode_from_streamRowCoderImpl.encode_batch_to_streamRowCoderImpl.encode_to_streamRowColumnEncoderRowColumnEncoder.__reduce_cython__RowColumnEncoder.__setstate_cython__RowColumnEncoder.createRowColumnEncoder.finalize_writeRowColumnEncoder.null_flagsRowColumnEncoder.registerSLOW_STREAMSequenceSequenceCoderImplSequenceCoderImpl.__reduce_cython__SequenceCoderImpl.__setstate_cython__SequenceCoderImpl._construct_from_sequenceSequenceCoderImpl.decode_from_streamSequenceCoderImpl.encode_to_streamSequenceCoderImpl.estimate_sizeSequenceCoderImpl.get_estimated_size_and_observablesSerializePartialToStringSetShardedKeyShardedKeyCoderImplShardedKeyCoderImpl.__init__ShardedKeyCoderImpl.decode_from_streamShardedKeyCoderImpl.encode_to_streamShardedKeyCoderImpl.estimate_sizeSimpleCoderImplSimpleCoderImpl.__reduce_cython__SimpleCoderImpl.__setstate_cython__SimpleCoderImpl.decode_from_streamSimpleCoderImpl.encode_to_streamSinglePrecisionFloatCoderImplSinglePrecisionFloatCoderImpl.__reduce_cython__SinglePrecisionFloatCoderImpl.__setstate_cython__SinglePrecisionFloatCoderImpl.decode_from_streamSinglePrecisionFloatCoderImpl.encode_to_streamSinglePrecisionFloatCoderImpl.estimate_sizeSingletonCoderImplSingletonCoderImpl.__reduce_cython__SingletonCoderImpl.__setstate_cython__SingletonCoderImpl.decodeSingletonCoderImpl.decode_from_streamSingletonCoderImpl.encodeSingletonCoderImpl.encode_to_streamSingletonCoderImpl.estimate_sizeStrUtf8CoderStreamCoderImplStreamCoderImpl.__reduce_cython__StreamCoderImpl.__setstate_cython__StreamCoderImpl.decodeStreamCoderImpl.encodeStreamCoderImpl.estimate_sizeTWO_INDICESTYPE_CHECKINGTimerTimerCoderImplTimerCoderImpl.__init__TimerCoderImpl.decode_from_streamTimerCoderImpl.encode_to_streamTimestampTimestampCoderImplTimestampCoderImpl.__reduce_cython__TimestampCoderImpl.__setstate_cython__TimestampCoderImpl.dec""ode_from_streamTimestampCoderImpl.encode_to_streamTimestampCoderImpl.estimate_sizeTimestampPrefixingOpaqueWindowCoderImplTimestampPrefixingOpaqueWindowCoderImpl.__init__TimestampPrefixingOpaqueWindowCoderImpl.encode_to_streamTimestampPrefixingOpaqueWindowCoderImpl.decode_from_streamTimestampPrefixingOpaqueWindowCoderImpl.estimate_sizeTimestampPrefixingWindowCoderImplTimestampPrefixingWindowCoderImpl.__init__TimestampPrefixingWindowCoderImpl.encode_to_streamTimestampPrefixingWindowCoderImpl.decode_from_streamTimestampPrefixingWindowCoderImpl.estimate_sizeTupleTupleCoderImplTupleCoderImpl.__reduce_cython__TupleCoderImpl.__setstate_cython__TupleCoderImpl._construct_from_componentsTupleCoderImpl._extract_componentsTupleSequenceCoderImplTupleSequenceCoderImpl.__reduce_cython__TupleSequenceCoderImpl.__setstate_cython__TupleSequenceCoderImpl._construct_from_sequenceTypeUNKNOWNVarInt32CoderImplVarInt32CoderImpl.__reduce_cython__VarInt32CoderImpl.__setstate_cython__VarInt32CoderImpl.decodeVarInt32CoderImpl.decode_from_streamVarInt32CoderImpl.encodeVarInt32CoderImpl.encode_to_streamVarInt32CoderImpl.estimate_sizeVarIntCoderImplVarIntCoderImpl.__reduce_cython__VarIntCoderImpl.__setstate_cython__VarIntCoderImpl.decodeVarIntCoderImpl.decode_from_streamVarIntCoderImpl.encodeVarIntCoderImpl.encode_to_streamVarIntCoderImpl.estimate_sizeView.MemoryViewWindowedValueCoderImplWindowedValueCoderImpl.__reduce_cython__WindowedValueCoderImpl.__setstate_cython__WindowedValueCoderImpl.decode_from_streamWindowedValueCoderImpl.encode_to_streamWindowedValueCoderImpl.get_estimated_size_and_observablesabcallocate_bufferanyapache_beam.codersapache_beam.coders.avro_recordapache_beam.coders.coder_implapache_beam.coders.codersapache_beam.internalapache_beam.internal.cloudpickleapache_beam.transformsapache_beam.transforms.windowapache_beam.typehints.schemasapache_beam.utilsapache_beam.utils.sharded_keyapache_beam.utils.timestampappendargsortas_tupleastypeasyncio.coroutinesatomic_typeaxisbase__base__ba""se_errorbigbit_lengthbool_boolean_coder_implbsbufbyteorderbytes_c__class____class_getitem__clear_bitcline_in_tracebackclosecloudpicklecloudpickle_picklerclscoder_implcoder_impl_row_encoderscoder_impl_typescoder_implscolumncolumnscomponentsconfig_construct_from_components_construct_from_sequencecontentscountcreatecreate_InputStreamcreate_OutputStream_create_opaque_window__dataclass_params__dataclassesdecimaldecodedecode_alldecode_batch_from_streamdecode_from_streamdecode_nesteddecoder_default_size_estimatordeserializedestdeterministic_deterministic_encoding_error_msg__dict___dictdict_valuedill__doc__dtypedtype_is_objectdumpsdynamic_timer_tagelemelem_coderencodeencode_allencode_batch_to_streamencode_nestedencode_to_streamencodedencoded_windowencoderencoding_positionencoding_positions_setend__enter__enumenumerate__eq__errorestimate_sizeestimated_size__exit__exponent_extract_componentsfallback_coder_implfastavrofieldfield_typefields_fieldsfilepath_interceptorfillvaluefinalize_writefire_timestampfits_in_64_bitsflagsforce_use_dillformatfortranfrom_bytes_from_protofrozen__func__genexprgetgetLoggerget_countget_estimated_size_and_observablesget_impl_get_nested_sizeget_relative_pathget_varint_size__getstate__getvalue__hash__head_headhold_timestampiidid_generator__import__in_in_streamindexinit__init____init__..genexprinner_sizeinput_streamintio_is_coroutineis_dataclassis_deterministicis_firstis_lastisliceitemsitemsize__iter___iterable_coder_uses_abstract_iterable_by_defaultitertoolsjsonkeykey_coderkey_coder_impl_key_coder_implkw_only__len__lengthloadslogginglogical_type__main__max_timestampmemviewmessage_types__metaclass__microsmode__module____mro_entries__name__name__named_tuple_from_schemandimnested__new__nextnonspeculative_indexnpnull_flagsnull_indicatornullablenumpyobjobjectobservableotheroutpackpane_info_pane_info_coder_implpaneinfoparse_schemaparsed_schemapayload_pbpicklepop__prepare__protoproto_messageproto_message_typeproto_plus_typeproto_utils__pyx_cap""i____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_AbstractComponentCoderImpl__pyx_unpickle_BigEndianShortCoderImpl__pyx_unpickle_BigIntegerCoderImpl__pyx_unpickle_BooleanCoderImpl__pyx_unpickle_BytesCoderImpl__pyx_unpickle_CallbackCoderImpl__pyx_unpickle_CoderImpl__pyx_unpickle_DecimalCoderImpl__pyx_unpickle_Enum__pyx_unpickle_FastPrimitivesCoderImpl__pyx_unpickle_FloatCoderImpl__pyx_unpickle_GenericRowColumnEncoder__pyx_unpickle_IntervalWindowCoderImpl__pyx_unpickle_IterableCoderImpl__pyx_unpickle_LengthPrefixCoderImpl__pyx_unpickle_ListCoderImpl__pyx_unpickle_LogicalTypeCoderImpl__pyx_unpickle_MapCoderImpl__pyx_unpickle_PaneInfoCoderImpl__pyx_unpickle_ParamWindowedValueCoderImpl__pyx_unpickle_RowCoderImpl__pyx_unpickle_RowColumnEncoder__pyx_unpickle_SequenceCoderImpl__pyx_unpickle_SimpleCoderImpl__pyx_unpickle_SinglePrecisionFloatCoderImpl__pyx_unpickle_SingletonCoderImpl__pyx_unpickle_StreamCoderImpl__pyx_unpickle_TimestampCoderImpl__pyx_unpickle_TupleCoderImpl__pyx_unpickle_TupleSequenceCoderImpl__pyx_unpickle_VarInt32CoderImpl__pyx_unpickle_VarIntCoderImpl__pyx_unpickle_WindowedValueCoderImpl__pyx_unpickle__AbstractIterable__pyx_unpickle__OrderedUnionCoderImpl__pyx_vtable____qualname__read_allread_byteread_staterecord__reduce____reduce_cython____reduce_ex__registerregister_iterable_like_type__repr__representation_coderrequires_deterministic_step_labelreturnrow_coders_registered_row_column_encodersscalebschemaschemaless_readerschemaless_writerselfsend__set_name__setdefault__setstate____setstate_cython__shape_shard_idshard_id_shard_id_coder_implsignedsizesize_estimatorskip_reset_dynamic_type_stateslow_streamstartstatestaticmethodstepstopstreamstructsuccessorsumsupert_tag_coder_impltail_tail__test__throwtimestamptimestamp_coder_timestamp_coder_impltimestamp_microstimingto_bytesto_language_typeto_representation_typetyptypetypinguint8unpack_unpickle_named_tuple_unpickle_named_tuple_2_67_0_unpickle_type_unpickle_type_2_67_0_unpickle_type_2_67_0..unused_valueupdateuse_abstract_iterableuse_relative_filepathsuse_setstateuser_keyuserstatevaluevalue_coder_value_codervalues_verify_dill_compat__version__warningwindow_coderwindow_coder_impl_window_coder_implwindowed_valuewindowed_value_coderwindows_windows_coder_implwritewrite_bytewrite_statewrite_state_thresholdwvxzeroszipzip_longestPyObject *\000PyTypeObject *\000_BYTE_TO_PANE_INFO\000TimestampPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000int\000\000\000int64_t\000\000uint64_t\000unsigned char\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000ByteCountingOutputStream\000IntervalWindow\000NoneType\000_ITERABLE_LIKE_TYPES\000_pickled_types\000_unpickled_types\000create_InputStream\000create_OutputStream\000dumps\000get_varint_size\000loads\000past_unicode\000small_ints\000PaneInfoEncoding_FIRST\000PaneInfoTiming_UNKNOWN\000is_compiled\000MAX_TIMESTAMP_micros\000MIN_TIMESTAMP_micros\000_TIME_SHIFT\000BOOL_TYPE\000BYTES_TYPE\000DATACLASS_TYPE\000DICT_TYPE\000FLOAT_TYPE\000INT_TYPE\000ITERABLE_LIKE_TYPE\000LIST_TYPE\000NAMED_TUPLE_TYPE\000NONE_TYPE\000PROTO_TYPE\000SET_TYPE\000TUPLE_TYPE\000UNICODE_TYPE\000UNKNOWN_TYPE\001\000\200\001\330\0040\260\001\260\026\260q\2201\200!\340\004\t\210\021\340\004\023\2201\220E\230\022\320\033-\250R\250w\260a\330\004\007\320\007\036\230a\360\014\000\t\r\320\014\036\230a\330\014\031\230\021\330\020\023\2201\330\024,\250B\320.@\300\001\330\024.\250b\3200C\3003\300a\330\004\010\210\017\320\027(\250\001\250\022\250:\260U\270!\340\004\010\320\010\031\320\031*\250!\2502\250\\\270\025\270a\330\004\010\210\r\320\025&\240a\240r\250\030\260\025\260a\200\001\330\004;\2701\270F\300!\200\001\330\004+\2501\250F\260!\200!\330\004\013\210>\230\032\2401\240L\260\013\2704\270q\300\001\200!\340\004\010\320\010\033\2301\200!\330\004\013\2101\200!\330\004\010\210\001\330\004\013\2101\320\002(\250\001\340\004\013\2101\200\001\330\0041\260\021\260&\270\001\320\002+\2501\330\004\014\210D\320\020%\240Q\240a\330\004\010""\210\003\2101\210D\220\001\220\024\220Q\220d\230'\240\021\330\004\010\210\005\210U\220!\2201\330\006\t\210\031\220%\220s\230#\230Q\330\010\t\330\006\016\210i\220\177\240a\330\006\026\220i\230\177\250a\330\006\t\210\021\340\010\026\220l\240)\2505\260\001\260\021\340\006\n\210%\210u\220E\230\024\230]\250!\330\010\013\2104\210t\2201\330\n\016\210d\320\022-\250Q\250a\330\010\014\210N\230$\230b\240\003\2402\240R\240~\260Q\330\014\027\220q\230\002\230#\230S\240\003\2405\250\004\250B\250b\260\001\330\n\013\340\020\021\330\026\033\2301\230C\320\0372\260!\2603\260a\360\006\000\007\013\210!\340\004\010\210\010\220\001\330\006\n\210/\230\021\330\004\013\2101\320\002(\250\001\360\010\000\005\014\2101\330\004\024\220D\320\030)\250\021\250!\330\004\007\200~\220S\320\030(\250\001\330\006\016\210o\230Q\230e\2401\330\t\027\220s\320\032*\250!\330\006\016\210o\230Q\230e\2401\330\006\016\210o\230Q\230e\2401\330\004\013\2101\200!\330\004\033\320\0331\260\021\330\010\026\220d\320\032,\250D\260\001\330\004\t\320\t\035\230W\240A\240Q\330\004\013\2102\320\r \240\002\240*\250B\250a\200!\330\004\013\2101\330\010\030\230\007\230q\330\014\020\220\007\220w\230a\230r\240\025\240a\330\014\020\220\013\2301\230A\330\014\023\2201\220G\2304\230s\240(\250)\2601\260D\270\001\320\002(\250\001\330\004\013\2102\210Q\330\010\014\210M\230\036\240q\250\001\330\013\030\230\007\230z\250\021\200\001\330\0042\260!\2606\270\021\200\001\330\0043\2601\260F\270!\200!\330\004\010\320\010!\320!3\2601\330\004\010\320\010\037\320\037/\250q\330\004\010\320\010!\320!2\260!\330\004\010\320\010\033\2301\330\004\010\320\010\037\320\0375\260Q\260a\330\004\t\320\t*\250!\330\004\010\320\010\033\230<\240r\250\031\260!\200\001\340\002\003\330\002\005\200^\2203\220a\330\004\t\320\t.\250a\340\004\030\230\001\330\006\007\360\010\000\007\010\360\006\000\007\010\360\006\000\007\010\360\n\000\003\n\210\035\220a\220u\230A\200!\330\004\013\2103\210a\210t\2207\230!\2301\320\002(\250\001\360\006\000\005\014\210?\230!\2303\230a\230w\240b""\250\001\200\001\330\0044\260A\260V\2701\200!\330\004\013\2104\320\017\037\230|\2501\250A\200!\340\004\013\2104\320\017*\250!\2501\330\010\t\320\t\034\230A\330\014\027\220w\230c\240\022\2402\240R\240r\250\023\250A\250T\260\021\330\010\014\210C\210u\220I\230Q\230d\240!\200!\330\004\013\2104\320\017$\320$5\260Q\330\010\014\210M\320\0310\260\001\260\030\270\025\270a\320\002(\250\001\340\004\013\2104\320\017 \240\001\240\024\320%5\260Q\260h\270a\200!\340\004\013\2104\320\017\"\240!\320#5\260Q\260j\300\001\200!\330\004\013\2104\210}\320\034-\250Q\330\010\014\320\014!\320!4\260A\260[\300\001\200!\340\004\013\2104\210q\200!\330\004\013\2104\210q\200!\330\004\013\2104\210q\220\006\220c\230\024\230Q\230a\200!\360\010\000\005\014\2104\210w\220a\220v\230Y\240a\240q\200!\340\004\013\2104\210x\220s\230!\200!\330\004\013\2104\210y\230\001\230\021\200!\340\004\013\2104\210y\230\001\230\026\230y\250\001\250\021\200!\360\n\000\005\010\200|\2204\220z\240\021\240'\250\022\2501\330\006\016\210e\2201\220A\340\004\007\200v\210Q\210g\220Q\200!\330\004\013\2105\320\020)\250\021\200\001\330\0045\260Q\260f\270A\200!\330\004\007\200{\220!\2205\230\013\2401\200!\330\004\013\2105\320\020)\250\021\250.\270\001\200!\330\004\013\2105\220\001\220\021\200!\330\004\013\2105\220\004\320\024-\250Q\250n\270A\320\002(\250\001\360\010\000\005\023\220!\330\004\005\330\010\023\220=\240\003\2405\250\002\250+\260_\300C\300q\330\004\013\2102\210R\210\177\230a\230q\200!\340\004\022\220!\330\004\005\330\010\023\220=\240\003\2405\250\002\250+\260_\300C\300q\330\004\007\320\007\036\230a\330\010\014\320\014\036\230a\230{\250-\260s\270!\330\004\007\320\007\027\220q\230\001\200\001\330\004*\250!\2506\260\021\200!\340\004\013\2106\220\026\220q\230\004\230I\240Q\240h\250a\200!\330\004\013\2107\220$\220a\220q\200\001\330\0048\270\001\270\026\270q\200!\340\004\013\2109\320\024)\250\021\200!\340\004\013\2109\220I\230Q\230a\200!\340\004\013\2109\220O\2401\200!\340\004\023\2209\230O\2501\330\004\013\2104\210}\230G\2401\240I""\250U\260!\2601\200!\340\004\013\2109\320\024*\250!\200\001\330\0049\270\021\270&\300\001\200!\330\004\013\2109\320\024)\250\021\330\004\r\210Q\330\004\010\210\005\210U\220!\2201\360\006\000\007\r\210D\220\013\320\033.\250a\250{\270!\330\006\016\210d\220-\320\0372\260!\260;\270a\330\006\014\210A\210W\220A\340\004\013\2101\200!\340\004\013\2109\320\024)\250\021\340\004\007\200u\210C\210q\330\006\021\220\021\330\n\016\210l\320\032-\250Q\250k\270\021\330\n\016\210e\2205\230\001\230\021\360\006\000\007\022\220\021\330\006\016\210i\220\177\240a\330\006\014\210F\220\"\220A\330\010\014\210E\220\025\220a\220q\330\n\022\220'\230\021\230$\230l\320*=\270Q\270k\310\021\330\010\020\220\t\230\037\250\001\340\006\t\210\026\210t\2201\330\010\013\2104\210}\230C\230q\330\n\020\220\n\230!\330\016\017\340\010\026\220i\230y\250\001\250\021\330\010\023\220?\240!\330\014\026\220d\230,\240a\240}\260D\270\001\340\004\013\2104\320\017(\250\001\250\021\220A\200!\340\004\030\230\004\230A\230Q\320\002(\250\001\360\006\000\005\006\330\006\r\210_\230A\230Q\330\004\013\320\013\034\230A\330\006\014\210M\230\021\330\n4\260A\260Q\340\034\035\230Z\240q\200!\340\004\010\210\004\210A\210Q\330\004\007\200v\210S\220\001\330\006\014\210K\220q\230\001\330\t\013\2103\210a\360\010\000\007\010\360\006\000\t\025\220A\340\010\013\2104\210~\230T\240\024\240Q\330\n\r\210T\220\037\240\001\240\021\330\014\022\220-\230q\330\010\016\210k\230\021\230!\330\010\016\320\016\036\230a\230q\330\r\016\330\010\016\210k\230\021\230!\330\010\014\320\014 \320 1\260\021\260'\270\030\300\021\330\t\013\2103\210a\330\006\014\210K\220q\230\001\330\006\014\320\014#\2401\240A\330\t\013\2103\210a\330\006\014\210K\220q\230\001\330\006\014\210F\220!\2207\230!\330\t\013\2103\210a\330\006\026\220a\330\006\014\210K\220q\230\001\330\006\014\210F\220!\220=\240\007\240q\250\n\260!\330\t\013\2103\210e\2203\220b\230\003\2301\330\006\014\210K\220q\230\r\240R\240s\250*\260A\330\006\014\320\014\034\230A\230S\240\001\240\021\330\006\n\210%\210q\330""\010\014\320\014\035\230Q\230c\240\030\250\021\330\t\013\2103\210a\330\006\014\210K\220q\230\001\330\006\014\210K\220q\230\001\330\t\013\2103\210a\330\006\014\210K\220q\230\001\330\006\n\320\n\036\320\036/\250q\260\007\260x\270q\330\t\013\2103\210a\330\006\023\2201\330\006\014\210K\220q\230\001\330\006\014\320\014\034\230A\230S\240\001\240\021\330\006\t\210\024\320\r0\260\007\260q\330\010\t\330\n\036\230a\230z\250\026\250q\330\010\017\210}\230A\330\n\020\220\t\230\021\330\016H\310\001\330\016\022\320\022;\2701\330\010\014\210C\210u\220A\330\n\016\320\016\037\230q\240\003\2408\2501\330\n\016\320\016\037\230q\240\003\2408\2501\360\006\000\t\r\210C\210u\220J\230f\240A\330\n\016\320\016\037\230q\240\003\2408\2501\330\n\016\320\016\037\230q\240\003\2408\2501\330\t\013\2103\210a\330\006\014\210K\220q\230\001\330\006\014\320\014\034\230A\230S\240\001\240\021\330\006\t\210\024\320\r0\260\007\260q\330\010\t\330\n\030\230\001\230\021\330\010\017\210}\230A\330\n\020\220\t\230\021\330\016J\310!\330\016\022\320\022;\2701\330\006\n\210%\210q\330\010\014\320\014\035\230Q\230c\240\030\250\021\360\006\000\n\016\320\r0\260\007\260q\330\006\n\320\n'\240q\250\007\250q\340\006\014\210K\220q\230\001\330\006\n\320\n\036\320\036/\250q\260\007\260x\270q\200!\340\004\014\210A\210U\220)\2302\230Q\330\004\020\220\003\2201\220E\230\027\240\001\240\021\330\004\007\320\007\027\220q\230\001\330\004\010\320\010\033\320\033,\250A\250[\270\005\270Q\200\001\330\004,\250A\250V\2601\200!\330\004\005\330\010\t\340\t\020\220\004\220A\220X\230T\240\021\200!\340\004\020\220\004\320\024$\240A\240Y\320.D\300A\360\016\000\005\010\200z\220\023\220B\220c\230\021\320\0320\260\003\2601\330\006\022\220!\330\t\023\2203\320\026+\2503\250a\330\006\022\220!\340\006\023\2201\340\004\016\210d\220/\320!4\260A\260[\300\001\340\004\020\220\004\320\024%\320%8\270\001\270\033\300A\330\004\014\210D\220\r\320\0350\260\001\260\033\270A\330\004\031\230\027\240\001\330\010\t\330\010\t\330\010\t\330\010\t\200!\340\004\031\230\031""\240*\250A\330\004\031\320\031,\250A\320-@\300\002\300!\330\004\013\2105\220\007\220q\330\004\024\320\024'\240s\250!\330\004\007\200~\220S\230\001\330\006\r\210Q\330\t\027\220s\320\032*\250!\330\006\016\210i\220\177\240a\330\006\t\210\024\210X\220S\230\016\240o\260Q\330\010 \240\001\340\010\037\230q\330\t\027\220s\320\032*\250!\330\006\016\210i\220\177\240a\330\006\035\230Y\240o\260Q\340\006\014\320\014\037\230q\320 ?\270r\300\021\330\004\031\230\031\240!\330\010\014\210K\220t\230:\240T\250\031\260'\270\021\320\002,\250A\330\004\014\210D\320\020%\240Q\240a\330\004\010\210\003\2101\210D\220\001\220\024\220Q\220g\230W\240A\330\004\007\200t\2101\330\006\026\220b\230\006\230b\240\003\2404\240~\260V\2702\270Q\330\006\027\220t\230<\240r\250\023\250C\250q\330\006\025\220R\220v\230R\230s\320\"2\260&\270\002\270!\330\006\n\210#\210X\220Y\230a\230q\330\010\032\230$\230k\250\021\330\010\013\320\013\033\2307\240%\240t\250?\270$\270a\330\n\027\220t\2305\240\001\330\n\026\220d\230\"\230C\230v\320%5\260S\270\002\270&\300\001\300\022\3002\300Q\330\006\027\220|\2404\240q\250\005\250S\260\003\2602\260W\270A\270R\270q\330\006\022\220!\330\006\023\2201\340\006\026\220b\230\006\230b\240\006\240f\250B\250a\340\004\010\210\005\210U\220!\2201\330\006\t\320\t\031\230\021\230$\230a\330\006\t\210\035\220a\220q\330\010\013\210;\220a\220q\330\010\014\210E\220\025\220a\220q\330\n\r\210[\230\001\230\031\240!\2403\240a\340\010\013\210;\220a\220q\330\006\n\210%\210u\220A\220T\230\021\330\010\013\2104\210t\2201\330\n\016\210d\320\022-\250Q\250a\330\010\013\210=\230\001\230\023\230D\240\n\250!\2503\250a\330\n\r\210T\220\024\220_\240A\240Q\330\014\022\220*\230A\330\020I\310\021\330\026\027\220t\2307\240'\250\021\250\"\250A\340\020(\250\005\250Q\250c\3201B\300!\3003\300a\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0170\260\004\260A\260W\270K\300w\310a\340""\010\017\320\0170\260\004\260A\260W\270K\300q\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0171\260\024\260Q\260g\270[\310\007\310q\340\010\017\320\0171\260\024\260Q\260g\270[\310\001\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0172\260$\260a\260w\270k\310\027\320PQ\340\010\017\320\0172\260$\260a\260w\270k\310\021\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0174\260D\270\001\270\027\300\013\3107\320RS\340\010\017\320\0174\260D\270\001\270\027\300\013\3101\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0178\270\004\270A\270W\300K\310w\320VW\340\010\017\320\0178\270\004\270A\270W\300K\310q\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017*\250$\250a\250w\260k\300\027\310\001\340\010\017\320\017*\250$\250a\250w\260k\300\021\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017>\270d\300!\3007\310+\320U\\\320\\]\340\010\017\320\017>\270d\300!\3007\310+\320UV\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601""\260G\270;\300a\200!\340\004\005\330\006\t\320\t\031\230\021\230!\330\004\013\320\013\034\230A\330\006\014\210M\230\021\330\n\033\2301\230A\360\006\000\035\036\230Z\240q\200!\340\004\007\200}\220A\220\\\240\036\250q\200!\330\004\t\210\031\220*\230A\330\004\007\200s\210#\210Q\330\006\t\210\024\320\r#\2403\240a\330\010\016\210j\230\001\230\021\330\006\r\210T\320\021&\320&9\270\021\270+\300Q\340\006\n\210$\210m\2301\230A\330\006\r\210Q\320\016!\240\021\240+\250Q\200!\330\004\014\210C\210q\220\001\330\004\007\200v\210S\220\001\330\006\r\210Q\330\t\017\210s\220!\330\006\r\210Q\330\004\n\210*\220A\320\025/\250r\260\021\200!\330\004\014\210D\220\r\320\0350\260\001\260\033\270A\330\004\031\230\027\240\001\330\010\017\210t\220=\240\004\240K\250t\2601\200!\330\004\024\220D\320\030+\2501\330\004\021\320\021!\240\021\240!\330\004\013\2101\200!\340\004\020\220\001\330\004\024\220D\320\030)\250\021\250!\330\004\007\200{\220!\2209\230O\2503\250n\270C\270q\330\004\007\200~\220S\230\001\330\006\007\330\t\027\220s\320\032*\250!\330\006\t\320\t\031\230\021\230%\230q\330\t\027\220s\320\032*\250!\330\006\t\320\t\031\230\021\230%\230q\330\006\t\320\t\031\230\021\230%\230q\340\006\014\320\014\037\230q\320 ?\270r\300\021\200!\340\004\024\220D\230\r\240W\250A\250Q\330\004\007\320\007\027\220q\230\003\2301\230A\330\004\007\200v\210Q\210a\320\002(\250\001\360\n\000\005\025\220E\230\024\320\035@\300\001\300\021\330\004\013\2101\200!\340\004\024\220I\230Y\240a\240q\330\004\013\2103\210k\230\021\230/\250\032\2607\270'\300\021\200!\330\004\014\210I\220Z\230q\330\004\007\200v\210S\220\001\330\006\r\210Q\330\t\017\210s\220!\330\006\r\210Q\330\004\n\210*\220A\320\025/\250r\260\021\200!\330\004\014\210I\220_\240A\330\004\024\220I\230_\250A\330\004\007\200q\340\006\024\220O\2409\250E\260\021\260!\360\014\000\005\031\230\001\330\004\010\210\005\210U\220%\220t\230=\250\001\330\006\t\210\024\210T\220\021\330\010\014\210D\320\020+\2501\250A\330\006\n\210.\230\004\230B\230c\240\022\2402\240^\2601\330\n""\025\220Q\220b\230\003\2303\230c\240\025\240d\250\"\250B\250a\330\010\017\210q\340\010\032\230$\230k\250\021\250!\330\010\017\210\177\320\0361\260\021\260+\270Q\330\006\027\220w\230a\230q\360\010\000\005\013\210#\210Q\320\016!\240\022\2404\240q\330\006\027\220w\230a\230q\340\004\013\2104\210|\2301\340\014!\240\024\240Q\330\014\r\320\r\036\230a\230s\240$\240e\2504\250q\200!\340\004\014\210I\220_\240A\330\004\020\220\004\320\024'\320':\270!\270;\300a\330\004\014\210G\2208\2301\230J\240g\250Q\250a\250q\330\004\013\2101\220*\230K\240s\250/\270\021\270Q\200!\340\004\n\320\n\035\230Q\330\004\010\210\t\220\021\330\006\n\320\n\033\2301\230G\2405\250\001\330\004\013\2103\210d\220!\320\002=\270Q\360$\000\005\014\2104\210~\230Q\230g\240Y\250a\320\002=\270Q\360\010\000\005\026\220Q\340\004\026\220a\330\004\007\200z\220\021\220'\230\032\2401\330\006\r\320\r\035\230R\230w\240d\250!\340\004\022\220!\330\004\010\210\010\220\001\330\006\022\220!\330\n\016\210l\320\032=\270Q\330\016\033\2301\330\006\030\230\001\330\006\025\220Q\360\022\000\005\014\320\013\033\2301\320\002=\270Q\360\010\000\005\016\210T\320\021%\240Q\240a\330\004\025\220Q\330\004\022\220!\330\004\010\210\005\210U\220!\2203\220c\230\021\230$\230a\330\006\n\210$\210m\2301\230A\330\006\022\220!\330\n\013\320\013.\250a\330\016\024\220A\220[\240\007\240s\250\"\250B\250b\260\002\260#\260Q\260d\270!\330\006\030\230\001\330\006\025\220Q\330\004\013\320\013\033\2301\200!\330\t\020\220\001\220\034\230Q\330\006\r\210Z\220q\320\030)\250\021\250%\250t\2601\200!\340\004\n\320\n\035\230Q\330\004\010\320\010\031\230\021\230'\240\025\240a\330\004\013\2103\210d\220!\320\002!\240\021\340\004\025\220Q\330\004\005\330\010\014\320\014!\240\036\250q\260\005\260\\\300\027\310\001\330\004\005\330\010\014\320\014\034\230N\250!\2505\260\006\260g\270Q\330\004\013\2101\200!\330\004\r\210Q\330\004\007\200r\210\023\210I\220S\230\001\230\021\330\006\r\210Z\220q\230\001\330\004\032\230'\240\021\240&\250\001\320\002=\270Q\360\006\000\005\010\200z\220""\021\220'\230\032\2401\340\006\r\210S\220\002\220'\230\021\340\004\013\2104\210~\230Q\230g\240Y\250a\320\002=\270Q\340\004\007\200z\220\021\220'\230\032\2401\360\006\000\007\016\210S\220\002\220'\230\024\230Q\330\004\025\220Q\330\004\022\220!\330\004\032\230!\330\010\014\210M\320\031<\270A\330\014\021\220\037\240\001\330\004\026\220a\330\004\023\2201\330\004\013\320\013\033\2301\320\002=\270Q\360\010\000\005\010\200z\220\021\220'\230\032\2401\360\006\000\007\016\210S\220\002\220'\230\024\230Q\330\004\025\220Q\330\004\022\220!\330\004\032\230!\330\010\014\210M\320\031<\270A\330\014\021\220\037\240\001\330\004\026\220a\330\004\023\2201\330\004\005\330\010\014\320\014\035\230^\2501\250E\3201D\300A\330\004\005\330\010\014\210O\230>\250\021\250%\320/@\300\001\330\004\005\330\010\014\320\014\035\230^\2501\250E\3201D\300A\330\004\013\320\013\033\2301\320\002=\270Q\340\004\007\200z\220\021\220'\230\032\2401\340\006\r\210S\220\002\220'\230\021\340\004\n\320\n\"\240!\330\004\010\320\010\031\230\021\230'\240\025\240a\330\004\013\2103\210j\230\004\230A\200!\340\004\007\320\007\035\230Q\230a\200!\330\004\007\320\007\035\230Q\230c\240\021\240!\360\006\000\005\010\200t\2101\330\006\n\210%\210y\230\006\230a\230z\250\026\250q\330\010\014\210K\320\027(\250\001\250\025\250e\2601\330\010\014\210M\320\031*\250!\2507\260%\260q\360\010\000\007\013\210%\210y\230\n\240&\250\001\330\010\014\210K\320\027(\250\001\250\025\250e\2601\330\010\014\210M\320\031*\250!\2507\260%\260q\200!\330\004\010\320\010\031\230\034\240Q\240d\250&\260\001\260\021\200!\330\004\n\320\n\035\230Q\230d\240!\2401\200!\330\004\013\210:\220Q\220d\230!\2308\2401\330\t\020\220\006\220a\330\006\027\220q\230\005\230T\320!1\260\025\260a\330\006\r\210S\220\t\230\021\200\001\330\004-\250Q\250f\260A\200!\330\004\013\210:\220Q\220g\230Y\240g\250T\260\021\260!\330\004\013\2101\200\001\360\010\000\005\016\210T\220\037\240\004\320$;\2704\270q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022""\220!\330\010\027\220q\340\010\027\220t\230>\250\027\260\005\260S\270\004\320\250\027\260\005\260S\270\004\320\250\027\260\001\330\004\007\200q\330\010\017\320\017;\2704\270q\300\007\300{\320RY\320YZ\340\010\017\320\017;\2704\270q\300\007\300{\320RS\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230>\250\027\260\001\330\004\007\200q\330\010\017\320\0176\260d\270!\2707\300+\310W\320TU\340\010\017\320\0176\260d\270!\2707\300+\310Q\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230>\250\027\260\001\330\004\007\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601\260G\270;\300a\200!\340\004\r\210T\320\021%\240Q\240a\330\004\007\200s\210!\2104\210\177\230c\240\023\240A\240Q\330\006\014\210J\220a\220q\330\004\010\210\005\210U\220!\2203\220c\230\021\230$\230a\330\006\n\210$\210m\2301\230A\330\006\007\320\007\030\230\001\330\n\020\220\001\220\024\220U\230'\240\023\240B\240b\250\002\250\"\250C\250q\260\004\260A\200\001\330\002\005\200T\320\t\031\230\024\230Q\230d\240!\330\004\024\220A\220V\320\033.\250f\260A\260Q\340\002\t\320\t\031\230\021\230!\200\001\360\010\000\005\016\210T\320\021%\240T\250\035\260d\270!\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340""\010\027\220t\230<\240w\250e\2603\260d\270.\310\007\310q\330\004\007\200q\330\010\017\320\017-\250T\260\021\260'\270\033\300G\3101\340\010\017\320\017-\250T\260\021\260'\270\033\300A\200\001\330\002\003\330\006\007\360\010\000\003\006\200T\210\021\330\004\n\210,\220a\220{\240\"\240A\330\002\005\200T\210\035\220c\230\021\330\004\n\210,\220a\220{\240\"\320$<\270A\270T\300\021\200\001\360\010\000\005\016\210T\220\035\230d\240.\260\004\3204I\310\024\320Mn\320nr\360\000\000s\001P\002\360\000\000P\002T\002\360\000\000T\002b\002\360\000\000b\002f\002\360\000\000f\002w\002\360\000\000w\002{\002\360\000\000{\002Q\003\360\000\000Q\003U\003\360\000\000U\003b\003\360\000\000b\003f\003\360\000\000f\003g\003\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\270-\300w\310e\320SV\320VZ\320Zn\320nu\320uz\320z}\360\000\000~\001B\002\360\000\000B\002^\002\360\000\000^\002e\002\360\000\000e\002j\002\360\000\000j\002m\002\360\000\000m\002q\002\360\000\000q\002~\002\360\000\000~\002E\003\360\000\000E\003J\003\360\000\000J\003M\003\360\000\000M\003Q\003\360\000\000Q\003a\003\360\000\000a\003h\003\360\000\000h\003m\003\360\000\000m\003p\003\360\000\000p\003t\003\360\000\000t\003|\003\360\000\000|\003C\004\360\000\000C\004D\004\330\004\007\200q\330\010\017\320\017-\250T\260\021\260'\270\033\300G\3101\340\010\017\320\017-\250T\260\021\260'\270\033\300A\200\001\360\010\000\005\016\210T\220\035\230d\320\"5\260T\270\035\300d\320J]\320]a\320ap\320pt\320t\177\360\000\000@\002D\002\360\000\000D\002E\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\320:L\310G\320SX\320X[\320[_\320_q\320qx\320x}\360\000\000~\001A\002\360\000\000A\002E\002\360\000\000E\002S\002\360\000\000S\002Z\002\360\000\000Z\002_\002\360\000\000_\002b\002\360\000\000b\002f\002\360\000\000f\002p\002\360\000\000p\002w\002""\360\000\000w\002|\002\360\000\000|\002\177\002\360\000\000\177\002C\003\360\000\000C\003S\003\360\000\000S\003Z\003\360\000\000Z\003[\003\330\004\007\200q\330\010\017\320\017<\270D\300\001\300\027\310\013\320SZ\320Z[\340\010\017\320\017<\270D\300\001\300\027\310\013\320ST\200\001\360\010\000\005\016\210T\220\035\230d\240!\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\270(\300'\310\021\330\004\007\200q\330\010\017\320\0178\270\004\270A\270W\300K\310w\320VW\340\010\017\320\0178\270\004\270A\270W\300K\310q\200\001\360\010\000\005\016\210T\220\036\230t\240>\260\024\3205N\310d\320Ra\320ae\320ef\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\270=\310\007\310u\320TW\320W[\320[i\320ip\320pq\330\004\007\200q\330\010\017\320\0172\260$\260a\260w\270k\310\027\320PQ\340\010\017\320\0172\260$\260a\260w\270k\310\021\200\001\360\010\000\005\016\210T\320\021'\240t\320+<\270D\320@V\320VZ\320Z~\360\000\000\177\001C\002\360\000\000C\002\\\002\360\000\000\\\002`\002\360\000\000`\002a\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\0330\260\007\260u\270C\270t\320CX\320X_\320_d\320dg\320gk\360\000\000l\001O\002\360\000\000O\002V\002\360\000\000V\002W\002\330\004\007\200q\330\010\017\320\0178\270\004\270A\270W\300K\310w\320VW\340\010\017\320\0178\270\004\270A\270W\300K\310q\200\001\360\010\000\005\016\210T\220\036\230t\240>\260\024\260_\300D\310\001\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\270=\310\007\310u\320TW\320W[\320[i\320ip\320pq\330\004\007\200q\330\010\017\320\0172\260$\260a\260w\270k\310\027\320PQ\340\010\017\320\0172\260$\260a\260w\270k\310\021\200\001\360\010\000""\005\016\210T\220\036\230t\240>\260\024\260_\300D\310\001\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\270=\310\007\310u\320TW\320W[\320[i\320ip\320pq\330\004\007\200q\330\010\017\320\0177\260t\2701\270G\300;\310g\320UV\340\010\017\320\0177\260t\2701\270G\300;\310a\200\001\360\010\000\005\016\210T\220\036\230t\240>\260\024\260_\300D\310\001\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\270=\310\007\310u\320TW\320W[\320[i\320ip\320pq\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q\200!\340\004\r\210U\220(\230#\230Q\330\004\007\200w\210c\220\021\330\006\017\210w\220b\230\001\340\006\017\210w\220b\230\001\330\004\007\320\007\035\230Q\230a\200!\360\010\000\005\013\210&\220\001\220\024\220W\230A\230X\240Q\200!\340\004\r\210Y\320\026+\2501\330\004\007\200w\210b\220\001\330\006\017\210w\220b\230\001\340\006\017\210w\220b\230\001\330\004\013\2109\220A\220W\230G\2402\240Q\200!\330\004\025\220Y\230j\250\001\330\004\007\200\177\220c\230\024\230Q\330\006\r\210Q\330\t\030\230\003\2304\230q\330\006\r\210T\220\035\320\0361\260\021\260+\270Q\340\006\014\210J\220a\330\nB\300!\330\n\013\200!\220!\200!\360\010\000\005\013\210!\200!\360\010\000\005\t\320\010\030\230\001\200!\330\004\n\210!\200!\340\004\010\210\t\220\021\330\004\010\210\t\220\021\320\002\030\230\001\200!\330\004\010\320\010\036\230a\200!\330\004\010\320\010 \240\016\250a\330\004\010\320\010\033\2301\320\002(\250\001\360\010\000\005\013\320\n\"\240!\330\004\010\320\010\031\230\021\230'\240\025\240a\330\004\013\2103\210j\230\001\200a\330\010\r\210R\210y\230\001\230\021\330\010\014\320\014\036\230a\200a\330\010\017\320\017)\250\024\250V\2604\260q\320\002(\250\016\260a\330\004\010\320\010\036\230a\200a\330\010\t\330\014\020\220\001\220\026""\220s\230$\230a\230w\240d\250$\250e\2603\260e\2705\300\001\330\014\020\320\020 \240\003\2405\250\001\200a\330\010\017\210t\2201\220D\230\001\200!\340\004\007\320\007\036\230a\230q\200!\330\004\t\210\021\330\004\010\210\r\320\025&\240a\240r\250\030\260\025\260a\200\001\330\002\t\320\t\036\230a\230s\240\"\240A\200!\340\004\010\320\010\035\320\035.\250a\250u\260L\300\005\300Q\330\004\010\320\010\030\320\030)\250\021\250%\250v\260U\270!\200\001\330\004.\250a\250v\260Q\200!\330\004\026\220b\320\030+\2501\250H\260A\330\004\013\2104\320\017\"\320\"5\260Q\260h\270a\200!\330\004\024\320\024&\240b\320(;\2701\270H\300A\330\004\013\320\013 \240\001\330\010\025\220Z\230t\2406\250\031\260!\2601\200!\330\004\026\220b\320\030)\250\021\250%\250~\270T\300\030\310\021\330\004\010\320\010\033\320\033,\250A\250W\260H\270A\200!\330\004\026\220b\320\030)\250\021\250%\250~\270T\300\030\310\021\330\004\n\210&\220\001\220\025\320\026'\240q\200!\330\004\016\210d\220!\2201\330\004\t\210\024\210V\2209\230A\230T\240\021\330\006\t\210\030\220\023\220A\330\010\013\210;\220a\220q\330\010\014\210D\220\r\230Q\230a\330\010\t\320\t\032\230!\2307\240%\240q\330\010\t\340\006\t\210\024\320\r#\2403\240a\330\010\016\210j\230\001\230\021\330\006\t\210\033\220A\220Q\330\006\n\320\n\037\320\0370\260\001\260\027\270\005\270Q\200\001\360\010\000\003\007\320\006\026\220d\230!\2304\230q\330\002\005\200R\200s\210!\330\004\027\220q\330\004\010\320\010\030\230\001\230\026\230t\2406\250\021\250!\340\004\007\200q\210\n\220#\220V\2304\230w\240a\240s\250!\330\006\007\330\010\016\210f\220A\220V\2306\240\021\240!\330\r\023\2201\330\010\t\210\036\220q\340\002\t\210\021\320\002!\240\025\240h\320.?\270q\330\004\005\330\010\032\230\"\230N\250!\2505\260\016\270d\300!\330\010\013\2101\210E\220\021\320\002!\240\025\240h\320.?\270q\330\004\005\330\010\032\230\"\230N\250!\2505\260\016\270d\300!\330\010\014\320\014\037\230~\250Q\250g\260Q\200!\340\004\010\210\006\210j\230\001\330\004\007\200r\210\023\210A\330\006\r\210Q\330\t\013""\2103\210a\330\006\r\210V\220?\240!\330\t\013\2103\210a\330\006\r\210V\320\023)\250\021\330\t\013\2103\210a\330\006\r\210V\2209\230A\230Q\330\t\013\2103\210a\330\006\r\210V\2209\230A\230W\240G\2501\250A\330\t\013\2103\210j\230\003\2302\230S\240\013\2503\250b\260\003\2601\330\006\r\210V\220?\240!\330\006\016\210a\210t\320\023&\240a\240x\250v\260T\270\025\270e\3001\300A\330\006\t\210\022\2103\210a\330\010\017\210q\330\013\r\210S\220\001\330\010\017\210u\220A\220Q\330\006\r\210S\220\001\220\021\330\t\013\2103\210a\330\006\r\210V\220?\240!\330\006\n\210!\330\006\n\210%\210u\220A\220Q\330\010\014\210D\320\020#\2401\240H\250A\330\010\t\210\021\210%\210t\320\023&\240a\240x\250q\330\006\r\210Q\330\t\013\2103\210a\330\006\r\210T\220\024\220V\230:\240Q\330\t\013\2103\210a\330\006\r\210T\320\021%\320%8\270\001\270\030\300\021\330\t\013\2103\210a\330\006\014\210D\220\014\230A\230Q\330\006\014\210C\210q\330\006\t\320\t\031\230\021\230&\240\t\250\021\250!\330\006\r\210Q\330\t\013\2103\210a\330\006\014\210D\220\014\230A\230Q\330\006\r\210V\220?\240!\330\006\017\210q\330\006\n\210%\210u\220A\220Q\330\010\025\220V\2309\240A\240U\250'\260\021\260!\330\010\016\210a\210~\230T\320!4\260A\260X\270Q\330\006\r\210S\220\003\2201\330\t\013\2103\210o\230S\240\002\240#\240Q\330\006\014\210D\220\014\230A\230Q\330\006\r\210S\220\002\220$\320\026*\320*=\270Q\270h\300a\330\t\013\2103\210a\330\006\014\210D\220\014\230A\230Q\330\006\r\210S\220\001\220\024\320\025(\250\001\250\030\260\021\330\t\013\2103\210a\330\006\014\210D\220\014\230A\230Q\330\006\016\210d\320\022%\240Q\240h\250a\330\006\016\210c\220\030\230\021\230!\330\006\013\210=\230\001\230\021\330\006\r\210Q\330\t\013\2103\210a\330\006\r\210T\320\021%\320%8\270\001\270\030\300\021\340\006\014\210J\220a\320\027-\250R\250q\200!\330\004\013\210;\220k\240\021\210q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\0230\260\010\270\001\270\021\330\004\007\200|\2207\230!\330\010?\270q\320@`\320`n\320no\330\004\013\2101\200\001""\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220?\240(\250!\2501\330\004\007\200|\2207\230!\330\0101\260\021\3202D\300N\320RS\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023*\250(\260!\2601\330\004\007\200|\2207\230!\330\0109\270\021\320:T\320Tb\320bc\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220>\240\030\250\021\250!\330\004\007\200|\2207\230!\330\0100\260\001\3201B\300.\320PQ\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023(\250\010\260\001\260\021\330\004\007\200|\2207\230!\330\0107\260q\3208P\320P^\320^_\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023)\250\030\260\021\260!\330\004\007\200|\2207\230!\330\0108\270\001\3209R\320R`\320`a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023#\2408\2501\250A\330\004\007\200|\2207\230!\330\0102\260!\3203F\300n\320TU\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2209\230H\240A\240Q\330\004\007\200|\2207\230!\330\010+\2501\250L\270\016\300a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023$\240H\250A\250Q\330\004\007\200|\2207\230!\330\0103\2601\3204H\310\016\320VW\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023%\240X\250Q\250a\330\004\007\200|\2207\230!\330\0104\260A\3205J\310.\320XY\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023-\250X\260Q\260a\330\004\007\200|\2207\230!\330\010<\270A\320=Z\320Zh\320hi\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023&\240h\250a\250q\330\004\007\200|\2207\230!\330\0105\260Q\3206L\310N""\320Z[\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023.\250h\260a\260q\330\004\007\200|\2207\230!\330\010=\270Q\320>\\\320\\j\320jk\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023'\240x\250q\260\001\330\004\007\200|\2207\230!\330\0106\260a\3207N\310n\320\\]\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220<\230x\240q\250\001\330\004\007\200|\2207\230!\330\010.\250a\250\177\270n\310A\330\004\013\2101\320\002/\250q\340\004\013\2101\320\002/\250q\360\006\000\005\014\2101\200!\340\004\007\320\007\027\220q\230\001\200\001\330\002\t\210\036\220q\230\003\2302\230Q\220q\330\014+\2504\250u\260A\260Q\200!\330\004\007\320\007\027\220q\230\004\230A\330\004\014\210A\210W\220A\220W\230F\240$\240h\250d\260!\340\004\007\200t\2101\330\006\022\220!\330\006\n\210(\220!\330\010\013\2105\220\003\2201\330\n\026\220a\330\n\013\330\006\t\210\021\330\010\013\320\013\033\2302\230T\240\034\250R\250s\260#\260Q\340\010\022\220!\330\010\014\210C\210x\220y\240\001\240\021\330\n\r\210R\210t\2202\220R\220r\230\023\230A\330\014\017\210{\230!\2301\330\014\026\220a\330\n\026\220e\2303\230f\240D\250\002\250\"\250A\330\010\013\210;\220a\220q\340\010\013\210;\220a\220q\340\006\t\210\033\220A\220Q\340\004\010\210\005\210U\220!\2204\220q\330\006\t\210\024\210T\220\021\330\010\014\210D\320\020+\2501\250A\330\006\r\210U\220!\2201\330\006\t\210\025\210c\220\021\330\010\013\2104\210t\220?\240!\2401\330\n\020\220\n\230!\330\016G\300w\310a\330\022\026\220g\230W\240A\240R\240q\330\010\t\330\006\030\230\004\230K\240q\250\001\330\006\025\320\025&\240a\240v\250U\260!\200!\340\004\010\320\010\030\320\030)\250\021\250%\250{\270%\270q\330\004\010\320\010\030\320\030)\250\021\250%\320/C\3005\310\001\330\004\010\320\010\034\320\034-\250Q\250e\260:\270U\300!\330\004\010\320\010\034\320\034-\250Q\250e\260<\270u\300A\330\004\007\200t\2105\220\001\330\006\n\320\n \320 1\260\021\330\n\017\320\017 \240""\005\240Q\330\006\n\320\n \320 1\260\021\330\n\017\320\017 \240\005\240Q\330\006\n\320\n \320 1\260\021\260%\260{\300%\300q\200\001\330\004'\240q\250\006\250a\200\001\330\004/\250q\260\006\260a\320\002/\250q\330\004\017\210q\330\004\010\210\005\210Y\220l\240&\250\001\330\006\022\220$\220k\240\036\250q\260\005\260Q\330\006\022\220$\220m\240>\260\021\260'\270\021\330\004\013\2101\200!\340\004\t\320\t'\240q\330\004\017\210t\320\023#\320#6\260a\260{\300!\330\004\030\230\004\320\034,\320,?\270q\300\013\3101\330\004\016\210d\320\022&\320&9\270\021\270+\300Q\330\004\020\220\004\320\024(\320(;\2701\270K\300q\330\004\007\200q\330\006\r\210Y\220f\230A\330\n\023\2201\330\n\034\230A\330\n\022\220!\330\n\024\220A\330\n\031\230\021\330\n\031\230\021\330\n\023\2201\340\004\013\2109\220F\230!\330\010\021\220\021\330\010\032\230!\330\010\020\220\001\330\010\022\220!\330\010\027\220t\320\0331\3201D\300A\330\014\027\220q\330\010\027\220t\320\0331\3201D\300A\330\014\027\220q\330\010\021\220\024\320\025+\320+>\270a\270{\310!\320\002(\250\001\340\004\021\220\024\220]\240.\260\001\260\021\330\004\013\210?\230!\230<\240r\250\021\200!\330\004\007\200s\210!\2109\220C\220q\330\006\n\210#\210Q\210a\330\006\t\210\022\2103\210d\220!\330\010\017\210q\330\004\032\230'\240\021\240&\250\001\200!\340\004\007\200t\2101\330\006\007\330\006\t\210\037\230\003\2301\330\010\r\320\r2\260!\360\006\000\005\023\220.\240\001\240\026\240q\330\004\017\210q\330\010\r\210R\210t\320\023#\2401\240C\320'=\270Q\330\004\017\210q\330\010\023\220=\240\002\240%\240r\250\023\250O\2701\330\004\013\2101\200!\330\004\007\200t\2101\330\006\r\210Q\330\004\022\220/\240\021\240!\330\004\013\210<\220r\230\021\200!\330\004\007\200t\2101\330\006\r\320\r\036\230a\230q\340\006\r\210Q\200!\340\004\005\330\004\007\200t\2101\330\006\007\340\010\r\320\r'\240q\330\r\016\340\006\036\230a\330\004\013\2103\210m\2304\230r\240\034\250V\2601\330 8\270\001\270\034\300Q\200!\340\004\017\210t\320\023(\320(;\2701\270K\300q\330\004\n\210$\320\016\036""\320\0361\260\021\260+\270Q\330\004\013\210:\220Q\220d\230%\230y\250\001\200!\340\004\007\200v\210R\210q\330\006\026\220f\230B\230b\240\013\2503\250b\260\003\2603\260a\340\006\025\220U\230+\240S\250\002\250#\250S\260\001\330\004\024\220E\230\031\240!\330\010\017\210}\230J\240g\250W\260A\330\004\007\200v\210Q\210o\230Q\200!\330\004\007\200v\210S\220\001\330\006\t\210\033\220A\220T\230\021\340\006\t\210\033\220A\220T\230\021\330\006\n\210-\320\027(\250\001\250\027\260\005\260Q\200!\360\006\000\005\010\200w\210a\210w\220k\240\024\240T\250\036\260s\270!\330\006\t\320\t\037\230q\240\003\2401\240A\330\006\n\210(\220!\330\010\014\210L\320\030)\250\021\250&\260\005\260Q\360\016\000\007\n\320\t\037\230r\240\021\330\006\017\320\017\"\240!\330\006\t\210\024\210^\2303\230a\330\010\035\230T\240\021\340\010 \240\001\330\014\020\320\020'\240t\2501\330\006\023\2209\230A\340\006\023\2209\230J\240a\240x\250v\260]\300$\300a\300q\330\006\023\2203\220e\2301\330\006\n\210(\220!\330\010\021\220\021\330\010\014\210L\320\030)\250\021\250&\260\010\270\001\330\010\013\2106\220\025\220c\230\022\2301\330\n\r\320\r\035\230Q\230f\240B\240a\330\n\r\210V\2201\220F\230$\230a\330\n\027\220q\330\n\023\320\023&\240a\330\n\016\210d\220.\240\007\240u\250A\330\016\021\220\025\220c\230\022\230;\240b\250\004\250A\330\014\r\330\020\032\230!\2306\240\021\330\033\"\240*\250A\250Q\330.4\260M\300\021\330\014\032\230$\230m\2501\250F\260$\260a\330\014\017\320\017\037\230r\240\021\330\014\017\210v\220Q\220m\2401\330\014\r\340\010\013\2106\220\022\2201\330\n\r\320\r\035\230Q\230f\240B\240a\330\n\r\210V\2201\220F\230$\230a\330\010\013\320\013\033\2301\230Astruct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args)\000createO"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 779; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 93) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 779; i < 989; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 989; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 779; + for (Py_ssize_t i=0; i<210; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,-1,1,2,4,8,103,104,105}; + int16_t const cint_constants_2[] = {1000,12345}; + int32_t const cint_constants_4[] = {65536L,4374576L,45818781L,51847764L,107408500L,112010984L,113116285L,120365723L,125553672L,125584289L,134056825L,136983863L,140927196L,192480703L,196964917L,238750788L,254493075L,260527683L,264067927L}; + int64_t const cint_constants_8[] = {4294967295LL,9223372036854775807LL}; + for (int i = 0; i < 32; i++) { + numbertab[i] = PyLong_FromLongLong((i < 9 ? cint_constants_1[i - 0] : (i < 11 ? cint_constants_2[i - 9] : (i < 30 ? cint_constants_4[i - 11] : cint_constants_8[i - 30])))); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 32; + const char* c_constant = "-8000000000000"; + for (int i = 0; i < 1; i++) { + char *end_pos; + numbertab[i] = PyLong_FromString(c_constant, &end_pos, 32); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + c_constant = end_pos + 1; + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<33; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 4; + unsigned int flags : 10; + unsigned int first_line : 12; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 163}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded, __pyx_mstate->__pyx_n_u_input_stream}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_all, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 504}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_field}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 666}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_q_4uAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1214}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_elem}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1811}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_encoded_window}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_a_Ry_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1815}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_a_V4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1818}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_a_t1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1821}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_a_s_awd_e3e5_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1924}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_field}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1932}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_field}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1937}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1940}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_field}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__14, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Ks, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 132}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 144}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 150}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 156}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_all, __pyx_mstate->__pyx_kp_b_iso88591_Q_1G5_3d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_nested, __pyx_mstate->__pyx_kp_b_iso88591_Q_a_3d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 175}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_nested, __pyx_mstate->__pyx_kp_b_iso88591_4_5Qj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 179}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_a_3j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 187}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inner_size, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_nested_size, __pyx_mstate->__pyx_kp_b_iso88591_t1_Q_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 193}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_4_QgYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_awk_awk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_WAXQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_4wavYaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_0_AWKwa_0_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 235}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_Q_a_3d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 241}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_4_5Qj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 245}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_a_3j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_0_AWKwa_0_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 267}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_default_size_estimator, __pyx_mstate->__pyx_kp_b_iso88591_3at7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 270}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_6_q_IQha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 274}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_4y_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 278}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 281}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 284}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_4_5Qha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 288}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_z_1_S_4_QgYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_4q_G1F_a_vWE_Q_q_t_WE_D_cQU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 304}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_proto_message_type}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 307}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 310}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded, __pyx_mstate->__pyx_n_u_proto_message}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_D_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 318}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_5_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 324}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_proto_plus_type}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 328}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_5_QnA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 331}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_4_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 362}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_base_error}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_verify_dill_compat, __pyx_mstate->__pyx_kp_b_iso88591_T_a_A_T_c_a_AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 389}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_t}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_register_iterable_like_type, __pyx_mstate->__pyx_kp_b_iso88591_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 393}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_z_1_S_a_3j_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 403}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_AQ_vS_Kq_3a_A_4_T_Q_T_q_k_aq_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 552}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_deterministic_encoding_error_ms, __pyx_mstate->__pyx_kp_b_iso88591_AXT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 586}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_j_r_A_Q_3a_V_3a_V_3a_V9AQ_3a_V9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t_D_VVZZ_C_C_a_G1F_a_vWE_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_5QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 653}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_bs, __pyx_mstate->__pyx_n_u_t}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_unpickle_type_2_67_0, __pyx_mstate->__pyx_kp_b_iso88591_d_4q_Rs_q_t6_q_V4was_fAV6_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 671}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_bs, __pyx_mstate->__pyx_n_u_items}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_unpickle_named_tuple_2_67_0, __pyx_mstate->__pyx_kp_b_iso88591_as_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 675}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_bs}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_unpickle_type, __pyx_mstate->__pyx_kp_b_iso88591_T_Qd_AV_fAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 682}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_bs, __pyx_mstate->__pyx_n_u_items}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_unpickle_named_tuple, __pyx_mstate->__pyx_kp_b_iso88591_q_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 690}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_4z_1_e1A_vQgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 700}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9IQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 704}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_QgYgT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 708}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 716}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 719}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_IZq_vS_Q_s_Q_A_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 727}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 730}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_Cq_vS_Q_s_Q_A_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 738}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 764}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dict_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_Qc_t1_y_az_q_K_e1_M_7_q_y_K_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 779}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9_Q_U_1_D_a_d_2_a_AWA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 791}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_q_Yl_k_q_Q_m_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_d_G1F_a_vWE_Q_q_t_we3d_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 807}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value_coder}; + __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591__16, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 813}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_vS_AT_AT_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 820}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested, __pyx_mstate->__pyx_n_u_null_indicator}; + __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_Yj_c_Q_Q_4q_T_1_Q_Ja_B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 831}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_2Q_M_q_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 839}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 843}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 847}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_8_AWKwVW_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_5QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 855}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 859}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 863}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_U_d_7_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 871}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 875}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 879}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 901}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_5__Cq_a_a_s_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 910}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_t1_1_2_q_q_Rt_1C_Q_q_r_O1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 925}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_5__Cq_2R_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_8_AWKwVW_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_5QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 943}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_U_Q_wc_wb_wb_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 952}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_Y_1_wb_wb_wb_9AWG2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 961}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_q_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_G1_q_34q_QR_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_0_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 969}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key_coder_impl, __pyx_mstate->__pyx_n_u_window_coder_impl, __pyx_mstate->__pyx_n_u_StrUtf8Coder}; + __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_31_q_2_1_5Qa_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 978}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_q_C5_Qe_U_Qe_uA_t5_1_Q_1_Q_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 991}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested, __pyx_mstate->__pyx_n_u_userstate, __pyx_mstate->__pyx_n_u_user_key, __pyx_mstate->__pyx_n_u_dynamic_timer_tag, __pyx_mstate->__pyx_n_u_windows, __pyx_mstate->__pyx_n_u_clear_bit}; + __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_q_t_6a_q_1_d_9_Q_1Kq_q_YfA_1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1027}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_M_1A_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1038}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1042}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_Q_r_IS_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1048}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_s_9Cq_Qa_3d_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1055}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_AQ_A_M_4AQ_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_0_AWKwa_0_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1071}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1075}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1079}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_Q_r_IS_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1085}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_s_9Cq_Qa_3d_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1092}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_3awb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_2_awk_PQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1105}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1109}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1113}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1117}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded}; + __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_4q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1120}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t87_q_34q_QR_34, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_0_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1134}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_extract_components, __pyx_mstate->__pyx_kp_b_iso88591__17, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1137}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_components}; + __pyx_mstate_global->__pyx_codeobj_tab[134] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_components, __pyx_mstate->__pyx_kp_b_iso88591__17, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1140}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[135] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_T_Qa_s_4_c_AQ_Jaq_U_3c_a_m1A_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1150}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[136] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_4_1_A_wc_2Rr_AT_CuIQd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1158}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[137] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1166}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[138] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_T_Qa_Q_U_3c_a_m1A_a_A_s_Bb_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[139] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_4q_RYYZ_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[140] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_8_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1185}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_schema}; + __pyx_mstate_global->__pyx_codeobj_tab[141] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1188}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_buf}; + __pyx_mstate_global->__pyx_codeobj_tab[142] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_Qd_81_a_q_T_1_a_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1194}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoded, __pyx_mstate->__pyx_n_u_buf}; + __pyx_mstate_global->__pyx_codeobj_tab[143] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode, __pyx_mstate->__pyx_kp_b_iso88591_Q_Zq_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1201}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[144] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_extract_components, __pyx_mstate->__pyx_kp_b_iso88591_5_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1204}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_components}; + __pyx_mstate_global->__pyx_codeobj_tab[145] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_components, __pyx_mstate->__pyx_kp_b_iso88591_5_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[146] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[147] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1209}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_head, __pyx_mstate->__pyx_n_u_tail}; + __pyx_mstate_global->__pyx_codeobj_tab[148] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591__18, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1221}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[149] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_4q_c_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1224}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[150] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591__17, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1227}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[151] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_7_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1282}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values}; + __pyx_mstate_global->__pyx_codeobj_tab[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_sequence, __pyx_mstate->__pyx_kp_b_iso88591__17, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1285}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_wawk_T_s_q_1A_L_Q_r_3a_T_t1_9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[153])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1333}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[154] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9_uCq_l_Qk_e5_i_a_F_A_E_aq_l_Qk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[154])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1361}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[155] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[155])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1369}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[156] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_a_z_1_Rwd_l_Q_1_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[156])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[157] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[157])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[158] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[158])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1401}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_components}; + __pyx_mstate_global->__pyx_codeobj_tab[159] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_sequence, __pyx_mstate->__pyx_kp_b_iso88591_5_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[159])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[160] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[160])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[161] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_4AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[161])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[162] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_gQ_q_2_awk_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[162])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[163] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[163])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1445}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_components}; + __pyx_mstate_global->__pyx_codeobj_tab[164] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_sequence, __pyx_mstate->__pyx_kp_b_iso88591_t1_aq_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[164])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[165] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t_5NdRaaeef_G1F_a_vWE_Q_q_t_u, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[165])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[166] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[166])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1456}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_components}; + __pyx_mstate_global->__pyx_codeobj_tab[167] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_construct_from_sequence, __pyx_mstate->__pyx_kp_b_iso88591_1L_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t__D_G1F_a_vWE_Q_q_t_uCt_uTWW_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1494}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_D_9O3nCq_S_s_q_s_q_q_q_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1509}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_A_5_q_s_S_Q_s_i_a_XS_oQ_q_s_i, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1531}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[172] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_1_D_S_oQe1_s_oQe1_oQe1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[173] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_2_awk_PQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[173])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[174] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[174])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1551}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[175] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_d_1_V9AT_A_aq_D_Qa_7_q_3a_j_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[175])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1565}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[176] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_s_Q_3a_j_T_9_Q_m1A_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[176])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[177] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_4q_G1F_a_vWE_Q_q_t_S_RRYY_aae, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[177])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[178] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_4AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[178])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1600}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[179] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_1E_Rwa_a_a_1_B_b0C3a_U_2_a_ar_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[179])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1621}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[180] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_AY_DA_z_Bc_0_1_3_3a_1_d_4A_8_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[180])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1647}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[181] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_z_1_S_Q_Q_M_A_a_1_1E1DA_O_1E1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_4_dRS_G1F_a_vWE_Q_q_t_WE_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_4AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1684}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_payload, __pyx_mstate->__pyx_n_u_window_coder, __pyx_mstate->__pyx_n_u_windowed_value_coder, __pyx_mstate->__pyx_n_u_wv}; + __pyx_mstate_global->__pyx_codeobj_tab[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_from_proto, __pyx_mstate->__pyx_kp_b_iso88591_1_d_D_WAQ_2_Ba, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1690}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_ar_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1694}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_D_0_A_t_Kt1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1699}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[187] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_get_estimated_size_and_observabl, __pyx_mstate->__pyx_kp_b_iso88591_Q_z_1_S_Q_Q_M_A_a_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[188] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_5T_dJ_aapptt_D_D_E_G1F_a_vW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_9_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1723}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_D_WAQ_q_1A_vQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1729}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_9O1_4_G1IU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1734}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[193] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t_q_6d_7_WTU_6d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[194] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_31F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1749}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key_coder_impl}; + __pyx_mstate_global->__pyx_codeobj_tab[195] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1753}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_auL_Q_vU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1758}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested, __pyx_mstate->__pyx_n_u_shard_id_2, __pyx_mstate->__pyx_n_u_key}; + __pyx_mstate_global->__pyx_codeobj_tab[197] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_t_1Kq_1_Q_Qd_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1764}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested, __pyx_mstate->__pyx_n_u_estimated_size}; + __pyx_mstate_global->__pyx_codeobj_tab[198] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_Q_q_N_5_gQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1784}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_window_coder_impl}; + __pyx_mstate_global->__pyx_codeobj_tab[199] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1787}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[200] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_b_T_AWHA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1791}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_b_1HA_4_5Qha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1795}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_h_q_N_5_d_QgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1804}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_encoded_window, __pyx_mstate->__pyx_n_u_BoundedWindow}; + __pyx_mstate_global->__pyx_codeobj_tab[203] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_create_opaque_window, __pyx_mstate->__pyx_kp_b_iso88591_3a_a_auA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[203])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1839}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[204] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_init_2, __pyx_mstate->__pyx_kp_b_iso88591__19, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1842}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[205] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_b_T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1846}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_nested, __pyx_mstate->__pyx_n_u_max_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[206] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_b_1HA_Zt6_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1851}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[207] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_estimate_size, __pyx_mstate->__pyx_kp_b_iso88591_h_q_N_5_d_1E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1863}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_field_type, __pyx_mstate->__pyx_n_u_coder_impl}; + __pyx_mstate_global->__pyx_codeobj_tab[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_register, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1867}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_field_type, __pyx_mstate->__pyx_n_u_coder_impl, __pyx_mstate->__pyx_n_u_column, __pyx_mstate->__pyx_n_u_coder_impl_row_encoders}; + __pyx_mstate_global->__pyx_codeobj_tab[209] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_create, __pyx_mstate->__pyx_kp_b_iso88591_t1_q_a_3m4r_V1_8_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1880}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[210] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_null_flags, __pyx_mstate->__pyx_kp_b_iso88591_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1889}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[211] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_finalize_write, __pyx_mstate->__pyx_kp_b_iso88591_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[211])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[212] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[212])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[213] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[213])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1898}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[214] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_null_flags, __pyx_mstate->__pyx_kp_b_iso88591_4xs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[214])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1908}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[215] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_finalize_write, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[215])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[216] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_G1F_a_vWE_Q_q_t_we3d_q_8_AW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[217] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_5QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1942}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[218] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_q_A_AWAWF_hd_t1_5_1_a_2T_Rs_Q_C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1980}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[219] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_row_column_encoders, __pyx_mstate->__pyx_kp_b_iso88591_1_q_war_a_1A_1G4s_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1988}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_columns, __pyx_mstate->__pyx_n_u_out}; + __pyx_mstate_global->__pyx_codeobj_tab[220] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_batch_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Qa_1D_QgWA_t1_b_b_4_V2Q_t_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2025}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[221] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_I_A_I_A_q_O9E_U_t_T_D_1A_Bc_2_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2058}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dest, __pyx_mstate->__pyx_n_u_in_stream}; + __pyx_mstate_global->__pyx_codeobj_tab[222] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_batch_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_1_D_Qa_1D_Qd_U_1_s_Q_i_a_i_a_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[223] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_4I_Mnnr_s_P_P_T_T_b_b_f_f_w, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[224] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2093}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[225] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_4_5Q_M_0_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2097}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[226] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_4_Q_4A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[227] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_A_G1F_a_vWE_Q_q_t_S_RRYYZ_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[228] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2107}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[229] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_vRq_fBb_3b_3a_U_S_S_E_JgWA_vQoQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2117}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[230] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_IYaq_3k_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[231] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[232] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2131}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[233] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_encode_to_stream, __pyx_mstate->__pyx_kp_b_iso88591_AU_2Q_1E_q_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2138}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_in_stream, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[234] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_py, __pyx_mstate->__pyx_n_u_decode_from_stream, __pyx_mstate->__pyx_kp_b_iso88591_I_A_a_G81JgQaq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_CoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[238] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SimpleCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[238])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_StreamCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_CallbackCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[241] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_FastPrimitivesCod, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BytesCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BooleanCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[244] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MapCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_a_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BigEndianShortCod, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[246] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SinglePrecisionFl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_0_7_q_nno_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_FloatCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[248] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_IntervalWindowCod, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_TimestampCoderImp, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[250] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_VarIntCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_VarInt32CoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[251])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[252] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SingletonCoderImp, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_AbstractComponent, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_ZZhhi_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[253])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[254] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_TupleCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SequenceCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_TupleSequenceCode, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__AbstractIterable, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[258] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_IterableCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[259] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ListCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[260] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_PaneInfoCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[261] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__OrderedUnionCode, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[261])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[262] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_WindowedValueCode, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[262])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[263] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ParamWindowedValu, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[263])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[264] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_LengthPrefixCoder, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_7q8PP___1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[264])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[265] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_RowColumnEncoder, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[265])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[266] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_GenericRowColumnE, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[266])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[267] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_RowCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_a_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[267])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[268] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_LogicalTypeCoderI, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[268])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[269] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BigIntegerCoderIm, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[269])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[270] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DecimalCoderImpl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[270])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* CIntToDigits (used by CIntToPyUnicode) */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + Py_ssize_t padding_length = ulength - 1; + if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) padding_length); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= padding_length; + memset(cpos, padding_char, (size_t) padding_length); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, padding_length); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(int)*3+2]; + char *dpos, *end = digits + sizeof(int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + int remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (int) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (int) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(Py_ssize_t)*3+2]; + char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + Py_ssize_t remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (Py_ssize_t) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (Py_ssize_t) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (Py_ssize_t) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* DivInt[Py_ssize_t] */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) { + Py_ssize_t q = a / b; + Py_ssize_t r = a - q*b; + Py_ssize_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; itp_as_sequence && type->tp_as_sequence->sq_repeat)) { + return type->tp_as_sequence->sq_repeat(seq, mul); + } else { + return __Pyx_PySequence_Multiply_Generic(seq, mul); + } +} +#endif + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* PyObjectFormat */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { + int ret; + _PyUnicodeWriter writer; + if (likely(PyFloat_CheckExact(obj))) { + _PyUnicodeWriter_Init(&writer); + ret = _PyFloat_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else if (likely(PyLong_CheckExact(obj))) { + _PyUnicodeWriter_Init(&writer); + ret = _PyLong_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else { + return PyObject_Format(obj, format_spec); + } + if (unlikely(ret == -1)) { + _PyUnicodeWriter_Dealloc(&writer); + return NULL; + } + return _PyUnicodeWriter_Finish(&writer); +} +#endif + +/* SetItemInt */ +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (unlikely(!j)) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) { + Py_INCREF(v); + return PyList_SetItem(o, n, v); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old; + Py_INCREF(v); + old = PyList_GET_ITEM(o, n); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 0; + } + } else +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_ass_subscript) { + int r; + PyObject *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return -1; + r = mm->mp_ass_subscript(o, key, v); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return sm->sq_ass_item(o, i, v); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_SetItem(o, i, v); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v); +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* DivInt[long] */ +static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) { + long q = a / b; + long r = a - q*b; + long adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* PyObjectCallNoArg (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* pyfrozenset_new (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000) +#if CYTHON_COMPILING_IN_LIMITED_API + || __Pyx_get_runtime_version() >= 0x030A0000 +#endif + ) + return result; + { + Py_ssize_t size = __Pyx_PySet_GET_SIZE(result); + if (likely(size > 0)) + return result; +#if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) { + Py_DECREF(result); + return NULL; + } +#endif + } + Py_DECREF(result); +#endif + } + return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type); +} + +/* PySetContains */ +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* decode_c_bytes (used by decode_bytes) */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* RaiseClosureNameError */ +static void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return __Pyx_CallCFunction(cfunc, self, arg); + } else if (flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); + } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); + } + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); + } +#endif + PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + } else +#endif + { + result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); + } + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* UnicodeAsUCS4 (used by object_ord) */ +static void __Pyx_PyUnicode_AsPy_UCS4_error(Py_ssize_t length) { + if (likely(length >= 0)) { + PyErr_Format(PyExc_ValueError, + "only single character unicode strings can be converted to Py_UCS4, " + "got length %" CYTHON_FORMAT_SSIZE_T "d", length); + } +} +static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { + Py_ssize_t length = __Pyx_PyUnicode_GET_LENGTH(x); + if (unlikely(length != 1)) { + __Pyx_PyUnicode_AsPy_UCS4_error(length); + return (Py_UCS4)-1; + } + return __Pyx_PyUnicode_READ_CHAR(x, 0); +} + +/* object_ord */ +static long __Pyx__PyObject_Ord(PyObject* c) { + Py_ssize_t size; + if (PyBytes_Check(c)) { + size = __Pyx_PyBytes_GET_SIZE(c); + if (likely(size == 1)) { +#if CYTHON_ASSUME_SAFE_MACROS + return (unsigned char) PyBytes_AS_STRING(c)[0]; +#else + char *data = PyBytes_AsString(c); + if (unlikely(!data)) return -1; + return (unsigned char) data[0]; +#endif + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(size < 0)) return -1; +#endif + } else if (PyByteArray_Check(c)) { + size = __Pyx_PyByteArray_GET_SIZE(c); + if (likely(size == 1)) { +#if CYTHON_ASSUME_SAFE_MACROS + return (unsigned char) PyByteArray_AS_STRING(c)[0]; +#else + char *data = PyByteArray_AsString(c); + if (unlikely(!data)) return -1; + return (unsigned char) data[0]; +#endif + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(size < 0)) return -1; +#endif + } else { + __Pyx_TypeName c_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(c)); + PyErr_Format(PyExc_TypeError, + "ord() expected string of length 1, but " __Pyx_FMT_TYPENAME " found", + c_type_name); + __Pyx_DECREF_TypeName(c_type_name); + return (long)(Py_UCS4)-1; + } + PyErr_Format(PyExc_TypeError, + "ord() expected a character, but string of length %zd found", size); + return (long)(Py_UCS4)-1; +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddCObj(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + long b; + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb; + if (unlikely(__Pyx_PyLong_IsZero(op2))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op2); + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2); + if (likely(size == 1)) { + b = (long) digits[0]; + if (!is_positive) b *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddCObj(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + double b = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + return __Pyx_Unpacked___Pyx_PyLong_AddCObj(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op2)) { + return __Pyx_Float___Pyx_PyLong_AddCObj(op2, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddCObj(op1, op2, inplace); +} +#endif + +/* DivInt[int64_t] */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t a, int64_t b, int b_is_constant) { + int64_t q = a / b; + int64_t r = a - q*b; + int64_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2); + } + calculate_long: + { + long q, r; + q = a / b; + r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return PyLong_FromLong(q); + } + calculate_long_long: + { + PY_LONG_LONG q, r; + q = lla / llb; + r = lla - q*llb; + q -= ((r != 0) & ((r ^ llb) < 0)); + return PyLong_FromLongLong(q); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(op1, op2, inplace); +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_multiply(op1, op2); + } + calculate_long: + CYTHON_UNUSED_VAR(a); + CYTHON_UNUSED_VAR(b); + lla = a; + goto calculate_long_long; + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) * (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace); +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* pybuiltin_invalid (used by pyint_simplify) */ +static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + if (argname) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", + argname, type_name, obj_type_name + ); + } else { + PyErr_Format(PyExc_TypeError, + "Expected %.200s, got " __Pyx_FMT_TYPENAME, + type_name, obj_type_name + ); + } + __Pyx_DECREF_TypeName(obj_type_name); +} + +/* pyint_simplify */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { + PyObject *number = *number_var; + if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { + return 0; + } + PyObject *int_object; + if (likely(PyNumber_Check(number))) { + int_object = PyNumber_Long(number); + if (unlikely(!int_object)) goto bad; + } else { + __Pyx_PyBuiltin_Invalid(number, "int", argname); + goto bad; + } + *number_var = int_object; + Py_DECREF(number); + return 0; +bad: + *number_var = NULL; + Py_DECREF(number); + return -1; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CyFunctionClassCell */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = __Pyx_PyList_GET_SIZE(cyfunctions); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(count < 0)) return -1; + #endif + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + __Pyx_PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + __Pyx_CyFunction_SetClassObj(m, classobj); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* ModInt[long] */ +static CYTHON_INLINE long __Pyx_mod_long(long a, long b, int b_is_constant) { + long r = a % b; + long adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return r + adapt_python * b; +} + +/* IterNextPlain (used by IterNext) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* IterNext */ +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(defval); + return defval; + } + if (defval) { + Py_INCREF(defval); + return defval; + } + __Pyx_PyErr_SetNone(PyExc_StopIteration); + return NULL; +} +static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { + __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator)); + PyErr_Format(PyExc_TypeError, + __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name); + __Pyx_DECREF_TypeName(iterator_type_name); +} +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { + PyObject* next; +#if !CYTHON_COMPILING_IN_LIMITED_API + iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc); + if (likely(iternext)) { + next = iternext(iterator); + if (likely(next)) + return next; + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + if (unlikely(iternext == &_PyObject_NextNotImplemented)) + return NULL; + #endif + } else if (CYTHON_USE_TYPE_SLOTS) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else +#endif + if (unlikely(!PyIter_Check(iterator))) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else { + next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator); + if (likely(next)) + return next; + } + return __Pyx_PyIter_Next2Default(defval); +} + +/* PyLongCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + Py_RETURN_FALSE; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + Py_RETURN_TRUE; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + Py_RETURN_TRUE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_NE)); +} + +/* BufferIndexError */ +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallNextTpTraverse */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + traverseproc tp_traverse = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_traverse) + return tp_traverse(obj, v, a); + return 0; +} + +/* CallNextTpClear */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + inquiry tp_clear = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_clear) + tp_clear(obj); +} + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_2_4 +#define __PYX_HAVE_RT_ImportFunction_3_2_4 +static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + union { + void (*fp)(void); + void *p; + } tmp; + int result = __Pyx_ImportFromPxd_3_2_4(module, funcname, &tmp.p, sig, "function"); + if (result == 0) { + *f = tmp.fp; + } + return result; +} +#endif + +/* Globals */ +static PyObject* __Pyx_Globals(void) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_d); +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; itp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* ClassMethod */ +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (PyMethodDescr_Check(method)) +#else + if (__Pyx_TypeCheck(method, &PyMethodDescr_Type)) +#endif + { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyErr_Format( + PyExc_SystemError, + "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. " + "This is most likely a classmethod in a cdef class method with binding=False. " + "Try setting 'binding' to True.", + method); +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PyTypeObject *d_type = GraalPyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); +#elif CYTHON_COMPILING_IN_GRAAL + PyTypeObject *d_type = PyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); +#else + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + PyTypeObject *d_type = descr->d_common.d_type; + return PyDescr_NewClassMethod(d_type, descr->d_method); +#endif + } +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API + else if (PyMethod_Check(method)) { + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else { + return PyClassMethod_New(method); + } +#else + { + PyObject *func=NULL; + PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; + if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { + func = PyObject_GetAttrString(method, "__func__"); + if (!func) goto bad; + } else { + func = method; + Py_INCREF(func); + } + builtins = PyEval_GetBuiltins(); // borrowed + if (unlikely(!builtins)) goto bad; + classmethod_str = PyUnicode_FromString("classmethod"); + if (unlikely(!classmethod_str)) goto bad; + classmethod = PyObject_GetItem(builtins, classmethod_str); + Py_DECREF(classmethod_str); + if (unlikely(!classmethod)) goto bad; + result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); + Py_DECREF(classmethod); + bad: + Py_XDECREF(func); + return result; + } +#endif +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* MemviewRefcount */ +#include +#ifndef _Py_NO_RETURN +#define _Py_NO_RETURN +#endif +_Py_NO_RETURN +static void __pyx_fatalerror(const char *fmt, ...) { + va_list vargs; + char msg[200]; +#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES) + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + va_end(vargs); + Py_FatalError(msg); +} +static CYTHON_INLINE int +__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)++; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE int +__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)--; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE void +__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) +{ + __pyx_nonatomic_int_type old_acquisition_count; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (unlikely(!memview || (PyObject *) memview == Py_None)) { + return; + } + old_acquisition_count = __pyx_add_acquisition_count(memview); + if (unlikely(old_acquisition_count <= 0)) { + if (likely(old_acquisition_count == 0)) { + if (have_gil) { + Py_INCREF((PyObject *) memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_INCREF((PyObject *) memview); + PyGILState_Release(_gilstate); + } + } else { + __pyx_fatalerror("Acquisition count is %d (line %d)", + old_acquisition_count+1, lineno); + } + } +} +static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, + int have_gil, int lineno) { + __pyx_nonatomic_int_type old_acquisition_count; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (unlikely(!memview || (PyObject *) memview == Py_None)) { + memslice->memview = NULL; + return; + } + old_acquisition_count = __pyx_sub_acquisition_count(memview); + memslice->data = NULL; + if (likely(old_acquisition_count > 1)) { + memslice->memview = NULL; + } else if (likely(old_acquisition_count == 1)) { + if (have_gil) { + Py_CLEAR(memslice->memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_CLEAR(memslice->memview); + PyGILState_Release(_gilstate); + } + } else { + __pyx_fatalerror("Acquisition count is %d (line %d)", + old_acquisition_count-1, lineno); + } +} + +/* MemviewSliceIsContig */ +static int +__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) +{ + int i, index, step, start; + Py_ssize_t itemsize = mvs.memview->view.itemsize; + if (order == 'F') { + step = 1; + start = 0; + } else { + step = -1; + start = ndim - 1; + } + for (i = 0; i < ndim; i++) { + index = start + step * i; + if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) + return 0; + itemsize *= mvs.shape[index]; + } + return 1; +} + +/* OverlappingSlices */ +static void +__pyx_get_array_memory_extents(__Pyx_memviewslice *slice, + void **out_start, void **out_end, + int ndim, size_t itemsize) +{ + char *start, *end; + int i; + start = end = slice->data; + for (i = 0; i < ndim; i++) { + Py_ssize_t stride = slice->strides[i]; + Py_ssize_t extent = slice->shape[i]; + if (extent == 0) { + *out_start = *out_end = start; + return; + } else { + if (stride > 0) + end += stride * (extent - 1); + else + start += stride * (extent - 1); + } + } + *out_start = start; + *out_end = end + itemsize; +} +static int +__pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize) +{ + void *start1, *end1, *start2, *end2; + __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); + __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); + return (start1 < end2) && (start2 < end1); +} + +/* MemviewSliceInit */ +static int +__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference) +{ + __Pyx_RefNannyDeclarations + int i, retval=-1; + Py_buffer *buf = &memview->view; + __Pyx_RefNannySetupContext("init_memviewslice", 0); + if (unlikely(memviewslice->memview || memviewslice->data)) { + PyErr_SetString(PyExc_ValueError, + "memviewslice is already initialized!"); + goto fail; + } + if (buf->strides) { + for (i = 0; i < ndim; i++) { + memviewslice->strides[i] = buf->strides[i]; + } + } else { + Py_ssize_t stride = buf->itemsize; + for (i = ndim - 1; i >= 0; i--) { + memviewslice->strides[i] = stride; + stride *= buf->shape[i]; + } + } + for (i = 0; i < ndim; i++) { + memviewslice->shape[i] = buf->shape[i]; + if (buf->suboffsets) { + memviewslice->suboffsets[i] = buf->suboffsets[i]; + } else { + memviewslice->suboffsets[i] = -1; + } + } + memviewslice->memview = memview; + memviewslice->data = (char *)buf->buf; + if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { + Py_INCREF((PyObject*)memview); + } + retval = 0; + goto no_fail; +fail: + memviewslice->memview = 0; + memviewslice->data = 0; + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + +/* IsLittleEndian (used by BufferFormatCheck) */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck (used by MemviewSliceValidateAndInit) */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + const __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparsable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) { + CYTHON_UNUSED_VAR(is_complex); + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) { + CYTHON_UNUSED_VAR(is_complex); + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + const __Pyx_StructField* field = ctx->head->field; + const __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + const __Pyx_StructField* field = ctx->head->field; + const __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static int +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return -1; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return -1; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + return -1; + } + if (*ts != ',' && *ts != ')') { + PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + return -1; + } + if (*ts == ',') ts++; + i++; + } + if (i != ndim) { + PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + return -1; + } + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return -1; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return 0; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* TypeInfoCompare (used by MemviewSliceValidateAndInit) */ + static int + __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b) + { + int i; + if (!a || !b) + return 0; + if (a == b) + return 1; + if (a->size != b->size || a->typegroup != b->typegroup || + a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { + if (a->typegroup == 'H' || b->typegroup == 'H') { + return a->size == b->size; + } else { + return 0; + } + } + if (a->ndim) { + for (i = 0; i < a->ndim; i++) + if (a->arraysize[i] != b->arraysize[i]) + return 0; + } + if (a->typegroup == 'S') { + if (a->flags != b->flags) + return 0; + if (a->fields || b->fields) { + if (!(a->fields && b->fields)) + return 0; + for (i = 0; a->fields[i].type && b->fields[i].type; i++) { + const __Pyx_StructField *field_a = a->fields + i; + const __Pyx_StructField *field_b = b->fields + i; + if (field_a->offset != field_b->offset || + !__pyx_typeinfo_cmp(field_a->type, field_b->type)) + return 0; + } + return !a->fields[i].type && !b->fields[i].type; + } + } + return 1; + } + +/* MemviewSliceValidateAndInit (used by ObjectToMemviewSlice) */ + static int + __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) + { + if (buf->shape[dim] <= 1) + return 1; + if (buf->strides) { + if (spec & __Pyx_MEMVIEW_CONTIG) { + if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { + if (unlikely(buf->strides[dim] != sizeof(void *))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly contiguous " + "in dimension %d.", dim); + goto fail; + } + } else if (unlikely(buf->strides[dim] != buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_FOLLOW) { + Py_ssize_t stride = buf->strides[dim]; + if (stride < 0) + stride = -stride; + if (unlikely(stride < buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + } else { + if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not contiguous in " + "dimension %d", dim); + goto fail; + } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not indirect in " + "dimension %d", dim); + goto fail; + } else if (unlikely(buf->suboffsets)) { + PyErr_SetString(PyExc_ValueError, + "Buffer exposes suboffsets but no strides"); + goto fail; + } + } + return 1; + fail: + return 0; + } + static int + __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec) + { + CYTHON_UNUSED_VAR(ndim); + if (spec & __Pyx_MEMVIEW_DIRECT) { + if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { + PyErr_Format(PyExc_ValueError, + "Buffer not compatible with direct access " + "in dimension %d.", dim); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_PTR) { + if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly accessible " + "in dimension %d.", dim); + goto fail; + } + } + return 1; + fail: + return 0; + } + static int + __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) + { + int i; + if (c_or_f_flag & __Pyx_IS_F_CONTIG) { + Py_ssize_t stride = 1; + for (i = 0; i < ndim; i++) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not fortran contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { + Py_ssize_t stride = 1; + for (i = ndim - 1; i >- 1; i--) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not C contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } + return 1; + fail: + return 0; + } + static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + const __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj) + { + struct __pyx_memoryview_obj *memview, *new_memview; + __Pyx_RefNannyDeclarations + Py_buffer *buf; + int i, spec = 0, retval = -1; + __Pyx_BufFmt_Context ctx; + int from_memoryview = __pyx_memoryview_check(original_obj); + __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); + if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) + original_obj)->typeinfo)) { + memview = (struct __pyx_memoryview_obj *) original_obj; + new_memview = NULL; + } else { + memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + original_obj, buf_flags, 0, dtype); + new_memview = memview; + if (unlikely(!memview)) + goto fail; + } + buf = &memview->view; + if (unlikely(buf->ndim != ndim)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + ndim, buf->ndim); + goto fail; + } + if (new_memview) { + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; + } + if (unlikely((unsigned) buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " + "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", + buf->itemsize, + (buf->itemsize > 1) ? "s" : "", + dtype->name, + dtype->size, + (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->len > 0) { + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) + goto fail; + if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) + goto fail; + } + if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) + goto fail; + } + if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, + new_memview != NULL) == -1)) { + goto fail; + } + retval = 0; + goto no_fail; + fail: + Py_XDECREF((PyObject*)new_memview); + retval = -1; + no_fail: + __Pyx_RefNannyFinishContext(); + return retval; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn_uint8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2, + &__Pyx_TypeInfo_nn_uint8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int neg_one = (int) -1, const_zero = (int) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int neg_one = (int) -1, const_zero = (int) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (int) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntFromPy */ + static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; + } + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const long neg_one = (long) -1, const_zero = (long) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (long) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; + } + +/* CIntFromPy */ + static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned char) -1; + val = __Pyx_PyLong_As_unsigned_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT)) { + return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT)) { + return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT)) { + return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(unsigned char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(unsigned char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + unsigned char val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned char) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned char) 1) << (sizeof(unsigned char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (unsigned char) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned char"); + return (unsigned char) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned char"); + return (unsigned char) -1; + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const long neg_one = (long) -1, const_zero = (long) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int32_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(int32_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int32_t), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntFromPy */ + static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int32_t) -1; + val = __Pyx_PyLong_As_int32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) { + return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) { + return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) { + return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(int32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(int32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int32_t val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (int32_t) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int32_t"); + return (int32_t) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int32_t"); + return (int32_t) -1; + } + +/* CIntFromPy */ + static CYTHON_INLINE int16_t __Pyx_PyLong_As_int16_t(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int16_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int16_t) -1; + val = __Pyx_PyLong_As_int16_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 2 * PyLong_SHIFT)) { + return (int16_t) (((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 3 * PyLong_SHIFT)) { + return (int16_t) (((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 4 * PyLong_SHIFT)) { + return (int16_t) (((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int16_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(int16_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int16_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + return (int16_t) ((((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + return (int16_t) ((((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) { + return (int16_t) ((((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(int16_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int16_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int16_t val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int16_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int16_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int16_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int16_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int16_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int16_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int16_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int16_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int16_t) 1) << (sizeof(int16_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (int16_t) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int16_t"); + return (int16_t) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int16_t"); + return (int16_t) -1; + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int16_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int16_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(int16_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int16_t), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int16_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(uint64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(uint64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(uint64_t), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* MemviewSliceCopy */ + static __Pyx_memviewslice + __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object) + { + __Pyx_RefNannyDeclarations + int i; + __Pyx_memviewslice new_mvs = __Pyx_MEMSLICE_INIT; + struct __pyx_memoryview_obj *from_memview = from_mvs->memview; + Py_buffer *buf = &from_memview->view; + PyObject *shape_tuple = NULL; + PyObject *temp_int = NULL; + struct __pyx_array_obj *array_obj = NULL; + struct __pyx_memoryview_obj *memview_obj = NULL; + __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); + for (i = 0; i < ndim; i++) { + if (unlikely(from_mvs->suboffsets[i] >= 0)) { + PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " + "indirect dimensions (axis %d)", i); + goto fail; + } + } + shape_tuple = PyTuple_New(ndim); + if (unlikely(!shape_tuple)) { + goto fail; + } + __Pyx_GOTREF(shape_tuple); + for(i = 0; i < ndim; i++) { + temp_int = PyLong_FromSsize_t(from_mvs->shape[i]); + if(unlikely(!temp_int)) { + goto fail; + } else { + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(shape_tuple, i, temp_int); + #else + if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) { + goto fail; + } + #endif + temp_int = NULL; + } + } + array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL); + if (unlikely(!array_obj)) { + goto fail; + } + __Pyx_GOTREF(array_obj); + memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + (PyObject *) array_obj, contig_flag, + dtype_is_object, + from_mvs->memview->typeinfo); + if (unlikely(!memview_obj)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) + goto fail; + if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, + dtype_is_object) < 0)) + goto fail; + goto no_fail; + fail: + __Pyx_XDECREF((PyObject *) new_mvs.memview); + new_mvs.memview = NULL; + new_mvs.data = NULL; + no_fail: + __Pyx_XDECREF(shape_tuple); + __Pyx_XDECREF(temp_int); + __Pyx_XDECREF((PyObject *) array_obj); + __Pyx_RefNannyFinishContext(); + return new_mvs; + } + +/* CIntFromPy */ + static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + size_t val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; + } + +/* UpdateUnpickledDict */ + static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; + } + static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); + } + +/* CIntFromPy */ + static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const char neg_one = (char) -1, const_zero = (char) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (char) -1; + val = __Pyx_PyLong_As_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + char val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (char) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; + } + +/* FormatTypeName */ + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static __Pyx_TypeName + __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) + { + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__12); + } + goto done; + } + #endif + +/* GetRuntimeVersion */ + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + void __Pyx_init_runtime_version(void) { + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + } + #endif + static unsigned long __Pyx_get_runtime_version(void) { + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; + #else + return __Pyx_cached_runtime_version; + #endif + } + +/* ReturnWithStopIteration (used by CoroutineBase) */ + static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); + static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); + } + static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { + #if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare + #endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; + #if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif + #else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; + #endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); + } + +/* CoroutineBase (used by Generator) */ + #if !CYTHON_COMPILING_IN_LIMITED_API + #include + #if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" + #endif + #endif // CYTHON_COMPILING_IN_LIMITED_API + static CYTHON_INLINE void + __Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { + #if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; + #endif + Py_CLEAR(gen->yieldfrom); + } + static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); + #elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); + #else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; + #endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); + #if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + #if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; + #endif + *pvalue = value; + return 0; + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; + #endif + } + static CYTHON_INLINE + __Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } + } + static CYTHON_INLINE + void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { + #if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); + #else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); + #endif + } + #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) + static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); + } + static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } + } + static + __Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; + #else + tstate = __Pyx_PyThreadState_Current; + #endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } + #if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; + #else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } + #endif + retval = self->body(self, tstate, value); + #if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); + #endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; + } + static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { + #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } + #endif + } + #define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) + static PyObject * + __Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; + } + #if CYTHON_COMPILING_IN_CPYTHON + static CYTHON_INLINE + PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { + #if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); + #else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { + #if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); + #else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } + #endif + } + Py_DECREF(result); + result = NULL; + } + return result; + #endif + } + #endif + static CYTHON_INLINE __Pyx_PySendResult + __Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; + } + #if CYTHON_USE_AM_SEND + static __Pyx_PySendResult + __Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; + } + #endif + static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } + static __Pyx_PySendResult + __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; + } + static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; + } + static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); + } + static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; + } + static __Pyx_PySendResult + __Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } + } + static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } + throw_here: + __Pyx_Raise(typ, val, tb, NULL); + propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } + } + static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); + } + static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { + #if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); + #else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); + #endif + return 0; + } + static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); + } + static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } + #endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; + } + static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) + #else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) + #endif + { + return; + } + PyObject_GC_UnTrack(self); + } + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } + #endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); + } + #if CYTHON_USE_TP_FINALIZE + static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } + #endif + if (unlikely(gen->resume_label == 0 && !error_value)) { + #ifdef __Pyx_Coroutine_USED + #ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) + #endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } + #endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + } + #endif + static PyObject * + __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) + { + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; + } + static int + __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) + { + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; + } + static PyObject * + __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) + { + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; + } + static int + __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) + { + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; + } + static PyObject * + __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) + { + #if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; + #else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; + #endif + } + static PyObject * + __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); + } + static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); + } + static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif + #if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; + #endif + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; + #endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; + } + static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; + } + static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + } + static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; + } + static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; + } + #if __PYX_HAS_PY_AM_SEND == 2 + static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); + } + #endif + static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; + } + +/* Generator */ + static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} + }; + static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, + #endif + {0, 0, 0, 0, 0} + }; + static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} + }; + static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, + #if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, + #endif + #if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, + #endif + {0, 0}, + }; + static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, + #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | + #endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots + }; + #if __PYX_HAS_PY_AM_SEND == 2 + static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; + #endif + static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } + #if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); + #endif + return 0; + } + static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; + } + +/* CheckBinaryVersion */ + static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } + } + +/* NewCodeObj */ + #if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } + #elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } + #elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #endif + static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map + ) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); + done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; + } + +/* DecompressString */ + static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; + import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); + bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; + } + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + + /* MultiPhaseInitModuleState */ + #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE + #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 + #else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 + #endif + #endif + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS + #error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" + #endif + #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + #define __Pyx_ModuleStateLookup_Lock() + #define __Pyx_ModuleStateLookup_Unlock() + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; + #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(__cplusplus) && __cplusplus >= 201103L + #include + static std::mutex __Pyx_ModuleStateLookup_mutex; + #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() + #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() + #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) + #include + static mtx_t __Pyx_ModuleStateLookup_mutex; + static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; + static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); + } + #define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(HAVE_PTHREAD_H) + #include + static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; + #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(_WIN32) + #include // synchapi.h on its own doesn't work + static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; + #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) + #else + #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." + #endif + typedef struct { + int64_t id; + PyObject *module; + } __Pyx_InterpreterIdAndModule; + typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; + } __Pyx_ModuleStateLookupData; + #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; + #endif + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; + #else + static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; + #endif + static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; + } + static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; + #else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; + #endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + #endif + return result; + } + } + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); + } + #else + #define __Pyx_ModuleStateLookup_wait_until_no_readers() + #endif + static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; + } + static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; + } + static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); + #else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; + #endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); + #else + __Pyx_ModuleStateLookup_data = new_data; + #endif + __Pyx_ModuleStateLookup_Unlock(); + return result; + } + static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); + #else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; + #endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); + #else + __Pyx_ModuleStateLookup_data = data; + #endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; + } + #endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/coders/coder_impl.cp314-win_amd64.pyd b/sdks/python/apache_beam/coders/coder_impl.cp314-win_amd64.pyd new file mode 100644 index 000000000000..2caf778e40ac Binary files /dev/null and b/sdks/python/apache_beam/coders/coder_impl.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/coders/coder_impl_row_encoders.c b/sdks/python/apache_beam/coders/coder_impl_row_encoders.c new file mode 100644 index 000000000000..4c976a75d501 --- /dev/null +++ b/sdks/python/apache_beam/coders/coder_impl_row_encoders.c @@ -0,0 +1,39464 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.coders.coder_impl_row_encoders", + "sources": [ + "apache_beam\\coders\\coder_impl_row_encoders.pyx" + ] + }, + "module_name": "apache_beam.coders.coder_impl_row_encoders" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__coders__coder_impl_row_encoders +#define __PYX_HAVE_API__apache_beam__coders__coder_impl_row_encoders +/* Early includes */ +#include +#include + + /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */ + +#include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" +#include "numpy/ufuncobject.h" +#include +#include +#include "math.h" +#include "pythread.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER)) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/coders/coder_impl_row_encoders.pyx", + "", + "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd", + "cpython/type.pxd", + "apache_beam/coders/stream.pxd", + "apache_beam/utils/windowed_value.pxd", + "apache_beam/coders/coder_impl.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* BufferFormatStructs.proto */ +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + const struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + const __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + const __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + +/* MemviewSliceStruct.proto */ +struct __pyx_memoryview_obj; +typedef struct { + struct __pyx_memoryview_obj *memview; + char *data; + Py_ssize_t shape[8]; + Py_ssize_t strides[8]; + Py_ssize_t suboffsets[8]; +} __Pyx_memviewslice; +#define __Pyx_MemoryView_Len(m) (m.shape[0]) +#define __Pyx_MEMVIEW_DIRECT 1 +#define __Pyx_MEMVIEW_PTR 2 +#define __Pyx_MEMVIEW_FULL 4 +#define __Pyx_MEMVIEW_CONTIG 8 +#define __Pyx_MEMVIEW_STRIDED 16 +#define __Pyx_MEMVIEW_FOLLOW 32 +#define __Pyx_IS_C_CONTIG 1 +#define __Pyx_IS_F_CONTIG 2 +#define __Pyx_MEMSLICE_INIT { 0, 0, { 0 }, { 0 }, { 0 } } +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":744 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t +*/ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":745 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t +*/ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":746 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * +*/ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":747 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * + * ctypedef npy_uint8 uint8_t +*/ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":749 + * ctypedef npy_int64 int64_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t +*/ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":750 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t +*/ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":751 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * +*/ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":752 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * + * ctypedef npy_float32 float32_t +*/ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":754 + * ctypedef npy_uint64 uint64_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t +*/ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":755 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t +*/ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":762 + * ctypedef double complex complex128_t + * + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * +*/ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":763 + * + * ctypedef npy_longlong longlong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t +*/ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":765 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * +*/ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":766 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t +*/ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":768 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t +*/ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":769 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * +*/ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":770 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef float complex cfloat_t +*/ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* #### Code section: complex_type_declarations ### */ +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + typedef ::std::complex< long double > __pyx_t_long_double_complex; + #else + typedef long double _Complex __pyx_t_long_double_complex; + #endif +#else + typedef struct { long double real, imag; } __pyx_t_long_double_complex; +#endif +static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double); + +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; +struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; +struct __pyx_array_obj; +struct __pyx_MemviewEnum_obj; +struct __pyx_memoryview_obj; +struct __pyx_memoryviewslice_obj; +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all; + +/* "stream.pxd":26 + * cdef size_t pos + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_byte(self, unsigned char val) + * cpdef write_var_int64(self, libc.stdint.int64_t v) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":46 + * cdef size_t count + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_var_int64(self, libc.stdint.int64_t val) + * cpdef write_var_int32(self, libc.stdint.int64_t val) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":74 + * cpdef double read_bigendian_double(self) except? -1 + * cpdef float read_bigendian_float(self) except? -1 + * cpdef bytes read_all(self, bint nested=*) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all { + int __pyx_n; + int nested; +}; +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create; + +/* "windowed_value.pxd":55 + * + * @cython.locals(wv=WindowedValue) + * cpdef WindowedValue create( # <<<<<<<<<<<<<< + * object value, int64_t timestamp_micros, object windows, object pane_info=*) + * +*/ +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create { + int __pyx_n; + PyObject *pane_info; +}; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size; +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables; + +/* "apache_beam/coders/coder_impl.pxd":30 + * libc.stdint.int64_t abs "llabs"(libc.stdint.int64_t) + * + * ctypedef char* char_ptr # <<<<<<<<<<<<<< + * + * from .stream cimport InputStream, OutputStream +*/ +typedef char *__pyx_t_11apache_beam_6coders_10coder_impl_char_ptr; + +/* "apache_beam/coders/coder_impl.pxd":49 + * cpdef bytes encode_nested(self, value) + * cpdef decode_nested(self, bytes encoded) + * cpdef estimate_size(self, value, bint nested=?) # <<<<<<<<<<<<<< + * @cython.locals(varint_size=int, bits=libc.stdint.uint64_t) + * @cython.overflowcheck(False) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":53 + * @cython.overflowcheck(False) + * cpdef int _get_nested_size(self, int inner_size, bint nested) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":159 + * + * @cython.locals(c=CoderImpl) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":210 + * @cython.locals(typed_value=windowed_value._IntervalWindowBase, + * span_millis=libc.stdint.int64_t) + * cpdef estimate_size(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/coder_impl.pxd":255 + * + * @cython.locals(c=CoderImpl) + * cpdef get_estimated_size_and_observables(self, value, bint nested=?) # <<<<<<<<<<<<<< + * + * @cython.locals(timestamp=libc.stdint.int64_t) +*/ +struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables { + int __pyx_n; + int nested; +}; + +/* "stream.pxd":21 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * cdef char* data + * cdef size_t buffer_size +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtab; + char *data; + size_t buffer_size; + size_t pos; +}; + + +/* "stream.pxd":43 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * cdef size_t count + * +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t count; +}; + + +/* "stream.pxd":58 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * cdef size_t pos + * cdef bytes all +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtab; + size_t pos; + PyObject *all; + char *allc; +}; + + +/* "windowed_value.pxd":27 + * cdef list _BYTE_TO_PANE_INFO + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class PaneInfo(object): + * cdef readonly bint _is_first +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo { + PyObject_HEAD + int _is_first; + int _is_last; + int _timing; + int _index; + int _nonspeculative_index; + unsigned char _encoded_byte; +}; + + +/* "windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab; + PyObject *value; + PyObject *windows; + PyObject *pane_info; + int64_t timestamp_micros; + PyObject *timestamp_object; +}; + + +/* "windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab; +}; + + +/* "windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv; +}; + + +/* "windowed_value.pxd":59 + * + * + * cdef class _IntervalWindowBase(object): # <<<<<<<<<<<<<< + * cdef object _start_object + * cdef readonly int64_t _start_micros +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase { + PyObject_HEAD + PyObject *_start_object; + int64_t _start_micros; + PyObject *_end_object; + int64_t _end_micros; +}; + + +/* "apache_beam/coders/coder_impl.pxd":42 + * cdef bint is_compiled + * + * cdef class CoderImpl(object): # <<<<<<<<<<<<<< + * cpdef encode_to_stream(self, value, OutputStream stream, bint nested) + * cpdef decode_from_stream(self, InputStream stream, bint nested) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtab; +}; + + +/* "apache_beam/coders/coder_impl.pxd":56 + * + * + * cdef class SimpleCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":60 + * + * + * cdef class StreamCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":64 + * + * + * cdef class CallbackCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _encoder + * cdef object _decoder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; + PyObject *_encoder; + PyObject *_decoder; + PyObject *_size_estimator; +}; + + +/* "apache_beam/coders/coder_impl.pxd":79 + * cdef set _ITERABLE_LIKE_TYPES + * + * cdef class FastPrimitivesCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl fallback_coder_impl + * cdef CoderImpl iterable_coder_impl +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *fallback_coder_impl; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *iterable_coder_impl; + PyObject *requires_deterministic_step_label; + int warn_deterministic_fallback; + int force_use_dill; + int use_relative_filepaths; +}; + + +/* "apache_beam/coders/coder_impl.pxd":102 + * + * + * cdef class MapCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _key_coder + * cdef CoderImpl _value_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_key_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; + int _is_deterministic; +}; + + +/* "apache_beam/coders/coder_impl.pxd":108 + * + * + * cdef class BytesCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":112 + * + * + * cdef class BooleanCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":116 + * + * + * cdef class BigEndianShortCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":120 + * + * + * cdef class SinglePrecisionFloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":124 + * + * + * cdef class FloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":128 + * + * + * cdef class TimestampCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object timestamp_class + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *timestamp_class; +}; + + +/* "apache_beam/coders/coder_impl.pxd":133 + * + * cdef list small_ints + * cdef class VarIntCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int64_t) + * cpdef bytes encode(self, value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":138 + * + * + * cdef class VarInt32CoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int32_t) + * cpdef bytes encode(self, value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":143 + * + * + * cdef class SingletonCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _value + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; + PyObject *_value; +}; + + +/* "apache_beam/coders/coder_impl.pxd":147 + * + * + * cdef class AbstractComponentCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _coder_impls + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *_coder_impls; +}; + + +/* "apache_beam/coders/coder_impl.pxd":162 + * + * + * cdef class TupleCoderImpl(AbstractComponentCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":166 + * + * + * cdef class SequenceCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _elem_coder + * cdef object _read_state +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_elem_coder; + PyObject *_read_state; + PyObject *_write_state; + int _write_state_threshold; +}; + + +/* "apache_beam/coders/coder_impl.pxd":179 + * + * + * cdef class TupleSequenceCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":183 + * + * + * cdef class _AbstractIterable: # <<<<<<<<<<<<<< + * cdef object _contents + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable { + PyObject_HEAD + PyObject *_contents; +}; + + +/* "apache_beam/coders/coder_impl.pxd":187 + * + * + * cdef class IterableCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * cdef bint _use_abstract_iterable + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; + int _use_abstract_iterable; +}; + + +/* "apache_beam/coders/coder_impl.pxd":191 + * + * + * cdef class ListCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":197 + * cdef object IntervalWindow + * + * cdef class IntervalWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint64_t _to_normal_time(self, libc.stdint.int64_t value) + * cdef libc.stdint.int64_t _from_normal_time(self, libc.stdint.uint64_t value) +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":217 + * + * + * cdef class PaneInfoCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef int _choose_encoding(self, windowed_value.PaneInfo value) + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":232 + * + * + * cdef class _OrderedUnionCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _types + * cdef tuple _coder_impls +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *_types; + PyObject *_coder_impls; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_fallback_coder_impl; +}; + + +/* "apache_beam/coders/coder_impl.pxd":244 + * + * + * cdef class WindowedValueCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values.""" + * cdef CoderImpl _value_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_timestamp_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_windows_coder; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_pane_info_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":264 + * + * + * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values with constant timestamp, windows and pane info.""" + * cdef readonly libc.stdint.int64_t _timestamp +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base; + int64_t _timestamp; + PyObject *_windows; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *_pane_info; +}; + + +/* "apache_beam/coders/coder_impl.pxd":271 + * + * + * cdef class LengthPrefixCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _value_coder + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":275 + * + * + * cdef class RowColumnEncoder: # <<<<<<<<<<<<<< + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1 + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1 +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtab; +}; + + +/* "apache_beam/coders/coder_impl.pxd":280 + * + * + * cdef class GenericRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * cdef object column + * cdef CoderImpl coder_impl +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; + PyObject *column; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *coder_impl; +}; + + +/* "apache_beam/coders/coder_impl.pxd":285 + * + * + * cdef class RowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object schema + * cdef int num_fields +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *schema; + int num_fields; + PyObject *field_names; + PyObject *field_nullable; + PyObject *constructor; + PyObject *encoding_positions; + PyObject *encoding_positions_argsort; + int encoding_positions_are_trivial; + PyObject *components; + int has_nullable_fields; +}; + + +/* "apache_beam/coders/coder_impl.pxd":315 + * + * + * cdef class LogicalTypeCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object logical_type + * cdef CoderImpl representation_coder +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *logical_type; + struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *representation_coder; +}; + + +/* "apache_beam/coders/coder_impl.pxd":323 + * + * + * cdef class BigIntegerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl.pxd":327 + * + * + * cdef class DecimalCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass +*/ +struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":30 + * + * + * cdef class AtomicTypeRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * cdef original + * cdef contiguous +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; + PyObject *original; + PyObject *contiguous; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":46 + * + * + * cdef class FloatFloat32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float32_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_float32_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":63 + * + * + * cdef class FloatFloat64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float64_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_float64_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":80 + * + * + * cdef class DoubleFloat32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float32_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_float32_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":97 + * + * + * cdef class DoubleFloat64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float64_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_float64_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":114 + * + * + * cdef class Int32Int32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.int32_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_int32_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":132 + * + * + * cdef class Int64Int64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.int64_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_int64_t *data; +}; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":149 + * + * + * cdef class BoolRowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.uint8_t* data + * +*/ +struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; + __pyx_t_5numpy_uint8_t *data; +}; + + +/* "View.MemoryView":110 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname("__pyx_array") + * cdef class array: +*/ +struct __pyx_array_obj { + PyObject_HEAD + struct __pyx_vtabstruct_array *__pyx_vtab; + char *data; + Py_ssize_t len; + char *format; + int ndim; + Py_ssize_t *_shape; + Py_ssize_t *_strides; + Py_ssize_t itemsize; + PyObject *mode; + PyObject *_format; + void (*callback_free_data)(void *); + int free_data; + int dtype_is_object; +}; + + +/* "View.MemoryView":299 + * + * + * @cname('__pyx_MemviewEnum') # <<<<<<<<<<<<<< + * cdef class Enum(object): + * cdef object name +*/ +struct __pyx_MemviewEnum_obj { + PyObject_HEAD + PyObject *name; +}; + + +/* "View.MemoryView":334 + * + * + * @cname('__pyx_memoryview') # <<<<<<<<<<<<<< + * cdef class memoryview: + * +*/ +struct __pyx_memoryview_obj { + PyObject_HEAD + struct __pyx_vtabstruct_memoryview *__pyx_vtab; + PyObject *obj; + PyObject *_size; + void *_unused; + PyThread_type_lock lock; + __pyx_atomic_int_type acquisition_count; + Py_buffer view; + int flags; + int dtype_is_object; + __Pyx_TypeInfo const *typeinfo; +}; + + +/* "View.MemoryView":951 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): +*/ +struct __pyx_memoryviewslice_obj { + struct __pyx_memoryview_obj __pyx_base; + __Pyx_memviewslice from_slice; + PyObject *from_object; + PyObject *(*to_object_func)(char *); + int (*to_dtype_func)(char *, PyObject *); +}; + + + +/* "stream.pxd":21 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * cdef char* data + * cdef size_t buffer_size +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream { + PyObject *(*write)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args); + PyObject *(*write_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch); + PyObject *(*write_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, float, int __pyx_skip_dispatch); + PyObject *(*get)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + size_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + PyObject *(*extend)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, size_t); + PyObject *(*_clear)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream; + + +/* "stream.pxd":43 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * cdef size_t count + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t (*get_count)(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream; + + +/* "stream.pxd":58 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * cdef size_t pos + * cdef bytes all +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream { + Py_ssize_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, size_t, int __pyx_skip_dispatch); + long (*read_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + uint64_t (*read_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int16_t (*read_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + double (*read_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + float (*read_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read_all)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream; + + +/* "windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; + + +/* "windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + + +/* "windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + + +/* "apache_beam/coders/coder_impl.pxd":42 + * cdef bint is_compiled + * + * cdef class CoderImpl(object): # <<<<<<<<<<<<<< + * cpdef encode_to_stream(self, value, OutputStream stream, bint nested) + * cpdef decode_from_stream(self, InputStream stream, bint nested) +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl { + PyObject *(*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch); + PyObject *(*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch); + PyObject *(*encode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*decode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*encode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*decode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*estimate_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args); + int (*_get_nested_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, int, int, int __pyx_skip_dispatch); + PyObject *(*get_estimated_size_and_observables)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":56 + * + * + * cdef class SimpleCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":60 + * + * + * cdef class StreamCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":64 + * + * + * cdef class CallbackCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _encoder + * cdef object _decoder +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":79 + * cdef set _ITERABLE_LIKE_TYPES + * + * cdef class FastPrimitivesCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl fallback_coder_impl + * cdef CoderImpl iterable_coder_impl +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*encode_special_deterministic)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*encode_type_2_67_0)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*encode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + PyObject *(*decode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":102 + * + * + * cdef class MapCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _key_coder + * cdef CoderImpl _value_coder +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":108 + * + * + * cdef class BytesCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":112 + * + * + * cdef class BooleanCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":116 + * + * + * cdef class BigEndianShortCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":120 + * + * + * cdef class SinglePrecisionFloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":124 + * + * + * cdef class FloatCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":128 + * + * + * cdef class TimestampCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object timestamp_class + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":133 + * + * cdef list small_ints + * cdef class VarIntCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int64_t) + * cpdef bytes encode(self, value) +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":138 + * + * + * cdef class VarInt32CoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * @cython.locals(ivalue=libc.stdint.int32_t) + * cpdef bytes encode(self, value) +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":143 + * + * + * cdef class SingletonCoderImpl(CoderImpl): # <<<<<<<<<<<<<< + * cdef object _value + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":147 + * + * + * cdef class AbstractComponentCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _coder_impls + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*_extract_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*_construct_from_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":162 + * + * + * cdef class TupleCoderImpl(AbstractComponentCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":166 + * + * + * cdef class SequenceCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _elem_coder + * cdef object _read_state +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*_construct_from_sequence)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":179 + * + * + * cdef class TupleSequenceCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":187 + * + * + * cdef class IterableCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * cdef bint _use_abstract_iterable + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":191 + * + * + * cdef class ListCoderImpl(SequenceCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":197 + * cdef object IntervalWindow + * + * cdef class IntervalWindowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint64_t _to_normal_time(self, libc.stdint.int64_t value) + * cdef libc.stdint.int64_t _from_normal_time(self, libc.stdint.uint64_t value) +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, int64_t); + int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, uint64_t); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":217 + * + * + * cdef class PaneInfoCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef int _choose_encoding(self, windowed_value.PaneInfo value) + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + int (*_choose_encoding)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":232 + * + * + * cdef class _OrderedUnionCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef tuple _types + * cdef tuple _coder_impls +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":244 + * + * + * cdef class WindowedValueCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values.""" + * cdef CoderImpl _value_coder +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, int64_t); + int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, uint64_t); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":264 + * + * + * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl): # <<<<<<<<<<<<<< + * """A coder for windowed values with constant timestamp, windows and pane info.""" + * cdef readonly libc.stdint.int64_t _timestamp +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":271 + * + * + * cdef class LengthPrefixCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef CoderImpl _value_coder + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":275 + * + * + * cdef class RowColumnEncoder: # <<<<<<<<<<<<<< + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1 + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1 +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder { + int (*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *); + int (*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl.pxd":280 + * + * + * cdef class GenericRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * cdef object column + * cdef CoderImpl coder_impl +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + + +/* "apache_beam/coders/coder_impl.pxd":285 + * + * + * cdef class RowCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object schema + * cdef int num_fields +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; + PyObject *(*decode_batch_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*encode_batch_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":315 + * + * + * cdef class LogicalTypeCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * cdef object logical_type + * cdef CoderImpl representation_coder +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":323 + * + * + * cdef class BigIntegerCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + + +/* "apache_beam/coders/coder_impl.pxd":327 + * + * + * cdef class DecimalCoderImpl(StreamCoderImpl): # <<<<<<<<<<<<<< + * pass +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":30 + * + * + * cdef class AtomicTypeRowColumnEncoder(RowColumnEncoder): # <<<<<<<<<<<<<< + * cdef original + * cdef contiguous +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":46 + * + * + * cdef class FloatFloat32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float32_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":63 + * + * + * cdef class FloatFloat64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float64_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":80 + * + * + * cdef class DoubleFloat32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float32_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":97 + * + * + * cdef class DoubleFloat64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.float64_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":114 + * + * + * cdef class Int32Int32RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.int32_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":132 + * + * + * cdef class Int64Int64RowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.int64_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":149 + * + * + * cdef class BoolRowColumnEncoder(AtomicTypeRowColumnEncoder): # <<<<<<<<<<<<<< + * cdef np.uint8_t* data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder { + struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + + +/* "View.MemoryView":110 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname("__pyx_array") + * cdef class array: +*/ + +struct __pyx_vtabstruct_array { + PyObject *(*get_memview)(struct __pyx_array_obj *); +}; +static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; + + +/* "View.MemoryView":334 + * + * + * @cname('__pyx_memoryview') # <<<<<<<<<<<<<< + * cdef class memoryview: + * +*/ + +struct __pyx_vtabstruct_memoryview { + char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); + PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); + PyObject *(*_get_base)(struct __pyx_memoryview_obj *); +}; +static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; + + +/* "View.MemoryView":951 + * + * + * @cython.collection_type("sequence") # <<<<<<<<<<<<<< + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): +*/ + +struct __pyx_vtabstruct__memoryviewslice { + struct __pyx_vtabstruct_memoryview __pyx_base; +}; +static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyMemoryError_Check.proto */ +#define __Pyx_PyExc_MemoryError_Check(obj) __Pyx_TypeCheck(obj, PyExc_MemoryError) + +/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto (used by CIntToPyUnicode) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto (used by CIntToPyUnicode) */ +#include + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* DivInt[Py_ssize_t].proto */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant); + +/* UnaryNegOverflows.proto */ +#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PySequenceMultiply.proto */ +#define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul) +#if !CYTHON_USE_TYPE_SLOTS +#define __Pyx_PySequence_Multiply PySequence_Repeat +#else +static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul); +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* PyObjectFormat.proto */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); +#else +#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +#endif + +/* SetItemInt.proto */ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* PyIndexError_Check.proto */ +#define __Pyx_PyExc_IndexError_Check(obj) __Pyx_TypeCheck(obj, PyExc_IndexError) + +/* DivInt[long].proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant); + +/* PyImportError_Check.proto */ +#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError) + +/* SliceObject.proto */ +#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ + __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) +static CYTHON_INLINE int __Pyx_PyObject_SetSlice( + PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +/* CallNextTpDealloc.proto */ +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); + +/* CallNextTpTraverse.proto */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* CallNextTpClear.proto */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* GetVTable.proto */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +/* MemviewRefcount.proto */ +static CYTHON_INLINE int __pyx_add_acquisition_count_locked( + __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); +static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( + __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock); +#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count) +#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) +#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__) +static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); +static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int); + +/* MemviewSliceIsContig.proto */ +static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); + +/* OverlappingSlices.proto */ +static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize); + +/* MemviewSliceInit.proto */ +static int __Pyx_init_memviewslice( + struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference); + +/* IsLittleEndian.proto (used by BufferFormatCheck) */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto (used by MemviewSliceValidateAndInit) */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + const __Pyx_TypeInfo* type); + +/* TypeInfoCompare.proto (used by MemviewSliceValidateAndInit) */ +static int __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b); + +/* MemviewSliceValidateAndInit.export */ +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + const __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int64_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *, int writable_flag); + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #define __Pyx_c_eq_long__double(a, b) ((a)==(b)) + #define __Pyx_c_sum_long__double(a, b) ((a)+(b)) + #define __Pyx_c_diff_long__double(a, b) ((a)-(b)) + #define __Pyx_c_prod_long__double(a, b) ((a)*(b)) + #define __Pyx_c_quot_long__double(a, b) ((a)/(b)) + #define __Pyx_c_neg_long__double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0) + #define __Pyx_c_conj_long__double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (::std::abs(z)) + #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_long__double(z) ((z)==0) + #define __Pyx_c_conj_long__double(z) (conjl(z)) + #if 1 + #define __Pyx_c_abs_long__double(z) (cabsl(z)) + #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex); + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex); + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex); + #endif +#endif + +/* MemviewSliceCopy.proto */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/ +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/ +static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/ +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "numpy" */ + +/* Module declarations from "numpy" */ + +/* Module declarations from "cython.view" */ + +/* Module declarations from "cython.dataclasses" */ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "apache_beam.coders.stream" */ + +/* Module declarations from "apache_beam.utils" */ + +/* Module declarations from "apache_beam.utils.windowed_value" */ +static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp) +static PyObject **__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO (*__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO) + +/* Module declarations from "apache_beam.coders.coder_impl" */ +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_loads = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_loads (*__pyx_vp_11apache_beam_6coders_10coder_impl_loads) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_dumps = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_dumps (*__pyx_vp_11apache_beam_6coders_10coder_impl_dumps) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_create_InputStream = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream (*__pyx_vp_11apache_beam_6coders_10coder_impl_create_InputStream) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_create_OutputStream = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream (*__pyx_vp_11apache_beam_6coders_10coder_impl_create_OutputStream) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream (*__pyx_vp_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_get_varint_size = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size (*__pyx_vp_11apache_beam_6coders_10coder_impl_get_varint_size) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_past_unicode = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_past_unicode (*__pyx_vp_11apache_beam_6coders_10coder_impl_past_unicode) +static int *__pyx_vp_11apache_beam_6coders_10coder_impl_is_compiled = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled (*__pyx_vp_11apache_beam_6coders_10coder_impl_is_compiled) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_NoneType = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_NoneType (*__pyx_vp_11apache_beam_6coders_10coder_impl_NoneType) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_NONE_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_NONE_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_INT_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_INT_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_FLOAT_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_FLOAT_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_BOOL_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_BOOL_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_BYTES_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_BYTES_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_UNICODE_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_UNICODE_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_LIST_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_LIST_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_TUPLE_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_TUPLE_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_DICT_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_DICT_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_SET_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_SET_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_PROTO_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_PROTO_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE) +static unsigned char *__pyx_vp_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE (*__pyx_vp_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES (*__pyx_vp_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl__pickled_types = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl__pickled_types (*__pyx_vp_11apache_beam_6coders_10coder_impl__pickled_types) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl__unpickled_types = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types (*__pyx_vp_11apache_beam_6coders_10coder_impl__unpickled_types) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_small_ints = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_small_ints (*__pyx_vp_11apache_beam_6coders_10coder_impl_small_ints) +static PyObject **__pyx_vp_11apache_beam_6coders_10coder_impl_IntervalWindow = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow (*__pyx_vp_11apache_beam_6coders_10coder_impl_IntervalWindow) +static int *__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN (*__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN) +static int *__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST (*__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST) +static uint64_t *__pyx_vp_11apache_beam_6coders_10coder_impl__TIME_SHIFT = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT (*__pyx_vp_11apache_beam_6coders_10coder_impl__TIME_SHIFT) +static int64_t *__pyx_vp_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros (*__pyx_vp_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros) +static int64_t *__pyx_vp_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros = 0; +#define __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros (*__pyx_vp_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros) + +/* Module declarations from "apache_beam.coders.coder_impl_row_encoders" */ +static PyObject *__pyx_collections_abc_Sequence = 0; +static PyObject *generic = 0; +static PyObject *strided = 0; +static PyObject *indirect = 0; +static PyObject *contiguous = 0; +static PyObject *indirect_contiguous = 0; +static int __pyx_memoryview_thread_locks_used; +static PyThread_type_lock __pyx_memoryview_thread_locks[8]; +static PyObject *__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_BoolRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *, PyObject *); /*proto*/ +static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/ +static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char const *, char *); /*proto*/ +static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo const *); /*proto*/ +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ +static PyObject *_unellipsify(PyObject *, int); /*proto*/ +static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ +static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ +static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ +static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ +static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ +static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/ +static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/ +static int __pyx_memoryview_err_no_memory(void); /*proto*/ +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ +static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 }; +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 }; +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 }; +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 }; +static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 }; +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.coders.coder_impl_row_encoders" +extern int __pyx_module_is_main_apache_beam__coders__coder_impl_row_encoders; +int __pyx_module_is_main_apache_beam__coders__coder_impl_row_encoders = 0; + +/* Implementation of "apache_beam.coders.coder_impl_row_encoders" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin___import__; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_Ellipsis; +static PyObject *__pyx_builtin_id; +/* #### Code section: string_decls ### */ +static const char __pyx_k_c[] = "c"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_fortran[] = "fortran"; +static const char __pyx_k_contiguous_original[] = "contiguous, original"; +static const char __pyx_k_contiguous_data_original[] = "contiguous, data, original"; +static const char __pyx_k_Optimized_implementations_of_var[] = "Optimized implementations of various schema columner types."; +/* #### Code section: decls ### */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_2null_flags(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_4finalize_write(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_2__pyx_unpickle_BoolRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_5numpy_dtype; + PyTypeObject *__pyx_ptype_5numpy_flatiter; + PyTypeObject *__pyx_ptype_5numpy_broadcast; + PyTypeObject *__pyx_ptype_5numpy_ndarray; + PyTypeObject *__pyx_ptype_5numpy_generic; + PyTypeObject *__pyx_ptype_5numpy_number; + PyTypeObject *__pyx_ptype_5numpy_integer; + PyTypeObject *__pyx_ptype_5numpy_signedinteger; + PyTypeObject *__pyx_ptype_5numpy_unsignedinteger; + PyTypeObject *__pyx_ptype_5numpy_inexact; + PyTypeObject *__pyx_ptype_5numpy_floating; + PyTypeObject *__pyx_ptype_5numpy_complexfloating; + PyTypeObject *__pyx_ptype_5numpy_flexible; + PyTypeObject *__pyx_ptype_5numpy_character; + PyTypeObject *__pyx_ptype_5numpy_ufunc; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_OutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_InputStream; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + PyObject *__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + PyObject *__pyx_type___pyx_array; + PyObject *__pyx_type___pyx_MemviewEnum; + PyObject *__pyx_type___pyx_memoryview; + PyObject *__pyx_type___pyx_memoryviewslice; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + PyTypeObject *__pyx_array_type; + PyTypeObject *__pyx_MemviewEnum_type; + PyTypeObject *__pyx_memoryview_type; + PyTypeObject *__pyx_memoryviewslice_type; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_slice[1]; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[20]; + PyObject *__pyx_string_tab[188]; + PyObject *__pyx_number_tab[6]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_All_dimensions_preceding_dimensi __pyx_string_tab[1] +#define __pyx_kp_u_Buffer_view_does_not_expose_stri __pyx_string_tab[2] +#define __pyx_kp_u_Can_only_create_a_buffer_that_is __pyx_string_tab[3] +#define __pyx_kp_u_Cannot_assign_to_read_only_memor __pyx_string_tab[4] +#define __pyx_kp_u_Cannot_create_writable_memory_vi __pyx_string_tab[5] +#define __pyx_kp_u_Cannot_index_with_type __pyx_string_tab[6] +#define __pyx_kp_u_Cannot_transpose_memoryview_with __pyx_string_tab[7] +#define __pyx_kp_u_Dimension_d_is_not_direct __pyx_string_tab[8] +#define __pyx_kp_u_Empty_shape_tuple_for_cython_arr __pyx_string_tab[9] +#define __pyx_kp_u_Index_out_of_bounds_axis_d __pyx_string_tab[10] +#define __pyx_kp_u_Indirect_dimensions_not_supporte __pyx_string_tab[11] +#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_string_tab[12] +#define __pyx_kp_u_Invalid_shape_in_axis __pyx_string_tab[13] +#define __pyx_kp_u_MemoryView_of __pyx_string_tab[14] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[15] +#define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_string_tab[16] +#define __pyx_kp_u_Step_may_not_be_zero_axis_d __pyx_string_tab[17] +#define __pyx_kp_u_Unable_to_convert_item_to_object __pyx_string_tab[18] +#define __pyx_kp_u__2 __pyx_string_tab[19] +#define __pyx_kp_u__3 __pyx_string_tab[20] +#define __pyx_kp_u__4 __pyx_string_tab[21] +#define __pyx_kp_u__5 __pyx_string_tab[22] +#define __pyx_kp_u__6 __pyx_string_tab[23] +#define __pyx_kp_u_add_note __pyx_string_tab[24] +#define __pyx_kp_u_and __pyx_string_tab[25] +#define __pyx_kp_u_apache_beam_coders_coder_impl_ro_2 __pyx_string_tab[26] +#define __pyx_kp_u_at_0x __pyx_string_tab[27] +#define __pyx_kp_u_collections_abc __pyx_string_tab[28] +#define __pyx_kp_u_contiguous_and_direct __pyx_string_tab[29] +#define __pyx_kp_u_contiguous_and_indirect __pyx_string_tab[30] +#define __pyx_kp_u_disable __pyx_string_tab[31] +#define __pyx_kp_u_enable __pyx_string_tab[32] +#define __pyx_kp_u_gc __pyx_string_tab[33] +#define __pyx_kp_u_got __pyx_string_tab[34] +#define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_string_tab[35] +#define __pyx_kp_u_isenabled __pyx_string_tab[36] +#define __pyx_kp_u_itemsize_0_for_cython_array __pyx_string_tab[37] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[38] +#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[39] +#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[40] +#define __pyx_kp_u_object __pyx_string_tab[41] +#define __pyx_kp_u_self_data_cannot_be_converted_to __pyx_string_tab[42] +#define __pyx_kp_u_strided_and_direct __pyx_string_tab[43] +#define __pyx_kp_u_strided_and_direct_or_indirect __pyx_string_tab[44] +#define __pyx_kp_u_strided_and_indirect __pyx_string_tab[45] +#define __pyx_kp_u_stringsource __pyx_string_tab[46] +#define __pyx_kp_u_unable_to_allocate_array_data __pyx_string_tab[47] +#define __pyx_kp_u_unable_to_allocate_shape_and_str __pyx_string_tab[48] +#define __pyx_n_u_ASCII __pyx_string_tab[49] +#define __pyx_n_u_AtomicTypeRowColumnEncoder __pyx_string_tab[50] +#define __pyx_n_u_AtomicTypeRowColumnEncoder___red __pyx_string_tab[51] +#define __pyx_n_u_AtomicTypeRowColumnEncoder___set __pyx_string_tab[52] +#define __pyx_n_u_AtomicTypeRowColumnEncoder_final __pyx_string_tab[53] +#define __pyx_n_u_AtomicTypeRowColumnEncoder_null __pyx_string_tab[54] +#define __pyx_n_u_BOOLEAN __pyx_string_tab[55] +#define __pyx_n_u_BoolRowColumnEncoder __pyx_string_tab[56] +#define __pyx_n_u_BoolRowColumnEncoder___reduce_cy __pyx_string_tab[57] +#define __pyx_n_u_BoolRowColumnEncoder___setstate __pyx_string_tab[58] +#define __pyx_n_u_DOUBLE __pyx_string_tab[59] +#define __pyx_n_u_DoubleFloat32RowColumnEncoder __pyx_string_tab[60] +#define __pyx_n_u_DoubleFloat32RowColumnEncoder_2 __pyx_string_tab[61] +#define __pyx_n_u_DoubleFloat32RowColumnEncoder_3 __pyx_string_tab[62] +#define __pyx_n_u_DoubleFloat64RowColumnEncoder __pyx_string_tab[63] +#define __pyx_n_u_DoubleFloat64RowColumnEncoder_2 __pyx_string_tab[64] +#define __pyx_n_u_DoubleFloat64RowColumnEncoder_3 __pyx_string_tab[65] +#define __pyx_n_u_Ellipsis __pyx_string_tab[66] +#define __pyx_n_u_FLOAT __pyx_string_tab[67] +#define __pyx_n_u_FloatFloat32RowColumnEncoder __pyx_string_tab[68] +#define __pyx_n_u_FloatFloat32RowColumnEncoder___r __pyx_string_tab[69] +#define __pyx_n_u_FloatFloat32RowColumnEncoder___s __pyx_string_tab[70] +#define __pyx_n_u_FloatFloat64RowColumnEncoder __pyx_string_tab[71] +#define __pyx_n_u_FloatFloat64RowColumnEncoder___r __pyx_string_tab[72] +#define __pyx_n_u_FloatFloat64RowColumnEncoder___s __pyx_string_tab[73] +#define __pyx_n_u_INT32 __pyx_string_tab[74] +#define __pyx_n_u_INT64 __pyx_string_tab[75] +#define __pyx_n_u_Int32Int32RowColumnEncoder __pyx_string_tab[76] +#define __pyx_n_u_Int32Int32RowColumnEncoder___red __pyx_string_tab[77] +#define __pyx_n_u_Int32Int32RowColumnEncoder___set __pyx_string_tab[78] +#define __pyx_n_u_Int64Int64RowColumnEncoder __pyx_string_tab[79] +#define __pyx_n_u_Int64Int64RowColumnEncoder___red __pyx_string_tab[80] +#define __pyx_n_u_Int64Int64RowColumnEncoder___set __pyx_string_tab[81] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[82] +#define __pyx_n_u_Sequence __pyx_string_tab[83] +#define __pyx_n_u_View_MemoryView __pyx_string_tab[84] +#define __pyx_n_u_abc __pyx_string_tab[85] +#define __pyx_n_u_allocate_buffer __pyx_string_tab[86] +#define __pyx_n_u_apache_beam_coders __pyx_string_tab[87] +#define __pyx_n_u_apache_beam_coders_coder_impl_ro __pyx_string_tab[88] +#define __pyx_n_u_apache_beam_portability_api __pyx_string_tab[89] +#define __pyx_n_u_ascontiguousarray __pyx_string_tab[90] +#define __pyx_n_u_astype __pyx_string_tab[91] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[92] +#define __pyx_n_u_base __pyx_string_tab[93] +#define __pyx_n_u_bool __pyx_string_tab[94] +#define __pyx_n_u_c __pyx_string_tab[95] +#define __pyx_n_u_class __pyx_string_tab[96] +#define __pyx_n_u_class_getitem __pyx_string_tab[97] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[98] +#define __pyx_n_u_coder_impl __pyx_string_tab[99] +#define __pyx_n_u_column __pyx_string_tab[100] +#define __pyx_n_u_count __pyx_string_tab[101] +#define __pyx_n_u_dict __pyx_string_tab[102] +#define __pyx_n_u_dict_2 __pyx_string_tab[103] +#define __pyx_n_u_dtype __pyx_string_tab[104] +#define __pyx_n_u_dtype_is_object __pyx_string_tab[105] +#define __pyx_n_u_encode __pyx_string_tab[106] +#define __pyx_n_u_enumerate __pyx_string_tab[107] +#define __pyx_n_u_error __pyx_string_tab[108] +#define __pyx_n_u_finalize_write __pyx_string_tab[109] +#define __pyx_n_u_flags __pyx_string_tab[110] +#define __pyx_n_u_float32 __pyx_string_tab[111] +#define __pyx_n_u_float64 __pyx_string_tab[112] +#define __pyx_n_u_format __pyx_string_tab[113] +#define __pyx_n_u_fortran __pyx_string_tab[114] +#define __pyx_n_u_func __pyx_string_tab[115] +#define __pyx_n_u_getstate __pyx_string_tab[116] +#define __pyx_n_u_id __pyx_string_tab[117] +#define __pyx_n_u_import __pyx_string_tab[118] +#define __pyx_n_u_index __pyx_string_tab[119] +#define __pyx_n_u_init __pyx_string_tab[120] +#define __pyx_n_u_int32 __pyx_string_tab[121] +#define __pyx_n_u_int64 __pyx_string_tab[122] +#define __pyx_n_u_int8 __pyx_string_tab[123] +#define __pyx_n_u_is_coroutine __pyx_string_tab[124] +#define __pyx_n_u_items __pyx_string_tab[125] +#define __pyx_n_u_itemsize __pyx_string_tab[126] +#define __pyx_n_u_main __pyx_string_tab[127] +#define __pyx_n_u_memview __pyx_string_tab[128] +#define __pyx_n_u_mode __pyx_string_tab[129] +#define __pyx_n_u_module __pyx_string_tab[130] +#define __pyx_n_u_name __pyx_string_tab[131] +#define __pyx_n_u_name_2 __pyx_string_tab[132] +#define __pyx_n_u_ndim __pyx_string_tab[133] +#define __pyx_n_u_new __pyx_string_tab[134] +#define __pyx_n_u_np __pyx_string_tab[135] +#define __pyx_n_u_null_flags __pyx_string_tab[136] +#define __pyx_n_u_numpy __pyx_string_tab[137] +#define __pyx_n_u_obj __pyx_string_tab[138] +#define __pyx_n_u_pack __pyx_string_tab[139] +#define __pyx_n_u_pop __pyx_string_tab[140] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[141] +#define __pyx_n_u_pyx_result __pyx_string_tab[142] +#define __pyx_n_u_pyx_state __pyx_string_tab[143] +#define __pyx_n_u_pyx_type __pyx_string_tab[144] +#define __pyx_n_u_pyx_unpickle_AtomicTypeRowColu __pyx_string_tab[145] +#define __pyx_n_u_pyx_unpickle_BoolRowColumnEnco __pyx_string_tab[146] +#define __pyx_n_u_pyx_unpickle_Enum __pyx_string_tab[147] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[148] +#define __pyx_n_u_qualname __pyx_string_tab[149] +#define __pyx_n_u_reduce __pyx_string_tab[150] +#define __pyx_n_u_reduce_cython __pyx_string_tab[151] +#define __pyx_n_u_reduce_ex __pyx_string_tab[152] +#define __pyx_n_u_register __pyx_string_tab[153] +#define __pyx_n_u_schema_pb2 __pyx_string_tab[154] +#define __pyx_n_u_self __pyx_string_tab[155] +#define __pyx_n_u_set_name __pyx_string_tab[156] +#define __pyx_n_u_setdefault __pyx_string_tab[157] +#define __pyx_n_u_setstate __pyx_string_tab[158] +#define __pyx_n_u_setstate_cython __pyx_string_tab[159] +#define __pyx_n_u_shape __pyx_string_tab[160] +#define __pyx_n_u_size __pyx_string_tab[161] +#define __pyx_n_u_start __pyx_string_tab[162] +#define __pyx_n_u_state __pyx_string_tab[163] +#define __pyx_n_u_step __pyx_string_tab[164] +#define __pyx_n_u_stop __pyx_string_tab[165] +#define __pyx_n_u_struct __pyx_string_tab[166] +#define __pyx_n_u_super __pyx_string_tab[167] +#define __pyx_n_u_test __pyx_string_tab[168] +#define __pyx_n_u_uint8 __pyx_string_tab[169] +#define __pyx_n_u_unpack __pyx_string_tab[170] +#define __pyx_n_u_unused_coder __pyx_string_tab[171] +#define __pyx_n_u_update __pyx_string_tab[172] +#define __pyx_n_u_use_setstate __pyx_string_tab[173] +#define __pyx_n_u_values __pyx_string_tab[174] +#define __pyx_n_u_x __pyx_string_tab[175] +#define __pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P __pyx_string_tab[176] +#define __pyx_kp_b_PyObject_int_int64_t_uint64_t_un __pyx_string_tab[177] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[178] +#define __pyx_kp_b_iso88591_2_6 __pyx_string_tab[179] +#define __pyx_kp_b_iso88591_8_q __pyx_string_tab[180] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[181] +#define __pyx_kp_b_iso88591_T_d_G1F_a_vWE_Q_q_t_we3d_G1_q_4 __pyx_string_tab[182] +#define __pyx_kp_b_iso88591_T_d_Q_G1F_a_vWE_Q_q_t_we3d_G1_q __pyx_string_tab[183] +#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_ZZhhi_1 __pyx_string_tab[184] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1 __pyx_string_tab[185] +#define __pyx_kp_b_iso88591_t_WD_6_Q __pyx_string_tab[186] +#define __pyx_n_b_O __pyx_string_tab[187] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_neg_1 __pyx_number_tab[1] +#define __pyx_int_1 __pyx_number_tab[2] +#define __pyx_int_66520523 __pyx_number_tab[3] +#define __pyx_int_136983863 __pyx_number_tab[4] +#define __pyx_int_177317992 __pyx_number_tab[5] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character); + Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + Py_CLEAR(clear_module_state->__pyx_array_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_array); + Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum); + Py_CLEAR(clear_module_state->__pyx_memoryview_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview); + Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type); + Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<20; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<188; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<6; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character); + Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + Py_VISIT(traverse_module_state->__pyx_array_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_array); + Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum); + Py_VISIT(traverse_module_state->__pyx_memoryview_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview); + Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type); + Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<20; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<188; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<6; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + +/* Python wrapper */ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_shape = 0; + Py_ssize_t __pyx_v_itemsize; + PyObject *__pyx_v_format = 0; + PyObject *__pyx_v_mode = 0; + int __pyx_v_allocate_buffer; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_itemsize,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_allocate_buffer,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 129, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 129, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c)); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 129, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c)); + } + __pyx_v_shape = ((PyObject*)values[0]); + __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 129, __pyx_L3_error) + __pyx_v_format = values[2]; + __pyx_v_mode = values[3]; + if (values[4]) { + __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L3_error) + } else { + + /* "View.MemoryView":130 + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, + * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< + * + * cdef int idx +*/ + __pyx_v_allocate_buffer = ((int)1); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 129, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 129, __pyx_L1_error) + if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 129, __pyx_L1_error) + } + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); + + /* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { + int __pyx_v_idx; + Py_ssize_t __pyx_v_dim; + char __pyx_v_order; + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + char *__pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11[5]; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_format); + + /* "View.MemoryView":135 + * cdef Py_ssize_t dim + * + * self.ndim = len(shape) # <<<<<<<<<<<<<< + * self.itemsize = itemsize + * +*/ + if (unlikely(__pyx_v_shape == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 135, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 135, __pyx_L1_error) + __pyx_v_self->ndim = ((int)__pyx_t_1); + + /* "View.MemoryView":136 + * + * self.ndim = len(shape) + * self.itemsize = itemsize # <<<<<<<<<<<<<< + * + * if not self.ndim: +*/ + __pyx_v_self->itemsize = __pyx_v_itemsize; + + /* "View.MemoryView":138 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError, "Empty shape tuple for cython.array" + * +*/ + __pyx_t_2 = (!(__pyx_v_self->ndim != 0)); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":139 + * + * if not self.ndim: + * raise ValueError, "Empty shape tuple for cython.array" # <<<<<<<<<<<<<< + * + * if itemsize <= 0: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Empty_shape_tuple_for_cython_arr, 0, 0); + __PYX_ERR(1, 139, __pyx_L1_error) + + /* "View.MemoryView":138 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError, "Empty shape tuple for cython.array" + * +*/ + } + + /* "View.MemoryView":141 + * raise ValueError, "Empty shape tuple for cython.array" + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError, "itemsize <= 0 for cython.array" + * +*/ + __pyx_t_2 = (__pyx_v_itemsize <= 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":142 + * + * if itemsize <= 0: + * raise ValueError, "itemsize <= 0 for cython.array" # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_itemsize_0_for_cython_array, 0, 0); + __PYX_ERR(1, 142, __pyx_L1_error) + + /* "View.MemoryView":141 + * raise ValueError, "Empty shape tuple for cython.array" + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError, "itemsize <= 0 for cython.array" + * +*/ + } + + /* "View.MemoryView":144 + * raise ValueError, "itemsize <= 0 for cython.array" + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string +*/ + __pyx_t_2 = PyBytes_Check(__pyx_v_format); + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "View.MemoryView":145 + * + * if not isinstance(format, bytes): + * format = format.encode('ASCII') # <<<<<<<<<<<<<< + * self._format = format # keep a reference to the byte string + * self.format = self._format +*/ + __pyx_t_5 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":144 + * raise ValueError, "itemsize <= 0 for cython.array" + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string +*/ + } + + /* "View.MemoryView":146 + * if not isinstance(format, bytes): + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< + * self.format = self._format + * +*/ + __pyx_t_4 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_4); + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 146, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(__pyx_v_self->_format); + __pyx_v_self->_format = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":147 + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + * self.format = self._format # <<<<<<<<<<<<<< + * + * +*/ + if (unlikely(__pyx_v_self->_format == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(1, 147, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error) + __pyx_v_self->format = __pyx_t_7; + + /* "View.MemoryView":150 + * + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< + * self._strides = self._shape + self.ndim + * +*/ + __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); + + /* "View.MemoryView":151 + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) + * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< + * + * if not self._shape: +*/ + __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); + + /* "View.MemoryView":153 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate shape and strides." + * +*/ + __pyx_t_3 = (!(__pyx_v_self->_shape != 0)); + if (unlikely(__pyx_t_3)) { + + /* "View.MemoryView":154 + * + * if not self._shape: + * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_shape_and_str, 0, 0); + __PYX_ERR(1, 154, __pyx_L1_error) + + /* "View.MemoryView":153 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate shape and strides." + * +*/ + } + + /* "View.MemoryView":157 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." +*/ + __pyx_t_8 = 0; + __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 157, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); + #endif + ++__pyx_t_1; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_9; + __pyx_v_idx = __pyx_t_8; + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":158 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim +*/ + __pyx_t_3 = (__pyx_v_dim <= 0); + if (unlikely(__pyx_t_3)) { + + /* "View.MemoryView":159 + * for idx, dim in enumerate(shape): + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<< + * self._shape[idx] = dim + * +*/ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis; + __pyx_t_11[1] = __pyx_t_5; + __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_11[3] = __pyx_t_10; + __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127); + if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __PYX_ERR(1, 159, __pyx_L1_error) + + /* "View.MemoryView":158 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim +*/ + } + + /* "View.MemoryView":160 + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." + * self._shape[idx] = dim # <<<<<<<<<<<<<< + * + * cdef char order +*/ + (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; + + /* "View.MemoryView":157 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError, f"Invalid shape in axis {idx}: {dim}." +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":163 + * + * cdef char order + * if mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' +*/ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 163, __pyx_L1_error) + if (__pyx_t_3) { + + /* "View.MemoryView":164 + * cdef char order + * if mode == 'c': + * order = b'C' # <<<<<<<<<<<<<< + * self.mode = u'c' + * elif mode == 'fortran': +*/ + __pyx_v_order = 'C'; + + /* "View.MemoryView":165 + * if mode == 'c': + * order = b'C' + * self.mode = u'c' # <<<<<<<<<<<<<< + * elif mode == 'fortran': + * order = b'F' +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_c); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_c; + + /* "View.MemoryView":163 + * + * cdef char order + * if mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":166 + * order = b'C' + * self.mode = u'c' + * elif mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' +*/ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 166, __pyx_L1_error) + if (likely(__pyx_t_3)) { + + /* "View.MemoryView":167 + * self.mode = u'c' + * elif mode == 'fortran': + * order = b'F' # <<<<<<<<<<<<<< + * self.mode = u'fortran' + * else: +*/ + __pyx_v_order = 'F'; + + /* "View.MemoryView":168 + * elif mode == 'fortran': + * order = b'F' + * self.mode = u'fortran' # <<<<<<<<<<<<<< + * else: + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_fortran); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_fortran; + + /* "View.MemoryView":166 + * order = b'C' + * self.mode = u'c' + * elif mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":170 + * self.mode = u'fortran' + * else: + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<< + * + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) +*/ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __PYX_ERR(1, 170, __pyx_L1_error) + } + __pyx_L11:; + + /* "View.MemoryView":172 + * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" + * + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<< + * + * self.free_data = allocate_buffer +*/ + __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); + + /* "View.MemoryView":174 + * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) + * + * self.free_data = allocate_buffer # <<<<<<<<<<<<<< + * self.dtype_is_object = format == b'O' + * +*/ + __pyx_v_self->free_data = __pyx_v_allocate_buffer; + + /* "View.MemoryView":175 + * + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< + * + * if allocate_buffer: +*/ + __pyx_t_12 = PyObject_RichCompare(__pyx_v_format, __pyx_mstate_global->__pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_3; + + /* "View.MemoryView":177 + * self.dtype_is_object = format == b'O' + * + * if allocate_buffer: # <<<<<<<<<<<<<< + * _allocate_buffer(self) + * +*/ + if (__pyx_v_allocate_buffer) { + + /* "View.MemoryView":178 + * + * if allocate_buffer: + * _allocate_buffer(self) # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + __pyx_t_8 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 178, __pyx_L1_error) + + /* "View.MemoryView":177 + * self.dtype_is_object = format == b'O' + * + * if allocate_buffer: # <<<<<<<<<<<<<< + * _allocate_buffer(self) + * +*/ + } + + /* "View.MemoryView":129 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_format); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":180 + * _allocate_buffer(self) + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 +*/ + +/* Python wrapper */ +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_bufmode; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + char *__pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + Py_ssize_t *__pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + if (unlikely(__pyx_v_info == NULL)) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":182 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 # <<<<<<<<<<<<<< + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": +*/ + __pyx_v_bufmode = -1; + + /* "View.MemoryView":183 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":184 + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": +*/ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 184, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":185 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":184 + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":186 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): +*/ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":187 + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." +*/ + __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":186 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): +*/ + } + __pyx_L4:; + + /* "View.MemoryView":188 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data +*/ + __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0)); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":189 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Can_only_create_a_buffer_that_is, 0, 0); + __PYX_ERR(1, 189, __pyx_L1_error) + + /* "View.MemoryView":188 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data +*/ + } + + /* "View.MemoryView":183 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS +*/ + } + + /* "View.MemoryView":190 + * if not (flags & bufmode): + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data # <<<<<<<<<<<<<< + * info.len = self.len + * +*/ + __pyx_t_2 = __pyx_v_self->data; + __pyx_v_info->buf = __pyx_t_2; + + /* "View.MemoryView":191 + * raise ValueError, "Can only create a buffer that is contiguous in memory." + * info.buf = self.data + * info.len = self.len # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: +*/ + __pyx_t_3 = __pyx_v_self->len; + __pyx_v_info->len = __pyx_t_3; + + /* "View.MemoryView":193 + * info.len = self.len + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":194 + * + * if flags & PyBUF_STRIDES: + * info.ndim = self.ndim # <<<<<<<<<<<<<< + * info.shape = self._shape + * info.strides = self._strides +*/ + __pyx_t_4 = __pyx_v_self->ndim; + __pyx_v_info->ndim = __pyx_t_4; + + /* "View.MemoryView":195 + * if flags & PyBUF_STRIDES: + * info.ndim = self.ndim + * info.shape = self._shape # <<<<<<<<<<<<<< + * info.strides = self._strides + * else: +*/ + __pyx_t_5 = __pyx_v_self->_shape; + __pyx_v_info->shape = __pyx_t_5; + + /* "View.MemoryView":196 + * info.ndim = self.ndim + * info.shape = self._shape + * info.strides = self._strides # <<<<<<<<<<<<<< + * else: + * info.ndim = 1 +*/ + __pyx_t_5 = __pyx_v_self->_strides; + __pyx_v_info->strides = __pyx_t_5; + + /* "View.MemoryView":193 + * info.len = self.len + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":198 + * info.strides = self._strides + * else: + * info.ndim = 1 # <<<<<<<<<<<<<< + * info.shape = &self.len if flags & PyBUF_ND else NULL + * info.strides = NULL +*/ + /*else*/ { + __pyx_v_info->ndim = 1; + + /* "View.MemoryView":199 + * else: + * info.ndim = 1 + * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<< + * info.strides = NULL + * +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + __pyx_t_5 = (&__pyx_v_self->len); + } else { + __pyx_t_5 = NULL; + } + __pyx_v_info->shape = __pyx_t_5; + + /* "View.MemoryView":200 + * info.ndim = 1 + * info.shape = &self.len if flags & PyBUF_ND else NULL + * info.strides = NULL # <<<<<<<<<<<<<< + * + * info.suboffsets = NULL +*/ + __pyx_v_info->strides = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":202 + * info.strides = NULL + * + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = self.itemsize + * info.readonly = 0 +*/ + __pyx_v_info->suboffsets = NULL; + + /* "View.MemoryView":203 + * + * info.suboffsets = NULL + * info.itemsize = self.itemsize # <<<<<<<<<<<<<< + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL +*/ + __pyx_t_3 = __pyx_v_self->itemsize; + __pyx_v_info->itemsize = __pyx_t_3; + + /* "View.MemoryView":204 + * info.suboffsets = NULL + * info.itemsize = self.itemsize + * info.readonly = 0 # <<<<<<<<<<<<<< + * info.format = self.format if flags & PyBUF_FORMAT else NULL + * info.obj = self +*/ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":205 + * info.itemsize = self.itemsize + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<< + * info.obj = self + * +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_self->format; + } else { + __pyx_t_2 = NULL; + } + __pyx_v_info->format = __pyx_t_2; + + /* "View.MemoryView":206 + * info.readonly = 0 + * info.format = self.format if flags & PyBUF_FORMAT else NULL + * info.obj = self # <<<<<<<<<<<<<< + * + * def __dealloc__(array self): +*/ + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":180 + * _allocate_buffer(self) + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":208 + * info.obj = self + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) +*/ + +/* Python wrapper */ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_t_1; + int __pyx_t_2; + + /* "View.MemoryView":209 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: +*/ + __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":210 + * def __dealloc__(array self): + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) # <<<<<<<<<<<<<< + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: +*/ + __pyx_v_self->callback_free_data(__pyx_v_self->data); + + /* "View.MemoryView":209 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":211 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) +*/ + if (__pyx_v_self->free_data) { + } else { + __pyx_t_1 = __pyx_v_self->free_data; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->data != NULL); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":212 + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":213 + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<< + * free(self.data) + * PyObject_Free(self._shape) +*/ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); + + /* "View.MemoryView":212 + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) +*/ + } + + /* "View.MemoryView":214 + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) # <<<<<<<<<<<<<< + * PyObject_Free(self._shape) + * +*/ + free(__pyx_v_self->data); + + /* "View.MemoryView":211 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) +*/ + } + __pyx_L3:; + + /* "View.MemoryView":215 + * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) + * free(self.data) + * PyObject_Free(self._shape) # <<<<<<<<<<<<<< + * + * @property +*/ + PyObject_Free(__pyx_v_self->_shape); + + /* "View.MemoryView":208 + * info.obj = self + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) +*/ + + /* function exit code */ +} + +/* "View.MemoryView":217 + * PyObject_Free(self._shape) + * + * @property # <<<<<<<<<<<<<< + * def memview(self): + * return self.get_memview() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":219 + * @property + * def memview(self): + * return self.get_memview() # <<<<<<<<<<<<<< + * + * @cname('get_memview') +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":217 + * PyObject_Free(self._shape) + * + * @property # <<<<<<<<<<<<<< + * def memview(self): + * return self.get_memview() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":221 + * return self.get_memview() + * + * @cname('get_memview') # <<<<<<<<<<<<<< + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE +*/ + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_memview", 0); + + /* "View.MemoryView":223 + * @cname('get_memview') + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< + * return memoryview(self, flags, self.dtype_is_object) + * +*/ + __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); + + /* "View.MemoryView":224 + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":221 + * return self.get_memview() + * + * @cname('get_memview') # <<<<<<<<<<<<<< + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":226 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + + /* "View.MemoryView":227 + * + * def __len__(self): + * return self._shape[0] # <<<<<<<<<<<<<< + * + * def __getattr__(self, attr): +*/ + __pyx_r = (__pyx_v_self->_shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":226 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":229 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getattr__", 0); + + /* "View.MemoryView":230 + * + * def __getattr__(self, attr): + * return getattr(self.memview, attr) # <<<<<<<<<<<<<< + * + * def __getitem__(self, item): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":229 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":232 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":233 + * + * def __getitem__(self, item): + * return self.memview[item] # <<<<<<<<<<<<<< + * + * def __setitem__(self, item, value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":232 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":235 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * +*/ + +/* Python wrapper */ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + + /* "View.MemoryView":236 + * + * def __setitem__(self, item, value): + * self.memview[item] = value # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 236, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":235 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":245 + * pass + * + * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<< + * cdef int _allocate_buffer(array self) except -1: + * +*/ + +static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_i; + PyObject **__pyx_v_p; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":252 + * cdef PyObject **p + * + * self.free_data = True # <<<<<<<<<<<<<< + * self.data = malloc(self.len) + * if not self.data: +*/ + __pyx_v_self->free_data = 1; + + /* "View.MemoryView":253 + * + * self.free_data = True + * self.data = malloc(self.len) # <<<<<<<<<<<<<< + * if not self.data: + * raise MemoryError, "unable to allocate array data." +*/ + __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); + + /* "View.MemoryView":254 + * self.free_data = True + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate array data." + * +*/ + __pyx_t_1 = (!(__pyx_v_self->data != 0)); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":255 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_array_data, 0, 0); + __PYX_ERR(1, 255, __pyx_L1_error) + + /* "View.MemoryView":254 + * self.free_data = True + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError, "unable to allocate array data." + * +*/ + } + + /* "View.MemoryView":257 + * raise MemoryError, "unable to allocate array data." + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len // self.itemsize): +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":258 + * + * if self.dtype_is_object: + * p = self.data # <<<<<<<<<<<<<< + * for i in range(self.len // self.itemsize): + * p[i] = Py_None +*/ + __pyx_v_p = ((PyObject **)__pyx_v_self->data); + + /* "View.MemoryView":259 + * if self.dtype_is_object: + * p = self.data + * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<< + * p[i] = Py_None + * Py_INCREF(Py_None) +*/ + if (unlikely(__pyx_v_self->itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 259, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 259, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize, 0); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":260 + * p = self.data + * for i in range(self.len // self.itemsize): + * p[i] = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * return 0 +*/ + (__pyx_v_p[__pyx_v_i]) = Py_None; + + /* "View.MemoryView":261 + * for i in range(self.len // self.itemsize): + * p[i] = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * return 0 + * +*/ + Py_INCREF(Py_None); + } + + /* "View.MemoryView":257 + * raise MemoryError, "unable to allocate array data." + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len // self.itemsize): +*/ + } + + /* "View.MemoryView":262 + * p[i] = Py_None + * Py_INCREF(Py_None) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":245 + * pass + * + * @cname("__pyx_array_allocate_buffer") # <<<<<<<<<<<<<< + * cdef int _allocate_buffer(array self) except -1: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":265 + * + * + * @cname("__pyx_array_new") # <<<<<<<<<<<<<< + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result +*/ + +static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char const *__pyx_v_c_mode, char *__pyx_v_buf) { + struct __pyx_array_obj *__pyx_v_result = 0; + PyObject *__pyx_v_mode = 0; + struct __pyx_array_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("array_cwrapper", 0); + + /* "View.MemoryView":268 + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<< + * + * if buf is NULL: +*/ + __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f'); + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran); + __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c); + __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c; + } + __pyx_v_mode = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":270 + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. + * + * if buf is NULL: # <<<<<<<<<<<<<< + * result = array.__new__(array, shape, itemsize, format, mode) + * else: +*/ + __pyx_t_2 = (__pyx_v_buf == NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":271 + * + * if buf is NULL: + * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<< + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) +*/ + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_mode); + __Pyx_GIVEREF(__pyx_v_mode); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 271, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":270 + * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. + * + * if buf is NULL: # <<<<<<<<<<<<<< + * result = array.__new__(array, shape, itemsize, format, mode) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":273 + * result = array.__new__(array, shape, itemsize, format, mode) + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<< + * result.data = buf + * +*/ + /*else*/ { + __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_mode); + __Pyx_GIVEREF(__pyx_v_mode); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 273, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 273, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":274 + * else: + * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) + * result.data = buf # <<<<<<<<<<<<<< + * + * return result +*/ + __pyx_v_result->data = __pyx_v_buf; + } + __pyx_L3:; + + /* "View.MemoryView":276 + * result.data = buf + * + * return result # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":265 + * + * + * @cname("__pyx_array_new") # <<<<<<<<<<<<<< + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf): + * cdef array result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_mode); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":302 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): +*/ + +/* Python wrapper */ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 302, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 302, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 302, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error) + } + __pyx_v_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 302, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "View.MemoryView":303 + * cdef object name + * def __init__(self, name): + * self.name = name # <<<<<<<<<<<<<< + * def __repr__(self): + * return self.name +*/ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "View.MemoryView":302 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":304 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":305 + * self.name = name + * def __repr__(self): + * return self.name # <<<<<<<<<<<<<< + * + * cdef generic = Enum("") +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* "View.MemoryView":304 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.name,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->name != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.name is not None + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":348 + * cdef const __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags +*/ + +/* Python wrapper */ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_obj = 0; + int __pyx_v_flags; + int __pyx_v_dtype_is_object; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_dtype_is_object,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 348, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 348, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 348, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_obj = values[0]; + __pyx_v_flags = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error) + if (values[2]) { + __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error) + } else { + __pyx_v_dtype_is_object = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 348, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + Py_intptr_t __pyx_t_4; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "View.MemoryView":349 + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj # <<<<<<<<<<<<<< + * self.flags = flags + * if type(self) is memoryview or obj is not None: +*/ + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + __Pyx_GOTREF(__pyx_v_self->obj); + __Pyx_DECREF(__pyx_v_self->obj); + __pyx_v_self->obj = __pyx_v_obj; + + /* "View.MemoryView":350 + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj + * self.flags = flags # <<<<<<<<<<<<<< + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) +*/ + __pyx_v_self->flags = __pyx_v_flags; + + /* "View.MemoryView":351 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: +*/ + __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type)); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_obj != Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":352 + * self.flags = flags + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None +*/ + __pyx_t_3 = PyObject_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error) + + /* "View.MemoryView":353 + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":354 + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; + + /* "View.MemoryView":355 + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): +*/ + Py_INCREF(Py_None); + + /* "View.MemoryView":353 + * if type(self) is memoryview or obj is not None: + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + } + + /* "View.MemoryView":351 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * PyObject_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: +*/ + } + + /* "View.MemoryView":357 + * Py_INCREF(Py_None) + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and +*/ + __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED()); + if (__pyx_t_1) { + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L9_bool_binop_done; + } + + /* "View.MemoryView":361 + * if (__pyx_memoryview_thread_locks_used < 8 and + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 +*/ + __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + if (__pyx_t_1) { + + /* "View.MemoryView":362 + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: +*/ + __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + + /* "View.MemoryView":363 + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() +*/ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); + + /* "View.MemoryView":359 + * if not __PYX_CYTHON_ATOMICS_ENABLED(): + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and # <<<<<<<<<<<<<< + * + * not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()): +*/ + } + + /* "View.MemoryView":364 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: +*/ + __pyx_t_1 = (__pyx_v_self->lock == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":365 + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< + * if self.lock is NULL: + * raise MemoryError +*/ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "View.MemoryView":366 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * +*/ + __pyx_t_1 = (__pyx_v_self->lock == NULL); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":367 + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: +*/ + PyErr_NoMemory(); __PYX_ERR(1, 367, __pyx_L1_error) + + /* "View.MemoryView":366 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * +*/ + } + + /* "View.MemoryView":364 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: +*/ + } + + /* "View.MemoryView":357 + * Py_INCREF(Py_None) + * + * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<< + * global __pyx_memoryview_thread_locks_used + * if (__pyx_memoryview_thread_locks_used < 8 and +*/ + } + + /* "View.MemoryView":369 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":370 + * + * if flags & PyBUF_FORMAT: + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< + * else: + * self.dtype_is_object = dtype_is_object +*/ + __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O'); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00'); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + __pyx_v_self->dtype_is_object = __pyx_t_1; + + /* "View.MemoryView":369 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: +*/ + goto __pyx_L13; + } + + /* "View.MemoryView":372 + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 +*/ + /*else*/ { + __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; + } + __pyx_L13:; + + /* "View.MemoryView":374 + * self.dtype_is_object = dtype_is_object + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<< + * self.typeinfo = NULL + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count))); + __pyx_t_5 = (sizeof(__pyx_atomic_int_type)); + if (unlikely(__pyx_t_5 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 374, __pyx_L1_error) + } + __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(1, 374, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 374, __pyx_L1_error) + #endif + + /* "View.MemoryView":375 + * + * assert (&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 + * self.typeinfo = NULL # <<<<<<<<<<<<<< + * + * def __dealloc__(memoryview self): +*/ + __pyx_v_self->typeinfo = NULL; + + /* "View.MemoryView":348 + * cdef const __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":377 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * PyBuffer_Release(&self.view) +*/ + +/* Python wrapper */ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { + int __pyx_v_i; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyThread_type_lock __pyx_t_5; + PyThread_type_lock __pyx_t_6; + + /* "View.MemoryView":378 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: +*/ + __pyx_t_1 = (__pyx_v_self->obj != Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":379 + * def __dealloc__(memoryview self): + * if self.obj is not None: + * PyBuffer_Release(&self.view) # <<<<<<<<<<<<<< + * elif (<__pyx_buffer *> &self.view).obj == Py_None: + * +*/ + PyBuffer_Release((&__pyx_v_self->view)); + + /* "View.MemoryView":378 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":380 + * if self.obj is not None: + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< + * + * (<__pyx_buffer *> &self.view).obj = NULL +*/ + __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":382 + * elif (<__pyx_buffer *> &self.view).obj == Py_None: + * + * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<< + * Py_DECREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL; + + /* "View.MemoryView":383 + * + * (<__pyx_buffer *> &self.view).obj = NULL + * Py_DECREF(Py_None) # <<<<<<<<<<<<<< + * + * cdef int i +*/ + Py_DECREF(Py_None); + + /* "View.MemoryView":380 + * if self.obj is not None: + * PyBuffer_Release(&self.view) + * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<< + * + * (<__pyx_buffer *> &self.view).obj = NULL +*/ + } + __pyx_L3:; + + /* "View.MemoryView":387 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: +*/ + __pyx_t_1 = (__pyx_v_self->lock != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":388 + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 +*/ + __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING(); + if (__pyx_t_1) { + __pyx_t_2 = 0; + } else { + __pyx_t_2 = __pyx_memoryview_thread_locks_used; + } + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":389 + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: +*/ + __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock); + if (__pyx_t_1) { + + /* "View.MemoryView":390 + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( +*/ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); + + /* "View.MemoryView":391 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) +*/ + __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used); + if (__pyx_t_1) { + + /* "View.MemoryView":393 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< + * break + * else: +*/ + __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]); + + /* "View.MemoryView":392 + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break +*/ + (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5; + (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6; + + /* "View.MemoryView":391 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) +*/ + } + + /* "View.MemoryView":394 + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break # <<<<<<<<<<<<<< + * else: + * PyThread_free_lock(self.lock) +*/ + goto __pyx_L6_break; + + /* "View.MemoryView":389 + * if self.lock != NULL: + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: +*/ + } + } + /*else*/ { + + /* "View.MemoryView":396 + * break + * else: + * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: +*/ + PyThread_free_lock(__pyx_v_self->lock); + } + __pyx_L6_break:; + + /* "View.MemoryView":387 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: +*/ + } + + /* "View.MemoryView":377 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * PyBuffer_Release(&self.view) +*/ + + /* function exit code */ +} + +/* "View.MemoryView":398 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf +*/ + +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + Py_ssize_t __pyx_v_dim; + char *__pyx_v_itemp; + PyObject *__pyx_v_idx = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + char *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_item_pointer", 0); + + /* "View.MemoryView":400 + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< + * + * for dim, idx in enumerate(index): +*/ + __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); + + /* "View.MemoryView":402 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * +*/ + __pyx_t_1 = 0; + if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { + __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 402, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 402, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 402, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_1; + __pyx_t_1 = (__pyx_t_1 + 1); + + /* "View.MemoryView":403 + * + * for dim, idx in enumerate(index): + * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< + * + * return itemp +*/ + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 403, __pyx_L1_error) + __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 403, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_7; + + /* "View.MemoryView":402 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":405 + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + * return itemp # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_itemp; + goto __pyx_L0; + + /* "View.MemoryView":398 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":408 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_indices = NULL; + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + char *__pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":409 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); + if (__pyx_t_1) { + + /* "View.MemoryView":410 + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: + * return self # <<<<<<<<<<<<<< + * + * have_slices, indices = _unellipsify(index, self.view.ndim) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "View.MemoryView":409 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "View.MemoryView":412 + * return self + * + * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * cdef char *itemp +*/ + __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 412, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 412, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_indices = __pyx_t_4; + __pyx_t_4 = 0; + + /* "View.MemoryView":415 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 415, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":416 + * cdef char *itemp + * if have_slices: + * return memview_slice(self, indices) # <<<<<<<<<<<<<< + * else: + * itemp = self.get_item_pointer(indices) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":415 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: +*/ + } + + /* "View.MemoryView":418 + * return memview_slice(self, indices) + * else: + * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< + * return self.convert_item_to_object(itemp) + * +*/ + /*else*/ { + __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(1, 418, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_5; + + /* "View.MemoryView":419 + * else: + * itemp = self.get_item_pointer(indices) + * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< + * + * def __setitem__(memoryview self, object index, object value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":408 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_indices); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":421 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" +*/ + +/* Python wrapper */ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_obj = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + __Pyx_INCREF(__pyx_v_index); + + /* "View.MemoryView":422 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError, "Cannot assign to read-only memoryview" + * +*/ + if (unlikely(__pyx_v_self->view.readonly)) { + + /* "View.MemoryView":423 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Cannot_assign_to_read_only_memor, 0, 0); + __PYX_ERR(1, 423, __pyx_L1_error) + + /* "View.MemoryView":422 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError, "Cannot assign to read-only memoryview" + * +*/ + } + + /* "View.MemoryView":425 + * raise TypeError, "Cannot assign to read-only memoryview" + * + * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * if have_slices: +*/ + __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 425, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 425, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":427 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj is not None: +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 427, __pyx_L1_error) + if (__pyx_t_4) { + + /* "View.MemoryView":428 + * + * if have_slices: + * obj = self.is_slice(value) # <<<<<<<<<<<<<< + * if obj is not None: + * self.setitem_slice_assignment(self[index], obj) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":429 + * if have_slices: + * obj = self.is_slice(value) + * if obj is not None: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: +*/ + __pyx_t_4 = (__pyx_v_obj != Py_None); + if (__pyx_t_4) { + + /* "View.MemoryView":430 + * obj = self.is_slice(value) + * if obj is not None: + * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< + * else: + * self.setitem_slice_assign_scalar(self[index], value) +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":429 + * if have_slices: + * obj = self.is_slice(value) + * if obj is not None: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":432 + * self.setitem_slice_assignment(self[index], obj) + * else: + * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< + * else: + * self.setitem_indexed(index, value) +*/ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 432, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + + /* "View.MemoryView":427 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj is not None: +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":434 + * self.setitem_slice_assign_scalar(self[index], value) + * else: + * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< + * + * cdef is_slice(self, obj): +*/ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "View.MemoryView":421 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError, "Cannot assign to read-only memoryview" +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":436 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: +*/ + +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_slice", 0); + __Pyx_INCREF(__pyx_v_obj); + + /* "View.MemoryView":437 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "View.MemoryView":439 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: +*/ + __pyx_t_7 = NULL; + __pyx_t_8 = __Pyx_PyLong_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 439, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "View.MemoryView":440 + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) # <<<<<<<<<<<<<< + * except TypeError: + * return None +*/ + __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 440, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_obj, __pyx_t_8, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 439, __pyx_L4_error) + __Pyx_GOTREF((PyObject *)__pyx_t_6); + } + __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "View.MemoryView":441 + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + * except TypeError: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + + /* "View.MemoryView":442 + * self.dtype_is_object) + * except TypeError: + * return None # <<<<<<<<<<<<<< + * + * return obj +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L7_except_return; + } + goto __pyx_L6_except_error; + + /* "View.MemoryView":438 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L7_except_return:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L0; + __pyx_L9_try_end:; + } + + /* "View.MemoryView":437 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, +*/ + } + + /* "View.MemoryView":444 + * return None + * + * return obj # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assignment(self, dst, src): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_obj); + __pyx_r = __pyx_v_obj; + goto __pyx_L0; + + /* "View.MemoryView":436 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":446 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice +*/ + +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { + __Pyx_memviewslice __pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_src_slice; + __Pyx_memviewslice __pyx_v_msrc; + __Pyx_memviewslice __pyx_v_mdst; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); + + /* "View.MemoryView":449 + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] + * +*/ + if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error) + __pyx_v_msrc = (__pyx_t_1[0]); + + /* "View.MemoryView":450 + * cdef __Pyx_memviewslice src_slice + * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<< + * + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) +*/ + if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_v_mdst = (__pyx_t_1[0]); + + /* "View.MemoryView":452 + * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] + * + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 452, __pyx_L1_error) + + /* "View.MemoryView":446 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":454 + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL +*/ + +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { + int __pyx_v_array[128]; + void *__pyx_v_tmp; + void *__pyx_v_item; + __Pyx_memviewslice *__pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_tmp_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); + + /* "View.MemoryView":456 + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + * cdef int array[128] + * cdef void *tmp = NULL # <<<<<<<<<<<<<< + * cdef void *item + * +*/ + __pyx_v_tmp = NULL; + + /* "View.MemoryView":461 + * cdef __Pyx_memviewslice *dst_slice + * cdef __Pyx_memviewslice tmp_slice + * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< + * + * if self.view.itemsize > sizeof(array): +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 461, __pyx_L1_error) + __pyx_v_dst_slice = __pyx_t_1; + + /* "View.MemoryView":463 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: +*/ + __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))); + if (__pyx_t_2) { + + /* "View.MemoryView":464 + * + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< + * if tmp == NULL: + * raise MemoryError +*/ + __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); + + /* "View.MemoryView":465 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp +*/ + __pyx_t_2 = (__pyx_v_tmp == NULL); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":466 + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * item = tmp + * else: +*/ + PyErr_NoMemory(); __PYX_ERR(1, 466, __pyx_L1_error) + + /* "View.MemoryView":465 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp +*/ + } + + /* "View.MemoryView":467 + * if tmp == NULL: + * raise MemoryError + * item = tmp # <<<<<<<<<<<<<< + * else: + * item = array +*/ + __pyx_v_item = __pyx_v_tmp; + + /* "View.MemoryView":463 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":469 + * item = tmp + * else: + * item = array # <<<<<<<<<<<<<< + * + * try: +*/ + /*else*/ { + __pyx_v_item = ((void *)__pyx_v_array); + } + __pyx_L3:; + + /* "View.MemoryView":471 + * item = array + * + * try: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * ( item)[0] = value +*/ + /*try:*/ { + + /* "View.MemoryView":472 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: +*/ + if (__pyx_v_self->dtype_is_object) { + + /* "View.MemoryView":473 + * try: + * if self.dtype_is_object: + * ( item)[0] = value # <<<<<<<<<<<<<< + * else: + * self.assign_item_from_object( item, value) +*/ + (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); + + /* "View.MemoryView":472 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":475 + * ( item)[0] = value + * else: + * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L8:; + + /* "View.MemoryView":479 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, +*/ + __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":480 + * + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + * item, self.dtype_is_object) +*/ + __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 480, __pyx_L6_error) + + /* "View.MemoryView":479 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, +*/ + } + + /* "View.MemoryView":481 + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< + * item, self.dtype_is_object) + * finally: +*/ + __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); + } + + /* "View.MemoryView":484 + * item, self.dtype_is_object) + * finally: + * PyMem_Free(tmp) # <<<<<<<<<<<<<< + * + * cdef setitem_indexed(self, index, value): +*/ + /*finally:*/ { + /*normal exit:*/{ + PyMem_Free(__pyx_v_tmp); + goto __pyx_L7; + } + __pyx_L6_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; + { + PyMem_Free(__pyx_v_tmp); + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; + goto __pyx_L1_error; + } + __pyx_L7:; + } + + /* "View.MemoryView":454 + * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":486 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) +*/ + +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_indexed", 0); + + /* "View.MemoryView":487 + * + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< + * self.assign_item_from_object(itemp, value) + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 487, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_1; + + /* "View.MemoryView":488 + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":486 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":490 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_v_struct = NULL; + PyObject *__pyx_v_bytesitem = 0; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":493 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef bytes bytesitem + * +*/ + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":496 + * cdef bytes bytesitem + * + * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< + * try: + * result = struct.unpack(self.view.format, bytesitem) +*/ + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "View.MemoryView":498 + * bytesitem = itemp[:self.view.itemsize] + * try: + * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< + * except struct.error: + * raise ValueError, "Unable to convert item to object" +*/ + __pyx_t_5 = __pyx_v_struct; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unpack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + } + + /* "View.MemoryView":502 + * raise ValueError, "Unable to convert item to object" + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result +*/ + /*else:*/ { + __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 502, __pyx_L5_except_error) + __pyx_t_9 = (__pyx_t_8 == 1); + if (__pyx_t_9) { + + /* "View.MemoryView":503 + * else: + * if len(self.view.format) == 1: + * return result[0] # <<<<<<<<<<<<<< + * return result + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 503, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L6_except_return; + + /* "View.MemoryView":502 + * raise ValueError, "Unable to convert item to object" + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result +*/ + } + + /* "View.MemoryView":504 + * if len(self.view.format) == 1: + * return result[0] + * return result # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L6_except_return; + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "View.MemoryView":499 + * try: + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: # <<<<<<<<<<<<<< + * raise ValueError, "Unable to convert item to object" + * else: +*/ + __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_5); + __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; + if (__pyx_t_11) { + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 499, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_1); + + /* "View.MemoryView":500 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError, "Unable to convert item to object" # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Unable_to_convert_item_to_object, 0, 0); + __PYX_ERR(1, 500, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + + /* "View.MemoryView":497 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } + + /* "View.MemoryView":490 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesitem); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":506 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_v_struct = NULL; + char __pyx_v_c; + PyObject *__pyx_v_bytesvalue = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + char *__pyx_t_10; + char *__pyx_t_11; + Py_ssize_t __pyx_t_12; + char *__pyx_t_13; + char *__pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":509 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef char c + * cdef bytes bytesvalue +*/ + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 509, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":514 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: +*/ + __pyx_t_3 = PyTuple_Check(__pyx_v_value); + if (__pyx_t_3) { + + /* "View.MemoryView":515 + * + * if isinstance(value, tuple): + * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< + * else: + * bytesvalue = struct.pack(self.view.format, value) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 515, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 515, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":514 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":517 + * bytesvalue = struct.pack(self.view.format, *value) + * else: + * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< + * + * for i, c in enumerate(bytesvalue): +*/ + /*else*/ { + __pyx_t_6 = __pyx_v_struct; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 517, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":519 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * +*/ + __pyx_t_8 = 0; + if (unlikely(__pyx_v_bytesvalue == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); + __PYX_ERR(1, 519, __pyx_L1_error) + } + __Pyx_INCREF(__pyx_v_bytesvalue); + __pyx_t_9 = __pyx_v_bytesvalue; + __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely(__pyx_t_11 == ((char *)NULL))) __PYX_ERR(1, 519, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 519, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_11 + __pyx_t_12); + for (__pyx_t_14 = __pyx_t_11; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) { + __pyx_t_10 = __pyx_t_14; + __pyx_v_c = (__pyx_t_10[0]); + + /* "View.MemoryView":520 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + __pyx_v_i = __pyx_t_8; + + /* "View.MemoryView":519 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * +*/ + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":520 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') +*/ + (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "View.MemoryView":506 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":522 + * itemp[i] = c + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: +*/ + +/* Python wrapper */ +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t *__pyx_t_3; + char *__pyx_t_4; + void *__pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + if (unlikely(__pyx_v_info == NULL)) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":524 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * +*/ + __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":525 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError, "Cannot create writable memory view from read-only memoryview" # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Cannot_create_writable_memory_vi, 0, 0); + __PYX_ERR(1, 525, __pyx_L1_error) + + /* "View.MemoryView":524 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * +*/ + } + + /* "View.MemoryView":527 + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":528 + * + * if flags & PyBUF_ND: + * info.shape = self.view.shape # <<<<<<<<<<<<<< + * else: + * info.shape = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.shape; + __pyx_v_info->shape = __pyx_t_3; + + /* "View.MemoryView":527 + * raise ValueError, "Cannot create writable memory view from read-only memoryview" + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":530 + * info.shape = self.view.shape + * else: + * info.shape = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: +*/ + /*else*/ { + __pyx_v_info->shape = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":532 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":533 + * + * if flags & PyBUF_STRIDES: + * info.strides = self.view.strides # <<<<<<<<<<<<<< + * else: + * info.strides = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.strides; + __pyx_v_info->strides = __pyx_t_3; + + /* "View.MemoryView":532 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":535 + * info.strides = self.view.strides + * else: + * info.strides = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_INDIRECT: +*/ + /*else*/ { + __pyx_v_info->strides = NULL; + } + __pyx_L7:; + + /* "View.MemoryView":537 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":538 + * + * if flags & PyBUF_INDIRECT: + * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< + * else: + * info.suboffsets = NULL +*/ + __pyx_t_3 = __pyx_v_self->view.suboffsets; + __pyx_v_info->suboffsets = __pyx_t_3; + + /* "View.MemoryView":537 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":540 + * info.suboffsets = self.view.suboffsets + * else: + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: +*/ + /*else*/ { + __pyx_v_info->suboffsets = NULL; + } + __pyx_L8:; + + /* "View.MemoryView":542 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: +*/ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":543 + * + * if flags & PyBUF_FORMAT: + * info.format = self.view.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL +*/ + __pyx_t_4 = __pyx_v_self->view.format; + __pyx_v_info->format = __pyx_t_4; + + /* "View.MemoryView":542 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":545 + * info.format = self.view.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.buf = self.view.buf +*/ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L9:; + + /* "View.MemoryView":547 + * info.format = NULL + * + * info.buf = self.view.buf # <<<<<<<<<<<<<< + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize +*/ + __pyx_t_5 = __pyx_v_self->view.buf; + __pyx_v_info->buf = __pyx_t_5; + + /* "View.MemoryView":548 + * + * info.buf = self.view.buf + * info.ndim = self.view.ndim # <<<<<<<<<<<<<< + * info.itemsize = self.view.itemsize + * info.len = self.view.len +*/ + __pyx_t_6 = __pyx_v_self->view.ndim; + __pyx_v_info->ndim = __pyx_t_6; + + /* "View.MemoryView":549 + * info.buf = self.view.buf + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< + * info.len = self.view.len + * info.readonly = self.view.readonly +*/ + __pyx_t_7 = __pyx_v_self->view.itemsize; + __pyx_v_info->itemsize = __pyx_t_7; + + /* "View.MemoryView":550 + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + * info.len = self.view.len # <<<<<<<<<<<<<< + * info.readonly = self.view.readonly + * info.obj = self +*/ + __pyx_t_7 = __pyx_v_self->view.len; + __pyx_v_info->len = __pyx_t_7; + + /* "View.MemoryView":551 + * info.itemsize = self.view.itemsize + * info.len = self.view.len + * info.readonly = self.view.readonly # <<<<<<<<<<<<<< + * info.obj = self + * +*/ + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_v_info->readonly = __pyx_t_1; + + /* "View.MemoryView":552 + * info.len = self.view.len + * info.readonly = self.view.readonly + * info.obj = self # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":522 + * itemp[i] = c + * + * @cname('getbuffer') # <<<<<<<<<<<<<< + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":555 + * + * + * @property # <<<<<<<<<<<<<< + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":557 + * @property + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< + * transpose_memslice(&result.from_slice) + * return result +*/ + __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 557, __pyx_L1_error) + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":558 + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 558, __pyx_L1_error) + + /* "View.MemoryView":559 + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + * return result # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":555 + * + * + * @property # <<<<<<<<<<<<<< + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":561 + * return result + * + * @property # <<<<<<<<<<<<<< + * def base(self): + * return self._get_base() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":563 + * @property + * def base(self): + * return self._get_base() # <<<<<<<<<<<<<< + * + * cdef _get_base(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":561 + * return result + * + * @property # <<<<<<<<<<<<<< + * def base(self): + * return self._get_base() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":565 + * return self._get_base() + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.obj + * +*/ + +static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_base", 0); + + /* "View.MemoryView":566 + * + * cdef _get_base(self): + * return self.obj # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->obj); + __pyx_r = __pyx_v_self->obj; + goto __pyx_L0; + + /* "View.MemoryView":565 + * return self._get_base() + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.obj + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":568 + * return self.obj + * + * @property # <<<<<<<<<<<<<< + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_7genexpr__pyx_v_length; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":570 + * @property + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]); + __pyx_t_5 = PyLong_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } /* exit inner scope */ + __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":568 + * return self.obj + * + * @property # <<<<<<<<<<<<<< + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":572 + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def strides(self): + * if self.view.strides == NULL: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_8genexpr1__pyx_v_stride; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":574 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError, "Buffer view does not expose strides" +*/ + __pyx_t_1 = (__pyx_v_self->view.strides == NULL); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":576 + * if self.view.strides == NULL: + * + * raise ValueError, "Buffer view does not expose strides" # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Buffer_view_does_not_expose_stri, 0, 0); + __PYX_ERR(1, 576, __pyx_L1_error) + + /* "View.MemoryView":574 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError, "Buffer view does not expose strides" +*/ + } + + /* "View.MemoryView":578 + * raise ValueError, "Buffer view does not expose strides" + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]); + __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } /* exit inner scope */ + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":572 + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def strides(self): + * if self.view.strides == NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":580 + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def suboffsets(self): + * if self.view.suboffsets == NULL: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":582 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * +*/ + __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":583 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[0], __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":582 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * +*/ + } + + /* "View.MemoryView":585 + * return (-1,) * self.view.ndim + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]); + __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } /* exit inner scope */ + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":580 + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def suboffsets(self): + * if self.view.suboffsets == NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":587 + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def ndim(self): + * return self.view.ndim +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":589 + * @property + * def ndim(self): + * return self.view.ndim # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":587 + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + * + * @property # <<<<<<<<<<<<<< + * def ndim(self): + * return self.view.ndim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":591 + * return self.view.ndim + * + * @property # <<<<<<<<<<<<<< + * def itemsize(self): + * return self.view.itemsize +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":593 + * @property + * def itemsize(self): + * return self.view.itemsize # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":591 + * return self.view.ndim + * + * @property # <<<<<<<<<<<<<< + * def itemsize(self): + * return self.view.itemsize +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":595 + * return self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def nbytes(self): + * return self.size * self.view.itemsize +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":597 + * @property + * def nbytes(self): + * return self.size * self.view.itemsize # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":595 + * return self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def nbytes(self): + * return self.size * self.view.itemsize +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":599 + * return self.size * self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def size(self): + * if self._size is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":601 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * +*/ + __pyx_t_1 = (__pyx_v_self->_size == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":602 + * def size(self): + * if self._size is None: + * result = 1 # <<<<<<<<<<<<<< + * + * for length in self.view.shape[:self.view.ndim]: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_v_result = __pyx_mstate_global->__pyx_int_1; + + /* "View.MemoryView":604 + * result = 1 + * + * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< + * result *= length + * +*/ + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_t_5 = PyLong_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":605 + * + * for length in self.view.shape[:self.view.ndim]: + * result *= length # <<<<<<<<<<<<<< + * + * self._size = result +*/ + __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); + __pyx_t_5 = 0; + } + + /* "View.MemoryView":607 + * result *= length + * + * self._size = result # <<<<<<<<<<<<<< + * + * return self._size +*/ + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + __Pyx_GOTREF(__pyx_v_self->_size); + __Pyx_DECREF(__pyx_v_self->_size); + __pyx_v_self->_size = __pyx_v_result; + + /* "View.MemoryView":601 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * +*/ + } + + /* "View.MemoryView":609 + * self._size = result + * + * return self._size # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_size); + __pyx_r = __pyx_v_self->_size; + goto __pyx_L0; + + /* "View.MemoryView":599 + * return self.size * self.view.itemsize + * + * @property # <<<<<<<<<<<<<< + * def size(self): + * if self._size is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":611 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":612 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * +*/ + __pyx_t_1 = (__pyx_v_self->view.ndim >= 1); + if (__pyx_t_1) { + + /* "View.MemoryView":613 + * def __len__(self): + * if self.view.ndim >= 1: + * return self.view.shape[0] # <<<<<<<<<<<<<< + * + * return 0 +*/ + __pyx_r = (__pyx_v_self->view.shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":612 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * +*/ + } + + /* "View.MemoryView":615 + * return self.view.shape[0] + * + * return 0 # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":611 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":617 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":618 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":619 + * def __repr__(self): + * return "" % (self.base.__class__.__name__, + * id(self)) # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_0x; + __pyx_t_4[3] = __pyx_t_3; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__3; + + /* "View.MemoryView":618 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * +*/ + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":617 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":621 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3[3]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "View.MemoryView":622 + * + * def __str__(self): + * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of; + __pyx_t_3[1] = __pyx_t_2; + __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_object; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":621 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":625 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_c_contig", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_c_contig", 0); + + /* "View.MemoryView":628 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 628, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":629 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< + * + * def is_f_contig(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":625 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":631 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_f_contig", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_f_contig", 0); + + /* "View.MemoryView":634 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * +*/ + __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 634, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":635 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< + * + * def copy(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":631 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":637 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_mslice; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy", 0); + + /* "View.MemoryView":639 + * def copy(self): + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &mslice) +*/ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); + + /* "View.MemoryView":641 + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + * + * slice_copy(self, &mslice) # <<<<<<<<<<<<<< + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, + * self.view.itemsize, +*/ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); + + /* "View.MemoryView":642 + * + * slice_copy(self, &mslice) + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_C_CONTIGUOUS, +*/ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 642, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":647 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< + * + * def copy_fortran(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":637 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":649 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS +*/ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy_fortran", __pyx_kwds); return NULL;} + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy_fortran", 0); + + /* "View.MemoryView":651 + * def copy_fortran(self): + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &src) +*/ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); + + /* "View.MemoryView":653 + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + * + * slice_copy(self, &src) # <<<<<<<<<<<<<< + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, + * self.view.itemsize, +*/ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); + + /* "View.MemoryView":654 + * + * slice_copy(self, &src) + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_F_CONTIGUOUS, +*/ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 654, __pyx_L1_error) + __pyx_v_dst = __pyx_t_1; + + /* "View.MemoryView":659 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":649 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":662 + * + * + * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<< + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) +*/ + +static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo const *__pyx_v_typeinfo) { + struct __pyx_memoryview_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); + + /* "View.MemoryView":664 + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< + * result.typeinfo = typeinfo + * return result +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_o, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":665 + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_v_result->typeinfo = __pyx_v_typeinfo; + + /* "View.MemoryView":666 + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_check') +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":662 + * + * + * @cname('__pyx_memoryview_new') # <<<<<<<<<<<<<< + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":668 + * return result + * + * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<< + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) +*/ + +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { + int __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":670 + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) # <<<<<<<<<<<<<< + * + * cdef tuple _unellipsify(object index, int ndim): +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type); + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":668 + * return result + * + * @cname('__pyx_memoryview_check') # <<<<<<<<<<<<<< + * cdef inline bint memoryview_check(object o) noexcept: + * return isinstance(o, memoryview) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":672 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with +*/ + +static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_idx; + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_v_result = NULL; + int __pyx_v_have_slices; + int __pyx_v_seen_ellipsis; + PyObject *__pyx_v_item = NULL; + Py_ssize_t __pyx_v_nslices; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6[3]; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unellipsify", 0); + + /* "View.MemoryView":678 + * """ + * cdef Py_ssize_t idx + * tup = index if isinstance(index, tuple) else (index,) # <<<<<<<<<<<<<< + * + * result = [slice(None)] * ndim +*/ + __pyx_t_2 = PyTuple_Check(__pyx_v_index); + if (__pyx_t_2) { + __Pyx_INCREF(((PyObject*)__pyx_v_index)); + __pyx_t_1 = __pyx_v_index; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_index); + __Pyx_GIVEREF(__pyx_v_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 678, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_v_tup = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":680 + * tup = index if isinstance(index, tuple) else (index,) + * + * result = [slice(None)] * ndim # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False +*/ + __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 680, __pyx_L1_error); + } + } + __pyx_v_result = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":681 + * + * result = [slice(None)] * ndim + * have_slices = False # <<<<<<<<<<<<<< + * seen_ellipsis = False + * idx = 0 +*/ + __pyx_v_have_slices = 0; + + /* "View.MemoryView":682 + * result = [slice(None)] * ndim + * have_slices = False + * seen_ellipsis = False # <<<<<<<<<<<<<< + * idx = 0 + * for item in tup: +*/ + __pyx_v_seen_ellipsis = 0; + + /* "View.MemoryView":683 + * have_slices = False + * seen_ellipsis = False + * idx = 0 # <<<<<<<<<<<<<< + * for item in tup: + * if item is Ellipsis: +*/ + __pyx_v_idx = 0; + + /* "View.MemoryView":684 + * seen_ellipsis = False + * idx = 0 + * for item in tup: # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: +*/ + if (unlikely(__pyx_v_tup == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 684, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 684, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":685 + * idx = 0 + * for item in tup: + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * idx += ndim - len(tup) +*/ + __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); + if (__pyx_t_2) { + + /* "View.MemoryView":686 + * for item in tup: + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * idx += ndim - len(tup) + * seen_ellipsis = True +*/ + __pyx_t_2 = (!__pyx_v_seen_ellipsis); + if (__pyx_t_2) { + + /* "View.MemoryView":687 + * if item is Ellipsis: + * if not seen_ellipsis: + * idx += ndim - len(tup) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * have_slices = True +*/ + if (unlikely(__pyx_v_tup == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 687, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5)); + + /* "View.MemoryView":688 + * if not seen_ellipsis: + * idx += ndim - len(tup) + * seen_ellipsis = True # <<<<<<<<<<<<<< + * have_slices = True + * else: +*/ + __pyx_v_seen_ellipsis = 1; + + /* "View.MemoryView":686 + * for item in tup: + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * idx += ndim - len(tup) + * seen_ellipsis = True +*/ + } + + /* "View.MemoryView":689 + * idx += ndim - len(tup) + * seen_ellipsis = True + * have_slices = True # <<<<<<<<<<<<<< + * else: + * if isinstance(item, slice): +*/ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":685 + * idx = 0 + * for item in tup: + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * idx += ndim - len(tup) +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":691 + * have_slices = True + * else: + * if isinstance(item, slice): # <<<<<<<<<<<<<< + * have_slices = True + * elif not PyIndex_Check(item): +*/ + /*else*/ { + __pyx_t_2 = PySlice_Check(__pyx_v_item); + if (__pyx_t_2) { + + /* "View.MemoryView":692 + * else: + * if isinstance(item, slice): + * have_slices = True # <<<<<<<<<<<<<< + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" +*/ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":691 + * have_slices = True + * else: + * if isinstance(item, slice): # <<<<<<<<<<<<<< + * have_slices = True + * elif not PyIndex_Check(item): +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":693 + * if isinstance(item, slice): + * have_slices = True + * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item +*/ + __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0)); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":694 + * have_slices = True + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" # <<<<<<<<<<<<<< + * result[idx] = item + * idx += 1 +*/ + __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type; + __pyx_t_6[1] = __pyx_t_3; + __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_t_7, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(1, 694, __pyx_L1_error) + + /* "View.MemoryView":693 + * if isinstance(item, slice): + * have_slices = True + * elif not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item +*/ + } + __pyx_L7:; + + /* "View.MemoryView":695 + * elif not PyIndex_Check(item): + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item # <<<<<<<<<<<<<< + * idx += 1 + * +*/ + if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 695, __pyx_L1_error) + } + __pyx_L5:; + + /* "View.MemoryView":696 + * raise TypeError, f"Cannot index with type '{type(item)}'" + * result[idx] = item + * idx += 1 # <<<<<<<<<<<<<< + * + * nslices = ndim - idx +*/ + __pyx_v_idx = (__pyx_v_idx + 1); + + /* "View.MemoryView":684 + * seen_ellipsis = False + * idx = 0 + * for item in tup: # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":698 + * idx += 1 + * + * nslices = ndim - idx # <<<<<<<<<<<<<< + * return have_slices or nslices, tuple(result) + * +*/ + __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx); + + /* "View.MemoryView":699 + * + * nslices = ndim - idx + * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: +*/ + __Pyx_XDECREF(__pyx_r); + if (!__pyx_v_have_slices) { + } else { + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_L9_bool_binop_done:; + __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 699, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 699, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_7 = 0; + __pyx_r = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":672 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":701 + * return have_slices or nslices, tuple(result) + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: +*/ + +static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_suboffset; + int __pyx_r; + Py_ssize_t *__pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":702 + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" +*/ + __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); + for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { + __pyx_t_1 = __pyx_t_3; + __pyx_v_suboffset = (__pyx_t_1[0]); + + /* "View.MemoryView":703 + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag +*/ + __pyx_t_4 = (__pyx_v_suboffset >= 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":704 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" # <<<<<<<<<<<<<< + * return 0 # return type just used as an error flag + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Indirect_dimensions_not_supporte, 0, 0); + __PYX_ERR(1, 704, __pyx_L1_error) + + /* "View.MemoryView":703 + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag +*/ + } + } + + /* "View.MemoryView":705 + * if suboffset >= 0: + * raise ValueError, "Indirect dimensions not supported" + * return 0 # return type just used as an error flag # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":701 + * return have_slices or nslices, tuple(result) + * + * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":711 + * + * + * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<< + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim +*/ + +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { + int __pyx_v_new_ndim; + int __pyx_v_suboffset_dim; + int __pyx_v_dim; + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + __Pyx_memviewslice *__pyx_v_p_src; + struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; + __Pyx_memviewslice *__pyx_v_p_dst; + int *__pyx_v_p_suboffset_dim; + Py_ssize_t __pyx_v_start; + Py_ssize_t __pyx_v_stop; + Py_ssize_t __pyx_v_step; + Py_ssize_t __pyx_v_cindex; + int __pyx_v_have_start; + int __pyx_v_have_stop; + int __pyx_v_have_step; + PyObject *__pyx_v_index = NULL; + struct __pyx_memoryview_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + struct __pyx_memoryview_obj *__pyx_t_3; + char *__pyx_t_4; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + Py_ssize_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memview_slice", 0); + + /* "View.MemoryView":713 + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< + * cdef bint negative_step + * cdef __Pyx_memviewslice src, dst +*/ + __pyx_v_new_ndim = 0; + __pyx_v_suboffset_dim = -1; + + /* "View.MemoryView":720 + * + * + * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< + * + * cdef _memoryviewslice memviewsliceobj +*/ + (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); + + /* "View.MemoryView":724 + * cdef _memoryviewslice memviewsliceobj + * + * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_memview->view.ndim > 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(1, 724, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 724, __pyx_L1_error) + #endif + + /* "View.MemoryView":726 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":727 + * + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview # <<<<<<<<<<<<<< + * p_src = &memviewsliceobj.from_slice + * else: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error) + __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":728 + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, &src) +*/ + __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); + + /* "View.MemoryView":726 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":730 + * p_src = &memviewsliceobj.from_slice + * else: + * slice_copy(memview, &src) # <<<<<<<<<<<<<< + * p_src = &src + * +*/ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); + + /* "View.MemoryView":731 + * else: + * slice_copy(memview, &src) + * p_src = &src # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_p_src = (&__pyx_v_src); + } + __pyx_L3:; + + /* "View.MemoryView":737 + * + * + * dst.memview = p_src.memview # <<<<<<<<<<<<<< + * dst.data = p_src.data + * +*/ + __pyx_t_3 = __pyx_v_p_src->memview; + __pyx_v_dst.memview = __pyx_t_3; + + /* "View.MemoryView":738 + * + * dst.memview = p_src.memview + * dst.data = p_src.data # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_v_p_src->data; + __pyx_v_dst.data = __pyx_t_4; + + /* "View.MemoryView":743 + * + * + * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< + * cdef int *p_suboffset_dim = &suboffset_dim + * cdef Py_ssize_t start, stop, step, cindex +*/ + __pyx_v_p_dst = (&__pyx_v_dst); + + /* "View.MemoryView":744 + * + * cdef __Pyx_memviewslice *p_dst = &dst + * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< + * cdef Py_ssize_t start, stop, step, cindex + * cdef bint have_start, have_stop, have_step +*/ + __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); + + /* "View.MemoryView":748 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * cindex = index +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { + __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 748, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_2); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 748, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_dim = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "View.MemoryView":749 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * cindex = index + * slice_memviewslice( +*/ + __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":750 + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): + * cindex = index # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 750, __pyx_L1_error) + __pyx_v_cindex = __pyx_t_9; + + /* "View.MemoryView":751 + * if PyIndex_Check(index): + * cindex = index + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, +*/ + __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 751, __pyx_L1_error) + + /* "View.MemoryView":749 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * cindex = index + * slice_memviewslice( +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":757 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 +*/ + __pyx_t_1 = (__pyx_v_index == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":758 + * False) + * elif index is None: + * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 +*/ + (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; + + /* "View.MemoryView":759 + * elif index is None: + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 +*/ + (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; + + /* "View.MemoryView":760 + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< + * new_ndim += 1 + * else: +*/ + (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; + + /* "View.MemoryView":761 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 # <<<<<<<<<<<<<< + * else: + * start = index.start or 0 +*/ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + + /* "View.MemoryView":757 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":763 + * new_ndim += 1 + * else: + * start = index.start or 0 # <<<<<<<<<<<<<< + * stop = index.stop or 0 + * step = index.step or 0 +*/ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L7_bool_binop_done:; + __pyx_v_start = __pyx_t_9; + + /* "View.MemoryView":764 + * else: + * start = index.start or 0 + * stop = index.stop or 0 # <<<<<<<<<<<<<< + * step = index.step or 0 + * +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L9_bool_binop_done:; + __pyx_v_stop = __pyx_t_9; + + /* "View.MemoryView":765 + * start = index.start or 0 + * stop = index.stop or 0 + * step = index.step or 0 # <<<<<<<<<<<<<< + * + * have_start = index.start is not None +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 765, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 765, __pyx_L1_error) + __pyx_t_9 = __pyx_t_11; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_9 = 0; + __pyx_L11_bool_binop_done:; + __pyx_v_step = __pyx_t_9; + + /* "View.MemoryView":767 + * step = index.step or 0 + * + * have_start = index.start is not None # <<<<<<<<<<<<<< + * have_stop = index.stop is not None + * have_step = index.step is not None +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_start = __pyx_t_1; + + /* "View.MemoryView":768 + * + * have_start = index.start is not None + * have_stop = index.stop is not None # <<<<<<<<<<<<<< + * have_step = index.step is not None + * +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_stop = __pyx_t_1; + + /* "View.MemoryView":769 + * have_start = index.start is not None + * have_stop = index.stop is not None + * have_step = index.step is not None # <<<<<<<<<<<<<< + * + * slice_memviewslice( +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_8 != Py_None); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_have_step = __pyx_t_1; + + /* "View.MemoryView":771 + * have_step = index.step is not None + * + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, +*/ + __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 771, __pyx_L1_error) + + /* "View.MemoryView":777 + * have_start, have_stop, have_step, + * True) + * new_ndim += 1 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): +*/ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + } + __pyx_L6:; + + /* "View.MemoryView":748 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * cindex = index +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":779 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":780 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "View.MemoryView":781 + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< + * memviewsliceobj.to_dtype_func, + * memview.dtype_is_object) +*/ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) } + + /* "View.MemoryView":782 + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * else: +*/ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 782, __pyx_L1_error) } + + /* "View.MemoryView":780 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, +*/ + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 780, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":779 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, +*/ + } + + /* "View.MemoryView":785 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * +*/ + /*else*/ { + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "View.MemoryView":786 + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "View.MemoryView":785 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":711 + * + * + * @cname('__pyx_memview_slice') # <<<<<<<<<<<<<< + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":793 + * + * + * @cname('__pyx_memoryview_slice_memviewslice') # <<<<<<<<<<<<<< + * cdef int slice_memviewslice( + * __Pyx_memviewslice *dst, +*/ + +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { + Py_ssize_t __pyx_v_new_shape; + int __pyx_v_negative_step; + int __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":814 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: +*/ + __pyx_t_1 = (!__pyx_v_is_slice); + if (__pyx_t_1) { + + /* "View.MemoryView":816 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: +*/ + __pyx_t_1 = (__pyx_v_start < 0); + if (__pyx_t_1) { + + /* "View.MemoryView":817 + * + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if not 0 <= start < shape: + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) +*/ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":816 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: +*/ + } + + /* "View.MemoryView":818 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) + * else: +*/ + __pyx_t_1 = (0 <= __pyx_v_start); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); + } + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "View.MemoryView":819 + * start += shape + * if not 0 <= start < shape: + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 819, __pyx_L1_error) + + /* "View.MemoryView":818 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) + * else: +*/ + } + + /* "View.MemoryView":814 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":822 + * else: + * + * if have_step: # <<<<<<<<<<<<<< + * negative_step = step < 0 + * if step == 0: +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_have_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":823 + * + * if have_step: + * negative_step = step < 0 # <<<<<<<<<<<<<< + * if step == 0: + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) +*/ + __pyx_v_negative_step = (__pyx_v_step < 0); + + /* "View.MemoryView":824 + * if have_step: + * negative_step = step < 0 + * if step == 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: +*/ + __pyx_t_2 = (__pyx_v_step == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":825 + * negative_step = step < 0 + * if step == 0: + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * negative_step = False +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 825, __pyx_L1_error) + + /* "View.MemoryView":824 + * if have_step: + * negative_step = step < 0 + * if step == 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: +*/ + } + + /* "View.MemoryView":822 + * else: + * + * if have_step: # <<<<<<<<<<<<<< + * negative_step = step < 0 + * if step == 0: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":827 + * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) + * else: + * negative_step = False # <<<<<<<<<<<<<< + * step = 1 + * +*/ + /*else*/ { + __pyx_v_negative_step = 0; + + /* "View.MemoryView":828 + * else: + * negative_step = False + * step = 1 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_step = 1; + } + __pyx_L6:; + + /* "View.MemoryView":831 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape +*/ + __pyx_t_2 = (__pyx_v_have_start != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":832 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: +*/ + __pyx_t_2 = (__pyx_v_start < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":833 + * if have_start: + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if start < 0: + * start = 0 +*/ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":834 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: +*/ + __pyx_t_2 = (__pyx_v_start < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":835 + * start += shape + * if start < 0: + * start = 0 # <<<<<<<<<<<<<< + * elif start >= shape: + * if negative_step: +*/ + __pyx_v_start = 0; + + /* "View.MemoryView":834 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: +*/ + } + + /* "View.MemoryView":832 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":836 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 +*/ + __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape); + if (__pyx_t_2) { + + /* "View.MemoryView":837 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + if (__pyx_v_negative_step) { + + /* "View.MemoryView":838 + * elif start >= shape: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = shape +*/ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":837 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + goto __pyx_L11; + } + + /* "View.MemoryView":840 + * start = shape - 1 + * else: + * start = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: +*/ + /*else*/ { + __pyx_v_start = __pyx_v_shape; + } + __pyx_L11:; + + /* "View.MemoryView":836 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 +*/ + } + __pyx_L9:; + + /* "View.MemoryView":831 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape +*/ + goto __pyx_L8; + } + + /* "View.MemoryView":842 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + /*else*/ { + if (__pyx_v_negative_step) { + + /* "View.MemoryView":843 + * else: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = 0 +*/ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":842 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: +*/ + goto __pyx_L12; + } + + /* "View.MemoryView":845 + * start = shape - 1 + * else: + * start = 0 # <<<<<<<<<<<<<< + * + * if have_stop: +*/ + /*else*/ { + __pyx_v_start = 0; + } + __pyx_L12:; + } + __pyx_L8:; + + /* "View.MemoryView":847 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape +*/ + __pyx_t_2 = (__pyx_v_have_stop != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":848 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: +*/ + __pyx_t_2 = (__pyx_v_stop < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":849 + * if have_stop: + * if stop < 0: + * stop += shape # <<<<<<<<<<<<<< + * if stop < 0: + * stop = 0 +*/ + __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); + + /* "View.MemoryView":850 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: +*/ + __pyx_t_2 = (__pyx_v_stop < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":851 + * stop += shape + * if stop < 0: + * stop = 0 # <<<<<<<<<<<<<< + * elif stop > shape: + * stop = shape +*/ + __pyx_v_stop = 0; + + /* "View.MemoryView":850 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: +*/ + } + + /* "View.MemoryView":848 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: +*/ + goto __pyx_L14; + } + + /* "View.MemoryView":852 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: +*/ + __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape); + if (__pyx_t_2) { + + /* "View.MemoryView":853 + * stop = 0 + * elif stop > shape: + * stop = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: +*/ + __pyx_v_stop = __pyx_v_shape; + + /* "View.MemoryView":852 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: +*/ + } + __pyx_L14:; + + /* "View.MemoryView":847 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape +*/ + goto __pyx_L13; + } + + /* "View.MemoryView":855 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: +*/ + /*else*/ { + if (__pyx_v_negative_step) { + + /* "View.MemoryView":856 + * else: + * if negative_step: + * stop = -1 # <<<<<<<<<<<<<< + * else: + * stop = shape +*/ + __pyx_v_stop = -1L; + + /* "View.MemoryView":855 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: +*/ + goto __pyx_L16; + } + + /* "View.MemoryView":858 + * stop = -1 + * else: + * stop = shape # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_v_stop = __pyx_v_shape; + } + __pyx_L16:; + } + __pyx_L13:; + + /* "View.MemoryView":862 + * + * with cython.cdivision(True): + * new_shape = (stop - start) // step # <<<<<<<<<<<<<< + * + * if (stop - start) - step * new_shape: +*/ + __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); + + /* "View.MemoryView":864 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * +*/ + __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":865 + * + * if (stop - start) - step * new_shape: + * new_shape += 1 # <<<<<<<<<<<<<< + * + * if new_shape < 0: +*/ + __pyx_v_new_shape = (__pyx_v_new_shape + 1); + + /* "View.MemoryView":864 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * +*/ + } + + /* "View.MemoryView":867 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * +*/ + __pyx_t_2 = (__pyx_v_new_shape < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":868 + * + * if new_shape < 0: + * new_shape = 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_new_shape = 0; + + /* "View.MemoryView":867 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * +*/ + } + + /* "View.MemoryView":871 + * + * + * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset +*/ + (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); + + /* "View.MemoryView":872 + * + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< + * dst.suboffsets[new_ndim] = suboffset + * +*/ + (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; + + /* "View.MemoryView":873 + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< + * + * +*/ + (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; + } + __pyx_L3:; + + /* "View.MemoryView":876 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: +*/ + __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":877 + * + * if suboffset_dim[0] < 0: + * dst.data += start * stride # <<<<<<<<<<<<<< + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride +*/ + __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); + + /* "View.MemoryView":876 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: +*/ + goto __pyx_L19; + } + + /* "View.MemoryView":879 + * dst.data += start * stride + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< + * + * if suboffset >= 0: +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_suboffset_dim[0]); + (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); + } + __pyx_L19:; + + /* "View.MemoryView":881 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: +*/ + __pyx_t_2 = (__pyx_v_suboffset >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":882 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset +*/ + __pyx_t_2 = (!__pyx_v_is_slice); + if (__pyx_t_2) { + + /* "View.MemoryView":883 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: +*/ + __pyx_t_2 = (__pyx_v_new_ndim == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":884 + * if not is_slice: + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " +*/ + __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":883 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: +*/ + goto __pyx_L22; + } + + /* "View.MemoryView":886 + * dst.data = ( dst.data)[0] + suboffset + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< + * "must be indexed and not sliced", dim) + * else: +*/ + /*else*/ { + + /* "View.MemoryView":887 + * else: + * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " + * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< + * else: + * suboffset_dim[0] = new_ndim +*/ + __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 886, __pyx_L1_error) + } + __pyx_L22:; + + /* "View.MemoryView":882 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset +*/ + goto __pyx_L21; + } + + /* "View.MemoryView":889 + * "must be indexed and not sliced", dim) + * else: + * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< + * + * return 0 +*/ + /*else*/ { + (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; + } + __pyx_L21:; + + /* "View.MemoryView":881 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: +*/ + } + + /* "View.MemoryView":891 + * suboffset_dim[0] = new_ndim + * + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":793 + * + * + * @cname('__pyx_memoryview_slice_memviewslice') # <<<<<<<<<<<<<< + * cdef int slice_memviewslice( + * __Pyx_memviewslice *dst, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":896 + * + * + * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<< + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: +*/ + +static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_suboffset; + Py_ssize_t __pyx_v_itemsize; + char *__pyx_v_resultp; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[3]; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pybuffer_index", 0); + + /* "View.MemoryView":899 + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< + * cdef Py_ssize_t itemsize = view.itemsize + * cdef char *resultp +*/ + __pyx_v_suboffset = -1L; + + /* "View.MemoryView":900 + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< + * cdef char *resultp + * +*/ + __pyx_t_1 = __pyx_v_view->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":903 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len // itemsize + * stride = itemsize +*/ + __pyx_t_2 = (__pyx_v_view->ndim == 0); + if (__pyx_t_2) { + + /* "View.MemoryView":904 + * + * if view.ndim == 0: + * shape = view.len // itemsize # <<<<<<<<<<<<<< + * stride = itemsize + * else: +*/ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 904, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 904, __pyx_L1_error) + } + __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0); + + /* "View.MemoryView":905 + * if view.ndim == 0: + * shape = view.len // itemsize + * stride = itemsize # <<<<<<<<<<<<<< + * else: + * shape = view.shape[dim] +*/ + __pyx_v_stride = __pyx_v_itemsize; + + /* "View.MemoryView":903 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len // itemsize + * stride = itemsize +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":907 + * stride = itemsize + * else: + * shape = view.shape[dim] # <<<<<<<<<<<<<< + * stride = view.strides[dim] + * if view.suboffsets != NULL: +*/ + /*else*/ { + __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); + + /* "View.MemoryView":908 + * else: + * shape = view.shape[dim] + * stride = view.strides[dim] # <<<<<<<<<<<<<< + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] +*/ + __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); + + /* "View.MemoryView":909 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * +*/ + __pyx_t_2 = (__pyx_v_view->suboffsets != NULL); + if (__pyx_t_2) { + + /* "View.MemoryView":910 + * stride = view.strides[dim] + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< + * + * if index < 0: +*/ + __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); + + /* "View.MemoryView":909 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * +*/ + } + } + __pyx_L3:; + + /* "View.MemoryView":912 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: +*/ + __pyx_t_2 = (__pyx_v_index < 0); + if (__pyx_t_2) { + + /* "View.MemoryView":913 + * + * if index < 0: + * index += view.shape[dim] # <<<<<<<<<<<<<< + * if index < 0: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" +*/ + __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); + + /* "View.MemoryView":914 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + __pyx_t_2 = (__pyx_v_index < 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":915 + * index += view.shape[dim] + * if index < 0: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< + * + * if index >= shape: +*/ + __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a; + __pyx_t_4[1] = __pyx_t_3; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127); + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 915, __pyx_L1_error) + + /* "View.MemoryView":914 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + } + + /* "View.MemoryView":912 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: +*/ + } + + /* "View.MemoryView":917 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":918 + * + * if index >= shape: + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<< + * + * resultp = bufp + index * stride +*/ + __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a; + __pyx_t_4[1] = __pyx_t_5; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127); + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 918, __pyx_L1_error) + + /* "View.MemoryView":917 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * +*/ + } + + /* "View.MemoryView":920 + * raise IndexError, f"Out of bounds on buffer access (axis {dim})" + * + * resultp = bufp + index * stride # <<<<<<<<<<<<<< + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset +*/ + __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); + + /* "View.MemoryView":921 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * +*/ + __pyx_t_2 = (__pyx_v_suboffset >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":922 + * resultp = bufp + index * stride + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< + * + * return resultp +*/ + __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":921 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * +*/ + } + + /* "View.MemoryView":924 + * resultp = ( resultp)[0] + suboffset + * + * return resultp # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_resultp; + goto __pyx_L0; + + /* "View.MemoryView":896 + * + * + * @cname('__pyx_pybuffer_index') # <<<<<<<<<<<<<< + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":929 + * + * + * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<< + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim +*/ + +static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { + int __pyx_v_ndim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + int __pyx_v_i; + int __pyx_v_j; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + long __pyx_t_3; + long __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":931 + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< + * + * cdef Py_ssize_t *shape = memslice.shape +*/ + __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; + __pyx_v_ndim = __pyx_t_1; + + /* "View.MemoryView":933 + * cdef int ndim = memslice.memview.view.ndim + * + * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< + * cdef Py_ssize_t *strides = memslice.strides + * +*/ + __pyx_t_2 = __pyx_v_memslice->shape; + __pyx_v_shape = __pyx_t_2; + + /* "View.MemoryView":934 + * + * cdef Py_ssize_t *shape = memslice.shape + * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_v_memslice->strides; + __pyx_v_strides = __pyx_t_2; + + /* "View.MemoryView":938 + * + * cdef int i, j + * for i in range(ndim // 2): # <<<<<<<<<<<<<< + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] +*/ + __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1); + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":939 + * cdef int i, j + * for i in range(ndim // 2): + * j = ndim - 1 - i # <<<<<<<<<<<<<< + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] +*/ + __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); + + /* "View.MemoryView":940 + * for i in range(ndim // 2): + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< + * shape[i], shape[j] = shape[j], shape[i] + * +*/ + __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); + __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); + (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; + (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; + + /* "View.MemoryView":941 + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: +*/ + __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); + __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); + (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; + (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; + + /* "View.MemoryView":943 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * +*/ + __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0); + __pyx_t_7 = __pyx_t_8; + __pyx_L6_bool_binop_done:; + if (__pyx_t_7) { + + /* "View.MemoryView":944 + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< + * + * return 0 +*/ + __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 944, __pyx_L1_error) + + /* "View.MemoryView":943 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * +*/ + } + } + + /* "View.MemoryView":946 + * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") + * + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":929 + * + * + * @cname('__pyx_memslice_transpose') # <<<<<<<<<<<<<< + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: + * cdef int ndim = memslice.memview.view.ndim +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":964 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * +*/ + +/* Python wrapper */ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + + /* "View.MemoryView":965 + * + * def __dealloc__(self): + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): +*/ + __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1); + + /* "View.MemoryView":964 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * +*/ + + /* function exit code */ +} + +/* "View.MemoryView":967 + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) +*/ + +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":968 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: +*/ + __pyx_t_1 = (__pyx_v_self->to_object_func != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":969 + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) # <<<<<<<<<<<<<< + * else: + * return memoryview.convert_item_to_object(self, itemp) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":968 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: +*/ + } + + /* "View.MemoryView":971 + * return self.to_object_func(itemp) + * else: + * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":967 + * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":973 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) +*/ + +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":974 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: +*/ + __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL); + if (__pyx_t_1) { + + /* "View.MemoryView":975 + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< + * else: + * memoryview.assign_item_from_object(self, itemp, value) +*/ + __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 975, __pyx_L1_error) + + /* "View.MemoryView":974 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":977 + * self.to_dtype_func(itemp, value) + * else: + * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< + * + * cdef _get_base(self): +*/ + /*else*/ { + __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":973 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":979 + * memoryview.assign_item_from_object(self, itemp, value) + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.from_object + * +*/ + +static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_base", 0); + + /* "View.MemoryView":980 + * + * cdef _get_base(self): + * return self.from_object # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->from_object); + __pyx_r = __pyx_v_self->from_object; + goto __pyx_L0; + + /* "View.MemoryView":979 + * memoryview.assign_item_from_object(self, itemp, value) + * + * cdef _get_base(self): # <<<<<<<<<<<<<< + * return self.from_object + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":999 + * pass # ignore failure, it's a minor issue + * + * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<< + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, + * int ndim, +*/ + +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_TypeInfo const *__pyx_t_4; + Py_buffer __pyx_t_5; + Py_ssize_t *__pyx_t_6; + Py_ssize_t *__pyx_t_7; + Py_ssize_t *__pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_fromslice", 0); + + /* "View.MemoryView":1008 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None); + if (__pyx_t_1) { + + /* "View.MemoryView":1009 + * + * if memviewslice.memview == Py_None: + * return None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "View.MemoryView":1008 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "View.MemoryView":1014 + * + * + * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<< + * + * result.from_slice = memviewslice +*/ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_mstate_global->__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1016 + * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) + * + * result.from_slice = memviewslice # <<<<<<<<<<<<<< + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * +*/ + __pyx_v_result->from_slice = __pyx_v_memviewslice; + + /* "View.MemoryView":1017 + * + * result.from_slice = memviewslice + * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< + * + * result.from_object = ( memviewslice.memview)._get_base() +*/ + __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); + + /* "View.MemoryView":1019 + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + * result.from_object = ( memviewslice.memview)._get_base() # <<<<<<<<<<<<<< + * result.typeinfo = memviewslice.memview.typeinfo + * +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_result->from_object); + __Pyx_DECREF(__pyx_v_result->from_object); + __pyx_v_result->from_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":1020 + * + * result.from_object = ( memviewslice.memview)._get_base() + * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< + * + * result.view = memviewslice.memview.view +*/ + __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; + __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; + + /* "View.MemoryView":1022 + * result.typeinfo = memviewslice.memview.typeinfo + * + * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< + * result.view.buf = memviewslice.data + * result.view.ndim = ndim +*/ + __pyx_t_5 = __pyx_v_memviewslice.memview->view; + __pyx_v_result->__pyx_base.view = __pyx_t_5; + + /* "View.MemoryView":1023 + * + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None +*/ + __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); + + /* "View.MemoryView":1024 + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data + * result.view.ndim = ndim # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) +*/ + __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; + + /* "View.MemoryView":1025 + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * +*/ + ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; + + /* "View.MemoryView":1026 + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: +*/ + Py_INCREF(Py_None); + + /* "View.MemoryView":1028 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: +*/ + __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1029 + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< + * else: + * result.flags = PyBUF_RECORDS_RO +*/ + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; + + /* "View.MemoryView":1028 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":1031 + * result.flags = PyBUF_RECORDS + * else: + * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< + * + * result.view.shape = result.from_slice.shape +*/ + /*else*/ { + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; + } + __pyx_L4:; + + /* "View.MemoryView":1033 + * result.flags = PyBUF_RECORDS_RO + * + * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< + * result.view.strides = result.from_slice.strides + * +*/ + __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); + + /* "View.MemoryView":1034 + * + * result.view.shape = result.from_slice.shape + * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); + + /* "View.MemoryView":1037 + * + * + * result.view.suboffsets = NULL # <<<<<<<<<<<<<< + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: +*/ + __pyx_v_result->__pyx_base.view.suboffsets = NULL; + + /* "View.MemoryView":1038 + * + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets +*/ + __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_v_suboffset = (__pyx_t_6[0]); + + /* "View.MemoryView":1039 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break +*/ + __pyx_t_1 = (__pyx_v_suboffset >= 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1040 + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); + + /* "View.MemoryView":1041 + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + * break # <<<<<<<<<<<<<< + * + * result.view.len = result.view.itemsize +*/ + goto __pyx_L6_break; + + /* "View.MemoryView":1039 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break +*/ + } + } + __pyx_L6_break:; + + /* "View.MemoryView":1043 + * break + * + * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< + * for length in result.view.shape[:ndim]: + * result.view.len *= length +*/ + __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + + /* "View.MemoryView":1044 + * + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< + * result.view.len *= length + * +*/ + __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_t_2 = PyLong_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1045 + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: + * result.view.len *= length # <<<<<<<<<<<<<< + * + * result.to_object_func = to_object_func +*/ + __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1045, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + } + + /* "View.MemoryView":1047 + * result.view.len *= length + * + * result.to_object_func = to_object_func # <<<<<<<<<<<<<< + * result.to_dtype_func = to_dtype_func + * +*/ + __pyx_v_result->to_object_func = __pyx_v_to_object_func; + + /* "View.MemoryView":1048 + * + * result.to_object_func = to_object_func + * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< + * + * return result +*/ + __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; + + /* "View.MemoryView":1050 + * result.to_dtype_func = to_dtype_func + * + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":999 + * pass # ignore failure, it's a minor issue + * + * @cname('__pyx_memoryview_fromslice') # <<<<<<<<<<<<<< + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, + * int ndim, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1052 + * return result + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, + * __Pyx_memviewslice *mslice) except NULL: +*/ + +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { + struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; + __Pyx_memviewslice *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_slice_from_memview", 0); + + /* "View.MemoryView":1056 + * __Pyx_memviewslice *mslice) except NULL: + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":1057 + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): + * obj = memview # <<<<<<<<<<<<<< + * return &obj.from_slice + * else: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1058 + * if isinstance(memview, _memoryviewslice): + * obj = memview + * return &obj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, mslice) +*/ + __pyx_r = (&__pyx_v_obj->from_slice); + goto __pyx_L0; + + /* "View.MemoryView":1056 + * __Pyx_memviewslice *mslice) except NULL: + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice +*/ + } + + /* "View.MemoryView":1060 + * return &obj.from_slice + * else: + * slice_copy(memview, mslice) # <<<<<<<<<<<<<< + * return mslice + * +*/ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); + + /* "View.MemoryView":1061 + * else: + * slice_copy(memview, mslice) + * return mslice # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_slice_copy') +*/ + __pyx_r = __pyx_v_mslice; + goto __pyx_L0; + } + + /* "View.MemoryView":1052 + * return result + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, + * __Pyx_memviewslice *mslice) except NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1063 + * return mslice + * + * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<< + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: + * cdef int dim +*/ + +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { + int __pyx_v_dim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + Py_ssize_t *__pyx_v_suboffsets; + Py_ssize_t *__pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + + /* "View.MemoryView":1068 + * cdef (Py_ssize_t*) shape, strides, suboffsets + * + * shape = memview.view.shape # <<<<<<<<<<<<<< + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets +*/ + __pyx_t_1 = __pyx_v_memview->view.shape; + __pyx_v_shape = __pyx_t_1; + + /* "View.MemoryView":1069 + * + * shape = memview.view.shape + * strides = memview.view.strides # <<<<<<<<<<<<<< + * suboffsets = memview.view.suboffsets + * +*/ + __pyx_t_1 = __pyx_v_memview->view.strides; + __pyx_v_strides = __pyx_t_1; + + /* "View.MemoryView":1070 + * shape = memview.view.shape + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< + * + * dst.memview = <__pyx_memoryview *> memview +*/ + __pyx_t_1 = __pyx_v_memview->view.suboffsets; + __pyx_v_suboffsets = __pyx_t_1; + + /* "View.MemoryView":1072 + * suboffsets = memview.view.suboffsets + * + * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< + * dst.data = memview.view.buf + * +*/ + __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); + + /* "View.MemoryView":1073 + * + * dst.memview = <__pyx_memoryview *> memview + * dst.data = memview.view.buf # <<<<<<<<<<<<<< + * + * for dim in range(memview.view.ndim): +*/ + __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); + + /* "View.MemoryView":1075 + * dst.data = memview.view.buf + * + * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] +*/ + __pyx_t_2 = __pyx_v_memview->view.ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_dim = __pyx_t_4; + + /* "View.MemoryView":1076 + * + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 +*/ + (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); + + /* "View.MemoryView":1077 + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * +*/ + (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); + + /* "View.MemoryView":1078 + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object') +*/ + __pyx_t_6 = (__pyx_v_suboffsets != 0); + if (__pyx_t_6) { + __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); + } else { + __pyx_t_5 = -1L; + } + (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; + } + + /* "View.MemoryView":1063 + * return mslice + * + * @cname('__pyx_memoryview_slice_copy') # <<<<<<<<<<<<<< + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: + * cdef int dim +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1080 + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<< + * cdef memoryview_copy(memoryview memview): + * "Create a new memoryview object" +*/ + +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { + __Pyx_memviewslice __pyx_v_memviewslice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy", 0); + + /* "View.MemoryView":1084 + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< + * return memoryview_copy_from_slice(memview, &memviewslice) + * +*/ + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); + + /* "View.MemoryView":1085 + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) + * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object_from_slice') +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1080 + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + * @cname('__pyx_memoryview_copy_object') # <<<<<<<<<<<<<< + * cdef memoryview_copy(memoryview memview): + * "Create a new memoryview object" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1087 + * return memoryview_copy_from_slice(memview, &memviewslice) + * + * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<< + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): + * """ +*/ + +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { + PyObject *(*__pyx_v_to_object_func)(char *); + int (*__pyx_v_to_dtype_func)(char *, PyObject *); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *(*__pyx_t_2)(char *); + int (*__pyx_t_3)(char *, PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); + + /* "View.MemoryView":1095 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func +*/ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); + if (__pyx_t_1) { + + /* "View.MemoryView":1096 + * + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: +*/ + __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; + __pyx_v_to_object_func = __pyx_t_2; + + /* "View.MemoryView":1097 + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< + * else: + * to_object_func = NULL +*/ + __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; + __pyx_v_to_dtype_func = __pyx_t_3; + + /* "View.MemoryView":1095 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1099 + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + * to_object_func = NULL # <<<<<<<<<<<<<< + * to_dtype_func = NULL + * +*/ + /*else*/ { + __pyx_v_to_object_func = NULL; + + /* "View.MemoryView":1100 + * else: + * to_object_func = NULL + * to_dtype_func = NULL # <<<<<<<<<<<<<< + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, +*/ + __pyx_v_to_dtype_func = NULL; + } + __pyx_L3:; + + /* "View.MemoryView":1102 + * to_dtype_func = NULL + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< + * to_object_func, to_dtype_func, + * memview.dtype_is_object) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "View.MemoryView":1104 + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + * to_object_func, to_dtype_func, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1087 + * return memoryview_copy_from_slice(memview, &memviewslice) + * + * @cname('__pyx_memoryview_copy_object_from_slice') # <<<<<<<<<<<<<< + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): + * """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1110 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< + * return -arg if arg < 0 else arg + * +*/ + +static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + + /* "View.MemoryView":1111 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: + * return -arg if arg < 0 else arg # <<<<<<<<<<<<<< + * + * @cname('__pyx_get_best_slice_order') +*/ + __pyx_t_2 = (__pyx_v_arg < 0); + if (__pyx_t_2) { + __pyx_t_1 = (-__pyx_v_arg); + } else { + __pyx_t_1 = __pyx_v_arg; + } + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":1110 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<< + * return -arg if arg < 0 else arg + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1113 + * return -arg if arg < 0 else arg + * + * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<< + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: + * """ +*/ + +static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_c_stride; + Py_ssize_t __pyx_v_f_stride; + char __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1119 + * """ + * cdef int i + * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< + * cdef Py_ssize_t f_stride = 0 + * +*/ + __pyx_v_c_stride = 0; + + /* "View.MemoryView":1120 + * cdef int i + * cdef Py_ssize_t c_stride = 0 + * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): +*/ + __pyx_v_f_stride = 0; + + /* "View.MemoryView":1122 + * cdef Py_ssize_t f_stride = 0 + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] +*/ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1123 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break +*/ + __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1124 + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1125 + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * for i in range(ndim): +*/ + goto __pyx_L4_break; + + /* "View.MemoryView":1123 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break +*/ + } + } + __pyx_L4_break:; + + /* "View.MemoryView":1127 + * break + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] +*/ + __pyx_t_1 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_1; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1128 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break +*/ + __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1129 + * for i in range(ndim): + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1130 + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): +*/ + goto __pyx_L7_break; + + /* "View.MemoryView":1128 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break +*/ + } + } + __pyx_L7_break:; + + /* "View.MemoryView":1132 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: +*/ + __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)); + if (__pyx_t_2) { + + /* "View.MemoryView":1133 + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + * return 'C' # <<<<<<<<<<<<<< + * else: + * return 'F' +*/ + __pyx_r = 'C'; + goto __pyx_L0; + + /* "View.MemoryView":1132 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: +*/ + } + + /* "View.MemoryView":1135 + * return 'C' + * else: + * return 'F' # <<<<<<<<<<<<<< + * + * @cython.cdivision(True) +*/ + /*else*/ { + __pyx_r = 'F'; + goto __pyx_L0; + } + + /* "View.MemoryView":1113 + * return -arg if arg < 0 else arg + * + * @cname('__pyx_get_best_slice_order') # <<<<<<<<<<<<<< + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: + * """ +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1137 + * return 'F' + * + * @cython.cdivision(True) # <<<<<<<<<<<<<< + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, + * char *dst_data, Py_ssize_t *dst_strides, +*/ + +static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; + Py_ssize_t __pyx_v_dst_extent; + Py_ssize_t __pyx_v_src_stride; + Py_ssize_t __pyx_v_dst_stride; + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + + /* "View.MemoryView":1145 + * + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] +*/ + __pyx_v_src_extent = (__pyx_v_src_shape[0]); + + /* "View.MemoryView":1146 + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] +*/ + __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); + + /* "View.MemoryView":1147 + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_stride = dst_strides[0] + * +*/ + __pyx_v_src_stride = (__pyx_v_src_strides[0]); + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: +*/ + __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); + + /* "View.MemoryView":1150 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): +*/ + __pyx_t_1 = (__pyx_v_ndim == 1); + if (__pyx_t_1) { + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + __pyx_t_2 = (__pyx_v_src_stride > 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_dst_stride > 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + + /* "View.MemoryView":1152 + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: +*/ + __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); + if (__pyx_t_2) { + __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); + } + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + if (__pyx_t_1) { + + /* "View.MemoryView":1153 + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): +*/ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); + + /* "View.MemoryView":1151 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) +*/ + goto __pyx_L4; + } + + /* "View.MemoryView":1155 + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride +*/ + /*else*/ { + __pyx_t_3 = __pyx_v_dst_extent; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1156 + * else: + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< + * src_data += src_stride + * dst_data += dst_stride +*/ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); + + /* "View.MemoryView":1157 + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * else: +*/ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1158 + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): +*/ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L4:; + + /* "View.MemoryView":1150 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1160 + * dst_data += dst_stride + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * _copy_strided_to_strided(src_data, src_strides + 1, + * dst_data, dst_strides + 1, +*/ + /*else*/ { + __pyx_t_3 = __pyx_v_dst_extent; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1161 + * else: + * for i in range(dst_extent): + * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< + * dst_data, dst_strides + 1, + * src_shape + 1, dst_shape + 1, +*/ + _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); + + /* "View.MemoryView":1165 + * src_shape + 1, dst_shape + 1, + * ndim - 1, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * +*/ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1166 + * ndim - 1, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, +*/ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1137 + * return 'F' + * + * @cython.cdivision(True) # <<<<<<<<<<<<<< + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, + * char *dst_data, Py_ssize_t *dst_strides, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1168 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: +*/ + +static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + + /* "View.MemoryView":1171 + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: + * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< + * src.shape, dst.shape, ndim, itemsize) + * +*/ + _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1168 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) noexcept nogil: +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1174 + * src.shape, dst.shape, ndim, itemsize) + * + * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<< + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" +*/ + +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_size; + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + + /* "View.MemoryView":1177 + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<< + * + * for shape in src.shape[:ndim]: +*/ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_size = __pyx_t_1; + + /* "View.MemoryView":1179 + * cdef Py_ssize_t shape, size = src.memview.view.itemsize + * + * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<< + * size *= shape + * +*/ + __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim); + for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_v_shape = (__pyx_t_2[0]); + + /* "View.MemoryView":1180 + * + * for shape in src.shape[:ndim]: + * size *= shape # <<<<<<<<<<<<<< + * + * return size +*/ + __pyx_v_size = (__pyx_v_size * __pyx_v_shape); + } + + /* "View.MemoryView":1182 + * size *= shape + * + * return size # <<<<<<<<<<<<<< + * + * @cname('__pyx_fill_contig_strides_array') +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "View.MemoryView":1174 + * src.shape, dst.shape, ndim, itemsize) + * + * @cname('__pyx_memoryview_slice_get_size') # <<<<<<<<<<<<<< + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: + * "Return the size of the memory occupied by the slice in number of bytes" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1184 + * return size + * + * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<< + * cdef Py_ssize_t fill_contig_strides_array( + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, +*/ + +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { + int __pyx_v_idx; + Py_ssize_t __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1194 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride +*/ + __pyx_t_1 = (__pyx_v_order == 'F'); + if (__pyx_t_1) { + + /* "View.MemoryView":1195 + * + * if order == 'F': + * for idx in range(ndim): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride *= shape[idx] +*/ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_idx = __pyx_t_4; + + /* "View.MemoryView":1196 + * if order == 'F': + * for idx in range(ndim): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride *= shape[idx] + * else: +*/ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1197 + * for idx in range(ndim): + * strides[idx] = stride + * stride *= shape[idx] # <<<<<<<<<<<<<< + * else: + * for idx in range(ndim - 1, -1, -1): +*/ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + + /* "View.MemoryView":1194 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1199 + * stride *= shape[idx] + * else: + * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride *= shape[idx] +*/ + /*else*/ { + for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { + __pyx_v_idx = __pyx_t_2; + + /* "View.MemoryView":1200 + * else: + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride *= shape[idx] + * +*/ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1201 + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride + * stride *= shape[idx] # <<<<<<<<<<<<<< + * + * return stride +*/ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + } + __pyx_L3:; + + /* "View.MemoryView":1203 + * stride *= shape[idx] + * + * return stride # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_data_to_temp') +*/ + __pyx_r = __pyx_v_stride; + goto __pyx_L0; + + /* "View.MemoryView":1184 + * return size + * + * @cname('__pyx_fill_contig_strides_array') # <<<<<<<<<<<<<< + * cdef Py_ssize_t fill_contig_strides_array( + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1205 + * return stride + * + * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<< + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, + * __Pyx_memviewslice *tmpslice, +*/ + +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { + int __pyx_v_i; + void *__pyx_v_result; + size_t __pyx_v_itemsize; + size_t __pyx_v_size; + void *__pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + struct __pyx_memoryview_obj *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":1217 + * cdef void *result + * + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef size_t size = slice_get_size(src, ndim) + * +*/ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1218 + * + * cdef size_t itemsize = src.memview.view.itemsize + * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< + * + * result = malloc(size) +*/ + __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); + + /* "View.MemoryView":1220 + * cdef size_t size = slice_get_size(src, ndim) + * + * result = malloc(size) # <<<<<<<<<<<<<< + * if not result: + * _err_no_memory() +*/ + __pyx_v_result = malloc(__pyx_v_size); + + /* "View.MemoryView":1221 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err_no_memory() + * +*/ + __pyx_t_2 = (!(__pyx_v_result != 0)); + if (__pyx_t_2) { + + /* "View.MemoryView":1222 + * result = malloc(size) + * if not result: + * _err_no_memory() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1222, __pyx_L1_error) + + /* "View.MemoryView":1221 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err_no_memory() + * +*/ + } + + /* "View.MemoryView":1225 + * + * + * tmpslice.data = result # <<<<<<<<<<<<<< + * tmpslice.memview = src.memview + * for i in range(ndim): +*/ + __pyx_v_tmpslice->data = ((char *)__pyx_v_result); + + /* "View.MemoryView":1226 + * + * tmpslice.data = result + * tmpslice.memview = src.memview # <<<<<<<<<<<<<< + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] +*/ + __pyx_t_4 = __pyx_v_src->memview; + __pyx_v_tmpslice->memview = __pyx_t_4; + + /* "View.MemoryView":1227 + * tmpslice.data = result + * tmpslice.memview = src.memview + * for i in range(ndim): # <<<<<<<<<<<<<< + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 +*/ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1228 + * tmpslice.memview = src.memview + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< + * tmpslice.suboffsets[i] = -1 + * +*/ + (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); + + /* "View.MemoryView":1229 + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) +*/ + (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1231 + * tmpslice.suboffsets[i] = -1 + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) # <<<<<<<<<<<<<< + * + * +*/ + (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); + + /* "View.MemoryView":1234 + * + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 +*/ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * +*/ + __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1236 + * for i in range(ndim): + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< + * + * if slice_is_contig(src[0], order, ndim): +*/ + (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * +*/ + } + } + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1239 + * + * if slice_is_contig(src[0], order, ndim): + * memcpy(result, src.data, size) # <<<<<<<<<<<<<< + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) +*/ + (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: +*/ + goto __pyx_L9; + } + + /* "View.MemoryView":1241 + * memcpy(result, src.data, size) + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< + * + * return result +*/ + /*else*/ { + copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); + } + __pyx_L9:; + + /* "View.MemoryView":1243 + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + * + * return result # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":1205 + * return stride + * + * @cname('__pyx_memoryview_copy_data_to_temp') # <<<<<<<<<<<<<< + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, + * __Pyx_memviewslice *tmpslice, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1247 + * + * + * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<< + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: +*/ + +static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[7]; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err_extents", 0); + + /* "View.MemoryView":1250 + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_dim') +*/ + __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_got; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_and; + __pyx_t_4[5] = __pyx_t_3; + __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127); + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 1250, __pyx_L1_error) + + /* "View.MemoryView":1247 + * + * + * @cname('__pyx_memoryview_err_extents') # <<<<<<<<<<<<<< + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1252 + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" + * + * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<< + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim +*/ + +static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err_dim", 0); + __Pyx_INCREF(__pyx_v_msg); + + /* "View.MemoryView":1254 + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err') +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 1254, __pyx_L1_error) + + /* "View.MemoryView":1252 + * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" + * + * @cname('__pyx_memoryview_err_dim') # <<<<<<<<<<<<<< + * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: + * raise error, msg % dim +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1256 + * raise error, msg % dim + * + * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<< + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg +*/ + +static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("_err", 0); + __Pyx_INCREF(__pyx_v_msg); + + /* "View.MemoryView":1258 + * @cname('__pyx_memoryview_err') + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_no_memory') +*/ + __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0); + __PYX_ERR(1, 1258, __pyx_L1_error) + + /* "View.MemoryView":1256 + * raise error, msg % dim + * + * @cname('__pyx_memoryview_err') # <<<<<<<<<<<<<< + * cdef int _err(PyObject *error, str msg) except -1 with gil: + * raise error, msg +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1260 + * raise error, msg + * + * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<< + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError +*/ + +static int __pyx_memoryview_err_no_memory(void) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + + /* "View.MemoryView":1262 + * @cname('__pyx_memoryview_err_no_memory') + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError # <<<<<<<<<<<<<< + * + * +*/ + PyErr_NoMemory(); __PYX_ERR(1, 1262, __pyx_L1_error) + + /* "View.MemoryView":1260 + * raise error, msg + * + * @cname('__pyx_memoryview_err_no_memory') # <<<<<<<<<<<<<< + * cdef int _err_no_memory() except -1 with gil: + * raise MemoryError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "View.MemoryView":1265 + * + * + * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<< + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, + * __Pyx_memviewslice dst, +*/ + +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { + void *__pyx_v_tmpdata; + size_t __pyx_v_itemsize; + int __pyx_v_i; + char __pyx_v_order; + int __pyx_v_broadcasting; + int __pyx_v_direct_copy; + __Pyx_memviewslice __pyx_v_tmp; + int __pyx_v_ndim; + int __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + void *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "View.MemoryView":1274 + * Check for overlapping memory and verify the shapes. + * """ + * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i +*/ + __pyx_v_tmpdata = NULL; + + /* "View.MemoryView":1275 + * """ + * cdef void *tmpdata = NULL + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) +*/ + __pyx_t_1 = __pyx_v_src.memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1277 + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< + * cdef bint broadcasting = False + * cdef bint direct_copy = False +*/ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); + + /* "View.MemoryView":1278 + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False # <<<<<<<<<<<<<< + * cdef bint direct_copy = False + * cdef __Pyx_memviewslice tmp +*/ + __pyx_v_broadcasting = 0; + + /* "View.MemoryView":1279 + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False + * cdef bint direct_copy = False # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice tmp + * +*/ + __pyx_v_direct_copy = 0; + + /* "View.MemoryView":1282 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: +*/ + __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1283 + * + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) +*/ + __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); + + /* "View.MemoryView":1282 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1284 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * +*/ + __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1285 + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< + * + * cdef int ndim = max(src_ndim, dst_ndim) +*/ + __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); + + /* "View.MemoryView":1284 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * +*/ + } + __pyx_L3:; + + /* "View.MemoryView":1287 + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * + * for i in range(ndim): +*/ + __pyx_t_3 = __pyx_v_dst_ndim; + __pyx_t_4 = __pyx_v_src_ndim; + __pyx_t_2 = (__pyx_t_3 > __pyx_t_4); + if (__pyx_t_2) { + __pyx_t_5 = __pyx_t_3; + } else { + __pyx_t_5 = __pyx_t_4; + } + __pyx_v_ndim = __pyx_t_5; + + /* "View.MemoryView":1289 + * cdef int ndim = max(src_ndim, dst_ndim) + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: +*/ + __pyx_t_5 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_5; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1290 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True +*/ + __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])); + if (__pyx_t_2) { + + /* "View.MemoryView":1291 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 +*/ + __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1); + if (__pyx_t_2) { + + /* "View.MemoryView":1292 + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + * broadcasting = True # <<<<<<<<<<<<<< + * src.strides[i] = 0 + * else: +*/ + __pyx_v_broadcasting = 1; + + /* "View.MemoryView":1293 + * if src.shape[i] == 1: + * broadcasting = True + * src.strides[i] = 0 # <<<<<<<<<<<<<< + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) +*/ + (__pyx_v_src.strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1291 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 +*/ + goto __pyx_L7; + } + + /* "View.MemoryView":1295 + * src.strides[i] = 0 + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< + * + * if src.suboffsets[i] >= 0: +*/ + /*else*/ { + __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1295, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":1290 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True +*/ + } + + /* "View.MemoryView":1297 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * +*/ + __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1298 + * + * if src.suboffsets[i] >= 0: + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< + * + * if slices_overlap(&src, &dst, ndim, itemsize): +*/ + __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1298, __pyx_L1_error) + + /* "View.MemoryView":1297 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * +*/ + } + } + + /* "View.MemoryView":1300 + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): +*/ + __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + if (__pyx_t_2) { + + /* "View.MemoryView":1302 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * +*/ + __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim)); + if (__pyx_t_2) { + + /* "View.MemoryView":1303 + * + * if not slice_is_contig(src, order, ndim): + * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) +*/ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); + + /* "View.MemoryView":1302 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * +*/ + } + + /* "View.MemoryView":1305 + * order = get_best_order(&dst, ndim) + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< + * src = tmp + * +*/ + __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1305, __pyx_L1_error) + __pyx_v_tmpdata = __pyx_t_7; + + /* "View.MemoryView":1306 + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + * src = tmp # <<<<<<<<<<<<<< + * + * if not broadcasting: +*/ + __pyx_v_src = __pyx_v_tmp; + + /* "View.MemoryView":1300 + * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): +*/ + } + + /* "View.MemoryView":1308 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = (!__pyx_v_broadcasting); + if (__pyx_t_2) { + + /* "View.MemoryView":1311 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1312 + * + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) +*/ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); + + /* "View.MemoryView":1311 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): +*/ + goto __pyx_L12; + } + + /* "View.MemoryView":1313 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * +*/ + __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim); + if (__pyx_t_2) { + + /* "View.MemoryView":1314 + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< + * + * if direct_copy: +*/ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); + + /* "View.MemoryView":1313 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * +*/ + } + __pyx_L12:; + + /* "View.MemoryView":1316 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + if (__pyx_v_direct_copy) { + + /* "View.MemoryView":1318 + * if direct_copy: + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1319 + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) +*/ + (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); + + /* "View.MemoryView":1320 + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * free(tmpdata) + * return 0 +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1321 + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * +*/ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1322 + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * if order == 'F' == get_best_order(&dst, ndim): +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1316 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + } + + /* "View.MemoryView":1308 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":1324 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = (__pyx_v_order == 'F'); + if (__pyx_t_2) { + __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); + } + if (__pyx_t_2) { + + /* "View.MemoryView":1327 + * + * + * transpose_memslice(&src) # <<<<<<<<<<<<<< + * transpose_memslice(&dst) + * +*/ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error) + + /* "View.MemoryView":1328 + * + * transpose_memslice(&src) + * transpose_memslice(&dst) # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) +*/ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1328, __pyx_L1_error) + + /* "View.MemoryView":1324 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":1330 + * transpose_memslice(&dst) + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1331 + * + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * +*/ + copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1332 + * refcount_copying(&dst, dtype_is_object, ndim, inc=False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * + * free(tmpdata) +*/ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1334 + * refcount_copying(&dst, dtype_is_object, ndim, inc=True) + * + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * +*/ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1335 + * + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_broadcast_leading') +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1265 + * + * + * @cname('__pyx_memoryview_copy_contents') # <<<<<<<<<<<<<< + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, + * __Pyx_memviewslice dst, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1337 + * return 0 + * + * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<< + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, + * int ndim, +*/ + +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { + int __pyx_v_i; + int __pyx_v_offset; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":1342 + * int ndim_other) noexcept nogil: + * cdef int i + * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): +*/ + __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); + + /* "View.MemoryView":1344 + * cdef int offset = ndim_other - ndim + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] +*/ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1345 + * + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] +*/ + (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); + + /* "View.MemoryView":1346 + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * +*/ + (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1347 + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< + * + * for i in range(offset): +*/ + (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); + } + + /* "View.MemoryView":1349 + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + * for i in range(offset): # <<<<<<<<<<<<<< + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] +*/ + __pyx_t_1 = __pyx_v_offset; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1350 + * + * for i in range(offset): + * mslice.shape[i] = 1 # <<<<<<<<<<<<<< + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 +*/ + (__pyx_v_mslice->shape[__pyx_v_i]) = 1; + + /* "View.MemoryView":1351 + * for i in range(offset): + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< + * mslice.suboffsets[i] = -1 + * +*/ + (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); + + /* "View.MemoryView":1352 + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * +*/ + (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1337 + * return 0 + * + * @cname('__pyx_memoryview_broadcast_leading') # <<<<<<<<<<<<<< + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, + * int ndim, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1359 + * + * + * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<< + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * +*/ + +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { + + /* "View.MemoryView":1362 + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * +*/ + if (__pyx_v_dtype_is_object) { + + /* "View.MemoryView":1363 + * + * if dtype_is_object: + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') +*/ + __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1362 + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * +*/ + } + + /* "View.MemoryView":1359 + * + * + * @cname('__pyx_memoryview_refcount_copying') # <<<<<<<<<<<<<< + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: + * +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1365 + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + + /* "View.MemoryView":1369 + * Py_ssize_t *strides, int ndim, + * bint inc) noexcept with gil: + * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') +*/ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1365 + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + + /* function exit code */ + __Pyx_PyGILState_Release(__pyx_gilstate_save); +} + +/* "View.MemoryView":1371 + * refcount_objects_in_slice(data, shape, strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, bint inc) noexcept: +*/ + +static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1375 + * Py_ssize_t *strides, int ndim, bint inc) noexcept: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * + * for i in range(shape[0]): +*/ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1377 + * cdef Py_ssize_t stride = strides[0] + * + * for i in range(shape[0]): # <<<<<<<<<<<<<< + * if ndim == 1: + * if inc: +*/ + __pyx_t_1 = (__pyx_v_shape[0]); + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1378 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) +*/ + __pyx_t_4 = (__pyx_v_ndim == 1); + if (__pyx_t_4) { + + /* "View.MemoryView":1379 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: +*/ + if (__pyx_v_inc) { + + /* "View.MemoryView":1380 + * if ndim == 1: + * if inc: + * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * Py_DECREF(( data)[0]) +*/ + Py_INCREF((((PyObject **)__pyx_v_data)[0])); + + /* "View.MemoryView":1379 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: +*/ + goto __pyx_L6; + } + + /* "View.MemoryView":1382 + * Py_INCREF(( data)[0]) + * else: + * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) +*/ + /*else*/ { + Py_DECREF((((PyObject **)__pyx_v_data)[0])); + } + __pyx_L6:; + + /* "View.MemoryView":1378 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) +*/ + goto __pyx_L5; + } + + /* "View.MemoryView":1384 + * Py_DECREF(( data)[0]) + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<< + * + * data += stride +*/ + /*else*/ { + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); + } + __pyx_L5:; + + /* "View.MemoryView":1386 + * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) + * + * data += stride # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1371 + * refcount_objects_in_slice(data, shape, strides, ndim, inc) + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') # <<<<<<<<<<<<<< + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, bint inc) noexcept: +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1391 + * + * + * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, + * size_t itemsize, void *item, +*/ + +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { + + /* "View.MemoryView":1395 + * size_t itemsize, void *item, + * bint dtype_is_object) noexcept nogil: + * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<< + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, inc=True) +*/ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1396 + * bint dtype_is_object) noexcept nogil: + * refcount_copying(dst, dtype_is_object, ndim, inc=False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<< + * refcount_copying(dst, dtype_is_object, ndim, inc=True) + * +*/ + __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1397 + * refcount_copying(dst, dtype_is_object, ndim, inc=False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1391 + * + * + * @cname('__pyx_memoryview_slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, + * size_t itemsize, void *item, +*/ + + /* function exit code */ +} + +/* "View.MemoryView":1400 + * + * + * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + +static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_extent; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + + /* "View.MemoryView":1405 + * size_t itemsize, void *item) noexcept nogil: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t extent = shape[0] + * +*/ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1406 + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] + * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: +*/ + __pyx_v_extent = (__pyx_v_shape[0]); + + /* "View.MemoryView":1408 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) +*/ + __pyx_t_1 = (__pyx_v_ndim == 1); + if (__pyx_t_1) { + + /* "View.MemoryView":1409 + * + * if ndim == 1: + * for i in range(extent): # <<<<<<<<<<<<<< + * memcpy(data, item, itemsize) + * data += stride +*/ + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1410 + * if ndim == 1: + * for i in range(extent): + * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< + * data += stride + * else: +*/ + (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); + + /* "View.MemoryView":1411 + * for i in range(extent): + * memcpy(data, item, itemsize) + * data += stride # <<<<<<<<<<<<<< + * else: + * for i in range(extent): +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1408 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) +*/ + goto __pyx_L3; + } + + /* "View.MemoryView":1413 + * data += stride + * else: + * for i in range(extent): # <<<<<<<<<<<<<< + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) + * data += stride +*/ + /*else*/ { + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1414 + * else: + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<< + * data += stride + * +*/ + __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1415 + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) + * data += stride # <<<<<<<<<<<<<< + * +*/ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1400 + * + * + * @cname('__pyx_memoryview__slice_assign_scalar') # <<<<<<<<<<<<<< + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, + * Py_ssize_t *strides, int ndim, +*/ + + /* function exit code */ +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') # <<<<<<<<<<<<<< + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, __pyx_k_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":243 + * cdef int type_num + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) +*/ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":245 + * @property + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDataType_ELSIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":243 + * cdef int type_num + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp itemsize(self) noexcept nogil: + * return PyDataType_ELSIZE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":247 + * return PyDataType_ELSIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) +*/ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":249 + * @property + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< + * + * # Use fields/names with care as they may be NULL. You must check +*/ + __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":247 + * return PyDataType_ELSIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp alignment(self) noexcept nogil: + * return PyDataType_ALIGNMENT(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":253 + * # Use fields/names with care as they may be NULL. You must check + * # for this using PyDataType_HASFIELDS. + * @property # <<<<<<<<<<<<<< + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("fields", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":255 + * @property + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":253 + * # Use fields/names with care as they may be NULL. You must check + * # for this using PyDataType_HASFIELDS. + * @property # <<<<<<<<<<<<<< + * cdef inline object fields(self): + * return PyDataType_FIELDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":257 + * return PyDataType_FIELDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("names", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":259 + * @property + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< + * + * # Use PyDataType_HASSUBARRAY to test whether this field is +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDataType_NAMES(__pyx_v_self); + __Pyx_INCREF(((PyObject*)__pyx_t_1)); + __pyx_r = ((PyObject*)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":257 + * return PyDataType_FIELDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline tuple names(self): + * return PyDataType_NAMES(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":264 + * # valid (the pointer can be NULL). Most users should access + * # this field via the inline helper method PyDataType_SHAPE. + * @property # <<<<<<<<<<<<<< + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) +*/ + +static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { + PyArray_ArrayDescr *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":266 + * @property + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":264 + * # valid (the pointer can be NULL). Most users should access + * # this field via the inline helper method PyDataType_SHAPE. + * @property # <<<<<<<<<<<<<< + * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: + * return PyDataType_SUBARRAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":268 + * return PyDataType_SUBARRAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_uint64 flags(self) noexcept nogil: + * """The data types flags.""" +*/ + +static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { + npy_uint64 __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":271 + * cdef inline npy_uint64 flags(self) noexcept nogil: + * """The data types flags.""" + * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = PyDataType_FLAGS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":268 + * return PyDataType_SUBARRAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_uint64 flags(self) noexcept nogil: + * """The data types flags.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":280 + * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]: + * + * @property # <<<<<<<<<<<<<< + * cdef inline int numiter(self) noexcept nogil: + * """The number of arrays that need to be broadcast to the same shape.""" +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":283 + * cdef inline int numiter(self) noexcept nogil: + * """The number of arrays that need to be broadcast to the same shape.""" + * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":280 + * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]: + * + * @property # <<<<<<<<<<<<<< + * cdef inline int numiter(self) noexcept nogil: + * """The number of arrays that need to be broadcast to the same shape.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":285 + * return PyArray_MultiIter_NUMITER(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: + * """The total broadcasted size.""" +*/ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":288 + * cdef inline npy_intp size(self) noexcept nogil: + * """The total broadcasted size.""" + * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":285 + * return PyArray_MultiIter_NUMITER(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: + * """The total broadcasted size.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":290 + * return PyArray_MultiIter_SIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp index(self) noexcept nogil: + * """The current (1-d) index into the broadcasted result.""" +*/ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":293 + * cdef inline npy_intp index(self) noexcept nogil: + * """The current (1-d) index into the broadcasted result.""" + * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":290 + * return PyArray_MultiIter_SIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp index(self) noexcept nogil: + * """The current (1-d) index into the broadcasted result.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":295 + * return PyArray_MultiIter_INDEX(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int nd(self) noexcept nogil: + * """The number of dimensions in the broadcasted result.""" +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":298 + * cdef inline int nd(self) noexcept nogil: + * """The number of dimensions in the broadcasted result.""" + * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":295 + * return PyArray_MultiIter_INDEX(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int nd(self) noexcept nogil: + * """The number of dimensions in the broadcasted result.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":300 + * return PyArray_MultiIter_NDIM(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp* dimensions(self) noexcept nogil: + * """The shape of the broadcasted result.""" +*/ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":303 + * cdef inline npy_intp* dimensions(self) noexcept nogil: + * """The shape of the broadcasted result.""" + * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":300 + * return PyArray_MultiIter_NDIM(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp* dimensions(self) noexcept nogil: + * """The shape of the broadcasted result.""" +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":305 + * return PyArray_MultiIter_DIMS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline void** iters(self) noexcept nogil: + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. +*/ + +static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { + void **__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":309 + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. + * On return, the iterators are adjusted for broadcasting.""" + * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":305 + * return PyArray_MultiIter_DIMS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline void** iters(self) noexcept nogil: + * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":323 + * # Instead, we use properties that map to the corresponding C-API functions. + * + * @property # <<<<<<<<<<<<<< + * cdef inline PyObject* base(self) noexcept nogil: + * """Returns a borrowed reference to the object owning the data/memory. +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { + PyObject *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":327 + * """Returns a borrowed reference to the object owning the data/memory. + * """ + * return PyArray_BASE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_BASE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":323 + * # Instead, we use properties that map to the corresponding C-API functions. + * + * @property # <<<<<<<<<<<<<< + * cdef inline PyObject* base(self) noexcept nogil: + * """Returns a borrowed reference to the object owning the data/memory. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":329 + * return PyArray_BASE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline dtype descr(self): + * """Returns an owned reference to the dtype of the array. +*/ + +static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) { + PyArray_Descr *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyArray_Descr *__pyx_t_1; + __Pyx_RefNannySetupContext("descr", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":333 + * """Returns an owned reference to the dtype of the array. + * """ + * return PyArray_DESCR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyArray_DESCR(__pyx_v_self); + __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1)); + __pyx_r = ((PyArray_Descr *)__pyx_t_1); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":329 + * return PyArray_BASE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline dtype descr(self): + * """Returns an owned reference to the dtype of the array. +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":335 + * return PyArray_DESCR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: + * """Returns the number of dimensions in the array. +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { + int __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":339 + * """Returns the number of dimensions in the array. + * """ + * return PyArray_NDIM(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_NDIM(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":335 + * return PyArray_DESCR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int ndim(self) noexcept nogil: + * """Returns the number of dimensions in the array. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":341 + * return PyArray_NDIM(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: + * """Returns a pointer to the dimensions/shape of the array. +*/ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":347 + * Can return NULL for 0-dimensional arrays. + * """ + * return PyArray_DIMS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_DIMS(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":341 + * return PyArray_NDIM(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp *shape(self) noexcept nogil: + * """Returns a pointer to the dimensions/shape of the array. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":349 + * return PyArray_DIMS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: + * """Returns a pointer to the strides of the array. +*/ + +static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { + npy_intp *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":354 + * The number of elements matches the number of dimensions of the array (ndim). + * """ + * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_STRIDES(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":349 + * return PyArray_DIMS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp *strides(self) noexcept nogil: + * """Returns a pointer to the strides of the array. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":356 + * return PyArray_STRIDES(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: + * """Returns the total size (in number of elements) of the array. +*/ + +static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { + npy_intp __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":360 + * """Returns the total size (in number of elements) of the array. + * """ + * return PyArray_SIZE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyArray_SIZE(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":356 + * return PyArray_STRIDES(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline npy_intp size(self) noexcept nogil: + * """Returns the total size (in number of elements) of the array. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":362 + * return PyArray_SIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: + * """The pointer to the data buffer as a char*. +*/ + +static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { + char *__pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":369 + * of `PyArray_DATA()` instead, which returns a 'void*'. + * """ + * return PyArray_BYTES(self) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = PyArray_BYTES(__pyx_v_self); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":362 + * return PyArray_SIZE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline char* data(self) noexcept nogil: + * """The pointer to the data buffer as a char*. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":777 + * ctypedef long double complex clongdouble_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":778 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":777 + * ctypedef long double complex clongdouble_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":780 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":781 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":780 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":783 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":784 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":783 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":786 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":787 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":786 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":789 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":790 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":789 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":792 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":793 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: +*/ + __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); + if (__pyx_t_1) { + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":794 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape; + __Pyx_INCREF(((PyObject*)__pyx_t_2)); + __pyx_r = ((PyObject*)__pyx_t_2); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":793 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: +*/ + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":796 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_r = __pyx_mstate_global->__pyx_empty_tuple; + goto __pyx_L0; + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":792 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":995 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) +*/ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":996 + * + * cdef inline void set_array_base(ndarray arr, object base) except *: + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * +*/ + Py_INCREF(__pyx_v_base); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":997 + * cdef inline void set_array_base(ndarray arr, object base) except *: + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): +*/ + __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 997, __pyx_L1_error) + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":995 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":999 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: +*/ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1000 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None +*/ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1001 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base +*/ + __pyx_t_1 = (__pyx_v_base == NULL); + if (__pyx_t_1) { + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1002 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1001 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base +*/ + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1003 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":999 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1007 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1008 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1009 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy._core.multiarray failed to import") +*/ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1009, __pyx_L3_error) + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1008 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1010 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.multiarray failed to import") + * +*/ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1010, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1011 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: +*/ + __pyx_t_9 = NULL; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1011, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 1011, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1008 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1007 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1013 + * raise ImportError("numpy._core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1014 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1015 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy._core.umath failed to import") +*/ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1015, __pyx_L3_error) + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1014 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1016 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") + * +*/ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1016, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1017 + * _import_umath() + * except Exception: + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: +*/ + __pyx_t_9 = NULL; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1017, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 1017, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1014 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1013 + * raise ImportError("numpy._core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1019 + * raise ImportError("numpy._core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1020 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1021 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy._core.umath failed to import") +*/ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1021, __pyx_L3_error) + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1020 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1022 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy._core.umath failed to import") + * +*/ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1022, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1023 + * _import_umath() + * except Exception: + * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = NULL; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 1023, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1020 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1019 + * raise ImportError("numpy._core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1026 + * + * + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1038 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1026 + * + * + * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1041 + * + * + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` +*/ + +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1053 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1041 + * + * + * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1056 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object +*/ + +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1063 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1056 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1066 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object +*/ + +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1070 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1066 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1073 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. +*/ + +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1077 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + + /* "../../../../../AppData/Local/Temp/pip-build-env-yurq63l8/overlay/Lib/site-packages/numpy/__init__.cython-30.pxd":1073 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":34 + * cdef contiguous + * + * def __init__(self, column): # <<<<<<<<<<<<<< + * self.original = column + * self.contiguous = np.ascontiguousarray(column) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 34, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 34, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 34, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 34, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 34, __pyx_L3_error) + } + __pyx_v_column = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 34, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v_self), __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_column) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":35 + * + * def __init__(self, column): + * self.original = column # <<<<<<<<<<<<<< + * self.contiguous = np.ascontiguousarray(column) + * +*/ + __Pyx_INCREF(__pyx_v_column); + __Pyx_GIVEREF(__pyx_v_column); + __Pyx_GOTREF(__pyx_v_self->original); + __Pyx_DECREF(__pyx_v_self->original); + __pyx_v_self->original = __pyx_v_column; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":36 + * def __init__(self, column): + * self.original = column + * self.contiguous = np.ascontiguousarray(column) # <<<<<<<<<<<<<< + * + * def null_flags(self): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->contiguous); + __Pyx_DECREF(__pyx_v_self->contiguous); + __pyx_v_self->contiguous = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":34 + * cdef contiguous + * + * def __init__(self, column): # <<<<<<<<<<<<<< + * self.original = column + * self.contiguous = np.ascontiguousarray(column) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":38 + * self.contiguous = np.ascontiguousarray(column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * return None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags = {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("null_flags (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("null_flags", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("null_flags", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_2null_flags(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_2null_flags(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("null_flags", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":39 + * + * def null_flags(self): + * return None # <<<<<<<<<<<<<< + * + * def finalize_write(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":38 + * self.contiguous = np.ascontiguousarray(column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * return None + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":41 + * return None + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * if self.original is not self.contiguous: + * self.original[:] = self.contiguous +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write = {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize_write", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize_write", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_4finalize_write(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_4finalize_write(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize_write", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":42 + * + * def finalize_write(self): + * if self.original is not self.contiguous: # <<<<<<<<<<<<<< + * self.original[:] = self.contiguous + * +*/ + __pyx_t_1 = (__pyx_v_self->original != __pyx_v_self->contiguous); + if (__pyx_t_1) { + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":43 + * def finalize_write(self): + * if self.original is not self.contiguous: + * self.original[:] = self.contiguous # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_v_self->contiguous; + __Pyx_INCREF(__pyx_t_2); + if (__Pyx_PyObject_SetSlice(__pyx_v_self->original, __pyx_t_2, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":42 + * + * def finalize_write(self): + * if self.original is not self.contiguous: # <<<<<<<<<<<<<< + * self.original[:] = self.contiguous + * +*/ + } + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":41 + * return None + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * if self.original is not self.contiguous: + * self.original[:] = self.contiguous +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.finalize_write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.contiguous, self.original) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->contiguous); + __Pyx_GIVEREF(__pyx_v_self->contiguous); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->contiguous) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->original); + __Pyx_GIVEREF(__pyx_v_self->original); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->original) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.contiguous, self.original) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.contiguous, self.original) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.contiguous is not None or self.original is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.contiguous, self.original) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.contiguous is not None or self.original is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->contiguous != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->original != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AtomicTypeRowColu); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_66520523); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_66520523); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_66520523) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, None), state + * else: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AtomicTypeRowColu); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_66520523); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_66520523); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_66520523) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":49 + * cdef np.float32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(FloatFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 49, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 49, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 49, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 49, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 49, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 49, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 49, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 49, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":50 + * + * def __init__(self, unused_coder, column): + * super(FloatFloat32RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.float32_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":51 + * def __init__(self, unused_coder, column): + * super(FloatFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float32_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":52 + * super(FloatFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":49 + * cdef np.float32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(FloatFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":54 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_float(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":55 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_bigendian_float(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_float(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":54 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_float(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":57 + * stream.write_bigendian_float(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_float() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + float __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":58 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_bigendian_float() # <<<<<<<<<<<<<< + * + * FloatFloat32RowColumnEncoder.register(schema_pb2.FLOAT, np.float32().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_float(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((float)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":57 + * stream.write_bigendian_float(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_float() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":66 + * cdef np.float64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(FloatFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 66, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 66, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 66, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 66, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 66, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 66, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 66, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 66, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":67 + * + * def __init__(self, unused_coder, column): + * super(FloatFloat64RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.float64_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":68 + * def __init__(self, unused_coder, column): + * super(FloatFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float64_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":69 + * super(FloatFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":66 + * cdef np.float64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(FloatFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":71 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_float(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":72 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_bigendian_float(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_float(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":71 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_float(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":74 + * stream.write_bigendian_float(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_float() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + float __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":75 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_bigendian_float() # <<<<<<<<<<<<<< + * + * FloatFloat64RowColumnEncoder.register(schema_pb2.FLOAT, np.float64().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_float(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((float)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":74 + * stream.write_bigendian_float(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_float() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":83 + * cdef np.float32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(DoubleFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 83, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 83, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 83, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 83, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 83, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":84 + * + * def __init__(self, unused_coder, column): + * super(DoubleFloat32RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.float32_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":85 + * def __init__(self, unused_coder, column): + * super(DoubleFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float32_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":86 + * super(DoubleFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 86, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":83 + * cdef np.float32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(DoubleFloat32RowColumnEncoder, self).__init__(column) + * cdef np.float32_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":88 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_double(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":89 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_bigendian_double(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_double(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":88 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_double(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":91 + * stream.write_bigendian_double(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_double() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + double __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":92 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_bigendian_double() # <<<<<<<<<<<<<< + * + * DoubleFloat32RowColumnEncoder.register(schema_pb2.DOUBLE, np.float32().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":91 + * stream.write_bigendian_double(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_double() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":100 + * cdef np.float64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(DoubleFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 100, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 100, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 100, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 100, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 100, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 100, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":101 + * + * def __init__(self, unused_coder, column): + * super(DoubleFloat64RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.float64_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":102 + * def __init__(self, unused_coder, column): + * super(DoubleFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float64_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":103 + * super(DoubleFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 103, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":100 + * cdef np.float64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(DoubleFloat64RowColumnEncoder, self).__init__(column) + * cdef np.float64_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":105 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_double(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":106 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_bigendian_double(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_double(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":105 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_bigendian_double(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":108 + * stream.write_bigendian_double(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_double() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + double __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":109 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_bigendian_double() # <<<<<<<<<<<<<< + * + * DoubleFloat64RowColumnEncoder.register(schema_pb2.DOUBLE, np.float64().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":108 + * stream.write_bigendian_double(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_bigendian_double() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":117 + * cdef np.int32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(Int32Int32RowColumnEncoder, self).__init__(column) + * cdef np.int32_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 117, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 117, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 117, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 117, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 117, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 117, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 117, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":118 + * + * def __init__(self, unused_coder, column): + * super(Int32Int32RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.int32_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":119 + * def __init__(self, unused_coder, column): + * super(Int32Int32RowColumnEncoder, self).__init__(column) + * cdef np.int32_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":120 + * super(Int32Int32RowColumnEncoder, self).__init__(column) + * cdef np.int32_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 120, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int32_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":117 + * cdef np.int32_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(Int32Int32RowColumnEncoder, self).__init__(column) + * cdef np.int32_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":122 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_var_int64(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":123 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_var_int64(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":122 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_var_int64(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":125 + * stream.write_var_int64(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_var_int64() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":126 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_var_int64() # <<<<<<<<<<<<<< + * + * Int32Int32RowColumnEncoder.register(schema_pb2.INT32, np.int32().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":125 + * stream.write_var_int64(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_var_int64() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":135 + * cdef np.int64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(Int64Int64RowColumnEncoder, self).__init__(column) + * cdef np.int64_t[::1] view = self.contiguous +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 135, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 135, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 135, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 135, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 135, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 135, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 135, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 135, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":136 + * + * def __init__(self, unused_coder, column): + * super(Int64Int64RowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * cdef np.int64_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":137 + * def __init__(self, unused_coder, column): + * super(Int64Int64RowColumnEncoder, self).__init__(column) + * cdef np.int64_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int64_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":138 + * super(Int64Int64RowColumnEncoder, self).__init__(column) + * cdef np.int64_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 138, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int64_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":135 + * cdef np.int64_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(Int64Int64RowColumnEncoder, self).__init__(column) + * cdef np.int64_t[::1] view = self.contiguous +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":140 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_var_int64(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":141 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_var_int64(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":140 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_var_int64(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":143 + * stream.write_var_int64(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_var_int64() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":144 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_var_int64() # <<<<<<<<<<<<<< + * + * Int64Int64RowColumnEncoder.register(schema_pb2.INT64, np.int64().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":143 + * stream.write_var_int64(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_var_int64() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_data_cannot_be_converted_to, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":152 + * cdef np.uint8_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(BoolRowColumnEncoder, self).__init__(column) + * self.contiguous = self.contiguous.astype(np.uint8) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_unused_coder = 0; + PyObject *__pyx_v_column = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_coder,&__pyx_mstate_global->__pyx_n_u_column,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 152, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 152, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 152, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 152, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 152, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 152, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 152, __pyx_L3_error) + } + __pyx_v_unused_coder = values[0]; + __pyx_v_column = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 152, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *)__pyx_v_self), __pyx_v_unused_coder, __pyx_v_column); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_coder, PyObject *__pyx_v_column) { + __Pyx_memviewslice __pyx_v_view = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":153 + * + * def __init__(self, unused_coder, column): + * super(BoolRowColumnEncoder, self).__init__(column) # <<<<<<<<<<<<<< + * self.contiguous = self.contiguous.astype(np.uint8) + * cdef np.uint8_t[::1] view = self.contiguous +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_column}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":154 + * def __init__(self, unused_coder, column): + * super(BoolRowColumnEncoder, self).__init__(column) + * self.contiguous = self.contiguous.astype(np.uint8) # <<<<<<<<<<<<<< + * cdef np.uint8_t[::1] view = self.contiguous + * self.data = &view[0] +*/ + __pyx_t_3 = __pyx_v_self->__pyx_base.contiguous; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx_base.contiguous); + __Pyx_DECREF(__pyx_v_self->__pyx_base.contiguous); + __pyx_v_self->__pyx_base.contiguous = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":155 + * super(BoolRowColumnEncoder, self).__init__(column) + * self.contiguous = self.contiguous.astype(np.uint8) + * cdef np.uint8_t[::1] view = self.contiguous # <<<<<<<<<<<<<< + * self.data = &view[0] + * +*/ + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(__pyx_v_self->__pyx_base.contiguous, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_v_view = __pyx_t_6; + __pyx_t_6.memview = NULL; + __pyx_t_6.data = NULL; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":156 + * self.contiguous = self.contiguous.astype(np.uint8) + * cdef np.uint8_t[::1] view = self.contiguous + * self.data = &view[0] # <<<<<<<<<<<<<< + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: +*/ + __pyx_t_7 = 0; + __pyx_t_8 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_v_view.shape[0]; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_v_view.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 156, __pyx_L1_error) + } + __pyx_v_self->data = (&(*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint8_t *) __pyx_v_view.data) + __pyx_t_7)) )))); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":152 + * cdef np.uint8_t* data + * + * def __init__(self, unused_coder, column): # <<<<<<<<<<<<<< + * super(BoolRowColumnEncoder, self).__init__(column) + * self.contiguous = self.contiguous.astype(np.uint8) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_view, 1); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":158 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_byte(self.data[index]) + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("encode_to_stream", 0); + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":159 + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: + * stream.write_byte(self.data[index]) # <<<<<<<<<<<<<< + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, (__pyx_v_self->data[__pyx_v_index]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":158 + * self.data = &view[0] + * + * cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1: # <<<<<<<<<<<<<< + * stream.write_byte(self.data[index]) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/coder_impl_row_encoders.pyx":161 + * stream.write_byte(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_byte() + * +*/ + +static int __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) { + int __pyx_r; + long __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":162 + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: + * self.data[index] = stream.read_byte() # <<<<<<<<<<<<<< + * + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.int8().dtype) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_byte(__pyx_v_stream, 0); if (unlikely(__pyx_t_1 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L1_error) + (__pyx_v_self->data[__pyx_v_index]) = __pyx_t_1; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":161 + * stream.write_byte(self.data[index]) + * + * cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1: # <<<<<<<<<<<<<< + * self.data[index] = stream.read_byte() + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.contiguous, self.data, self.original) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBytes_FromCString(__pyx_v_self->data); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->__pyx_base.contiguous); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.contiguous); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.contiguous) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.original); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.original); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.original) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.contiguous, self.data, self.original) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.contiguous, self.data, self.original) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.contiguous is not None or self.original is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.contiguous, self.data, self.original) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.contiguous is not None or self.original is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->__pyx_base.contiguous != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.original != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoolRowColumnEnco); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_177317992); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_177317992); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_177317992) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.contiguous is not None or self.original is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, None), state + * else: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BoolRowColumnEncoder__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoolRowColumnEnco); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_177317992); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_177317992); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_177317992) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoolRowColumnEncoder__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BoolRowColumnEncoder__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_BoolRowColumnEncoder__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoolRowColumnEncoder__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AtomicTypeRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_1__pyx_unpickle_AtomicTypeRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_1__pyx_unpickle_AtomicTypeRowColumnEncoder = {"__pyx_unpickle_AtomicTypeRowColumnEncoder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_1__pyx_unpickle_AtomicTypeRowColumnEncoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_1__pyx_unpickle_AtomicTypeRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_AtomicTypeRowColumnEncoder (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_AtomicTypeRowColumnEncoder", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AtomicTypeRowColumnEncoder", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AtomicTypeRowColumnEncoder", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_AtomicTypeRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AtomicTypeRowColumnEncoder", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_AtomicTypeRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') # <<<<<<<<<<<<<< + * __pyx_result = AtomicTypeRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, __pyx_k_contiguous_original); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') + * __pyx_result = AtomicTypeRowColumnEncoder.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') + * __pyx_result = AtomicTypeRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = AtomicTypeRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') + * __pyx_result = AtomicTypeRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.original = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AtomicTypeRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_AtomicTypeRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.original = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AtomicTypeRowColumnEncoder__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.original = __pyx_state[1] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->contiguous); + __Pyx_DECREF(__pyx_v___pyx_result->contiguous); + __pyx_v___pyx_result->contiguous = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->original); + __Pyx_DECREF(__pyx_v___pyx_result->original); + __pyx_v___pyx_result->original = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.original = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(AtomicTypeRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.original = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_AtomicTypeRowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BoolRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_3__pyx_unpickle_BoolRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_3__pyx_unpickle_BoolRowColumnEncoder = {"__pyx_unpickle_BoolRowColumnEncoder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_3__pyx_unpickle_BoolRowColumnEncoder, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_3__pyx_unpickle_BoolRowColumnEncoder(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BoolRowColumnEncoder (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BoolRowColumnEncoder", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolRowColumnEncoder", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolRowColumnEncoder", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_BoolRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_2__pyx_unpickle_BoolRowColumnEncoder(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_23coder_impl_row_encoders_2__pyx_unpickle_BoolRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BoolRowColumnEncoder", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BoolRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') # <<<<<<<<<<<<<< + * __pyx_result = BoolRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, __pyx_k_contiguous_data_original); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') + * __pyx_result = BoolRowColumnEncoder.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') + * __pyx_result = BoolRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BoolRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_BoolRowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') + * __pyx_result = BoolRowColumnEncoder.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.data = __pyx_state[1]; __pyx_result.original = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BoolRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa91a868, 0x1c94369, 0xe0d004d, b'contiguous, data, original') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_BoolRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.data = __pyx_state[1]; __pyx_result.original = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders___pyx_unpickle_BoolRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __pyx_t_5numpy_uint8_t *__pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BoolRowColumnEncoder__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.data = __pyx_state[1]; __pyx_result.original = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.contiguous); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.contiguous); + __pyx_v___pyx_result->__pyx_base.contiguous = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_AsWritableUString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_v___pyx_result->data = __pyx_t_2; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.original); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.original); + __pyx_v___pyx_result->__pyx_base.original = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.data = __pyx_state[1]; __pyx_result.original = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BoolRowColumnEncoder__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BoolRowColumnEncoder__set_state(BoolRowColumnEncoder __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.contiguous = __pyx_state[0]; __pyx_result.data = __pyx_state[1]; __pyx_result.original = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.coder_impl_row_encoders.__pyx_unpickle_BoolRowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *p; + PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_new, newfunc)(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + p->original = Py_None; Py_INCREF(Py_None); + p->contiguous = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->original); + Py_CLEAR(p->contiguous); + if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) PyObject_GC_Track(o); + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_dealloc, destructor)(o); else + #endif + __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); +} + +static int __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->original) { + e = (*v)(p->original, a); if (e) return e; + } + if (p->contiguous) { + e = (*v)(p->contiguous, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); } + tmp = ((PyObject*)p->original); + p->original = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->contiguous); + p->contiguous = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder[] = { + {"null_flags", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.AtomicTypeRowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""AtomicTypeRowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.FloatFloat32RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""FloatFloat32RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.FloatFloat64RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""FloatFloat64RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.DoubleFloat32RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""DoubleFloat32RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.DoubleFloat64RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""DoubleFloat64RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.Int32Int32RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""Int32Int32RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.Int64Int64RowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""Int64Int64RowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder_spec = { + "apache_beam.coders.coder_impl_row_encoders.BoolRowColumnEncoder", + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""BoolRowColumnEncoder", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_array __pyx_vtable_array; + +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_array_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_array_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_array; + p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_array(PyObject *o) { + struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_array___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->mode); + Py_CLEAR(p->_format); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_array___setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { + PyObject *v = PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_array___getattr__(o, n); + } + return v; +} + +static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); +} + +static PyMethodDef __pyx_methods_array[] = { + {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_array[] = { + {"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +#if !CYTHON_COMPILING_IN_LIMITED_API + +static PyBufferProcs __pyx_tp_as_buffer_array = { + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; +#endif +static PyType_Slot __pyx_type___pyx_array_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array}, + {Py_sq_length, (void *)__pyx_array___len__}, + {Py_sq_item, (void *)__pyx_sq_item_array}, + {Py_mp_length, (void *)__pyx_array___len__}, + {Py_mp_subscript, (void *)__pyx_array___getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array}, + {Py_tp_getattro, (void *)__pyx_tp_getattro_array}, + #if defined(Py_bf_getbuffer) + {Py_bf_getbuffer, (void *)__pyx_array_getbuffer}, + #endif + {Py_tp_methods, (void *)__pyx_methods_array}, + {Py_tp_getset, (void *)__pyx_getsets_array}, + {Py_tp_new, (void *)__pyx_tp_new_array}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_array_spec = { + "apache_beam.coders.coder_impl_row_encoders.array", + sizeof(struct __pyx_array_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, + __pyx_type___pyx_array_slots, +}; +#else + +static PySequenceMethods __pyx_tp_as_sequence_array = { + __pyx_array___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_array, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_array = { + __pyx_array___len__, /*mp_length*/ + __pyx_array___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_array = { + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_array = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""array", /*tp_name*/ + sizeof(struct __pyx_array_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_array, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + __pyx_tp_getattro_array, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_array, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_array, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_array, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_MemviewEnum_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_MemviewEnum_obj *)o); + p->name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_Enum(PyObject *o) { + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_Enum(PyObject *o) { + PyObject* tmp; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_Enum[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum}, + {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum}, + {Py_tp_clear, (void *)__pyx_tp_clear_Enum}, + {Py_tp_methods, (void *)__pyx_methods_Enum}, + {Py_tp_init, (void *)__pyx_MemviewEnum___init__}, + {Py_tp_new, (void *)__pyx_tp_new_Enum}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = { + "apache_beam.coders.coder_impl_row_encoders.Enum", + sizeof(struct __pyx_MemviewEnum_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type___pyx_MemviewEnum_slots, +}; +#else + +static PyTypeObject __pyx_type___pyx_MemviewEnum = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""Enum", /*tp_name*/ + sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_Enum, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_MemviewEnum___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_Enum, /*tp_traverse*/ + __pyx_tp_clear_Enum, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_Enum, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_MemviewEnum___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_Enum, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; + +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryview_obj *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryview_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_memoryview; + p->obj = Py_None; Py_INCREF(Py_None); + p->_size = Py_None; Py_INCREF(Py_None); + p->view.obj = NULL; + if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_memoryview(PyObject *o) { + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_memoryview___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->obj); + Py_CLEAR(p->_size); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->obj) { + e = (*v)(p->obj, a); if (e) return e; + } + if (p->_size) { + e = (*v)(p->_size, a); if (e) return e; + } + if (p->view.obj) { + e = (*v)(p->view.obj, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_memoryview(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + tmp = ((PyObject*)p->obj); + p->obj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_size); + p->_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + Py_CLEAR(p->view.obj); + return 0; +} + +static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_memoryview___setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); +} + +static PyMethodDef __pyx_methods_memoryview[] = { + {"is_c_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"is_f_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"copy_fortran", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_memoryview[] = { + {"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0}, + {"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0}, + {"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0}, + {"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0}, + {"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0}, + {"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0}, + {"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0}, + {"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0}, + {"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +#if !CYTHON_COMPILING_IN_LIMITED_API + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; +#endif +static PyType_Slot __pyx_type___pyx_memoryview_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview}, + {Py_tp_repr, (void *)__pyx_memoryview___repr__}, + {Py_sq_length, (void *)__pyx_memoryview___len__}, + {Py_sq_item, (void *)__pyx_sq_item_memoryview}, + {Py_mp_length, (void *)__pyx_memoryview___len__}, + {Py_mp_subscript, (void *)__pyx_memoryview___getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview}, + {Py_tp_str, (void *)__pyx_memoryview___str__}, + #if defined(Py_bf_getbuffer) + {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer}, + #endif + {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview}, + {Py_tp_clear, (void *)__pyx_tp_clear_memoryview}, + {Py_tp_methods, (void *)__pyx_methods_memoryview}, + {Py_tp_getset, (void *)__pyx_getsets_memoryview}, + {Py_tp_new, (void *)__pyx_tp_new_memoryview}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_memoryview_spec = { + "apache_beam.coders.coder_impl_row_encoders.memoryview", + sizeof(struct __pyx_memoryview_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type___pyx_memoryview_slots, +}; +#else + +static PySequenceMethods __pyx_tp_as_sequence_memoryview = { + __pyx_memoryview___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_memoryview, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_memoryview = { + __pyx_memoryview___len__, /*mp_length*/ + __pyx_memoryview___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_memoryview = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""memoryview", /*tp_name*/ + sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_memoryview___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_memoryview___str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_memoryview, /*tp_traverse*/ + __pyx_tp_clear_memoryview, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_memoryview, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_memoryview, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_memoryview, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; + +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryviewslice_obj *p; + PyObject *o = __pyx_tp_new_memoryview(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryviewslice_obj *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; + p->from_object = Py_None; Py_INCREF(Py_None); + p->from_slice.memview = NULL; + return o; +} + +static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_memoryviewslice___dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->from_object); + PyObject_GC_Track(o); + __pyx_tp_dealloc_memoryview(o); +} + +static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; + if (p->from_object) { + e = (*v)(p->from_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear__memoryviewslice(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + __pyx_tp_clear_memoryview(o); + tmp = ((PyObject*)p->from_object); + p->from_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1); + return 0; +} + +static PyMethodDef __pyx_methods__memoryviewslice[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice}, + {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice}, + {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice}, + {Py_tp_methods, (void *)__pyx_methods__memoryviewslice}, + {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice}, + {0, 0}, +}; +static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = { + "apache_beam.coders.coder_impl_row_encoders._memoryviewslice", + sizeof(struct __pyx_memoryviewslice_obj), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, + __pyx_type___pyx_memoryviewslice_slots, +}; +#else + +static PyTypeObject __pyx_type___pyx_memoryviewslice = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.coder_impl_row_encoders.""_memoryviewslice", /*tp_name*/ + sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_memoryview___repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_memoryview___str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/ + PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/ + __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ + __pyx_tp_clear__memoryviewslice, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods__memoryviewslice, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new__memoryviewslice, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None); + generic = Py_None; Py_INCREF(Py_None); + strided = Py_None; Py_INCREF(Py_None); + indirect = Py_None; Py_INCREF(Py_None); + contiguous = Py_None; Py_INCREF(Py_None); + indirect_contiguous = Py_None; Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.coder_impl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "RowColumnEncoder", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AtomicTypeRowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder)) __PYX_ERR(0, 46, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatFloat32RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder)) __PYX_ERR(0, 63, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FloatFloat64RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder)) __PYX_ERR(0, 80, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoubleFloat32RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder)) __PYX_ERR(0, 97, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoubleFloat64RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder)) __PYX_ERR(0, 114, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int32Int32RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder)) __PYX_ERR(0, 132, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Int64Int64RowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder.__pyx_base.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_encode_to_stream; + __pyx_vtable_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder.__pyx_base.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_decode_from_stream; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder)) __PYX_ERR(0, 149, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder = &__pyx_type_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder, __pyx_vtabptr_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BoolRowColumnEncoder, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_vtabptr_array = &__pyx_vtable_array; + __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_array_type)) __PYX_ERR(1, 110, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate->__pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array; + if (!__pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) { + __pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer; + } + #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) + /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ + #elif defined(_MSC_VER) + #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") + #else + #warning "The buffer protocol is not supported in the Limited C-API < 3.11." + #endif + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #else + __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type); + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 299, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + #else + __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; + __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; + __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; + __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; + __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; + __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; + __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; + __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; + __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_memoryview_type)) __PYX_ERR(1, 334, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate->__pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview; + if (!__pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) { + __pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer; + } + #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) + /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ + #elif defined(_MSC_VER) + #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") + #else + #warning "The buffer protocol is not supported in the Limited C-API < 3.11." + #endif + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + #else + __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error) + __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; + __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; + __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; + __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; + __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_memoryview_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + #else + __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "dtype", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArray_Descr), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArray_Descr), + #else + sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArray_Descr), + #endif + __Pyx_ImportType_CheckSize_Ignore_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 229, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "flatiter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayIterObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayIterObject), + #else + sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayIterObject), + #endif + __Pyx_ImportType_CheckSize_Ignore_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 274, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "broadcast", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayMultiIterObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayMultiIterObject), + #else + sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayMultiIterObject), + #endif + __Pyx_ImportType_CheckSize_Ignore_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 278, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "ndarray", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayObject), + #else + sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyArrayObject), + #endif + __Pyx_ImportType_CheckSize_Ignore_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 317, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "generic", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(2, 826, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "number", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(2, 828, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "integer", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(2, 830, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "signedinteger", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 832, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "unsignedinteger", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 834, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "inexact", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 836, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "floating", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(2, 838, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "complexfloating", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 840, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "flexible", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 842, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "character", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #else + sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(2, 844, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_2_4(__pyx_t_1, "numpy", "ufunc", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyUFuncObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyUFuncObject), + #else + sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyUFuncObject), + #endif + __Pyx_ImportType_CheckSize_Ignore_3_2_4); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 908, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.stream"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "OutputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) __PYX_ERR(4, 21, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream)) __PYX_ERR(4, 21, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "ByteCountingOutputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) __PYX_ERR(4, 43, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream)) __PYX_ERR(4, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.stream", "InputStream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) __PYX_ERR(4, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream)) __PYX_ERR(4, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(5, 27, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) __PYX_ERR(5, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.coder_impl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "CoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl) __PYX_ERR(6, 42, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl)) __PYX_ERR(6, 42, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "SimpleCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) __PYX_ERR(6, 56, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl)) __PYX_ERR(6, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "StreamCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl) __PYX_ERR(6, 60, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) __PYX_ERR(6, 60, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "CallbackCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) __PYX_ERR(6, 64, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl)) __PYX_ERR(6, 64, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "FastPrimitivesCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) __PYX_ERR(6, 79, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl)) __PYX_ERR(6, 79, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "MapCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl) __PYX_ERR(6, 102, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl)) __PYX_ERR(6, 102, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "BytesCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl) __PYX_ERR(6, 108, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl)) __PYX_ERR(6, 108, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "BooleanCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) __PYX_ERR(6, 112, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl)) __PYX_ERR(6, 112, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "BigEndianShortCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) __PYX_ERR(6, 116, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl)) __PYX_ERR(6, 116, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "SinglePrecisionFloatCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) __PYX_ERR(6, 120, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl)) __PYX_ERR(6, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "FloatCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl) __PYX_ERR(6, 124, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl)) __PYX_ERR(6, 124, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "TimestampCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) __PYX_ERR(6, 128, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)) __PYX_ERR(6, 128, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "VarIntCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) __PYX_ERR(6, 133, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl)) __PYX_ERR(6, 133, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "VarInt32CoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl) __PYX_ERR(6, 138, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarInt32CoderImpl)) __PYX_ERR(6, 138, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "SingletonCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) __PYX_ERR(6, 143, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl)) __PYX_ERR(6, 143, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "AbstractComponentCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) __PYX_ERR(6, 147, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl)) __PYX_ERR(6, 147, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "TupleCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl) __PYX_ERR(6, 162, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl)) __PYX_ERR(6, 162, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "SequenceCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) __PYX_ERR(6, 166, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl)) __PYX_ERR(6, 166, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "TupleSequenceCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) __PYX_ERR(6, 179, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl)) __PYX_ERR(6, 179, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "_AbstractIterable", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable) __PYX_ERR(6, 183, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "IterableCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl) __PYX_ERR(6, 187, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl)) __PYX_ERR(6, 187, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "ListCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl) __PYX_ERR(6, 191, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl)) __PYX_ERR(6, 191, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "IntervalWindowCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) __PYX_ERR(6, 197, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl)) __PYX_ERR(6, 197, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "PaneInfoCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) __PYX_ERR(6, 217, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl)) __PYX_ERR(6, 217, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "_OrderedUnionCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl) __PYX_ERR(6, 232, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl__OrderedUnionCoderImpl)) __PYX_ERR(6, 232, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "WindowedValueCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) __PYX_ERR(6, 244, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl)) __PYX_ERR(6, 244, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "ParamWindowedValueCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) __PYX_ERR(6, 264, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl)) __PYX_ERR(6, 264, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "LengthPrefixCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) __PYX_ERR(6, 271, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl)) __PYX_ERR(6, 271, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "GenericRowColumnEncoder", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) __PYX_ERR(6, 280, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)) __PYX_ERR(6, 280, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "RowCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl) __PYX_ERR(6, 285, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl)) __PYX_ERR(6, 285, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "LogicalTypeCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) __PYX_ERR(6, 315, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl)) __PYX_ERR(6, 315, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "BigIntegerCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) __PYX_ERR(6, 323, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl)) __PYX_ERR(6, 323, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.coders.coder_impl", "DecimalCoderImpl", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), + #else + sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) __PYX_ERR(6, 327, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl)) __PYX_ERR(6, 327, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 26; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.coder_impl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_int_int64_t_uint64_t_un); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 75; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_IntervalWindow, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_NoneType, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl__pickled_types, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl__unpickled_types, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_create_InputStream, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_create_OutputStream, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_dumps, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_get_varint_size, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_loads, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_past_unicode, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_small_ints, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_is_compiled, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl__TIME_SHIFT, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_BOOL_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_BYTES_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_DICT_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_FLOAT_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_INT_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_LIST_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_NONE_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_PROTO_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_SET_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_TUPLE_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_UNICODE_TYPE, (void **)&__pyx_vp_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_coder_impl_row_encoders(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_coder_impl_row_encoders}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "coder_impl_row_encoders", + __pyx_k_Optimized_implementations_of_var, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_coder_impl_row_encoders(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_coder_impl_row_encoders(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_coder_impl_row_encoders(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + static PyThread_type_lock __pyx_t_7[8]; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'coder_impl_row_encoders' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "coder_impl_row_encoders" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_coder_impl_row_encoders", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__coders__coder_impl_row_encoders) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.coders.coder_impl_row_encoders")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.coders.coder_impl_row_encoders", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "View.MemoryView":100 + * + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "View.MemoryView":101 + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<< + * except: + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_collections_abc}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin___import__, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_collections_abc_Sequence); + __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":100 + * + * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence" + * try: # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":102 + * try: + * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence + * except: # <<<<<<<<<<<<<< + * + * __pyx_collections_abc_Sequence = None +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + + /* "View.MemoryView":104 + * except: + * + * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_collections_abc_Sequence); + __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None); + __Pyx_GIVEREF(Py_None); + goto __pyx_L3_exception_handled; + } + __pyx_L3_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L7_try_end:; + } + + /* "View.MemoryView":239 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "View.MemoryView":240 + * + * try: + * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< + * index = __pyx_collections_abc_Sequence.index + * except: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 240, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":241 + * try: + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< + * except: + * pass +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 241, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 241, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":239 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L15_try_end; + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":242 + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index + * except: # <<<<<<<<<<<<<< + * pass + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L11_exception_handled; + } + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L15_try_end:; + } + + /* "View.MemoryView":307 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct_or_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 307, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(generic); + __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":308 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 308, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(strided); + __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":309 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(indirect); + __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":312 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_direct}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 312, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(contiguous); + __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":313 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_indirect}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 313, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __Pyx_XGOTREF(indirect_contiguous); + __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":321 + * + * + * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< + * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ + * PyThread_allocate_lock(), +*/ + __pyx_memoryview_thread_locks_used = 0; + + /* "View.MemoryView":322 + * + * cdef int __pyx_memoryview_thread_locks_used = 0 + * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< + * PyThread_allocate_lock(), + * PyThread_allocate_lock(), +*/ + __pyx_t_7[0] = PyThread_allocate_lock(); + __pyx_t_7[1] = PyThread_allocate_lock(); + __pyx_t_7[2] = PyThread_allocate_lock(); + __pyx_t_7[3] = PyThread_allocate_lock(); + __pyx_t_7[4] = PyThread_allocate_lock(); + __pyx_t_7[5] = PyThread_allocate_lock(); + __pyx_t_7[6] = PyThread_allocate_lock(); + __pyx_t_7[7] = PyThread_allocate_lock(); + memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); + + /* "View.MemoryView":983 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "View.MemoryView":984 + * + * try: + * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<< + * index = __pyx_collections_abc_Sequence.index + * except: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 984, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 984, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":985 + * try: + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<< + * except: + * pass +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 985, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 985, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":983 + * + * + * try: # <<<<<<<<<<<<<< + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L23_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":986 + * count = __pyx_collections_abc_Sequence.count + * index = __pyx_collections_abc_Sequence.index + * except: # <<<<<<<<<<<<<< + * pass + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L19_exception_handled; + } + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L23_try_end:; + } + + /* "View.MemoryView":989 + * pass + * + * try: # <<<<<<<<<<<<<< + * if __pyx_collections_abc_Sequence: + * +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); + /*try:*/ { + + /* "View.MemoryView":990 + * + * try: + * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 990, __pyx_L26_error) + if (__pyx_t_8) { + + /* "View.MemoryView":994 + * + * + * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<< + * __pyx_collections_abc_Sequence.register(array) + * except: +*/ + __pyx_t_5 = __pyx_collections_abc_Sequence; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_memoryviewslice_type)}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":995 + * + * __pyx_collections_abc_Sequence.register(_memoryviewslice) + * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<< + * except: + * pass # ignore failure, it's a minor issue +*/ + __pyx_t_5 = __pyx_collections_abc_Sequence; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_array_type)}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 995, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":990 + * + * try: + * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<< + * + * +*/ + } + + /* "View.MemoryView":989 + * pass + * + * try: # <<<<<<<<<<<<<< + * if __pyx_collections_abc_Sequence: + * +*/ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L31_try_end; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":996 + * __pyx_collections_abc_Sequence.register(_memoryviewslice) + * __pyx_collections_abc_Sequence.register(array) + * except: # <<<<<<<<<<<<<< + * pass # ignore failure, it's a minor issue + * +*/ + /*except:*/ { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L27_exception_handled; + } + __pyx_L27_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L31_try_end:; + } + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name') +*/ + __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":22 + * # pytype: skip-file + * + * import numpy as np # <<<<<<<<<<<<<< + * cimport numpy as np + * +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_4) < (0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":25 + * cimport numpy as np + * + * from apache_beam.coders import coder_impl # <<<<<<<<<<<<<< + * from apache_beam.coders.coder_impl cimport RowColumnEncoder, OutputStream, InputStream + * from apache_beam.portability.api import schema_pb2 +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coder_impl}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coder_impl}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":27 + * from apache_beam.coders import coder_impl + * from apache_beam.coders.coder_impl cimport RowColumnEncoder, OutputStream, InputStream + * from apache_beam.portability.api import schema_pb2 # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schema_pb2}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_portability_api, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_schema_pb2}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":38 + * self.contiguous = np.ascontiguousarray(column) + * + * def null_flags(self): # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_3null_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AtomicTypeRowColumnEncoder_null, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_null_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":41 + * return None + * + * def finalize_write(self): # <<<<<<<<<<<<<< + * if self.original is not self.contiguous: + * self.original[:] = self.contiguous +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_5finalize_write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AtomicTypeRowColumnEncoder_final, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_finalize_write, __pyx_t_4) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AtomicTypeRowColumnEncoder___red, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AtomicTypeRowColumnEncoder, (type(self), 0x3f705cb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AtomicTypeRowColumnEncoder__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26AtomicTypeRowColumnEncoder_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AtomicTypeRowColumnEncoder___set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_AtomicTypeRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatFloat32RowColumnEncoder___r, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatFloat32RowColumnEncoder___s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":60 + * self.data[index] = stream.read_bigendian_float() + * + * FloatFloat32RowColumnEncoder.register(schema_pb2.FLOAT, np.float32().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat32RowColumnEncoder); + __Pyx_INCREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_11, __pyx_t_14}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatFloat64RowColumnEncoder___r, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_28FloatFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FloatFloat64RowColumnEncoder___s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":77 + * self.data[index] = stream.read_bigendian_float() + * + * FloatFloat64RowColumnEncoder.register(schema_pb2.FLOAT, np.float64().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_14 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_FloatFloat64RowColumnEncoder); + __Pyx_INCREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_5, __pyx_t_13}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoubleFloat32RowColumnEncoder_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat32RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoubleFloat32RowColumnEncoder_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":94 + * self.data[index] = stream.read_bigendian_double() + * + * DoubleFloat32RowColumnEncoder.register(schema_pb2.DOUBLE, np.float32().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_13 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat32RowColumnEncoder); + __Pyx_INCREF(__pyx_t_13); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DOUBLE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_14, __pyx_t_12}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoubleFloat64RowColumnEncoder_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_29DoubleFloat64RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoubleFloat64RowColumnEncoder_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":111 + * self.data[index] = stream.read_bigendian_double() + * + * DoubleFloat64RowColumnEncoder.register(schema_pb2.DOUBLE, np.float64().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_12 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_DoubleFloat64RowColumnEncoder); + __Pyx_INCREF(__pyx_t_12); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_DOUBLE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_13, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int32Int32RowColumnEncoder___red, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int32Int32RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int32Int32RowColumnEncoder___set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":128 + * self.data[index] = stream.read_var_int64() + * + * Int32Int32RowColumnEncoder.register(schema_pb2.INT32, np.int32().dtype) # <<<<<<<<<<<<<< + * Int32Int32RowColumnEncoder.register(schema_pb2.INT32, np.int64().dtype) + * +*/ + __pyx_t_10 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + __Pyx_INCREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_INT32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL}; + __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_12, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":129 + * + * Int32Int32RowColumnEncoder.register(schema_pb2.INT32, np.int32().dtype) + * Int32Int32RowColumnEncoder.register(schema_pb2.INT32, np.int64().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int32Int32RowColumnEncoder); + __Pyx_INCREF(__pyx_t_11); + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_INT32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_10, __pyx_t_5}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int64Int64RowColumnEncoder___red, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.data cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.data cannot be converted to a Python object for pickling" +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_26Int64Int64RowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int64Int64RowColumnEncoder___set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":146 + * self.data[index] = stream.read_var_int64() + * + * Int64Int64RowColumnEncoder.register(schema_pb2.INT64, np.int64().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_Int64Int64RowColumnEncoder); + __Pyx_INCREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_INT64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_11, __pyx_t_14}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoolRowColumnEncoder___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoolRowColumnEncoder, (type(self), 0xa91a868, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoolRowColumnEncoder__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_20BoolRowColumnEncoder_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoolRowColumnEncoder___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":164 + * self.data[index] = stream.read_byte() + * + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.int8().dtype) # <<<<<<<<<<<<<< + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.uint8().dtype) + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.bool_().dtype) +*/ + __pyx_t_14 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + __Pyx_INCREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_BOOLEAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_int8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_5, __pyx_t_13}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":165 + * + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.int8().dtype) + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.uint8().dtype) # <<<<<<<<<<<<<< + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.bool_().dtype) + * +*/ + __pyx_t_13 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + __Pyx_INCREF(__pyx_t_13); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_BOOLEAN); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_14, __pyx_t_12}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":166 + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.int8().dtype) + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.uint8().dtype) + * BoolRowColumnEncoder.register(schema_pb2.BOOLEAN, np.bool_().dtype) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_12 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_23coder_impl_row_encoders_BoolRowColumnEncoder); + __Pyx_INCREF(__pyx_t_12); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_schema_pb2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_BOOLEAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_13, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AtomicTypeRowColumnEncoder(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3f705cb, 0xe733966, 0x0931611, b'contiguous, original') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_1__pyx_unpickle_AtomicTypeRowColumnEncoder, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AtomicTypeRowColu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AtomicTypeRowColu, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_23coder_impl_row_encoders_3__pyx_unpickle_BoolRowColumnEncoder, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoolRowColumnEnco, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_coder_impl_ro, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoolRowColumnEnco, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/coders/coder_impl_row_encoders.pyx":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.coders.coder_impl_row_encoders", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.coders.coder_impl_row_encoders"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 101, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 157, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 619, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "View.MemoryView":583 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_neg_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[0], 0, __pyx_mstate_global->__pyx_int_neg_1) != (0)) __PYX_ERR(1, 583, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "View.MemoryView":680 + * tup = index if isinstance(index, tuple) else (index,) + * + * result = [slice(None)] * ndim # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False +*/ + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 10; } index[] = {{2},{68},{35},{54},{37},{60},{24},{52},{26},{34},{29},{33},{45},{22},{15},{179},{37},{30},{32},{1},{1},{1},{1},{1},{8},{5},{46},{6},{15},{23},{25},{7},{6},{2},{6},{35},{9},{30},{50},{39},{34},{8},{61},{20},{32},{22},{14},{30},{37},{5},{26},{44},{46},{41},{37},{7},{20},{38},{40},{6},{29},{47},{49},{29},{47},{49},{8},{5},{28},{46},{48},{28},{46},{48},{5},{5},{26},{44},{46},{26},{44},{46},{20},{8},{15},{3},{15},{18},{42},{27},{17},{6},{18},{4},{5},{1},{9},{17},{18},{10},{6},{5},{8},{5},{5},{15},{6},{9},{5},{14},{5},{7},{7},{6},{7},{8},{12},{2},{10},{5},{8},{5},{5},{4},{13},{5},{8},{8},{7},{4},{10},{4},{8},{4},{7},{2},{10},{5},{3},{4},{3},{14},{12},{11},{10},{41},{35},{19},{14},{12},{10},{17},{13},{8},{10},{4},{12},{10},{12},{19},{5},{4},{5},{5},{4},{4},{6},{5},{8},{5},{6},{12},{6},{12},{6},{1},{54},{558},{7},{11},{11},{9},{114},{116},{59},{58},{26},{1}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (1895 bytes) */ +const char* const cstring = "(\265/\375`\030\020\355:\000\252Xl\021C\000\221\250\r\374\277\253\277w\377\313\365\275\247\022\337\253\357=\225\370^\215\223l\374\315\225MR\030O\254u\212\234|\364\377\004\033\332\276\014\001\342\277\256u`\006\353\014\211\270+#\022O\332c\247\317\310N!\022\353\000\364\000\362\000\031\370\235y\357\370U/=nN\272\327\227m\367F\331\303p\235Og\306\216q\323(\302\037\235\205_\220\016 \036\240\016\350\325\217\035\365\357\353\242I]n\374\255\247\304\211\010\351Y\310d\336\265/\0233\026\\\332I\373T3\351\177-\307\345l\002\236\250\226\360\260\254\331\212\336\310\276\3176\353\372\336\306\252-}\027\337\265\243\347\224\313\377\234\353\022~\335s[gr>\372\235\270\366\375\314s\256\373W\372\271\3626{GNE\375\363\256x\310\366\373\354\277J\232\0307\326]\273\371\366\352|8\333L\232_m|x\276\357\322\213^?\377\366\033_G\253}\2657\330\345\274\217\237c\313\241\034\273\225o\305\347\351]\037\2152\311\244\370\275\255O\326~\322Q.\353|.z\217\363\366d\204G\252Sz\364\313=\\\355\304\325\267)\037\245\232\347!\232'\3234\037\223\022<17)\355\200\204|h\370\266\264$[N\307\204D\345\303\241\326\222x4\035\223\317\207\004\223\232\216 \245\271:t\027\223v\235\243\357\307\357\030B\254S\267L\355f\305\2468\327iqn\3665Y\266\ti0\354\371w\264\224v\036\361x\263\305\244Z\247\024\241-\342\344@\257k\307\327\337\022\033Q\307#\245\357-o\223\316\036\275\271a~m\204X\307m\271B\370\263\316H{\236\346}\217jk\226\017B\217Y\372\205\360=\315=r\371l\305\360@\210\035\010\205=\323>I.C\3518\327\\s\206\220\313\370c\276\3661w\341\207\210\203\275\341\353\217'""\t\345\264\263\351T;^\363\323\214\375n\031\267\210\034\204\234\3458n\305\267\2564K+\355\266y\235\275\301\016sB\010\241\234\220\024k\036A\370\275\215F\327\336\353[\256\016\361\204RB\3705\333\030[\304\026y\354\373\260N\270\371\317w\022\204\021RkE\216[\204\275\316\317\366\332\031k\207\0337\356\3115\326\375\244S\324\030\006\243\2501\217\325\263\311C#Oy\224{\340\307\311Au \010\277\326\014$\344CC\037\024\325\002UHjB\313\200\0001\032.\034\225\211\224\207\226\357X\241\242Ucx8\264z\025\242\2612\275\240\\2\263\324*\245h\245\000\321\322\260DT\034R0V(\253\023/\036\nZ\n6bRPZ-`>\260\010\2540\274\226I\005aC\206\006\213F\206\026j\211\210\341\000&\303B\300\322V\033P^\026\274dB2R\240h\241Hi\275\200\021\000cb\201\260>\034h\035\340\2101e\210!\002\206\002K\2564\254\374e\305ED\3652L\251\006\0341\035\251\004\0341(\252\005\252N\312D\313\211E\300FL\273XP\225\2442\244D\264\024p\221\252\007)\255\305\000\200\213c\206\006\013J\252B\313\000\023\213\001K\203\325\001\001+d\325\261\372\330\210\321`\311\320B`#\246\203\205\363\331d\036\225N\350\243}R@\236\017HE\203\234\316\211\306\023\312L.O\246m\262\220\306d\243\3214\234\320ui%\331\210\020\364d'\027\2667\316\r\202N4Z\250s\222i\360\204\346\344\222N'\267]\036\023\037\017\t\217\212\026J\311J\240\035\325\314k\203.Lio\370\2325\303\307\315]X\266\245\027\014\201]\250\201\2413\010\315\214\210H\222$\3511\010\202q\250\323\224\335R\301L\224)\343\214AFHJ\242$)(ca\330\014 \221.?\276\271\236<\206\320ig\315vz\325\264@\220S\353:\213\316\311\324w\247\201\251Z^\217tfs6\237\206 \004\266\221\024\002c\273B\024\005\3437@0\221\365\345\215E\254F@\177\231\270\340\303\244w~\014dBW\rA\230AQMG\373\246&\255/\022\302J\221#\314\350\231\372\3303tp\222\033E\3230RO\241\354\246]\311\215t\311B\010\024\374\2374\0263\237>\352\371)\236\032\366\240#\000\332\254\246\000\312.\210,\312\337K\241\2549\006\tF\226\222\035y\256H\273\361\202\026G\270\321dO\206\216\245\305+]\232\316\225\004\247\217;{\377B\227\235\202\330d\223\226\221\010\031gA\324\254\335\320^x\215\357?\261\226\324\340\364\024\003%""iA\277\250a\307\354b\223\315`\217LK\031\374\031\275\240\337\013\017\323\253\027\3217Cw\227\303\037\317\234\345 A\234cV\236Cy\371\257\374\006F\020\347\370:W\236\026\226q/*m\304\276+d\251\361\241\177U\210\361,\371;\271\200g]\356B\335>j\357\304\250\233\232x\022\251V\364\355\316\235\324\211^qh\237\241\347J\304;\323\272\217\026z\262\013\251)\020\021\222\341Q\n\2558II;\005h\232\237\0235k\362D{\334q\2162\217Y\333\000JQ\251\226\303V\036\322\031\356:Io\360\251\272\337\371\234r:\\8\274Hw\320\026\364:\224\257\023\220\373\376\007\3474\347\226\277F\330j\224|\202\322{\320/Dw{\266?\300\212\366E\240\177v=\260\330;\021e\034\000iA\341A\244\321\030\270\311\336\275)\340\262hQzy\252S\210\nh\350(\305\244kXE\357\364\206\021q\320\327\266\302g\343\267\267\036\320D\316\0069U\001c;\033p\026\337\326\003\230\037\264\235\366\366\340\340\030\312y\340\251\032:\206\006\030\035\227\351\321\265\227\254\234\022\017\254o\245yh%5%]\325\003\302)^\200\316\3564\210<\032f\373\033\251\257\355\330V\223G\234i\250\357\342ym\027c\313\370\252(5K\036\034\215\275\367VH\366k)\247\016(\365\253?I\371p(\254^\217n\221\202\352\221\021\330\216fZ!\217Jd2G\001\210\256\003\330m9>\365'\344\367\262=R\027o \365\214\366\354b\t\271\306\035\232\350\032\264\r\337\212\266{:)%\322\323k\030\314\016yJ}\277\261\222\026\260\251\3742\343\001F\241\232`\"\276QL\315\001&\366\033\327\237\355\217\000D\370\010\276\211\206,\376p\327\261\372Z\025*i\235\325\265\367\313Ob@\002\001\213\013\241\232m-'^<\034n(W5\370\256x<-\377\252\330\314\376"; + PyObject *data = __Pyx_DecompressString(cstring, 1895, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2096 bytes) */ +const char* const cstring = "BZh91AY&SYELRr\000\001\007\177\377\347\375\275\212\342\377\377\337\277\357\377\366\277\377\377\374@@@@@@@@@@@@@\000@\000`\007\375\363\233\205\233(k\225\003`\310Q\t+\200\225\023)\202\236\246O i\0325?T\366\224\332i=OS\365G\251\243\3244z\214@\365\006C\321\000i\247\243$=&4\236\240\320\223&\231\t\204\322OQ\350\021\265\r4\036\243L\214\206hj\006M\000h\000\033D`&\023\034\000\006\200\000d\000\000\001\220\321\240\000\000\000\000\000\000\002SBM\002\023L\204\364jd\311\250\311\3514\321\221\247\250\001\243\324\r\000\000\006\200\000\006\201\300\000h\000\006@\000\000\031\r\032\000\000\000\000\000\000\000$P\230\201'\2504jy\032\230\246M4\000d=\023@\320hh\000\000\000\r\006\232m&\277\241\316\342ep\3477(\337*\367{\216}\211\351\177\271'\242\210\370,\355\253\025\342|=;&X\204\263v\373}\245\3760\356\244\271FP{\311\177\307x\262M\241\214\263T\340\325\2435\035\340\322\030\246@\221\335\\\266X\030\234\244\317\340\316n\032\371\261\355?\313B\366^El\354A\016r_\217^\035\265\303\024\210\022V\0303\361\251\r\234\016BxG\241\261\2617\374\327\204\201p\177\\\222\034Dwz\266\357@\335\250\345\362-\260\244\241r\205#kH \254\206\233\314Q\306\0268\034\247\tVM\270\242I\330\2156cc\367\367[\213\341rx\2516\302x\211L\205W\255',4\333\331\214\317Lv\r^\221X\330\010b\367\314Xx\033\323\024\020\317?\312B\306&Jx\340hu\332P\246\205\007h\200(ZZ\030\244g\302\313I\\\245D\302\240\007\321D\312n!\010\344\261r\001\010\3227v\357\240\nf\310\323@\017H\345\245\026e\017k\276\351\230@G\031Y%Rg\302g^X\212{\234D\375t\227u\033\301\367\240p\316\255\254K\300\304t\260\357\225\356\214\270\231\251\222\367\221\267\207&\366\013h\031\2663\345\320\262nv/\3172\356t5\014\332\271\311\367E\003\350\333\2413\367\304\255\350\273\177\303\000\213\266\247\344\004\232\207\331\252\303\314\314\314\314\314\351l\310\201\303\034h\014Z\237\035;\032\366\004\205\030\373\321\314\276\305.\275\256\225\201\005Gq\344\245\005\023m\305@\240M\211|\255\007\010\247\013Kq\022!\253\324\343Z\306Y\324B\343\024\014\272\271\230\036\305H}\342\010\013:J4Jf\204\371\037\260\237\330\204l""\243p\323\320\021No>*\272\275s\223\227\267&C\213\202\247WG\251\323\351$\224DBICDBIDt\013\273\314\332\037\237&8\277S\265\2473W\216\234\005\356^o\021\210q,\250\002\252\333n[2M\212\340\211\ncy\255\346\2463\254\343\251d\244\351S:\243\200\032f\204)\275E\214o\263\031\263\273\246\027I\333qL\273A\2566x\347\365\336\2669:\233\246\206\224\213\235\332\2712\001\217e\231\234\005\331\337\226\205\261\321\237B+e\235\211\320\242PY\313=Xy\360\230\013\266k\232\302\n\210V\001\374\371\344a\315\2430qv\261\351T+\"oAG\014\013\017\017\236\251 \250`\032`\230\237Q\211\035\315p\327\273\254N\002\272''\001\2733n\010\264\3566\306\354\314^\027\344qi\236\r\034\206\013;amc\276J\r\036\276S+\2262\224\266l\256\177\276\032r\340\340\205,\246\342\275\215\341\200\216\210d\245\205K%\316\346\027\250\335\256v\362\030YI(\217\300\322\225^\300\216\311\314\247< \340\264\032T\302\005\004yI\356\317\215H\222\275cym\224\244\216""\275\2440\353@4uE\260\304\330\255R\240\\\366\260\315\270\331a\241\334\024\320}Y\264\317:\240\230\245F\225h\320<0\315;\223s5kQ\253\2315\033\247s\330V\256\220\223\306\354\304\267\0003&\001\341\333\251\330\241#,\025\222\3524`\322\003\000ky\03326K\026\240\317\266#,\230\014st\240\256w\364T%.,p$T\265\213\000\206H\036\260@\016\234\307^As\234\314\"\256\366n+\036\226KF-\303\021Z!\"\205\264|0;\312B\362z\326\334h\330f4\254\260\3179Y\263\357J6,\266\322\263\220l\216\350\316\\\231\207\307\013\374\266Bz\301M\372\304M\367\033M\006\215\010\316\232D$N\22312\\\236\346\260HHI\002\022\022\023$\240\224\005\256j$\251\221qu\326B\026\223\237J\300\013\347m\"\306\347\303\004\224\252BM\2428um\213\2775\021Ca\027\t\031\246\017`\204\355\314\361\252G\216,*cB\231\032\214\334\213\002\353\331\212\247\256\234\317~\365\311\310\\\034\006\236\355G\032\240\330\251\321\323:\210\347\341fso\005\276\361\336\253\330f\261\333\206x\263\027\363 \306\016\207\020l\344\341TF\234r\217\247\245@\201[\t\341\246#\322p\253\254\324]T\230$\330\3467#\256VL\216\342\003\343}@\202\232\240B\316\371\214\344sQ4\217z\246>ES2@\321\264\344@\201\3246\244\2019\003\211\356\023\210\271p\246\276\335u\\\300\204p\233\250\235\304a$!1\031\r\354\247\224\226s\340\344\016\010\017\251\350\037\034\306\216S\230\363w\214G\214\2765\342\3326c\266mv\216\177\266B\215~3aUNk$\363\240\260P\311\274M!2\r\026\213\007A\177\030\177G\013\272\327\214\243\237\255\377O\316\331\023\246zR\307\207,J\372\022\221\234,X(\250\364\241G\374]\311\024\341BA\0251I\310"; + PyObject *data = __Pyx_DecompressString(cstring, 2096, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1903 bytes) */ +const char* const cstring = "x\332\255WKo#7\022n\003\336\315 Yl\220\0076\207\305b9\207@\231dF\231\207\343\014\022\307\013\331\226g\033\261%\331\222w2\203\004\004\325MI\\w\223\355&iK\263{\360\321G\035}\364\321G\035u\364q\216:\3728?a\177\302\026\311\326\313m+9\304\200\331|T\261\252\276*V\225\276C\245(B!\213)\227Lp\211\222\224\0064d\274=\335D\237\207(\326R\241&E\214\207\264KCDx\210\270PHF\014\3107t\253ESt\314\350\t\n\005\225\366\210v\023!)\222*e!\225\233\204#\301\243\036\nRJ\024E\0045\035\223\352\020\205\230D\201\340\212\265\265\320\022\204\240\230\306\"\355\025\201\313\\E\244dm\216\224@\300\034>\262\3678\n#2#\312.>I\231\"\315\210f\004N\251V*\342E\274\326,t\302T\007\251^BQ!\333W)\341\322\2321eqd\300\301\000*5\203\335\326,`\314\201\340\210\312q\242zHv\010\\\255t\002\312\265D\212\202\236\352\010^$iJz\276U@h\205D\0135\205\346\241D_\220.\334\362y\370\300\317\313r\340\353$\021\251\242\241\317\217I\304\300K\"\244\017\r\360@\014N*\004\005\004r\n \314\030Rx\210\332\3005&v\352\000\326V\314\332\2565\360_\306@P\241\"\000J\353\232M\253\245\261'\244\021k\322\024@\006\010\215[A\210\365\037G\265r\355\321\312\363\025\033\026)\3757\210\227\240]3\210\300s\020\016\306&\315\"\005\302\014\274\262\210\374\026\352\t\2158\0055\301\255\t\320\3152\250\016\345HRe&\250`}A\024\330\215\201\035b\263\220\341\312\216\251\341\336&\221\244\305\352\034x\240r\026`$\010\250\034\243YW4A1\351Y\374 \236\337\320TL\201>\3406r\340J\210\306c\232B`(\032\233\265h\032\243\212\353\205\007\377 a\210\271\201\307\030K\022\022t(nR\022\177\035\000\372\251t\037\314\342$\302\2518\301\224\273\375b\322\353\"\300\363q7\020Qd\224\0077\026I3X\233\211|s\2453m\375\346\3668\340\326C&\215\226\324\352\332\016\320\027\306\251m\033k\306^\363tiWQ\256\354C\232\276b&\035Khl\222\354\rEk?\240\307\271H\344\002\034\335\":R\010\343\224\206:\240\030\243P[X\270\340\217\300\361\307\214Dp\0320\316\024\306\\\307I\257\210\003\221\322b\014|\314\336\203Z\204E\316\273\200\005D\340,\231\216\t\274\241\233\024\031\312\353\222F\255bH\024A\201{\206\340\250\314!\216\234\240\232\213J""\307`mHXp\030\201\361k.\341\204sX\346\367\314\303\230@:w>\277\313\333R\3504\240\353z\022\033$\212D`s\230\265\323(Z\274\345\324\275/sc\226\002\213\245\372\246\357\227\224\210Y\320\200g\260/N6E\244c^v!r\367Iq\342\t\347)\214\027\322\302\303\221\360^~\023u\213q\310\006o(6y\223. \344:\212p+\"m\271Q\255\356\224K\225\r!\242\233T\267\355\345\225\277\203*\247\366V\365`c\247\274%4@\273\035\t\242\236=\275\311\266\3600/\371\327\310\363*L\031VW\026\010\317\037.\024~+yNx9\212X\"\231\334\336\251\226\032\226\357\016\315\027\235\345\365\370\025\352\234\032S\372\274\332\213\316\026I\376m\000\370\225\306\263\2470\254\256\370\034\224\265\303M\276\273O\362\362\027\322\346\245se\005\347u\275\373\344V\231w\323\346db\\\353u\341\177\013\212+\256@\036\337\247\255:=\322PE\250\251\315\305i\231\206\3221\3165\330\225\272\231bTtE'\277S\274\243<\315R\232\\L\232,b\252W$\t#rZ\212l\312#\322Tq\"{<`\002.L\241oa\234\312&\221\264\to\033\007P\033L%7\366\270I\233*Sv\314\022(1\203J\236\222\2006Ip8U(\260\350\004P\300\241\252\204\006\001\367\t\2158;`&\261\313\371No\nE\305v$4ME:\237\313l\256j\2710o\271\230\203:\001\205'k\2070ni\036\030\025\333c/`\026b\354j\021|MKf>\314.\340\026f\274\010\303s\243\306\304lWN\263\232\212qL\3008\014\355\242\351\025MC\006\013\021\352\010\276\234\304\323\021\n3\214\364\004\206d\232[m\221\004\013\301\033\207\211H0\206\256\001\203c\202C\251c\267J\251\204\"\353\346\231\332fj\341\2613\315m-\244\013\322\376\r\302\333\022\362\r\2222\037\313?\266\355\265\301\355H\223\310Y3\355\024r\361?\3310`\246\264\315$t\215\022L\212\tN\232OM\255\267\357 \303\005fY\3731\363:\360-/\305\226W\0039l\247\356\014nN\244\022\360\237j\350@ub\2540\333\030k\34360\006`\325\\K\032bk\244N\240zSXO\356\207\336XS\331\255\365\252\256\265\370\322\253\365\014\202\223%\336x\325(\343F\025\327J\2252d\250\355\252\327\200\036\013\230\343d\206k\366\017d\273qu\005\303L\217g\232\233\2375\320v\004\035\222z\363\177\033=E7\315K\200\016\004:\333D\253\272\202\0370\261\007\251\204\246\240\345K\210Oq\342U\004\247F?\017\373\215\362~\t\352%""\336\361\177\004\005_\325\312u\017;\357\2056:\2447q\347x\303\375f\202\0345\275?\333\232\223\031BTJ\017\236\t>&\320\022)lp\367\340M\205\322\203\326]\301\275\314\340\351\311\030R\222y,\322\253\021N}\336\0226\234\300\010\274\355\357\327\033\223m\300\314l\036T~\254T_V<\373\240\342\304\364\203\336n\351'\334\360w\313\365Fi\267\206!\202S!\275]\277\222\337\264;\270\376O\177\273\341\231\256\304Z\355\031\007\325\335t\253\324(m\356\224\352\343\245\277\331p3[R\335\024\352K6\311\001\350\355\370\365\354\260R\332-o\341\306Am';\252T+\331\254\266_\205p\260\323z9#\237!<\250\370\233\325\255\311\302\332k\027\247\367\257\227?8{r\272t\275\374tp\177\260:\374\310L\237\017\227\206\177\031\036\231\351\373g_\365\367N\227\376w\317\373\303\237\317\032\375\277\235\207\027\300\362\247\263\027\375'\375\355\363\207\027\344z\371\275\323\343\263\227\375\362\371\247\347{\327\367>\356\337\277\276\367Y\377\350\035\014\352|\355\342\344\222\016\236\r\302\341\227W/\336>1\264G\327\367>\034}\370\375pext\365\336\325\177F\373\257F\257^\277\273\261W\237\227X\270\374\364r\357w\220\372\315\2401\374hX\270\372\353\333\027\243z\343\335\374V\351t\351\335\362\337\317\217F\350\361\340\203\341\367W\207\243\275\375\353\345OF\237<\272\374i\2607\260\"\377\333\377\366\034$\255\rK\243\037^\217^wF\035\226\341w;k\341\242{y4X\232a]\035\220\321\267\225\267|\364\363/\216\363\2769Tg\337\365_\236o],]\377\361\375\263\007\375UcU\365\377\303\322rN"; + PyObject *data = __Pyx_DecompressString(cstring, 1903, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (4376 bytes) */ +const char* const bytes = ": All dimensions preceding dimension %d must be indexed and not slicedBuffer view does not expose stridesCan only create a buffer that is contiguous in memory.Cannot assign to read-only memoryviewCannot create writable memory view from read-only memoryviewCannot index with type 'Cannot transpose memoryview with indirect dimensionsDimension %d is not directEmpty shape tuple for cython.arrayIndex out of bounds (axis %d)Indirect dimensions not supportedInvalid mode, expected 'c' or 'fortran', got Invalid shape in axis ')?add_note and apache_beam/coders/coder_impl_row_encoders.pyx at 0xcollections.abcdisableenablegc (got got differing extents in dimension isenableditemsize <= 0 for cython.arrayno default __reduce__ due to non-trivial __cinit__numpy._core.multiarray failed to importnumpy._core.umath failed to import object>self.data cannot be converted to a Python object for picklingunable to allocate array data.unable to allocate shape and strides.ASCIIAtomicTypeRowColumnEncoderAtomicTypeRowColumnEncoder.__reduce_cython__AtomicTypeRowColumnEncoder.__setstate_cython__AtomicTypeRowColumnEncoder.finalize_writeAtomicTypeRowColumnEncoder.null_flagsBOOLEANBoolRowColumnEncoderBoolRowColumnEncoder.__reduce_cython__BoolRowColumnEncoder.__setstate_cython__DOUBLEDoubleFloat32RowColumnEncoderDoubleFloat32RowColumnEncoder.__reduce_cython__DoubleFloat32RowColumnEncoder.__setstate_cython__DoubleFloat64RowColumnEncoderDoubleFloat64RowColumnEncoder.__reduce_cython__DoubleFloat64RowColumnEncoder.__setstate_cython__EllipsisFLOATFloatFloat32RowColumnEncoderFloatFloat""32RowColumnEncoder.__reduce_cython__FloatFloat32RowColumnEncoder.__setstate_cython__FloatFloat64RowColumnEncoderFloatFloat64RowColumnEncoder.__reduce_cython__FloatFloat64RowColumnEncoder.__setstate_cython__INT32INT64Int32Int32RowColumnEncoderInt32Int32RowColumnEncoder.__reduce_cython__Int32Int32RowColumnEncoder.__setstate_cython__Int64Int64RowColumnEncoderInt64Int64RowColumnEncoder.__reduce_cython__Int64Int64RowColumnEncoder.__setstate_cython____Pyx_PyDict_NextRefSequenceView.MemoryViewabcallocate_bufferapache_beam.codersapache_beam.coders.coder_impl_row_encodersapache_beam.portability.apiascontiguousarrayastypeasyncio.coroutinesbasebool_c__class____class_getitem__cline_in_tracebackcoder_implcolumncount__dict___dictdtypedtype_is_objectencodeenumerateerrorfinalize_writeflagsfloat32float64formatfortran__func____getstate__id__import__index__init__int32int64int8_is_coroutineitemsitemsize__main__memviewmode__module__name__name__ndim__new__npnull_flagsnumpyobjpackpop__pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_AtomicTypeRowColumnEncoder__pyx_unpickle_BoolRowColumnEncoder__pyx_unpickle_Enum__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex__registerschema_pb2self__set_name__setdefault__setstate____setstate_cython__shapesizestartstatestepstopstructsuper__test__uint8unpackunused_coderupdateuse_setstatevaluesxPyObject *\000PyTypeObject *\000_BYTE_TO_PANE_INFO\000TimestampPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000int\000\000\000int64_t\000\000uint64_t\000unsigned char\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000ByteCountingOutputStream\000IntervalWindow\000NoneType\000_ITERABLE_LIKE_TYPES\000_pickled_types\000_unpickled_types\000create_InputStream\000create_OutputStream\000dumps\000get_varint_size\000loads\000past_unicode\000small_ints\000PaneInfoEncoding_FIRST\000PaneInfoTiming_UNKNOWN\000is_compiled\000MAX_TIMESTAMP_micros\000MIN_TIMESTAMP_micros\000_TIME_SHIFT\000BOOL_TYPE\000BYTES_TYPE\000DATACLASS_TYPE\000D""ICT_TYPE\000FLOAT_TYPE\000INT_TYPE\000ITERABLE_LIKE_TYPE\000LIST_TYPE\000NAMED_TUPLE_TYPE\000NONE_TYPE\000PROTO_TYPE\000SET_TYPE\000TUPLE_TYPE\000UNICODE_TYPE\000UNKNOWN_TYPE\200!\330\004\013\2101\200\001\330\0042\260!\2606\270\021\200\001\330\0048\270\001\270\026\270q\200\001\330\004\n\210+\220Q\200\001\360\010\000\005\016\210T\220\035\230d\240!\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\270*\300G\3101\330\004\007\200q\330\010\017\320\017;\2704\270q\300\007\300{\320RY\320YZ\340\010\017\320\017;\2704\270q\300\007\300{\320RS\200\001\360\010\000\005\016\210T\220\035\230d\240'\250\024\250Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\270*\300G\3101\330\004\007\200q\330\010\017\320\0175\260T\270\021\270'\300\033\310G\320ST\340\010\017\320\0175\260T\270\021\270'\300\033\310A\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023-\250X\260Q\260a\330\004\007\200|\2207\230!\330\010<\270A\320=Z\320Zh\320hi\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023'\240x\250q\260\001\330\004\007\200|\2207\230!\330\0106\260a\3207N\310n\320\\]\330\004\013\2101\200!\330\004\007\200t\210:\220W\230D\240\001\330\006\n\210)\2206\230\024\230QO"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 176; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 49) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 176; i < 188; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 188; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 176; + for (Py_ssize_t i=0; i<12; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,-1,1}; + int32_t const cint_constants_4[] = {66520523L,136983863L,177317992L}; + for (int i = 0; i < 6; i++) { + numbertab[i] = PyLong_FromLong((i < 3 ? cint_constants_1[i - 0] : cint_constants_4[i - 3])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<6; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 2; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 6; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_ro_2, __pyx_mstate->__pyx_n_u_null_flags, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 41}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_coder_impl_ro_2, __pyx_mstate->__pyx_n_u_finalize_write, __pyx_mstate->__pyx_kp_b_iso88591_t_WD_6_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_G1F_a_vWE_Q_q_t_we3d_G1_q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_8_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_Q_G1F_a_vWE_Q_q_t_we3d_G1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_AtomicTypeRowColu, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_ZZhhi_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BoolRowColumnEnco, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* NumpyImportArray.init */ + /* + * Cython has automatically inserted a call to _import_array since + * you didn't include one when you cimported numpy. To disable this + * add the line + * numpy._import_array + */ + #ifdef NPY_FEATURE_VERSION + #ifndef NO_IMPORT_ARRAY + if (unlikely(_import_array() == -1)) { + PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import " + "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; " + "use 'numpy._import_array' to disable if you are certain you don't need it)."); + } + #endif + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* CIntToDigits (used by CIntToPyUnicode) */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + Py_ssize_t padding_length = ulength - 1; + if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) padding_length); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= padding_length; + memset(cpos, padding_char, (size_t) padding_length); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, padding_length); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(int)*3+2]; + char *dpos, *end = digits + sizeof(int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + int remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (int) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (int) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(Py_ssize_t)*3+2]; + char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + Py_ssize_t remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (Py_ssize_t) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (Py_ssize_t) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (Py_ssize_t) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* DivInt[Py_ssize_t] */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) { + Py_ssize_t q = a / b; + Py_ssize_t r = a - q*b; + Py_ssize_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; itp_as_sequence && type->tp_as_sequence->sq_repeat)) { + return type->tp_as_sequence->sq_repeat(seq, mul); + } else { + return __Pyx_PySequence_Multiply_Generic(seq, mul); + } +} +#endif + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* PyObjectFormat */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { + int ret; + _PyUnicodeWriter writer; + if (likely(PyFloat_CheckExact(obj))) { + _PyUnicodeWriter_Init(&writer); + ret = _PyFloat_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else if (likely(PyLong_CheckExact(obj))) { + _PyUnicodeWriter_Init(&writer); + ret = _PyLong_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else { + return PyObject_Format(obj, format_spec); + } + if (unlikely(ret == -1)) { + _PyUnicodeWriter_Dealloc(&writer); + return NULL; + } + return _PyUnicodeWriter_Finish(&writer); +} +#endif + +/* SetItemInt */ +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (unlikely(!j)) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) { + Py_INCREF(v); + return PyList_SetItem(o, n, v); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old; + Py_INCREF(v); + old = PyList_GET_ITEM(o, n); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 0; + } + } else +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_ass_subscript) { + int r; + PyObject *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return -1; + r = mm->mp_ass_subscript(o, key, v); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return sm->sq_ass_item(o, i, v); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_SetItem(o, i, v); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v); +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* DivInt[long] */ +static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) { + long q = a / b; + long r = a - q*b; + long adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* SliceObject */ +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_ass_subscript)) +#endif + { + int result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_ass_subscript(obj, py_slice, value); +#else + result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s", + obj_type_name, value ? "assignment" : "deletion"); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return -1; +} + +/* BufferIndexError */ +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* CallNextTpDealloc */ +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { + PyTypeObject* type = Py_TYPE(obj); + destructor tp_dealloc = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type) + tp_dealloc(obj); +} + +/* CallNextTpTraverse */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + traverseproc tp_traverse = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_traverse) + return tp_traverse(obj, v, a); + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* CallNextTpClear */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + inquiry tp_clear = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_clear) + tp_clear(obj); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* GetVTable */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* MemviewRefcount */ +#include +#ifndef _Py_NO_RETURN +#define _Py_NO_RETURN +#endif +_Py_NO_RETURN +static void __pyx_fatalerror(const char *fmt, ...) { + va_list vargs; + char msg[200]; +#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES) + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + va_end(vargs); + Py_FatalError(msg); +} +static CYTHON_INLINE int +__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)++; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE int +__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)--; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE void +__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) +{ + __pyx_nonatomic_int_type old_acquisition_count; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (unlikely(!memview || (PyObject *) memview == Py_None)) { + return; + } + old_acquisition_count = __pyx_add_acquisition_count(memview); + if (unlikely(old_acquisition_count <= 0)) { + if (likely(old_acquisition_count == 0)) { + if (have_gil) { + Py_INCREF((PyObject *) memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_INCREF((PyObject *) memview); + PyGILState_Release(_gilstate); + } + } else { + __pyx_fatalerror("Acquisition count is %d (line %d)", + old_acquisition_count+1, lineno); + } + } +} +static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice, + int have_gil, int lineno) { + __pyx_nonatomic_int_type old_acquisition_count; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (unlikely(!memview || (PyObject *) memview == Py_None)) { + memslice->memview = NULL; + return; + } + old_acquisition_count = __pyx_sub_acquisition_count(memview); + memslice->data = NULL; + if (likely(old_acquisition_count > 1)) { + memslice->memview = NULL; + } else if (likely(old_acquisition_count == 1)) { + if (have_gil) { + Py_CLEAR(memslice->memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_CLEAR(memslice->memview); + PyGILState_Release(_gilstate); + } + } else { + __pyx_fatalerror("Acquisition count is %d (line %d)", + old_acquisition_count-1, lineno); + } +} + +/* MemviewSliceIsContig */ +static int +__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) +{ + int i, index, step, start; + Py_ssize_t itemsize = mvs.memview->view.itemsize; + if (order == 'F') { + step = 1; + start = 0; + } else { + step = -1; + start = ndim - 1; + } + for (i = 0; i < ndim; i++) { + index = start + step * i; + if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) + return 0; + itemsize *= mvs.shape[index]; + } + return 1; +} + +/* OverlappingSlices */ +static void +__pyx_get_array_memory_extents(__Pyx_memviewslice *slice, + void **out_start, void **out_end, + int ndim, size_t itemsize) +{ + char *start, *end; + int i; + start = end = slice->data; + for (i = 0; i < ndim; i++) { + Py_ssize_t stride = slice->strides[i]; + Py_ssize_t extent = slice->shape[i]; + if (extent == 0) { + *out_start = *out_end = start; + return; + } else { + if (stride > 0) + end += stride * (extent - 1); + else + start += stride * (extent - 1); + } + } + *out_start = start; + *out_end = end + itemsize; +} +static int +__pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize) +{ + void *start1, *end1, *start2, *end2; + __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); + __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); + return (start1 < end2) && (start2 < end1); +} + +/* MemviewSliceInit */ +static int +__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference) +{ + __Pyx_RefNannyDeclarations + int i, retval=-1; + Py_buffer *buf = &memview->view; + __Pyx_RefNannySetupContext("init_memviewslice", 0); + if (unlikely(memviewslice->memview || memviewslice->data)) { + PyErr_SetString(PyExc_ValueError, + "memviewslice is already initialized!"); + goto fail; + } + if (buf->strides) { + for (i = 0; i < ndim; i++) { + memviewslice->strides[i] = buf->strides[i]; + } + } else { + Py_ssize_t stride = buf->itemsize; + for (i = ndim - 1; i >= 0; i--) { + memviewslice->strides[i] = stride; + stride *= buf->shape[i]; + } + } + for (i = 0; i < ndim; i++) { + memviewslice->shape[i] = buf->shape[i]; + if (buf->suboffsets) { + memviewslice->suboffsets[i] = buf->suboffsets[i]; + } else { + memviewslice->suboffsets[i] = -1; + } + } + memviewslice->memview = memview; + memviewslice->data = (char *)buf->buf; + if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { + Py_INCREF((PyObject*)memview); + } + retval = 0; + goto no_fail; +fail: + memviewslice->memview = 0; + memviewslice->data = 0; + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* IsLittleEndian (used by BufferFormatCheck) */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck (used by MemviewSliceValidateAndInit) */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + const __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparsable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) { + CYTHON_UNUSED_VAR(is_complex); + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) { + CYTHON_UNUSED_VAR(is_complex); + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + const __Pyx_StructField* field = ctx->head->field; + const __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + const __Pyx_StructField* field = ctx->head->field; + const __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static int +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return -1; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return -1; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + return -1; + } + if (*ts != ',' && *ts != ')') { + PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + return -1; + } + if (*ts == ',') ts++; + i++; + } + if (i != ndim) { + PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + return -1; + } + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return -1; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return 0; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* TypeInfoCompare (used by MemviewSliceValidateAndInit) */ + static int + __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b) + { + int i; + if (!a || !b) + return 0; + if (a == b) + return 1; + if (a->size != b->size || a->typegroup != b->typegroup || + a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { + if (a->typegroup == 'H' || b->typegroup == 'H') { + return a->size == b->size; + } else { + return 0; + } + } + if (a->ndim) { + for (i = 0; i < a->ndim; i++) + if (a->arraysize[i] != b->arraysize[i]) + return 0; + } + if (a->typegroup == 'S') { + if (a->flags != b->flags) + return 0; + if (a->fields || b->fields) { + if (!(a->fields && b->fields)) + return 0; + for (i = 0; a->fields[i].type && b->fields[i].type; i++) { + const __Pyx_StructField *field_a = a->fields + i; + const __Pyx_StructField *field_b = b->fields + i; + if (field_a->offset != field_b->offset || + !__pyx_typeinfo_cmp(field_a->type, field_b->type)) + return 0; + } + return !a->fields[i].type && !b->fields[i].type; + } + } + return 1; + } + +/* MemviewSliceValidateAndInit (used by ObjectToMemviewSlice) */ + static int + __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) + { + if (buf->shape[dim] <= 1) + return 1; + if (buf->strides) { + if (spec & __Pyx_MEMVIEW_CONTIG) { + if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { + if (unlikely(buf->strides[dim] != sizeof(void *))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly contiguous " + "in dimension %d.", dim); + goto fail; + } + } else if (unlikely(buf->strides[dim] != buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_FOLLOW) { + Py_ssize_t stride = buf->strides[dim]; + if (stride < 0) + stride = -stride; + if (unlikely(stride < buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + } else { + if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not contiguous in " + "dimension %d", dim); + goto fail; + } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not indirect in " + "dimension %d", dim); + goto fail; + } else if (unlikely(buf->suboffsets)) { + PyErr_SetString(PyExc_ValueError, + "Buffer exposes suboffsets but no strides"); + goto fail; + } + } + return 1; + fail: + return 0; + } + static int + __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec) + { + CYTHON_UNUSED_VAR(ndim); + if (spec & __Pyx_MEMVIEW_DIRECT) { + if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { + PyErr_Format(PyExc_ValueError, + "Buffer not compatible with direct access " + "in dimension %d.", dim); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_PTR) { + if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly accessible " + "in dimension %d.", dim); + goto fail; + } + } + return 1; + fail: + return 0; + } + static int + __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) + { + int i; + if (c_or_f_flag & __Pyx_IS_F_CONTIG) { + Py_ssize_t stride = 1; + for (i = 0; i < ndim; i++) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not fortran contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { + Py_ssize_t stride = 1; + for (i = ndim - 1; i >- 1; i--) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not C contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } + return 1; + fail: + return 0; + } + static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + const __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj) + { + struct __pyx_memoryview_obj *memview, *new_memview; + __Pyx_RefNannyDeclarations + Py_buffer *buf; + int i, spec = 0, retval = -1; + __Pyx_BufFmt_Context ctx; + int from_memoryview = __pyx_memoryview_check(original_obj); + __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); + if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) + original_obj)->typeinfo)) { + memview = (struct __pyx_memoryview_obj *) original_obj; + new_memview = NULL; + } else { + memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + original_obj, buf_flags, 0, dtype); + new_memview = memview; + if (unlikely(!memview)) + goto fail; + } + buf = &memview->view; + if (unlikely(buf->ndim != ndim)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + ndim, buf->ndim); + goto fail; + } + if (new_memview) { + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; + } + if (unlikely((unsigned) buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " + "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", + buf->itemsize, + (buf->itemsize > 1) ? "s" : "", + dtype->name, + dtype->size, + (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->len > 0) { + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) + goto fail; + if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) + goto fail; + } + if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) + goto fail; + } + if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, + new_memview != NULL) == -1)) { + goto fail; + } + retval = 0; + goto no_fail; + fail: + Py_XDECREF((PyObject*)new_memview); + retval = -1; + no_fail: + __Pyx_RefNannyFinishContext(); + return retval; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int64_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; + __pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; + } + +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } + #endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif + #endif + +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } + #endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif + #endif + +/* Declarations */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return ::std::complex< long double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + return x + y*(__pyx_t_long_double_complex)_Complex_I; + } + #endif + #else + static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { + __pyx_t_long_double_complex z; + z.real = x; + z.imag = y; + return z; + } + #endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus) + #else + static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsl(b.real) >= fabsl(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + long double r = b.imag / b.real; + long double s = (long double)(1.0) / (b.real + b.imag * r); + return __pyx_t_long_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + long double r = b.real / b.imag; + long double s = (long double)(1.0) / (b.imag + b.real * r); + return __pyx_t_long_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + if (b.imag == 0) { + return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + long double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_long_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) { + __pyx_t_long_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtl(z.real*z.real + z.imag*z.imag); + #else + return hypotl(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) { + __pyx_t_long_double_complex z; + long double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + long double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_long__double(a, a); + case 3: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, a); + case 4: + z = __Pyx_c_prod_long__double(a, a); + return __Pyx_c_prod_long__double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if ((b.imag == 0) && (a.real >= 0)) { + z.real = powl(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2l(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_long__double(a); + theta = atan2l(a.imag, a.real); + } + lnr = logl(r); + z_r = expl(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosl(z_theta); + z.imag = z_r * sinl(z_theta); + return z; + } + #endif + #endif + +/* MemviewSliceCopy */ + static __Pyx_memviewslice + __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object) + { + __Pyx_RefNannyDeclarations + int i; + __Pyx_memviewslice new_mvs = __Pyx_MEMSLICE_INIT; + struct __pyx_memoryview_obj *from_memview = from_mvs->memview; + Py_buffer *buf = &from_memview->view; + PyObject *shape_tuple = NULL; + PyObject *temp_int = NULL; + struct __pyx_array_obj *array_obj = NULL; + struct __pyx_memoryview_obj *memview_obj = NULL; + __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); + for (i = 0; i < ndim; i++) { + if (unlikely(from_mvs->suboffsets[i] >= 0)) { + PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " + "indirect dimensions (axis %d)", i); + goto fail; + } + } + shape_tuple = PyTuple_New(ndim); + if (unlikely(!shape_tuple)) { + goto fail; + } + __Pyx_GOTREF(shape_tuple); + for(i = 0; i < ndim; i++) { + temp_int = PyLong_FromSsize_t(from_mvs->shape[i]); + if(unlikely(!temp_int)) { + goto fail; + } else { + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(shape_tuple, i, temp_int); + #else + if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) { + goto fail; + } + #endif + temp_int = NULL; + } + } + array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL); + if (unlikely(!array_obj)) { + goto fail; + } + __Pyx_GOTREF(array_obj); + memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + (PyObject *) array_obj, contig_flag, + dtype_is_object, + from_mvs->memview->typeinfo); + if (unlikely(!memview_obj)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) + goto fail; + if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, + dtype_is_object) < 0)) + goto fail; + goto no_fail; + fail: + __Pyx_XDECREF((PyObject *) new_mvs.memview); + new_mvs.memview = NULL; + new_mvs.data = NULL; + no_fail: + __Pyx_XDECREF(shape_tuple); + __Pyx_XDECREF(temp_int); + __Pyx_XDECREF((PyObject *) array_obj); + __Pyx_RefNannyFinishContext(); + return new_mvs; + } + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const long neg_one = (long) -1, const_zero = (long) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (long) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; + } + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ + #if CYTHON_VECTORCALL + static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; + } + CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); + } + static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); + } + #else // CYTHON_VECTORCALL + CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); + } + #endif + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const long neg_one = (long) -1, const_zero = (long) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* PyObjectCall2Args */ + static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + +/* PyObjectCallMethod1 */ + #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) + static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; + } + #endif + static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); + #else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); + #endif + } + +/* UpdateUnpickledDict */ + static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; + } + static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); + } + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int neg_one = (int) -1, const_zero = (int) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (int) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; + } + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const int neg_one = (int) -1, const_zero = (int) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + #if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + #endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; + #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + #else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; + #endif + } + } + +/* CIntFromPy */ + static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) { + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wconversion" + #endif + const char neg_one = (char) -1, const_zero = (char) 0; + #ifdef __Pyx_HAS_GCC_DIAGNOSTIC + #pragma GCC diagnostic pop + #endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (char) -1; + val = __Pyx_PyLong_As_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { + #if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } + } + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } + #else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } + #endif + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } + } + #endif + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + char val; + int ret = -1; + #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } + #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); + #else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); + #endif + if (unlikely(ret)) + return (char) -1; + return val; + } + raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; + raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; + } + +/* FormatTypeName */ + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static __Pyx_TypeName + __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) + { + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__6); + } + goto done; + } + #endif + +/* GetRuntimeVersion */ + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + void __Pyx_init_runtime_version(void) { + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + } + #endif + static unsigned long __Pyx_get_runtime_version(void) { + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; + #else + return __Pyx_cached_runtime_version; + #endif + } + +/* CheckBinaryVersion */ + static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } + } + +/* NewCodeObj */ + #if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } + #elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } + #elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #endif + static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map + ) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); + done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; + } + +/* DecompressString */ + static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; + import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); + bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; + } + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + + /* MultiPhaseInitModuleState */ + #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE + #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 + #else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 + #endif + #endif + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS + #error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" + #endif + #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + #define __Pyx_ModuleStateLookup_Lock() + #define __Pyx_ModuleStateLookup_Unlock() + #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; + #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(__cplusplus) && __cplusplus >= 201103L + #include + static std::mutex __Pyx_ModuleStateLookup_mutex; + #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() + #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() + #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) + #include + static mtx_t __Pyx_ModuleStateLookup_mutex; + static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; + static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); + } + #define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(HAVE_PTHREAD_H) + #include + static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; + #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) + #elif defined(_WIN32) + #include // synchapi.h on its own doesn't work + static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; + #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) + #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) + #else + #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." + #endif + typedef struct { + int64_t id; + PyObject *module; + } __Pyx_InterpreterIdAndModule; + typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; + } __Pyx_ModuleStateLookupData; + #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; + #endif + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; + #else + static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; + #endif + static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; + } + static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; + #else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; + #endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + #endif + return result; + } + } + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); + } + #else + #define __Pyx_ModuleStateLookup_wait_until_no_readers() + #endif + static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; + } + static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; + } + static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); + #else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; + #endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); + #else + __Pyx_ModuleStateLookup_data = new_data; + #endif + __Pyx_ModuleStateLookup_Unlock(); + return result; + } + static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); + #else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; + #endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: + #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); + #else + __Pyx_ModuleStateLookup_data = data; + #endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; + } + #endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/coders/coder_impl_row_encoders.cp314-win_amd64.pyd b/sdks/python/apache_beam/coders/coder_impl_row_encoders.cp314-win_amd64.pyd new file mode 100644 index 000000000000..5ffdf984858a Binary files /dev/null and b/sdks/python/apache_beam/coders/coder_impl_row_encoders.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/coders/stream.c b/sdks/python/apache_beam/coders/stream.c new file mode 100644 index 000000000000..1fb3accba2ac --- /dev/null +++ b/sdks/python/apache_beam/coders/stream.c @@ -0,0 +1,23501 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.coders.stream", + "sources": [ + "apache_beam\\coders\\stream.pyx" + ] + }, + "module_name": "apache_beam.coders.stream" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__coders__stream +#define __PYX_HAVE_API__apache_beam__coders__stream +/* Early includes */ +#include +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/coders/stream.pyx", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream; +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream; +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write; +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all; + +/* "apache_beam/coders/stream.pxd":26 + * cdef size_t pos + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_byte(self, unsigned char val) + * cpdef write_var_int64(self, libc.stdint.int64_t v) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/stream.pxd":46 + * cdef size_t count + * + * cpdef write(self, bytes b, bint nested=*) # <<<<<<<<<<<<<< + * cpdef write_var_int64(self, libc.stdint.int64_t val) + * cpdef write_var_int32(self, libc.stdint.int64_t val) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/stream.pxd":74 + * cpdef double read_bigendian_double(self) except? -1 + * cpdef float read_bigendian_float(self) except? -1 + * cpdef bytes read_all(self, bint nested=*) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value) +*/ +struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all { + int __pyx_n; + int nested; +}; + +/* "apache_beam/coders/stream.pxd":21 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * cdef char* data + * cdef size_t buffer_size +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtab; + char *data; + size_t buffer_size; + size_t pos; +}; + + +/* "apache_beam/coders/stream.pxd":43 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * cdef size_t count + * +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t count; +}; + + +/* "apache_beam/coders/stream.pxd":58 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * cdef size_t pos + * cdef bytes all +*/ +struct __pyx_obj_11apache_beam_6coders_6stream_InputStream { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtab; + size_t pos; + PyObject *all; + char *allc; +}; + + + +/* "apache_beam/coders/stream.pyx":27 + * + * + * cdef class OutputStream(object): # <<<<<<<<<<<<<< + * """An output string stream implementation supporting write() and get().""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream { + PyObject *(*write)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args); + PyObject *(*write_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch); + PyObject *(*write_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, int __pyx_skip_dispatch); + PyObject *(*write_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, float, int __pyx_skip_dispatch); + PyObject *(*get)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + size_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); + PyObject *(*extend)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, size_t); + PyObject *(*_clear)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream; + + +/* "apache_beam/coders/stream.pyx":138 + * + * + * cdef class ByteCountingOutputStream(OutputStream): # <<<<<<<<<<<<<< + * """An output string stream implementation that only counts the bytes. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream { + struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream __pyx_base; + size_t (*get_count)(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream; + + +/* "apache_beam/coders/stream.pyx":191 + * + * + * cdef class InputStream(object): # <<<<<<<<<<<<<< + * """An input string stream implementation supporting read() and size().""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream { + Py_ssize_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, size_t, int __pyx_skip_dispatch); + long (*read_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_var_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int64_t (*read_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + uint64_t (*read_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int32_t (*read_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + int16_t (*read_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + double (*read_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + float (*read_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch); + PyObject *(*read_all)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto (used by CIntToPyUnicode) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto (used by CIntToPyUnicode) */ +#include + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_size_t(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_size_t(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_size_t(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyRuntimeError_Check.proto */ +#define __Pyx_PyExc_RuntimeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeError) + +/* PyErrExceptionMatches.proto (used by GetAttr3) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto (used by GetModuleGlobalName) */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int16_t __Pyx_PyLong_As_int16_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, unsigned char __pyx_v_val, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, uint64_t __pyx_v_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int32_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int16_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, double __pyx_v_d, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, float __pyx_v_f, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_get(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static size_t __pyx_f_11apache_beam_6coders_6stream_12OutputStream_size(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_extend(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, size_t __pyx_v_missing); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream__clear(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED unsigned char __pyx_v__, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int64_t __pyx_v__, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED uint64_t __pyx_v__, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int32_t __pyx_v__, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int16_t __pyx_v__, int __pyx_skip_dispatch); /* proto*/ +static size_t __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get_count(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_11InputStream_read(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, size_t __pyx_v_size, int __pyx_skip_dispatch); /* proto*/ +static long __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_byte(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static Py_ssize_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_size(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_all(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args); /* proto*/ +static int64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int32_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static uint64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int32_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int16_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static double __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static float __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "apache_beam.coders.stream" */ +static int64_t __pyx_f_11apache_beam_6coders_6stream_get_varint_size(int64_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream___pyx_unpickle_InputStream__set_state(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.coders.stream" +extern int __pyx_module_is_main_apache_beam__coders__stream; +int __pyx_module_is_main_apache_beam__coders__stream = 0; + +/* Implementation of "apache_beam.coders.stream" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_all_allc_pos[] = "all, allc, pos"; +static const char __pyx_k_Compiled_version_of_the_Stream_o[] = "Compiled version of the Stream objects used by CoderImpl.\n\nFor internal use only; no backwards-compatibility guarantees.\n"; +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_6coders_6stream_12OutputStream___cinit__(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static void __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_2__dealloc__(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_4write(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_6write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, unsigned char __pyx_v_val); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_8write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_10write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_12write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_14write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, uint64_t __pyx_v_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_16write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int32_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_18write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int16_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_20write_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, double __pyx_v_d); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_22write_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, float __pyx_v_f); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_24get(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_26size(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_28_clear(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream___cinit__(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_2write(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_4write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_6write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_8write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, unsigned char __pyx_v__); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_10write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v__); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_12write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, uint64_t __pyx_v__); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_14write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int32_t __pyx_v__); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_16write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int16_t __pyx_v__); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_18get_count(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_20get(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_22__str__(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_6coders_6stream_11InputStream___init__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, PyObject *__pyx_v_all); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_2read(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, size_t __pyx_v_size); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_4read_byte(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_6size(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_8read_all(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_v_nested); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_10read_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_12read_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_14read_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_16read_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_18read_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_20read_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_22read_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_24read_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_26__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_28__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_get_varint_size(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_2__pyx_unpickle_InputStream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_OutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_ByteCountingOutputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_InputStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_6coders_6stream_OutputStream; + PyObject *__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream; + PyObject *__pyx_type_11apache_beam_6coders_6stream_InputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_OutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream; + PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_InputStream; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[43]; + PyObject *__pyx_string_tab[170]; + PyObject *__pyx_number_tab[2]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[0] +#define __pyx_kp_u_OutputStream_malloc_failed __pyx_string_tab[1] +#define __pyx_kp_u_OutputStream_realloc_failed __pyx_string_tab[2] +#define __pyx_kp_u_VarInt_not_terminated __pyx_string_tab[3] +#define __pyx_kp_u_VarLong_too_long __pyx_string_tab[4] +#define __pyx_kp_u__2 __pyx_string_tab[5] +#define __pyx_kp_u__3 __pyx_string_tab[6] +#define __pyx_kp_u__4 __pyx_string_tab[7] +#define __pyx_kp_u__5 __pyx_string_tab[8] +#define __pyx_kp_u_add_note __pyx_string_tab[9] +#define __pyx_kp_u_apache_beam_coders_stream_pyx __pyx_string_tab[10] +#define __pyx_kp_u_disable __pyx_string_tab[11] +#define __pyx_kp_u_enable __pyx_string_tab[12] +#define __pyx_kp_u_gc __pyx_string_tab[13] +#define __pyx_kp_u_isenabled __pyx_string_tab[14] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[15] +#define __pyx_kp_u_stringsource __pyx_string_tab[16] +#define __pyx_n_u_ __pyx_string_tab[17] +#define __pyx_n_u_ByteCountingOutputStream __pyx_string_tab[18] +#define __pyx_n_u_ByteCountingOutputStream___reduc __pyx_string_tab[19] +#define __pyx_n_u_ByteCountingOutputStream___setst __pyx_string_tab[20] +#define __pyx_n_u_ByteCountingOutputStream_get __pyx_string_tab[21] +#define __pyx_n_u_ByteCountingOutputStream_get_cou __pyx_string_tab[22] +#define __pyx_n_u_ByteCountingOutputStream_write __pyx_string_tab[23] +#define __pyx_n_u_ByteCountingOutputStream_write_b __pyx_string_tab[24] +#define __pyx_n_u_ByteCountingOutputStream_write_b_2 __pyx_string_tab[25] +#define __pyx_n_u_ByteCountingOutputStream_write_b_3 __pyx_string_tab[26] +#define __pyx_n_u_ByteCountingOutputStream_write_b_4 __pyx_string_tab[27] +#define __pyx_n_u_ByteCountingOutputStream_write_b_5 __pyx_string_tab[28] +#define __pyx_n_u_ByteCountingOutputStream_write_v __pyx_string_tab[29] +#define __pyx_n_u_ByteCountingOutputStream_write_v_2 __pyx_string_tab[30] +#define __pyx_n_u_InputStream __pyx_string_tab[31] +#define __pyx_n_u_InputStream___reduce_cython __pyx_string_tab[32] +#define __pyx_n_u_InputStream___setstate_cython __pyx_string_tab[33] +#define __pyx_n_u_InputStream_read __pyx_string_tab[34] +#define __pyx_n_u_InputStream_read_all __pyx_string_tab[35] +#define __pyx_n_u_InputStream_read_bigendian_doubl __pyx_string_tab[36] +#define __pyx_n_u_InputStream_read_bigendian_float __pyx_string_tab[37] +#define __pyx_n_u_InputStream_read_bigendian_int16 __pyx_string_tab[38] +#define __pyx_n_u_InputStream_read_bigendian_int32 __pyx_string_tab[39] +#define __pyx_n_u_InputStream_read_bigendian_int64 __pyx_string_tab[40] +#define __pyx_n_u_InputStream_read_bigendian_uint6 __pyx_string_tab[41] +#define __pyx_n_u_InputStream_read_byte __pyx_string_tab[42] +#define __pyx_n_u_InputStream_read_var_int32 __pyx_string_tab[43] +#define __pyx_n_u_InputStream_read_var_int64 __pyx_string_tab[44] +#define __pyx_n_u_InputStream_size __pyx_string_tab[45] +#define __pyx_n_u_OutputStream __pyx_string_tab[46] +#define __pyx_n_u_OutputStream___reduce_cython __pyx_string_tab[47] +#define __pyx_n_u_OutputStream___setstate_cython __pyx_string_tab[48] +#define __pyx_n_u_OutputStream__clear __pyx_string_tab[49] +#define __pyx_n_u_OutputStream_get __pyx_string_tab[50] +#define __pyx_n_u_OutputStream_size __pyx_string_tab[51] +#define __pyx_n_u_OutputStream_write __pyx_string_tab[52] +#define __pyx_n_u_OutputStream_write_bigendian_dou __pyx_string_tab[53] +#define __pyx_n_u_OutputStream_write_bigendian_flo __pyx_string_tab[54] +#define __pyx_n_u_OutputStream_write_bigendian_int __pyx_string_tab[55] +#define __pyx_n_u_OutputStream_write_bigendian_int_2 __pyx_string_tab[56] +#define __pyx_n_u_OutputStream_write_bigendian_int_3 __pyx_string_tab[57] +#define __pyx_n_u_OutputStream_write_bigendian_uin __pyx_string_tab[58] +#define __pyx_n_u_OutputStream_write_byte __pyx_string_tab[59] +#define __pyx_n_u_OutputStream_write_var_int32 __pyx_string_tab[60] +#define __pyx_n_u_OutputStream_write_var_int64 __pyx_string_tab[61] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[62] +#define __pyx_n_u_all __pyx_string_tab[63] +#define __pyx_n_u_apache_beam_coders_stream __pyx_string_tab[64] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[65] +#define __pyx_n_u_b __pyx_string_tab[66] +#define __pyx_n_u_class __pyx_string_tab[67] +#define __pyx_n_u_clear __pyx_string_tab[68] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[69] +#define __pyx_n_u_d __pyx_string_tab[70] +#define __pyx_n_u_dict __pyx_string_tab[71] +#define __pyx_n_u_dict_2 __pyx_string_tab[72] +#define __pyx_n_u_f __pyx_string_tab[73] +#define __pyx_n_u_func __pyx_string_tab[74] +#define __pyx_n_u_get __pyx_string_tab[75] +#define __pyx_n_u_get_count __pyx_string_tab[76] +#define __pyx_n_u_get_varint_size __pyx_string_tab[77] +#define __pyx_n_u_getstate __pyx_string_tab[78] +#define __pyx_n_u_is_coroutine __pyx_string_tab[79] +#define __pyx_n_u_items __pyx_string_tab[80] +#define __pyx_n_u_main __pyx_string_tab[81] +#define __pyx_n_u_module __pyx_string_tab[82] +#define __pyx_n_u_name __pyx_string_tab[83] +#define __pyx_n_u_nested __pyx_string_tab[84] +#define __pyx_n_u_new __pyx_string_tab[85] +#define __pyx_n_u_pop __pyx_string_tab[86] +#define __pyx_n_u_pyx_capi __pyx_string_tab[87] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[88] +#define __pyx_n_u_pyx_result __pyx_string_tab[89] +#define __pyx_n_u_pyx_state __pyx_string_tab[90] +#define __pyx_n_u_pyx_type __pyx_string_tab[91] +#define __pyx_n_u_pyx_unpickle_InputStream __pyx_string_tab[92] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[93] +#define __pyx_n_u_qualname __pyx_string_tab[94] +#define __pyx_n_u_read __pyx_string_tab[95] +#define __pyx_n_u_read_all __pyx_string_tab[96] +#define __pyx_n_u_read_bigendian_double __pyx_string_tab[97] +#define __pyx_n_u_read_bigendian_float __pyx_string_tab[98] +#define __pyx_n_u_read_bigendian_int16 __pyx_string_tab[99] +#define __pyx_n_u_read_bigendian_int32 __pyx_string_tab[100] +#define __pyx_n_u_read_bigendian_int64 __pyx_string_tab[101] +#define __pyx_n_u_read_bigendian_uint64 __pyx_string_tab[102] +#define __pyx_n_u_read_byte __pyx_string_tab[103] +#define __pyx_n_u_read_var_int32 __pyx_string_tab[104] +#define __pyx_n_u_read_var_int64 __pyx_string_tab[105] +#define __pyx_n_u_reduce __pyx_string_tab[106] +#define __pyx_n_u_reduce_cython __pyx_string_tab[107] +#define __pyx_n_u_reduce_ex __pyx_string_tab[108] +#define __pyx_n_u_self __pyx_string_tab[109] +#define __pyx_n_u_set_name __pyx_string_tab[110] +#define __pyx_n_u_setdefault __pyx_string_tab[111] +#define __pyx_n_u_setstate __pyx_string_tab[112] +#define __pyx_n_u_setstate_cython __pyx_string_tab[113] +#define __pyx_n_u_signed_v __pyx_string_tab[114] +#define __pyx_n_u_size __pyx_string_tab[115] +#define __pyx_n_u_state __pyx_string_tab[116] +#define __pyx_n_u_test __pyx_string_tab[117] +#define __pyx_n_u_update __pyx_string_tab[118] +#define __pyx_n_u_use_setstate __pyx_string_tab[119] +#define __pyx_n_u_v __pyx_string_tab[120] +#define __pyx_n_u_val __pyx_string_tab[121] +#define __pyx_n_u_value __pyx_string_tab[122] +#define __pyx_n_u_values __pyx_string_tab[123] +#define __pyx_n_u_write __pyx_string_tab[124] +#define __pyx_n_u_write_bigendian_double __pyx_string_tab[125] +#define __pyx_n_u_write_bigendian_float __pyx_string_tab[126] +#define __pyx_n_u_write_bigendian_int16 __pyx_string_tab[127] +#define __pyx_n_u_write_bigendian_int32 __pyx_string_tab[128] +#define __pyx_n_u_write_bigendian_int64 __pyx_string_tab[129] +#define __pyx_n_u_write_bigendian_uint64 __pyx_string_tab[130] +#define __pyx_n_u_write_byte __pyx_string_tab[131] +#define __pyx_n_u_write_var_int32 __pyx_string_tab[132] +#define __pyx_n_u_write_var_int64 __pyx_string_tab[133] +#define __pyx_kp_b_int64_t_int64_t_int___pyx_skip_d __pyx_string_tab[134] +#define __pyx_kp_b_iso88591_1_1_Q_t1 __pyx_string_tab[135] +#define __pyx_kp_b_iso88591_1_4q __pyx_string_tab[136] +#define __pyx_kp_b_iso88591_2_d_q_HG1G1A __pyx_string_tab[137] +#define __pyx_kp_b_iso88591_4A_t_IWAXQa __pyx_string_tab[138] +#define __pyx_kp_b_iso88591_4_Q __pyx_string_tab[139] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[140] +#define __pyx_kp_b_iso88591_4uAT_b_t1 __pyx_string_tab[141] +#define __pyx_kp_b_iso88591_4uAYd_4uA __pyx_string_tab[142] +#define __pyx_kp_b_iso88591_4uBd __pyx_string_tab[143] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[144] +#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[145] +#define __pyx_kp_b_iso88591_A_3at6_4q __pyx_string_tab[146] +#define __pyx_kp_b_iso88591_B_O4uAT_b_oT_at5_T_oT_at5_S_oT __pyx_string_tab[147] +#define __pyx_kp_b_iso88591_M_4uBa_Qd __pyx_string_tab[148] +#define __pyx_kp_b_iso88591_M_4uBa_Qd_b_1_Qd_r_b_1_Qd_r_b_1 __pyx_string_tab[149] +#define __pyx_kp_b_iso88591_M_4uBa_Qd_b_A_Qd_r_a __pyx_string_tab[150] +#define __pyx_kp_b_iso88591_O4uAT_b_oT_at5_T __pyx_string_tab[151] +#define __pyx_kp_b_iso88591_O4uAT_b_oT_at5_T_oT_at5_S_oT_at __pyx_string_tab[152] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[153] +#define __pyx_kp_b_iso88591_T_at1_uCq_Q_a_a_U_A_r_1_1_2Rs_e __pyx_string_tab[154] +#define __pyx_kp_b_iso88591_T_t7_a_G1F_a_vWE_Q_q_t5_q_q_D_7 __pyx_string_tab[155] +#define __pyx_kp_b_iso88591__6 __pyx_string_tab[156] +#define __pyx_kp_b_iso88591__7 __pyx_string_tab[157] +#define __pyx_kp_b_iso88591__8 __pyx_string_tab[158] +#define __pyx_kp_b_iso88591__9 __pyx_string_tab[159] +#define __pyx_kp_b_iso88591_a_7_e1D_Rq __pyx_string_tab[160] +#define __pyx_kp_b_iso88591_b_6gQb __pyx_string_tab[161] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[162] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1 __pyx_string_tab[163] +#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[164] +#define __pyx_kp_b_iso88591_r_E_T_b_M_1_q_HA_Rr_A_QoQ_Q __pyx_string_tab[165] +#define __pyx_kp_b_iso88591_s_1_q_1 __pyx_string_tab[166] +#define __pyx_kp_b_iso88591_s_1_q_1_t_e2Q_at6_4vWCq __pyx_string_tab[167] +#define __pyx_kp_b_iso88591_t_e2Q_Qd_b_1_Qd_r_b_1_Qd_r_b_A __pyx_string_tab[168] +#define __pyx_kp_b_iso88591_y_A_O1A __pyx_string_tab[169] +#define __pyx_int_189221681 __pyx_number_tab[0] +#define __pyx_int_4294967295 __pyx_number_tab[1] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_6stream_OutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_6coders_6stream_InputStream); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<43; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<170; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_6stream_OutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_6coders_6stream_InputStream); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<43; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<170; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/coders/stream.pyx":32 + * #TODO(robertwb): Consider using raw C++ streams. + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.buffer_size = 1024 + * self.pos = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream___cinit__(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_6stream_12OutputStream___cinit__(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/coders/stream.pyx":33 + * + * def __cinit__(self): + * self.buffer_size = 1024 # <<<<<<<<<<<<<< + * self.pos = 0 + * self.data = libc.stdlib.malloc(self.buffer_size) +*/ + __pyx_v_self->buffer_size = 0x400; + + /* "apache_beam/coders/stream.pyx":34 + * def __cinit__(self): + * self.buffer_size = 1024 + * self.pos = 0 # <<<<<<<<<<<<<< + * self.data = libc.stdlib.malloc(self.buffer_size) + * assert self.data, "OutputStream malloc failed." +*/ + __pyx_v_self->pos = 0; + + /* "apache_beam/coders/stream.pyx":35 + * self.buffer_size = 1024 + * self.pos = 0 + * self.data = libc.stdlib.malloc(self.buffer_size) # <<<<<<<<<<<<<< + * assert self.data, "OutputStream malloc failed." + * +*/ + __pyx_v_self->data = ((char *)malloc(__pyx_v_self->buffer_size)); + + /* "apache_beam/coders/stream.pyx":36 + * self.pos = 0 + * self.data = libc.stdlib.malloc(self.buffer_size) + * assert self.data, "OutputStream malloc failed." # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->data != 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_OutputStream_malloc_failed, 0, 0); + __PYX_ERR(0, 36, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 36, __pyx_L1_error) + #endif + + /* "apache_beam/coders/stream.pyx":32 + * #TODO(robertwb): Consider using raw C++ streams. + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.buffer_size = 1024 + * self.pos = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":38 + * assert self.data, "OutputStream malloc failed." + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.data: + * libc.stdlib.free(self.data) +*/ + +/* Python wrapper */ +static void __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_2__dealloc__(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_2__dealloc__(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + int __pyx_t_1; + + /* "apache_beam/coders/stream.pyx":39 + * + * def __dealloc__(self): + * if self.data: # <<<<<<<<<<<<<< + * libc.stdlib.free(self.data) + * +*/ + __pyx_t_1 = (__pyx_v_self->data != 0); + if (__pyx_t_1) { + + /* "apache_beam/coders/stream.pyx":40 + * def __dealloc__(self): + * if self.data: + * libc.stdlib.free(self.data) # <<<<<<<<<<<<<< + * + * cpdef write(self, bytes b, bint nested=False): +*/ + free(__pyx_v_self->data); + + /* "apache_beam/coders/stream.pyx":39 + * + * def __dealloc__(self): + * if self.data: # <<<<<<<<<<<<<< + * libc.stdlib.free(self.data) + * +*/ + } + + /* "apache_beam/coders/stream.pyx":38 + * assert self.data, "OutputStream malloc failed." + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.data: + * libc.stdlib.free(self.data) +*/ + + /* function exit code */ +} + +/* "apache_beam/coders/stream.pyx":42 + * libc.stdlib.free(self.data) + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_5write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + size_t __pyx_v_blen; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + char *__pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_5write)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":43 + * + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) # <<<<<<<<<<<<<< + * if nested: + * self.write_var_int64(blen) +*/ + if (unlikely(__pyx_v_b == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_v_blen = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":44 + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) + * if nested: # <<<<<<<<<<<<<< + * self.write_var_int64(blen) + * if self.buffer_size < self.pos + blen: +*/ + if (__pyx_v_nested) { + + /* "apache_beam/coders/stream.pyx":45 + * cdef size_t blen = len(b) + * if nested: + * self.write_var_int64(blen) # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + blen: + * self.extend(blen) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_var_int64(__pyx_v_self, __pyx_v_blen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":44 + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) + * if nested: # <<<<<<<<<<<<<< + * self.write_var_int64(blen) + * if self.buffer_size < self.pos + blen: +*/ + } + + /* "apache_beam/coders/stream.pyx":46 + * if nested: + * self.write_var_int64(blen) + * if self.buffer_size < self.pos + blen: # <<<<<<<<<<<<<< + * self.extend(blen) + * libc.string.memcpy(self.data + self.pos, b, blen) +*/ + __pyx_t_8 = (__pyx_v_self->buffer_size < (__pyx_v_self->pos + __pyx_v_blen)); + if (__pyx_t_8) { + + /* "apache_beam/coders/stream.pyx":47 + * self.write_var_int64(blen) + * if self.buffer_size < self.pos + blen: + * self.extend(blen) # <<<<<<<<<<<<<< + * libc.string.memcpy(self.data + self.pos, b, blen) + * self.pos += blen +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->extend(__pyx_v_self, __pyx_v_blen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":46 + * if nested: + * self.write_var_int64(blen) + * if self.buffer_size < self.pos + blen: # <<<<<<<<<<<<<< + * self.extend(blen) + * libc.string.memcpy(self.data + self.pos, b, blen) +*/ + } + + /* "apache_beam/coders/stream.pyx":48 + * if self.buffer_size < self.pos + blen: + * self.extend(blen) + * libc.string.memcpy(self.data + self.pos, b, blen) # <<<<<<<<<<<<<< + * self.pos += blen + * +*/ + if (unlikely(__pyx_v_b == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 48, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error) + (void)(memcpy((__pyx_v_self->data + __pyx_v_self->pos), ((char *)__pyx_t_9), __pyx_v_blen)); + + /* "apache_beam/coders/stream.pyx":49 + * self.extend(blen) + * libc.string.memcpy(self.data + self.pos, b, blen) + * self.pos += blen # <<<<<<<<<<<<<< + * + * cpdef write_byte(self, unsigned char val): +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + __pyx_v_blen); + + /* "apache_beam/coders/stream.pyx":42 + * libc.stdlib.free(self.data) + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_5write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_5write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_5write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_5write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_b = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 42, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 42, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 42, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(0, 42, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 0, 1, 2, i); __PYX_ERR(0, 42, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 42, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 42, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_b = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 42, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), (&PyBytes_Type), 1, "b", 1))) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_4write(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_b, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_4write(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream->write(__pyx_v_self, __pyx_v_b, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":51 + * self.pos += blen + * + * cpdef write_byte(self, unsigned char val): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 1: + * self.extend(1) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_7write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, unsigned char __pyx_v_val, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_byte", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_7write_byte)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_unsigned_char(__pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":52 + * + * cpdef write_byte(self, unsigned char val): + * if self.buffer_size < self.pos + 1: # <<<<<<<<<<<<<< + * self.extend(1) + * self.data[self.pos] = val +*/ + __pyx_t_7 = (__pyx_v_self->buffer_size < (__pyx_v_self->pos + 1)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":53 + * cpdef write_byte(self, unsigned char val): + * if self.buffer_size < self.pos + 1: + * self.extend(1) # <<<<<<<<<<<<<< + * self.data[self.pos] = val + * self.pos += 1 +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->extend(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":52 + * + * cpdef write_byte(self, unsigned char val): + * if self.buffer_size < self.pos + 1: # <<<<<<<<<<<<<< + * self.extend(1) + * self.data[self.pos] = val +*/ + } + + /* "apache_beam/coders/stream.pyx":54 + * if self.buffer_size < self.pos + 1: + * self.extend(1) + * self.data[self.pos] = val # <<<<<<<<<<<<<< + * self.pos += 1 + * +*/ + (__pyx_v_self->data[__pyx_v_self->pos]) = __pyx_v_val; + + /* "apache_beam/coders/stream.pyx":55 + * self.extend(1) + * self.data[self.pos] = val + * self.pos += 1 # <<<<<<<<<<<<<< + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 1); + + /* "apache_beam/coders/stream.pyx":51 + * self.pos += blen + * + * cpdef write_byte(self, unsigned char val): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 1: + * self.extend(1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_7write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_7write_byte = {"write_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_7write_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_7write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + unsigned char __pyx_v_val; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_byte (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_val,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 51, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 51, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_byte", 0) < (0)) __PYX_ERR(0, 51, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_byte", 1, 1, 1, i); __PYX_ERR(0, 51, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 51, __pyx_L3_error) + } + __pyx_v_val = __Pyx_PyLong_As_unsigned_char(values[0]); if (unlikely((__pyx_v_val == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_byte", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 51, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_6write_byte(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_val); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_6write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, unsigned char __pyx_v_val) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_byte", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_byte(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":57 + * self.pos += 1 + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode a long using variable-length encoding to a stream.""" + * cdef libc.stdint.uint64_t v = signed_v +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + uint64_t __pyx_v_v; + long __pyx_v_bits; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_var_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":59 + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): + * """Encode a long using variable-length encoding to a stream.""" + * cdef libc.stdint.uint64_t v = signed_v # <<<<<<<<<<<<<< + * # Inline common case. + * if v <= 0x7F and self.pos < self.buffer_size - 1: +*/ + __pyx_v_v = __pyx_v_signed_v; + + /* "apache_beam/coders/stream.pyx":61 + * cdef libc.stdint.uint64_t v = signed_v + * # Inline common case. + * if v <= 0x7F and self.pos < self.buffer_size - 1: # <<<<<<<<<<<<<< + * self.data[self.pos] = v + * self.pos += 1 +*/ + __pyx_t_8 = (__pyx_v_v <= 0x7F); + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->pos < (__pyx_v_self->buffer_size - 1)); + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":62 + * # Inline common case. + * if v <= 0x7F and self.pos < self.buffer_size - 1: + * self.data[self.pos] = v # <<<<<<<<<<<<<< + * self.pos += 1 + * return +*/ + (__pyx_v_self->data[__pyx_v_self->pos]) = __pyx_v_v; + + /* "apache_beam/coders/stream.pyx":63 + * if v <= 0x7F and self.pos < self.buffer_size - 1: + * self.data[self.pos] = v + * self.pos += 1 # <<<<<<<<<<<<<< + * return + * +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 1); + + /* "apache_beam/coders/stream.pyx":64 + * self.data[self.pos] = v + * self.pos += 1 + * return # <<<<<<<<<<<<<< + * + * cdef long bits +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":61 + * cdef libc.stdint.uint64_t v = signed_v + * # Inline common case. + * if v <= 0x7F and self.pos < self.buffer_size - 1: # <<<<<<<<<<<<<< + * self.data[self.pos] = v + * self.pos += 1 +*/ + } + + /* "apache_beam/coders/stream.pyx":67 + * + * cdef long bits + * while True: # <<<<<<<<<<<<<< + * bits = v & 0x7F + * v >>= 7 +*/ + while (1) { + + /* "apache_beam/coders/stream.pyx":68 + * cdef long bits + * while True: + * bits = v & 0x7F # <<<<<<<<<<<<<< + * v >>= 7 + * if v: +*/ + __pyx_v_bits = (__pyx_v_v & 0x7F); + + /* "apache_beam/coders/stream.pyx":69 + * while True: + * bits = v & 0x7F + * v >>= 7 # <<<<<<<<<<<<<< + * if v: + * bits |= 0x80 +*/ + __pyx_v_v = (__pyx_v_v >> 7); + + /* "apache_beam/coders/stream.pyx":70 + * bits = v & 0x7F + * v >>= 7 + * if v: # <<<<<<<<<<<<<< + * bits |= 0x80 + * self.write_byte(bits) +*/ + __pyx_t_7 = (__pyx_v_v != 0); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":71 + * v >>= 7 + * if v: + * bits |= 0x80 # <<<<<<<<<<<<<< + * self.write_byte(bits) + * if not v: +*/ + __pyx_v_bits = (__pyx_v_bits | 0x80); + + /* "apache_beam/coders/stream.pyx":70 + * bits = v & 0x7F + * v >>= 7 + * if v: # <<<<<<<<<<<<<< + * bits |= 0x80 + * self.write_byte(bits) +*/ + } + + /* "apache_beam/coders/stream.pyx":72 + * if v: + * bits |= 0x80 + * self.write_byte(bits) # <<<<<<<<<<<<<< + * if not v: + * break +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_byte(__pyx_v_self, ((unsigned char)__pyx_v_bits), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":73 + * bits |= 0x80 + * self.write_byte(bits) + * if not v: # <<<<<<<<<<<<<< + * break + * +*/ + __pyx_t_7 = (!(__pyx_v_v != 0)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":74 + * self.write_byte(bits) + * if not v: + * break # <<<<<<<<<<<<<< + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): +*/ + goto __pyx_L7_break; + + /* "apache_beam/coders/stream.pyx":73 + * bits |= 0x80 + * self.write_byte(bits) + * if not v: # <<<<<<<<<<<<<< + * break + * +*/ + } + } + __pyx_L7_break:; + + /* "apache_beam/coders/stream.pyx":57 + * self.pos += 1 + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode a long using variable-length encoding to a stream.""" + * cdef libc.stdint.uint64_t v = signed_v +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_6stream_12OutputStream_8write_var_int64, "Encode a long using variable-length encoding to a stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64 = {"write_var_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_6stream_12OutputStream_8write_var_int64}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_var_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 57, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 57, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_var_int64", 0) < (0)) __PYX_ERR(0, 57, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_var_int64", 1, 1, 1, i); __PYX_ERR(0, 57, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 57, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_var_int64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 57, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_8write_var_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_8write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int64(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":76 + * break + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode an int using variable-length encoding to a stream.""" + * # for backward compatibility, input type is int64_t thus tolerates overflow +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + int64_t __pyx_v_v; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_var_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":79 + * """Encode an int using variable-length encoding to a stream.""" + * # for backward compatibility, input type is int64_t thus tolerates overflow + * cdef libc.stdint.int64_t v = signed_v & 0xFFFFFFFF # <<<<<<<<<<<<<< + * self.write_var_int64(v) + * +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_mstate_global->__pyx_int_4294967295); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_v = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":80 + * # for backward compatibility, input type is int64_t thus tolerates overflow + * cdef libc.stdint.int64_t v = signed_v & 0xFFFFFFFF + * self.write_var_int64(v) # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t signed_v): +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_var_int64(__pyx_v_self, __pyx_v_v, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":76 + * break + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode an int using variable-length encoding to a stream.""" + * # for backward compatibility, input type is int64_t thus tolerates overflow +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_6stream_12OutputStream_10write_var_int32, "Encode an int using variable-length encoding to a stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32 = {"write_var_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_6stream_12OutputStream_10write_var_int32}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_var_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 76, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 76, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_var_int32", 0) < (0)) __PYX_ERR(0, 76, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_var_int32", 1, 1, 1, i); __PYX_ERR(0, 76, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 76, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_var_int32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 76, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_10write_var_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_10write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int32(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":82 + * self.write_var_int64(v) + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.write_bigendian_uint64(signed_v) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":83 + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t signed_v): + * self.write_bigendian_uint64(signed_v) # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_bigendian_uint64(__pyx_v_self, __pyx_v_signed_v, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":82 + * self.write_var_int64(v) + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.write_bigendian_uint64(signed_v) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64 = {"write_bigendian_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 82, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int64", 0) < (0)) __PYX_ERR(0, 82, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int64", 1, 1, 1, i); __PYX_ERR(0, 82, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 82, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_12write_bigendian_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_12write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int64_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int64(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":85 + * self.write_bigendian_uint64(signed_v) + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 8: + * self.extend(8) +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, uint64_t __pyx_v_v, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_uint64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_uint64_t(__pyx_v_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":86 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): + * if self.buffer_size < self.pos + 8: # <<<<<<<<<<<<<< + * self.extend(8) + * self.data[self.pos ] = (v >> 56) +*/ + __pyx_t_7 = (__pyx_v_self->buffer_size < (__pyx_v_self->pos + 8)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":87 + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): + * if self.buffer_size < self.pos + 8: + * self.extend(8) # <<<<<<<<<<<<<< + * self.data[self.pos ] = (v >> 56) + * self.data[self.pos + 1] = (v >> 48) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->extend(__pyx_v_self, 8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":86 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): + * if self.buffer_size < self.pos + 8: # <<<<<<<<<<<<<< + * self.extend(8) + * self.data[self.pos ] = (v >> 56) +*/ + } + + /* "apache_beam/coders/stream.pyx":88 + * if self.buffer_size < self.pos + 8: + * self.extend(8) + * self.data[self.pos ] = (v >> 56) # <<<<<<<<<<<<<< + * self.data[self.pos + 1] = (v >> 48) + * self.data[self.pos + 2] = (v >> 40) +*/ + (__pyx_v_self->data[__pyx_v_self->pos]) = ((unsigned char)(__pyx_v_v >> 56)); + + /* "apache_beam/coders/stream.pyx":89 + * self.extend(8) + * self.data[self.pos ] = (v >> 56) + * self.data[self.pos + 1] = (v >> 48) # <<<<<<<<<<<<<< + * self.data[self.pos + 2] = (v >> 40) + * self.data[self.pos + 3] = (v >> 32) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 1)]) = ((unsigned char)(__pyx_v_v >> 48)); + + /* "apache_beam/coders/stream.pyx":90 + * self.data[self.pos ] = (v >> 56) + * self.data[self.pos + 1] = (v >> 48) + * self.data[self.pos + 2] = (v >> 40) # <<<<<<<<<<<<<< + * self.data[self.pos + 3] = (v >> 32) + * self.data[self.pos + 4] = (v >> 24) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 2)]) = ((unsigned char)(__pyx_v_v >> 40)); + + /* "apache_beam/coders/stream.pyx":91 + * self.data[self.pos + 1] = (v >> 48) + * self.data[self.pos + 2] = (v >> 40) + * self.data[self.pos + 3] = (v >> 32) # <<<<<<<<<<<<<< + * self.data[self.pos + 4] = (v >> 24) + * self.data[self.pos + 5] = (v >> 16) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 3)]) = ((unsigned char)(__pyx_v_v >> 32)); + + /* "apache_beam/coders/stream.pyx":92 + * self.data[self.pos + 2] = (v >> 40) + * self.data[self.pos + 3] = (v >> 32) + * self.data[self.pos + 4] = (v >> 24) # <<<<<<<<<<<<<< + * self.data[self.pos + 5] = (v >> 16) + * self.data[self.pos + 6] = (v >> 8) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 4)]) = ((unsigned char)(__pyx_v_v >> 24)); + + /* "apache_beam/coders/stream.pyx":93 + * self.data[self.pos + 3] = (v >> 32) + * self.data[self.pos + 4] = (v >> 24) + * self.data[self.pos + 5] = (v >> 16) # <<<<<<<<<<<<<< + * self.data[self.pos + 6] = (v >> 8) + * self.data[self.pos + 7] = (v ) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 5)]) = ((unsigned char)(__pyx_v_v >> 16)); + + /* "apache_beam/coders/stream.pyx":94 + * self.data[self.pos + 4] = (v >> 24) + * self.data[self.pos + 5] = (v >> 16) + * self.data[self.pos + 6] = (v >> 8) # <<<<<<<<<<<<<< + * self.data[self.pos + 7] = (v ) + * self.pos += 8 +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 6)]) = ((unsigned char)(__pyx_v_v >> 8)); + + /* "apache_beam/coders/stream.pyx":95 + * self.data[self.pos + 5] = (v >> 16) + * self.data[self.pos + 6] = (v >> 8) + * self.data[self.pos + 7] = (v ) # <<<<<<<<<<<<<< + * self.pos += 8 + * +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 7)]) = ((unsigned char)__pyx_v_v); + + /* "apache_beam/coders/stream.pyx":96 + * self.data[self.pos + 6] = (v >> 8) + * self.data[self.pos + 7] = (v ) + * self.pos += 8 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 8); + + /* "apache_beam/coders/stream.pyx":85 + * self.write_bigendian_uint64(signed_v) + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 8: + * self.extend(8) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64 = {"write_bigendian_uint64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + uint64_t __pyx_v_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_uint64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 85, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 85, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_uint64", 0) < (0)) __PYX_ERR(0, 85, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_uint64", 1, 1, 1, i); __PYX_ERR(0, 85, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 85, __pyx_L3_error) + } + __pyx_v_v = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_v == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_uint64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 85, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_14write_bigendian_uint64(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_14write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, uint64_t __pyx_v_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_uint64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_uint64(__pyx_v_self, __pyx_v_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":98 + * self.pos += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int32_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + uint32_t __pyx_v_v; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int32_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":99 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): + * cdef libc.stdint.uint32_t v = signed_v # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 4: + * self.extend(4) +*/ + __pyx_v_v = __pyx_v_signed_v; + + /* "apache_beam/coders/stream.pyx":100 + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: # <<<<<<<<<<<<<< + * self.extend(4) + * self.data[self.pos ] = (v >> 24) +*/ + __pyx_t_7 = (__pyx_v_self->buffer_size < (__pyx_v_self->pos + 4)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":101 + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: + * self.extend(4) # <<<<<<<<<<<<<< + * self.data[self.pos ] = (v >> 24) + * self.data[self.pos + 1] = (v >> 16) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->extend(__pyx_v_self, 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":100 + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: # <<<<<<<<<<<<<< + * self.extend(4) + * self.data[self.pos ] = (v >> 24) +*/ + } + + /* "apache_beam/coders/stream.pyx":102 + * if self.buffer_size < self.pos + 4: + * self.extend(4) + * self.data[self.pos ] = (v >> 24) # <<<<<<<<<<<<<< + * self.data[self.pos + 1] = (v >> 16) + * self.data[self.pos + 2] = (v >> 8) +*/ + (__pyx_v_self->data[__pyx_v_self->pos]) = ((unsigned char)(__pyx_v_v >> 24)); + + /* "apache_beam/coders/stream.pyx":103 + * self.extend(4) + * self.data[self.pos ] = (v >> 24) + * self.data[self.pos + 1] = (v >> 16) # <<<<<<<<<<<<<< + * self.data[self.pos + 2] = (v >> 8) + * self.data[self.pos + 3] = (v ) +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 1)]) = ((unsigned char)(__pyx_v_v >> 16)); + + /* "apache_beam/coders/stream.pyx":104 + * self.data[self.pos ] = (v >> 24) + * self.data[self.pos + 1] = (v >> 16) + * self.data[self.pos + 2] = (v >> 8) # <<<<<<<<<<<<<< + * self.data[self.pos + 3] = (v ) + * self.pos += 4 +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 2)]) = ((unsigned char)(__pyx_v_v >> 8)); + + /* "apache_beam/coders/stream.pyx":105 + * self.data[self.pos + 1] = (v >> 16) + * self.data[self.pos + 2] = (v >> 8) + * self.data[self.pos + 3] = (v ) # <<<<<<<<<<<<<< + * self.pos += 4 + * +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 3)]) = ((unsigned char)__pyx_v_v); + + /* "apache_beam/coders/stream.pyx":106 + * self.data[self.pos + 2] = (v >> 8) + * self.data[self.pos + 3] = (v ) + * self.pos += 4 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 4); + + /* "apache_beam/coders/stream.pyx":98 + * self.pos += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32 = {"write_bigendian_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int32_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 98, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 98, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int32", 0) < (0)) __PYX_ERR(0, 98, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int32", 1, 1, 1, i); __PYX_ERR(0, 98, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 98, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int32_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_16write_bigendian_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_16write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int32_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int32(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":108 + * self.pos += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int16_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + uint16_t __pyx_v_v; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int16", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int16_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":109 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): + * cdef libc.stdint.uint16_t v = signed_v # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 2: + * self.extend(2) +*/ + __pyx_v_v = __pyx_v_signed_v; + + /* "apache_beam/coders/stream.pyx":110 + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: # <<<<<<<<<<<<<< + * self.extend(2) + * self.data[self.pos ] = (v >> 8) +*/ + __pyx_t_7 = (__pyx_v_self->buffer_size < (__pyx_v_self->pos + 2)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":111 + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: + * self.extend(2) # <<<<<<<<<<<<<< + * self.data[self.pos ] = (v >> 8) + * self.data[self.pos + 1] = (v ) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->extend(__pyx_v_self, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":110 + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: # <<<<<<<<<<<<<< + * self.extend(2) + * self.data[self.pos ] = (v >> 8) +*/ + } + + /* "apache_beam/coders/stream.pyx":112 + * if self.buffer_size < self.pos + 2: + * self.extend(2) + * self.data[self.pos ] = (v >> 8) # <<<<<<<<<<<<<< + * self.data[self.pos + 1] = (v ) + * self.pos += 2 +*/ + (__pyx_v_self->data[__pyx_v_self->pos]) = ((unsigned char)(__pyx_v_v >> 8)); + + /* "apache_beam/coders/stream.pyx":113 + * self.extend(2) + * self.data[self.pos ] = (v >> 8) + * self.data[self.pos + 1] = (v ) # <<<<<<<<<<<<<< + * self.pos += 2 + * +*/ + (__pyx_v_self->data[(__pyx_v_self->pos + 1)]) = ((unsigned char)__pyx_v_v); + + /* "apache_beam/coders/stream.pyx":114 + * self.data[self.pos ] = (v >> 8) + * self.data[self.pos + 1] = (v ) + * self.pos += 2 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_double(self, double d): +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 2); + + /* "apache_beam/coders/stream.pyx":108 + * self.pos += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16 = {"write_bigendian_int16", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int16_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int16 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 108, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int16", 0) < (0)) __PYX_ERR(0, 108, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int16", 1, 1, 1, i); __PYX_ERR(0, 108, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int16_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int16", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 108, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_18write_bigendian_int16(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_18write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int16_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int16", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int16(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":116 + * self.pos += 2 + * + * cpdef write_bigendian_double(self, double d): # <<<<<<<<<<<<<< + * self.write_bigendian_int64((&d)[0]) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, double __pyx_v_d, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_double", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":117 + * + * cpdef write_bigendian_double(self, double d): + * self.write_bigendian_int64((&d)[0]) # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_float(self, float f): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_bigendian_int64(__pyx_v_self, (((int64_t *)((char *)(&__pyx_v_d)))[0]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":116 + * self.pos += 2 + * + * cpdef write_bigendian_double(self, double d): # <<<<<<<<<<<<<< + * self.write_bigendian_int64((&d)[0]) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double = {"write_bigendian_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + double __pyx_v_d; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_double (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_d,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 116, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_double", 0) < (0)) __PYX_ERR(0, 116, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_double", 1, 1, 1, i); __PYX_ERR(0, 116, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 116, __pyx_L3_error) + } + __pyx_v_d = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_d == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_double", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_20write_bigendian_double(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_d); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_20write_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, double __pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_double", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_double(__pyx_v_self, __pyx_v_d, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":119 + * self.write_bigendian_int64((&d)[0]) + * + * cpdef write_bigendian_float(self, float f): # <<<<<<<<<<<<<< + * self.write_bigendian_int32((&f)[0]) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, float __pyx_v_f, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_float", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_float); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":120 + * + * cpdef write_bigendian_float(self, float f): + * self.write_bigendian_int32((&f)[0]) # <<<<<<<<<<<<<< + * + * cpdef bytes get(self): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self->__pyx_vtab)->write_bigendian_int32(__pyx_v_self, (((int32_t *)((char *)(&__pyx_v_f)))[0]), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":119 + * self.write_bigendian_int64((&d)[0]) + * + * cpdef write_bigendian_float(self, float f): # <<<<<<<<<<<<<< + * self.write_bigendian_int32((&f)[0]) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float = {"write_bigendian_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + float __pyx_v_f; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_float (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 119, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 119, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_float", 0) < (0)) __PYX_ERR(0, 119, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_float", 1, 1, 1, i); __PYX_ERR(0, 119, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 119, __pyx_L3_error) + } + __pyx_v_f = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_f == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_float", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 119, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_22write_bigendian_float(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_f); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_22write_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, float __pyx_v_f) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_float", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_float(__pyx_v_self, __pyx_v_f, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.write_bigendian_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":122 + * self.write_bigendian_int32((&f)[0]) + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * return self.data[:self.pos] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_25get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_get(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_25get)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":123 + * + * cpdef bytes get(self): + * return self.data[:self.pos] # <<<<<<<<<<<<<< + * + * cpdef size_t size(self) except? -1: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_self->data + 0, __pyx_v_self->pos - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":122 + * self.write_bigendian_int32((&f)[0]) + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * return self.data[:self.pos] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_25get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_25get = {"get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_25get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_25get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_24get(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_24get(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":125 + * return self.data[:self.pos] + * + * cpdef size_t size(self) except? -1: # <<<<<<<<<<<<<< + * return self.pos + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_27size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_11apache_beam_6coders_6stream_12OutputStream_size(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch) { + size_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_27size)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":126 + * + * cpdef size_t size(self) except? -1: + * return self.pos # <<<<<<<<<<<<<< + * + * cdef extend(self, size_t missing): +*/ + __pyx_r = __pyx_v_self->pos; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":125 + * return self.data[:self.pos] + * + * cpdef size_t size(self) except? -1: # <<<<<<<<<<<<<< + * return self.pos + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1L; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_27size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_27size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_27size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_27size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_26size(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_26size(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream_size(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":128 + * return self.pos + * + * cdef extend(self, size_t missing): # <<<<<<<<<<<<<< + * while missing > self.buffer_size - self.pos: + * self.buffer_size *= 2 +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream_extend(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, size_t __pyx_v_missing) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extend", 0); + + /* "apache_beam/coders/stream.pyx":129 + * + * cdef extend(self, size_t missing): + * while missing > self.buffer_size - self.pos: # <<<<<<<<<<<<<< + * self.buffer_size *= 2 + * self.data = libc.stdlib.realloc(self.data, self.buffer_size) +*/ + while (1) { + __pyx_t_1 = (__pyx_v_missing > (__pyx_v_self->buffer_size - __pyx_v_self->pos)); + if (!__pyx_t_1) break; + + /* "apache_beam/coders/stream.pyx":130 + * cdef extend(self, size_t missing): + * while missing > self.buffer_size - self.pos: + * self.buffer_size *= 2 # <<<<<<<<<<<<<< + * self.data = libc.stdlib.realloc(self.data, self.buffer_size) + * assert self.data, "OutputStream realloc failed." +*/ + __pyx_v_self->buffer_size = (__pyx_v_self->buffer_size * 2); + } + + /* "apache_beam/coders/stream.pyx":131 + * while missing > self.buffer_size - self.pos: + * self.buffer_size *= 2 + * self.data = libc.stdlib.realloc(self.data, self.buffer_size) # <<<<<<<<<<<<<< + * assert self.data, "OutputStream realloc failed." + * +*/ + __pyx_v_self->data = ((char *)realloc(__pyx_v_self->data, __pyx_v_self->buffer_size)); + + /* "apache_beam/coders/stream.pyx":132 + * self.buffer_size *= 2 + * self.data = libc.stdlib.realloc(self.data, self.buffer_size) + * assert self.data, "OutputStream realloc failed." # <<<<<<<<<<<<<< + * + * cpdef _clear(self): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->data != 0); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_OutputStream_realloc_failed, 0, 0); + __PYX_ERR(0, 132, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 132, __pyx_L1_error) + #endif + + /* "apache_beam/coders/stream.pyx":128 + * return self.pos + * + * cdef extend(self, size_t missing): # <<<<<<<<<<<<<< + * while missing > self.buffer_size - self.pos: + * self.buffer_size *= 2 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":134 + * assert self.data, "OutputStream realloc failed." + * + * cpdef _clear(self): # <<<<<<<<<<<<<< + * self.pos = 0 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_29_clear(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_12OutputStream__clear(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_clear", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_29_clear)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":135 + * + * cpdef _clear(self): + * self.pos = 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_self->pos = 0; + + /* "apache_beam/coders/stream.pyx":134 + * assert self.data, "OutputStream realloc failed." + * + * cpdef _clear(self): # <<<<<<<<<<<<<< + * self.pos = 0 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream._clear", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_29_clear(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_29_clear = {"_clear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_29_clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_29_clear(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_clear (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_clear", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_clear", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_28_clear(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_28_clear(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_clear", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_12OutputStream__clear(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream._clear", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_30__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_12OutputStream_32__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_12OutputStream_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.OutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":148 + * """ + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.count = 0 + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream___cinit__(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream___cinit__(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/coders/stream.pyx":149 + * + * def __cinit__(self): + * self.count = 0 # <<<<<<<<<<<<<< + * + * cpdef write(self, bytes b, bint nested=False): +*/ + __pyx_v_self->count = 0; + + /* "apache_beam/coders/stream.pyx":148 + * """ + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.count = 0 + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":151 + * self.count = 0 + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + size_t __pyx_v_blen; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":152 + * + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) # <<<<<<<<<<<<<< + * if nested: + * self.write_var_int64(blen) +*/ + if (unlikely(__pyx_v_b == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 152, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_v_blen = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":153 + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) + * if nested: # <<<<<<<<<<<<<< + * self.write_var_int64(blen) + * self.count += blen +*/ + if (__pyx_v_nested) { + + /* "apache_beam/coders/stream.pyx":154 + * cdef size_t blen = len(b) + * if nested: + * self.write_var_int64(blen) # <<<<<<<<<<<<<< + * self.count += blen + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.write_var_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_blen, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/coders/stream.pyx":153 + * cpdef write(self, bytes b, bint nested=False): + * cdef size_t blen = len(b) + * if nested: # <<<<<<<<<<<<<< + * self.write_var_int64(blen) + * self.count += blen +*/ + } + + /* "apache_beam/coders/stream.pyx":155 + * if nested: + * self.write_var_int64(blen) + * self.count += blen # <<<<<<<<<<<<<< + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): +*/ + __pyx_v_self->count = (__pyx_v_self->count + __pyx_v_blen); + + /* "apache_beam/coders/stream.pyx":151 + * self.count = 0 + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_b = 0; + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 151, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 151, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 151, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(0, 151, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 0, 1, 2, i); __PYX_ERR(0, 151, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 151, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 151, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_b = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 151, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), (&PyBytes_Type), 1, "b", 1))) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_2write(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v_b, __pyx_v_nested); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_2write(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, PyObject *__pyx_v_b, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream->__pyx_base.write(((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_self), __pyx_v_b, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":157 + * self.count += blen + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.count += get_varint_size(signed_v) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_var_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":158 + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): + * self.count += get_varint_size(signed_v) # <<<<<<<<<<<<<< + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): +*/ + __pyx_t_7 = __pyx_f_11apache_beam_6coders_6stream_get_varint_size(__pyx_v_signed_v, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_v_self->count = (__pyx_v_self->count + __pyx_t_7); + + /* "apache_beam/coders/stream.pyx":157 + * self.count += blen + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.count += get_varint_size(signed_v) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64 = {"write_var_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_var_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 157, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 157, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_var_int64", 0) < (0)) __PYX_ERR(0, 157, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_var_int64", 1, 1, 1, i); __PYX_ERR(0, 157, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 157, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_var_int64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 157, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_4write_var_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_4write_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int64(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":160 + * self.count += get_varint_size(signed_v) + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * if signed_v < 0: + * self.count += 5 +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int64_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_var_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_signed_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":161 + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): + * if signed_v < 0: # <<<<<<<<<<<<<< + * self.count += 5 + * else: +*/ + __pyx_t_7 = (__pyx_v_signed_v < 0); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":162 + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): + * if signed_v < 0: + * self.count += 5 # <<<<<<<<<<<<<< + * else: + * self.count += get_varint_size(signed_v) +*/ + __pyx_v_self->count = (__pyx_v_self->count + 5); + + /* "apache_beam/coders/stream.pyx":161 + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): + * if signed_v < 0: # <<<<<<<<<<<<<< + * self.count += 5 + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/coders/stream.pyx":164 + * self.count += 5 + * else: + * self.count += get_varint_size(signed_v) # <<<<<<<<<<<<<< + * + * cpdef write_byte(self, unsigned char _): +*/ + /*else*/ { + __pyx_t_8 = __pyx_f_11apache_beam_6coders_6stream_get_varint_size(__pyx_v_signed_v, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_v_self->count = (__pyx_v_self->count + __pyx_t_8); + } + __pyx_L3:; + + /* "apache_beam/coders/stream.pyx":160 + * self.count += get_varint_size(signed_v) + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * if signed_v < 0: + * self.count += 5 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32 = {"write_var_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_signed_v; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_var_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signed_v,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 160, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 160, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_var_int32", 0) < (0)) __PYX_ERR(0, 160, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_var_int32", 1, 1, 1, i); __PYX_ERR(0, 160, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 160, __pyx_L3_error) + } + __pyx_v_signed_v = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_signed_v == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_var_int32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 160, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_6write_var_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v_signed_v); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_6write_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v_signed_v) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_var_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int32(__pyx_v_self, __pyx_v_signed_v, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":166 + * self.count += get_varint_size(signed_v) + * + * cpdef write_byte(self, unsigned char _): # <<<<<<<<<<<<<< + * self.count += 1 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED unsigned char __pyx_v__, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_byte", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_unsigned_char(__pyx_v__); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":167 + * + * cpdef write_byte(self, unsigned char _): + * self.count += 1 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t _): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 1); + + /* "apache_beam/coders/stream.pyx":166 + * self.count += get_varint_size(signed_v) + * + * cpdef write_byte(self, unsigned char _): # <<<<<<<<<<<<<< + * self.count += 1 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte = {"write_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + unsigned char __pyx_v__; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_byte (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 166, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 166, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_byte", 0) < (0)) __PYX_ERR(0, 166, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_byte", 1, 1, 1, i); __PYX_ERR(0, 166, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 166, __pyx_L3_error) + } + __pyx_v__ = __Pyx_PyLong_As_unsigned_char(values[0]); if (unlikely((__pyx_v__ == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_byte", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 166, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_8write_byte(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v__); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_8write_byte(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, unsigned char __pyx_v__) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_byte", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_byte(__pyx_v_self, __pyx_v__, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":169 + * self.count += 1 + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int64_t __pyx_v__, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v__); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":170 + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t _): + * self.count += 8 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t _): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 8); + + /* "apache_beam/coders/stream.pyx":169 + * self.count += 1 + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64 = {"write_bigendian_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v__; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 169, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int64", 0) < (0)) __PYX_ERR(0, 169, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int64", 1, 1, 1, i); __PYX_ERR(0, 169, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + } + __pyx_v__ = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v__ == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 169, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 169, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_10write_bigendian_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v__); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_10write_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int64_t __pyx_v__) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int64(__pyx_v_self, __pyx_v__, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":172 + * self.count += 8 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED uint64_t __pyx_v__, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_uint64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_uint64_t(__pyx_v__); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":173 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t _): + * self.count += 8 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t _): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 8); + + /* "apache_beam/coders/stream.pyx":172 + * self.count += 8 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64 = {"write_bigendian_uint64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + uint64_t __pyx_v__; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_uint64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 172, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 172, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_uint64", 0) < (0)) __PYX_ERR(0, 172, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_uint64", 1, 1, 1, i); __PYX_ERR(0, 172, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 172, __pyx_L3_error) + } + __pyx_v__ = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v__ == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_uint64", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 172, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_12write_bigendian_uint64(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v__); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_12write_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, uint64_t __pyx_v__) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_uint64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_uint64(__pyx_v_self, __pyx_v__, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":175 + * self.count += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t _): # <<<<<<<<<<<<<< + * self.count += 4 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int32_t __pyx_v__, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int32_t(__pyx_v__); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":176 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t _): + * self.count += 4 # <<<<<<<<<<<<<< + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t _): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 4); + + /* "apache_beam/coders/stream.pyx":175 + * self.count += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t _): # <<<<<<<<<<<<<< + * self.count += 4 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32 = {"write_bigendian_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int32_t __pyx_v__; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 175, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 175, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int32", 0) < (0)) __PYX_ERR(0, 175, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int32", 1, 1, 1, i); __PYX_ERR(0, 175, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 175, __pyx_L3_error) + } + __pyx_v__ = __Pyx_PyLong_As_int32_t(values[0]); if (unlikely((__pyx_v__ == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 175, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_14write_bigendian_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v__); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_14write_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int32_t __pyx_v__) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int32(__pyx_v_self, __pyx_v__, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":178 + * self.count += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t _): # <<<<<<<<<<<<<< + * self.count += 2 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED int16_t __pyx_v__, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int16", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_write_bigendian_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int16_t(__pyx_v__); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":179 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t _): + * self.count += 2 # <<<<<<<<<<<<<< + * + * cpdef size_t get_count(self): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 2); + + /* "apache_beam/coders/stream.pyx":178 + * self.count += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t _): # <<<<<<<<<<<<<< + * self.count += 2 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16 = {"write_bigendian_int16", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int16_t __pyx_v__; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_bigendian_int16 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 178, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 178, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_bigendian_int16", 0) < (0)) __PYX_ERR(0, 178, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_bigendian_int16", 1, 1, 1, i); __PYX_ERR(0, 178, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 178, __pyx_L3_error) + } + __pyx_v__ = __Pyx_PyLong_As_int16_t(values[0]); if (unlikely((__pyx_v__ == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_bigendian_int16", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 178, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_16write_bigendian_int16(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v__); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_16write_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int16_t __pyx_v__) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_bigendian_int16", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int16(__pyx_v_self, __pyx_v__, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.write_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":181 + * self.count += 2 + * + * cpdef size_t get_count(self): # <<<<<<<<<<<<<< + * return self.count + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get_count(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int __pyx_skip_dispatch) { + size_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_count", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":182 + * + * cpdef size_t get_count(self): + * return self.count # <<<<<<<<<<<<<< + * + * cpdef bytes get(self): +*/ + __pyx_r = __pyx_v_self->count; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":181 + * self.count += 2 + * + * cpdef size_t get_count(self): # <<<<<<<<<<<<<< + * return self.count + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count = {"get_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_count (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_count", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_count", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_18get_count(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_18get_count(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_count", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get_count(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":184 + * return self.count + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":185 + * + * cpdef bytes get(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 185, __pyx_L1_error) + + /* "apache_beam/coders/stream.pyx":184 + * return self.count + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get = {"get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_20get(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_20get(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":187 + * raise NotImplementedError + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s %s>' % (self.__class__.__name__, self.count) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_23__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_23__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_22__str__(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_22__str__(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3[5]; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/coders/stream.pyx":188 + * + * def __str__(self): + * return '<%s %s>' % (self.__class__.__name__, self.count) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_From_size_t(__pyx_v_self->count, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_3[1] = __pyx_t_1; + __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_3[3] = __pyx_t_2; + __pyx_t_3[4] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":187 + * raise NotImplementedError + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s %s>' % (self.__class__.__name__, self.count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_24__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_26__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_24ByteCountingOutputStream_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.coders.stream.ByteCountingOutputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":194 + * """An input string stream implementation supporting read() and size().""" + * + * def __init__(self, all): # <<<<<<<<<<<<<< + * self.allc = self.all = all + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_6coders_6stream_11InputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_6coders_6stream_11InputStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_all = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_all,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 194, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 194, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 194, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + } + __pyx_v_all = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream___init__(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self), __pyx_v_all); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_6coders_6stream_11InputStream___init__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, PyObject *__pyx_v_all) { + int __pyx_r; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/coders/stream.pyx":195 + * + * def __init__(self, all): + * self.allc = self.all = all # <<<<<<<<<<<<<< + * + * cpdef bytes read(self, size_t size): +*/ + __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_all); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_2 = __pyx_v_all; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_v_self->allc = __pyx_t_1; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->all); + __Pyx_DECREF(__pyx_v_self->all); + __pyx_v_self->all = ((PyObject*)__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":194 + * """An input string stream implementation supporting read() and size().""" + * + * def __init__(self, all): # <<<<<<<<<<<<<< + * self.allc = self.all = all + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":197 + * self.allc = self.all = all + * + * cpdef bytes read(self, size_t size): # <<<<<<<<<<<<<< + * self.pos += size + * return self.allc[self.pos - size : self.pos] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_3read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_11InputStream_read(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, size_t __pyx_v_size, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_3read)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":198 + * + * cpdef bytes read(self, size_t size): + * self.pos += size # <<<<<<<<<<<<<< + * return self.allc[self.pos - size : self.pos] + * +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + __pyx_v_size); + + /* "apache_beam/coders/stream.pyx":199 + * cpdef bytes read(self, size_t size): + * self.pos += size + * return self.allc[self.pos - size : self.pos] # <<<<<<<<<<<<<< + * + * cpdef long read_byte(self) except? -1: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_self->allc + (__pyx_v_self->pos - __pyx_v_size), __pyx_v_self->pos - (__pyx_v_self->pos - __pyx_v_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":197 + * self.allc = self.all = all + * + * cpdef bytes read(self, size_t size): # <<<<<<<<<<<<<< + * self.pos += size + * return self.allc[self.pos - size : self.pos] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_3read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_3read = {"read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_3read, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_3read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + size_t __pyx_v_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 197, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read", 0) < (0)) __PYX_ERR(0, 197, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, i); __PYX_ERR(0, 197, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 197, __pyx_L3_error) + } + __pyx_v_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 197, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_2read(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self), __pyx_v_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_2read(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, size_t __pyx_v_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read(__pyx_v_self, __pyx_v_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":201 + * return self.allc[self.pos - size : self.pos] + * + * cpdef long read_byte(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 1 + * # Note: Some C++ compilers treats the char array below as a signed char. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_5read_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static long __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_byte(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + long __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + long __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_byte", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_5read_byte)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_long(__pyx_t_2); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":202 + * + * cpdef long read_byte(self) except? -1: + * self.pos += 1 # <<<<<<<<<<<<<< + * # Note: Some C++ compilers treats the char array below as a signed char. + * # This causes incorrect coder behavior unless explicitly cast to an +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 1); + + /* "apache_beam/coders/stream.pyx":206 + * # This causes incorrect coder behavior unless explicitly cast to an + * # unsigned char here. + * return ( self.allc[self.pos - 1]) # <<<<<<<<<<<<<< + * + * cpdef ssize_t size(self) except? -1: +*/ + __pyx_r = ((long)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 1)]))); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":201 + * return self.allc[self.pos - size : self.pos] + * + * cpdef long read_byte(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 1 + * # Note: Some C++ compilers treats the char array below as a signed char. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1L; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_5read_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_5read_byte = {"read_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_5read_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_5read_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_byte (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_byte", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_byte", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_4read_byte(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_4read_byte(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + long __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_byte", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_byte(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":208 + * return ( self.allc[self.pos - 1]) + * + * cpdef ssize_t size(self) except? -1: # <<<<<<<<<<<<<< + * return len(self.all) - self.pos + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_7size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static Py_ssize_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_size(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_7size)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = PyLong_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":209 + * + * cpdef ssize_t size(self) except? -1: + * return len(self.all) - self.pos # <<<<<<<<<<<<<< + * + * cpdef bytes read_all(self, bint nested=False): +*/ + __pyx_t_1 = __pyx_v_self->all; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 209, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = (__pyx_t_7 - __pyx_v_self->pos); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":208 + * return ( self.allc[self.pos - 1]) + * + * cpdef ssize_t size(self) except? -1: # <<<<<<<<<<<<<< + * return len(self.all) - self.pos + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1L; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_7size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_7size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_7size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_7size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_6size(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_6size(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_size(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":211 + * return len(self.all) - self.pos + * + * cpdef bytes read_all(self, bint nested=False): # <<<<<<<<<<<<<< + * return self.read(self.read_var_int64() if nested else self.size()) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_9read_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_all(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args) { + int __pyx_v_nested = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int64_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_all", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_nested = __pyx_optional_args->nested; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_9read_all)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":212 + * + * cpdef bytes read_all(self, bint nested=False): + * return self.read(self.read_var_int64() if nested else self.size()) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t read_var_int64(self) except? -1: +*/ + __Pyx_XDECREF(__pyx_r); + if (__pyx_v_nested) { + __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_var_int64(__pyx_v_self, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = ((Py_ssize_t)__pyx_t_8); + } else { + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->size(__pyx_v_self, 0); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = __pyx_t_9; + } + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read(__pyx_v_self, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":211 + * return len(self.all) - self.pos + * + * cpdef bytes read_all(self, bint nested=False): # <<<<<<<<<<<<<< + * return self.read(self.read_var_int64() if nested else self.size()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_9read_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_9read_all = {"read_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_9read_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_9read_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_nested; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_all (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nested,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_all", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_nested = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L3_error) + } else { + __pyx_v_nested = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("read_all", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_8read_all(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self), __pyx_v_nested); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_8read_all(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_v_nested) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_all", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.nested = __pyx_v_nested; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream->read_all(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":214 + * return self.read(self.read_var_int64() if nested else self.size()) + * + * cpdef libc.stdint.int64_t read_var_int64(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded long from a stream.""" + * # Inline common case. +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_11read_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + long __pyx_v_byte; + int64_t __pyx_v_bits; + long __pyx_v_shift; + int64_t __pyx_v_result; + int64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int64_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + long __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_var_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_var_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_11read_var_int64)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":217 + * """Decode a variable-length encoded long from a stream.""" + * # Inline common case. + * cdef long byte = self.allc[self.pos] # <<<<<<<<<<<<<< + * self.pos += 1 + * if byte <= 0x7F: +*/ + __pyx_v_byte = ((unsigned char)(__pyx_v_self->allc[__pyx_v_self->pos])); + + /* "apache_beam/coders/stream.pyx":218 + * # Inline common case. + * cdef long byte = self.allc[self.pos] + * self.pos += 1 # <<<<<<<<<<<<<< + * if byte <= 0x7F: + * return byte +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 1); + + /* "apache_beam/coders/stream.pyx":219 + * cdef long byte = self.allc[self.pos] + * self.pos += 1 + * if byte <= 0x7F: # <<<<<<<<<<<<<< + * return byte + * +*/ + __pyx_t_7 = (__pyx_v_byte <= 0x7F); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":220 + * self.pos += 1 + * if byte <= 0x7F: + * return byte # <<<<<<<<<<<<<< + * + * cdef libc.stdint.int64_t bits +*/ + __pyx_r = __pyx_v_byte; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":219 + * cdef long byte = self.allc[self.pos] + * self.pos += 1 + * if byte <= 0x7F: # <<<<<<<<<<<<<< + * return byte + * +*/ + } + + /* "apache_beam/coders/stream.pyx":223 + * + * cdef libc.stdint.int64_t bits + * cdef long shift = 0 # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t result = 0 + * while True: +*/ + __pyx_v_shift = 0; + + /* "apache_beam/coders/stream.pyx":224 + * cdef libc.stdint.int64_t bits + * cdef long shift = 0 + * cdef libc.stdint.int64_t result = 0 # <<<<<<<<<<<<<< + * while True: + * bits = byte & 0x7F +*/ + __pyx_v_result = 0; + + /* "apache_beam/coders/stream.pyx":225 + * cdef long shift = 0 + * cdef libc.stdint.int64_t result = 0 + * while True: # <<<<<<<<<<<<<< + * bits = byte & 0x7F + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or +*/ + while (1) { + + /* "apache_beam/coders/stream.pyx":226 + * cdef libc.stdint.int64_t result = 0 + * while True: + * bits = byte & 0x7F # <<<<<<<<<<<<<< + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): +*/ + __pyx_v_bits = (__pyx_v_byte & 0x7F); + + /* "apache_beam/coders/stream.pyx":227 + * while True: + * bits = byte & 0x7F + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or # <<<<<<<<<<<<<< + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): + * raise RuntimeError('VarLong too long.') +*/ + __pyx_t_8 = (__pyx_v_shift >= ((sizeof(int64_t)) * 8)); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L7_bool_binop_done; + } + + /* "apache_beam/coders/stream.pyx":228 + * bits = byte & 0x7F + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): # <<<<<<<<<<<<<< + * raise RuntimeError('VarLong too long.') + * result |= bits << shift +*/ + __pyx_t_8 = (__pyx_v_shift >= (((sizeof(int64_t)) * 8) - 1)); + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_bits > 1); + __pyx_t_7 = __pyx_t_8; + __pyx_L7_bool_binop_done:; + + /* "apache_beam/coders/stream.pyx":227 + * while True: + * bits = byte & 0x7F + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or # <<<<<<<<<<<<<< + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): + * raise RuntimeError('VarLong too long.') +*/ + if (unlikely(__pyx_t_7)) { + + /* "apache_beam/coders/stream.pyx":229 + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): + * raise RuntimeError('VarLong too long.') # <<<<<<<<<<<<<< + * result |= bits << shift + * shift += 7 +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_VarLong_too_long}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 229, __pyx_L1_error) + + /* "apache_beam/coders/stream.pyx":227 + * while True: + * bits = byte & 0x7F + * if (shift >= sizeof(libc.stdint.int64_t) * 8 or # <<<<<<<<<<<<<< + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): + * raise RuntimeError('VarLong too long.') +*/ + } + + /* "apache_beam/coders/stream.pyx":230 + * (shift >= (sizeof(libc.stdint.int64_t) * 8 - 1) and bits > 1)): + * raise RuntimeError('VarLong too long.') + * result |= bits << shift # <<<<<<<<<<<<<< + * shift += 7 + * if not (byte & 0x80): +*/ + __pyx_v_result = (__pyx_v_result | (__pyx_v_bits << __pyx_v_shift)); + + /* "apache_beam/coders/stream.pyx":231 + * raise RuntimeError('VarLong too long.') + * result |= bits << shift + * shift += 7 # <<<<<<<<<<<<<< + * if not (byte & 0x80): + * break +*/ + __pyx_v_shift = (__pyx_v_shift + 7); + + /* "apache_beam/coders/stream.pyx":232 + * result |= bits << shift + * shift += 7 + * if not (byte & 0x80): # <<<<<<<<<<<<<< + * break + * byte = self.read_byte() +*/ + __pyx_t_7 = (!((__pyx_v_byte & 0x80) != 0)); + if (__pyx_t_7) { + + /* "apache_beam/coders/stream.pyx":233 + * shift += 7 + * if not (byte & 0x80): + * break # <<<<<<<<<<<<<< + * byte = self.read_byte() + * if byte < 0: +*/ + goto __pyx_L5_break; + + /* "apache_beam/coders/stream.pyx":232 + * result |= bits << shift + * shift += 7 + * if not (byte & 0x80): # <<<<<<<<<<<<<< + * break + * byte = self.read_byte() +*/ + } + + /* "apache_beam/coders/stream.pyx":234 + * if not (byte & 0x80): + * break + * byte = self.read_byte() # <<<<<<<<<<<<<< + * if byte < 0: + * raise RuntimeError('VarInt not terminated.') +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_byte(__pyx_v_self, 0); if (unlikely(__pyx_t_9 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_v_byte = __pyx_t_9; + + /* "apache_beam/coders/stream.pyx":235 + * break + * byte = self.read_byte() + * if byte < 0: # <<<<<<<<<<<<<< + * raise RuntimeError('VarInt not terminated.') + * +*/ + __pyx_t_7 = (__pyx_v_byte < 0); + if (unlikely(__pyx_t_7)) { + + /* "apache_beam/coders/stream.pyx":236 + * byte = self.read_byte() + * if byte < 0: + * raise RuntimeError('VarInt not terminated.') # <<<<<<<<<<<<<< + * + * return result +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_VarInt_not_terminated}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 236, __pyx_L1_error) + + /* "apache_beam/coders/stream.pyx":235 + * break + * byte = self.read_byte() + * if byte < 0: # <<<<<<<<<<<<<< + * raise RuntimeError('VarInt not terminated.') + * +*/ + } + } + __pyx_L5_break:; + + /* "apache_beam/coders/stream.pyx":238 + * raise RuntimeError('VarInt not terminated.') + * + * return result # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int32_t read_var_int32(self) except? -1: +*/ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":214 + * return self.read(self.read_var_int64() if nested else self.size()) + * + * cpdef libc.stdint.int64_t read_var_int64(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded long from a stream.""" + * # Inline common case. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1L; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_11read_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_6stream_11InputStream_10read_var_int64, "Decode a variable-length encoded long from a stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_11read_var_int64 = {"read_var_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_11read_var_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_6stream_11InputStream_10read_var_int64}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_11read_var_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_var_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_var_int64", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_var_int64", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_10read_var_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_10read_var_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_var_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int64(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_var_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":240 + * return result + * + * cpdef libc.stdint.int32_t read_var_int32(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded int32 from a stream.""" + * cdef libc.stdint.int64_t v = self.read_var_int64() +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_13read_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int32_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int64_t __pyx_v_v; + int32_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_var_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_var_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_13read_var_int32)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":242 + * cpdef libc.stdint.int32_t read_var_int32(self) except? -1: + * """Decode a variable-length encoded int32 from a stream.""" + * cdef libc.stdint.int64_t v = self.read_var_int64() # <<<<<<<<<<<<<< + * return (v); + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_var_int64(__pyx_v_self, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_v_v = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":243 + * """Decode a variable-length encoded int32 from a stream.""" + * cdef libc.stdint.int64_t v = self.read_var_int64() + * return (v); # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t read_bigendian_int64(self) except? -1: +*/ + __pyx_r = ((int32_t)__pyx_v_v); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":240 + * return result + * + * cpdef libc.stdint.int32_t read_var_int32(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded int32 from a stream.""" + * cdef libc.stdint.int64_t v = self.read_var_int64() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_13read_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_6stream_11InputStream_12read_var_int32, "Decode a variable-length encoded int32 from a stream."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_13read_var_int32 = {"read_var_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_13read_var_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_6stream_11InputStream_12read_var_int32}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_13read_var_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_var_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_var_int32", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_var_int32", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_12read_var_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_12read_var_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int32_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_var_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int32(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_var_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":245 + * return (v); + * + * cpdef libc.stdint.int64_t read_bigendian_int64(self) except? -1: # <<<<<<<<<<<<<< + * return self.read_bigendian_uint64() + * +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int64_t __pyx_t_6; + uint64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":246 + * + * cpdef libc.stdint.int64_t read_bigendian_int64(self) except? -1: + * return self.read_bigendian_uint64() # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.uint64_t read_bigendian_uint64(self) except? -1: +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_bigendian_uint64(__pyx_v_self, 0); if (unlikely(__pyx_t_7 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_r = __pyx_t_7; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":245 + * return (v); + * + * cpdef libc.stdint.int64_t read_bigendian_int64(self) except? -1: # <<<<<<<<<<<<<< + * return self.read_bigendian_uint64() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1L; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64 = {"read_bigendian_int64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_int64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_int64", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_int64", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_14read_bigendian_int64(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_14read_bigendian_int64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int64(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":248 + * return self.read_bigendian_uint64() + * + * cpdef libc.stdint.uint64_t read_bigendian_uint64(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 8 + * return (self.allc[self.pos - 1] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static uint64_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + uint64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + uint64_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_uint64", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":249 + * + * cpdef libc.stdint.uint64_t read_bigendian_uint64(self) except? -1: + * self.pos += 8 # <<<<<<<<<<<<<< + * return (self.allc[self.pos - 1] + * | self.allc[self.pos - 2] << 8 +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 8); + + /* "apache_beam/coders/stream.pyx":257 + * | self.allc[self.pos - 6] << 40 + * | self.allc[self.pos - 7] << 48 + * | self.allc[self.pos - 8] << 56) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1: +*/ + __pyx_r = (((((((((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 1)])) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 2)]))) << 8)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 3)]))) << 16)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 4)]))) << 24)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 5)]))) << 32)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 6)]))) << 40)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 7)]))) << 48)) | (((uint64_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 8)]))) << 56)); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":248 + * return self.read_bigendian_uint64() + * + * cpdef libc.stdint.uint64_t read_bigendian_uint64(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 8 + * return (self.allc[self.pos - 1] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1LL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64 = {"read_bigendian_uint64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_uint64 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_uint64", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_uint64", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_16read_bigendian_uint64(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_16read_bigendian_uint64(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + uint64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_uint64", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_uint64(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_uint64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_uint64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":259 + * | self.allc[self.pos - 8] << 56) + * + * cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 4 + * return (self.allc[self.pos - 1] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int32_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int32_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int32", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":260 + * + * cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1: + * self.pos += 4 # <<<<<<<<<<<<<< + * return (self.allc[self.pos - 1] + * | self.allc[self.pos - 2] << 8 +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 4); + + /* "apache_beam/coders/stream.pyx":264 + * | self.allc[self.pos - 2] << 8 + * | self.allc[self.pos - 3] << 16 + * | self.allc[self.pos - 4] << 24) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int16_t read_bigendian_int16(self) except? -1: +*/ + __pyx_r = (((((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 1)])) | (((uint32_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 2)]))) << 8)) | (((uint32_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 3)]))) << 16)) | (((uint32_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 4)]))) << 24)); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":259 + * | self.allc[self.pos - 8] << 56) + * + * cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 4 + * return (self.allc[self.pos - 1] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32 = {"read_bigendian_int32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_int32 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_int32", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_int32", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_18read_bigendian_int32(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_18read_bigendian_int32(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int32_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int32", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int32(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":266 + * | self.allc[self.pos - 4] << 24) + * + * cpdef libc.stdint.int16_t read_bigendian_int16(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 2 + * return (self.allc[self.pos - 1] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int16_t __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int16_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int16_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int16", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int16_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":267 + * + * cpdef libc.stdint.int16_t read_bigendian_int16(self) except? -1: + * self.pos += 2 # <<<<<<<<<<<<<< + * return (self.allc[self.pos - 1] + * | self.allc[self.pos - 2] << 8) +*/ + __pyx_v_self->pos = (__pyx_v_self->pos + 2); + + /* "apache_beam/coders/stream.pyx":269 + * self.pos += 2 + * return (self.allc[self.pos - 1] + * | self.allc[self.pos - 2] << 8) # <<<<<<<<<<<<<< + * + * cpdef double read_bigendian_double(self) except? -1: +*/ + __pyx_r = (((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 1)])) | (((uint16_t)((unsigned char)(__pyx_v_self->allc[(__pyx_v_self->pos - 2)]))) << 8)); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":266 + * | self.allc[self.pos - 4] << 24) + * + * cpdef libc.stdint.int16_t read_bigendian_int16(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 2 + * return (self.allc[self.pos - 1] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16 = {"read_bigendian_int16", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_int16 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_int16", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_int16", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_20read_bigendian_int16(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_20read_bigendian_int16(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int16_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_int16", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int16(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int16_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int16_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_int16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":271 + * | self.allc[self.pos - 2] << 8) + * + * cpdef double read_bigendian_double(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t as_long = self.read_bigendian_int64() + * return (&as_long)[0] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static double __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int64_t __pyx_v_as_long; + double __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + double __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_double", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_double); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":272 + * + * cpdef double read_bigendian_double(self) except? -1: + * cdef libc.stdint.int64_t as_long = self.read_bigendian_int64() # <<<<<<<<<<<<<< + * return (&as_long)[0] + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_bigendian_int64(__pyx_v_self, 0); if (unlikely(__pyx_t_7 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_v_as_long = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":273 + * cpdef double read_bigendian_double(self) except? -1: + * cdef libc.stdint.int64_t as_long = self.read_bigendian_int64() + * return (&as_long)[0] # <<<<<<<<<<<<<< + * + * cpdef float read_bigendian_float(self) except? -1: +*/ + __pyx_r = (((double *)((char *)(&__pyx_v_as_long)))[0]); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":271 + * | self.allc[self.pos - 2] << 8) + * + * cpdef double read_bigendian_double(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t as_long = self.read_bigendian_int64() + * return (&as_long)[0] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1.0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double = {"read_bigendian_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_double (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_double", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_double", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_22read_bigendian_double(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_22read_bigendian_double(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_double", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_double(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":275 + * return (&as_long)[0] + * + * cpdef float read_bigendian_float(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t as_int = self.read_bigendian_int32() + * return (&as_int)[0] +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static float __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, int __pyx_skip_dispatch) { + int32_t __pyx_v_as_int; + float __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + float __pyx_t_6; + int32_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_float", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_read_bigendian_float); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/coders/stream.pyx":276 + * + * cpdef float read_bigendian_float(self) except? -1: + * cdef libc.stdint.int32_t as_int = self.read_bigendian_int32() # <<<<<<<<<<<<<< + * return (&as_int)[0] + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self->__pyx_vtab)->read_bigendian_int32(__pyx_v_self, 0); if (unlikely(__pyx_t_7 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_v_as_int = __pyx_t_7; + + /* "apache_beam/coders/stream.pyx":277 + * cpdef float read_bigendian_float(self) except? -1: + * cdef libc.stdint.int32_t as_int = self.read_bigendian_int32() + * return (&as_int)[0] # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value): +*/ + __pyx_r = (((float *)((char *)(&__pyx_v_as_int)))[0]); + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":275 + * return (&as_long)[0] + * + * cpdef float read_bigendian_float(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t as_int = self.read_bigendian_int32() + * return (&as_int)[0] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1.0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float = {"read_bigendian_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_bigendian_float (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("read_bigendian_float", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("read_bigendian_float", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_24read_bigendian_float(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_24read_bigendian_float(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + float __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_bigendian_float", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_float(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((float)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.read_bigendian_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_26__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_26__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.all, self.allc, self.pos) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->allc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->all); + __Pyx_GIVEREF(__pyx_v_self->all); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->all) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.all, self.allc, self.pos) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.all, self.allc, self.pos) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.all is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.all, self.allc, self.pos) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.all is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->all != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.all is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.all is not None + * if use_setstate: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_InputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_189221681); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_189221681); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_189221681) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.all is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, None), state + * else: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_InputStream__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_InputStream); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_189221681); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_189221681); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_189221681) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_InputStream__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_11InputStream_28__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_11InputStream_28__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_InputStream__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_6stream___pyx_unpickle_InputStream__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_InputStream__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.InputStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/coders/stream.pyx":279 + * return (&as_int)[0] + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value): # <<<<<<<<<<<<<< + * """Returns the size of the given integer value when encode as a VarInt.""" + * cdef libc.stdint.int64_t varint_size = 0 +*/ + +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_1get_varint_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int64_t __pyx_f_11apache_beam_6coders_6stream_get_varint_size(int64_t __pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) { + int64_t __pyx_v_varint_size; + uint64_t __pyx_v_bits; + int64_t __pyx_r; + int __pyx_t_1; + + /* "apache_beam/coders/stream.pyx":281 + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value): + * """Returns the size of the given integer value when encode as a VarInt.""" + * cdef libc.stdint.int64_t varint_size = 0 # <<<<<<<<<<<<<< + * cdef libc.stdint.uint64_t bits = value + * while True: +*/ + __pyx_v_varint_size = 0; + + /* "apache_beam/coders/stream.pyx":282 + * """Returns the size of the given integer value when encode as a VarInt.""" + * cdef libc.stdint.int64_t varint_size = 0 + * cdef libc.stdint.uint64_t bits = value # <<<<<<<<<<<<<< + * while True: + * varint_size += 1 +*/ + __pyx_v_bits = __pyx_v_value; + + /* "apache_beam/coders/stream.pyx":283 + * cdef libc.stdint.int64_t varint_size = 0 + * cdef libc.stdint.uint64_t bits = value + * while True: # <<<<<<<<<<<<<< + * varint_size += 1 + * bits >>= 7 +*/ + while (1) { + + /* "apache_beam/coders/stream.pyx":284 + * cdef libc.stdint.uint64_t bits = value + * while True: + * varint_size += 1 # <<<<<<<<<<<<<< + * bits >>= 7 + * if not bits: +*/ + __pyx_v_varint_size = (__pyx_v_varint_size + 1); + + /* "apache_beam/coders/stream.pyx":285 + * while True: + * varint_size += 1 + * bits >>= 7 # <<<<<<<<<<<<<< + * if not bits: + * break +*/ + __pyx_v_bits = (__pyx_v_bits >> 7); + + /* "apache_beam/coders/stream.pyx":286 + * varint_size += 1 + * bits >>= 7 + * if not bits: # <<<<<<<<<<<<<< + * break + * return varint_size +*/ + __pyx_t_1 = (!(__pyx_v_bits != 0)); + if (__pyx_t_1) { + + /* "apache_beam/coders/stream.pyx":287 + * bits >>= 7 + * if not bits: + * break # <<<<<<<<<<<<<< + * return varint_size +*/ + goto __pyx_L4_break; + + /* "apache_beam/coders/stream.pyx":286 + * varint_size += 1 + * bits >>= 7 + * if not bits: # <<<<<<<<<<<<<< + * break + * return varint_size +*/ + } + } + __pyx_L4_break:; + + /* "apache_beam/coders/stream.pyx":288 + * if not bits: + * break + * return varint_size # <<<<<<<<<<<<<< +*/ + __pyx_r = __pyx_v_varint_size; + goto __pyx_L0; + + /* "apache_beam/coders/stream.pyx":279 + * return (&as_int)[0] + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value): # <<<<<<<<<<<<<< + * """Returns the size of the given integer value when encode as a VarInt.""" + * cdef libc.stdint.int64_t varint_size = 0 +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_1get_varint_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_6coders_6stream_get_varint_size, "Returns the size of the given integer value when encode as a VarInt."); +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_1get_varint_size = {"get_varint_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_1get_varint_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_6stream_get_varint_size}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_1get_varint_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_value; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_varint_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 279, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_varint_size", 0) < (0)) __PYX_ERR(0, 279, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_varint_size", 1, 1, 1, i); __PYX_ERR(0, 279, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error) + } + __pyx_v_value = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_varint_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.get_varint_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_get_varint_size(__pyx_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_get_varint_size(CYTHON_UNUSED PyObject *__pyx_self, int64_t __pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_varint_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_6coders_6stream_get_varint_size(__pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.coders.stream.get_varint_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_InputStream(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_3__pyx_unpickle_InputStream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_6coders_6stream_3__pyx_unpickle_InputStream = {"__pyx_unpickle_InputStream", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_3__pyx_unpickle_InputStream, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_6coders_6stream_3__pyx_unpickle_InputStream(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_InputStream (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_InputStream", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputStream", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputStream", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.coders.stream.__pyx_unpickle_InputStream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_6coders_6stream_2__pyx_unpickle_InputStream(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_6coders_6stream_2__pyx_unpickle_InputStream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_InputStream", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_InputStream(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') # <<<<<<<<<<<<<< + * __pyx_result = InputStream.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, __pyx_k_all_allc_pos); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') + * __pyx_result = InputStream.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') + * __pyx_result = InputStream.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = InputStream.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_6coders_6stream___pyx_unpickle_InputStream__set_state(((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') + * __pyx_result = InputStream.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): + * __pyx_result.all = __pyx_state[0]; __pyx_result.allc = __pyx_state[1]; __pyx_result.pos = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_InputStream(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.coders.stream.__pyx_unpickle_InputStream", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.all = __pyx_state[0]; __pyx_result.allc = __pyx_state[1]; __pyx_result.pos = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_6coders_6stream___pyx_unpickle_InputStream__set_state(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + char *__pyx_t_2; + size_t __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_InputStream__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): + * __pyx_result.all = __pyx_state[0]; __pyx_result.allc = __pyx_state[1]; __pyx_result.pos = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->all); + __Pyx_DECREF(__pyx_v___pyx_result->all); + __pyx_v___pyx_result->all = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_v___pyx_result->allc = __pyx_t_2; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->pos = __pyx_t_3; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): + * __pyx_result.all = __pyx_state[0]; __pyx_result.allc = __pyx_state[1]; __pyx_result.pos = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_InputStream__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_InputStream__set_state(InputStream __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.all = __pyx_state[0]; __pyx_result.allc = __pyx_state[1]; __pyx_result.pos = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.coders.stream.__pyx_unpickle_InputStream__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream __pyx_vtable_11apache_beam_6coders_6stream_OutputStream; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_OutputStream(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream; + if (unlikely(__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_11apache_beam_6coders_6stream_12OutputStream_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_6stream_OutputStream[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_6stream_OutputStream_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream}, + {Py_tp_doc, (void *)PyDoc_STR("An output string stream implementation supporting write() and get().")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_6stream_OutputStream}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_6stream_OutputStream}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_6stream_OutputStream_spec = { + "apache_beam.coders.stream.OutputStream", + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_6stream_OutputStream_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_6stream_OutputStream = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.stream.""OutputStream", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("An output string stream implementation supporting write() and get()."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_6stream_OutputStream, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_6stream_OutputStream, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_ByteCountingOutputStream(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *p; + PyObject *o = __pyx_tp_new_11apache_beam_6coders_6stream_OutputStream(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream*)__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream; + if (unlikely(__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_6stream_ByteCountingOutputStream[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream}, + {Py_tp_str, (void *)__pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_23__str__}, + {Py_tp_doc, (void *)PyDoc_STR("An output string stream implementation that only counts the bytes.\n\n This implementation counts the number of bytes it \"writes\" but\n doesn't actually write them anyway. Thus it has write() but not\n get(). get_count() returns how many bytes were written.\n\n This is useful for sizing an encoding.\n ")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_6stream_ByteCountingOutputStream}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_6stream_ByteCountingOutputStream}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream_spec = { + "apache_beam.coders.stream.ByteCountingOutputStream", + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.stream.""ByteCountingOutputStream", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_6stream_OutputStream, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_11apache_beam_6coders_6stream_24ByteCountingOutputStream_23__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("An output string stream implementation that only counts the bytes.\n\n This implementation counts the number of bytes it \"writes\" but\n doesn't actually write them anyway. Thus it has write() but not\n get(). get_count() returns how many bytes were written.\n\n This is useful for sizing an encoding.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_6stream_ByteCountingOutputStream, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_6stream_ByteCountingOutputStream, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream __pyx_vtable_11apache_beam_6coders_6stream_InputStream; + +static PyObject *__pyx_tp_new_11apache_beam_6coders_6stream_InputStream(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream; + p->all = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_6coders_6stream_InputStream(PyObject *o) { + struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *p = (struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_6coders_6stream_InputStream) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + Py_CLEAR(p->all); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_6coders_6stream_InputStream[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_6coders_6stream_InputStream_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_6coders_6stream_InputStream}, + {Py_tp_doc, (void *)PyDoc_STR("An input string stream implementation supporting read() and size().")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_6coders_6stream_InputStream}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_6coders_6stream_11InputStream_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_6coders_6stream_InputStream}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_6coders_6stream_InputStream_spec = { + "apache_beam.coders.stream.InputStream", + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_6coders_6stream_InputStream_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_6coders_6stream_InputStream = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.coders.stream.""InputStream", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_6coders_6stream_InputStream, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("An input string stream implementation supporting read() and size()."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_6coders_6stream_InputStream, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_6coders_6stream_11InputStream_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_6coders_6stream_InputStream, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_int64_t_int64_t_int___pyx_skip_d); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 43; + void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_11apache_beam_6coders_6stream_get_varint_size, (void (*)(void)) NULL}; + void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream = &__pyx_vtable_11apache_beam_6coders_6stream_OutputStream; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_byte = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_byte; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_var_int64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int64; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_var_int32 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_var_int32; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_int64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int64; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_uint64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_uint64; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_int32 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int32; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_int16 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_int16; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_double = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_double; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.write_bigendian_float = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, float, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_write_bigendian_float; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.get = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_get; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.size = (size_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_size; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream.extend = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, size_t))__pyx_f_11apache_beam_6coders_6stream_12OutputStream_extend; + __pyx_vtable_11apache_beam_6coders_6stream_OutputStream._clear = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_12OutputStream__clear; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_6stream_OutputStream_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream)) __PYX_ERR(0, 27, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_6stream_OutputStream_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream = &__pyx_type_11apache_beam_6coders_6stream_OutputStream; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream = &__pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_byte = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_byte; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_var_int64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int64; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_var_int32 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_var_int32; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_bigendian_int64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int64; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_bigendian_uint64 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_uint64; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_bigendian_int32 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int32; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.write_bigendian_int16 = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write_bigendian_int16; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.__pyx_base.get = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get; + __pyx_vtable_11apache_beam_6coders_6stream_ByteCountingOutputStream.get_count = (size_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_24ByteCountingOutputStream_get_count; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream)) __PYX_ERR(0, 138, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = &__pyx_type_11apache_beam_6coders_6stream_ByteCountingOutputStream; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream = &__pyx_vtable_11apache_beam_6coders_6stream_InputStream; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.size = (Py_ssize_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_size; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, size_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_byte = (long (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_byte; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_var_int64 = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int64; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_var_int32 = (int32_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_var_int32; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_int64 = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int64; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_uint64 = (uint64_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_uint64; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_int32 = (int32_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int32; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_int16 = (int16_t (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_int16; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_double = (double (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_double; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_bigendian_float = (float (*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_bigendian_float; + __pyx_vtable_11apache_beam_6coders_6stream_InputStream.read_all = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args))__pyx_f_11apache_beam_6coders_6stream_11InputStream_read_all; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_6coders_6stream_InputStream_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream)) __PYX_ERR(0, 191, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_6coders_6stream_InputStream_spec, __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream = &__pyx_type_11apache_beam_6coders_6stream_InputStream; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_InputStream, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_6coders_6stream_InputStream) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_stream(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_stream}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "stream", + __pyx_k_Compiled_version_of_the_Stream_o, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_stream(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_stream(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_stream(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'stream' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "stream" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_stream", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__coders__stream) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.coders.stream")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.coders.stream", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/coders/stream.pyx":42 + * libc.stdlib.free(self.data) + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_5write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_2) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":51 + * self.pos += blen + * + * cpdef write_byte(self, unsigned char val): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 1: + * self.extend(1) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_7write_byte, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_byte, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":57 + * self.pos += 1 + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode a long using variable-length encoding to a stream.""" + * cdef libc.stdint.uint64_t v = signed_v +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_9write_var_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_var_int64, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_var_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":76 + * break + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * """Encode an int using variable-length encoding to a stream.""" + * # for backward compatibility, input type is int64_t thus tolerates overflow +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_11write_var_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_var_int32, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_var_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":82 + * self.write_var_int64(v) + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.write_bigendian_uint64(signed_v) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_13write_bigendian_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_int, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":85 + * self.write_bigendian_uint64(signed_v) + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t v): # <<<<<<<<<<<<<< + * if self.buffer_size < self.pos + 8: + * self.extend(8) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_15write_bigendian_uint64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_uin, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_uint64, __pyx_t_2) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":98 + * self.pos += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint32_t v = signed_v + * if self.buffer_size < self.pos + 4: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_17write_bigendian_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_int_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":108 + * self.pos += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t signed_v): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint16_t v = signed_v + * if self.buffer_size < self.pos + 2: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_19write_bigendian_int16, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_int_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int16, __pyx_t_2) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":116 + * self.pos += 2 + * + * cpdef write_bigendian_double(self, double d): # <<<<<<<<<<<<<< + * self.write_bigendian_int64((&d)[0]) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_21write_bigendian_double, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_dou, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_double, __pyx_t_2) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":119 + * self.write_bigendian_int64((&d)[0]) + * + * cpdef write_bigendian_float(self, float f): # <<<<<<<<<<<<<< + * self.write_bigendian_int32((&f)[0]) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_23write_bigendian_float, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_write_bigendian_flo, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_float, __pyx_t_2) < (0)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":122 + * self.write_bigendian_int32((&f)[0]) + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * return self.data[:self.pos] + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_25get, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_get, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_get, __pyx_t_2) < (0)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":125 + * return self.data[:self.pos] + * + * cpdef size_t size(self) except? -1: # <<<<<<<<<<<<<< + * return self.pos + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_27size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_2) < (0)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":134 + * assert self.data, "OutputStream realloc failed." + * + * cpdef _clear(self): # <<<<<<<<<<<<<< + * self.pos = 0 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_29_clear, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream__clear, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_OutputStream, __pyx_mstate_global->__pyx_n_u_clear, __pyx_t_2) < (0)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_12OutputStream_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputStream___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":151 + * self.count = 0 + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_3write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_2) < (0)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":157 + * self.count += blen + * + * cpdef write_var_int64(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * self.count += get_varint_size(signed_v) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_5write_var_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_v, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_var_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":160 + * self.count += get_varint_size(signed_v) + * + * cpdef write_var_int32(self, libc.stdint.int64_t signed_v): # <<<<<<<<<<<<<< + * if signed_v < 0: + * self.count += 5 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_7write_var_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_v_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_var_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":166 + * self.count += get_varint_size(signed_v) + * + * cpdef write_byte(self, unsigned char _): # <<<<<<<<<<<<<< + * self.count += 1 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_9write_byte, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_b, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":169 + * self.count += 1 + * + * cpdef write_bigendian_int64(self, libc.stdint.int64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_11write_bigendian_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_b_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":172 + * self.count += 8 + * + * cpdef write_bigendian_uint64(self, libc.stdint.uint64_t _): # <<<<<<<<<<<<<< + * self.count += 8 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_13write_bigendian_uint64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_b_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_uint64, __pyx_t_2) < (0)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":175 + * self.count += 8 + * + * cpdef write_bigendian_int32(self, libc.stdint.int32_t _): # <<<<<<<<<<<<<< + * self.count += 4 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_15write_bigendian_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_b_4, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":178 + * self.count += 4 + * + * cpdef write_bigendian_int16(self, libc.stdint.int16_t _): # <<<<<<<<<<<<<< + * self.count += 2 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_17write_bigendian_int16, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_write_b_5, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_write_bigendian_int16, __pyx_t_2) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":181 + * self.count += 2 + * + * cpdef size_t get_count(self): # <<<<<<<<<<<<<< + * return self.count + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_19get_count, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_get_cou, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_get_count, __pyx_t_2) < (0)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":184 + * return self.count + * + * cpdef bytes get(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_21get, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream_get, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream, __pyx_mstate_global->__pyx_n_u_get, __pyx_t_2) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream___reduc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_24ByteCountingOutputStream_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ByteCountingOutputStream___setst, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":197 + * self.allc = self.all = all + * + * cpdef bytes read(self, size_t size): # <<<<<<<<<<<<<< + * self.pos += size + * return self.allc[self.pos - size : self.pos] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_3read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read, __pyx_t_2) < (0)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":201 + * return self.allc[self.pos - size : self.pos] + * + * cpdef long read_byte(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 1 + * # Note: Some C++ compilers treats the char array below as a signed char. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_5read_byte, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_byte, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":208 + * return ( self.allc[self.pos - 1]) + * + * cpdef ssize_t size(self) except? -1: # <<<<<<<<<<<<<< + * return len(self.all) - self.pos + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_7size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":211 + * return len(self.all) - self.pos + * + * cpdef bytes read_all(self, bint nested=False): # <<<<<<<<<<<<<< + * return self.read(self.read_var_int64() if nested else self.size()) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_9read_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_all, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_all, __pyx_t_2) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":214 + * return self.read(self.read_var_int64() if nested else self.size()) + * + * cpdef libc.stdint.int64_t read_var_int64(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded long from a stream.""" + * # Inline common case. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_11read_var_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_var_int64, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_var_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":240 + * return result + * + * cpdef libc.stdint.int32_t read_var_int32(self) except? -1: # <<<<<<<<<<<<<< + * """Decode a variable-length encoded int32 from a stream.""" + * cdef libc.stdint.int64_t v = self.read_var_int64() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_13read_var_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_var_int32, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_var_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":245 + * return (v); + * + * cpdef libc.stdint.int64_t read_bigendian_int64(self) except? -1: # <<<<<<<<<<<<<< + * return self.read_bigendian_uint64() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_15read_bigendian_int64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_int64, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_int64, __pyx_t_2) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":248 + * return self.read_bigendian_uint64() + * + * cpdef libc.stdint.uint64_t read_bigendian_uint64(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 8 + * return (self.allc[self.pos - 1] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_17read_bigendian_uint64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_uint6, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_uint64, __pyx_t_2) < (0)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":259 + * | self.allc[self.pos - 8] << 56) + * + * cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 4 + * return (self.allc[self.pos - 1] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_19read_bigendian_int32, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_int32, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_int32, __pyx_t_2) < (0)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":266 + * | self.allc[self.pos - 4] << 24) + * + * cpdef libc.stdint.int16_t read_bigendian_int16(self) except? -1: # <<<<<<<<<<<<<< + * self.pos += 2 + * return (self.allc[self.pos - 1] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_21read_bigendian_int16, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_int16, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_int16, __pyx_t_2) < (0)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":271 + * | self.allc[self.pos - 2] << 8) + * + * cpdef double read_bigendian_double(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t as_long = self.read_bigendian_int64() + * return (&as_long)[0] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_23read_bigendian_double, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_doubl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_double, __pyx_t_2) < (0)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":275 + * return (&as_long)[0] + * + * cpdef float read_bigendian_float(self) except? -1: # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t as_int = self.read_bigendian_int32() + * return (&as_int)[0] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_25read_bigendian_float, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream_read_bigendian_float, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_read_bigendian_float, __pyx_t_2) < (0)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_InputStream, (type(self), 0xb474b31, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_InputStream__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_11InputStream_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputStream___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_6coders_6stream_InputStream, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":279 + * return (&as_int)[0] + * + * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value): # <<<<<<<<<<<<<< + * """Returns the size of the given integer value when encode as a VarInt.""" + * cdef libc.stdint.int64_t varint_size = 0 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_1get_varint_size, 0, __pyx_mstate_global->__pyx_n_u_get_varint_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_varint_size, __pyx_t_2) < (0)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_InputStream(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb474b31, 0xfdc6728, 0x0c1a71c, b'all, allc, pos') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_6stream_3__pyx_unpickle_InputStream, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_InputStream, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_coders_stream, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_InputStream, __pyx_t_2) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/coders/stream.pyx":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.coders.stream", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.coders.stream"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/coders/stream.pyx":42 + * libc.stdlib.free(self.data) + * + * cpdef write(self, bytes b, bint nested=False): # <<<<<<<<<<<<<< + * cdef size_t blen = len(b) + * if nested: +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 8; } index[] = {{179},{27},{28},{22},{17},{1},{1},{1},{1},{8},{29},{7},{6},{2},{9},{50},{14},{1},{24},{42},{44},{28},{34},{30},{35},{46},{47},{46},{46},{40},{40},{11},{29},{31},{16},{20},{33},{32},{32},{32},{32},{33},{21},{26},{26},{16},{12},{30},{32},{19},{16},{17},{18},{35},{34},{34},{34},{34},{35},{23},{28},{28},{20},{3},{25},{18},{1},{9},{6},{18},{1},{8},{5},{1},{8},{3},{9},{15},{12},{13},{5},{8},{10},{8},{6},{7},{3},{12},{14},{12},{11},{10},{26},{14},{12},{4},{8},{21},{20},{20},{20},{20},{21},{9},{14},{14},{10},{17},{13},{4},{12},{10},{12},{19},{8},{4},{5},{8},{6},{12},{1},{3},{5},{6},{5},{22},{21},{21},{21},{21},{22},{10},{15},{15},{58},{43},{12},{30},{30},{15},{9},{30},{30},{15},{23},{22},{22},{213},{48},{219},{80},{57},{109},{9},{177},{105},{13},{9},{7},{11},{36},{23},{12},{55},{9},{105},{36},{83},{128},{29}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (1648 bytes) */ +const char* const cstring = "(\265/\375`t\02053\000\372E\310\016:\020\227\033\000\000\nE\215\002\204Q\007\002\324(\260H\210\204HP\203Q8+3b\344DDF:EJ&\013\356\312-X\227\224\030\211x\332\tV-\247@g\302\016\301S#'\315\000\324\000\347\000\031,Mr\267\334\313E-\202#\026s\"\232\324fh\357\315\240\031\346\362^\313G\023\327H\035n\021\264\351\234G\032\336b\310\244\273\301\366\310.sH\202#\264\233\217@|\303\371\206!\206y\261-\260\321\2226M\352p\254E%k\271\316)\361P\230G\021\327,H\216#V\262J8\227\034\210\2337n\366\300\362\036\261M\316\211\245\030Z\016\233\026\257&E\2169\2515\346\260\250\313\272\231\352\254\223\3654\373\032\013\252J\305\177\366\213\274\314\023\365\234\024/\006D""\345\237c\265\312\322\230J\225\375\357\337\370\317\337t\234\023a\265\342v0\037j\3707V\353+-Q\251\2703v\036\250\255\263@\025\262\377\375\236\236\254\177\274\272\252\353p\351LJ\204\346~\3547|\024\334!\026J~\366\031^\345](\014\324\335#\316\207\331'{g`\255'B/\317\237\201W\357\3608}\325q\247\306\316_=\364\232\323\341,{=\002(\236\235Fg\250\210O\351N\370\037y\226\237\231\232\304c\331\035\244$V]\365RO\251\217\363\026-^\212G\333\315v\266\024\305\2524\201\017\315\027\rj\312\211\220n\240\257\327o\375\221n\360\365^P)\274\203]D\232Ji\320\220\005u\201\265\342p'\236\367p=\202\325\340\037|M':s!\336\246\177\375\006\377\214\237\342y\207P\020\000`E\245\236\276^\252\323(zPA/\351\371t\235\005\013\036\250\013t\006\377\362\343\251\300Zg\274\022^\336e\354v\372\223\226|.\365\241\267\016\032\322\022\035\t\2019\250\201\035r\010\315\214\210H\222\244\224\016A\010\202\221$\204\022\037r\262\220\245\2102\306\010\014\201\002\221!\021\td&\214\322\024$\205\345\322m\213}\327\225\025H\273\005(\024\253\227\250\216\3416\034\337\257\224\214;\020R\256\220jy\206\262\273\274\202\260?H\325G\000'\326\211\016\321+\001\350\235L\274\023^+\253.vk\201Q\3651\365\001fe>\313P\347\324H*\256i\247\001\232\3047\213SXvr\312T\226\243\2035\017\n\224D\0216%\236&\036\211\t\372\312\"\325\016\rJ\265\346Ov1\037K26\260\352!+\025Ujo\303\225\303\370\016\242\2512\304\305\345D7\267!f(}\302\214\254\271\230Ql\250\020\331-e_\332\355u\320\215\301\031\003mQ\267\013\220\344\212if\013zWA\002\343\017"; + PyObject *data = __Pyx_DecompressString(cstring, 1648, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (1800 bytes) */ +const char* const cstring = "BZh91AY&SY/\331\234\234\000\002\002\377\377\377\377\377\361\377\377\377\337\377\347\377\340\277\377\377\364@@@@@@@@@@@@@\000@\000`\006\275\361\342\036-\313\rt\014\201^\001\340d\224\236\240\023Lj~\223\3256\247\2651&\375Q\223\322\236Q\223\365\032O)\2622\t\206\210<\232#\322d\0314\332\214\021\341\251\241\rD\322OM\245=\251\244zL\200\000h\000\000\000\000\000\000\000\000\000\000\006\232\023H*y\250\236\232\231=C&\200\000\320\0004\003@\000\001\240\320h\017P=FA\2403RB\231'\265\021\372\246\217I\351\007\352\203M\251\241\2404h\000\006A\240\031\000\000\001\246\201\241\352h8\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\222 M\022i\350\024\3315=\032\230I\352yG\251\240\323C@\310\000\000\000\0002\0004\006M(\260\207{\033\272\335\355/\314\017K\366\257\022P\277Q\010q:s9NL\037\327~\364\306\210\310\261\"\200B\372\005\031\t\014\300\206\030f\016\312\215\323W\212)(\303'l(!X\3023E\"\2251\224&\024`l\"OD\001D\206&\220\330\0342\023#\004\206\222rq\212\013\273c\340\233\244\300\366\024\232;!\262\365\210,\377Z]>#\200D\244\325U\000N\304x\266\r\021\013 \341\305\000M\020* \310\206\260UP,\rZ\261\025\204G@\221\355\321q\322\\\031x>\3163/\306\216^\272\370\346\325\037\177\312\327J\277\3224\244#\365qYD`\235\231\027\2658\350\2317\231\366\310T\005\221\327\2627\3305\311I\247\317\224\335\343\275U\321\341\3420$\\=\305\270mH\347\370P\272\215nO&H\213\275\235\210\3209x\2463\032vv\n\256\276\216=[:\265-`s\231\001&\020u\004\231\355\351\350\346^\214F\334\361\314\317\241\236\013u\003<\251\010\2637\260\"24J\266\210\263\334\365}\264\004\021rU\255\221\216\352EP\036\3120F\367zS\226\244\253\320\345\231Y[Z.\036\223%\254\237I\024\331\310B\tjP\235\231)\242\325\216\300\004*\210\351\276\331\221\300\267\254\037:f\234l 1\010K\026Tv\253\201\220@M!\002%\212\3008\351\335\225(\251\337\n!0\036\0130\350Xh<\022\024\024\020\361\306\341\201\322\227\031\2633m\020\306KM\030E\004)`\222]I4\2219\201!\312\005R\"\243\230iF\257\201#u\213\355s\264\300B\034\202]tE}\002\024\355aq4'\216x$X\230\210\016\214\313i\306\376\"gKC\0052\032\307\2644D\026\235(\312\213\262nUt>\204[\375g\316\355L\035\002\245k\350$\370\226A\365\001m\266\234o\010yy1\211\033\216U(P\220\312\337\327\0203\001*{J^\023$\213\357`\210\360\001\225\234\243Z\023\264/`\022%n\322LbE\n#\274ja\222)\376z2\034\356\207p\t\204\2102\250\2220\034\336SR\311\032\220\266\200\036s\327:n\006x\361\306\237\363\325\366\335\343\336*+\025\001?\020\316/\000\303\222\271\371\251\306(J\003^Nf\316\376/2\345\306\024]\306mD\232E1R@\005@\345\3243H\026,dQ\312\226i\262\274\241\200\214=\315\002\2013D\346\312$@%\036\231RZa\311Y\304\t\237\345\355\344\252\245\026&\324\t\026+%\024\230\264\2632\037\361w$S\205\t\002\375\231\311\300"; + PyObject *data = __Pyx_DecompressString(cstring, 1800, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1635 bytes) */ +const char* const cstring = "x\332\305U\315W\333F\020\017\216\261\035\240!&\220\2649\244k\022\362\035\250\211\003}M\232\324!\237\3575\037&\264iO\373\326\322bTd\311\226V\016\356\313\201\343\036\367\250\243\216>\352\350\243\217\034u\364\321\177B\376\204\316J\006l0\206\244\207\360\314jvfvv\276~\263oLF\021\333 \014\255\324\331\206i \315F*\325\265\"\265\010\243z\035\331\314\322\024F-\251d\240w\317\336\335\315\375\234C\304P\221E\377\241\n\263\221\355\024\025\235\3306\265\221\271\216\212\216\2463\315@\254^\241\366\232\332\304\256\033\212f\002\3232\035\300#\265\2130\203\345K\204qT!E\007.\030\307\314\"\n-\022eS\305X\225\346\243\317:\306\353\216\241`\014\325\333\233\201\222\000\237\300%,\213\030\n\243^\300X\263\361\336m\340{\031n*\023\260\017\177eSut\251\203\rR\206/\270\003\017\222\374~\304\270bV`\201\350\024R\321\244NHoPe\323v\312\321\316\2426""\2741\021\335\275N\222\362\335\215(\307\250h\312&\\\321\323\344\221\244\306\344K%\315V\035\242G\327K\\\354\016\210\201Ca\320 \030\004\376A\200\037\004\362\201\300\336\003s?\200\373A\273\377\254\036B\345\036\203nIL\352\353!2\273\031\006\252\3732\367\340\025\017\300\256\255\225\014(EM\226\263\253\305\200\300\330\251\250\260sl\272w\246V#:\374\034\032.v\330\241\203q:\020\232\003\2214\020\200\003q;\030f\373\310:\000\246\003\370\211\222\311\320\215.q\007\001\201\272\035\265\251U\240\345\355\na\312\306\315S\007z<8u\263\221\356\304`i\307\256x\331v\354t;~^d\333\361\357x\241\035On3\236m'\222\355\330\031\236\016B\205\3708\317\361j\020[\3643\355\3705O\rn=nV\333\361\t\376R\274p\263\356\013/\353\345\203X\316\317\267\343\327=\026\334\376\2555\"\245\257\304\0077\357\376\345\025<\022\304B\036\330\t&\347\274\302v\246kS\022)\236\022\221\214;\"/\326\334\031\267\350%=\326\310\006\241\217{\222\277]\325[\360/\370\237Z\271\226\263\223\3375\342\210'Bu3\333\231\317\211S\243\263\336\017\215\331\0068\222\nR\337\273#.D\360K3\323\211g\274i\017K\007\307\203\361\214\007\334\253\236\334\360{\234p&\226\334)7\347B\204OZ\373\016M\360\267\300t\274\274\267\326\230i\024\375\221v\002\214^v\315\306\232?\343\023\2375\357\267b\255+\255\265\235\364\021\222\367;#\337^\022\2458\316_\2071:\336\023\217\264\023c\374\272H\213P2\312\013\\\0257\334\335\300O\246\177'\270<\01799\355g\367ys\302rg\276-?.K|\210OzB\233\365\276$\276\341\366\272]\375\345\375\362\325\007\277\252\001\340\2121~[\024B(H\220\\\010f\346\302\273H\203E\211\014\375Hn;|\205W\333\t\230\003R\355\242 \022\356\260\214J\336\037bV\344e\252\256\211\323\301\371\205\206\345O\301\341\361\264\230\016f\262@/\372\253\276\335\274\332\244\255\305V\241\235:\313u7\343\302$9'F\305{\027\034\234\224\266\317\360\031N\305\242\000\2153\322\352\232\270$\225$\273\010N\354\036\353\0006\263\333#\237S\247F\317\202\316\005\301\334e\357\252\364e\202\277\020Y\361\334\275#7\311\355\032\377 \236\271\323.\330\233\202\002\246.\212j\007\026\346\336\207\031R\225\032\325vj2\230\274\323x""\352\217\370\027\233\343\255\345\235L\247\237\223\215z~L,xi/\263\273\t\2111\236\221\371\2039\324\270\346C\301\303t\204\371\222\256M\360\345`j\026\374\242\215,X\033\205\014D#M\226\242\030\240%\277\324,4\213\255\221V\272\313\376\321\255zP\221N\034\210\000\375\344\2177\037\2646\203\302\252\234\300\017\334\r\217D>\177\022\313\000\310\324\335F\241a4\337\354\204\223\256\353eRN\315\216\354\343\016(Z\374<\177&\246\273S3\356\275\016\213\002E\232\343U\021\027/\335\260b7 3\211\244\254iB\346|\225[\002Zi\202\347e\342\323\355\3249\310|\"\354\021az\005\311\234\346\262@\335\001|Q\330a)\303d&\306\202\261K\3216\314\3221:\3629\371\325\215\271W]\352-J\333\273P\233\274 \010\224i\311\233\362r^\255\361\301_\361\253\007qz\344\341\377;\207\216\237\023\311\355\272\210\311\264\215\361[\"\337\t?o\345C\367\037m\261\316\233"; + PyObject *data = __Pyx_DecompressString(cstring, 1635, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (4468 bytes) */ +const char* const bytes = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.OutputStream malloc failed.OutputStream realloc failed.VarInt not terminated.VarLong too long.< >?add_noteapache_beam/coders/stream.pyxdisableenablegcisenabledno default __reduce__ due to non-trivial __cinit___ByteCountingOutputStreamByteCountingOutputStream.__reduce_cython__ByteCountingOutputStream.__setstate_cython__ByteCountingOutputStream.getByteCountingOutputStream.get_countByteCountingOutputStream.writeByteCountingOutputStream.write_byteByteCountingOutputStream.write_bigendian_int64ByteCountingOutputStream.write_bigendian_uint64ByteCountingOutputStream.write_bigendian_int32ByteCountingOutputStream.write_bigendian_int16ByteCountingOutputStream.write_var_int64ByteCountingOutputStream.write_var_int32InputStreamInputStream.__reduce_cython__InputStream.__setstate_cython__InputStream.readInputStream.read_allInputStream.read_bigendian_doubleInputStream.read_bigendian_floatInputStream.read_bigendian_int16InputStream.read_bigendian_int32InputStream.read_bigendian_int64InputStream.read_bigendian_uint64InputStream.read_byteInputStream.read_var_int32InputStream.read_var_int64InputStream.sizeOutputStreamOutputStream.__reduce_cython__OutputStream.__setstate_cython__OutputStream._clearOutputStream.getOutputStream.sizeOutputStream.writeOutputStream.write_bigendian_doubleOutputStream.write_bigendian_floatOutputStream.write_bigendian_int64OutputStream.write_bigendian_int32OutputStream.write_bigendian_int16OutputStream.write_bigendian_uint64OutputStream.write_byteOutputStream.write_var_int32OutputStream.write_var_int64__Pyx_PyDict_NextRefallapache_beam.coders.streamasyncio.coroutinesb__class___clearcline_in_tracebackd__dict___dictf__func__getget_countget_varint_size__getstate___is_coroutineitems__main____module____name__nested__new__pop__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx""_type__pyx_unpickle_InputStream__pyx_vtable____qualname__readread_allread_bigendian_doubleread_bigendian_floatread_bigendian_int16read_bigendian_int32read_bigendian_int64read_bigendian_uint64read_byteread_var_int32read_var_int64__reduce____reduce_cython____reduce_ex__self__set_name__setdefault__setstate____setstate_cython__signed_vsizestate__test__updateuse_setstatevvalvaluevalueswritewrite_bigendian_doublewrite_bigendian_floatwrite_bigendian_int16write_bigendian_int32write_bigendian_int64write_bigendian_uint64write_bytewrite_var_int32write_var_int64int64_t (int64_t, int __pyx_skip_dispatch)\000get_varint_size\320\000)\250\021\340\002)\250\021\330\002#\2401\330\002\003\330\004\023\2201\330\004\r\210Q\330\004\007\200t\2101\330\006\007\330\002\t\210\021\320\002#\2401\330\004\013\2104\210q\320\0022\260!\330\004&\240d\320*?\270q\330\004\014\210H\220G\2301\230G\2401\240A\320\0024\260A\330\004'\240t\320+@\300\001\330\004\014\210I\220W\230A\230X\240Q\240a\320\002@\300\001\330\004\013\2104\320\017%\240Q\200!\330\004\013\2104\210q\200!\330\004\010\210\010\220\001\330\004\013\2104\210u\220A\220T\230\025\230b\240\007\240t\2501\320\002)\250\021\330\004\013\2104\210u\220A\220Y\230d\240/\260\026\260|\3004\300u\310A\200!\330\004\013\2104\210u\220B\220d\230!\200!\360\006\000\005\"\240\031\250\"\250A\330\004\010\320\010\030\230\001\230\021\320\002:\270!\340\004!\240\024\240_\260A\330\004\013\320\013!\240\021\320\002$\240A\330\004\013\2103\210a\210t\2206\230\022\2304\230q\320\002B\300!\330\004\010\210\010\220\001\330\004\014\210O\2304\230u\240A\240T\250\025\250b\260\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300T\310\021\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330""\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\200!\330\004\010\210\004\210M\230\022\2304\230u\240B\240a\330\006\n\210'\220\021\220!\330\004\010\210\005\210Q\210d\220(\230!\330\004\010\210\010\220\001\200!\330\004\010\210\004\210M\230\022\2304\230u\240B\240a\330\006\n\210'\220\021\220!\330\004\010\210\005\210Q\210d\220,\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\004\260A\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250a\330\004\010\210\010\220\001\200!\330\004\"\240!\330\004\010\210\004\210M\230\022\2304\230u\240B\240a\330\006\n\210'\220\021\220!\330\004\010\210\005\210Q\210d\220,\320\036.\250b\260\004\260A\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250a\330\004\010\210\010\220\001\320\002@\300\001\330\004\010\210\010\220\001\330\004\014\210O\2304\230u\240A\240T\250\025\250b\260\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300T\310\021\320\002@\300\001\330\004\010\210\010\220\001\330\004\014\210O\2304\230u\240A\240T\250\025\250b\260\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300T\310\021\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\330\006\010\320\010\036\230o\250T\260\025\260a\260t\2705\300\002\300#\300S\310\001\200\001\330\004\n\210+\220Q\320\002:\270!\360\006\000\005\026\320\025%\240T\250\025\250a\250t\2601\330\004\010\210\010\220\001\330\004\007\200u\210C\210q\330\006\r\210Q\360\006\000\005\027\220a\330\004&""\240a\330\004\005\330\006\r\210U\220\"\220A\330\006\n\210&\220\003\320\023/\250r\260\022\2601\330\013\021\220\024\320\0251\260\022\2602\260R\260s\270$\270e\3002\300Q\330\010\016\210l\230!\2301\330\006\020\220\005\220S\230\001\330\006\017\210q\330\006\t\210\025\210e\2202\220Q\330\010\t\330\006\r\210T\220\032\2301\330\006\t\210\025\210b\220\001\330\010\016\210l\230!\2301\340\004\013\2101\200\001\360\010\000\005\016\210T\220\026\220t\2307\240$\240a\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2305\240\007\240q\330\004\007\200q\330\010\017\320\017,\250D\260\001\260\027\270\013\3007\310!\340\010\017\320\017,\250D\260\001\260\027\270\013\3001\200!\330\004\010\210\n\220/\240\021\240!\200!\330\004\010\210\n\220!\200!\330\004\n\210!\200\001\330\004)\250\021\250&\260\001\320\002&\240a\330\004\010\210\010\220\001\360\010\000\005\014\2107\320\022\"\240$\240e\2501\250D\260\005\260R\260q\200!\330\004\010\320\010\036\230b\320 6\260g\270Q\270b\300\001\300\021\200!\330\004\010\320\010\037\230q\240\001\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220;\230h\240a\240q\330\004\007\200|\2207\230!\330\010-\250Q\250n\270N\310!\330\004\013\2101\200!\330\004\010\210\007\210q\200!\340\004\"\240!\340\004\007\200r\210\023\210E\220\024\220T\230\025\230b\240\004\240M\260\022\2601\330\006\n\210%\210q\220\004\220H\230A\330\006\n\210(\220!\330\006\007\360\006\000\005\006\330\006\r\210R\210r\220\021\330\006\014\210A\330\006\t\210\021\330\010\020\220\001\330\006\n\210+\220Q\220o\240Q\330\006\t\210\024\210Q\330\010\t\320\002)\250\021\330\004\027\220s\230!\2301\330\004\007\200q\330\006\n\320\n\032\230!\2301\330\004\010\210\n\220!\320\002)\250\021\330\004\027\220s\230!\2301\330\004\007\200q\330\006\n\320\n\032\230!\2301\330\004\007\200t\210=\230\002\230$\230e\2402\240Q\330\006\n\210'\220\021\220!\330\017\026\220a\220t\2306\240\022\2404\240v\250W\260C\260q\330\004\010\210\010\220\001\200!\330\004\"""\240!\330\004\007\200t\210=\230\002\230$\230e\2402\240Q\330\006\n\210'\220\021\220!\330\004\010\210\005\210Q\210d\220,\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\003\2601\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250b\260\004\260A\330\004\010\210\005\210Q\210d\220%\220r\230\025\320\036.\250a\330\004\010\210\010\220\001\200!\330\004\007\200y\220\002\220!\330\006\n\210*\220A\340\006\n\210*\220O\2401\240A"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 134; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 17) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 134; i < 170; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 170; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 134; + for (Py_ssize_t i=0; i<36; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int32_t const cint_constants_4[] = {189221681L}; + int64_t const cint_constants_8[] = {4294967295LL}; + for (int i = 0; i < 2; i++) { + numbertab[i] = PyLong_FromLongLong((i < 1 ? cint_constants_4[i - 0] : cint_constants_8[i - 1])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 2; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 42}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_mstate->__pyx_kp_b_iso88591_s_1_q_1_t_e2Q_at6_4vWCq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 51}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_val}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_byte, __pyx_mstate->__pyx_kp_b_iso88591_M_4uBa_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 57}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_var_int64, __pyx_mstate->__pyx_kp_b_iso88591_r_E_T_b_M_1_q_HA_Rr_A_QoQ_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 76}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_var_int32, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 82}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int64, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 85}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_v}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_uint64, __pyx_mstate->__pyx_kp_b_iso88591_M_4uBa_Qd_b_1_Qd_r_b_1_Qd_r_b_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 98}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int32, __pyx_mstate->__pyx_kp_b_iso88591_t_e2Q_Qd_b_1_Qd_r_b_1_Qd_r_b_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 108}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int16, __pyx_mstate->__pyx_kp_b_iso88591_M_4uBa_Qd_b_A_Qd_r_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 116}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_double, __pyx_mstate->__pyx_kp_b_iso88591_b_6gQb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 119}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_f}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_float, __pyx_mstate->__pyx_kp_b_iso88591_b_6gQb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 122}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_get, __pyx_mstate->__pyx_kp_b_iso88591_4uBd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 125}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_kp_b_iso88591_1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 134}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_clear, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 151}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_mstate->__pyx_kp_b_iso88591_s_1_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 157}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_var_int64, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 160}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signed_v}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_var_int32, __pyx_mstate->__pyx_kp_b_iso88591_y_A_O1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 166}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_byte, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int64, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 172}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_uint64, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 175}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int32, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_write_bigendian_int16, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_get_count, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 184}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_get, __pyx_mstate->__pyx_kp_b_iso88591__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 197}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read, __pyx_mstate->__pyx_kp_b_iso88591_4uAT_b_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 201}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_byte, __pyx_mstate->__pyx_kp_b_iso88591_a_7_e1D_Rq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 208}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_kp_b_iso88591_A_3at6_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nested}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_all, __pyx_mstate->__pyx_kp_b_iso88591_4uAYd_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 214}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_var_int64, __pyx_mstate->__pyx_kp_b_iso88591_T_at1_uCq_Q_a_a_U_A_r_1_1_2Rs_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 240}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_var_int32, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 245}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_int64, __pyx_mstate->__pyx_kp_b_iso88591_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 248}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_uint64, __pyx_mstate->__pyx_kp_b_iso88591_B_O4uAT_b_oT_at5_T_oT_at5_S_oT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 259}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_int32, __pyx_mstate->__pyx_kp_b_iso88591_O4uAT_b_oT_at5_T_oT_at5_S_oT_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_int16, __pyx_mstate->__pyx_kp_b_iso88591_O4uAT_b_oT_at5_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 271}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_double, __pyx_mstate->__pyx_kp_b_iso88591_4A_t_IWAXQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 275}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_read_bigendian_float, __pyx_mstate->__pyx_kp_b_iso88591_2_d_q_HG1G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t7_a_G1F_a_vWE_Q_q_t5_q_q_D_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 279}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_coders_stream_pyx, __pyx_mstate->__pyx_n_u_get_varint_size, __pyx_mstate->__pyx_kp_b_iso88591_1_1_Q_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_InputStream, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyErrFetchRestore (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* CIntToDigits (used by CIntToPyUnicode) */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + Py_ssize_t padding_length = ulength - 1; + if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) padding_length); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= padding_length; + memset(cpos, padding_char, (size_t) padding_length); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, padding_length); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (size_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(size_t)*3+2]; + char *dpos, *end = digits + sizeof(size_t)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + size_t remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (size_t) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (size_t) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (size_t) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* PyErrExceptionMatches (used by GetAttr3) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName (used by GetModuleGlobalName) */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { + PyObject *cobj; + union { + void (*fp)(void); + void *p; + } tmp; + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned char) -1; + val = __Pyx_PyLong_As_unsigned_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT)) { + return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT)) { + return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT)) { + return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + unsigned char val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned char) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned char) 1) << (sizeof(unsigned char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned char) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned char"); + return (unsigned char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned char"); + return (unsigned char) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + uint64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (uint64_t) -1; + val = __Pyx_PyLong_As_uint64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) { + return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) { + return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) { + return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(uint64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(uint64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + uint64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (uint64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (uint64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (uint64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (uint64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((uint64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((uint64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (uint64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to uint64_t"); + return (uint64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to uint64_t"); + return (uint64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int32_t) -1; + val = __Pyx_PyLong_As_int32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) { + return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) { + return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) { + return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int32_t"); + return (int32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int32_t"); + return (int32_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int16_t __Pyx_PyLong_As_int16_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int16_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int16_t) -1; + val = __Pyx_PyLong_As_int16_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 2 * PyLong_SHIFT)) { + return (int16_t) (((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 3 * PyLong_SHIFT)) { + return (int16_t) (((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) >= 4 * PyLong_SHIFT)) { + return (int16_t) (((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int16_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int16_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int16_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int16_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int16_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + return (int16_t) ((((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int16_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + return (int16_t) ((((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) { + return (int16_t) (((int16_t)-1)*(((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int16_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT)) { + return (int16_t) ((((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int16_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int16_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int16_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int16_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int16_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int16_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int16_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int16_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int16_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int16_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int16_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int16_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int16_t) 1) << (sizeof(int16_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int16_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int16_t"); + return (int16_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int16_t"); + return (int16_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned char) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned char) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned char), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned char)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(uint64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(uint64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(uint64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int32_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int32_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int32_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int16_t(int16_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int16_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int16_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int16_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int16_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int16_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__5); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/coders/stream.cp314-win_amd64.pyd b/sdks/python/apache_beam/coders/stream.cp314-win_amd64.pyd new file mode 100644 index 000000000000..467e644fc5e3 Binary files /dev/null and b/sdks/python/apache_beam/coders/stream.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/metrics/cells.c b/sdks/python/apache_beam/metrics/cells.c new file mode 100644 index 000000000000..457bf7ddf1db --- /dev/null +++ b/sdks/python/apache_beam/metrics/cells.c @@ -0,0 +1,51305 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.metrics.cells", + "sources": [ + "apache_beam/metrics/cells.py" + ] + }, + "module_name": "apache_beam.metrics.cells" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__metrics__cells +#define __PYX_HAVE_API__apache_beam__metrics__cells +/* Early includes */ +#include +#include +#include + + #if CYTHON_COMPILING_IN_LIMITED_API + #ifdef _MSC_VER + #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.") + #else + #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API. + #endif + #endif + +#include "datetime.h" + + #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->DateTimeType) + #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType) + + #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC + #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name) + + /* Backport for Python < 3.10 */ + #if PY_VERSION_HEX < 0x030a00a1 + #ifndef PyDateTime_TIME_GET_TZINFO + #define PyDateTime_TIME_GET_TZINFO(o) ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None) + #endif + #ifndef PyDateTime_DATE_GET_TZINFO + #define PyDateTime_DATE_GET_TZINFO(o) ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None) + #endif + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/metrics/cells.py", + "cpython/datetime.pxd", + "apache_beam/metrics/cells.pxd", + "", + "cpython/type.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData; +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr; +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr; +struct __pyx_opt_args_7cpython_8datetime_time_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_new; +struct __pyx_opt_args_7cpython_8datetime_timezone_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp; + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_time_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_timezone_new { + int __pyx_n; + PyObject *name; +}; + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp { + int __pyx_n; + PyObject *tz; +}; + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab; + PyObject *_lock; + PyDateTime_DateTime *_start_time; +}; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int64_t value; +}; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data; +}; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + PyObject *data_class; + PyObject *data; +}; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":62 + * + * + * cdef class DistributionData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData { + PyObject_HEAD + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/metrics/cells.pxd":69 + * + * + * cdef class _BoundedTrieNode(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode { + PyObject_HEAD + int64_t _size; + PyObject *_children; + int _truncated; +}; + + +/* "apache_beam/metrics/cells.pxd":74 + * cdef readonly bint _truncated + * + * cdef class BoundedTrieData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData { + PyObject_HEAD + int64_t _bound; + PyObject *_singleton; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *_root; +}; + + +/* "apache_beam/metrics/cells.py":695 + * for name, child in proto.children.items() + * } + * node._size = max(1, sum(child._size for child in node._children.values())) # <<<<<<<<<<<<<< + * return node + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_child; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; +}; + + +/* "apache_beam/metrics/cells.py":723 + * return delta + * + * def add_all(self, segments_iter): # <<<<<<<<<<<<<< + * return sum(self.add(segments) for segments in segments_iter) + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self; +}; + + +/* "apache_beam/metrics/cells.py":724 + * + * def add_all(self, segments_iter): + * return sum(self.add(segments) for segments in segments_iter) # <<<<<<<<<<<<<< + * + * def trim(self) -> int: +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *__pyx_outer_scope; + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_segments; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); +}; + + +/* "apache_beam/metrics/cells.py":765 + * return delta + * + * def flattened(self): # <<<<<<<<<<<<<< + * if self._truncated: + * yield (True, ) +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened { + PyObject_HEAD + PyObject *__pyx_v_child; + PyObject *__pyx_v_flattened; + PyObject *__pyx_v_prefix; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); +}; + + +/* "apache_beam/metrics/cells.py":787 + * + * def __repr__(self): + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) # <<<<<<<<<<<<<< + * + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_genexpr; + PyObject *__pyx_v_t; +}; + +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_s; +}; + + + +/* "apache_beam/metrics/cells.py":55 + * + * + * class MetricCell(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell { + int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + + +/* "apache_beam/metrics/cells.py":99 + * + * + * class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + + +/* "apache_beam/metrics/cells.py":164 + * + * + * class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; +static CYTHON_INLINE int __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell__update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); + + +/* "apache_beam/metrics/cells.py":223 + * + * + * class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update_locked)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + + +/* "apache_beam/metrics/cells.py":262 + * + * + * class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + + +/* "apache_beam/metrics/cells.py":291 + * + * + * class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + + +/* "apache_beam/metrics/cells.py":320 + * + * + * class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* pyint_simplify.proto */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); + +/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* pyfrozenset_new.proto (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* PySetContains.proto */ +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* CallUnboundCMethod1.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* ClassMethod.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include "descrobject.h" +#endif +CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* SwapException.proto (used by CoroutineBase) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterNextPlain.proto (used by CoroutineBase) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_10MetricCell_update(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_11CounterCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static CYTHON_INLINE int __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell__update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_9GaugeCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_13StringSetCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_15BoundedTrieCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "datetime" */ + +/* Module declarations from "cpython.datetime" */ + +/* Module declarations from "apache_beam.metrics.cells" */ +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle__BoundedTrieNode__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_BoundedTrieData__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.metrics.cells" +extern int __pyx_module_is_main_apache_beam__metrics__cells; +int __pyx_module_is_main_apache_beam__metrics__cells = 0; + +/* Implementation of "apache_beam.metrics.cells" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_property; +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_sum; +static PyObject *__pyx_builtin_max; +/* #### Code section: string_decls ### */ +static const char __pyx_k_count_max_min_sum[] = "count, max, min, sum"; +static const char __pyx_k_bound__root__singleton[] = "_bound, _root, _singleton"; +static const char __pyx_k_children__size__truncated[] = "_children, _size, _truncated"; +static const char __pyx_k_This_file_contains_metric_cell[] = "\nThis file contains metric cell classes. A metric cell is used to accumulate\nin-memory changes to a metric. It represents a specific metric in a single\ncontext.\n"; +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_2update(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_4get_cumulative(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_6to_runner_api_monitoring_info(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_8to_runner_api_monitoring_info_impl(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_10reset(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_12__reduce__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_17MetricCellFactory___call__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_6inc(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_8dec(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_10update(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_12get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_14to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_5value___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_6update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_8get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_10to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4data___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_data_class); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_6set(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_8update(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_12to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_2__set__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_4__del__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell_2to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_2add(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_4to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_2add(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_4to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_8max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_10min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_12count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_14sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_16mean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_8value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_10timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_10get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_12combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_14singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_16identity_element(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_sum, PyObject *__pyx_v_count, PyObject *__pyx_v_min, PyObject *__pyx_v_max); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_2__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_4__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_6__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_8get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_10get_result(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_12combine(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_14singleton(PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_16identity_element(void); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3sum___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_5count___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3min___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3max___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_18__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_20__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_string_set, PyObject *__pyx_v_string_size); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_10get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_12add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strings); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_14combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_16add_until_capacity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_combined, PyObject *__pyx_v_current_size, PyObject *__pyx_v_others); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_18singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_20identity_element(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode___init__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_2to_proto(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4from_proto(PyObject *__pyx_v_proto); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_6size(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8contains(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10add(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_12add_all(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments_iter); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_14trim(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_16merge(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_18flattened(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_21__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_23__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_25__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_27__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_29__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_root, PyObject *__pyx_v_singleton, PyObject *__pyx_v_bound); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_2size(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_4contains(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6flattened(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_8to_proto(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10from_proto(PyObject *__pyx_v_proto); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_12as_trie(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_14__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_16__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_18__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_20get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_22get_result(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_24add(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_segments); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_26combine(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_other); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_28singleton(PyObject *__pyx_v_value); /* proto */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_30identity_element(void); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_32__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_34__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bucket_type); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_2reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_4combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_6update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_10to_runner_api_monitoring_info(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bucket_type); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_4__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_8p99(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_10p95(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_12p90(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_14histogram(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_histogram); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_10combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_12identity_element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bucket_type); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_14get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_16to_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_18from_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_proto); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_2__pyx_unpickle__BoundedTrieNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_4__pyx_unpickle_BoundedTrieData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_CounterCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_GaugeCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_StringSetCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieCell(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells__BoundedTrieNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_8datetime_date; + PyTypeObject *__pyx_ptype_7cpython_8datetime_time; + PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime; + PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta; + PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_MetricCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_CounterCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_DistributionCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_GaugeCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_StringSetCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_DistributionData; + PyObject *__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyObject *__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr; + PyObject *__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_k__3; + PyObject *__pyx_tuple[21]; + PyObject *__pyx_codeobj_tab[133]; + PyObject *__pyx_string_tab[487]; + PyObject *__pyx_number_tab[9]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr[8]; +int __pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_AbstractMetricCell_2 __pyx_string_tab[1] +#define __pyx_kp_u_BoundedTrieData __pyx_string_tab[2] +#define __pyx_kp_u_BoundedTrieData_3 __pyx_string_tab[3] +#define __pyx_kp_u_BoundedTrieNode_3 __pyx_string_tab[4] +#define __pyx_kp_u_DistributionData_sum_count_min_m __pyx_string_tab[5] +#define __pyx_kp_u_DistributionResult_sum_count_min __pyx_string_tab[6] +#define __pyx_kp_u_For_internal_use_only_no_backwar __pyx_string_tab[7] +#define __pyx_kp_u_For_internal_use_only_no_backwar_2 __pyx_string_tab[8] +#define __pyx_kp_u_For_internal_use_only_no_backwar_3 __pyx_string_tab[9] +#define __pyx_kp_u_For_internal_use_only_no_backwar_4 __pyx_string_tab[10] +#define __pyx_kp_u_GaugeData_value_timestamp __pyx_string_tab[11] +#define __pyx_kp_u_GaugeResult_value_timestamp __pyx_string_tab[12] +#define __pyx_kp_u_HistogramCell_2 __pyx_string_tab[13] +#define __pyx_kp_u_HistogramData_2 __pyx_string_tab[14] +#define __pyx_kp_u_HistogramData_3 __pyx_string_tab[15] +#define __pyx_kp_u_HistogramResult_2 __pyx_string_tab[16] +#define __pyx_kp_u_HistogramResult_3 __pyx_string_tab[17] +#define __pyx_kp_u_Iterable_str __pyx_string_tab[18] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[19] +#define __pyx_kp_u_Optional_HistogramData __pyx_string_tab[20] +#define __pyx_kp_u_Optional_Set __pyx_string_tab[21] +#define __pyx_kp_u_Set_str __pyx_string_tab[22] +#define __pyx_kp_u_Set_tuple __pyx_string_tab[23] +#define __pyx_kp_u_StringSetData_2 __pyx_string_tab[24] +#define __pyx_kp_u_StringSetData_3 __pyx_string_tab[25] +#define __pyx_kp_u_StringSet_metrics_reaches_capaci __pyx_string_tab[26] +#define __pyx_kp_u_The_result_of_a_Distribution_met __pyx_string_tab[27] +#define __pyx_kp_u__2 __pyx_string_tab[28] +#define __pyx_kp_u__4 __pyx_string_tab[29] +#define __pyx_kp_u_add_note __pyx_string_tab[30] +#define __pyx_kp_u_apache_beam_metrics_cells_py __pyx_string_tab[31] +#define __pyx_kp_u_disable __pyx_string_tab[32] +#define __pyx_kp_u_enable __pyx_string_tab[33] +#define __pyx_kp_u_gc __pyx_string_tab[34] +#define __pyx_kp_u_isenabled __pyx_string_tab[35] +#define __pyx_kp_u_metrics_pb2_BoundedTrie __pyx_string_tab[36] +#define __pyx_kp_u_metrics_pb2_BoundedTrieNode __pyx_string_tab[37] +#define __pyx_kp_u_metrics_pb2_HistogramValue __pyx_string_tab[38] +#define __pyx_kp_u_stringsource __pyx_string_tab[39] +#define __pyx_n_u_AbstractMetricCell __pyx_string_tab[40] +#define __pyx_n_u_AbstractMetricCell_combine __pyx_string_tab[41] +#define __pyx_n_u_AbstractMetricCell_get_cumulativ __pyx_string_tab[42] +#define __pyx_n_u_AbstractMetricCell_reset __pyx_string_tab[43] +#define __pyx_n_u_AbstractMetricCell_set __pyx_string_tab[44] +#define __pyx_n_u_AbstractMetricCell_to_runner_api __pyx_string_tab[45] +#define __pyx_n_u_AbstractMetricCell_update __pyx_string_tab[46] +#define __pyx_n_u_BoundedTrie __pyx_string_tab[47] +#define __pyx_n_u_BoundedTrieCell __pyx_string_tab[48] +#define __pyx_n_u_BoundedTrieCell_add __pyx_string_tab[49] +#define __pyx_n_u_BoundedTrieCell_to_runner_api_mo __pyx_string_tab[50] +#define __pyx_n_u_BoundedTrieData_2 __pyx_string_tab[51] +#define __pyx_n_u_BoundedTrieData___reduce_cython __pyx_string_tab[52] +#define __pyx_n_u_BoundedTrieData___setstate_cytho __pyx_string_tab[53] +#define __pyx_n_u_BoundedTrieData_add __pyx_string_tab[54] +#define __pyx_n_u_BoundedTrieData_as_trie __pyx_string_tab[55] +#define __pyx_n_u_BoundedTrieData_combine __pyx_string_tab[56] +#define __pyx_n_u_BoundedTrieData_contains __pyx_string_tab[57] +#define __pyx_n_u_BoundedTrieData_flattened __pyx_string_tab[58] +#define __pyx_n_u_BoundedTrieData_from_proto __pyx_string_tab[59] +#define __pyx_n_u_BoundedTrieData_get_cumulative __pyx_string_tab[60] +#define __pyx_n_u_BoundedTrieData_get_result __pyx_string_tab[61] +#define __pyx_n_u_BoundedTrieData_identity_element __pyx_string_tab[62] +#define __pyx_n_u_BoundedTrieData_singleton __pyx_string_tab[63] +#define __pyx_n_u_BoundedTrieData_size __pyx_string_tab[64] +#define __pyx_n_u_BoundedTrieData_to_proto __pyx_string_tab[65] +#define __pyx_n_u_BoundedTrieNode __pyx_string_tab[66] +#define __pyx_n_u_BoundedTrieNode_2 __pyx_string_tab[67] +#define __pyx_n_u_BoundedTrieNode___reduce_cython __pyx_string_tab[68] +#define __pyx_n_u_BoundedTrieNode___setstate_cyth __pyx_string_tab[69] +#define __pyx_n_u_BoundedTrieNode_add __pyx_string_tab[70] +#define __pyx_n_u_BoundedTrieNode_add_all __pyx_string_tab[71] +#define __pyx_n_u_BoundedTrieNode_contains __pyx_string_tab[72] +#define __pyx_n_u_BoundedTrieNode_flattened __pyx_string_tab[73] +#define __pyx_n_u_BoundedTrieNode_from_proto __pyx_string_tab[74] +#define __pyx_n_u_BoundedTrieNode_merge __pyx_string_tab[75] +#define __pyx_n_u_BoundedTrieNode_size __pyx_string_tab[76] +#define __pyx_n_u_BoundedTrieNode_to_proto __pyx_string_tab[77] +#define __pyx_n_u_BoundedTrieNode_trim __pyx_string_tab[78] +#define __pyx_n_u_CounterCell __pyx_string_tab[79] +#define __pyx_n_u_CounterCell_combine __pyx_string_tab[80] +#define __pyx_n_u_CounterCell_dec __pyx_string_tab[81] +#define __pyx_n_u_CounterCell_get_cumulative __pyx_string_tab[82] +#define __pyx_n_u_CounterCell_inc __pyx_string_tab[83] +#define __pyx_n_u_CounterCell_reset __pyx_string_tab[84] +#define __pyx_n_u_CounterCell_to_runner_api_monito __pyx_string_tab[85] +#define __pyx_n_u_CounterCell_update __pyx_string_tab[86] +#define __pyx_n_u_DEFAULT_BOUND __pyx_string_tab[87] +#define __pyx_n_u_DistributionCell __pyx_string_tab[88] +#define __pyx_n_u_DistributionCell_combine __pyx_string_tab[89] +#define __pyx_n_u_DistributionCell_get_cumulative __pyx_string_tab[90] +#define __pyx_n_u_DistributionCell_reset __pyx_string_tab[91] +#define __pyx_n_u_DistributionCell_to_runner_api_m __pyx_string_tab[92] +#define __pyx_n_u_DistributionCell_update __pyx_string_tab[93] +#define __pyx_n_u_DistributionData __pyx_string_tab[94] +#define __pyx_n_u_DistributionData___reduce_cython __pyx_string_tab[95] +#define __pyx_n_u_DistributionData___setstate_cyth __pyx_string_tab[96] +#define __pyx_n_u_DistributionData_combine __pyx_string_tab[97] +#define __pyx_n_u_DistributionData_get_cumulative __pyx_string_tab[98] +#define __pyx_n_u_DistributionData_get_result __pyx_string_tab[99] +#define __pyx_n_u_DistributionData_identity_elemen __pyx_string_tab[100] +#define __pyx_n_u_DistributionData_singleton __pyx_string_tab[101] +#define __pyx_n_u_DistributionResult __pyx_string_tab[102] +#define __pyx_n_u_DistributionResult___eq __pyx_string_tab[103] +#define __pyx_n_u_DistributionResult___hash __pyx_string_tab[104] +#define __pyx_n_u_DistributionResult___init __pyx_string_tab[105] +#define __pyx_n_u_DistributionResult___repr __pyx_string_tab[106] +#define __pyx_n_u_DistributionResult_count __pyx_string_tab[107] +#define __pyx_n_u_DistributionResult_max __pyx_string_tab[108] +#define __pyx_n_u_DistributionResult_mean __pyx_string_tab[109] +#define __pyx_n_u_DistributionResult_min __pyx_string_tab[110] +#define __pyx_n_u_DistributionResult_sum __pyx_string_tab[111] +#define __pyx_n_u_FromDatetime __pyx_string_tab[112] +#define __pyx_n_u_GaugeCell __pyx_string_tab[113] +#define __pyx_n_u_GaugeCell_to_runner_api_monitori __pyx_string_tab[114] +#define __pyx_n_u_GaugeData __pyx_string_tab[115] +#define __pyx_n_u_GaugeData___eq __pyx_string_tab[116] +#define __pyx_n_u_GaugeData___hash __pyx_string_tab[117] +#define __pyx_n_u_GaugeData___init __pyx_string_tab[118] +#define __pyx_n_u_GaugeData___repr __pyx_string_tab[119] +#define __pyx_n_u_GaugeData_combine __pyx_string_tab[120] +#define __pyx_n_u_GaugeData_get_cumulative __pyx_string_tab[121] +#define __pyx_n_u_GaugeData_get_result __pyx_string_tab[122] +#define __pyx_n_u_GaugeData_identity_element __pyx_string_tab[123] +#define __pyx_n_u_GaugeData_singleton __pyx_string_tab[124] +#define __pyx_n_u_GaugeResult __pyx_string_tab[125] +#define __pyx_n_u_GaugeResult___eq __pyx_string_tab[126] +#define __pyx_n_u_GaugeResult___hash __pyx_string_tab[127] +#define __pyx_n_u_GaugeResult___init __pyx_string_tab[128] +#define __pyx_n_u_GaugeResult___repr __pyx_string_tab[129] +#define __pyx_n_u_GaugeResult_timestamp __pyx_string_tab[130] +#define __pyx_n_u_GaugeResult_value __pyx_string_tab[131] +#define __pyx_n_u_HasField __pyx_string_tab[132] +#define __pyx_n_u_Histogram __pyx_string_tab[133] +#define __pyx_n_u_HistogramCell __pyx_string_tab[134] +#define __pyx_n_u_HistogramCellFactory __pyx_string_tab[135] +#define __pyx_n_u_HistogramCellFactory___call __pyx_string_tab[136] +#define __pyx_n_u_HistogramCellFactory___eq __pyx_string_tab[137] +#define __pyx_n_u_HistogramCellFactory___hash __pyx_string_tab[138] +#define __pyx_n_u_HistogramCellFactory___init __pyx_string_tab[139] +#define __pyx_n_u_HistogramCell___init __pyx_string_tab[140] +#define __pyx_n_u_HistogramCell_combine __pyx_string_tab[141] +#define __pyx_n_u_HistogramCell_get_cumulative __pyx_string_tab[142] +#define __pyx_n_u_HistogramCell_reset __pyx_string_tab[143] +#define __pyx_n_u_HistogramCell_to_runner_api_moni __pyx_string_tab[144] +#define __pyx_n_u_HistogramCell_update __pyx_string_tab[145] +#define __pyx_n_u_HistogramData __pyx_string_tab[146] +#define __pyx_n_u_HistogramData___eq __pyx_string_tab[147] +#define __pyx_n_u_HistogramData___hash __pyx_string_tab[148] +#define __pyx_n_u_HistogramData___init __pyx_string_tab[149] +#define __pyx_n_u_HistogramData___repr __pyx_string_tab[150] +#define __pyx_n_u_HistogramData_combine __pyx_string_tab[151] +#define __pyx_n_u_HistogramData_from_proto __pyx_string_tab[152] +#define __pyx_n_u_HistogramData_get_cumulative __pyx_string_tab[153] +#define __pyx_n_u_HistogramData_get_result __pyx_string_tab[154] +#define __pyx_n_u_HistogramData_identity_element __pyx_string_tab[155] +#define __pyx_n_u_HistogramData_to_proto __pyx_string_tab[156] +#define __pyx_n_u_HistogramResult __pyx_string_tab[157] +#define __pyx_n_u_HistogramResult___eq __pyx_string_tab[158] +#define __pyx_n_u_HistogramResult___hash __pyx_string_tab[159] +#define __pyx_n_u_HistogramResult___init __pyx_string_tab[160] +#define __pyx_n_u_HistogramResult___repr __pyx_string_tab[161] +#define __pyx_n_u_HistogramResult_histogram __pyx_string_tab[162] +#define __pyx_n_u_HistogramResult_p90 __pyx_string_tab[163] +#define __pyx_n_u_HistogramResult_p95 __pyx_string_tab[164] +#define __pyx_n_u_HistogramResult_p99 __pyx_string_tab[165] +#define __pyx_n_u_Iterable __pyx_string_tab[166] +#define __pyx_n_u_LOGGER __pyx_string_tab[167] +#define __pyx_n_u_Lock __pyx_string_tab[168] +#define __pyx_n_u_MetricCell __pyx_string_tab[169] +#define __pyx_n_u_MetricCellFactory __pyx_string_tab[170] +#define __pyx_n_u_MetricCellFactory___call __pyx_string_tab[171] +#define __pyx_n_u_MetricCell___reduce __pyx_string_tab[172] +#define __pyx_n_u_MetricCell_get_cumulative __pyx_string_tab[173] +#define __pyx_n_u_MetricCell_reset __pyx_string_tab[174] +#define __pyx_n_u_MetricCell_to_runner_api_monitor __pyx_string_tab[175] +#define __pyx_n_u_MetricCell_to_runner_api_monitor_2 __pyx_string_tab[176] +#define __pyx_n_u_MetricCell_update __pyx_string_tab[177] +#define __pyx_n_u_None __pyx_string_tab[178] +#define __pyx_n_u_Optional __pyx_string_tab[179] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[180] +#define __pyx_n_u_STRING_SET_SIZE_LIMIT __pyx_string_tab[181] +#define __pyx_n_u_Set __pyx_string_tab[182] +#define __pyx_n_u_StringSetCell __pyx_string_tab[183] +#define __pyx_n_u_StringSetCell_add __pyx_string_tab[184] +#define __pyx_n_u_StringSetCell_to_runner_api_moni __pyx_string_tab[185] +#define __pyx_n_u_StringSetData __pyx_string_tab[186] +#define __pyx_n_u_StringSetData___eq __pyx_string_tab[187] +#define __pyx_n_u_StringSetData___hash __pyx_string_tab[188] +#define __pyx_n_u_StringSetData___init __pyx_string_tab[189] +#define __pyx_n_u_StringSetData___repr __pyx_string_tab[190] +#define __pyx_n_u_StringSetData_add __pyx_string_tab[191] +#define __pyx_n_u_StringSetData_add_until_capacity __pyx_string_tab[192] +#define __pyx_n_u_StringSetData_combine __pyx_string_tab[193] +#define __pyx_n_u_StringSetData_get_cumulative __pyx_string_tab[194] +#define __pyx_n_u_StringSetData_get_result __pyx_string_tab[195] +#define __pyx_n_u_StringSetData_identity_element __pyx_string_tab[196] +#define __pyx_n_u_StringSetData_singleton __pyx_string_tab[197] +#define __pyx_n_u_add __pyx_string_tab[198] +#define __pyx_n_u_add_all __pyx_string_tab[199] +#define __pyx_n_u_add_all_locals_genexpr __pyx_string_tab[200] +#define __pyx_n_u_add_until_capacity __pyx_string_tab[201] +#define __pyx_n_u_all __pyx_string_tab[202] +#define __pyx_n_u_apache_beam_metrics __pyx_string_tab[203] +#define __pyx_n_u_apache_beam_metrics_cells __pyx_string_tab[204] +#define __pyx_n_u_apache_beam_portability_api __pyx_string_tab[205] +#define __pyx_n_u_apache_beam_utils_histogram __pyx_string_tab[206] +#define __pyx_n_u_as_trie __pyx_string_tab[207] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[208] +#define __pyx_n_u_bool __pyx_string_tab[209] +#define __pyx_n_u_bound __pyx_string_tab[210] +#define __pyx_n_u_bucket_type __pyx_string_tab[211] +#define __pyx_n_u_bucket_type_2 __pyx_string_tab[212] +#define __pyx_n_u_call __pyx_string_tab[213] +#define __pyx_n_u_child __pyx_string_tab[214] +#define __pyx_n_u_children __pyx_string_tab[215] +#define __pyx_n_u_children_2 __pyx_string_tab[216] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[217] +#define __pyx_n_u_close __pyx_string_tab[218] +#define __pyx_n_u_cls __pyx_string_tab[219] +#define __pyx_n_u_combine __pyx_string_tab[220] +#define __pyx_n_u_combined __pyx_string_tab[221] +#define __pyx_n_u_contains __pyx_string_tab[222] +#define __pyx_n_u_copy __pyx_string_tab[223] +#define __pyx_n_u_count __pyx_string_tab[224] +#define __pyx_n_u_current_size __pyx_string_tab[225] +#define __pyx_n_u_data __pyx_string_tab[226] +#define __pyx_n_u_data_class __pyx_string_tab[227] +#define __pyx_n_u_datetime __pyx_string_tab[228] +#define __pyx_n_u_dec __pyx_string_tab[229] +#define __pyx_n_u_deepcopy __pyx_string_tab[230] +#define __pyx_n_u_delta __pyx_string_tab[231] +#define __pyx_n_u_dict __pyx_string_tab[232] +#define __pyx_n_u_dict_2 __pyx_string_tab[233] +#define __pyx_n_u_doc __pyx_string_tab[234] +#define __pyx_n_u_enter __pyx_string_tab[235] +#define __pyx_n_u_eq __pyx_string_tab[236] +#define __pyx_n_u_exit __pyx_string_tab[237] +#define __pyx_n_u_flattened __pyx_string_tab[238] +#define __pyx_n_u_format __pyx_string_tab[239] +#define __pyx_n_u_from_proto __pyx_string_tab[240] +#define __pyx_n_u_from_proto_locals_genexpr __pyx_string_tab[241] +#define __pyx_n_u_from_runner_api __pyx_string_tab[242] +#define __pyx_n_u_func __pyx_string_tab[243] +#define __pyx_n_u_genexpr __pyx_string_tab[244] +#define __pyx_n_u_get __pyx_string_tab[245] +#define __pyx_n_u_getLogger __pyx_string_tab[246] +#define __pyx_n_u_get_cumulative __pyx_string_tab[247] +#define __pyx_n_u_get_percentile_info __pyx_string_tab[248] +#define __pyx_n_u_get_result __pyx_string_tab[249] +#define __pyx_n_u_getstate __pyx_string_tab[250] +#define __pyx_n_u_hash __pyx_string_tab[251] +#define __pyx_n_u_head __pyx_string_tab[252] +#define __pyx_n_u_histogram __pyx_string_tab[253] +#define __pyx_n_u_identity_element __pyx_string_tab[254] +#define __pyx_n_u_inc __pyx_string_tab[255] +#define __pyx_n_u_init __pyx_string_tab[256] +#define __pyx_n_u_int __pyx_string_tab[257] +#define __pyx_n_u_int64_counter __pyx_string_tab[258] +#define __pyx_n_u_int64_user_counter __pyx_string_tab[259] +#define __pyx_n_u_int64_user_distribution __pyx_string_tab[260] +#define __pyx_n_u_int64_user_gauge __pyx_string_tab[261] +#define __pyx_n_u_is_coroutine __pyx_string_tab[262] +#define __pyx_n_u_items __pyx_string_tab[263] +#define __pyx_n_u_key __pyx_string_tab[264] +#define __pyx_n_u_labels __pyx_string_tab[265] +#define __pyx_n_u_lambda __pyx_string_tab[266] +#define __pyx_n_u_logging __pyx_string_tab[267] +#define __pyx_n_u_main __pyx_string_tab[268] +#define __pyx_n_u_max __pyx_string_tab[269] +#define __pyx_n_u_max_child __pyx_string_tab[270] +#define __pyx_n_u_mean __pyx_string_tab[271] +#define __pyx_n_u_merge __pyx_string_tab[272] +#define __pyx_n_u_metaclass __pyx_string_tab[273] +#define __pyx_n_u_metrics_pb2 __pyx_string_tab[274] +#define __pyx_n_u_mi __pyx_string_tab[275] +#define __pyx_n_u_min __pyx_string_tab[276] +#define __pyx_n_u_module __pyx_string_tab[277] +#define __pyx_n_u_monitoring_infos __pyx_string_tab[278] +#define __pyx_n_u_mro_entries __pyx_string_tab[279] +#define __pyx_n_u_n __pyx_string_tab[280] +#define __pyx_n_u_name __pyx_string_tab[281] +#define __pyx_n_u_name_2 __pyx_string_tab[282] +#define __pyx_n_u_namespace __pyx_string_tab[283] +#define __pyx_n_u_new __pyx_string_tab[284] +#define __pyx_n_u_next __pyx_string_tab[285] +#define __pyx_n_u_node __pyx_string_tab[286] +#define __pyx_n_u_now __pyx_string_tab[287] +#define __pyx_n_u_object __pyx_string_tab[288] +#define __pyx_n_u_other __pyx_string_tab[289] +#define __pyx_n_u_other_child __pyx_string_tab[290] +#define __pyx_n_u_others __pyx_string_tab[291] +#define __pyx_n_u_p90 __pyx_string_tab[292] +#define __pyx_n_u_p95 __pyx_string_tab[293] +#define __pyx_n_u_p99 __pyx_string_tab[294] +#define __pyx_n_u_pop __pyx_string_tab[295] +#define __pyx_n_u_prefix __pyx_string_tab[296] +#define __pyx_n_u_prepare __pyx_string_tab[297] +#define __pyx_n_u_property __pyx_string_tab[298] +#define __pyx_n_u_proto __pyx_string_tab[299] +#define __pyx_n_u_ptransform __pyx_string_tab[300] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[301] +#define __pyx_n_u_pyx_result __pyx_string_tab[302] +#define __pyx_n_u_pyx_state __pyx_string_tab[303] +#define __pyx_n_u_pyx_type __pyx_string_tab[304] +#define __pyx_n_u_pyx_unpickle_BoundedTrieData __pyx_string_tab[305] +#define __pyx_n_u_pyx_unpickle_DistributionData __pyx_string_tab[306] +#define __pyx_n_u_pyx_unpickle__BoundedTrieNode __pyx_string_tab[307] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[308] +#define __pyx_n_u_qualname __pyx_string_tab[309] +#define __pyx_n_u_record __pyx_string_tab[310] +#define __pyx_n_u_reduce __pyx_string_tab[311] +#define __pyx_n_u_reduce_cython __pyx_string_tab[312] +#define __pyx_n_u_reduce_ex __pyx_string_tab[313] +#define __pyx_n_u_repr __pyx_string_tab[314] +#define __pyx_n_u_repr___locals_genexpr __pyx_string_tab[315] +#define __pyx_n_u_repr___locals_genexpr_locals_g __pyx_string_tab[316] +#define __pyx_n_u_reset __pyx_string_tab[317] +#define __pyx_n_u_result __pyx_string_tab[318] +#define __pyx_n_u_return __pyx_string_tab[319] +#define __pyx_n_u_root __pyx_string_tab[320] +#define __pyx_n_u_s __pyx_string_tab[321] +#define __pyx_n_u_segments __pyx_string_tab[322] +#define __pyx_n_u_segments_iter __pyx_string_tab[323] +#define __pyx_n_u_self __pyx_string_tab[324] +#define __pyx_n_u_self_child __pyx_string_tab[325] +#define __pyx_n_u_send __pyx_string_tab[326] +#define __pyx_n_u_set __pyx_string_tab[327] +#define __pyx_n_u_set_name __pyx_string_tab[328] +#define __pyx_n_u_setdefault __pyx_string_tab[329] +#define __pyx_n_u_setstate __pyx_string_tab[330] +#define __pyx_n_u_setstate_cython __pyx_string_tab[331] +#define __pyx_n_u_singleton __pyx_string_tab[332] +#define __pyx_n_u_size __pyx_string_tab[333] +#define __pyx_n_u_size_2 __pyx_string_tab[334] +#define __pyx_n_u_start_time __pyx_string_tab[335] +#define __pyx_n_u_state __pyx_string_tab[336] +#define __pyx_n_u_staticmethod __pyx_string_tab[337] +#define __pyx_n_u_str __pyx_string_tab[338] +#define __pyx_n_u_string __pyx_string_tab[339] +#define __pyx_n_u_string_set __pyx_string_tab[340] +#define __pyx_n_u_string_size __pyx_string_tab[341] +#define __pyx_n_u_strings __pyx_string_tab[342] +#define __pyx_n_u_sum __pyx_string_tab[343] +#define __pyx_n_u_super __pyx_string_tab[344] +#define __pyx_n_u_t __pyx_string_tab[345] +#define __pyx_n_u_tail __pyx_string_tab[346] +#define __pyx_n_u_test __pyx_string_tab[347] +#define __pyx_n_u_threading __pyx_string_tab[348] +#define __pyx_n_u_throw __pyx_string_tab[349] +#define __pyx_n_u_time __pyx_string_tab[350] +#define __pyx_n_u_timestamp __pyx_string_tab[351] +#define __pyx_n_u_timezone __pyx_string_tab[352] +#define __pyx_n_u_to_proto __pyx_string_tab[353] +#define __pyx_n_u_to_runner_api __pyx_string_tab[354] +#define __pyx_n_u_to_runner_api_monitoring_info __pyx_string_tab[355] +#define __pyx_n_u_to_runner_api_monitoring_info_im __pyx_string_tab[356] +#define __pyx_n_u_transform_id __pyx_string_tab[357] +#define __pyx_n_u_trim __pyx_string_tab[358] +#define __pyx_n_u_trim_locals_lambda __pyx_string_tab[359] +#define __pyx_n_u_truncated __pyx_string_tab[360] +#define __pyx_n_u_truncated_2 __pyx_string_tab[361] +#define __pyx_n_u_typing __pyx_string_tab[362] +#define __pyx_n_u_update __pyx_string_tab[363] +#define __pyx_n_u_urn __pyx_string_tab[364] +#define __pyx_n_u_use_setstate __pyx_string_tab[365] +#define __pyx_n_u_user_bounded_trie __pyx_string_tab[366] +#define __pyx_n_u_user_set_string __pyx_string_tab[367] +#define __pyx_n_u_utc __pyx_string_tab[368] +#define __pyx_n_u_value __pyx_string_tab[369] +#define __pyx_n_u_values __pyx_string_tab[370] +#define __pyx_n_u_warning __pyx_string_tab[371] +#define __pyx_n_u_was_empty __pyx_string_tab[372] +#define __pyx_kp_b_iso88591_0_q_HD __pyx_string_tab[373] +#define __pyx_kp_b_iso88591_0_t1_a_a_b_a_q_U_a_T_uA_e7_D_a __pyx_string_tab[374] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[375] +#define __pyx_kp_b_iso88591_1Cy_Q __pyx_string_tab[376] +#define __pyx_kp_b_iso88591_1D_d_fD __pyx_string_tab[377] +#define __pyx_kp_b_iso88591_1G3gQ __pyx_string_tab[378] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[379] +#define __pyx_kp_b_iso88591_1_3 __pyx_string_tab[380] +#define __pyx_kp_b_iso88591_1_4 __pyx_string_tab[381] +#define __pyx_kp_b_iso88591_1_5 __pyx_string_tab[382] +#define __pyx_kp_b_iso88591_1_6 __pyx_string_tab[383] +#define __pyx_kp_b_iso88591_1_t7_U_d_c_Q_gS_T_l_Q_Q_WCuD_WG __pyx_string_tab[384] +#define __pyx_kp_b_iso88591_2_HD __pyx_string_tab[385] +#define __pyx_kp_b_iso88591_3at1 __pyx_string_tab[386] +#define __pyx_kp_b_iso88591_3ay __pyx_string_tab[387] +#define __pyx_kp_b_iso88591_3iq __pyx_string_tab[388] +#define __pyx_kp_b_iso88591_4A_T_q_e81E_1 __pyx_string_tab[389] +#define __pyx_kp_b_iso88591_4A_e1_q__E1A_Kq_Q_IQm1 __pyx_string_tab[390] +#define __pyx_kp_b_iso88591_4_U __pyx_string_tab[391] +#define __pyx_kp_b_iso88591_4_a __pyx_string_tab[392] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[393] +#define __pyx_kp_b_iso88591_4q_A __pyx_string_tab[394] +#define __pyx_kp_b_iso88591_4q_A_2 __pyx_string_tab[395] +#define __pyx_kp_b_iso88591_4q_A_3 __pyx_string_tab[396] +#define __pyx_kp_b_iso88591_4r_XT __pyx_string_tab[397] +#define __pyx_kp_b_iso88591_4uA __pyx_string_tab[398] +#define __pyx_kp_b_iso88591_4uA_2 __pyx_string_tab[399] +#define __pyx_kp_b_iso88591_4uHD __pyx_string_tab[400] +#define __pyx_kp_b_iso88591_4uJd __pyx_string_tab[401] +#define __pyx_kp_b_iso88591_4xr_1 __pyx_string_tab[402] +#define __pyx_kp_b_iso88591_4z_q __pyx_string_tab[403] +#define __pyx_kp_b_iso88591_7_A_k_q_t1_A_t1_s_1_q __pyx_string_tab[404] +#define __pyx_kp_b_iso88591_8_1_uA_q_q_1A_fIU_6_as_V1_1 __pyx_string_tab[405] +#define __pyx_kp_b_iso88591_9AS __pyx_string_tab[406] +#define __pyx_kp_b_iso88591_9AT_4q __pyx_string_tab[407] +#define __pyx_kp_b_iso88591_9AWJa __pyx_string_tab[408] +#define __pyx_kp_b_iso88591_9_vS_Q_Zxq_Q __pyx_string_tab[409] +#define __pyx_kp_b_iso88591_A_1_A_A_O1_1 __pyx_string_tab[410] +#define __pyx_kp_b_iso88591_A_31_A_A_O1_1 __pyx_string_tab[411] +#define __pyx_kp_b_iso88591_A_A_A_A_O1_1 __pyx_string_tab[412] +#define __pyx_kp_b_iso88591_A_G_Q __pyx_string_tab[413] +#define __pyx_kp_b_iso88591_A_Q_A_A_O1_1 __pyx_string_tab[414] +#define __pyx_kp_b_iso88591_A_t4q_0_a_a_oQ_Q_1_fD_t7_a __pyx_string_tab[415] +#define __pyx_kp_b_iso88591_A_t4q_Q_1D_T_y_s_b_a_q_iuA_1 __pyx_string_tab[416] +#define __pyx_kp_b_iso88591_E_q __pyx_string_tab[417] +#define __pyx_kp_b_iso88591_K_0 __pyx_string_tab[418] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[419] +#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[420] +#define __pyx_kp_b_iso88591_Q_3 __pyx_string_tab[421] +#define __pyx_kp_b_iso88591_Q_Bc_Q_q_AQ_1A_Q_1 __pyx_string_tab[422] +#define __pyx_kp_b_iso88591_Q_T __pyx_string_tab[423] +#define __pyx_kp_b_iso88591_Q_T_oQ __pyx_string_tab[424] +#define __pyx_kp_b_iso88591_Q_T_oQ_2 __pyx_string_tab[425] +#define __pyx_kp_b_iso88591_Q_e81E_1 __pyx_string_tab[426] +#define __pyx_kp_b_iso88591_Q_t_s_a_Q_7_D_D_avQ_vS_d_AX_5Q __pyx_string_tab[427] +#define __pyx_kp_b_iso88591_Q_z_m3e_l_U_Q __pyx_string_tab[428] +#define __pyx_kp_b_iso88591_Qd __pyx_string_tab[429] +#define __pyx_kp_b_iso88591_Qd_1 __pyx_string_tab[430] +#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[431] +#define __pyx_kp_b_iso88591_T_T_Q_G1F_a_vWE_Q_q_t_gQ_q_1_Qg __pyx_string_tab[432] +#define __pyx_kp_b_iso88591_T_V4vT_G1F_a_vWE_Q_q_q_q_1_Qg_q __pyx_string_tab[433] +#define __pyx_kp_b_iso88591_T_hd_G1F_a_vWE_Q_q_t7_c_q_0_AWK __pyx_string_tab[434] +#define __pyx_kp_b_iso88591_Zwaq __pyx_string_tab[435] +#define __pyx_kp_b_iso88591__10 __pyx_string_tab[436] +#define __pyx_kp_b_iso88591__11 __pyx_string_tab[437] +#define __pyx_kp_b_iso88591__12 __pyx_string_tab[438] +#define __pyx_kp_b_iso88591__5 __pyx_string_tab[439] +#define __pyx_kp_b_iso88591__6 __pyx_string_tab[440] +#define __pyx_kp_b_iso88591__7 __pyx_string_tab[441] +#define __pyx_kp_b_iso88591__8 __pyx_string_tab[442] +#define __pyx_kp_b_iso88591__9 __pyx_string_tab[443] +#define __pyx_kp_b_iso88591_a_4uO1 __pyx_string_tab[444] +#define __pyx_kp_b_iso88591_a_4y __pyx_string_tab[445] +#define __pyx_kp_b_iso88591_a_AT_t1 __pyx_string_tab[446] +#define __pyx_kp_b_iso88591_a_Q __pyx_string_tab[447] +#define __pyx_kp_b_iso88591_a_a_y_it_V1 __pyx_string_tab[448] +#define __pyx_kp_b_iso88591_aq __pyx_string_tab[449] +#define __pyx_kp_b_iso88591_at __pyx_string_tab[450] +#define __pyx_kp_b_iso88591_at1 __pyx_string_tab[451] +#define __pyx_kp_b_iso88591_at7_E_1 __pyx_string_tab[452] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[453] +#define __pyx_kp_b_iso88591_fD_F_fD __pyx_string_tab[454] +#define __pyx_kp_b_iso88591_gQd_4H __pyx_string_tab[455] +#define __pyx_kp_b_iso88591_l_d_oT_T_y_d_a __pyx_string_tab[456] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[457] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1 __pyx_string_tab[458] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1 __pyx_string_tab[459] +#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[460] +#define __pyx_kp_b_iso88591_q_3 __pyx_string_tab[461] +#define __pyx_kp_b_iso88591_q_4 __pyx_string_tab[462] +#define __pyx_kp_b_iso88591_q_4q_e81E_1 __pyx_string_tab[463] +#define __pyx_kp_b_iso88591_q_5 __pyx_string_tab[464] +#define __pyx_kp_b_iso88591_q_6 __pyx_string_tab[465] +#define __pyx_kp_b_iso88591_q_7 __pyx_string_tab[466] +#define __pyx_kp_b_iso88591_q_A __pyx_string_tab[467] +#define __pyx_kp_b_iso88591_q_q_T_1 __pyx_string_tab[468] +#define __pyx_kp_b_iso88591_q_vS_Q_t5_Q_T_Q_s_4q_nE_1 __pyx_string_tab[469] +#define __pyx_kp_b_iso88591_t4q_Qha_0_q_k_at1_1 __pyx_string_tab[470] +#define __pyx_kp_b_iso88591_t5_s_Q_4uE_4uA __pyx_string_tab[471] +#define __pyx_kp_b_iso88591_t7_Q_A_s_1D_Cq_S_V_Q __pyx_string_tab[472] +#define __pyx_kp_b_iso88591_t7_T_Q_D_Q_Q __pyx_string_tab[473] +#define __pyx_kp_b_iso88591_t7_U_d_c_T_A_WCq_IT_N_AQ_V7_D_F __pyx_string_tab[474] +#define __pyx_kp_b_iso88591_t_QgQ_Q_4_S_Q __pyx_string_tab[475] +#define __pyx_kp_b_iso88591_t_a_M_1_1 __pyx_string_tab[476] +#define __pyx_kp_b_iso88591_t_s_a_Q_7_5_4_d_AU_1A __pyx_string_tab[477] +#define __pyx_kp_b_iso88591_t_wa_Q_WG1_T_uA_Q __pyx_string_tab[478] +#define __pyx_kp_b_iso88591_t_wa_U_7_T_WG1_T_y_Q __pyx_string_tab[479] +#define __pyx_kp_b_iso88591_uA __pyx_string_tab[480] +#define __pyx_kp_b_iso88591_vS_Q_1_E_5_G2U_HD_RuJe1_HD_RuJe __pyx_string_tab[481] +#define __pyx_kp_b_iso88591_vS_Q_uKr_Q_Q_Q __pyx_string_tab[482] +#define __pyx_kp_b_iso88591_wat_A __pyx_string_tab[483] +#define __pyx_kp_b_iso88591_z_T_5_t4_U_Q __pyx_string_tab[484] +#define __pyx_kp_b_iso88591_z_T_s_q_Q __pyx_string_tab[485] +#define __pyx_kp_b_iso88591_z_T_s_q_Q_2 __pyx_string_tab[486] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_1 __pyx_number_tab[1] +#define __pyx_int_100 __pyx_number_tab[2] +#define __pyx_int_1000000 __pyx_number_tab[3] +#define __pyx_int_17678593 __pyx_number_tab[4] +#define __pyx_int_50871570 __pyx_number_tab[5] +#define __pyx_int_157087211 __pyx_number_tab[6] +#define __pyx_int_0x7fffffffffffffff __pyx_number_tab[7] +#define __pyx_int_neg_9223372036854775808 __pyx_number_tab[8] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_k__3); + for (int i=0; i<21; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<133; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<487; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_k__3); + for (int i=0; i<21; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<133; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<487; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":46 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":50 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":54 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":59 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":63 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":67 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":71 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":75 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":80 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":85 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":89 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":93 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":97 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":101 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":105 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":109 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":113 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":118 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":123 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":127 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":131 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + +static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) { + + /* "cpython/datetime.pxd":256 + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: + * PyDateTime_IMPORT # <<<<<<<<<<<<<< + * + * # Create date object using DateTime CAPI factory function. +*/ + (void)(PyDateTime_IMPORT); + + /* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + + /* function exit code */ +} + +/* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_new", 0); + + /* "cpython/datetime.pxd":261 + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) # <<<<<<<<<<<<<< + * + * # Create time object using DateTime CAPI factory function +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Date *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_Time *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("time_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":266 + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create datetime object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) + __pyx_r = ((PyDateTime_Time *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":271 + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + +static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) { + PyDateTime_Delta *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timedelta_new", 0); + + /* "cpython/datetime.pxd":276 + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) { + PyObject *__pyx_v_name = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timezone_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_name = __pyx_optional_args->name; + } + } + + /* "cpython/datetime.pxd":280 + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) # <<<<<<<<<<<<<< + * + * # Create datetime object using DB API constructor. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_name != Py_None); + if (__pyx_t_2) { + __pyx_t_1 = ((PyObject *)__pyx_v_name); + } else { + __pyx_t_1 = NULL; + } + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) { + PyObject *__pyx_v_tz = ((PyObject *)Py_None); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_from_timestamp", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_tz = __pyx_optional_args->tz; + } + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "cpython/datetime.pxd":285 + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) # <<<<<<<<<<<<<< + * + * # Create date object using DB API constructor. +*/ + __pyx_t_2 = (__pyx_v_tz != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_tz); + __Pyx_GIVEREF(__pyx_v_tz); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_from_timestamp", 0); + + /* "cpython/datetime.pxd":289 + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) # <<<<<<<<<<<<<< + * + * # More recognizable getters for date/time/datetime/timedelta. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_Date *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_utc", 0); + + /* "cpython/datetime.pxd":298 + * # Get UTC singleton + * cdef inline object get_utc(): + * return __Pyx_TimeZone_UTC # <<<<<<<<<<<<<< + * + * # Get tzinfo of time +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC)); + __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC); + goto __pyx_L0; + + /* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("time_tzinfo", 0); + + /* "cpython/datetime.pxd":302 + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): + * return PyDateTime_TIME_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get tzinfo of datetime +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("datetime_tzinfo", 0); + + /* "cpython/datetime.pxd":306 + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): + * return PyDateTime_DATE_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get year of date +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":310 + * # Get year of date + * cdef inline int date_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of date +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":314 + * # Get month of date + * cdef inline int date_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of date +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":318 + * # Get day of date + * cdef inline int date_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get year of datetime +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":322 + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of datetime +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":326 + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of datetime +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":330 + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get hour of time +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":334 + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: + * return PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of time +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":338 + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: + * return PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of time +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":342 + * # Get second of time + * cdef inline int time_second(object o) noexcept: + * return PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of time +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":346 + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of time +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":351 + * cdef inline int time_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get hour of datetime +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":355 + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: + * return PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":359 + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: + * return PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":363 + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: + * return PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":367 + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":372 + * cdef inline int datetime_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get days of timedelta +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":376 + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< + * + * # Get seconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":380 + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< + * + * # Get microseconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":384 + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< + * + * cdef inline double total_seconds(timedelta obj) noexcept: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + +static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) { + double __pyx_v_days; + double __pyx_v_seconds; + double __pyx_v_micros; + double __pyx_r; + + /* "cpython/datetime.pxd":392 + * cdef: + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) # <<<<<<<<<<<<<< + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) +*/ + __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":393 + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) # <<<<<<<<<<<<<< + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":394 + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) # <<<<<<<<<<<<<< + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":395 + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 # <<<<<<<<<<<<<< +*/ + __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":65 + * directly within a runner. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * self._lock = threading.Lock() + * self._start_time = None +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":66 + * """ + * def __init__(self): + * self._lock = threading.Lock() # <<<<<<<<<<<<<< + * self._start_time = None + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_lock); + __Pyx_DECREF(__pyx_v_self->_lock); + __pyx_v_self->_lock = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":67 + * def __init__(self): + * self._lock = threading.Lock() + * self._start_time = None # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_start_time); + __Pyx_DECREF((PyObject *)__pyx_v_self->_start_time); + __pyx_v_self->_start_time = ((PyDateTime_DateTime *)Py_None); + + /* "apache_beam/metrics/cells.py":65 + * directly within a runner. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * self._lock = threading.Lock() + * self._start_time = None +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":69 + * self._start_time = None + * + * def update(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_10MetricCell_update(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_3update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/metrics/cells.py":70 + * + * def update(self, value): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 70, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":69 + * self._start_time = None + * + * def update(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_3update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_3update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 69, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 69, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 69, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_2update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_2update(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7metrics_5cells_10MetricCell_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":72 + * raise NotImplementedError + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_4get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_4get_cumulative(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":73 + * + * def get_cumulative(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info(self, name, transform_id): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 73, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":72 + * raise NotImplementedError + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":75 + * raise NotImplementedError + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * if not self._start_time: + * self._start_time = datetime.now(timezone.utc) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info = {"to_runner_api_monitoring_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 75, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info", 0) < (0)) __PYX_ERR(0, 75, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info", 1, 2, 2, i); __PYX_ERR(0, 75, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.to_runner_api_monitoring_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_6to_runner_api_monitoring_info(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_6to_runner_api_monitoring_info(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_mi = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info", 0); + + /* "apache_beam/metrics/cells.py":76 + * + * def to_runner_api_monitoring_info(self, name, transform_id): + * if not self._start_time: # <<<<<<<<<<<<<< + * self._start_time = datetime.now(timezone.utc) + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_start_time)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":77 + * def to_runner_api_monitoring_info(self, name, transform_id): + * if not self._start_time: + * self._start_time = datetime.now(timezone.utc) # <<<<<<<<<<<<<< + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) + * mi.start_time.FromDatetime(self._start_time) +*/ + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime); + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_utc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_start_time); + __Pyx_DECREF((PyObject *)__pyx_v_self->_start_time); + __pyx_v_self->_start_time = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":76 + * + * def to_runner_api_monitoring_info(self, name, transform_id): + * if not self._start_time: # <<<<<<<<<<<<<< + * self._start_time = datetime.now(timezone.utc) + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) +*/ + } + + /* "apache_beam/metrics/cells.py":78 + * if not self._start_time: + * self._start_time = datetime.now(timezone.utc) + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) # <<<<<<<<<<<<<< + * mi.start_time.FromDatetime(self._start_time) + * return mi +*/ + __pyx_t_6 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_name, __pyx_v_transform_id}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_mi = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":79 + * self._start_time = datetime.now(timezone.utc) + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) + * mi.start_time.FromDatetime(self._start_time) # <<<<<<<<<<<<<< + * return mi + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mi, __pyx_mstate_global->__pyx_n_u_start_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self->_start_time)}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_FromDatetime, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":80 + * mi = self.to_runner_api_monitoring_info_impl(name, transform_id) + * mi.start_time.FromDatetime(self._start_time) + * return mi # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mi); + __pyx_r = __pyx_v_mi; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":75 + * raise NotImplementedError + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * if not self._start_time: + * self._start_time = datetime.now(timezone.utc) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.to_runner_api_monitoring_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_mi); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":82 + * return mi + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_name = 0; + CYTHON_UNUSED PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 82, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 82, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 82, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 82, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 82, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 82, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_8to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_8to_runner_api_monitoring_info_impl(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":83 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 83, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":82 + * return mi + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":85 + * raise NotImplementedError + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * raise NotImplementedError +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_11reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_11reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_11reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_11reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_10reset(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_10reset(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/cells.py":87 + * def reset(self): + * # type: () -> None + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 87, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":85 + * raise NotImplementedError + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * raise NotImplementedError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":89 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_12__reduce__(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_10MetricCell_12__reduce__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/metrics/cells.py":90 + * + * def __reduce__(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 90, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":89 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCell.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":94 + * + * class MetricCellFactory(object): + * def __call__(self): # <<<<<<<<<<<<<< + * # type: () -> MetricCell + * raise NotImplementedError +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_17MetricCellFactory_1__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_17MetricCellFactory_1__call__ = {"__call__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_17MetricCellFactory_1__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_17MetricCellFactory_1__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 94, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 94, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 94, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 94, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 94, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 94, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCellFactory.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_17MetricCellFactory___call__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_17MetricCellFactory___call__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 0); + + /* "apache_beam/metrics/cells.py":96 + * def __call__(self): + * # type: () -> MetricCell + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 96, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":94 + * + * class MetricCellFactory(object): + * def __call__(self): # <<<<<<<<<<<<<< + * # type: () -> MetricCell + * raise NotImplementedError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.MetricCellFactory.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":110 + * This class is thread safe. + * """ + * def __init__(self, *args): # <<<<<<<<<<<<<< + * super().__init__(*args) + * self.value = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":111 + * """ + * def __init__(self, *args): + * super().__init__(*args) # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":112 + * def __init__(self, *args): + * super().__init__(*args) + * self.value = 0 # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_v_self->value = 0; + + /* "apache_beam/metrics/cells.py":110 + * This class is thread safe. + * """ + * def __init__(self, *args): # <<<<<<<<<<<<<< + * super().__init__(*args) + * self.value = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":114 + * self.value = 0 + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.value = 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_3reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_2reset(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/cells.py":116 + * def reset(self): + * # type: () -> None + * self.value = 0 # <<<<<<<<<<<<<< + * + * def combine(self, other): +*/ + __pyx_v_self->value = 0; + + /* "apache_beam/metrics/cells.py":114 + * self.value = 0 + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.value = 0 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":118 + * self.value = 0 + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (CounterCell) -> CounterCell + * result = CounterCell() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_5combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 118, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 118, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 118, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, i); __PYX_ERR(0, 118, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 118, __pyx_L3_error) + } + __pyx_v_other = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 118, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_4combine(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_other) { + struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":120 + * def combine(self, other): + * # type: (CounterCell) -> CounterCell + * result = CounterCell() # <<<<<<<<<<<<<< + * result.inc(self.value + other.value) + * return result +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_result = ((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":121 + * # type: (CounterCell) -> CounterCell + * result = CounterCell() + * result.inc(self.value + other.value) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_result); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_inc, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":122 + * result = CounterCell() + * result.inc(self.value + other.value) + * return result # <<<<<<<<<<<<<< + * + * def inc(self, n=1): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":118 + * self.value = 0 + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (CounterCell) -> CounterCell + * result = CounterCell() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":124 + * return result + * + * def inc(self, n=1): # <<<<<<<<<<<<<< + * self.update(n) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_7inc(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_7inc = {"inc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_7inc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_7inc(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("inc (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 124, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "inc", 0) < (0)) __PYX_ERR(0, 124, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } + __pyx_v_n = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("inc", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.inc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_6inc(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_6inc(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("inc", 0); + + /* "apache_beam/metrics/cells.py":125 + * + * def inc(self, n=1): + * self.update(n) # <<<<<<<<<<<<<< + * + * def dec(self, n=1): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_n, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 125, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":124 + * return result + * + * def inc(self, n=1): # <<<<<<<<<<<<<< + * self.update(n) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.inc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":127 + * self.update(n) + * + * def dec(self, n=1): # <<<<<<<<<<<<<< + * self.update(-n) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_9dec(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_9dec = {"dec", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_9dec, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_9dec(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("dec (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 127, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dec", 0) < (0)) __PYX_ERR(0, 127, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } + __pyx_v_n = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("dec", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.dec", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_8dec(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_8dec(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("dec", 0); + + /* "apache_beam/metrics/cells.py":128 + * + * def dec(self, n=1): + * self.update(-n) # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __pyx_t_1 = PyNumber_Negative(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":127 + * self.update(n) + * + * def dec(self, n=1): # <<<<<<<<<<<<<< + * self.update(-n) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.dec", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":130 + * self.update(-n) + * + * def update(self, value): # <<<<<<<<<<<<<< + * # type: (int) -> None + * if cython.compiled: +*/ + +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_11update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_11CounterCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int64_t __pyx_v_ivalue; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_11update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/metrics/cells.py":133 + * # type: (int) -> None + * if cython.compiled: + * ivalue = value # <<<<<<<<<<<<<< + * # Since We hold the GIL, no need for another lock. + * # And because the C threads won't preempt and interleave +*/ + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_v_ivalue = __pyx_t_7; + + /* "apache_beam/metrics/cells.py":139 + * # Assuming there is no code trying to access the counters + * # directly by circumventing the GIL. + * self.value += ivalue # <<<<<<<<<<<<<< + * else: + * with self._lock: +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_ivalue); + + /* "apache_beam/metrics/cells.py":130 + * self.update(-n) + * + * def update(self, value): # <<<<<<<<<<<<<< + * # type: (int) -> None + * if cython.compiled: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_11update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_11update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_11update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_11update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 130, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 130, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 130, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_10update(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_10update(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7metrics_5cells_11CounterCell_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":144 + * self.value += value + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> int + * with self._lock: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_12get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_12get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":146 + * def get_cumulative(self): + * # type: () -> int + * with self._lock: # <<<<<<<<<<<<<< + * return self.value + * +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/metrics/cells.py":147 + * # type: () -> int + * with self._lock: + * return self.value # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/metrics/cells.py":146 + * def get_cumulative(self): + * # type: () -> int + * with self._lock: # <<<<<<<<<<<<<< + * return self.value + * +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 146, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 146, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 146, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_8 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_1) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/cells.py":144 + * self.value += value + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> int + * with self._lock: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":149 + * return self.value + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * if not name.urn: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 149, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 149, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 149, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 149, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 149, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 149, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 149, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 149, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_14to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_14to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":150 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * if not name.urn: + * # User counter case. +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_monitoring_infos = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":151 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * if not name.urn: # <<<<<<<<<<<<<< + * # User counter case. + * return monitoring_infos.int64_user_counter( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_urn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (!__pyx_t_5); + if (__pyx_t_6) { + + /* "apache_beam/metrics/cells.py":153 + * if not name.urn: + * # User counter case. + * return monitoring_infos.int64_user_counter( # <<<<<<<<<<<<<< + * name.namespace, + * name.name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/metrics/cells.py":154 + * # User counter case. + * return monitoring_infos.int64_user_counter( + * name.namespace, # <<<<<<<<<<<<<< + * name.name, + * self.get_cumulative(), +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/metrics/cells.py":155 + * return monitoring_infos.int64_user_counter( + * name.namespace, + * name.name, # <<<<<<<<<<<<<< + * self.get_cumulative(), + * ptransform=transform_id) +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "apache_beam/metrics/cells.py":156 + * name.namespace, + * name.name, + * self.get_cumulative(), # <<<<<<<<<<<<<< + * ptransform=transform_id) + * else: +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_11 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + + /* "apache_beam/metrics/cells.py":157 + * name.name, + * self.get_cumulative(), + * ptransform=transform_id) # <<<<<<<<<<<<<< + * else: + * # Arbitrary URN case. +*/ + __pyx_t_11 = 0; + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_7, __pyx_t_8, __pyx_t_9}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_10, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_int64_user_counter, __pyx_callargs+__pyx_t_11, (4-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":151 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * if not name.urn: # <<<<<<<<<<<<<< + * # User counter case. + * return monitoring_infos.int64_user_counter( +*/ + } + + /* "apache_beam/metrics/cells.py":160 + * else: + * # Arbitrary URN case. + * return monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * name.urn, self.get_cumulative(), labels=name.labels) + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_10); + + /* "apache_beam/metrics/cells.py":161 + * # Arbitrary URN case. + * return monitoring_infos.int64_counter( + * name.urn, self.get_cumulative(), labels=name.labels) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_urn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_11 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_labels); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_t_9, __pyx_t_8}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_labels, __pyx_t_7, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_int64_counter, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":149 + * return self.value + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * if not name.urn: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":30 + * + * cdef class CounterCell(MetricCell): + * cdef readonly libc.stdint.int64_t value # <<<<<<<<<<<<<< + * + * @cython.locals(ivalue=libc.stdint.int64_t) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_5value___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11CounterCell_5value___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.CounterCell.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":175 + * This class is thread safe. + * """ + * def __init__(self, *args): # <<<<<<<<<<<<<< + * super().__init__(*args) + * self.data = DistributionData.identity_element() +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_args) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":176 + * """ + * def __init__(self, *args): + * super().__init__(*args) # <<<<<<<<<<<<<< + * self.data = DistributionData.identity_element() + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":177 + * def __init__(self, *args): + * super().__init__(*args) + * self.data = DistributionData.identity_element() # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_identity_element, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData))))) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->data); + __Pyx_DECREF((PyObject *)__pyx_v_self->data); + __pyx_v_self->data = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":175 + * This class is thread safe. + * """ + * def __init__(self, *args): # <<<<<<<<<<<<<< + * super().__init__(*args) + * self.data = DistributionData.identity_element() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":179 + * self.data = DistributionData.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.data = DistributionData.identity_element() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_3reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_2reset(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/cells.py":181 + * def reset(self): + * # type: () -> None + * self.data = DistributionData.identity_element() # <<<<<<<<<<<<<< + * + * def combine(self, other): +*/ + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_identity_element, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData))))) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->data); + __Pyx_DECREF((PyObject *)__pyx_v_self->data); + __pyx_v_self->data = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":179 + * self.data = DistributionData.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.data = DistributionData.identity_element() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":183 + * self.data = DistributionData.identity_element() + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (DistributionCell) -> DistributionCell + * result = DistributionCell() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_5combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 183, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 183, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 183, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, i); __PYX_ERR(0, 183, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 183, __pyx_L3_error) + } + __pyx_v_other = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 183, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4combine(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_other) { + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":185 + * def combine(self, other): + * # type: (DistributionCell) -> DistributionCell + * result = DistributionCell() # <<<<<<<<<<<<<< + * result.data = self.data.combine(other.data) + * return result +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_result = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":186 + * # type: (DistributionCell) -> DistributionCell + * result = DistributionCell() + * result.data = self.data.combine(other.data) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->data); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData))))) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_result->data); + __Pyx_DECREF((PyObject *)__pyx_v_result->data); + __pyx_v_result->data = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":187 + * result = DistributionCell() + * result.data = self.data.combine(other.data) + * return result # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_result); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":183 + * self.data = DistributionData.identity_element() + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (DistributionCell) -> DistributionCell + * result = DistributionCell() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":189 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * if cython.compiled: + * # We will hold the GIL throughout the entire _update. +*/ + +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_7update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_7update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/metrics/cells.py":192 + * if cython.compiled: + * # We will hold the GIL throughout the entire _update. + * self._update(value) # <<<<<<<<<<<<<< + * else: + * with self._lock: +*/ + __pyx_t_6 = __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell__update(__pyx_v_self, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":189 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * if cython.compiled: + * # We will hold the GIL throughout the entire _update. +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_7update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_7update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_7update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_7update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 189, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 189, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 189, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 189, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 189, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 189, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_6update(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_6update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":197 + * self._update(value) + * + * def _update(self, value): # <<<<<<<<<<<<<< + * if cython.compiled: + * ivalue = value +*/ + +static CYTHON_INLINE int __pyx_f_11apache_beam_7metrics_5cells_16DistributionCell__update(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_value) { + int64_t __pyx_v_ivalue; + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/metrics/cells.py":199 + * def _update(self, value): + * if cython.compiled: + * ivalue = value # <<<<<<<<<<<<<< + * else: + * ivalue = int(value) +*/ + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_v_ivalue = __pyx_t_1; + + /* "apache_beam/metrics/cells.py":202 + * else: + * ivalue = int(value) + * self.data.count = self.data.count + 1 # <<<<<<<<<<<<<< + * self.data.sum = self.data.sum + ivalue + * if ivalue < self.data.min: +*/ + __pyx_v_self->data->count = (__pyx_v_self->data->count + 1); + + /* "apache_beam/metrics/cells.py":203 + * ivalue = int(value) + * self.data.count = self.data.count + 1 + * self.data.sum = self.data.sum + ivalue # <<<<<<<<<<<<<< + * if ivalue < self.data.min: + * self.data.min = ivalue +*/ + __pyx_v_self->data->sum = (__pyx_v_self->data->sum + __pyx_v_ivalue); + + /* "apache_beam/metrics/cells.py":204 + * self.data.count = self.data.count + 1 + * self.data.sum = self.data.sum + ivalue + * if ivalue < self.data.min: # <<<<<<<<<<<<<< + * self.data.min = ivalue + * if ivalue > self.data.max: +*/ + __pyx_t_2 = (__pyx_v_ivalue < __pyx_v_self->data->min); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":205 + * self.data.sum = self.data.sum + ivalue + * if ivalue < self.data.min: + * self.data.min = ivalue # <<<<<<<<<<<<<< + * if ivalue > self.data.max: + * self.data.max = ivalue +*/ + __pyx_v_self->data->min = __pyx_v_ivalue; + + /* "apache_beam/metrics/cells.py":204 + * self.data.count = self.data.count + 1 + * self.data.sum = self.data.sum + ivalue + * if ivalue < self.data.min: # <<<<<<<<<<<<<< + * self.data.min = ivalue + * if ivalue > self.data.max: +*/ + } + + /* "apache_beam/metrics/cells.py":206 + * if ivalue < self.data.min: + * self.data.min = ivalue + * if ivalue > self.data.max: # <<<<<<<<<<<<<< + * self.data.max = ivalue + * +*/ + __pyx_t_2 = (__pyx_v_ivalue > __pyx_v_self->data->max); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":207 + * self.data.min = ivalue + * if ivalue > self.data.max: + * self.data.max = ivalue # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __pyx_v_self->data->max = __pyx_v_ivalue; + + /* "apache_beam/metrics/cells.py":206 + * if ivalue < self.data.min: + * self.data.min = ivalue + * if ivalue > self.data.max: # <<<<<<<<<<<<<< + * self.data.max = ivalue + * +*/ + } + + /* "apache_beam/metrics/cells.py":197 + * self._update(value) + * + * def _update(self, value): # <<<<<<<<<<<<<< + * if cython.compiled: + * ivalue = value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell._update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":209 + * self.data.max = ivalue + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * with self._lock: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_8get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_8get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":211 + * def get_cumulative(self): + * # type: () -> DistributionData + * with self._lock: # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/metrics/cells.py":212 + * # type: () -> DistributionData + * with self._lock: + * return self.data.get_cumulative() # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = ((PyObject *)__pyx_v_self->data); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/metrics/cells.py":211 + * def get_cumulative(self): + * # type: () -> DistributionData + * with self._lock: # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 211, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 211, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 211, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 211, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_8 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_1) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/cells.py":209 + * self.data.max = ivalue + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * with self._lock: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":214 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_distribution( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 214, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 214, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 214, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 214, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 214, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 214, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 214, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_10to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_10to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":215 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * return monitoring_infos.int64_user_distribution( + * name.namespace, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_monitoring_infos = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":216 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_distribution( # <<<<<<<<<<<<<< + * name.namespace, + * name.name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/metrics/cells.py":217 + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_distribution( + * name.namespace, # <<<<<<<<<<<<<< + * name.name, + * self.get_cumulative(), +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/metrics/cells.py":218 + * return monitoring_infos.int64_user_distribution( + * name.namespace, + * name.name, # <<<<<<<<<<<<<< + * self.get_cumulative(), + * ptransform=transform_id) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/metrics/cells.py":219 + * name.namespace, + * name.name, + * self.get_cumulative(), # <<<<<<<<<<<<<< + * ptransform=transform_id) + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + + /* "apache_beam/metrics/cells.py":220 + * name.name, + * self.get_cumulative(), + * ptransform=transform_id) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_8, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_int64_user_distribution, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":214 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_distribution( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":38 + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): + * cdef readonly DistributionData data # <<<<<<<<<<<<<< + * + * @cython.locals(ivalue=libc.stdint.int64_t) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_4data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4data___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionCell_4data___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->data); + __pyx_r = ((PyObject *)__pyx_v_self->data); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":230 + * This class is thread safe. + * """ + * def __init__(self, data_class): # <<<<<<<<<<<<<< + * super().__init__() + * self.data_class = data_class +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_data_class = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_class,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 230, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 230, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 230, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 230, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 230, __pyx_L3_error) + } + __pyx_v_data_class = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 230, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), __pyx_v_data_class); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_data_class) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":231 + * """ + * def __init__(self, data_class): + * super().__init__() # <<<<<<<<<<<<<< + * self.data_class = data_class + * self.data = self.data_class.identity_element() +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":232 + * def __init__(self, data_class): + * super().__init__() + * self.data_class = data_class # <<<<<<<<<<<<<< + * self.data = self.data_class.identity_element() + * +*/ + __Pyx_INCREF(__pyx_v_data_class); + __Pyx_GIVEREF(__pyx_v_data_class); + __Pyx_GOTREF(__pyx_v_self->data_class); + __Pyx_DECREF(__pyx_v_self->data_class); + __pyx_v_self->data_class = __pyx_v_data_class; + + /* "apache_beam/metrics/cells.py":233 + * super().__init__() + * self.data_class = data_class + * self.data = self.data_class.identity_element() # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_3 = __pyx_v_self->data_class; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_identity_element, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->data); + __Pyx_DECREF(__pyx_v_self->data); + __pyx_v_self->data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":230 + * This class is thread safe. + * """ + * def __init__(self, data_class): # <<<<<<<<<<<<<< + * super().__init__() + * self.data_class = data_class +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":235 + * self.data = self.data_class.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = self.data_class.identity_element() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_2reset(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_2reset(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/cells.py":236 + * + * def reset(self): + * self.data = self.data_class.identity_element() # <<<<<<<<<<<<<< + * + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': +*/ + __pyx_t_2 = __pyx_v_self->data_class; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_identity_element, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->data); + __Pyx_DECREF(__pyx_v_self->data); + __pyx_v_self->data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":235 + * self.data = self.data_class.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = self.data_class.identity_element() + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":238 + * self.data = self.data_class.identity_element() + * + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': # <<<<<<<<<<<<<< + * result = type(self)() # type: ignore[call-arg] + * result.data = self.data.combine(other.data) +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 238, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 238, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, i); __PYX_ERR(0, 238, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __pyx_L3_error) + } + __pyx_v_other = ((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 238, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, 0, "other", 0))) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4combine(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4combine(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_other) { + PyObject *__pyx_v_result = NULL; + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":239 + * + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': + * result = type(self)() # type: ignore[call-arg] # <<<<<<<<<<<<<< + * result.data = self.data.combine(other.data) + * return result +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __pyx_t_3 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":240 + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': + * result = type(self)() # type: ignore[call-arg] + * result.data = self.data.combine(other.data) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_3 = __pyx_v_self->data; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other->data}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_data, __pyx_t_1) < (0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":241 + * result = type(self)() # type: ignore[call-arg] + * result.data = self.data.combine(other.data) + * return result # <<<<<<<<<<<<<< + * + * def set(self, value): +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + if (!(likely(((__pyx_v_result) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell))))) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_INCREF(__pyx_v_result); + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_result); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":238 + * self.data = self.data_class.identity_element() + * + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': # <<<<<<<<<<<<<< + * result = type(self)() # type: ignore[call-arg] + * result.data = self.data.combine(other.data) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":243 + * return result + * + * def set(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set = {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 243, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set", 0) < (0)) __PYX_ERR(0, 243, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set", 1, 1, 1, i); __PYX_ERR(0, 243, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 243, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_6set(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_6set(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set", 0); + + /* "apache_beam/metrics/cells.py":244 + * + * def set(self, value): + * with self._lock: # <<<<<<<<<<<<<< + * self._update_locked(value) + * +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/metrics/cells.py":245 + * def set(self, value): + * with self._lock: + * self._update_locked(value) # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self->__pyx_base.__pyx_vtab)->_update_locked(__pyx_v_self, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 245, __pyx_L7_error) + + /* "apache_beam/metrics/cells.py":244 + * + * def set(self, value): + * with self._lock: # <<<<<<<<<<<<<< + * self._update_locked(value) + * +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_10 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 244, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 244, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 244, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_9); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 244, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/cells.py":243 + * return result + * + * def set(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":247 + * self._update_locked(value) + * + * def update(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell_update(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/metrics/cells.py":248 + * + * def update(self, value): + * with self._lock: # <<<<<<<<<<<<<< + * self._update_locked(value) + * +*/ + /*with:*/ { + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/metrics/cells.py":249 + * def update(self, value): + * with self._lock: + * self._update_locked(value) # <<<<<<<<<<<<<< + * + * def _update_locked(self, value): +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self->__pyx_base.__pyx_vtab)->_update_locked(__pyx_v_self, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 249, __pyx_L7_error) + + /* "apache_beam/metrics/cells.py":248 + * + * def update(self, value): + * with self._lock: # <<<<<<<<<<<<<< + * self._update_locked(value) + * +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 248, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 248, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_6 < (0)) __PYX_ERR(0, 248, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_6); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 248, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_7) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/cells.py":247 + * self._update_locked(value) + * + * def update(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 247, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 247, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 247, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 247, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 247, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 247, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_8update(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_8update(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":251 + * self._update_locked(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +static int __pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_locked", 0); + + /* "apache_beam/metrics/cells.py":252 + * + * def _update_locked(self, value): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 252, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":251 + * self._update_locked(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell._update_locked", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":254 + * raise NotImplementedError(type(self)) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * with self._lock: + * return self.data.get_cumulative() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":255 + * + * def get_cumulative(self): + * with self._lock: # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base._lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/metrics/cells.py":256 + * def get_cumulative(self): + * with self._lock: + * return self.data.get_cumulative() # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_self->data; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/metrics/cells.py":255 + * + * def get_cumulative(self): + * with self._lock: # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 255, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 255, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 255, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 255, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_8 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_1) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/cells.py":254 + * raise NotImplementedError(type(self)) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * with self._lock: + * return self.data.get_cumulative() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":258 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_name = 0; + CYTHON_UNUSED PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 258, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 258, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 258, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 258, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 258, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 258, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 258, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 258, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_12to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_12to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":259 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * raise NotImplementedError(type(self)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 259, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":258 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.AbstractMetricCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":45 + * + * cdef class AbstractMetricCell(MetricCell): + * cdef readonly object data_class # <<<<<<<<<<<<<< + * cdef public object data + * cdef bint _update_locked(self, value) except -1 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->data_class); + __pyx_r = __pyx_v_self->data_class; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":46 + * cdef class AbstractMetricCell(MetricCell): + * cdef readonly object data_class + * cdef public object data # <<<<<<<<<<<<<< + * cdef bint _update_locked(self, value) except -1 + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->data); + __pyx_r = __pyx_v_self->data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_2__set__(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_2__set__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->data); + __Pyx_DECREF(__pyx_v_self->data); + __pyx_v_self->data = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_4__del__(((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_4__del__(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->data); + __Pyx_DECREF(__pyx_v_self->data); + __pyx_v_self->data = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":273 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(GaugeData) + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":274 + * """ + * def __init__(self): + * super().__init__(GaugeData) # <<<<<<<<<<<<<< + * + * def _update_locked(self, value): +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GaugeData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":273 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(GaugeData) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":276 + * super().__init__(GaugeData) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * # Set the value directly without checking timestamp, because + * # this value is naturally the latest value. +*/ + +static int __pyx_f_11apache_beam_7metrics_5cells_9GaugeCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_locked", 0); + + /* "apache_beam/metrics/cells.py":279 + * # Set the value directly without checking timestamp, because + * # this value is naturally the latest value. + * self.data.value = int(value) # <<<<<<<<<<<<<< + * self.data.timestamp = time.time() + * +*/ + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.data, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_1) < (0)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":280 + * # this value is naturally the latest value. + * self.data.value = int(value) + * self.data.timestamp = time.time() # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.data, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_1) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":276 + * super().__init__(GaugeData) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * # Set the value directly without checking timestamp, because + * # this value is naturally the latest value. +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeCell._update_locked", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":282 + * self.data.timestamp = time.time() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_gauge( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 282, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 282, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 282, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 282, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 282, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 282, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell_2to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeCell_2to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":283 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * return monitoring_infos.int64_user_gauge( + * name.namespace, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_monitoring_infos = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":284 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_gauge( # <<<<<<<<<<<<<< + * name.namespace, + * name.name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/metrics/cells.py":285 + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_gauge( + * name.namespace, # <<<<<<<<<<<<<< + * name.name, + * self.get_cumulative(), +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/metrics/cells.py":286 + * return monitoring_infos.int64_user_gauge( + * name.namespace, + * name.name, # <<<<<<<<<<<<<< + * self.get_cumulative(), + * ptransform=transform_id) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/metrics/cells.py":287 + * name.namespace, + * name.name, + * self.get_cumulative(), # <<<<<<<<<<<<<< + * ptransform=transform_id) + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + + /* "apache_beam/metrics/cells.py":288 + * name.name, + * self.get_cumulative(), + * ptransform=transform_id) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_8, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_int64_user_gauge, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":282 + * self.data.timestamp = time.time() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_gauge( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":302 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(StringSetData) + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":303 + * """ + * def __init__(self): + * super().__init__(StringSetData) # <<<<<<<<<<<<<< + * + * def add(self, value): +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":302 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(StringSetData) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":305 + * super().__init__(StringSetData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_3add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetCell_3add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_3add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 305, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 305, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 305, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, i); __PYX_ERR(0, 305, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 305, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 305, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_2add(((struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_2add(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/metrics/cells.py":306 + * + * def add(self, value): + * self.update(value) # <<<<<<<<<<<<<< + * + * def _update_locked(self, value): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 306, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":305 + * super().__init__(StringSetData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":308 + * self.update(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * self.data.add(value) + * +*/ + +static int __pyx_f_11apache_beam_7metrics_5cells_13StringSetCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_locked", 0); + + /* "apache_beam/metrics/cells.py":309 + * + * def _update_locked(self, value): + * self.data.add(value) # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __pyx_t_2 = __pyx_v_self->__pyx_base.data; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":308 + * self.update(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * self.data.add(value) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell._update_locked", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":311 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_set_string( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 311, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 311, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 311, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 311, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 311, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 311, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 311, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 311, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_4to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetCell_4to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":312 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * return monitoring_infos.user_set_string( + * name.namespace, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_monitoring_infos = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":313 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_set_string( # <<<<<<<<<<<<<< + * name.namespace, + * name.name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/metrics/cells.py":314 + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_set_string( + * name.namespace, # <<<<<<<<<<<<<< + * name.name, + * self.get_cumulative(), +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/metrics/cells.py":315 + * return monitoring_infos.user_set_string( + * name.namespace, + * name.name, # <<<<<<<<<<<<<< + * self.get_cumulative(), + * ptransform=transform_id) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/metrics/cells.py":316 + * name.namespace, + * name.name, + * self.get_cumulative(), # <<<<<<<<<<<<<< + * ptransform=transform_id) + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + + /* "apache_beam/metrics/cells.py":317 + * name.name, + * self.get_cumulative(), + * ptransform=transform_id) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_8, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_user_set_string, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":311 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_set_string( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":331 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(BoundedTrieData) + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":332 + * """ + * def __init__(self): + * super().__init__(BoundedTrieData) # <<<<<<<<<<<<<< + * + * def add(self, value): +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":331 + * This class is thread safe. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(BoundedTrieData) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":334 + * super().__init__(BoundedTrieData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 334, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 334, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 334, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, i); __PYX_ERR(0, 334, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 334, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 334, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_2add(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_2add(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/metrics/cells.py":335 + * + * def add(self, value): + * self.update(value) # <<<<<<<<<<<<<< + * + * def _update_locked(self, value): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 335, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":334 + * super().__init__(BoundedTrieData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":337 + * self.update(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * self.data.add(value) + * +*/ + +static int __pyx_f_11apache_beam_7metrics_5cells_15BoundedTrieCell__update_locked(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_locked", 0); + + /* "apache_beam/metrics/cells.py":338 + * + * def _update_locked(self, value): + * self.data.add(value) # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): +*/ + __pyx_t_2 = __pyx_v_self->__pyx_base.data; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":337 + * self.update(value) + * + * def _update_locked(self, value): # <<<<<<<<<<<<<< + * self.data.add(value) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell._update_locked", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":340 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_bounded_trie( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl = {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 340, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 340, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 340, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info_impl", 0) < (0)) __PYX_ERR(0, 340, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, i); __PYX_ERR(0, 340, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 340, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 340, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_transform_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info_impl", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 340, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_4to_runner_api_monitoring_info_impl(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *)__pyx_v_self), __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieCell_4to_runner_api_monitoring_info_impl(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info_impl", 0); + + /* "apache_beam/metrics/cells.py":341 + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * return monitoring_infos.user_bounded_trie( + * name.namespace, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_2; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __pyx_v_monitoring_infos = __pyx_t_4; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":342 + * def to_runner_api_monitoring_info_impl(self, name, transform_id): + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_bounded_trie( # <<<<<<<<<<<<<< + * name.namespace, + * name.name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/metrics/cells.py":343 + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_bounded_trie( + * name.namespace, # <<<<<<<<<<<<<< + * name.name, + * self.get_cumulative(), +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/metrics/cells.py":344 + * return monitoring_infos.user_bounded_trie( + * name.namespace, + * name.name, # <<<<<<<<<<<<<< + * self.get_cumulative(), + * ptransform=transform_id) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/metrics/cells.py":345 + * name.namespace, + * name.name, + * self.get_cumulative(), # <<<<<<<<<<<<<< + * ptransform=transform_id) + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + + /* "apache_beam/metrics/cells.py":346 + * name.name, + * self.get_cumulative(), + * ptransform=transform_id) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_8, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_user_bounded_trie, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":340 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_bounded_trie( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieCell.to_runner_api_monitoring_info_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":351 + * class DistributionResult(object): + * """The result of a Distribution metric.""" + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (DistributionData) -> None + * self.data = data +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 351, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 351, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 351, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 351, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 351, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 351, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 351, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_data = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 351, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult___init__(__pyx_self, __pyx_v_self, __pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":353 + * def __init__(self, data): + * # type: (DistributionData) -> None + * self.data = data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data, __pyx_v_data) < (0)) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":351 + * class DistributionResult(object): + * """The result of a Distribution metric.""" + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (DistributionData) -> None + * self.data = data +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":355 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, DistributionResult): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 355, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 355, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 355, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":357 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, DistributionResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DistributionResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":358 + * # type: (object) -> bool + * if isinstance(other, DistributionResult): + * return self.data == other.data # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":357 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, DistributionResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":360 + * return self.data == other.data + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":355 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, DistributionResult): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":362 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 362, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 362, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 362, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 362, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 362, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 362, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":364 + * def __hash__(self): + * # type: () -> int + * return hash(self.data) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":362 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":366 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 366, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 366, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 366, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 366, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":368 + * def __repr__(self): + * # type: () -> str + * return ( # <<<<<<<<<<<<<< + * 'DistributionResult(sum={}, count={}, min={}, max={}, ' + * 'mean={})'.format(self.sum, self.count, self.min, self.max, self.mean)) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/cells.py":370 + * return ( + * 'DistributionResult(sum={}, count={}, min={}, max={}, ' + * 'mean={})'.format(self.sum, self.count, self.min, self.max, self.mean)) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_DistributionResult_sum_count_min; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mean); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":366 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":372 + * 'mean={})'.format(self.sum, self.count, self.min, self.max, self.mean)) + * + * @property # <<<<<<<<<<<<<< + * def max(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_9max(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_9max = {"max", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_9max, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_9max(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("max (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 372, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 372, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "max", 0) < (0)) __PYX_ERR(0, 372, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("max", 1, 1, 1, i); __PYX_ERR(0, 372, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 372, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("max", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 372, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.max", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_8max(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_8max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("max", 0); + + /* "apache_beam/metrics/cells.py":375 + * def max(self): + * # type: () -> Optional[int] + * return self.data.max if self.data.count else None # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":372 + * 'mean={})'.format(self.sum, self.count, self.min, self.max, self.mean)) + * + * @property # <<<<<<<<<<<<<< + * def max(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.max", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":377 + * return self.data.max if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def min(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_11min(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_11min = {"min", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_11min, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_11min(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("min (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 377, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 377, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "min", 0) < (0)) __PYX_ERR(0, 377, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("min", 1, 1, 1, i); __PYX_ERR(0, 377, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 377, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("min", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 377, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.min", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_10min(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_10min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("min", 0); + + /* "apache_beam/metrics/cells.py":380 + * def min(self): + * # type: () -> Optional[int] + * return self.data.min if self.data.count else None # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":377 + * return self.data.max if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def min(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.min", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":382 + * return self.data.min if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def count(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_13count(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_13count = {"count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_13count, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_13count(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("count (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 382, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 382, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "count", 0) < (0)) __PYX_ERR(0, 382, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("count", 1, 1, 1, i); __PYX_ERR(0, 382, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 382, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("count", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 382, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_12count(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_12count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("count", 0); + + /* "apache_beam/metrics/cells.py":385 + * def count(self): + * # type: () -> Optional[int] + * return self.data.count # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":382 + * return self.data.min if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def count(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":387 + * return self.data.count + * + * @property # <<<<<<<<<<<<<< + * def sum(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_15sum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_15sum = {"sum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_15sum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_15sum(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sum (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 387, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 387, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sum", 0) < (0)) __PYX_ERR(0, 387, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sum", 1, 1, 1, i); __PYX_ERR(0, 387, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 387, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("sum", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 387, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.sum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_14sum(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_14sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sum", 0); + + /* "apache_beam/metrics/cells.py":390 + * def sum(self): + * # type: () -> Optional[int] + * return self.data.sum # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":387 + * return self.data.count + * + * @property # <<<<<<<<<<<<<< + * def sum(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.sum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":392 + * return self.data.sum + * + * @property # <<<<<<<<<<<<<< + * def mean(self): + * # type: () -> Optional[float] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_17mean(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_5cells_18DistributionResult_16mean, "Returns the float mean of the distribution.\n\n If the distribution contains no elements, it returns None.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_17mean = {"mean", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_17mean, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_5cells_18DistributionResult_16mean}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_18DistributionResult_17mean(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("mean (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 392, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 392, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mean", 0) < (0)) __PYX_ERR(0, 392, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mean", 1, 1, 1, i); __PYX_ERR(0, 392, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 392, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("mean", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 392, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.mean", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_16mean(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_18DistributionResult_16mean(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("mean", 0); + + /* "apache_beam/metrics/cells.py":400 + * If the distribution contains no elements, it returns None. + * """ + * if self.data.count == 0: # <<<<<<<<<<<<<< + * return None + * return self.data.sum / self.data.count +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":401 + * """ + * if self.data.count == 0: + * return None # <<<<<<<<<<<<<< + * return self.data.sum / self.data.count + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":400 + * If the distribution contains no elements, it returns None. + * """ + * if self.data.count == 0: # <<<<<<<<<<<<<< + * return None + * return self.data.sum / self.data.count +*/ + } + + /* "apache_beam/metrics/cells.py":402 + * if self.data.count == 0: + * return None + * return self.data.sum / self.data.count # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":392 + * return self.data.sum + * + * @property # <<<<<<<<<<<<<< + * def mean(self): + * # type: () -> Optional[float] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionResult.mean", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":406 + * + * class GaugeResult(object): + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (GaugeData) -> None + * self.data = data +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 406, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 406, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 406, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 406, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 406, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 406, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 406, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_data = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 406, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult___init__(__pyx_self, __pyx_v_self, __pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":408 + * def __init__(self, data): + * # type: (GaugeData) -> None + * self.data = data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data, __pyx_v_data) < (0)) __PYX_ERR(0, 408, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":406 + * + * class GaugeResult(object): + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (GaugeData) -> None + * self.data = data +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":410 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeResult): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 410, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 410, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 410, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 410, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 410, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 410, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 410, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 410, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":412 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, GaugeResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_GaugeResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":413 + * # type: (object) -> bool + * if isinstance(other, GaugeResult): + * return self.data == other.data # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":412 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, GaugeResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":415 + * return self.data == other.data + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":410 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeResult): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":417 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 417, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 417, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 417, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 417, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 417, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 417, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":419 + * def __hash__(self): + * # type: () -> int + * return hash(self.data) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":417 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":421 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.value, self.timestamp) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 421, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 421, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 421, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 421, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 421, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 421, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":422 + * + * def __repr__(self): + * return ''.format( # <<<<<<<<<<<<<< + * self.value, self.timestamp) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_GaugeResult_value_timestamp; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":423 + * def __repr__(self): + * return ''.format( + * self.value, self.timestamp) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":421 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.value, self.timestamp) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":425 + * self.value, self.timestamp) + * + * @property # <<<<<<<<<<<<<< + * def value(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_9value(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_9value = {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_9value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_9value(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 425, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 425, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "value", 0) < (0)) __PYX_ERR(0, 425, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("value", 1, 1, 1, i); __PYX_ERR(0, 425, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 425, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("value", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 425, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_8value(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_8value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("value", 0); + + /* "apache_beam/metrics/cells.py":428 + * def value(self): + * # type: () -> Optional[int] + * return self.data.value # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":425 + * self.value, self.timestamp) + * + * @property # <<<<<<<<<<<<<< + * def value(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":430 + * return self.data.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * # type: () -> Optional[int] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_11timestamp(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_11timestamp = {"timestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_11timestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_11GaugeResult_11timestamp(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("timestamp (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 430, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 430, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timestamp", 0) < (0)) __PYX_ERR(0, 430, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, i); __PYX_ERR(0, 430, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 430, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 430, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_10timestamp(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_11GaugeResult_10timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timestamp", 0); + + /* "apache_beam/metrics/cells.py":433 + * def timestamp(self): + * # type: () -> Optional[int] + * return self.data.timestamp # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":430 + * return self.data.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * # type: () -> Optional[int] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeResult.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":446 + * by other than the GaugeCell that contains it. + * """ + * def __init__(self, value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> None + * self.value = value +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_timestamp = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 446, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 446, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 446, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 446, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 446, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_timestamp = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 446, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData___init__(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_timestamp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":448 + * def __init__(self, value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> None + * self.value = value # <<<<<<<<<<<<<< + * self.timestamp = timestamp if timestamp is not None else 0 + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value, __pyx_v_value) < (0)) __PYX_ERR(0, 448, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":449 + * # type: (Optional[int], Optional[int]) -> None + * self.value = value + * self.timestamp = timestamp if timestamp is not None else 0 # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_2 = (__pyx_v_timestamp != Py_None); + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_v_timestamp); + __pyx_t_1 = __pyx_v_timestamp; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_1 = __pyx_mstate_global->__pyx_int_0; + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_1) < (0)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":446 + * by other than the GaugeCell that contains it. + * """ + * def __init__(self, value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> None + * self.value = value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":451 + * self.timestamp = timestamp if timestamp is not None else 0 + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeData): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 451, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 451, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 451, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 451, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 451, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 451, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 451, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 451, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":453 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, GaugeData): # <<<<<<<<<<<<<< + * return self.value == other.value and self.timestamp == other.timestamp + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_GaugeData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":454 + * # type: (object) -> bool + * if isinstance(other, GaugeData): + * return self.value == other.value and self.timestamp == other.timestamp # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 454, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":453 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, GaugeData): # <<<<<<<<<<<<<< + * return self.value == other.value and self.timestamp == other.timestamp + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":456 + * return self.value == other.value and self.timestamp == other.timestamp + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":451 + * self.timestamp = timestamp if timestamp is not None else 0 + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeData): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":458 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash((self.value, self.timestamp)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 458, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 458, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 458, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 458, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 458, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 458, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_hash_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":460 + * def __hash__(self): + * # type: () -> int + * return hash((self.value, self.timestamp)) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 460, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 460, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromHash_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":458 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash((self.value, self.timestamp)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":462 + * return hash((self.value, self.timestamp)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ''.format( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 462, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 462, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 462, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 462, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 462, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 462, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":464 + * def __repr__(self): + * # type: () -> str + * return ''.format( # <<<<<<<<<<<<<< + * self.value, self.timestamp) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_GaugeData_value_timestamp; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":465 + * # type: () -> str + * return ''.format( + * self.value, self.timestamp) # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":462 + * return hash((self.value, self.timestamp)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ''.format( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":467 + * self.value, self.timestamp) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeData + * return GaugeData(self.value, timestamp=self.timestamp) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 467, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 467, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_cumulative", 0) < (0)) __PYX_ERR(0, 467, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, i); __PYX_ERR(0, 467, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 467, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 467, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_8get_cumulative(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":469 + * def get_cumulative(self): + * # type: () -> GaugeData + * return GaugeData(self.value, timestamp=self.timestamp) # <<<<<<<<<<<<<< + * + * def get_result(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GaugeData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_5, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":467 + * self.value, self.timestamp) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeData + * return GaugeData(self.value, timestamp=self.timestamp) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":471 + * return GaugeData(self.value, timestamp=self.timestamp) + * + * def get_result(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeResult + * return GaugeResult(self.get_cumulative()) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_11get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_11get_result = {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_11get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_11get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 471, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_result", 0) < (0)) __PYX_ERR(0, 471, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, i); __PYX_ERR(0, 471, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 471, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_10get_result(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_10get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_result", 0); + + /* "apache_beam/metrics/cells.py":473 + * def get_result(self): + * # type: () -> GaugeResult + * return GaugeResult(self.get_cumulative()) # <<<<<<<<<<<<<< + * + * def combine(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GaugeResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":471 + * return GaugeData(self.value, timestamp=self.timestamp) + * + * def get_result(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeResult + * return GaugeResult(self.get_cumulative()) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":475 + * return GaugeResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_13combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_13combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_13combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_13combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 475, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 475, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 475, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 475, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, i); __PYX_ERR(0, 475, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 475, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 475, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 475, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_12combine(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_12combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":477 + * def combine(self, other): + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_other == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":478 + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: + * return self # <<<<<<<<<<<<<< + * + * if other.timestamp > self.timestamp: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":477 + * def combine(self, other): + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "apache_beam/metrics/cells.py":480 + * return self + * + * if other.timestamp > self.timestamp: # <<<<<<<<<<<<<< + * return other + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":481 + * + * if other.timestamp > self.timestamp: + * return other # <<<<<<<<<<<<<< + * else: + * return self +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_other); + __pyx_r = __pyx_v_other; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":480 + * return self + * + * if other.timestamp > self.timestamp: # <<<<<<<<<<<<<< + * return other + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":483 + * return other + * else: + * return self # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":475 + * return GaugeResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":485 + * return self + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> GaugeData +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_15singleton(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_15singleton = {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_15singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_15singleton(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_timestamp = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("singleton (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 485, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 485, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 485, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "singleton", 0) < (0)) __PYX_ERR(0, 485, __pyx_L3_error) + + /* "apache_beam/metrics/cells.py":486 + * + * @staticmethod + * def singleton(value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> GaugeData + * return GaugeData(value, timestamp=timestamp) +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("singleton", 0, 1, 2, i); __PYX_ERR(0, 485, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 485, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 485, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_value = values[0]; + __pyx_v_timestamp = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("singleton", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 485, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_14singleton(__pyx_self, __pyx_v_value, __pyx_v_timestamp); + + /* "apache_beam/metrics/cells.py":485 + * return self + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> GaugeData +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_14singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("singleton", 0); + + /* "apache_beam/metrics/cells.py":488 + * def singleton(value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> GaugeData + * return GaugeData(value, timestamp=timestamp) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GaugeData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_v_timestamp, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":485 + * return self + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> GaugeData +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":490 + * return GaugeData(value, timestamp=timestamp) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> GaugeData +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_17identity_element(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_17identity_element = {"identity_element", (PyCFunction)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_17identity_element, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_9GaugeData_17identity_element(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("identity_element (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_16identity_element(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_9GaugeData_16identity_element(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("identity_element", 0); + + /* "apache_beam/metrics/cells.py":493 + * def identity_element(): + * # type: () -> GaugeData + * return GaugeData(0, timestamp=0) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GaugeData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_mstate_global->__pyx_int_0, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":490 + * return GaugeData(value, timestamp=timestamp) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> GaugeData +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.GaugeData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":506 + * by other than the DistributionCell that contains it. + * """ + * def __init__(self, sum, count, min, max): # <<<<<<<<<<<<<< + * # type: (int, int, int, int) -> None + * if count: +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_sum = 0; + PyObject *__pyx_v_count = 0; + PyObject *__pyx_v_min = 0; + PyObject *__pyx_v_max = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sum,&__pyx_mstate_global->__pyx_n_u_count,&__pyx_mstate_global->__pyx_n_u_min,&__pyx_mstate_global->__pyx_n_u_max,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 506, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 506, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 506, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 506, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 506, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 506, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 506, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 506, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 506, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 506, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 506, __pyx_L3_error) + } + __pyx_v_sum = values[0]; + __pyx_v_count = values[1]; + __pyx_v_min = values[2]; + __pyx_v_max = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 506, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self), __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_sum, PyObject *__pyx_v_count, PyObject *__pyx_v_min, PyObject *__pyx_v_max) { + int __pyx_r; + int __pyx_t_1; + int64_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/metrics/cells.py":508 + * def __init__(self, sum, count, min, max): + * # type: (int, int, int, int) -> None + * if count: # <<<<<<<<<<<<<< + * self.sum = sum + * self.count = count +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_count); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 508, __pyx_L1_error) + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":509 + * # type: (int, int, int, int) -> None + * if count: + * self.sum = sum # <<<<<<<<<<<<<< + * self.count = count + * self.min = min +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_sum); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_v_self->sum = __pyx_t_2; + + /* "apache_beam/metrics/cells.py":510 + * if count: + * self.sum = sum + * self.count = count # <<<<<<<<<<<<<< + * self.min = min + * self.max = max +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_count); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_v_self->count = __pyx_t_2; + + /* "apache_beam/metrics/cells.py":511 + * self.sum = sum + * self.count = count + * self.min = min # <<<<<<<<<<<<<< + * self.max = max + * else: +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_min); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_v_self->min = __pyx_t_2; + + /* "apache_beam/metrics/cells.py":512 + * self.count = count + * self.min = min + * self.max = max # <<<<<<<<<<<<<< + * else: + * self.sum = self.count = 0 +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_max); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_v_self->max = __pyx_t_2; + + /* "apache_beam/metrics/cells.py":508 + * def __init__(self, sum, count, min, max): + * # type: (int, int, int, int) -> None + * if count: # <<<<<<<<<<<<<< + * self.sum = sum + * self.count = count +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":514 + * self.max = max + * else: + * self.sum = self.count = 0 # <<<<<<<<<<<<<< + * self.min = 2**63 - 1 + * # Avoid Wimplicitly-unsigned-literal caused by -2**63. +*/ + /*else*/ { + __pyx_v_self->sum = 0; + __pyx_v_self->count = 0; + + /* "apache_beam/metrics/cells.py":515 + * else: + * self.sum = self.count = 0 + * self.min = 2**63 - 1 # <<<<<<<<<<<<<< + * # Avoid Wimplicitly-unsigned-literal caused by -2**63. + * self.max = -self.min - 1 +*/ + __pyx_v_self->min = 0x7fffffffffffffff; + + /* "apache_beam/metrics/cells.py":517 + * self.min = 2**63 - 1 + * # Avoid Wimplicitly-unsigned-literal caused by -2**63. + * self.max = -self.min - 1 # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_v_self->max = ((-__pyx_v_self->min) - 1); + } + __pyx_L3:; + + /* "apache_beam/metrics/cells.py":506 + * by other than the DistributionCell that contains it. + * """ + * def __init__(self, sum, count, min, max): # <<<<<<<<<<<<<< + * # type: (int, int, int, int) -> None + * if count: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":519 + * self.max = -self.min - 1 + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, DistributionData): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_2__eq__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_2__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":521 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, DistributionData): # <<<<<<<<<<<<<< + * return ( + * self.sum == other.sum and self.count == other.count and +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":522 + * # type: (object) -> bool + * if isinstance(other, DistributionData): + * return ( # <<<<<<<<<<<<<< + * self.sum == other.sum and self.count == other.count and + * self.min == other.min and self.max == other.max) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/cells.py":523 + * if isinstance(other, DistributionData): + * return ( + * self.sum == other.sum and self.count == other.count and # <<<<<<<<<<<<<< + * self.min == other.min and self.max == other.max) + * else: +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 523, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 523, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/metrics/cells.py":524 + * return ( + * self.sum == other.sum and self.count == other.count and + * self.min == other.min and self.max == other.max) # <<<<<<<<<<<<<< + * else: + * return False +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 524, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":521 + * def __eq__(self, other): + * # type: (object) -> bool + * if isinstance(other, DistributionData): # <<<<<<<<<<<<<< + * return ( + * self.sum == other.sum and self.count == other.count and +*/ + } + + /* "apache_beam/metrics/cells.py":526 + * self.min == other.min and self.max == other.max) + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":519 + * self.max = -self.min - 1 + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, DistributionData): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":528 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash((self.sum, self.count, self.min, self.max)) +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_4__hash__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_4__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_hash_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":530 + * def __hash__(self): + * # type: () -> int + * return hash((self.sum, self.count, self.min, self.max)) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 530, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 530, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 530, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 530, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_6 = PyObject_Hash(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_hash_t)-1))) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":528 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash((self.sum, self.count, self.min, self.max)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":532 + * return hash((self.sum, self.count, self.min, self.max)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return 'DistributionData(sum={}, count={}, min={}, max={})'.format( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_7__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_6__repr__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_6__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":534 + * def __repr__(self): + * # type: () -> str + * return 'DistributionData(sum={}, count={}, min={}, max={})'.format( # <<<<<<<<<<<<<< + * self.sum, self.count, self.min, self.max) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_DistributionData_sum_count_min_m; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":535 + * # type: () -> str + * return 'DistributionData(sum={}, count={}, min={}, max={})'.format( + * self.sum, self.count, self.min, self.max) # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":532 + * return hash((self.sum, self.count, self.min, self.max)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return 'DistributionData(sum={}, count={}, min={}, max={})'.format( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":537 + * self.sum, self.count, self.min, self.max) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * return DistributionData(self.sum, self.count, self.min, self.max) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_8get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_8get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":539 + * def get_cumulative(self): + * # type: () -> DistributionData + * return DistributionData(self.sum, self.count, self.min, self.max) # <<<<<<<<<<<<<< + * + * def get_result(self) -> DistributionResult: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":537 + * self.sum, self.count, self.min, self.max) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * return DistributionData(self.sum, self.count, self.min, self.max) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":541 + * return DistributionData(self.sum, self.count, self.min, self.max) + * + * def get_result(self) -> DistributionResult: # <<<<<<<<<<<<<< + * return DistributionResult(self.get_cumulative()) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_11get_result(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_11get_result = {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_11get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_11get_result(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_result", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_result", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_10get_result(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_10get_result(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_result", 0); + + /* "apache_beam/metrics/cells.py":542 + * + * def get_result(self) -> DistributionResult: + * return DistributionResult(self.get_cumulative()) # <<<<<<<<<<<<<< + * + * def combine(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DistributionResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":541 + * return DistributionData(self.sum, self.count, self.min, self.max) + * + * def get_result(self) -> DistributionResult: # <<<<<<<<<<<<<< + * return DistributionResult(self.get_cumulative()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":544 + * return DistributionResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_13combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_13combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_13combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_13combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 544, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 544, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, i); __PYX_ERR(0, 544, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 544, __pyx_L3_error) + } + __pyx_v_other = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 544, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_12combine(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_12combine(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":546 + * def combine(self, other): + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_other == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":547 + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: + * return self # <<<<<<<<<<<<<< + * + * return DistributionData( +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":546 + * def combine(self, other): + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "apache_beam/metrics/cells.py":549 + * return self + * + * return DistributionData( # <<<<<<<<<<<<<< + * self.sum + other.sum, + * self.count + other.count, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + + /* "apache_beam/metrics/cells.py":550 + * + * return DistributionData( + * self.sum + other.sum, # <<<<<<<<<<<<<< + * self.count + other.count, + * self.min if self.min < other.min else other.min, +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/metrics/cells.py":551 + * return DistributionData( + * self.sum + other.sum, + * self.count + other.count, # <<<<<<<<<<<<<< + * self.min if self.min < other.min else other.min, + * self.max if self.max > other.max else other.max) +*/ + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":552 + * self.sum + other.sum, + * self.count + other.count, + * self.min if self.min < other.min else other.min, # <<<<<<<<<<<<<< + * self.max if self.max > other.max else other.max) + * +*/ + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_1) { + __pyx_t_9 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __pyx_t_9 = 0; + } else { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __pyx_t_9 = 0; + } + + /* "apache_beam/metrics/cells.py":553 + * self.count + other.count, + * self.min if self.min < other.min else other.min, + * self.max if self.max > other.max else other.max) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_1) { + __pyx_t_10 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __pyx_t_10; + __pyx_t_10 = 0; + } else { + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __pyx_t_10; + __pyx_t_10 = 0; + } + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_4, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_callargs+__pyx_t_11, (5-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":544 + * return DistributionResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":555 + * self.max if self.max > other.max else other.max) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value): + * # type: (int) -> DistributionData +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_15singleton(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_15singleton = {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_15singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_15singleton(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("singleton (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 555, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 555, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "singleton", 0) < (0)) __PYX_ERR(0, 555, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, i); __PYX_ERR(0, 555, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 555, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 555, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_14singleton(__pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_14singleton(PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("singleton", 0); + + /* "apache_beam/metrics/cells.py":558 + * def singleton(value): + * # type: (int) -> DistributionData + * return DistributionData(value, 1, value, value) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_value, __pyx_mstate_global->__pyx_int_1, __pyx_v_value, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":555 + * self.max if self.max > other.max else other.max) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value): + * # type: (int) -> DistributionData +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":560 + * return DistributionData(value, 1, value, value) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> DistributionData +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_17identity_element(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_17identity_element = {"identity_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_17identity_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_17identity_element(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("identity_element (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("identity_element", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("identity_element", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_16identity_element(); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_16identity_element(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("identity_element", 0); + + /* "apache_beam/metrics/cells.py":563 + * def identity_element(): + * # type: () -> DistributionData + * return DistributionData(0, 0, 2**63 - 1, -2**63) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData), __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":560 + * return DistributionData(value, 1, value, value) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> DistributionData +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":63 + * + * cdef class DistributionData(object): + * cdef readonly libc.stdint.int64_t sum # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t count + * cdef readonly libc.stdint.int64_t min +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3sum_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3sum_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3sum___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3sum___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.sum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":64 + * cdef class DistributionData(object): + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t min + * cdef readonly libc.stdint.int64_t max +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_5count___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_5count___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":65 + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count + * cdef readonly libc.stdint.int64_t min # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t max + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3min_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3min_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3min___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3min___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":66 + * cdef readonly libc.stdint.int64_t count + * cdef readonly libc.stdint.int64_t min + * cdef readonly libc.stdint.int64_t max # <<<<<<<<<<<<<< + * + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3max_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3max_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3max___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_3max___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_18__reduce_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_18__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.count, self.max, self.min, self.sum) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__dict = __pyx_t_5; + __pyx_t_5 = 0; + + /* "(tree fragment)":7 + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_7 = (__pyx_v__dict != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_6 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionData); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_17678593); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_17678593); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_int_17678593) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, None), state + * else: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DistributionData__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionData); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_17678593); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_17678593); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_int_17678593) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionData__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_20__setstate_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16DistributionData_20__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DistributionData__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionData__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.DistributionData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":582 + * _STRING_SET_SIZE_LIMIT = 1_000_000 + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): # <<<<<<<<<<<<<< + * self.string_set = string_set or set() + * if not string_size: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_string_set = 0; + PyObject *__pyx_v_string_size = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_string_set,&__pyx_mstate_global->__pyx_n_u_string_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 582, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 582, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 582, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 582, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 582, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0))); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 582, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 582, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 582, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 582, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0))); + } + __pyx_v_self = values[0]; + __pyx_v_string_set = ((PyObject*)values[1]); + if (__Pyx_PyInt_FromNumber(&values[2], "string_size", 0) < (0)) __PYX_ERR(0, 582, __pyx_L3_error) + __pyx_v_string_size = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 582, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_string_set), (&PySet_Type), 1, "string_set", 2))) __PYX_ERR(0, 582, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_string_size), (&PyLong_Type), 0, "string_size", 2))) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData___init__(__pyx_self, __pyx_v_self, __pyx_v_string_set, __pyx_v_string_size); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_string_set, PyObject *__pyx_v_string_size) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_INCREF(__pyx_v_string_size); + + /* "apache_beam/metrics/cells.py":583 + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): + * self.string_set = string_set or set() # <<<<<<<<<<<<<< + * if not string_size: + * string_size = 0 +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_string_set); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 583, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_string_set); + __pyx_t_1 = __pyx_v_string_set; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set, __pyx_t_1) < (0)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":584 + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): + * self.string_set = string_set or set() + * if not string_size: # <<<<<<<<<<<<<< + * string_size = 0 + * for s in self.string_set: +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_string_size); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_4 = (!__pyx_t_2); + if (__pyx_t_4) { + + /* "apache_beam/metrics/cells.py":585 + * self.string_set = string_set or set() + * if not string_size: + * string_size = 0 # <<<<<<<<<<<<<< + * for s in self.string_set: + * string_size += len(s) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __Pyx_DECREF_SET(__pyx_v_string_size, __pyx_mstate_global->__pyx_int_0); + + /* "apache_beam/metrics/cells.py":586 + * if not string_size: + * string_size = 0 + * for s in self.string_set: # <<<<<<<<<<<<<< + * string_size += len(s) + * self.string_size = string_size +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 586, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 586, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 586, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":587 + * string_size = 0 + * for s in self.string_set: + * string_size += len(s) # <<<<<<<<<<<<<< + * self.string_size = string_size + * +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_string_size, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyInt_FromNumber(&__pyx_t_8, NULL, 1) < (0)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_string_size, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":586 + * if not string_size: + * string_size = 0 + * for s in self.string_set: # <<<<<<<<<<<<<< + * string_size += len(s) + * self.string_size = string_size +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":584 + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): + * self.string_set = string_set or set() + * if not string_size: # <<<<<<<<<<<<<< + * string_size = 0 + * for s in self.string_set: +*/ + } + + /* "apache_beam/metrics/cells.py":588 + * for s in self.string_set: + * string_size += len(s) + * self.string_size = string_size # <<<<<<<<<<<<<< + * + * def __eq__(self, other: object) -> bool: +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size, __pyx_v_string_size) < (0)) __PYX_ERR(0, 588, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":582 + * _STRING_SET_SIZE_LIMIT = 1_000_000 + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): # <<<<<<<<<<<<<< + * self.string_set = string_set or set() + * if not string_size: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XDECREF(__pyx_v_string_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":590 + * self.string_size = string_size + * + * def __eq__(self, other: object) -> bool: # <<<<<<<<<<<<<< + * if isinstance(other, StringSetData): + * return ( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 590, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 590, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 590, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 590, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 590, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 590, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 590, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 590, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":591 + * + * def __eq__(self, other: object) -> bool: + * if isinstance(other, StringSetData): # <<<<<<<<<<<<<< + * return ( + * self.string_size == other.string_size and +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":592 + * def __eq__(self, other: object) -> bool: + * if isinstance(other, StringSetData): + * return ( # <<<<<<<<<<<<<< + * self.string_size == other.string_size and + * self.string_set == other.string_set) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/cells.py":593 + * if isinstance(other, StringSetData): + * return ( + * self.string_size == other.string_size and # <<<<<<<<<<<<<< + * self.string_set == other.string_set) + * else: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 593, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/metrics/cells.py":594 + * return ( + * self.string_size == other.string_size and + * self.string_set == other.string_set) # <<<<<<<<<<<<<< + * else: + * return False +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":591 + * + * def __eq__(self, other: object) -> bool: + * if isinstance(other, StringSetData): # <<<<<<<<<<<<<< + * return ( + * self.string_size == other.string_size and +*/ + } + + /* "apache_beam/metrics/cells.py":596 + * self.string_set == other.string_set) + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self) -> int: +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":590 + * self.string_size = string_size + * + * def __eq__(self, other: object) -> bool: # <<<<<<<<<<<<<< + * if isinstance(other, StringSetData): + * return ( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":598 + * return False + * + * def __hash__(self) -> int: # <<<<<<<<<<<<<< + * return hash(self.string_set) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 598, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 598, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 598, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 598, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 598, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 598, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":599 + * + * def __hash__(self) -> int: + * return hash(self.string_set) # <<<<<<<<<<<<<< + * + * def __repr__(self) -> str: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":598 + * return False + * + * def __hash__(self) -> int: # <<<<<<<<<<<<<< + * return hash(self.string_set) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":601 + * return hash(self.string_set) + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 601, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 601, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 601, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 601, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":602 + * + * def __repr__(self) -> str: + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) # <<<<<<<<<<<<<< + * + * def get_cumulative(self) -> "StringSetData": +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_StringSetData_2; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":601 + * return hash(self.string_set) + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":604 + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * + * def get_cumulative(self) -> "StringSetData": # <<<<<<<<<<<<<< + * return StringSetData(set(self.string_set), self.string_size) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 604, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 604, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_cumulative", 0) < (0)) __PYX_ERR(0, 604, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, i); __PYX_ERR(0, 604, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 604, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 604, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_8get_cumulative(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":605 + * + * def get_cumulative(self) -> "StringSetData": + * return StringSetData(set(self.string_set), self.string_size) # <<<<<<<<<<<<<< + * + * def get_result(self) -> Set[str]: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySet_New(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":604 + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * + * def get_cumulative(self) -> "StringSetData": # <<<<<<<<<<<<<< + * return StringSetData(set(self.string_set), self.string_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":607 + * return StringSetData(set(self.string_set), self.string_size) + * + * def get_result(self) -> Set[str]: # <<<<<<<<<<<<<< + * return set(self.string_set) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_11get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_11get_result = {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_11get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_11get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 607, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 607, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_result", 0) < (0)) __PYX_ERR(0, 607, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, i); __PYX_ERR(0, 607, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 607, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 607, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_10get_result(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_10get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_result", 0); + + /* "apache_beam/metrics/cells.py":608 + * + * def get_result(self) -> Set[str]: + * return set(self.string_set) # <<<<<<<<<<<<<< + * + * def add(self, *strings): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":607 + * return StringSetData(set(self.string_set), self.string_size) + * + * def get_result(self) -> Set[str]: # <<<<<<<<<<<<<< + * return set(self.string_set) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":610 + * return set(self.string_set) + * + * def add(self, *strings): # <<<<<<<<<<<<<< + * """ + * Add strings into this StringSetData and return the result StringSetData. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_13add(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_12add, "\n Add strings into this StringSetData and return the result StringSetData.\n Reuse the original StringSetData's set.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_13add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_13add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_12add}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_13add(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_strings = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + __pyx_v_strings = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); + if (unlikely(!__pyx_v_strings)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_strings); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 610, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + default: + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 610, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 610, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 0, 1, 1, i); __PYX_ERR(0, 610, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs < 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 610, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 610, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_strings); __pyx_v_strings = 0; + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_12add(__pyx_self, __pyx_v_self, __pyx_v_strings); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_strings); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_12add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strings) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/metrics/cells.py":615 + * Reuse the original StringSetData's set. + * """ + * self.string_size = self.add_until_capacity( # <<<<<<<<<<<<<< + * self.string_set, self.string_size, strings) + * return self +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":616 + * """ + * self.string_size = self.add_until_capacity( + * self.string_set, self.string_size, strings) # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_v_strings}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_until_capacity, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/metrics/cells.py":615 + * Reuse the original StringSetData's set. + * """ + * self.string_size = self.add_until_capacity( # <<<<<<<<<<<<<< + * self.string_set, self.string_size, strings) + * return self +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size, __pyx_t_1) < (0)) __PYX_ERR(0, 615, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":617 + * self.string_size = self.add_until_capacity( + * self.string_set, self.string_size, strings) + * return self # <<<<<<<<<<<<<< + * + * def combine(self, other: "StringSetData") -> "StringSetData": +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":610 + * return set(self.string_set) + * + * def add(self, *strings): # <<<<<<<<<<<<<< + * """ + * Add strings into this StringSetData and return the result StringSetData. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":619 + * return self + * + * def combine(self, other: "StringSetData") -> "StringSetData": # <<<<<<<<<<<<<< + * """ + * Combines this StringSetData with other, both original StringSetData are left +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_15combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_14combine, "\n Combines this StringSetData with other, both original StringSetData are left\n intact.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_15combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_15combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_14combine}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_15combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 619, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 619, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 619, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, i); __PYX_ERR(0, 619, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 619, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 619, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_14combine(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_14combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_v_combined = NULL; + PyObject *__pyx_v_string_size = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":624 + * intact. + * """ + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_other == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":625 + * """ + * if other is None: + * return self # <<<<<<<<<<<<<< + * + * if not other.string_set: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":624 + * intact. + * """ + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "apache_beam/metrics/cells.py":627 + * return self + * + * if not other.string_set: # <<<<<<<<<<<<<< + * return self + * elif not self.string_set: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (!__pyx_t_1); + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":628 + * + * if not other.string_set: + * return self # <<<<<<<<<<<<<< + * elif not self.string_set: + * return other +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":627 + * return self + * + * if not other.string_set: # <<<<<<<<<<<<<< + * return self + * elif not self.string_set: +*/ + } + + /* "apache_beam/metrics/cells.py":629 + * if not other.string_set: + * return self + * elif not self.string_set: # <<<<<<<<<<<<<< + * return other + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = (!__pyx_t_3); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":630 + * return self + * elif not self.string_set: + * return other # <<<<<<<<<<<<<< + * + * combined = set(self.string_set) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_other); + __pyx_r = __pyx_v_other; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":629 + * if not other.string_set: + * return self + * elif not self.string_set: # <<<<<<<<<<<<<< + * return other + * +*/ + } + + /* "apache_beam/metrics/cells.py":632 + * return other + * + * combined = set(self.string_set) # <<<<<<<<<<<<<< + * string_size = self.add_until_capacity( + * combined, self.string_size, other.string_set) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_combined = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":633 + * + * combined = set(self.string_set) + * string_size = self.add_until_capacity( # <<<<<<<<<<<<<< + * combined, self.string_size, other.string_set) + * return StringSetData(combined, string_size) +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":634 + * combined = set(self.string_set) + * string_size = self.add_until_capacity( + * combined, self.string_size, other.string_set) # <<<<<<<<<<<<<< + * return StringSetData(combined, string_size) + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_string_set); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_combined, __pyx_t_5, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_until_capacity, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_string_size = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":635 + * string_size = self.add_until_capacity( + * combined, self.string_size, other.string_set) + * return StringSetData(combined, string_size) # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_combined, __pyx_v_string_size}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":619 + * return self + * + * def combine(self, other: "StringSetData") -> "StringSetData": # <<<<<<<<<<<<<< + * """ + * Combines this StringSetData with other, both original StringSetData are left +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_combined); + __Pyx_XDECREF(__pyx_v_string_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":637 + * return StringSetData(combined, string_size) + * + * @classmethod # <<<<<<<<<<<<<< + * def add_until_capacity( + * cls, combined: set, current_size: int, others: Iterable[str]): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_17add_until_capacity(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_16add_until_capacity, "\n Add strings into set until reach capacity. Return the all string size of\n added set.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_17add_until_capacity = {"add_until_capacity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_17add_until_capacity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_5cells_13StringSetData_16add_until_capacity}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_17add_until_capacity(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_combined = 0; + PyObject *__pyx_v_current_size = 0; + PyObject *__pyx_v_others = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_until_capacity (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_combined,&__pyx_mstate_global->__pyx_n_u_current_size,&__pyx_mstate_global->__pyx_n_u_others,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 637, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_until_capacity", 0) < (0)) __PYX_ERR(0, 637, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_until_capacity", 1, 4, 4, i); __PYX_ERR(0, 637, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 637, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 637, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 637, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 637, __pyx_L3_error) + } + __pyx_v_cls = values[0]; + __pyx_v_combined = ((PyObject*)values[1]); + if (__Pyx_PyInt_FromNumber(&values[2], "current_size", 0) < (0)) __PYX_ERR(0, 639, __pyx_L3_error) + __pyx_v_current_size = ((PyObject*)values[2]); + __pyx_v_others = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_until_capacity", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 637, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.add_until_capacity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_combined), (&PySet_Type), 0, "combined", 2))) __PYX_ERR(0, 639, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_current_size), (&PyLong_Type), 0, "current_size", 2))) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_16add_until_capacity(__pyx_self, __pyx_v_cls, __pyx_v_combined, __pyx_v_current_size, __pyx_v_others); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_16add_until_capacity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_combined, PyObject *__pyx_v_current_size, PyObject *__pyx_v_others) { + PyObject *__pyx_v_string = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_until_capacity", 0); + __Pyx_INCREF(__pyx_v_current_size); + + /* "apache_beam/metrics/cells.py":644 + * added set. + * """ + * if current_size > cls._STRING_SET_SIZE_LIMIT: # <<<<<<<<<<<<<< + * return current_size + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_STRING_SET_SIZE_LIMIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_current_size, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":645 + * """ + * if current_size > cls._STRING_SET_SIZE_LIMIT: + * return current_size # <<<<<<<<<<<<<< + * + * for string in others: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_current_size); + __pyx_r = __pyx_v_current_size; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":644 + * added set. + * """ + * if current_size > cls._STRING_SET_SIZE_LIMIT: # <<<<<<<<<<<<<< + * return current_size + * +*/ + } + + /* "apache_beam/metrics/cells.py":647 + * return current_size + * + * for string in others: # <<<<<<<<<<<<<< + * if string not in combined: + * combined.add(string) +*/ + if (likely(PyList_CheckExact(__pyx_v_others)) || PyTuple_CheckExact(__pyx_v_others)) { + __pyx_t_2 = __pyx_v_others; __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_others); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 647, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 647, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_5(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 647, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_string, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":648 + * + * for string in others: + * if string not in combined: # <<<<<<<<<<<<<< + * combined.add(string) + * current_size += len(string) +*/ + __pyx_t_3 = (__Pyx_PySet_ContainsTF(__pyx_v_string, __pyx_v_combined, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 648, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":649 + * for string in others: + * if string not in combined: + * combined.add(string) # <<<<<<<<<<<<<< + * current_size += len(string) + * if current_size > cls._STRING_SET_SIZE_LIMIT: +*/ + __pyx_t_6 = PySet_Add(__pyx_v_combined, __pyx_v_string); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 649, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":650 + * if string not in combined: + * combined.add(string) + * current_size += len(string) # <<<<<<<<<<<<<< + * if current_size > cls._STRING_SET_SIZE_LIMIT: + * _LOGGER.warning( +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_current_size, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_PyInt_FromNumber(&__pyx_t_8, NULL, 1) < (0)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_current_size, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":651 + * combined.add(string) + * current_size += len(string) + * if current_size > cls._STRING_SET_SIZE_LIMIT: # <<<<<<<<<<<<<< + * _LOGGER.warning( + * "StringSet metrics reaches capacity. Further incoming elements " +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_STRING_SET_SIZE_LIMIT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_current_size, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":652 + * current_size += len(string) + * if current_size > cls._STRING_SET_SIZE_LIMIT: + * _LOGGER.warning( # <<<<<<<<<<<<<< + * "StringSet metrics reaches capacity. Further incoming elements " + * "won't be recorded. Current size: %d, last element size: %d.", +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/metrics/cells.py":656 + * "won't be recorded. Current size: %d, last element size: %d.", + * current_size, + * len(string)) # <<<<<<<<<<<<<< + * break + * return current_size +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_t_9 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_11 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_StringSet_metrics_reaches_capaci, __pyx_v_current_size, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (4-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":657 + * current_size, + * len(string)) + * break # <<<<<<<<<<<<<< + * return current_size + * +*/ + goto __pyx_L5_break; + + /* "apache_beam/metrics/cells.py":651 + * combined.add(string) + * current_size += len(string) + * if current_size > cls._STRING_SET_SIZE_LIMIT: # <<<<<<<<<<<<<< + * _LOGGER.warning( + * "StringSet metrics reaches capacity. Further incoming elements " +*/ + } + + /* "apache_beam/metrics/cells.py":648 + * + * for string in others: + * if string not in combined: # <<<<<<<<<<<<<< + * combined.add(string) + * current_size += len(string) +*/ + } + + /* "apache_beam/metrics/cells.py":647 + * return current_size + * + * for string in others: # <<<<<<<<<<<<<< + * if string not in combined: + * combined.add(string) +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_for_end; + __pyx_L5_break:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_for_end; + __pyx_L8_for_end:; + + /* "apache_beam/metrics/cells.py":658 + * len(string)) + * break + * return current_size # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_current_size); + __pyx_r = __pyx_v_current_size; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":637 + * return StringSetData(combined, string_size) + * + * @classmethod # <<<<<<<<<<<<<< + * def add_until_capacity( + * cls, combined: set, current_size: int, others: Iterable[str]): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.add_until_capacity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_string); + __Pyx_XDECREF(__pyx_v_current_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":660 + * return current_size + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "StringSetData": + * return StringSetData({value}) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_19singleton(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_19singleton = {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_19singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_19singleton(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("singleton (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 660, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "singleton", 0) < (0)) __PYX_ERR(0, 660, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, i); __PYX_ERR(0, 660, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + } + __pyx_v_value = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 660, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 0, "value", 2))) __PYX_ERR(0, 661, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_18singleton(__pyx_self, __pyx_v_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_18singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("singleton", 0); + + /* "apache_beam/metrics/cells.py":662 + * @staticmethod + * def singleton(value: str) -> "StringSetData": + * return StringSetData({value}) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PySet_Add(__pyx_t_4, __pyx_v_value) < (0)) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":660 + * return current_size + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "StringSetData": + * return StringSetData({value}) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":664 + * return StringSetData({value}) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "StringSetData": + * return StringSetData() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_21identity_element(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_21identity_element = {"identity_element", (PyCFunction)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_21identity_element, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13StringSetData_21identity_element(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("identity_element (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_20identity_element(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13StringSetData_20identity_element(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("identity_element", 0); + + /* "apache_beam/metrics/cells.py":666 + * @staticmethod + * def identity_element() -> "StringSetData": + * return StringSetData() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_StringSetData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":664 + * return StringSetData({value}) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "StringSetData": + * return StringSetData() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.StringSetData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":670 + * + * class _BoundedTrieNode(object): + * def __init__(self): # <<<<<<<<<<<<<< + * # invariant: size = len(self.flattened()) = min(1, sum(size of children)) + * self._size = 1 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode___init__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":672 + * def __init__(self): + * # invariant: size = len(self.flattened()) = min(1, sum(size of children)) + * self._size = 1 # <<<<<<<<<<<<<< + * self._children: Optional[dict[str, '_BoundedTrieNode']] = {} + * self._truncated = False +*/ + __pyx_v_self->_size = 1; + + /* "apache_beam/metrics/cells.py":673 + * # invariant: size = len(self.flattened()) = min(1, sum(size of children)) + * self._size = 1 + * self._children: Optional[dict[str, '_BoundedTrieNode']] = {} # <<<<<<<<<<<<<< + * self._truncated = False + * +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_children); + __Pyx_DECREF(__pyx_v_self->_children); + __pyx_v_self->_children = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":674 + * self._size = 1 + * self._children: Optional[dict[str, '_BoundedTrieNode']] = {} + * self._truncated = False # <<<<<<<<<<<<<< + * + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: +*/ + __pyx_v_self->_truncated = 0; + + /* "apache_beam/metrics/cells.py":670 + * + * class _BoundedTrieNode(object): + * def __init__(self): # <<<<<<<<<<<<<< + * # invariant: size = len(self.flattened()) = min(1, sum(size of children)) + * self._size = 1 +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":676 + * self._truncated = False + * + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrieNode( + * truncated=self._truncated, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto = {"to_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_proto", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_proto", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_2to_proto(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_2to_proto(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_7genexpr__pyx_v_name = NULL; + PyObject *__pyx_7genexpr__pyx_v_child = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + size_t __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_proto", 0); + + /* "apache_beam/metrics/cells.py":677 + * + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: + * return metrics_pb2.BoundedTrieNode( # <<<<<<<<<<<<<< + * truncated=self._truncated, + * children={ +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metrics_pb2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":678 + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: + * return metrics_pb2.BoundedTrieNode( + * truncated=self._truncated, # <<<<<<<<<<<<<< + * children={ + * name: child.to_proto() +*/ + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_truncated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/cells.py":682 + * name: child.to_proto() + * for name, child in self._children.items() + * } if self._children else None) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_children); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 682, __pyx_L1_error) + if (__pyx_t_6) { + { /* enter inner scope */ + + /* "apache_beam/metrics/cells.py":679 + * return metrics_pb2.BoundedTrieNode( + * truncated=self._truncated, + * children={ # <<<<<<<<<<<<<< + * name: child.to_proto() + * for name, child in self._children.items() +*/ + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/metrics/cells.py":681 + * children={ + * name: child.to_proto() + * for name, child in self._children.items() # <<<<<<<<<<<<<< + * } if self._children else None) + * +*/ + __pyx_t_9 = 0; + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 681, __pyx_L5_error) + } + __pyx_t_12 = __Pyx_dict_iterator(__pyx_v_self->_children, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 681, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_8); + __pyx_t_8 = __pyx_t_12; + __pyx_t_12 = 0; + while (1) { + __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_10, &__pyx_t_9, &__pyx_t_12, &__pyx_t_13, NULL, __pyx_t_11); + if (unlikely(__pyx_t_14 == 0)) break; + if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 681, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_GOTREF(__pyx_t_13); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_child, __pyx_t_13); + __pyx_t_13 = 0; + + /* "apache_beam/metrics/cells.py":680 + * truncated=self._truncated, + * children={ + * name: child.to_proto() # <<<<<<<<<<<<<< + * for name, child in self._children.items() + * } if self._children else None) +*/ + __pyx_t_12 = __pyx_7genexpr__pyx_v_child; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_15 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_proto, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 680, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_13); + } + if (unlikely(PyDict_SetItem(__pyx_t_7, (PyObject*)__pyx_7genexpr__pyx_v_name, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 680, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_child); __pyx_7genexpr__pyx_v_child = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0; + goto __pyx_L8_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_child); __pyx_7genexpr__pyx_v_child = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0; + goto __pyx_L1_error; + __pyx_L8_exit_scope:; + } /* exit inner scope */ + __pyx_t_5 = __pyx_t_7; + __pyx_t_7 = 0; + } else { + + /* "apache_beam/metrics/cells.py":682 + * name: child.to_proto() + * for name, child in self._children.items() + * } if self._children else None) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_INCREF(Py_None); + __pyx_t_5 = Py_None; + } + __pyx_t_15 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_15 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_truncated, __pyx_t_3, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 677, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_children, __pyx_t_5, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":676 + * self._truncated = False + * + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrieNode( + * truncated=self._truncated, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.to_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_child); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":684 + * } if self._children else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto = {"from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_proto = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_proto,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 684, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 684, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_proto", 0) < (0)) __PYX_ERR(0, 684, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_proto", 1, 1, 1, i); __PYX_ERR(0, 684, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 684, __pyx_L3_error) + } + __pyx_v_proto = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_proto", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 684, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4from_proto(__pyx_v_proto); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/metrics/cells.py":695 + * for name, child in proto.children.items() + * } + * node._size = max(1, sum(child._size for child in node._children.values())) # <<<<<<<<<<<<<< + * return node + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 695, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_from_proto_locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells); if (unlikely(!gen)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.from_proto.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 695, __pyx_L1_error) + } + __pyx_t_2 = 0; + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 695, __pyx_L1_error) } + if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 695, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 1, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); + if (unlikely(__pyx_t_6 == 0)) break; + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_child, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 695, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":684 + * } if self._children else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() +*/ + +static struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4from_proto(PyObject *__pyx_v_proto) { + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_node = NULL; + PyObject *__pyx_8genexpr1__pyx_v_name = NULL; + PyObject *__pyx_8genexpr1__pyx_v_child = NULL; + PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_2generator1 = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + long __pyx_t_11; + int64_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_proto", 0); + + /* "apache_beam/metrics/cells.py":686 + * @staticmethod + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() # <<<<<<<<<<<<<< + * if proto.truncated: + * node._truncated = True +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_node = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":687 + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() + * if proto.truncated: # <<<<<<<<<<<<<< + * node._truncated = True + * node._children = None +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_truncated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/metrics/cells.py":688 + * node = _BoundedTrieNode() + * if proto.truncated: + * node._truncated = True # <<<<<<<<<<<<<< + * node._children = None + * else: +*/ + __pyx_v_node->_truncated = 1; + + /* "apache_beam/metrics/cells.py":689 + * if proto.truncated: + * node._truncated = True + * node._children = None # <<<<<<<<<<<<<< + * else: + * node._children = { +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_node->_children); + __Pyx_DECREF(__pyx_v_node->_children); + __pyx_v_node->_children = ((PyObject*)Py_None); + + /* "apache_beam/metrics/cells.py":687 + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() + * if proto.truncated: # <<<<<<<<<<<<<< + * node._truncated = True + * node._children = None +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":691 + * node._children = None + * else: + * node._children = { # <<<<<<<<<<<<<< + * name: _BoundedTrieNode.from_proto(child) + * for name, child in proto.children.items() +*/ + /*else*/ { + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/cells.py":693 + * node._children = { + * name: _BoundedTrieNode.from_proto(child) + * for name, child in proto.children.items() # <<<<<<<<<<<<<< + * } + * node._size = max(1, sum(child._size for child in node._children.values())) +*/ + __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 693, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_t_8 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 693, __pyx_L6_error) + } + __pyx_t_9 = __Pyx_dict_iterator(__pyx_t_8, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 693, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_9; + __pyx_t_9 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_9, &__pyx_t_8, NULL, __pyx_t_7); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 693, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_name, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_child, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":692 + * else: + * node._children = { + * name: _BoundedTrieNode.from_proto(child) # <<<<<<<<<<<<<< + * for name, child in proto.children.items() + * } +*/ + __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_8genexpr1__pyx_v_child}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_proto, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_8); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_name, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 692, __pyx_L6_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_child); __pyx_8genexpr1__pyx_v_child = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_name); __pyx_8genexpr1__pyx_v_name = 0; + goto __pyx_L9_exit_scope; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_child); __pyx_8genexpr1__pyx_v_child = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_name); __pyx_8genexpr1__pyx_v_name = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/metrics/cells.py":691 + * node._children = None + * else: + * node._children = { # <<<<<<<<<<<<<< + * name: _BoundedTrieNode.from_proto(child) + * for name, child in proto.children.items() +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_node->_children); + __Pyx_DECREF(__pyx_v_node->_children); + __pyx_v_node->_children = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":695 + * for name, child in proto.children.items() + * } + * node._size = max(1, sum(child._size for child in node._children.values())) # <<<<<<<<<<<<<< + * return node + * +*/ + __pyx_t_2 = NULL; + __pyx_t_8 = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_genexpr(NULL, __pyx_v_node->_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_11 = 1; + __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = __pyx_t_1; + } else { + __pyx_t_9 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __pyx_t_9; + __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_node->_size = __pyx_t_12; + } + __pyx_L3:; + + /* "apache_beam/metrics/cells.py":696 + * } + * node._size = max(1, sum(child._size for child in node._children.values())) + * return node # <<<<<<<<<<<<<< + * + * def size(self): +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_node); + __pyx_r = __pyx_v_node; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":684 + * } if self._children else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_node); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_name); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_child); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10from_proto_2generator1); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":698 + * return node + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_6size(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_6size(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + + /* "apache_beam/metrics/cells.py":699 + * + * def size(self): + * return self._size # <<<<<<<<<<<<<< + * + * def contains(self, segments): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":698 + * return node + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":701 + * return self._size + * + * def contains(self, segments): # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return True +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains = {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_segments = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("contains (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_segments,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 701, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 701, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "contains", 0) < (0)) __PYX_ERR(0, 701, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, i); __PYX_ERR(0, 701, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 701, __pyx_L3_error) + } + __pyx_v_segments = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 701, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8contains(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), __pyx_v_segments); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8contains(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments) { + PyObject *__pyx_v_head = NULL; + PyObject *__pyx_v_tail = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("contains", 0); + + /* "apache_beam/metrics/cells.py":702 + * + * def contains(self, segments): + * if self._truncated or not segments: # <<<<<<<<<<<<<< + * return True + * head, *tail = segments +*/ + if (!__pyx_v_self->_truncated) { + } else { + __pyx_t_1 = __pyx_v_self->_truncated; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_segments); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_3 = (!__pyx_t_2); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":703 + * def contains(self, segments): + * if self._truncated or not segments: + * return True # <<<<<<<<<<<<<< + * head, *tail = segments + * return head in self._children and self._children[head].contains(tail) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":702 + * + * def contains(self, segments): + * if self._truncated or not segments: # <<<<<<<<<<<<<< + * return True + * head, *tail = segments +*/ + } + + /* "apache_beam/metrics/cells.py":704 + * if self._truncated or not segments: + * return True + * head, *tail = segments # <<<<<<<<<<<<<< + * return head in self._children and self._children[head].contains(tail) + * +*/ + { + Py_ssize_t index = -1; + PyObject** temps[2] = {&__pyx_t_4}; + __pyx_t_5 = PyObject_GetIter(__pyx_v_segments); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + for (index=0; index < 1; index++) { + PyObject* item = __pyx_t_6(__pyx_t_5); if (unlikely(!item)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __pyx_t_7 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_head = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_tail = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":705 + * return True + * head, *tail = segments + * return head in self._children and self._children[head].contains(tail) # <<<<<<<<<<<<<< + * + * def add(self, segments) -> int: +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 705, __pyx_L1_error) + } + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_head, __pyx_v_self->_children, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 705, __pyx_L1_error) + if (__pyx_t_1) { + } else { + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L8_bool_binop_done; + } + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 705, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_self->_children, __pyx_v_head); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_tail}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_contains, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L8_bool_binop_done:; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":701 + * return self._size + * + * def contains(self, segments): # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return True +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_head); + __Pyx_XDECREF(__pyx_v_tail); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":707 + * return head in self._children and self._children[head].contains(tail) + * + * def add(self, segments) -> int: # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_segments = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_segments,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 707, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 707, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, i); __PYX_ERR(0, 707, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __pyx_L3_error) + } + __pyx_v_segments = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 707, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10add(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), __pyx_v_segments); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10add(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments) { + PyObject *__pyx_v_head = NULL; + PyObject *__pyx_v_tail = NULL; + int __pyx_v_was_empty; + PyObject *__pyx_v_child = NULL; + PyObject *__pyx_v_delta = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/metrics/cells.py":708 + * + * def add(self, segments) -> int: + * if self._truncated or not segments: # <<<<<<<<<<<<<< + * return 0 + * head, *tail = segments +*/ + if (!__pyx_v_self->_truncated) { + } else { + __pyx_t_1 = __pyx_v_self->_truncated; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_segments); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_3 = (!__pyx_t_2); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":709 + * def add(self, segments) -> int: + * if self._truncated or not segments: + * return 0 # <<<<<<<<<<<<<< + * head, *tail = segments + * was_empty = not self._children +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_r = __pyx_mstate_global->__pyx_int_0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":708 + * + * def add(self, segments) -> int: + * if self._truncated or not segments: # <<<<<<<<<<<<<< + * return 0 + * head, *tail = segments +*/ + } + + /* "apache_beam/metrics/cells.py":710 + * if self._truncated or not segments: + * return 0 + * head, *tail = segments # <<<<<<<<<<<<<< + * was_empty = not self._children + * child = self._children.get(head, None) # type: ignore[union-attr] +*/ + { + Py_ssize_t index = -1; + PyObject** temps[2] = {&__pyx_t_4}; + __pyx_t_5 = PyObject_GetIter(__pyx_v_segments); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + for (index=0; index < 1; index++) { + PyObject* item = __pyx_t_6(__pyx_t_5); if (unlikely(!item)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 710, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __pyx_t_7 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_head = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_tail = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":711 + * return 0 + * head, *tail = segments + * was_empty = not self._children # <<<<<<<<<<<<<< + * child = self._children.get(head, None) # type: ignore[union-attr] + * if child is None: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_children); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_v_was_empty = (!__pyx_t_1); + + /* "apache_beam/metrics/cells.py":712 + * head, *tail = segments + * was_empty = not self._children + * child = self._children.get(head, None) # type: ignore[union-attr] # <<<<<<<<<<<<<< + * if child is None: + * child = self._children[head] = _BoundedTrieNode() # type: ignore[index] +*/ + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 712, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_children, __pyx_v_head, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_child = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":713 + * was_empty = not self._children + * child = self._children.get(head, None) # type: ignore[union-attr] + * if child is None: # <<<<<<<<<<<<<< + * child = self._children[head] = _BoundedTrieNode() # type: ignore[index] + * delta = 0 if was_empty else 1 +*/ + __pyx_t_1 = (__pyx_v_child == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":714 + * child = self._children.get(head, None) # type: ignore[union-attr] + * if child is None: + * child = self._children[head] = _BoundedTrieNode() # type: ignore[index] # <<<<<<<<<<<<<< + * delta = 0 if was_empty else 1 + * else: +*/ + __pyx_t_4 = NULL; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 714, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_7); + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 714, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_self->_children, __pyx_v_head, __pyx_t_7) < 0))) __PYX_ERR(0, 714, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":715 + * if child is None: + * child = self._children[head] = _BoundedTrieNode() # type: ignore[index] + * delta = 0 if was_empty else 1 # <<<<<<<<<<<<<< + * else: + * delta = 0 +*/ + if (__pyx_v_was_empty) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_7 = __pyx_mstate_global->__pyx_int_0; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_t_7 = __pyx_mstate_global->__pyx_int_1; + } + __pyx_v_delta = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":713 + * was_empty = not self._children + * child = self._children.get(head, None) # type: ignore[union-attr] + * if child is None: # <<<<<<<<<<<<<< + * child = self._children[head] = _BoundedTrieNode() # type: ignore[index] + * delta = 0 if was_empty else 1 +*/ + goto __pyx_L8; + } + + /* "apache_beam/metrics/cells.py":717 + * delta = 0 if was_empty else 1 + * else: + * delta = 0 # <<<<<<<<<<<<<< + * if tail: + * delta += child.add(tail) +*/ + /*else*/ { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_delta = __pyx_mstate_global->__pyx_int_0; + } + __pyx_L8:; + + /* "apache_beam/metrics/cells.py":718 + * else: + * delta = 0 + * if tail: # <<<<<<<<<<<<<< + * delta += child.add(tail) + * self._size += delta +*/ + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_tail); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } + + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":719 + * delta = 0 + * if tail: + * delta += child.add(tail) # <<<<<<<<<<<<<< + * self._size += delta + * return delta +*/ + __pyx_t_4 = __pyx_v_child; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_tail}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_delta, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":718 + * else: + * delta = 0 + * if tail: # <<<<<<<<<<<<<< + * delta += child.add(tail) + * self._size += delta +*/ + } + + /* "apache_beam/metrics/cells.py":720 + * if tail: + * delta += child.add(tail) + * self._size += delta # <<<<<<<<<<<<<< + * return delta + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_v_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_self->_size = __pyx_t_9; + + /* "apache_beam/metrics/cells.py":721 + * delta += child.add(tail) + * self._size += delta + * return delta # <<<<<<<<<<<<<< + * + * def add_all(self, segments_iter): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_v_delta; + __Pyx_INCREF(__pyx_t_7); + if (__Pyx_PyInt_FromNumber(&__pyx_t_7, NULL, 1) < (0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":707 + * return head in self._children and self._children[head].contains(tail) + * + * def add(self, segments) -> int: # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_head); + __Pyx_XDECREF(__pyx_v_tail); + __Pyx_XDECREF(__pyx_v_child); + __Pyx_XDECREF(__pyx_v_delta); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":723 + * return delta + * + * def add_all(self, segments_iter): # <<<<<<<<<<<<<< + * return sum(self.add(segments) for segments in segments_iter) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all = {"add_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_segments_iter = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_all (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_segments_iter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 723, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 723, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_all", 0) < (0)) __PYX_ERR(0, 723, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_all", 1, 1, 1, i); __PYX_ERR(0, 723, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 723, __pyx_L3_error) + } + __pyx_v_segments_iter = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_all", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 723, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.add_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_12add_all(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), __pyx_v_segments_iter); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/metrics/cells.py":724 + * + * def add_all(self, segments_iter): + * return sum(self.add(segments) for segments in segments_iter) # <<<<<<<<<<<<<< + * + * def trim(self) -> int: +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 724, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *) __pyx_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_2generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_add_all_locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells); if (unlikely(!gen)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.add_all.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 724, __pyx_L1_error) + } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 724, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 724, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 724, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 724, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_segments); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_segments, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 724, __pyx_L1_error) } + __pyx_t_5 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_segments}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 724, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":723 + * return delta + * + * def add_all(self, segments_iter): # <<<<<<<<<<<<<< + * return sum(self.add(segments) for segments in segments_iter) + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_12add_all(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_segments_iter) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *__pyx_cur_scope; + PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_2generator2 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_all", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 723, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + + /* "apache_beam/metrics/cells.py":724 + * + * def add_all(self, segments_iter): + * return sum(self.add(segments) for segments in segments_iter) # <<<<<<<<<<<<<< + * + * def trim(self) -> int: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_segments_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":723 + * return delta + * + * def add_all(self, segments_iter): # <<<<<<<<<<<<<< + * return sum(self.add(segments) for segments in segments_iter) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.add_all", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7add_all_2generator2); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":726 + * return sum(self.add(segments) for segments in segments_iter) + * + * def trim(self) -> int: # <<<<<<<<<<<<<< + * if not self._children: + * return 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim = {"trim", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("trim (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("trim", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("trim", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_14trim(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":729 + * if not self._children: + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) # <<<<<<<<<<<<<< + * if max_child._size == 1: + * delta = 1 - self._size +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4trim_lambda2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4trim_lambda2 = {"lambda2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4trim_lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4trim_lambda2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_child = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_child,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 729, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 729, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda2", 0) < (0)) __PYX_ERR(0, 729, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, i); __PYX_ERR(0, 729, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 729, __pyx_L3_error) + } + __pyx_v_child = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 729, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.trim.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_child); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_child) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda2", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.trim.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":726 + * return sum(self.add(segments) for segments in segments_iter) + * + * def trim(self) -> int: # <<<<<<<<<<<<<< + * if not self._children: + * return 0 +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_14trim(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_v_max_child = NULL; + PyObject *__pyx_v_delta = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("trim", 0); + + /* "apache_beam/metrics/cells.py":727 + * + * def trim(self) -> int: + * if not self._children: # <<<<<<<<<<<<<< + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_children); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":728 + * def trim(self) -> int: + * if not self._children: + * return 0 # <<<<<<<<<<<<<< + * max_child = max(self._children.values(), key=lambda child: child._size) + * if max_child._size == 1: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_r = __pyx_mstate_global->__pyx_int_0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":727 + * + * def trim(self) -> int: + * if not self._children: # <<<<<<<<<<<<<< + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) +*/ + } + + /* "apache_beam/metrics/cells.py":729 + * if not self._children: + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) # <<<<<<<<<<<<<< + * if max_child._size == 1: + * delta = 1 - self._size +*/ + __pyx_t_4 = NULL; + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 729, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_PyDict_Values(__pyx_v_self->_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_4trim_lambda2, 0, __pyx_mstate_global->__pyx_n_u_trim_locals_lambda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_6, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_max_child = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":730 + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) + * if max_child._size == 1: # <<<<<<<<<<<<<< + * delta = 1 - self._size + * self._truncated = True +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_child, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":731 + * max_child = max(self._children.values(), key=lambda child: child._size) + * if max_child._size == 1: + * delta = 1 - self._size # <<<<<<<<<<<<<< + * self._truncated = True + * self._children = None +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t((1 - __pyx_v_self->_size)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_delta = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":732 + * if max_child._size == 1: + * delta = 1 - self._size + * self._truncated = True # <<<<<<<<<<<<<< + * self._children = None + * else: +*/ + __pyx_v_self->_truncated = 1; + + /* "apache_beam/metrics/cells.py":733 + * delta = 1 - self._size + * self._truncated = True + * self._children = None # <<<<<<<<<<<<<< + * else: + * delta = max_child.trim() +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_children); + __Pyx_DECREF(__pyx_v_self->_children); + __pyx_v_self->_children = ((PyObject*)Py_None); + + /* "apache_beam/metrics/cells.py":730 + * return 0 + * max_child = max(self._children.values(), key=lambda child: child._size) + * if max_child._size == 1: # <<<<<<<<<<<<<< + * delta = 1 - self._size + * self._truncated = True +*/ + goto __pyx_L4; + } + + /* "apache_beam/metrics/cells.py":735 + * self._children = None + * else: + * delta = max_child.trim() # <<<<<<<<<<<<<< + * self._size += delta + * return delta +*/ + /*else*/ { + __pyx_t_8 = __pyx_v_max_child; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_trim, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_delta = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_L4:; + + /* "apache_beam/metrics/cells.py":736 + * else: + * delta = max_child.trim() + * self._size += delta # <<<<<<<<<<<<<< + * return delta + * +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_delta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_self->_size = __pyx_t_9; + + /* "apache_beam/metrics/cells.py":737 + * delta = max_child.trim() + * self._size += delta + * return delta # <<<<<<<<<<<<<< + * + * def merge(self, other: '_BoundedTrieNode') -> int: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_v_delta; + __Pyx_INCREF(__pyx_t_8); + if (__Pyx_PyInt_FromNumber(&__pyx_t_8, NULL, 1) < (0)) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":726 + * return sum(self.add(segments) for segments in segments_iter) + * + * def trim(self) -> int: # <<<<<<<<<<<<<< + * if not self._children: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.trim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_max_child); + __Pyx_XDECREF(__pyx_v_delta); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":739 + * return delta + * + * def merge(self, other: '_BoundedTrieNode') -> int: # <<<<<<<<<<<<<< + * if self._truncated: + * delta = 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 739, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 739, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 739, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error) + } + __pyx_v_other = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 739, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, 0, "other", 0))) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_16merge(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_16merge(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_other) { + PyObject *__pyx_v_delta = NULL; + PyObject *__pyx_v_other_child = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self_child = 0; + PyObject *__pyx_v_prefix = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + size_t __pyx_t_10; + int64_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + + /* "apache_beam/metrics/cells.py":740 + * + * def merge(self, other: '_BoundedTrieNode') -> int: + * if self._truncated: # <<<<<<<<<<<<<< + * delta = 0 + * elif other._truncated: +*/ + if (__pyx_v_self->_truncated) { + + /* "apache_beam/metrics/cells.py":741 + * def merge(self, other: '_BoundedTrieNode') -> int: + * if self._truncated: + * delta = 0 # <<<<<<<<<<<<<< + * elif other._truncated: + * delta = 1 - self._size +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_delta = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/metrics/cells.py":740 + * + * def merge(self, other: '_BoundedTrieNode') -> int: + * if self._truncated: # <<<<<<<<<<<<<< + * delta = 0 + * elif other._truncated: +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":742 + * if self._truncated: + * delta = 0 + * elif other._truncated: # <<<<<<<<<<<<<< + * delta = 1 - self._size + * self._truncated = True +*/ + if (__pyx_v_other->_truncated) { + + /* "apache_beam/metrics/cells.py":743 + * delta = 0 + * elif other._truncated: + * delta = 1 - self._size # <<<<<<<<<<<<<< + * self._truncated = True + * self._children = None +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t((1 - __pyx_v_self->_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_delta = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":744 + * elif other._truncated: + * delta = 1 - self._size + * self._truncated = True # <<<<<<<<<<<<<< + * self._children = None + * elif not other._children: +*/ + __pyx_v_self->_truncated = 1; + + /* "apache_beam/metrics/cells.py":745 + * delta = 1 - self._size + * self._truncated = True + * self._children = None # <<<<<<<<<<<<<< + * elif not other._children: + * delta = 0 +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_children); + __Pyx_DECREF(__pyx_v_self->_children); + __pyx_v_self->_children = ((PyObject*)Py_None); + + /* "apache_beam/metrics/cells.py":742 + * if self._truncated: + * delta = 0 + * elif other._truncated: # <<<<<<<<<<<<<< + * delta = 1 - self._size + * self._truncated = True +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":746 + * self._truncated = True + * self._children = None + * elif not other._children: # <<<<<<<<<<<<<< + * delta = 0 + * elif not self._children: +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_other->_children); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":747 + * self._children = None + * elif not other._children: + * delta = 0 # <<<<<<<<<<<<<< + * elif not self._children: + * self._children = other._children +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_delta = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/metrics/cells.py":746 + * self._truncated = True + * self._children = None + * elif not other._children: # <<<<<<<<<<<<<< + * delta = 0 + * elif not self._children: +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":748 + * elif not other._children: + * delta = 0 + * elif not self._children: # <<<<<<<<<<<<<< + * self._children = other._children + * delta = other._size - self._size +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_children); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_3); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":749 + * delta = 0 + * elif not self._children: + * self._children = other._children # <<<<<<<<<<<<<< + * delta = other._size - self._size + * else: +*/ + __pyx_t_1 = __pyx_v_other->_children; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_children); + __Pyx_DECREF(__pyx_v_self->_children); + __pyx_v_self->_children = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":750 + * elif not self._children: + * self._children = other._children + * delta = other._size - self._size # <<<<<<<<<<<<<< + * else: + * delta = 0 +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t((__pyx_v_other->_size - __pyx_v_self->_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_delta = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":748 + * elif not other._children: + * delta = 0 + * elif not self._children: # <<<<<<<<<<<<<< + * self._children = other._children + * delta = other._size - self._size +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":752 + * delta = other._size - self._size + * else: + * delta = 0 # <<<<<<<<<<<<<< + * other_child: '_BoundedTrieNode' + * self_child: Optional['_BoundedTrieNode'] +*/ + /*else*/ { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_delta = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/metrics/cells.py":755 + * other_child: '_BoundedTrieNode' + * self_child: Optional['_BoundedTrieNode'] + * for prefix, other_child in other._children.items(): # <<<<<<<<<<<<<< + * self_child = self._children.get(prefix, None) + * if self_child is None: +*/ + __pyx_t_4 = 0; + if (unlikely(__pyx_v_other->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 755, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_other->_children, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_7; + __pyx_t_7 = 0; + while (1) { + __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6); + if (unlikely(__pyx_t_9 == 0)) break; + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_other_child, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":756 + * self_child: Optional['_BoundedTrieNode'] + * for prefix, other_child in other._children.items(): + * self_child = self._children.get(prefix, None) # <<<<<<<<<<<<<< + * if self_child is None: + * self._children[prefix] = other_child +*/ + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 756, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_children, __pyx_v_prefix, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode))))) __PYX_ERR(0, 756, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_self_child, ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":757 + * for prefix, other_child in other._children.items(): + * self_child = self._children.get(prefix, None) + * if self_child is None: # <<<<<<<<<<<<<< + * self._children[prefix] = other_child + * delta += other_child._size +*/ + __pyx_t_2 = (((PyObject *)__pyx_v_self_child) == Py_None); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":758 + * self_child = self._children.get(prefix, None) + * if self_child is None: + * self._children[prefix] = other_child # <<<<<<<<<<<<<< + * delta += other_child._size + * else: +*/ + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 758, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_self->_children, __pyx_v_prefix, __pyx_v_other_child) < 0))) __PYX_ERR(0, 758, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":759 + * if self_child is None: + * self._children[prefix] = other_child + * delta += other_child._size # <<<<<<<<<<<<<< + * else: + * delta += self_child.merge(other_child) +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other_child, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_delta, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":757 + * for prefix, other_child in other._children.items(): + * self_child = self._children.get(prefix, None) + * if self_child is None: # <<<<<<<<<<<<<< + * self._children[prefix] = other_child + * delta += other_child._size +*/ + goto __pyx_L6; + } + + /* "apache_beam/metrics/cells.py":761 + * delta += other_child._size + * else: + * delta += self_child.merge(other_child) # <<<<<<<<<<<<<< + * self._size += delta + * return delta +*/ + /*else*/ { + __pyx_t_8 = ((PyObject *)__pyx_v_self_child); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_other_child}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_merge, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_delta, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_delta, __pyx_t_8); + __pyx_t_8 = 0; + } + __pyx_L6:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/metrics/cells.py":762 + * else: + * delta += self_child.merge(other_child) + * self._size += delta # <<<<<<<<<<<<<< + * return delta + * +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_delta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = __Pyx_PyLong_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_self->_size = __pyx_t_11; + + /* "apache_beam/metrics/cells.py":763 + * delta += self_child.merge(other_child) + * self._size += delta + * return delta # <<<<<<<<<<<<<< + * + * def flattened(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_v_delta; + __Pyx_INCREF(__pyx_t_8); + if (__Pyx_PyInt_FromNumber(&__pyx_t_8, NULL, 1) < (0)) __PYX_ERR(0, 763, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":739 + * return delta + * + * def merge(self, other: '_BoundedTrieNode') -> int: # <<<<<<<<<<<<<< + * if self._truncated: + * delta = 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_delta); + __Pyx_XDECREF(__pyx_v_other_child); + __Pyx_XDECREF((PyObject *)__pyx_v_self_child); + __Pyx_XDECREF(__pyx_v_prefix); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_20generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/metrics/cells.py":765 + * return delta + * + * def flattened(self): # <<<<<<<<<<<<<< + * if self._truncated: + * yield (True, ) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened = {"flattened", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flattened (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flattened", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flattened", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_18flattened(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_18flattened(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flattened", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 765, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_20generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_flattened, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_flattened, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells); if (unlikely(!gen)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.flattened", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_20generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + size_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flattened", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L5_resume_from_yield; + case 2: goto __pyx_L6_resume_from_yield; + case 3: goto __pyx_L13_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 765, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":766 + * + * def flattened(self): + * if self._truncated: # <<<<<<<<<<<<<< + * yield (True, ) + * elif not self._children: +*/ + if (__pyx_cur_scope->__pyx_v_self->_truncated) { + + /* "apache_beam/metrics/cells.py":767 + * def flattened(self): + * if self._truncated: + * yield (True, ) # <<<<<<<<<<<<<< + * elif not self._children: + * yield (False, ) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[2]); + __pyx_r = __pyx_mstate_global->__pyx_tuple[2]; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L5_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 767, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":766 + * + * def flattened(self): + * if self._truncated: # <<<<<<<<<<<<<< + * yield (True, ) + * elif not self._children: +*/ + goto __pyx_L4; + } + + /* "apache_beam/metrics/cells.py":768 + * if self._truncated: + * yield (True, ) + * elif not self._children: # <<<<<<<<<<<<<< + * yield (False, ) + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->_children); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":769 + * yield (True, ) + * elif not self._children: + * yield (False, ) # <<<<<<<<<<<<<< + * else: + * for prefix, child in sorted(self._children.items()): +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[3]); + __pyx_r = __pyx_mstate_global->__pyx_tuple[3]; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 2; + return __pyx_r; + __pyx_L6_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 769, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":768 + * if self._truncated: + * yield (True, ) + * elif not self._children: # <<<<<<<<<<<<<< + * yield (False, ) + * else: +*/ + goto __pyx_L4; + } + + /* "apache_beam/metrics/cells.py":771 + * yield (False, ) + * else: + * for prefix, child in sorted(self._children.items()): # <<<<<<<<<<<<<< + * for flattened in child.flattened(): + * yield (prefix, ) + flattened +*/ + /*else*/ { + if (unlikely(__pyx_cur_scope->__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 771, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_self->_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely((PyList_Sort(__pyx_t_4) < 0))) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 771, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 771, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_7); + } else { + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + } + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L10_unpacking_done; + __pyx_L9_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_L10_unpacking_done:; + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_prefix); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_prefix, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":772 + * else: + * for prefix, child in sorted(self._children.items()): + * for flattened in child.flattened(): # <<<<<<<<<<<<<< + * yield (prefix, ) + flattened + * +*/ + __pyx_t_7 = __pyx_cur_scope->__pyx_v_child; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flattened, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); + __pyx_t_11 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 772, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_7))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 772, __pyx_L1_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_11; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 772, __pyx_L1_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_11); + #endif + ++__pyx_t_11; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_12(__pyx_t_7); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 772, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_flattened); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_flattened, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":773 + * for prefix, child in sorted(self._children.items()): + * for flattened in child.flattened(): + * yield (prefix, ) + flattened # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_prefix); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_prefix); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_prefix) != (0)) __PYX_ERR(0, 773, __pyx_L1_error); + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_cur_scope->__pyx_v_flattened); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_XGIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_5; + __Pyx_XGIVEREF(__pyx_t_7); + __pyx_cur_scope->__pyx_t_2 = __pyx_t_7; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_11; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_12; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 3; + return __pyx_r; + __pyx_L13_resume_from_yield:; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = 0; + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_11 = __pyx_cur_scope->__pyx_t_3; + __pyx_t_12 = __pyx_cur_scope->__pyx_t_4; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 773, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":772 + * else: + * for prefix, child in sorted(self._children.items()): + * for flattened in child.flattened(): # <<<<<<<<<<<<<< + * yield (prefix, ) + flattened + * +*/ + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":771 + * yield (False, ) + * else: + * for prefix, child in sorted(self._children.items()): # <<<<<<<<<<<<<< + * for flattened in child.flattened(): + * yield (prefix, ) + flattened +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L4:; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/metrics/cells.py":765 + * return delta + * + * def flattened(self): # <<<<<<<<<<<<<< + * if self._truncated: + * yield (True, ) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("flattened", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":775 + * yield (prefix, ) + flattened + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return self._truncated or hash(sorted(self._children.items())) + * +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_22__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_22__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_21__hash__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_21__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + Py_hash_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_hash_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":776 + * + * def __hash__(self): + * return self._truncated or hash(sorted(self._children.items())) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (!__pyx_v_self->_truncated) { + } else { + __pyx_t_1 = __pyx_v_self->_truncated; + goto __pyx_L3_bool_binop_done; + } + if (unlikely(__pyx_v_self->_children == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 776, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_self->_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely((PyList_Sort(__pyx_t_3) < 0))) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_4; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":775 + * yield (prefix, ) + flattened + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return self._truncated or hash(sorted(self._children.items())) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":778 + * return self._truncated or hash(sorted(self._children.items())) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, _BoundedTrieNode): + * return ( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_24__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_24__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_23__eq__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_23__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":779 + * + * def __eq__(self, other): + * if isinstance(other, _BoundedTrieNode): # <<<<<<<<<<<<<< + * return ( + * self._truncated == other._truncated and +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":780 + * def __eq__(self, other): + * if isinstance(other, _BoundedTrieNode): + * return ( # <<<<<<<<<<<<<< + * self._truncated == other._truncated and + * self._children == other._children) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/cells.py":781 + * if isinstance(other, _BoundedTrieNode): + * return ( + * self._truncated == other._truncated and # <<<<<<<<<<<<<< + * self._children == other._children) + * else: +*/ + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_truncated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_truncated_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 781, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/metrics/cells.py":782 + * return ( + * self._truncated == other._truncated and + * self._children == other._children) # <<<<<<<<<<<<<< + * else: + * return False +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_children_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->_children, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":779 + * + * def __eq__(self, other): + * if isinstance(other, _BoundedTrieNode): # <<<<<<<<<<<<<< + * return ( + * self._truncated == other._truncated and +*/ + } + + /* "apache_beam/metrics/cells.py":784 + * self._children == other._children) + * else: + * return False # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":778 + * return self._truncated or hash(sorted(self._children.items())) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, _BoundedTrieNode): + * return ( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":786 + * return False + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_26__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_26__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_25__repr__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/metrics/cells.py":787 + * + * def __repr__(self): + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) # <<<<<<<<<<<<<< + * + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 787, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_2generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_repr___locals_genexpr_locals_g, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells); if (unlikely(!gen)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__repr__.genexpr.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 787, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 787, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_cur_scope->__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *__pyx_cur_scope; + PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_2generator4 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 787, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_repr___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells); if (unlikely(!gen)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__repr__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XDECREF(__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_2generator4); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 787, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 787, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_t); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_t, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___7genexpr_genexpr(NULL, __pyx_cur_scope->__pyx_v_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":786 + * return False + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_25__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___2generator3 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":787 + * + * def __repr__(self): + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flattened, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___genexpr(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":786 + * return False + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr(set(''.join(str(s) for s in t) for t in self.flattened())) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_gb_11apache_beam_7metrics_5cells_16_BoundedTrieNode_8__repr___2generator3); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":70 + * + * cdef class _BoundedTrieNode(object): + * cdef readonly libc.stdint.int64_t _size # <<<<<<<<<<<<<< + * cdef readonly dict _children + * cdef readonly bint _truncated +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode._size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":71 + * cdef class _BoundedTrieNode(object): + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children # <<<<<<<<<<<<<< + * cdef readonly bint _truncated + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_children); + __pyx_r = __pyx_v_self->_children; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":72 + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children + * cdef readonly bint _truncated # <<<<<<<<<<<<<< + * + * cdef class BoundedTrieData(object): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated___get__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_truncated); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode._truncated.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_27__reduce_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_27__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._children, self._size, self._truncated) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_truncated); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->_children); + __Pyx_GIVEREF(__pyx_v_self->_children); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_children) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._children, self._size, self._truncated) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._children, self._size, self._truncated) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._children is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._children, self._size, self._truncated) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._children is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_children != ((PyObject*)Py_None)); + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._children is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._children is not None + * if use_setstate: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__BoundedTrieNode); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_157087211); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_157087211); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_157087211) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._children is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, None), state + * else: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__BoundedTrieNode__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__BoundedTrieNode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_157087211); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_157087211); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_157087211) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__BoundedTrieNode__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_29__setstate_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_16_BoundedTrieNode_29__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__BoundedTrieNode__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle__BoundedTrieNode__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__BoundedTrieNode__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells._BoundedTrieNode.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":793 + * _DEFAULT_BOUND = 100 + * + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): # <<<<<<<<<<<<<< + * self._singleton = singleton + * self._root = root +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_root = 0; + PyObject *__pyx_v_singleton = 0; + PyObject *__pyx_v_bound = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_root,&__pyx_mstate_global->__pyx_n_u_singleton,&__pyx_mstate_global->__pyx_n_u_bound,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 793, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 793, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__3); + } else if (unlikely(__pyx_nargs != 0)) { + goto __pyx_L5_argtuple_error; + } else { + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__3); + } + __pyx_v_root = values[0]; + __pyx_v_singleton = values[1]; + __pyx_v_bound = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); __PYX_ERR(0, 793, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData___init__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), __pyx_v_root, __pyx_v_singleton, __pyx_v_bound); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData___init__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_root, PyObject *__pyx_v_singleton, PyObject *__pyx_v_bound) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":794 + * + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): + * self._singleton = singleton # <<<<<<<<<<<<<< + * self._root = root + * self._bound = bound +*/ + __Pyx_INCREF(__pyx_v_singleton); + __Pyx_GIVEREF(__pyx_v_singleton); + __Pyx_GOTREF(__pyx_v_self->_singleton); + __Pyx_DECREF(__pyx_v_self->_singleton); + __pyx_v_self->_singleton = __pyx_v_singleton; + + /* "apache_beam/metrics/cells.py":795 + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): + * self._singleton = singleton + * self._root = root # <<<<<<<<<<<<<< + * self._bound = bound + * assert singleton is None or root is None +*/ + __pyx_t_1 = __pyx_v_root; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode))))) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_root); + __Pyx_DECREF((PyObject *)__pyx_v_self->_root); + __pyx_v_self->_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":796 + * self._singleton = singleton + * self._root = root + * self._bound = bound # <<<<<<<<<<<<<< + * assert singleton is None or root is None + * +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_bound); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_v_self->_bound = __pyx_t_2; + + /* "apache_beam/metrics/cells.py":797 + * self._root = root + * self._bound = bound + * assert singleton is None or root is None # <<<<<<<<<<<<<< + * + * def size(self): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = (__pyx_v_singleton == Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_root == Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L3_bool_binop_done:; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 797, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 797, __pyx_L1_error) + #endif + + /* "apache_beam/metrics/cells.py":793 + * _DEFAULT_BOUND = 100 + * + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): # <<<<<<<<<<<<<< + * self._singleton = singleton + * self._root = root +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":799 + * assert singleton is None or root is None + * + * def size(self): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return 1 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_3size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_3size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_3size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_3size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_2size(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_2size(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + + /* "apache_beam/metrics/cells.py":800 + * + * def size(self): + * if self._singleton is not None: # <<<<<<<<<<<<<< + * return 1 + * elif self._root is not None: +*/ + __pyx_t_1 = (__pyx_v_self->_singleton != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":801 + * def size(self): + * if self._singleton is not None: + * return 1 # <<<<<<<<<<<<<< + * elif self._root is not None: + * return self._root.size() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __pyx_r = __pyx_mstate_global->__pyx_int_1; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":800 + * + * def size(self): + * if self._singleton is not None: # <<<<<<<<<<<<<< + * return 1 + * elif self._root is not None: +*/ + } + + /* "apache_beam/metrics/cells.py":802 + * if self._singleton is not None: + * return 1 + * elif self._root is not None: # <<<<<<<<<<<<<< + * return self._root.size() + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":803 + * return 1 + * elif self._root is not None: + * return self._root.size() # <<<<<<<<<<<<<< + * else: + * return 0 +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_size_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":802 + * if self._singleton is not None: + * return 1 + * elif self._root is not None: # <<<<<<<<<<<<<< + * return self._root.size() + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":805 + * return self._root.size() + * else: + * return 0 # <<<<<<<<<<<<<< + * + * def contains(self, value): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_r = __pyx_mstate_global->__pyx_int_0; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":799 + * assert singleton is None or root is None + * + * def size(self): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return 1 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":807 + * return 0 + * + * def contains(self, value): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return tuple(value) == self._singleton +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains = {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("contains (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 807, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 807, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "contains", 0) < (0)) __PYX_ERR(0, 807, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, i); __PYX_ERR(0, 807, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 807, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 807, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_4contains(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_4contains(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("contains", 0); + + /* "apache_beam/metrics/cells.py":808 + * + * def contains(self, value): + * if self._singleton is not None: # <<<<<<<<<<<<<< + * return tuple(value) == self._singleton + * elif self._root is not None: +*/ + __pyx_t_1 = (__pyx_v_self->_singleton != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":809 + * def contains(self, value): + * if self._singleton is not None: + * return tuple(value) == self._singleton # <<<<<<<<<<<<<< + * elif self._root is not None: + * return self._root.contains(value) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_self->_singleton, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":808 + * + * def contains(self, value): + * if self._singleton is not None: # <<<<<<<<<<<<<< + * return tuple(value) == self._singleton + * elif self._root is not None: +*/ + } + + /* "apache_beam/metrics/cells.py":810 + * if self._singleton is not None: + * return tuple(value) == self._singleton + * elif self._root is not None: # <<<<<<<<<<<<<< + * return self._root.contains(value) + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":811 + * return tuple(value) == self._singleton + * elif self._root is not None: + * return self._root.contains(value) # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_contains, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":810 + * if self._singleton is not None: + * return tuple(value) == self._singleton + * elif self._root is not None: # <<<<<<<<<<<<<< + * return self._root.contains(value) + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":813 + * return self._root.contains(value) + * else: + * return False # <<<<<<<<<<<<<< + * + * def flattened(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":807 + * return 0 + * + * def contains(self, value): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return tuple(value) == self._singleton +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":815 + * return False + * + * def flattened(self): # <<<<<<<<<<<<<< + * return self.as_trie().flattened() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened = {"flattened", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flattened (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flattened", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flattened", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6flattened(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6flattened(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flattened", 0); + + /* "apache_beam/metrics/cells.py":816 + * + * def flattened(self): + * return self.as_trie().flattened() # <<<<<<<<<<<<<< + * + * def to_proto(self) -> metrics_pb2.BoundedTrie: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flattened, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":815 + * return False + * + * def flattened(self): # <<<<<<<<<<<<<< + * return self.as_trie().flattened() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.flattened", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":818 + * return self.as_trie().flattened() + * + * def to_proto(self) -> metrics_pb2.BoundedTrie: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrie( + * bound=self._bound, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto = {"to_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_proto", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_proto", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_8to_proto(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_8to_proto(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_proto", 0); + + /* "apache_beam/metrics/cells.py":819 + * + * def to_proto(self) -> metrics_pb2.BoundedTrie: + * return metrics_pb2.BoundedTrie( # <<<<<<<<<<<<<< + * bound=self._bound, + * singleton=self._singleton if self._singleton else None, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metrics_pb2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BoundedTrie); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":820 + * def to_proto(self) -> metrics_pb2.BoundedTrie: + * return metrics_pb2.BoundedTrie( + * bound=self._bound, # <<<<<<<<<<<<<< + * singleton=self._singleton if self._singleton else None, + * root=self._root.to_proto() if self._root else None) +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_bound); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/cells.py":821 + * return metrics_pb2.BoundedTrie( + * bound=self._bound, + * singleton=self._singleton if self._singleton else None, # <<<<<<<<<<<<<< + * root=self._root.to_proto() if self._root else None) + * +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_singleton); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 821, __pyx_L1_error) + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_v_self->_singleton); + __pyx_t_5 = __pyx_v_self->_singleton; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_5 = Py_None; + } + + /* "apache_beam/metrics/cells.py":822 + * bound=self._bound, + * singleton=self._singleton if self._singleton else None, + * root=self._root.to_proto() if self._root else None) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_root)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) + if (__pyx_t_6) { + __pyx_t_9 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_proto, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } + __pyx_t_10 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_10 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_bound, __pyx_t_3, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 819, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_5, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 819, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_root, __pyx_t_7, __pyx_t_8, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":818 + * return self.as_trie().flattened() + * + * def to_proto(self) -> metrics_pb2.BoundedTrie: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrie( + * bound=self._bound, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.to_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":824 + * root=self._root.to_proto() if self._root else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData': + * return BoundedTrieData( +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto = {"from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_proto = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_proto,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 824, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 824, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_proto", 0) < (0)) __PYX_ERR(0, 824, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_proto", 1, 1, 1, i); __PYX_ERR(0, 824, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 824, __pyx_L3_error) + } + __pyx_v_proto = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_proto", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 824, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10from_proto(__pyx_v_proto); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10from_proto(PyObject *__pyx_v_proto) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_proto", 0); + + /* "apache_beam/metrics/cells.py":826 + * @staticmethod + * def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData': + * return BoundedTrieData( # <<<<<<<<<<<<<< + * bound=proto.bound, + * singleton=tuple(proto.singleton) if proto.singleton else None, +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = NULL; + + /* "apache_beam/metrics/cells.py":827 + * def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData': + * return BoundedTrieData( + * bound=proto.bound, # <<<<<<<<<<<<<< + * singleton=tuple(proto.singleton) if proto.singleton else None, + * root=( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_bound); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/cells.py":828 + * return BoundedTrieData( + * bound=proto.bound, + * singleton=tuple(proto.singleton) if proto.singleton else None, # <<<<<<<<<<<<<< + * root=( + * _BoundedTrieNode.from_proto(proto.root) +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_singleton); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_singleton); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } + + /* "apache_beam/metrics/cells.py":831 + * root=( + * _BoundedTrieNode.from_proto(proto.root) + * if proto.HasField('root') else None)) # <<<<<<<<<<<<<< + * + * def as_trie(self): +*/ + __pyx_t_8 = __pyx_v_proto; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_root}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_HasField, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/metrics/cells.py":830 + * singleton=tuple(proto.singleton) if proto.singleton else None, + * root=( + * _BoundedTrieNode.from_proto(proto.root) # <<<<<<<<<<<<<< + * if proto.HasField('root') else None)) + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_mstate_global->__pyx_n_u_root); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_10}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_proto, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_7 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + + /* "apache_beam/metrics/cells.py":831 + * root=( + * _BoundedTrieNode.from_proto(proto.root) + * if proto.HasField('root') else None)) # <<<<<<<<<<<<<< + * + * def as_trie(self): +*/ + __Pyx_INCREF(Py_None); + __pyx_t_7 = Py_None; + } + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_bound, __pyx_t_3, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 826, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_4, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 826, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_root, __pyx_t_7, __pyx_t_5, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":824 + * root=self._root.to_proto() if self._root else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData': + * return BoundedTrieData( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":833 + * if proto.HasField('root') else None)) + * + * def as_trie(self): # <<<<<<<<<<<<<< + * if self._root is not None: + * return self._root +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie = {"as_trie", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("as_trie (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_trie", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_trie", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_12as_trie(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_12as_trie(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v_root = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("as_trie", 0); + + /* "apache_beam/metrics/cells.py":834 + * + * def as_trie(self): + * if self._root is not None: # <<<<<<<<<<<<<< + * return self._root + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":835 + * def as_trie(self): + * if self._root is not None: + * return self._root # <<<<<<<<<<<<<< + * else: + * root = _BoundedTrieNode() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_root); + __pyx_r = ((PyObject *)__pyx_v_self->_root); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":834 + * + * def as_trie(self): + * if self._root is not None: # <<<<<<<<<<<<<< + * return self._root + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":837 + * return self._root + * else: + * root = _BoundedTrieNode() # <<<<<<<<<<<<<< + * if self._singleton is not None: + * root.add(self._singleton) +*/ + /*else*/ { + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_v_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":838 + * else: + * root = _BoundedTrieNode() + * if self._singleton is not None: # <<<<<<<<<<<<<< + * root.add(self._singleton) + * return root +*/ + __pyx_t_1 = (__pyx_v_self->_singleton != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":839 + * root = _BoundedTrieNode() + * if self._singleton is not None: + * root.add(self._singleton) # <<<<<<<<<<<<<< + * return root + * +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_root); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self->_singleton}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":838 + * else: + * root = _BoundedTrieNode() + * if self._singleton is not None: # <<<<<<<<<<<<<< + * root.add(self._singleton) + * return root +*/ + } + + /* "apache_beam/metrics/cells.py":840 + * if self._singleton is not None: + * root.add(self._singleton) + * return root # <<<<<<<<<<<<<< + * + * def __eq__(self, other: object) -> bool: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_root); + __pyx_r = ((PyObject *)__pyx_v_root); + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":833 + * if proto.HasField('root') else None)) + * + * def as_trie(self): # <<<<<<<<<<<<<< + * if self._root is not None: + * return self._root +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.as_trie", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_root); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":842 + * return root + * + * def __eq__(self, other: object) -> bool: # <<<<<<<<<<<<<< + * if isinstance(other, BoundedTrieData): + * return self.as_trie() == other.as_trie() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_14__eq__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_14__eq__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":843 + * + * def __eq__(self, other: object) -> bool: + * if isinstance(other, BoundedTrieData): # <<<<<<<<<<<<<< + * return self.as_trie() == other.as_trie() + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":844 + * def __eq__(self, other: object) -> bool: + * if isinstance(other, BoundedTrieData): + * return self.as_trie() == other.as_trie() # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = __pyx_v_other; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":843 + * + * def __eq__(self, other: object) -> bool: + * if isinstance(other, BoundedTrieData): # <<<<<<<<<<<<<< + * return self.as_trie() == other.as_trie() + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":846 + * return self.as_trie() == other.as_trie() + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self) -> int: +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":842 + * return root + * + * def __eq__(self, other: object) -> bool: # <<<<<<<<<<<<<< + * if isinstance(other, BoundedTrieData): + * return self.as_trie() == other.as_trie() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":848 + * return False + * + * def __hash__(self) -> int: # <<<<<<<<<<<<<< + * return hash(self.as_trie()) + * +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_17__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_17__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_16__hash__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_16__hash__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + Py_hash_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":849 + * + * def __hash__(self) -> int: + * return hash(self.as_trie()) # <<<<<<<<<<<<<< + * + * def __repr__(self) -> str: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 849, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":848 + * return False + * + * def __hash__(self) -> int: # <<<<<<<<<<<<<< + * return hash(self.as_trie()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":851 + * return hash(self.as_trie()) + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< + * return 'BoundedTrieData({})'.format(self.as_trie()) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_19__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_19__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_18__repr__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_18__repr__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":852 + * + * def __repr__(self) -> str: + * return 'BoundedTrieData({})'.format(self.as_trie()) # <<<<<<<<<<<<<< + * + * def get_cumulative(self) -> "BoundedTrieData": +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_BoundedTrieData; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":851 + * return hash(self.as_trie()) + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< + * return 'BoundedTrieData({})'.format(self.as_trie()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":854 + * return 'BoundedTrieData({})'.format(self.as_trie()) + * + * def get_cumulative(self) -> "BoundedTrieData": # <<<<<<<<<<<<<< + * return copy.deepcopy(self) + * +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_20get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_20get_cumulative(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":855 + * + * def get_cumulative(self) -> "BoundedTrieData": + * return copy.deepcopy(self) # <<<<<<<<<<<<<< + * + * def get_result(self) -> Set[tuple]: +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData))))) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":854 + * return 'BoundedTrieData({})'.format(self.as_trie()) + * + * def get_cumulative(self) -> "BoundedTrieData": # <<<<<<<<<<<<<< + * return copy.deepcopy(self) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":857 + * return copy.deepcopy(self) + * + * def get_result(self) -> Set[tuple]: # <<<<<<<<<<<<<< + * if self._root is None: + * if self._singleton is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result = {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_result", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_result", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_22get_result(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_22get_result(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_result", 0); + + /* "apache_beam/metrics/cells.py":858 + * + * def get_result(self) -> Set[tuple]: + * if self._root is None: # <<<<<<<<<<<<<< + * if self._singleton is None: + * return set() +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":859 + * def get_result(self) -> Set[tuple]: + * if self._root is None: + * if self._singleton is None: # <<<<<<<<<<<<<< + * return set() + * else: +*/ + __pyx_t_1 = (__pyx_v_self->_singleton == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":860 + * if self._root is None: + * if self._singleton is None: + * return set() # <<<<<<<<<<<<<< + * else: + * return set([self._singleton + (False, )]) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":859 + * def get_result(self) -> Set[tuple]: + * if self._root is None: + * if self._singleton is None: # <<<<<<<<<<<<<< + * return set() + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":862 + * return set() + * else: + * return set([self._singleton + (False, )]) # <<<<<<<<<<<<<< + * else: + * return set(self._root.flattened()) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyNumber_Add(__pyx_v_self->_singleton, __pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PySet_Add(__pyx_t_3, __pyx_t_2) < (0)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":858 + * + * def get_result(self) -> Set[tuple]: + * if self._root is None: # <<<<<<<<<<<<<< + * if self._singleton is None: + * return set() +*/ + } + + /* "apache_beam/metrics/cells.py":864 + * return set([self._singleton + (False, )]) + * else: + * return set(self._root.flattened()) # <<<<<<<<<<<<<< + * + * def add(self, segments): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flattened, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":857 + * return copy.deepcopy(self) + * + * def get_result(self) -> Set[tuple]: # <<<<<<<<<<<<<< + * if self._root is None: + * if self._singleton is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":866 + * return set(self._root.flattened()) + * + * def add(self, segments): # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * self._singleton = segments +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_25add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_25add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_25add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_25add(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_segments = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_segments,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 866, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 866, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 866, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, i); __PYX_ERR(0, 866, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 866, __pyx_L3_error) + } + __pyx_v_segments = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 866, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_24add(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), __pyx_v_segments); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_24add(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v_segments) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/metrics/cells.py":867 + * + * def add(self, segments): + * if self._root is None and self._singleton is None: # <<<<<<<<<<<<<< + * self._singleton = segments + * elif self._singleton is not None and self._singleton == segments: +*/ + __pyx_t_2 = (((PyObject *)__pyx_v_self->_root) == Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->_singleton == Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":868 + * def add(self, segments): + * if self._root is None and self._singleton is None: + * self._singleton = segments # <<<<<<<<<<<<<< + * elif self._singleton is not None and self._singleton == segments: + * # Optimize for the common case of re-adding the same value. +*/ + __Pyx_INCREF(__pyx_v_segments); + __Pyx_GIVEREF(__pyx_v_segments); + __Pyx_GOTREF(__pyx_v_self->_singleton); + __Pyx_DECREF(__pyx_v_self->_singleton); + __pyx_v_self->_singleton = __pyx_v_segments; + + /* "apache_beam/metrics/cells.py":867 + * + * def add(self, segments): + * if self._root is None and self._singleton is None: # <<<<<<<<<<<<<< + * self._singleton = segments + * elif self._singleton is not None and self._singleton == segments: +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/cells.py":869 + * if self._root is None and self._singleton is None: + * self._singleton = segments + * elif self._singleton is not None and self._singleton == segments: # <<<<<<<<<<<<<< + * # Optimize for the common case of re-adding the same value. + * return +*/ + __pyx_t_2 = (__pyx_v_self->_singleton != Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->_singleton, __pyx_v_segments, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":871 + * elif self._singleton is not None and self._singleton == segments: + * # Optimize for the common case of re-adding the same value. + * return # <<<<<<<<<<<<<< + * else: + * if self._root is None: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":869 + * if self._root is None and self._singleton is None: + * self._singleton = segments + * elif self._singleton is not None and self._singleton == segments: # <<<<<<<<<<<<<< + * # Optimize for the common case of re-adding the same value. + * return +*/ + } + + /* "apache_beam/metrics/cells.py":873 + * return + * else: + * if self._root is None: # <<<<<<<<<<<<<< + * self._root = self.as_trie() + * self._singleton = None +*/ + /*else*/ { + __pyx_t_1 = (((PyObject *)__pyx_v_self->_root) == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":874 + * else: + * if self._root is None: + * self._root = self.as_trie() # <<<<<<<<<<<<<< + * self._singleton = None + * self._root.add(segments) +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode))))) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_root); + __Pyx_DECREF((PyObject *)__pyx_v_self->_root); + __pyx_v_self->_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":875 + * if self._root is None: + * self._root = self.as_trie() + * self._singleton = None # <<<<<<<<<<<<<< + * self._root.add(segments) + * if self._root._size > self._bound: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_singleton); + __Pyx_DECREF(__pyx_v_self->_singleton); + __pyx_v_self->_singleton = Py_None; + + /* "apache_beam/metrics/cells.py":873 + * return + * else: + * if self._root is None: # <<<<<<<<<<<<<< + * self._root = self.as_trie() + * self._singleton = None +*/ + } + + /* "apache_beam/metrics/cells.py":876 + * self._root = self.as_trie() + * self._singleton = None + * self._root.add(segments) # <<<<<<<<<<<<<< + * if self._root._size > self._bound: + * self._root.trim() +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_segments}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":877 + * self._singleton = None + * self._root.add(segments) + * if self._root._size > self._bound: # <<<<<<<<<<<<<< + * self._root.trim() + * +*/ + __pyx_t_1 = (__pyx_v_self->_root->_size > __pyx_v_self->_bound); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":878 + * self._root.add(segments) + * if self._root._size > self._bound: + * self._root.trim() # <<<<<<<<<<<<<< + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->_root); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_trim, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/metrics/cells.py":877 + * self._singleton = None + * self._root.add(segments) + * if self._root._size > self._bound: # <<<<<<<<<<<<<< + * self._root.trim() + * +*/ + } + } + __pyx_L3:; + + /* "apache_beam/metrics/cells.py":866 + * return set(self._root.flattened()) + * + * def add(self, segments): # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * self._singleton = segments +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":880 + * self._root.trim() + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * return other +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 880, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 880, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 880, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, i); __PYX_ERR(0, 880, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 880, __pyx_L3_error) + } + __pyx_v_other = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 880, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, 0, "other", 0))) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_26combine(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), __pyx_v_other); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_26combine(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_other) { + PyObject *__pyx_v_combined = NULL; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int64_t __pyx_t_11; + int64_t __pyx_t_12; + int64_t __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_INCREF((PyObject *)__pyx_v_other); + + /* "apache_beam/metrics/cells.py":881 + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": + * if self._root is None and self._singleton is None: # <<<<<<<<<<<<<< + * return other + * elif other._root is None and other._singleton is None: +*/ + __pyx_t_2 = (((PyObject *)__pyx_v_self->_root) == Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->_singleton == Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":882 + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": + * if self._root is None and self._singleton is None: + * return other # <<<<<<<<<<<<<< + * elif other._root is None and other._singleton is None: + * return self +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_other); + __pyx_r = __pyx_v_other; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":881 + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": + * if self._root is None and self._singleton is None: # <<<<<<<<<<<<<< + * return other + * elif other._root is None and other._singleton is None: +*/ + } + + /* "apache_beam/metrics/cells.py":883 + * if self._root is None and self._singleton is None: + * return other + * elif other._root is None and other._singleton is None: # <<<<<<<<<<<<<< + * return self + * else: +*/ + __pyx_t_2 = (((PyObject *)__pyx_v_other->_root) == Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_other->_singleton == Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":884 + * return other + * elif other._root is None and other._singleton is None: + * return self # <<<<<<<<<<<<<< + * else: + * if self._root is None and other._root is not None: +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":883 + * if self._root is None and self._singleton is None: + * return other + * elif other._root is None and other._singleton is None: # <<<<<<<<<<<<<< + * return self + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":886 + * return self + * else: + * if self._root is None and other._root is not None: # <<<<<<<<<<<<<< + * self, other = other, self + * combined = copy.deepcopy(self.as_trie()) +*/ + /*else*/ { + __pyx_t_2 = (((PyObject *)__pyx_v_self->_root) == Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_2 = (((PyObject *)__pyx_v_other->_root) != Py_None); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":887 + * else: + * if self._root is None and other._root is not None: + * self, other = other, self # <<<<<<<<<<<<<< + * combined = copy.deepcopy(self.as_trie()) + * if other._root is not None: +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_other); + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __pyx_v_self = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_3); + __pyx_t_3 = 0; + __pyx_v_other = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":886 + * return self + * else: + * if self._root is None and other._root is not None: # <<<<<<<<<<<<<< + * self, other = other, self + * combined = copy.deepcopy(self.as_trie()) +*/ + } + + /* "apache_beam/metrics/cells.py":888 + * if self._root is None and other._root is not None: + * self, other = other, self + * combined = copy.deepcopy(self.as_trie()) # <<<<<<<<<<<<<< + * if other._root is not None: + * combined.merge(other._root) +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_trie, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_10 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_10 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_combined = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/metrics/cells.py":889 + * self, other = other, self + * combined = copy.deepcopy(self.as_trie()) + * if other._root is not None: # <<<<<<<<<<<<<< + * combined.merge(other._root) + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_other->_root) != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":890 + * combined = copy.deepcopy(self.as_trie()) + * if other._root is not None: + * combined.merge(other._root) # <<<<<<<<<<<<<< + * else: + * combined.add(other._singleton) +*/ + __pyx_t_8 = __pyx_v_combined; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_other->_root)}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_merge, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/metrics/cells.py":889 + * self, other = other, self + * combined = copy.deepcopy(self.as_trie()) + * if other._root is not None: # <<<<<<<<<<<<<< + * combined.merge(other._root) + * else: +*/ + goto __pyx_L11; + } + + /* "apache_beam/metrics/cells.py":892 + * combined.merge(other._root) + * else: + * combined.add(other._singleton) # <<<<<<<<<<<<<< + * self._bound = min(self._bound, other._bound) + * while combined._size > self._bound: +*/ + /*else*/ { + __pyx_t_8 = __pyx_v_combined; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_other->_singleton}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L11:; + + /* "apache_beam/metrics/cells.py":893 + * else: + * combined.add(other._singleton) + * self._bound = min(self._bound, other._bound) # <<<<<<<<<<<<<< + * while combined._size > self._bound: + * combined.trim() +*/ + __pyx_t_11 = __pyx_v_other->_bound; + __pyx_t_12 = __pyx_v_self->_bound; + __pyx_t_1 = (__pyx_t_11 < __pyx_t_12); + if (__pyx_t_1) { + __pyx_t_13 = __pyx_t_11; + } else { + __pyx_t_13 = __pyx_t_12; + } + __pyx_v_self->_bound = __pyx_t_13; + + /* "apache_beam/metrics/cells.py":894 + * combined.add(other._singleton) + * self._bound = min(self._bound, other._bound) + * while combined._size > self._bound: # <<<<<<<<<<<<<< + * combined.trim() + * return BoundedTrieData(root=combined) +*/ + while (1) { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_combined, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_bound); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!__pyx_t_1) break; + + /* "apache_beam/metrics/cells.py":895 + * self._bound = min(self._bound, other._bound) + * while combined._size > self._bound: + * combined.trim() # <<<<<<<<<<<<<< + * return BoundedTrieData(root=combined) + * +*/ + __pyx_t_8 = __pyx_v_combined; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_trim, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "apache_beam/metrics/cells.py":896 + * while combined._size > self._bound: + * combined.trim() + * return BoundedTrieData(root=combined) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_8 = NULL; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_root, __pyx_v_combined, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_7); + __pyx_t_7 = 0; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":880 + * self._root.trim() + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * return other +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_combined); + __Pyx_XDECREF((PyObject *)__pyx_v_self); + __Pyx_XDECREF((PyObject *)__pyx_v_other); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":898 + * return BoundedTrieData(root=combined) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "BoundedTrieData": + * s = BoundedTrieData() +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton = {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("singleton (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 898, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 898, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "singleton", 0) < (0)) __PYX_ERR(0, 898, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, i); __PYX_ERR(0, 898, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 898, __pyx_L3_error) + } + __pyx_v_value = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("singleton", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 898, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 0, "value", 2))) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_28singleton(__pyx_v_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_28singleton(PyObject *__pyx_v_value) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_s = NULL; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("singleton", 0); + + /* "apache_beam/metrics/cells.py":900 + * @staticmethod + * def singleton(value: str) -> "BoundedTrieData": + * s = BoundedTrieData() # <<<<<<<<<<<<<< + * s.add(value) + * return s +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_s = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":901 + * def singleton(value: str) -> "BoundedTrieData": + * s = BoundedTrieData() + * s.add(value) # <<<<<<<<<<<<<< + * return s + * +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_s); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":902 + * s = BoundedTrieData() + * s.add(value) + * return s # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_s); + __pyx_r = __pyx_v_s; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":898 + * return BoundedTrieData(root=combined) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "BoundedTrieData": + * s = BoundedTrieData() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.singleton", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_s); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":904 + * return s + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "BoundedTrieData": + * return BoundedTrieData() +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element = {"identity_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("identity_element (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("identity_element", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("identity_element", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_30identity_element(); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_30identity_element(void) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("identity_element", 0); + + /* "apache_beam/metrics/cells.py":906 + * @staticmethod + * def identity_element() -> "BoundedTrieData": + * return BoundedTrieData() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":904 + * return s + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "BoundedTrieData": + * return BoundedTrieData() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":75 + * + * cdef class BoundedTrieData(object): + * cdef readonly libc.stdint.int64_t _bound # <<<<<<<<<<<<<< + * cdef readonly object _singleton + * cdef readonly _BoundedTrieNode _root +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_bound); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData._bound.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":76 + * cdef class BoundedTrieData(object): + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton # <<<<<<<<<<<<<< + * cdef readonly _BoundedTrieNode _root +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_singleton); + __pyx_r = __pyx_v_self->_singleton; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.pxd":77 + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton + * cdef readonly _BoundedTrieNode _root # <<<<<<<<<<<<<< +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root___get__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root___get__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_root); + __pyx_r = ((PyObject *)__pyx_v_self->_root); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_32__reduce_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_32__reduce_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._bound, self._root, self._singleton) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_bound); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->_root); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_root); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_root)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_singleton); + __Pyx_GIVEREF(__pyx_v_self->_singleton); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->_singleton) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._bound, self._root, self._singleton) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._bound, self._root, self._singleton) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._root is not None or self._singleton is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._bound, self._root, self._singleton) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._root is not None or self._singleton is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, None), state +*/ + /*else*/ { + __pyx_t_4 = (((PyObject *)__pyx_v_self->_root) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_singleton != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._root is not None or self._singleton is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._root is not None or self._singleton is not None + * if use_setstate: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoundedTrieData); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_50871570); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_50871570); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_50871570) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._root is not None or self._singleton is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, None), state + * else: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BoundedTrieData__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoundedTrieData); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_50871570); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_50871570); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_50871570) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoundedTrieData__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_34__setstate_cython__(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15BoundedTrieData_34__setstate_cython__(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_BoundedTrieData__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_BoundedTrieData__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoundedTrieData__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.BoundedTrieData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":920 + * This class is thread safe since underlying histogram object is thread safe. + * """ + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * self.data = HistogramData.identity_element(bucket_type) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_bucket_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_bucket_type,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 920, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 920, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 920, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 920, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 920, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 920, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 920, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_bucket_type = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 920, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell___init__(__pyx_self, __pyx_v_self, __pyx_v_bucket_type); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bucket_type) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":921 + * """ + * def __init__(self, bucket_type): + * self._bucket_type = bucket_type # <<<<<<<<<<<<<< + * self.data = HistogramData.identity_element(bucket_type) + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2, __pyx_v_bucket_type) < (0)) __PYX_ERR(0, 921, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":922 + * def __init__(self, bucket_type): + * self._bucket_type = bucket_type + * self.data = HistogramData.identity_element(bucket_type) # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_identity_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bucket_type}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data, __pyx_t_1) < (0)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":920 + * This class is thread safe since underlying histogram object is thread safe. + * """ + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * self.data = HistogramData.identity_element(bucket_type) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":924 + * self.data = HistogramData.identity_element(bucket_type) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = HistogramData.identity_element(self._bucket_type) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_3reset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_3reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_3reset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 924, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 924, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reset", 0) < (0)) __PYX_ERR(0, 924, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, i); __PYX_ERR(0, 924, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 924, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 924, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_2reset(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_2reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/cells.py":925 + * + * def reset(self): + * self.data = HistogramData.identity_element(self._bucket_type) # <<<<<<<<<<<<<< + * + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_identity_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data, __pyx_t_1) < (0)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":924 + * self.data = HistogramData.identity_element(bucket_type) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = HistogramData.identity_element(self._bucket_type) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":927 + * self.data = HistogramData.identity_element(self._bucket_type) + * + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': # <<<<<<<<<<<<<< + * result = HistogramCell(self._bucket_type) + * result.data = self.data.combine(other.data) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_5combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_5combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_5combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 927, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 927, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 927, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 927, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, i); __PYX_ERR(0, 927, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 927, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 927, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 927, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_4combine(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_4combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":928 + * + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': + * result = HistogramCell(self._bucket_type) # <<<<<<<<<<<<<< + * result.data = self.data.combine(other.data) + * return result +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramCell); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":929 + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': + * result = HistogramCell(self._bucket_type) + * result.data = self.data.combine(other.data) # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_data, __pyx_t_1) < (0)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":930 + * result = HistogramCell(self._bucket_type) + * result.data = self.data.combine(other.data) + * return result # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":927 + * self.data = HistogramData.identity_element(self._bucket_type) + * + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': # <<<<<<<<<<<<<< + * result = HistogramCell(self._bucket_type) + * result.data = self.data.combine(other.data) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":932 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.data.histogram.record(value) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_7update(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_7update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_7update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_7update(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 932, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 932, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 932, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 932, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 2, 2, i); __PYX_ERR(0, 932, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 932, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 932, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 932, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_6update(__pyx_self, __pyx_v_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_6update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + + /* "apache_beam/metrics/cells.py":933 + * + * def update(self, value): + * self.data.histogram.record(value) # <<<<<<<<<<<<<< + * + * def get_cumulative(self) -> 'HistogramData': +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_record, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/cells.py":932 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.data.histogram.record(value) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":935 + * self.data.histogram.record(value) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 935, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 935, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_cumulative", 0) < (0)) __PYX_ERR(0, 935, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, i); __PYX_ERR(0, 935, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 935, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 935, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_8get_cumulative(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":936 + * + * def get_cumulative(self) -> 'HistogramData': + * return self.data.get_cumulative() # <<<<<<<<<<<<<< + * + * def to_runner_api_monitoring_info(self, name, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":935 + * self.data.histogram.record(value) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":938 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * # Histogram metric is currently worker-local and internal + * # use only. This method should be implemented when runners +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_11to_runner_api_monitoring_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_11to_runner_api_monitoring_info = {"to_runner_api_monitoring_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_11to_runner_api_monitoring_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramCell_11to_runner_api_monitoring_info(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_name = 0; + CYTHON_UNUSED PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 938, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 938, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 938, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 938, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_info", 0) < (0)) __PYX_ERR(0, 938, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info", 1, 3, 3, i); __PYX_ERR(0, 938, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 938, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 938, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 938, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_name = values[1]; + __pyx_v_transform_id = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_info", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 938, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCell.to_runner_api_monitoring_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_10to_runner_api_monitoring_info(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramCell_10to_runner_api_monitoring_info(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_info", 0); + + /* "apache_beam/metrics/cells.py":942 + * # use only. This method should be implemented when runners + * # support Histogram metric reporting. + * return None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":938 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * # Histogram metric is currently worker-local and internal + * # use only. This method should be implemented when runners +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":946 + * + * class HistogramCellFactory(MetricCellFactory): + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_bucket_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_bucket_type,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 946, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 946, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 946, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 946, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 946, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 946, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 946, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_bucket_type = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 946, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory___init__(__pyx_self, __pyx_v_self, __pyx_v_bucket_type); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bucket_type) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":947 + * class HistogramCellFactory(MetricCellFactory): + * def __init__(self, bucket_type): + * self._bucket_type = bucket_type # <<<<<<<<<<<<<< + * + * def __call__(self): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2, __pyx_v_bucket_type) < (0)) __PYX_ERR(0, 947, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":946 + * + * class HistogramCellFactory(MetricCellFactory): + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":949 + * self._bucket_type = bucket_type + * + * def __call__(self): # <<<<<<<<<<<<<< + * return HistogramCell(self._bucket_type) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_3__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_3__call__ = {"__call__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_3__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_3__call__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 949, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 949, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 949, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 949, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_2__call__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 0); + + /* "apache_beam/metrics/cells.py":950 + * + * def __call__(self): + * return HistogramCell(self._bucket_type) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramCell); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":949 + * self._bucket_type = bucket_type + * + * def __call__(self): # <<<<<<<<<<<<<< + * return HistogramCell(self._bucket_type) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":952 + * return HistogramCell(self._bucket_type) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, HistogramCellFactory): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_5__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_5__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_5__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_5__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 952, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 952, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 952, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_4__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_4__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":953 + * + * def __eq__(self, other): + * if not isinstance(other, HistogramCellFactory): # <<<<<<<<<<<<<< + * return False + * return self._bucket_type == other._bucket_type +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "apache_beam/metrics/cells.py":954 + * def __eq__(self, other): + * if not isinstance(other, HistogramCellFactory): + * return False # <<<<<<<<<<<<<< + * return self._bucket_type == other._bucket_type + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":953 + * + * def __eq__(self, other): + * if not isinstance(other, HistogramCellFactory): # <<<<<<<<<<<<<< + * return False + * return self._bucket_type == other._bucket_type +*/ + } + + /* "apache_beam/metrics/cells.py":955 + * if not isinstance(other, HistogramCellFactory): + * return False + * return self._bucket_type == other._bucket_type # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":952 + * return HistogramCell(self._bucket_type) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, HistogramCellFactory): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":957 + * return self._bucket_type == other._bucket_type + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._bucket_type) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_7__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_7__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_7__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_20HistogramCellFactory_7__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 957, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 957, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 957, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 957, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 957, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 957, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_6__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_20HistogramCellFactory_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":958 + * + * def __hash__(self): + * return hash(self._bucket_type) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bucket_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":957 + * return self._bucket_type == other._bucket_type + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._bucket_type) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramCellFactory.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":962 + * + * class HistogramResult(object): + * def __init__(self, data: 'HistogramData') -> None: # <<<<<<<<<<<<<< + * self.data = data + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 962, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 962, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 962, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 962, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 962, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 962, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 962, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_data = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 962, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult___init__(__pyx_self, __pyx_v_self, __pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":963 + * class HistogramResult(object): + * def __init__(self, data: 'HistogramData') -> None: + * self.data = data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data, __pyx_v_data) < (0)) __PYX_ERR(0, 963, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":962 + * + * class HistogramResult(object): + * def __init__(self, data: 'HistogramData') -> None: # <<<<<<<<<<<<<< + * self.data = data + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":965 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, HistogramResult): + * return self.data == other.data +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 965, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 965, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 965, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 965, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 965, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 965, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 965, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 965, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":966 + * + * def __eq__(self, other): + * if isinstance(other, HistogramResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HistogramResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 966, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/metrics/cells.py":967 + * def __eq__(self, other): + * if isinstance(other, HistogramResult): + * return self.data == other.data # <<<<<<<<<<<<<< + * else: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":966 + * + * def __eq__(self, other): + * if isinstance(other, HistogramResult): # <<<<<<<<<<<<<< + * return self.data == other.data + * else: +*/ + } + + /* "apache_beam/metrics/cells.py":969 + * return self.data == other.data + * else: + * return False # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + + /* "apache_beam/metrics/cells.py":965 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, HistogramResult): + * return self.data == other.data +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":971 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.data) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 971, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 971, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 971, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 971, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 971, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 971, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":972 + * + * def __hash__(self): + * return hash(self.data) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":971 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.data) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":974 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.data.histogram.get_percentile_info()) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 974, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 974, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 974, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 974, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 974, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 974, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":975 + * + * def __repr__(self): + * return ''.format( # <<<<<<<<<<<<<< + * self.data.histogram.get_percentile_info()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_HistogramResult_2; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/cells.py":976 + * def __repr__(self): + * return ''.format( + * self.data.histogram.get_percentile_info()) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_percentile_info, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":974 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.data.histogram.get_percentile_info()) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":978 + * self.data.histogram.get_percentile_info()) + * + * @property # <<<<<<<<<<<<<< + * def p99(self): + * return self.data.histogram.p99() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_9p99(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_9p99 = {"p99", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_9p99, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_9p99(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("p99 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 978, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 978, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "p99", 0) < (0)) __PYX_ERR(0, 978, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("p99", 1, 1, 1, i); __PYX_ERR(0, 978, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 978, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("p99", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 978, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p99", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_8p99(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_8p99(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("p99", 0); + + /* "apache_beam/metrics/cells.py":980 + * @property + * def p99(self): + * return self.data.histogram.p99() # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_p99, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":978 + * self.data.histogram.get_percentile_info()) + * + * @property # <<<<<<<<<<<<<< + * def p99(self): + * return self.data.histogram.p99() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p99", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":982 + * return self.data.histogram.p99() + * + * @property # <<<<<<<<<<<<<< + * def p95(self): + * return self.data.histogram.p95() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_11p95(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_11p95 = {"p95", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_11p95, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_11p95(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("p95 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 982, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 982, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "p95", 0) < (0)) __PYX_ERR(0, 982, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("p95", 1, 1, 1, i); __PYX_ERR(0, 982, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 982, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("p95", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 982, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p95", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_10p95(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_10p95(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("p95", 0); + + /* "apache_beam/metrics/cells.py":984 + * @property + * def p95(self): + * return self.data.histogram.p95() # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_p95, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":982 + * return self.data.histogram.p99() + * + * @property # <<<<<<<<<<<<<< + * def p95(self): + * return self.data.histogram.p95() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p95", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":986 + * return self.data.histogram.p95() + * + * @property # <<<<<<<<<<<<<< + * def p90(self): + * return self.data.histogram.p90() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_13p90(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_13p90 = {"p90", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_13p90, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_13p90(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("p90 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 986, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 986, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "p90", 0) < (0)) __PYX_ERR(0, 986, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("p90", 1, 1, 1, i); __PYX_ERR(0, 986, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 986, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("p90", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 986, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p90", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_12p90(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_12p90(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("p90", 0); + + /* "apache_beam/metrics/cells.py":988 + * @property + * def p90(self): + * return self.data.histogram.p90() # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_p90, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":986 + * return self.data.histogram.p95() + * + * @property # <<<<<<<<<<<<<< + * def p90(self): + * return self.data.histogram.p90() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.p90", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":990 + * return self.data.histogram.p90() + * + * @property # <<<<<<<<<<<<<< + * def histogram(self): + * return self.data.histogram +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_15histogram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_15histogram = {"histogram", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_15histogram, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_15HistogramResult_15histogram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("histogram (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 990, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 990, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "histogram", 0) < (0)) __PYX_ERR(0, 990, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("histogram", 1, 1, 1, i); __PYX_ERR(0, 990, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 990, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("histogram", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 990, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.histogram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_14histogram(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_15HistogramResult_14histogram(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("histogram", 0); + + /* "apache_beam/metrics/cells.py":992 + * @property + * def histogram(self): + * return self.data.histogram # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":990 + * return self.data.histogram.p90() + * + * @property # <<<<<<<<<<<<<< + * def histogram(self): + * return self.data.histogram +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramResult.histogram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1003 + * outside the HistogramCell. + * """ + * def __init__(self, histogram): # <<<<<<<<<<<<<< + * self.histogram = histogram + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_histogram = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_histogram,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1003, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1003, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1003, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1003, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1003, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1003, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1003, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_histogram = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1003, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData___init__(__pyx_self, __pyx_v_self, __pyx_v_histogram); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_histogram) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/cells.py":1004 + * """ + * def __init__(self, histogram): + * self.histogram = histogram # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram, __pyx_v_histogram) < (0)) __PYX_ERR(0, 1004, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":1003 + * outside the HistogramCell. + * """ + * def __init__(self, histogram): # <<<<<<<<<<<<<< + * self.histogram = histogram + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1006 + * self.histogram = histogram + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.histogram == other.histogram + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1006, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1006, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1006, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 1006, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 1006, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1006, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1006, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1006, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/cells.py":1007 + * + * def __eq__(self, other): + * return self.histogram == other.histogram # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1006 + * self.histogram = histogram + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.histogram == other.histogram + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1009 + * return self.histogram == other.histogram + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.histogram) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1009, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1009, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 1009, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 1009, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1009, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1009, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/cells.py":1010 + * + * def __hash__(self): + * return hash(self.histogram) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 1010, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1009 + * return self.histogram == other.histogram + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.histogram) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1012 + * return hash(self.histogram) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1012, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1012, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 1012, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 1012, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1012, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1012, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/cells.py":1013 + * + * def __repr__(self): + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) # <<<<<<<<<<<<<< + * + * def get_cumulative(self) -> 'HistogramData': +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_HistogramData_2; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_percentile_info, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1012 + * return hash(self.histogram) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1015 + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return HistogramData(self.histogram) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_9get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_9get_cumulative(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1015, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1015, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_cumulative", 0) < (0)) __PYX_ERR(0, 1015, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, i); __PYX_ERR(0, 1015, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1015, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1015, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_8get_cumulative(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_8get_cumulative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/cells.py":1016 + * + * def get_cumulative(self) -> 'HistogramData': + * return HistogramData(self.histogram) # <<<<<<<<<<<<<< + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1015 + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return HistogramData(self.histogram) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1018 + * return HistogramData(self.histogram) + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': # <<<<<<<<<<<<<< + * if other is None: + * return self +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_11combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_11combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_11combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_11combine(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("combine (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1018, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1018, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1018, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 1018, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, i); __PYX_ERR(0, 1018, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1018, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1018, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("combine", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1018, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_10combine(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_10combine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("combine", 0); + + /* "apache_beam/metrics/cells.py":1019 + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + __pyx_t_1 = (__pyx_v_other == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/cells.py":1020 + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': + * if other is None: + * return self # <<<<<<<<<<<<<< + * + * return HistogramData(self.histogram.combine(other.histogram)) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1019 + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': + * if other is None: # <<<<<<<<<<<<<< + * return self + * +*/ + } + + /* "apache_beam/metrics/cells.py":1022 + * return self + * + * return HistogramData(self.histogram.combine(other.histogram)) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HistogramData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1018 + * return HistogramData(self.histogram) + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': # <<<<<<<<<<<<<< + * if other is None: + * return self +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.combine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1024 + * return HistogramData(self.histogram.combine(other.histogram)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(bucket_type) -> 'HistogramData': + * return HistogramData(Histogram(bucket_type)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_13identity_element(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_13identity_element = {"identity_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_13identity_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_13identity_element(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bucket_type = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("identity_element (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bucket_type,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1024, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1024, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "identity_element", 0) < (0)) __PYX_ERR(0, 1024, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("identity_element", 1, 1, 1, i); __PYX_ERR(0, 1024, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1024, __pyx_L3_error) + } + __pyx_v_bucket_type = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("identity_element", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1024, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_12identity_element(__pyx_self, __pyx_v_bucket_type); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_12identity_element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bucket_type) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("identity_element", 0); + + /* "apache_beam/metrics/cells.py":1026 + * @staticmethod + * def identity_element(bucket_type) -> 'HistogramData': + * return HistogramData(Histogram(bucket_type)) # <<<<<<<<<<<<<< + * + * def get_result(self) -> 'HistogramResult': +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Histogram); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_bucket_type}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1024 + * return HistogramData(self.histogram.combine(other.histogram)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(bucket_type) -> 'HistogramData': + * return HistogramData(Histogram(bucket_type)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.identity_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1028 + * return HistogramData(Histogram(bucket_type)) + * + * def get_result(self) -> 'HistogramResult': # <<<<<<<<<<<<<< + * return HistogramResult(self.get_cumulative()) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_15get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_15get_result = {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_15get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_15get_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1028, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1028, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_result", 0) < (0)) __PYX_ERR(0, 1028, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, i); __PYX_ERR(0, 1028, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1028, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_result", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1028, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_14get_result(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_14get_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_result", 0); + + /* "apache_beam/metrics/cells.py":1029 + * + * def get_result(self) -> 'HistogramResult': + * return HistogramResult(self.get_cumulative()) # <<<<<<<<<<<<<< + * + * def to_proto(self) -> metrics_pb2.HistogramValue: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HistogramResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1028 + * return HistogramData(Histogram(bucket_type)) + * + * def get_result(self) -> 'HistogramResult': # <<<<<<<<<<<<<< + * return HistogramResult(self.get_cumulative()) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1031 + * return HistogramResult(self.get_cumulative()) + * + * def to_proto(self) -> metrics_pb2.HistogramValue: # <<<<<<<<<<<<<< + * return self.histogram.to_runner_api() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_17to_proto(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_17to_proto = {"to_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_17to_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_17to_proto(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1031, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1031, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_proto", 0) < (0)) __PYX_ERR(0, 1031, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_proto", 1, 1, 1, i); __PYX_ERR(0, 1031, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1031, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_proto", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1031, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.to_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_16to_proto(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_16to_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_proto", 0); + + /* "apache_beam/metrics/cells.py":1032 + * + * def to_proto(self) -> metrics_pb2.HistogramValue: + * return self.histogram.to_runner_api() # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histogram); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_runner_api, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1031 + * return HistogramResult(self.get_cumulative()) + * + * def to_proto(self) -> metrics_pb2.HistogramValue: # <<<<<<<<<<<<<< + * return self.histogram.to_runner_api() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.to_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/cells.py":1034 + * return self.histogram.to_runner_api() + * + * @classmethod # <<<<<<<<<<<<<< + * def from_proto(cls, proto: metrics_pb2.HistogramValue): + * return cls(Histogram.from_runner_api(proto)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_19from_proto(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_19from_proto = {"from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_19from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_13HistogramData_19from_proto(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_proto = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_proto (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_proto,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1034, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1034, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1034, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_proto", 0) < (0)) __PYX_ERR(0, 1034, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_proto", 1, 2, 2, i); __PYX_ERR(0, 1034, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1034, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1034, __pyx_L3_error) + } + __pyx_v_cls = values[0]; + __pyx_v_proto = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_proto", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1034, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_18from_proto(__pyx_self, __pyx_v_cls, __pyx_v_proto); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_13HistogramData_18from_proto(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_proto) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_proto", 0); + + /* "apache_beam/metrics/cells.py":1036 + * @classmethod + * def from_proto(cls, proto: metrics_pb2.HistogramValue): + * return cls(Histogram.from_runner_api(proto)) # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_cls); + __pyx_t_3 = __pyx_v_cls; + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Histogram); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_from_runner_api); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_proto}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/cells.py":1034 + * return self.histogram.to_runner_api() + * + * @classmethod # <<<<<<<<<<<<<< + * def from_proto(cls, proto: metrics_pb2.HistogramValue): + * return cls(Histogram.from_runner_api(proto)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.cells.HistogramData.from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DistributionData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_1__pyx_unpickle_DistributionData(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_1__pyx_unpickle_DistributionData = {"__pyx_unpickle_DistributionData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_1__pyx_unpickle_DistributionData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_1__pyx_unpickle_DistributionData(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionData (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DistributionData", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DistributionData", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DistributionData", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_DistributionData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionData", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DistributionData(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') # <<<<<<<<<<<<<< + * __pyx_result = DistributionData.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, __pyx_k_count_max_min_sum); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionData.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionData.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DistributionData.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData__set_state(((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionData.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DistributionData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_DistributionData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_DistributionData__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionData__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->count = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->max = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->min = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->sum = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DistributionData__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DistributionData__set_state(DistributionData __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_DistributionData__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__BoundedTrieNode(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_3__pyx_unpickle__BoundedTrieNode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_3__pyx_unpickle__BoundedTrieNode = {"__pyx_unpickle__BoundedTrieNode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_3__pyx_unpickle__BoundedTrieNode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_3__pyx_unpickle__BoundedTrieNode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__BoundedTrieNode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__BoundedTrieNode", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BoundedTrieNode", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__BoundedTrieNode", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle__BoundedTrieNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_2__pyx_unpickle__BoundedTrieNode(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_2__pyx_unpickle__BoundedTrieNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__BoundedTrieNode", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__BoundedTrieNode(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') # <<<<<<<<<<<<<< + * __pyx_result = _BoundedTrieNode.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, __pyx_k_children__size__truncated); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') + * __pyx_result = _BoundedTrieNode.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') + * __pyx_result = _BoundedTrieNode.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _BoundedTrieNode.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle__BoundedTrieNode__set_state(((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') + * __pyx_result = _BoundedTrieNode.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): + * __pyx_result._children = __pyx_state[0]; __pyx_result._size = __pyx_state[1]; __pyx_result._truncated = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__BoundedTrieNode(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x95cf5eb, 0xea1d3dc, 0x2b3fb5c, b'_children, _size, _truncated') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle__BoundedTrieNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._children = __pyx_state[0]; __pyx_result._size = __pyx_state[1]; __pyx_result._truncated = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle__BoundedTrieNode__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__BoundedTrieNode__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): + * __pyx_result._children = __pyx_state[0]; __pyx_result._size = __pyx_state[1]; __pyx_result._truncated = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_children); + __Pyx_DECREF(__pyx_v___pyx_result->_children); + __pyx_v___pyx_result->_children = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_size = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_truncated = __pyx_t_3; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): + * __pyx_result._children = __pyx_state[0]; __pyx_result._size = __pyx_state[1]; __pyx_result._truncated = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__BoundedTrieNode__set_state(<_BoundedTrieNode> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__BoundedTrieNode__set_state(_BoundedTrieNode __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._children = __pyx_state[0]; __pyx_result._size = __pyx_state[1]; __pyx_result._truncated = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle__BoundedTrieNode__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BoundedTrieData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_5__pyx_unpickle_BoundedTrieData(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_5cells_5__pyx_unpickle_BoundedTrieData = {"__pyx_unpickle_BoundedTrieData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_5__pyx_unpickle_BoundedTrieData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_5cells_5__pyx_unpickle_BoundedTrieData(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_BoundedTrieData (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_BoundedTrieData", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoundedTrieData", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoundedTrieData", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_BoundedTrieData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7metrics_5cells_4__pyx_unpickle_BoundedTrieData(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_5cells_4__pyx_unpickle_BoundedTrieData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BoundedTrieData", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_BoundedTrieData(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') # <<<<<<<<<<<<<< + * __pyx_result = BoundedTrieData.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, __pyx_k_bound__root__singleton); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') + * __pyx_result = BoundedTrieData.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') + * __pyx_result = BoundedTrieData.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = BoundedTrieData.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_BoundedTrieData__set_state(((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') + * __pyx_result = BoundedTrieData.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): + * __pyx_result._bound = __pyx_state[0]; __pyx_result._root = __pyx_state[1]; __pyx_result._singleton = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BoundedTrieData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_BoundedTrieData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bound = __pyx_state[0]; __pyx_result._root = __pyx_state[1]; __pyx_result._singleton = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_7metrics_5cells___pyx_unpickle_BoundedTrieData__set_state(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_BoundedTrieData__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): + * __pyx_result._bound = __pyx_state[0]; __pyx_result._root = __pyx_state[1]; __pyx_result._singleton = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_bound = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_root); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_root); + __pyx_v___pyx_result->_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_singleton); + __Pyx_DECREF(__pyx_v___pyx_result->_singleton); + __pyx_v___pyx_result->_singleton = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): + * __pyx_result._bound = __pyx_state[0]; __pyx_result._root = __pyx_state[1]; __pyx_result._singleton = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_BoundedTrieData__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_BoundedTrieData__set_state(BoundedTrieData __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bound = __pyx_state[0]; __pyx_result._root = __pyx_state[1]; __pyx_result._singleton = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.cells.__pyx_unpickle_BoundedTrieData__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_vtable_11apache_beam_7metrics_5cells_MetricCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + p->_lock = Py_None; Py_INCREF(Py_None); + p->_start_time = ((PyDateTime_DateTime *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_lock); + Py_CLEAR(p->_start_time); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_lock) { + e = (*v)(p->_lock, a); if (e) return e; + } + if (p->_start_time) { + e = (*v)(((PyObject *)p->_start_time), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)o; + tmp = ((PyObject*)p->_lock); + p->_lock = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_start_time); + p->_start_time = ((PyDateTime_DateTime *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_MetricCell[] = { + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_11reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_MetricCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Accumulates in-memory changes to a metric.\n\n A MetricCell represents a specific metric in a single context and bundle.\n All subclasses must be thread safe, as these are used in the pipeline runners,\n and may be subject to parallel/concurrent updates. Cells should only be used\n directly within a runner.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_MetricCell_spec = { + "apache_beam.metrics.cells.MetricCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_MetricCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_MetricCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""MetricCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Accumulates in-memory changes to a metric.\n\n A MetricCell represents a specific metric in a single context and bundle.\n All subclasses must be thread safe, as these are used in the pipeline runners,\n and may be subject to parallel/concurrent updates. Cells should only be used\n directly within a runner.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_MetricCell, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_10MetricCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell __pyx_vtable_11apache_beam_7metrics_5cells_CounterCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_CounterCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + return o; +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_11CounterCell_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_CounterCell[] = { + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"inc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_7inc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"dec", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_9dec, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells_CounterCell[] = { + {"value", __pyx_getprop_11apache_beam_7metrics_5cells_11CounterCell_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_CounterCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta of a counter metric.\n\n Each cell tracks the state of an integer metric independently per context\n per bundle. Therefore, each metric has a different cell in each bundle,\n cells are aggregated by the runner.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_CounterCell}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells_CounterCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_CounterCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_CounterCell_spec = { + "apache_beam.metrics.cells.CounterCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_CounterCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_CounterCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""CounterCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta of a counter metric.\n\n Each cell tracks the state of an integer metric independently per context\n per bundle. Therefore, each metric has a different cell in each bundle,\n cells are aggregated by the runner.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_CounterCell, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells_CounterCell, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_11CounterCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_CounterCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell __pyx_vtable_11apache_beam_7metrics_5cells_DistributionCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; + p->data = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionCell(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionCell) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->data); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell(o); +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells_DistributionCell(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)o; + e = __pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell(o, v, a); if (e) return e; + if (p->data) { + e = (*v)(((PyObject *)p->data), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells_DistributionCell(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *)o; + __pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell(o); + tmp = ((PyObject*)p->data); + p->data = ((struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16DistributionCell_data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_4data_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_DistributionCell[] = { + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells_DistributionCell[] = { + {"data", __pyx_getprop_11apache_beam_7metrics_5cells_16DistributionCell_data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_DistributionCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a distribution metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_DistributionCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_DistributionCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_DistributionCell}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells_DistributionCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_DistributionCell_spec = { + "apache_beam.metrics.cells.DistributionCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_DistributionCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_DistributionCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""DistributionCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a distribution metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_DistributionCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_DistributionCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_DistributionCell, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells_DistributionCell, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_16DistributionCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_DistributionCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_vtable_11apache_beam_7metrics_5cells_AbstractMetricCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_MetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + p->data_class = Py_None; Py_INCREF(Py_None); + p->data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->data_class); + Py_CLEAR(p->data); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_MetricCell(o); +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)o; + e = __pyx_tp_traverse_11apache_beam_7metrics_5cells_MetricCell(o, v, a); if (e) return e; + if (p->data_class) { + e = (*v)(p->data_class, a); if (e) return e; + } + if (p->data) { + e = (*v)(p->data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *)o; + __pyx_tp_clear_11apache_beam_7metrics_5cells_MetricCell(o); + tmp = ((PyObject*)p->data_class); + p->data_class = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->data); + p->data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data_class(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_10data_class_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_4data_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_AbstractMetricCell[] = { + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells_AbstractMetricCell[] = { + {"data_class", __pyx_getprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data_class, 0, 0, 0}, + {"data", __pyx_getprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data, __pyx_setprop_11apache_beam_7metrics_5cells_18AbstractMetricCell_data, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a metric with a data class.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell_spec = { + "apache_beam.metrics.cells.AbstractMetricCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""AbstractMetricCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a metric with a data class.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_18AbstractMetricCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell __pyx_vtable_11apache_beam_7metrics_5cells_GaugeCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_GaugeCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_GaugeCell[] = { + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_GaugeCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a gauge metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_GaugeCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_GaugeCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_GaugeCell_spec = { + "apache_beam.metrics.cells.GaugeCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_GaugeCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_GaugeCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""GaugeCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value and delta for a gauge metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_GaugeCell, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_9GaugeCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_GaugeCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell __pyx_vtable_11apache_beam_7metrics_5cells_StringSetCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_StringSetCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_StringSetCell[] = { + {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_StringSetCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value for a StringSet metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_StringSetCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_StringSetCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_StringSetCell_spec = { + "apache_beam.metrics.cells.StringSetCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_StringSetCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_StringSetCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""StringSetCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value for a StringSet metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_StringSetCell, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_13StringSetCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_StringSetCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell __pyx_vtable_11apache_beam_7metrics_5cells_BoundedTrieCell; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieCell(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *p; + PyObject *o = __pyx_tp_new_11apache_beam_7metrics_5cells_AbstractMetricCell(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieCell[] = { + {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_info_impl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value for a BoundedTrie metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieCell}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieCell}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell_spec = { + "apache_beam.metrics.cells.BoundedTrieCell", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""BoundedTrieCell", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Tracks the current value for a BoundedTrie metric.\n\n Each cell tracks the state of a metric independently per context per bundle.\n Therefore, each metric has a different cell in each bundle, that is later\n aggregated.\n\n This class is thread safe.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_AbstractMetricCell, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieCell, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieCell_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieCell, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionData(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionData(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionData) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_7metrics_5cells_DistributionData(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_sum(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3sum_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5count_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_min(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3min_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_max(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_3max_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_DistributionData[] = { + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_11get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_13combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_15singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"identity_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_17identity_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells_DistributionData[] = { + {"sum", __pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_sum, 0, 0, 0}, + {"count", __pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_count, 0, 0, 0}, + {"min", __pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_min, 0, 0, 0}, + {"max", __pyx_getprop_11apache_beam_7metrics_5cells_16DistributionData_max, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_DistributionData_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionData}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_7__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n The data structure that holds data about a distribution metric.\n\n Distribution metrics are restricted to distributions of integers only.\n\n This object is not thread safe, so it's not supposed to be modified\n by other than the DistributionCell that contains it.\n ")}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_7metrics_5cells_DistributionData}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_DistributionData}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells_DistributionData}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_DistributionData}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_DistributionData_spec = { + "apache_beam.metrics.cells.DistributionData", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_7metrics_5cells_DistributionData_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_DistributionData = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""DistributionData", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_DistributionData, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_7__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_5__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n The data structure that holds data about a distribution metric.\n\n Distribution metrics are restricted to distributions of integers only.\n\n This object is not thread safe, so it's not supposed to be modified\n by other than the DistributionCell that contains it.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_7metrics_5cells_DistributionData, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_DistributionData, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells_DistributionData, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_16DistributionData_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_DistributionData, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells__BoundedTrieNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)o); + p->_children = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells__BoundedTrieNode(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *p = (struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells__BoundedTrieNode) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_children); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells__BoundedTrieNode(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *p = (struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_children) { + e = (*v)(p->_children, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells__BoundedTrieNode(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *p = (struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)o; + tmp = ((PyObject*)p->_children); + p->_children = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_7metrics_5cells__BoundedTrieNode(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_24__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_24__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5_size_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__children(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9_children_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__truncated(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_10_truncated_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells__BoundedTrieNode[] = { + {"to_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"add_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"trim", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"flattened", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells__BoundedTrieNode[] = { + {"_size", __pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__size, 0, 0, 0}, + {"_children", __pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__children, 0, 0, 0}, + {"_truncated", __pyx_getprop_11apache_beam_7metrics_5cells_16_BoundedTrieNode__truncated, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_26__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_22__hash__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells__BoundedTrieNode}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode_spec = { + "apache_beam.metrics.cells._BoundedTrieNode", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""_BoundedTrieNode", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_26__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_22__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_16_BoundedTrieNode_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells__BoundedTrieNode, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieData(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)o); + p->_singleton = Py_None; Py_INCREF(Py_None); + p->_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells_BoundedTrieData(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells_BoundedTrieData) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_singleton); + Py_CLEAR(p->_root); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells_BoundedTrieData(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_singleton) { + e = (*v)(p->_singleton, a); if (e) return e; + } + if (p->_root) { + e = (*v)(((PyObject *)p->_root), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells_BoundedTrieData(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *p = (struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData *)o; + tmp = ((PyObject*)p->_singleton); + p->_singleton = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_root); + p->_root = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_7metrics_5cells_BoundedTrieData(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_15__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_15__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__bound(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_6_bound_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__singleton(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_10_singleton_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__root(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5_root_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieData[] = { + {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_3size, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"flattened", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"from_proto", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"as_trie", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_25add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"identity_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_5cells_BoundedTrieData[] = { + {"_bound", __pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__bound, 0, 0, 0}, + {"_singleton", __pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__singleton, 0, 0, 0}, + {"_root", __pyx_getprop_11apache_beam_7metrics_5cells_15BoundedTrieData__root, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_19__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_17__hash__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_5cells_BoundedTrieData}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieData}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData_spec = { + "apache_beam.metrics.cells.BoundedTrieData", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""BoundedTrieData", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_19__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_17__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_5cells_15BoundedTrieData_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells_BoundedTrieData, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_child); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_child) { + e = (*v)(p->__pyx_v_child, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct__genexpr", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct__genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct_1_add_all", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct_1_add_all", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_segments); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_segments) { + e = (*v)(p->__pyx_v_segments, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct_2_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct_2_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_child); + Py_CLEAR(p->__pyx_v_flattened); + Py_CLEAR(p->__pyx_v_prefix); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_2); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_child) { + e = (*v)(p->__pyx_v_child, a); if (e) return e; + } + if (p->__pyx_v_flattened) { + e = (*v)(p->__pyx_v_flattened, a); if (e) return e; + } + if (p->__pyx_v_prefix) { + e = (*v)(p->__pyx_v_prefix, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + if (p->__pyx_t_2) { + e = (*v)(p->__pyx_t_2, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct_3_flattened", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct_3_flattened", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_genexpr); + Py_CLEAR(p->__pyx_v_t); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_genexpr) { + e = (*v)(p->__pyx_v_genexpr, a); if (e) return e; + } + if (p->__pyx_v_t) { + e = (*v)(p->__pyx_v_t, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct_4_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct_4_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_s); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_s) { + e = (*v)(p->__pyx_v_s, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr_spec = { + "apache_beam.metrics.cells.__pyx_scope_struct_5_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.cells.""__pyx_scope_struct_5_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = &__pyx_vtable_11apache_beam_7metrics_5cells_MetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_MetricCell.update = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7metrics_5cells_10MetricCell_update; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_MetricCell_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(0, 55, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_MetricCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = &__pyx_type_11apache_beam_7metrics_5cells_MetricCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MetricCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = &__pyx_vtable_11apache_beam_7metrics_5cells_CounterCell; + __pyx_vtable_11apache_beam_7metrics_5cells_CounterCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_CounterCell.__pyx_base.update = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7metrics_5cells_11CounterCell_update; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_CounterCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(0, 99, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_CounterCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = &__pyx_type_11apache_beam_7metrics_5cells_CounterCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CounterCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = &__pyx_vtable_11apache_beam_7metrics_5cells_DistributionCell; + __pyx_vtable_11apache_beam_7metrics_5cells_DistributionCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_DistributionCell.__pyx_base.update = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7metrics_5cells_16DistributionCell_update; + __pyx_vtable_11apache_beam_7metrics_5cells_DistributionCell._update = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *))__pyx_f_11apache_beam_7metrics_5cells_16DistributionCell__update; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_DistributionCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(0, 164, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_DistributionCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = &__pyx_type_11apache_beam_7metrics_5cells_DistributionCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DistributionCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell = &__pyx_vtable_11apache_beam_7metrics_5cells_AbstractMetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_AbstractMetricCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_AbstractMetricCell.__pyx_base.update = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell_update; + __pyx_vtable_11apache_beam_7metrics_5cells_AbstractMetricCell._update_locked = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *))__pyx_f_11apache_beam_7metrics_5cells_18AbstractMetricCell__update_locked; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell)) __PYX_ERR(0, 223, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = &__pyx_type_11apache_beam_7metrics_5cells_AbstractMetricCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = &__pyx_vtable_11apache_beam_7metrics_5cells_GaugeCell; + __pyx_vtable_11apache_beam_7metrics_5cells_GaugeCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_GaugeCell.__pyx_base._update_locked = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *))__pyx_f_11apache_beam_7metrics_5cells_9GaugeCell__update_locked; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_GaugeCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(0, 262, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_GaugeCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = &__pyx_type_11apache_beam_7metrics_5cells_GaugeCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_GaugeCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell = &__pyx_vtable_11apache_beam_7metrics_5cells_StringSetCell; + __pyx_vtable_11apache_beam_7metrics_5cells_StringSetCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_StringSetCell.__pyx_base._update_locked = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *))__pyx_f_11apache_beam_7metrics_5cells_13StringSetCell__update_locked; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_StringSetCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell)) __PYX_ERR(0, 291, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_StringSetCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = &__pyx_type_11apache_beam_7metrics_5cells_StringSetCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StringSetCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell = &__pyx_vtable_11apache_beam_7metrics_5cells_BoundedTrieCell; + __pyx_vtable_11apache_beam_7metrics_5cells_BoundedTrieCell.__pyx_base = *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + __pyx_vtable_11apache_beam_7metrics_5cells_BoundedTrieCell.__pyx_base._update_locked = (int (*)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *))__pyx_f_11apache_beam_7metrics_5cells_15BoundedTrieCell__update_locked; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell)) __PYX_ERR(0, 320, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = &__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieCell; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell, __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BoundedTrieCell, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_DistributionData_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData)) __PYX_ERR(0, 496, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_DistributionData_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) < (0)) __PYX_ERR(0, 496, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = &__pyx_type_11apache_beam_7metrics_5cells_DistributionData; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) < (0)) __PYX_ERR(0, 496, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DistributionData, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) < (0)) __PYX_ERR(0, 496, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) < (0)) __PYX_ERR(0, 496, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode)) __PYX_ERR(0, 669, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) < (0)) __PYX_ERR(0, 669, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = &__pyx_type_11apache_beam_7metrics_5cells__BoundedTrieNode; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) < (0)) __PYX_ERR(0, 669, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_2, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) < (0)) __PYX_ERR(0, 669, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) < (0)) __PYX_ERR(0, 669, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData)) __PYX_ERR(0, 790, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) < (0)) __PYX_ERR(0, 790, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = &__pyx_type_11apache_beam_7metrics_5cells_BoundedTrieData; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) < (0)) __PYX_ERR(0, 790, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_2, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) < (0)) __PYX_ERR(0, 790, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) < (0)) __PYX_ERR(0, 790, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr)) __PYX_ERR(0, 695, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 695, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 695, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct__genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all)) __PYX_ERR(0, 723, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all) < (0)) __PYX_ERR(0, 723, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all) < (0)) __PYX_ERR(0, 723, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_1_add_all->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 724, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 724, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 724, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_2_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened)) __PYX_ERR(0, 765, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened) < (0)) __PYX_ERR(0, 765, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened) < (0)) __PYX_ERR(0, 765, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_3_flattened->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 787, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 787, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_4_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 787, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 787, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr = &__pyx_type_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 787, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells___pyx_scope_struct_5_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #else + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #else + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #else + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #else + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #else + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cells(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cells}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cells", + __pyx_k_This_file_contains_metric_cell, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cells(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cells(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cells(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cells' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cells" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_cells", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__metrics__cells) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.metrics.cells")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.metrics.cells", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/metrics/cells.py":26 + * # pytype: skip-file + * + * import copy # <<<<<<<<<<<<<< + * import logging + * import threading +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_copy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":27 + * + * import copy + * import logging # <<<<<<<<<<<<<< + * import threading + * import time +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":28 + * import copy + * import logging + * import threading # <<<<<<<<<<<<<< + * import time + * from datetime import datetime +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":29 + * import logging + * import threading + * import time # <<<<<<<<<<<<<< + * from datetime import datetime + * from datetime import timezone +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":30 + * import threading + * import time + * from datetime import datetime # <<<<<<<<<<<<<< + * from datetime import timezone + * from typing import Iterable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_datetime}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":31 + * import time + * from datetime import datetime + * from datetime import timezone # <<<<<<<<<<<<<< + * from typing import Iterable + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_timezone}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_timezone}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":32 + * from datetime import datetime + * from datetime import timezone + * from typing import Iterable # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Set +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":33 + * from datetime import timezone + * from typing import Iterable + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Set + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":34 + * from typing import Iterable + * from typing import Optional + * from typing import Set # <<<<<<<<<<<<<< + * + * from apache_beam.portability.api import metrics_pb2 +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Set}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Set}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":36 + * from typing import Set + * + * from apache_beam.portability.api import metrics_pb2 # <<<<<<<<<<<<<< + * from apache_beam.utils.histogram import Histogram + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_portability_api, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":37 + * + * from apache_beam.portability.api import metrics_pb2 + * from apache_beam.utils.histogram import Histogram # <<<<<<<<<<<<<< + * + * try: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Histogram}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_histogram, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Histogram}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":39 + * from apache_beam.utils.histogram import Histogram + * + * try: # <<<<<<<<<<<<<< + * import cython + * except ImportError: +*/ + { + (void)__pyx_t_1; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */ + /*try:*/ { + + /* "apache_beam/metrics/cells.py":40 + * + * try: + * import cython # <<<<<<<<<<<<<< + * except ImportError: + * +*/ + } + } + + /* "apache_beam/metrics/cells.py":48 + * globals()['cython'] = fake_cython + * + * __all__ = [ # <<<<<<<<<<<<<< + * 'MetricCell', 'MetricCellFactory', 'DistributionResult', 'GaugeResult' + * ] +*/ + __pyx_t_2 = __Pyx_PyList_Pack(4, __pyx_mstate_global->__pyx_n_u_MetricCell, __pyx_mstate_global->__pyx_n_u_MetricCellFactory, __pyx_mstate_global->__pyx_n_u_DistributionResult, __pyx_mstate_global->__pyx_n_u_GaugeResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":52 + * ] + * + * _LOGGER = logging.getLogger(__name__) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LOGGER, __pyx_t_2) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":69 + * self._start_time = None + * + * def update(self, value): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":72 + * raise NotImplementedError + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_5get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_2) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":75 + * raise NotImplementedError + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * if not self._start_time: + * self._start_time = datetime.now(timezone.utc) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_7to_runner_api_monitoring_info, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell_to_runner_api_monitor, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info, __pyx_t_2) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":82 + * return mi + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_9to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell_to_runner_api_monitor_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_2) < (0)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":85 + * raise NotImplementedError + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * raise NotImplementedError +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_11reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":89 + * raise NotImplementedError + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_10MetricCell_13__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricCell___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":93 + * + * + * class MetricCellFactory(object): # <<<<<<<<<<<<<< + * def __call__(self): + * # type: () -> MetricCell +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[5]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MetricCellFactory, __pyx_mstate_global->__pyx_n_u_MetricCellFactory, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[5]) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[5]) < 0))) __PYX_ERR(0, 93, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":94 + * + * class MetricCellFactory(object): + * def __call__(self): # <<<<<<<<<<<<<< + * # type: () -> MetricCell + * raise NotImplementedError +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_17MetricCellFactory_1__call__, 0, __pyx_mstate_global->__pyx_n_u_MetricCellFactory___call, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":93 + * + * + * class MetricCellFactory(object): # <<<<<<<<<<<<<< + * def __call__(self): + * # type: () -> MetricCell +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MetricCellFactory, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricCellFactory, __pyx_t_4) < (0)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":114 + * self.value = 0 + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.value = 0 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":118 + * self.value = 0 + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (CounterCell) -> CounterCell + * result = CounterCell() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_5combine, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_2) < (0)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":124 + * return result + * + * def inc(self, n=1): # <<<<<<<<<<<<<< + * self.update(n) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_7inc, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_inc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[6]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_inc, __pyx_t_2) < (0)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":127 + * self.update(n) + * + * def dec(self, n=1): # <<<<<<<<<<<<<< + * self.update(-n) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_9dec, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_dec, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[6]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_dec, __pyx_t_2) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":130 + * self.update(-n) + * + * def update(self, value): # <<<<<<<<<<<<<< + * # type: (int) -> None + * if cython.compiled: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_11update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":144 + * self.value += value + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> int + * with self._lock: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_13get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_2) < (0)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":149 + * return self.value + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * if not name.urn: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11CounterCell_15to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CounterCell_to_runner_api_monito, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_2) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":179 + * self.data = DistributionData.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.data = DistributionData.identity_element() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionCell_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":183 + * self.data = DistributionData.identity_element() + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (DistributionCell) -> DistributionCell + * result = DistributionCell() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_5combine, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionCell_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_2) < (0)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":189 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * if cython.compiled: + * # We will hold the GIL throughout the entire _update. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_7update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionCell_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":209 + * self.data.max = ivalue + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * with self._lock: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_9get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionCell_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_2) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":214 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_distribution( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionCell_11to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionCell_to_runner_api_m, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_2) < (0)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":235 + * self.data = self.data_class.identity_element() + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = self.data_class.identity_element() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":238 + * self.data = self.data_class.identity_element() + * + * def combine(self, other: 'AbstractMetricCell') -> 'AbstractMetricCell': # <<<<<<<<<<<<<< + * result = type(self)() # type: ignore[call-arg] + * result.data = self.data.combine(other.data) +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_AbstractMetricCell_2) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_AbstractMetricCell_2) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_5combine, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_8) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":243 + * return result + * + * def set(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_7set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_set, __pyx_t_8) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":247 + * self._update_locked(value) + * + * def update(self, value): # <<<<<<<<<<<<<< + * with self._lock: + * self._update_locked(value) +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_9update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_8) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":254 + * raise NotImplementedError(type(self)) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * with self._lock: + * return self.data.get_cumulative() +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_11get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_get_cumulativ, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_8) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":258 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * raise NotImplementedError(type(self)) + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18AbstractMetricCell_13to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AbstractMetricCell_to_runner_api, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_8) < (0)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":282 + * self.data.timestamp = time.time() + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.int64_user_gauge( +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeCell_3to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GaugeCell_to_runner_api_monitori, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_8) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":305 + * super().__init__(StringSetData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetCell_3add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringSetCell_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_8) < (0)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":311 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_set_string( +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetCell_5to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StringSetCell_to_runner_api_moni, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_8) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":334 + * super().__init__(BoundedTrieData) + * + * def add(self, value): # <<<<<<<<<<<<<< + * self.update(value) + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieCell_3add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieCell_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_8) < (0)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":340 + * self.data.add(value) + * + * def to_runner_api_monitoring_info_impl(self, name, transform_id): # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * return monitoring_infos.user_bounded_trie( +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieCell_5to_runner_api_monitoring_info_impl, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieCell_to_runner_api_mo, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_t_8) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":349 + * + * + * class DistributionResult(object): # <<<<<<<<<<<<<< + * """The result of a Distribution metric.""" + * def __init__(self, data): +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[8]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_DistributionResult, __pyx_mstate_global->__pyx_n_u_DistributionResult, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_kp_u_The_result_of_a_Distribution_met); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[8]) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[8]) < 0))) __PYX_ERR(0, 349, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":351 + * class DistributionResult(object): + * """The result of a Distribution metric.""" + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (DistributionData) -> None + * self.data = data +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_1__init__, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":355 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, DistributionResult): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":362 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_4) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":366 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ( +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_4) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":372 + * 'mean={})'.format(self.sum, self.count, self.min, self.max, self.mean)) + * + * @property # <<<<<<<<<<<<<< + * def max(self): + * # type: () -> Optional[int] +*/ + __pyx_t_10 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_9max, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult_max, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_max, __pyx_t_4) < (0)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":377 + * return self.data.max if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def min(self): + * # type: () -> Optional[int] +*/ + __pyx_t_11 = NULL; + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_11min, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult_min, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_min, __pyx_t_4) < (0)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":382 + * return self.data.min if self.data.count else None + * + * @property # <<<<<<<<<<<<<< + * def count(self): + * # type: () -> Optional[int] +*/ + __pyx_t_10 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_13count, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult_count, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":387 + * return self.data.count + * + * @property # <<<<<<<<<<<<<< + * def sum(self): + * # type: () -> Optional[int] +*/ + __pyx_t_11 = NULL; + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_15sum, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult_sum, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sum, __pyx_t_4) < (0)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":392 + * return self.data.sum + * + * @property # <<<<<<<<<<<<<< + * def mean(self): + * # type: () -> Optional[float] +*/ + __pyx_t_10 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_18DistributionResult_17mean, 0, __pyx_mstate_global->__pyx_n_u_DistributionResult_mean, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_mean, __pyx_t_4) < (0)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":349 + * + * + * class DistributionResult(object): # <<<<<<<<<<<<<< + * """The result of a Distribution metric.""" + * def __init__(self, data): +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DistributionResult, __pyx_t_8, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DistributionResult, __pyx_t_4) < (0)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":405 + * + * + * class GaugeResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data): + * # type: (GaugeData) -> None +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[10]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_GaugeResult, __pyx_mstate_global->__pyx_n_u_GaugeResult, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[10]) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[10]) < 0))) __PYX_ERR(0, 405, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":406 + * + * class GaugeResult(object): + * def __init__(self, data): # <<<<<<<<<<<<<< + * # type: (GaugeData) -> None + * self.data = data +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_1__init__, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":410 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeResult): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":417 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash(self.data) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_4) < (0)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":421 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.value, self.timestamp) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_4) < (0)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":425 + * self.value, self.timestamp) + * + * @property # <<<<<<<<<<<<<< + * def value(self): + * # type: () -> Optional[int] +*/ + __pyx_t_11 = NULL; + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_9value, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult_value, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_4) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":430 + * return self.data.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * # type: () -> Optional[int] +*/ + __pyx_t_10 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_11GaugeResult_11timestamp, 0, __pyx_mstate_global->__pyx_n_u_GaugeResult_timestamp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_4) < (0)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":405 + * + * + * class GaugeResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data): + * # type: (GaugeData) -> None +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GaugeResult, __pyx_t_8, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GaugeResult, __pyx_t_4) < (0)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":436 + * + * + * class GaugeData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[12]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_GaugeData, __pyx_mstate_global->__pyx_n_u_GaugeData, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[12]) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[12]) < 0))) __PYX_ERR(0, 436, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":446 + * by other than the GaugeCell that contains it. + * """ + * def __init__(self, value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> None + * self.value = value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_1__init__, 0, __pyx_mstate_global->__pyx_n_u_GaugeData___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[13]); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":451 + * self.timestamp = timestamp if timestamp is not None else 0 + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * # type: (object) -> bool + * if isinstance(other, GaugeData): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_GaugeData___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":458 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # type: () -> int + * return hash((self.value, self.timestamp)) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_GaugeData___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_4) < (0)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":462 + * return hash((self.value, self.timestamp)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * # type: () -> str + * return ''.format( +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_GaugeData___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_4) < (0)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":467 + * self.value, self.timestamp) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeData + * return GaugeData(self.value, timestamp=self.timestamp) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_9get_cumulative, 0, __pyx_mstate_global->__pyx_n_u_GaugeData_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_4) < (0)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":471 + * return GaugeData(self.value, timestamp=self.timestamp) + * + * def get_result(self): # <<<<<<<<<<<<<< + * # type: () -> GaugeResult + * return GaugeResult(self.get_cumulative()) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_11get_result, 0, __pyx_mstate_global->__pyx_n_u_GaugeData_get_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_4) < (0)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":475 + * return GaugeResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[GaugeData]) -> GaugeData + * if other is None: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_13combine, 0, __pyx_mstate_global->__pyx_n_u_GaugeData_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_4) < (0)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":485 + * return self + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value, timestamp=None): + * # type: (Optional[int], Optional[int]) -> GaugeData +*/ + __pyx_t_11 = NULL; + + /* "apache_beam/metrics/cells.py":486 + * + * @staticmethod + * def singleton(value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> GaugeData + * return GaugeData(value, timestamp=timestamp) +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_15singleton, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_GaugeData_singleton, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_mstate_global->__pyx_tuple[13]); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":490 + * return GaugeData(value, timestamp=timestamp) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> GaugeData +*/ + __pyx_t_10 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_9GaugeData_17identity_element, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_GaugeData_identity_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_4) < (0)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":436 + * + * + * class GaugeData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GaugeData, __pyx_t_8, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GaugeData, __pyx_t_4) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":537 + * self.sum, self.count, self.min, self.max) + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> DistributionData + * return DistributionData(self.sum, self.count, self.min, self.max) +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_9get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_8) < (0)) __PYX_ERR(0, 537, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":541 + * return DistributionData(self.sum, self.count, self.min, self.max) + * + * def get_result(self) -> DistributionResult: # <<<<<<<<<<<<<< + * return DistributionResult(self.get_cumulative()) + * +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_DistributionResult) < (0)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_11get_result, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData_get_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_2) < (0)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":544 + * return DistributionResult(self.get_cumulative()) + * + * def combine(self, other): # <<<<<<<<<<<<<< + * # type: (Optional[DistributionData]) -> DistributionData + * if other is None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_13combine, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_2) < (0)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":555 + * self.max if self.max > other.max else other.max) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value): + * # type: (int) -> DistributionData +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_15singleton, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData_singleton, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_2) < (0)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_singleton); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_2) < (0)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":560 + * return DistributionData(value, 1, value, value) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(): + * # type: () -> DistributionData +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_17identity_element, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData_identity_elemen, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_2) < (0)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = NULL; + __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_identity_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_2) < (0)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionData, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionData__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16DistributionData_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionData___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":566 + * + * + * class StringSetData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[15]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_StringSetData, __pyx_mstate_global->__pyx_n_u_StringSetData, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[15]) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[15]) < 0))) __PYX_ERR(0, 566, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":580 + * """ + * + * _STRING_SET_SIZE_LIMIT = 1_000_000 # <<<<<<<<<<<<<< + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): +*/ + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_STRING_SET_SIZE_LIMIT, __pyx_mstate_global->__pyx_int_1000000) < (0)) __PYX_ERR(0, 580, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":582 + * _STRING_SET_SIZE_LIMIT = 1_000_000 + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): # <<<<<<<<<<<<<< + * self.string_set = string_set or set() + * if not string_size: +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_string_set, __pyx_mstate_global->__pyx_kp_u_Optional_Set) < (0)) __PYX_ERR(0, 582, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_string_size, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_1__init__, 0, __pyx_mstate_global->__pyx_n_u_StringSetData___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[16]); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":590 + * self.string_size = string_size + * + * def __eq__(self, other: object) -> bool: # <<<<<<<<<<<<<< + * if isinstance(other, StringSetData): + * return ( +*/ + __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 590, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_StringSetData___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 590, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":598 + * return False + * + * def __hash__(self) -> int: # <<<<<<<<<<<<<< + * return hash(self.string_set) + * +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_StringSetData___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_11) < (0)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":601 + * return hash(self.string_set) + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * +*/ + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_StringSetData___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_4) < (0)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":604 + * return 'StringSetData{}:{}'.format(self.string_set, self.string_size) + * + * def get_cumulative(self) -> "StringSetData": # <<<<<<<<<<<<<< + * return StringSetData(set(self.string_set), self.string_size) + * +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_StringSetData_3) < (0)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_9get_cumulative, 0, __pyx_mstate_global->__pyx_n_u_StringSetData_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_11) < (0)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":607 + * return StringSetData(set(self.string_set), self.string_size) + * + * def get_result(self) -> Set[str]: # <<<<<<<<<<<<<< + * return set(self.string_set) + * +*/ + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Set_str) < (0)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_11get_result, 0, __pyx_mstate_global->__pyx_n_u_StringSetData_get_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_4) < (0)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":610 + * return set(self.string_set) + * + * def add(self, *strings): # <<<<<<<<<<<<<< + * """ + * Add strings into this StringSetData and return the result StringSetData. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_13add, 0, __pyx_mstate_global->__pyx_n_u_StringSetData_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_4) < (0)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":619 + * return self + * + * def combine(self, other: "StringSetData") -> "StringSetData": # <<<<<<<<<<<<<< + * """ + * Combines this StringSetData with other, both original StringSetData are left +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_StringSetData_3) < (0)) __PYX_ERR(0, 619, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_StringSetData_3) < (0)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_15combine, 0, __pyx_mstate_global->__pyx_n_u_StringSetData_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_11) < (0)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":637 + * return StringSetData(combined, string_size) + * + * @classmethod # <<<<<<<<<<<<<< + * def add_until_capacity( + * cls, combined: set, current_size: int, others: Iterable[str]): +*/ + __pyx_t_11 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_combined, __pyx_mstate_global->__pyx_n_u_set) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_current_size, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_others, __pyx_mstate_global->__pyx_kp_u_Iterable_str) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_17add_until_capacity, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_StringSetData_add_until_capacity, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_add_until_capacity, __pyx_t_11) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":660 + * return current_size + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "StringSetData": + * return StringSetData({value}) +*/ + __pyx_t_4 = NULL; + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 660, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_StringSetData_3) < (0)) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_19singleton, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_StringSetData_singleton, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_11) < (0)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":664 + * return StringSetData({value}) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "StringSetData": + * return StringSetData() +*/ + __pyx_t_12 = NULL; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_StringSetData_3) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13StringSetData_21identity_element, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_StringSetData_identity_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_11) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/cells.py":566 + * + * + * class StringSetData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_StringSetData, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_StringSetData, __pyx_t_11) < (0)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":676 + * self._truncated = False + * + * def to_proto(self) -> metrics_pb2.BoundedTrieNode: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrieNode( + * truncated=self._truncated, +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_BoundedTrieNode) < (0)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_3to_proto, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_to_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_to_proto, __pyx_t_8) < (0)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":684 + * } if self._children else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrieNode) -> '_BoundedTrieNode': + * node = _BoundedTrieNode() +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_proto, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_BoundedTrieNode) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieNode_3) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_5from_proto, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_from_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_2) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_from_proto); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_2) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":698 + * return node + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_7size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_t_2) < (0)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":701 + * return self._size + * + * def contains(self, segments): # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return True +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_9contains, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_contains, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_contains, __pyx_t_2) < (0)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":707 + * return head in self._children and self._children[head].contains(tail) + * + * def add(self, segments) -> int: # <<<<<<<<<<<<<< + * if self._truncated or not segments: + * return 0 +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_11add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_7) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":723 + * return delta + * + * def add_all(self, segments_iter): # <<<<<<<<<<<<<< + * return sum(self.add(segments) for segments in segments_iter) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_13add_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_add_all, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_add_all, __pyx_t_7) < (0)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":726 + * return sum(self.add(segments) for segments in segments_iter) + * + * def trim(self) -> int: # <<<<<<<<<<<<<< + * if not self._children: + * return 0 +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_15trim, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_trim, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_trim, __pyx_t_2) < (0)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":739 + * return delta + * + * def merge(self, other: '_BoundedTrieNode') -> int: # <<<<<<<<<<<<<< + * if self._truncated: + * delta = 0 +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_BoundedTrieNode_3) < (0)) __PYX_ERR(0, 739, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_17merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_7) < (0)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":765 + * return delta + * + * def flattened(self): # <<<<<<<<<<<<<< + * if self._truncated: + * yield (True, ) +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_19flattened, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode_flattened, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_flattened, __pyx_t_7) < (0)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_28__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__BoundedTrieNode, (type(self), 0x95cf5eb, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__BoundedTrieNode__set_state(self, __pyx_state) +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_16_BoundedTrieNode_30__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieNode___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":791 + * + * class BoundedTrieData(object): + * _DEFAULT_BOUND = 100 # <<<<<<<<<<<<<< + * + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): +*/ + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_DEFAULT_BOUND, __pyx_mstate_global->__pyx_int_100) < (0)) __PYX_ERR(0, 791, __pyx_L1_error) + + /* "apache_beam/metrics/cells.py":793 + * _DEFAULT_BOUND = 100 + * + * def __init__(self, *, root=None, singleton=None, bound=_DEFAULT_BOUND): # <<<<<<<<<<<<<< + * self._singleton = singleton + * self._root = root +*/ + __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_DEFAULT_BOUND); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_mstate_global->__pyx_k__3 = __pyx_t_7; + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":799 + * assert singleton is None or root is None + * + * def size(self): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return 1 +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_3size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_size, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_t_7) < (0)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":807 + * return 0 + * + * def contains(self, value): # <<<<<<<<<<<<<< + * if self._singleton is not None: + * return tuple(value) == self._singleton +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_5contains, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_contains, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_contains, __pyx_t_7) < (0)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":815 + * return False + * + * def flattened(self): # <<<<<<<<<<<<<< + * return self.as_trie().flattened() + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_7flattened, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_flattened, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_flattened, __pyx_t_7) < (0)) __PYX_ERR(0, 815, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":818 + * return self.as_trie().flattened() + * + * def to_proto(self) -> metrics_pb2.BoundedTrie: # <<<<<<<<<<<<<< + * return metrics_pb2.BoundedTrie( + * bound=self._bound, +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_BoundedTrie) < (0)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_9to_proto, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_to_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_to_proto, __pyx_t_2) < (0)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":824 + * root=self._root.to_proto() if self._root else None) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData': + * return BoundedTrieData( +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_proto, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_BoundedTrie) < (0)) __PYX_ERR(0, 824, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_11from_proto, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_from_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_7) < (0)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = NULL; + __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_from_proto); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_7) < (0)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":833 + * if proto.HasField('root') else None)) + * + * def as_trie(self): # <<<<<<<<<<<<<< + * if self._root is not None: + * return self._root +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_13as_trie, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_as_trie, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_as_trie, __pyx_t_7) < (0)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":854 + * return 'BoundedTrieData({})'.format(self.as_trie()) + * + * def get_cumulative(self) -> "BoundedTrieData": # <<<<<<<<<<<<<< + * return copy.deepcopy(self) + * +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_21get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_8) < (0)) __PYX_ERR(0, 854, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":857 + * return copy.deepcopy(self) + * + * def get_result(self) -> Set[tuple]: # <<<<<<<<<<<<<< + * if self._root is None: + * if self._singleton is None: +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Set_tuple) < (0)) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_23get_result, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_get_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_7) < (0)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":866 + * return set(self._root.flattened()) + * + * def add(self, segments): # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * self._singleton = segments +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_25add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_7) < (0)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":880 + * self._root.trim() + * + * def combine(self, other: "BoundedTrieData") -> "BoundedTrieData": # <<<<<<<<<<<<<< + * if self._root is None and self._singleton is None: + * return other +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_27combine, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_8) < (0)) __PYX_ERR(0, 880, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":898 + * return BoundedTrieData(root=combined) + * + * @staticmethod # <<<<<<<<<<<<<< + * def singleton(value: str) -> "BoundedTrieData": + * s = BoundedTrieData() +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 898, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_29singleton, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_singleton, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_7) < (0)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_singleton); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_singleton, __pyx_t_7) < (0)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":904 + * return s + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element() -> "BoundedTrieData": + * return BoundedTrieData() +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_BoundedTrieData_3) < (0)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_31identity_element, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData_identity_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_2) < (0)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = NULL; + __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_identity_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_2) < (0)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_BoundedTrieData, (type(self), 0x3083d12, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_BoundedTrieData__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15BoundedTrieData_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BoundedTrieData___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":909 + * + * + * class HistogramCell(MetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_2 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_HistogramCell, __pyx_mstate_global->__pyx_n_u_HistogramCell, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_8 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 909, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":920 + * This class is thread safe since underlying histogram object is thread safe. + * """ + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * self.data = HistogramData.identity_element(bucket_type) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_1__init__, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":924 + * self.data = HistogramData.identity_element(bucket_type) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.data = HistogramData.identity_element(self._bucket_type) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_3reset, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":927 + * self.data = HistogramData.identity_element(self._bucket_type) + * + * def combine(self, other: 'HistogramCell') -> 'HistogramCell': # <<<<<<<<<<<<<< + * result = HistogramCell(self._bucket_type) + * result.data = self.data.combine(other.data) +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_HistogramCell_2) < (0)) __PYX_ERR(0, 927, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramCell_2) < (0)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_5combine, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_10) < (0)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":932 + * return result + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.data.histogram.record(value) + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_7update, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_10) < (0)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":935 + * self.data.histogram.record(value) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return self.data.get_cumulative() + * +*/ + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramData_3) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_9get_cumulative, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_2) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":938 + * return self.data.get_cumulative() + * + * def to_runner_api_monitoring_info(self, name, transform_id): # <<<<<<<<<<<<<< + * # Histogram metric is currently worker-local and internal + * # use only. This method should be implemented when runners +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramCell_11to_runner_api_monitoring_info, 0, __pyx_mstate_global->__pyx_n_u_HistogramCell_to_runner_api_moni, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info, __pyx_t_2) < (0)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/cells.py":909 + * + * + * class HistogramCell(MetricCell): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HistogramCell, __pyx_t_8, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HistogramCell, __pyx_t_2) < (0)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":945 + * + * + * class HistogramCellFactory(MetricCellFactory): # <<<<<<<<<<<<<< + * def __init__(self, bucket_type): + * self._bucket_type = bucket_type +*/ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MetricCellFactory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_8 != __pyx_t_7) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 945, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":946 + * + * class HistogramCellFactory(MetricCellFactory): + * def __init__(self, bucket_type): # <<<<<<<<<<<<<< + * self._bucket_type = bucket_type + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_1__init__, 0, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":949 + * self._bucket_type = bucket_type + * + * def __call__(self): # <<<<<<<<<<<<<< + * return HistogramCell(self._bucket_type) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_3__call__, 0, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory___call, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":952 + * return HistogramCell(self._bucket_type) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, HistogramCellFactory): + * return False +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_5__eq__, 0, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_7) < (0)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":957 + * return self._bucket_type == other._bucket_type + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._bucket_type) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_20HistogramCellFactory_7__hash__, 0, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_7) < (0)) __PYX_ERR(0, 957, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":945 + * + * + * class HistogramCellFactory(MetricCellFactory): # <<<<<<<<<<<<<< + * def __init__(self, bucket_type): + * self._bucket_type = bucket_type +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory, __pyx_t_8, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory, __pyx_t_7) < (0)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":961 + * + * + * class HistogramResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data: 'HistogramData') -> None: + * self.data = data +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[18]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_HistogramResult, __pyx_mstate_global->__pyx_n_u_HistogramResult, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[18]) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[18]) < 0))) __PYX_ERR(0, 961, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":962 + * + * class HistogramResult(object): + * def __init__(self, data: 'HistogramData') -> None: # <<<<<<<<<<<<<< + * self.data = data + * +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_data, __pyx_mstate_global->__pyx_kp_u_HistogramData_3) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_1__init__, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_10) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":965 + * self.data = data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, HistogramResult): + * return self.data == other.data +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_10) < (0)) __PYX_ERR(0, 965, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":971 + * return False + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.data) + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_10) < (0)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":974 + * return hash(self.data) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ''.format( + * self.data.histogram.get_percentile_info()) +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_10) < (0)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":978 + * self.data.histogram.get_percentile_info()) + * + * @property # <<<<<<<<<<<<<< + * def p99(self): + * return self.data.histogram.p99() +*/ + __pyx_t_7 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_9p99, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult_p99, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_p99, __pyx_t_10) < (0)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":982 + * return self.data.histogram.p99() + * + * @property # <<<<<<<<<<<<<< + * def p95(self): + * return self.data.histogram.p95() +*/ + __pyx_t_12 = NULL; + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_11p95, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult_p95, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_p95, __pyx_t_10) < (0)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":986 + * return self.data.histogram.p95() + * + * @property # <<<<<<<<<<<<<< + * def p90(self): + * return self.data.histogram.p90() +*/ + __pyx_t_7 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_13p90, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult_p90, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_p90, __pyx_t_10) < (0)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":990 + * return self.data.histogram.p90() + * + * @property # <<<<<<<<<<<<<< + * def histogram(self): + * return self.data.histogram +*/ + __pyx_t_12 = NULL; + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_15HistogramResult_15histogram, 0, __pyx_mstate_global->__pyx_n_u_HistogramResult_histogram, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_histogram, __pyx_t_10) < (0)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":961 + * + * + * class HistogramResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data: 'HistogramData') -> None: + * self.data = data +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HistogramResult, __pyx_t_8, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HistogramResult, __pyx_t_10) < (0)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":995 + * + * + * class HistogramData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[20]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_HistogramData, __pyx_mstate_global->__pyx_n_u_HistogramData, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[20]) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[20]) < 0))) __PYX_ERR(0, 995, __pyx_L1_error) + } + + /* "apache_beam/metrics/cells.py":1003 + * outside the HistogramCell. + * """ + * def __init__(self, histogram): # <<<<<<<<<<<<<< + * self.histogram = histogram + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_1__init__, 0, __pyx_mstate_global->__pyx_n_u_HistogramData___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_10) < (0)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1006 + * self.histogram = histogram + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.histogram == other.histogram + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_HistogramData___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_10) < (0)) __PYX_ERR(0, 1006, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1009 + * return self.histogram == other.histogram + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.histogram) + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_HistogramData___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_10) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1012 + * return hash(self.histogram) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * +*/ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_HistogramData___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_10) < (0)) __PYX_ERR(0, 1012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1015 + * return 'HistogramData({})'.format(self.histogram.get_percentile_info()) + * + * def get_cumulative(self) -> 'HistogramData': # <<<<<<<<<<<<<< + * return HistogramData(self.histogram) + * +*/ + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramData_3) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_9get_cumulative, 0, __pyx_mstate_global->__pyx_n_u_HistogramData_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_7) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/cells.py":1018 + * return HistogramData(self.histogram) + * + * def combine(self, other: Optional['HistogramData']) -> 'HistogramData': # <<<<<<<<<<<<<< + * if other is None: + * return self +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_other, __pyx_mstate_global->__pyx_kp_u_Optional_HistogramData) < (0)) __PYX_ERR(0, 1018, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramData_3) < (0)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_11combine, 0, __pyx_mstate_global->__pyx_n_u_HistogramData_combine, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_10) < (0)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1024 + * return HistogramData(self.histogram.combine(other.histogram)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def identity_element(bucket_type) -> 'HistogramData': + * return HistogramData(Histogram(bucket_type)) +*/ + __pyx_t_7 = NULL; + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramData_3) < (0)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_13identity_element, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_HistogramData_identity_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_identity_element, __pyx_t_10) < (0)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1028 + * return HistogramData(Histogram(bucket_type)) + * + * def get_result(self) -> 'HistogramResult': # <<<<<<<<<<<<<< + * return HistogramResult(self.get_cumulative()) + * +*/ + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_HistogramResult_3) < (0)) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_15get_result, 0, __pyx_mstate_global->__pyx_n_u_HistogramData_get_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_4) < (0)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/cells.py":1031 + * return HistogramResult(self.get_cumulative()) + * + * def to_proto(self) -> metrics_pb2.HistogramValue: # <<<<<<<<<<<<<< + * return self.histogram.to_runner_api() + * +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_HistogramValue) < (0)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_17to_proto, 0, __pyx_mstate_global->__pyx_n_u_HistogramData_to_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_to_proto, __pyx_t_10) < (0)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":1034 + * return self.histogram.to_runner_api() + * + * @classmethod # <<<<<<<<<<<<<< + * def from_proto(cls, proto: metrics_pb2.HistogramValue): + * return cls(Histogram.from_runner_api(proto)) +*/ + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_proto, __pyx_mstate_global->__pyx_kp_u_metrics_pb2_HistogramValue) < (0)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_13HistogramData_19from_proto, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_HistogramData_from_proto, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_from_proto, __pyx_t_10) < (0)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/metrics/cells.py":995 + * + * + * class HistogramData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HistogramData, __pyx_t_8, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HistogramData, __pyx_t_10) < (0)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DistributionData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_1__pyx_unpickle_DistributionData, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionData, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionData, __pyx_t_8) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_3__pyx_unpickle__BoundedTrieNode, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__BoundedTrieNode, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__BoundedTrieNode, __pyx_t_8) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_BoundedTrieData(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3083d12, 0x2f08b5d, 0xc21add6, b'_bound, _root, _singleton') +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_5cells_5__pyx_unpickle_BoundedTrieData, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoundedTrieData, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_BoundedTrieData, __pyx_t_8) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/metrics/cells.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.metrics.cells", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.metrics.cells"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 729, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/metrics/cells.py":146 + * def get_cumulative(self): + * # type: () -> int + * with self._lock: # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/metrics/cells.py":563 + * def identity_element(): + * # type: () -> DistributionData + * return DistributionData(0, 0, 2**63 - 1, -2**63) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, __pyx_mstate_global->__pyx_int_neg_9223372036854775808); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "apache_beam/metrics/cells.py":767 + * def flattened(self): + * if self._truncated: + * yield (True, ) # <<<<<<<<<<<<<< + * elif not self._children: + * yield (False, ) +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/metrics/cells.py":769 + * yield (True, ) + * elif not self._children: + * yield (False, ) # <<<<<<<<<<<<<< + * else: + * for prefix, child in sorted(self._children.items()): +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + + /* "apache_beam/metrics/cells.py":93 + * + * + * class MetricCellFactory(object): # <<<<<<<<<<<<<< + * def __call__(self): + * # type: () -> MetricCell +*/ + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + + /* "apache_beam/metrics/cells.py":124 + * return result + * + * def inc(self, n=1): # <<<<<<<<<<<<<< + * self.update(n) + * +*/ + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + + /* "apache_beam/metrics/cells.py":349 + * + * + * class DistributionResult(object): # <<<<<<<<<<<<<< + * """The result of a Distribution metric.""" + * def __init__(self, data): +*/ + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); + + /* "apache_beam/metrics/cells.py":405 + * + * + * class GaugeResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data): + * # type: (GaugeData) -> None +*/ + __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]); + __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]); + + /* "apache_beam/metrics/cells.py":436 + * + * + * class GaugeData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]); + __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]); + + /* "apache_beam/metrics/cells.py":446 + * by other than the GaugeCell that contains it. + * """ + * def __init__(self, value, timestamp=None): # <<<<<<<<<<<<<< + * # type: (Optional[int], Optional[int]) -> None + * self.value = value +*/ + __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]); + + /* "apache_beam/metrics/cells.py":566 + * + * + * class StringSetData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]); + __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]); + + /* "apache_beam/metrics/cells.py":582 + * _STRING_SET_SIZE_LIMIT = 1_000_000 + * + * def __init__(self, string_set: Optional[Set] = None, string_size: int = 0): # <<<<<<<<<<<<<< + * self.string_set = string_set or set() + * if not string_size: +*/ + __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(2, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]); + + /* "apache_beam/metrics/cells.py":961 + * + * + * class HistogramResult(object): # <<<<<<<<<<<<<< + * def __init__(self, data: 'HistogramData') -> None: + * self.data = data +*/ + __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]); + __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]); + + /* "apache_beam/metrics/cells.py":995 + * + * + * class HistogramData(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_mstate_global->__pyx_tuple[19] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[19])) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[19]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[19]); + __pyx_mstate_global->__pyx_tuple[20] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[20])) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[20]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[20]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<21; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 9; } index[] = {{1},{20},{19},{17},{18},{50},{61},{293},{433},{375},{228},{35},{37},{15},{17},{15},{21},{17},{13},{179},{25},{13},{8},{10},{18},{15},{121},{36},{0},{1},{8},{28},{7},{6},{2},{9},{23},{27},{26},{14},{18},{26},{33},{24},{22},{53},{25},{11},{15},{19},{50},{15},{33},{35},{19},{23},{23},{24},{25},{26},{30},{26},{32},{25},{20},{24},{15},{16},{34},{36},{20},{24},{25},{26},{27},{22},{21},{25},{21},{11},{19},{15},{26},{15},{17},{46},{18},{14},{16},{24},{31},{22},{51},{23},{16},{34},{36},{24},{31},{27},{33},{26},{18},{25},{27},{27},{27},{24},{22},{23},{22},{22},{12},{9},{44},{9},{16},{18},{18},{18},{17},{24},{20},{26},{19},{11},{18},{20},{20},{20},{21},{17},{8},{9},{13},{20},{29},{27},{29},{29},{22},{21},{28},{19},{43},{20},{13},{20},{22},{22},{22},{21},{24},{28},{24},{30},{22},{15},{22},{24},{24},{24},{25},{19},{19},{19},{8},{7},{4},{10},{17},{26},{21},{25},{16},{40},{45},{17},{4},{8},{20},{22},{3},{13},{17},{48},{13},{20},{22},{22},{22},{17},{32},{21},{28},{24},{30},{23},{3},{7},{24},{18},{7},{19},{25},{27},{27},{7},{18},{4},{5},{11},{12},{8},{5},{8},{9},{18},{5},{3},{7},{8},{8},{4},{5},{12},{4},{10},{8},{3},{8},{5},{8},{5},{7},{9},{6},{8},{9},{6},{10},{27},{15},{8},{7},{3},{9},{14},{19},{10},{12},{8},{4},{9},{16},{3},{8},{3},{13},{18},{23},{16},{13},{5},{3},{6},{8},{7},{8},{3},{9},{4},{5},{13},{11},{2},{3},{10},{16},{15},{1},{4},{8},{9},{7},{4},{4},{3},{6},{5},{11},{6},{3},{3},{3},{3},{6},{11},{8},{5},{10},{14},{12},{11},{10},{30},{31},{31},{14},{12},{6},{10},{17},{13},{8},{25},{42},{5},{6},{6},{4},{1},{8},{13},{4},{10},{4},{3},{12},{10},{12},{19},{9},{5},{4},{10},{5},{12},{3},{6},{10},{11},{7},{3},{5},{1},{4},{8},{9},{5},{4},{9},{8},{8},{13},{29},{34},{12},{4},{22},{9},{10},{6},{6},{3},{12},{17},{15},{3},{5},{6},{7},{9},{21},{178},{2},{20},{26},{20},{2},{15},{13},{9},{18},{182},{21},{16},{21},{11},{41},{64},{15},{18},{9},{13},{16},{13},{17},{13},{11},{21},{15},{15},{16},{60},{90},{17},{19},{18},{41},{43},{43},{43},{27},{43},{81},{95},{24},{16},{16},{13},{9},{100},{14},{18},{18},{32},{121},{50},{19},{16},{11},{105},{103},{115},{15},{12},{12},{10},{2},{7},{7},{9},{9},{16},{16},{24},{16},{59},{24},{15},{18},{31},{11},{33},{21},{52},{2},{57},{58},{2},{14},{16},{41},{11},{16},{15},{18},{28},{93},{58},{39},{64},{55},{116},{33},{32},{54},{43},{55},{6},{84},{39},{23},{43},{31},{31}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (4308 bytes) */ +const char* const cstring = "(\265/\375`\240+U\206\000\372\211\304\034H\320\322\266\r\000_\\\245_\203)\374\241#\254\007\0360'\346\225\376\325\257\364\211\rw\234\307\240\225\375^i\003\301o\331\244\264\231\031\241\007\327Y\341\221Q\355\216wf\201\376\214\303u\024\351\356l`1\201'\206\317&\277\010\225\001\216\001\325\001T\004Fi\315\245\203\240\301|\215\232e\264\016_}\262\327\307V\024GA\312\341\323\351\006\020\314\r \031\357\201\241\226!\003\206G\301\024\250\317\036\245\371\236\212O\363d3\005\337j\341\215i.\033\r\214i\355\325\260\225\277\225\037\277tx\251\240bF\305\353V\265wG\307d\364\275\221\001\343\275\026\305\257mN\037N\247\020\340Gu\376\257\352\017$\276\2539\346a\3559[\263\2263\365\270\356\365\370\365\242\324syW\246;\377\030\365^K\377<~P\213y\332>\370\335k\2523\247\355pt\346\243\370u5\325\336wZg\251\366\241G{4\214C.\343\356A\360\342N\333\377\336\373\332u\024\207#Ph\333s?o)\247\341\353\322v\364\313\276\247y\036\245_\326\\7\353\317y\331\034T\266\225j\373\026\377\216\276Z\254\325}u\325\356\266\362\005\3010\237t\326\\\336E\263\326\321\307\372ZMsO\243U3\376\327\325Z\367:?\246Z\256\371\264\177\205\364\245QM\207\267Es\347\335\035M\323\035\255=\0165\027jT\323N\373\035\226\246\221H\250\374\024\323\360\245\305t\365j\253j\n~\227\253\220;L}x8\332\322\256\325bb\236\275\332\347P\363\250\305\257m\325\360\245\261\364\265\027\346\307\221\360Cm\3754\247\271\334\000\002\361\205\331\336\252\303V\256\252\323w\367f\236N\022n\000\265PMU_1\253\373\316\206w\304\311\363^\206\253X?\n\315Q\254s+uB\005\365\355\255\341s\347\364*\325a\356\376\343\252\236\032{!u}g?\273\274\317\370u\235\366\277\327\347\254\357\305\026\207\372=\032\302t\317{<\\\005m\030f\036\356c\331R\254\301\230\276\217)8\347Ou=\006\301\013f\237{\255\376\361\371\374Qk\355\317\213\303\356~\365\243\372\177\276\351\205\240]\353\243\336\207\354}\213z\261\347\311\337\353:s\235\035\376\034r\363e\203\256\265\243\2773\3779\374 \376\327\353\236\260\241\246\037\276\256\037\330O\356v\335\234\340\177\307}\327\315n\306\300.{\334\347\353q?=n\332\307\235Ww\2709\365\363pa\253""\345\335\333\312:\274\370V\316\3062\315!\212j|A\024jN\014\376\274\r\221\257\367\0015\275\252m8\365\347\260lP\330\234\2303/lr&k&g\326\334\330\340\260r\246\353q\364\317\337L\315U\325OL\305[\036\356\236\300\231\251\251Iqbz\320p\301\0038\271\030Gi:\357+M\246$\376b\232j\351c\360q\335\231\023\366\252\033\235\024#&\353\204N\212fF5m\345\276\303\257e\276\212_\370?\317\243\263\206\275\372\275<\353\325\027\203\363\273\270{\373\332\245g\236\223\233\317\205\335\3439Q\250\327\264\003C\360\253\363\272l\235WW{\277YA:\361[\033\342y\265~\352\205_\310M\375\257\267\265\205\n\361\034\016\357\207\025(\014-pv\271r/\373\271v1\020\225-X\370\350\267\246\235]\0272v\211H\212/p!3l\273\000O\221\332F\n\251\316\"R\212\254\310\017\0226\376\364\027\034E\264s\304\036\231\007\332K\250\034\030_\306\004]\205\224\332\036V\350v)\221\033F\t6\333\225\032\267q\244\017 \r\245\304P\326\001\266O\266\274\017h\021Bj\243\300\272\201\316\263M\204n\220\034Le\214\235\322\033\360\032x\377t\274D\014\022a\013\254\022\240\204\3211\007\177\341+\034H|\331\306\217\257\270\315F9\231\301\272\t\276\200d&\"\224\332\312\231q\022\030\211P)\2153\035\370\267\210$\017\010\233|\201\355:\212\306\026\2252\326\200\301\326\"\0253\360\004%\331\211\304`\352:<\305\347\376(a\3405\243N\267\341\036\334\224\332\036Ct\203\354\001#\026)\263m\354\3205\247\334\305F\331%\376\332;\242\311h\266\2215#\213\376\021n\231\315BD\021E@\206V\344\n\351\261\370\007\317\331\257\225X\002\302\215.\275\343,\\g\257l\016\nJ\005\001\312\255\233:\002\020-\247\2318\332\246\022\271i\2456\240\034m|5\276z\206^#\022R\311\\$\013\3312v\035d5~\2141.\3037\256`\244$\3710\005m}\023G0b\337\010\032}\000 \355X\221%cK\n/q\013\"\016J\023\026\024\224\t\366\314\203\032\262c\254\021e\316]\007A8T;\205\207\376\211\223\225\001\r\307C\020\207\367\302A\331\033\\\326\356dZ\r'e\337BV\272\352\001\301\rI\237'm\276\241\265\261\3065\221j\372\327f\253b\304\240\357aa\371\314\327\261\214\341\343\2459\301\221yG\272w\254\026\277\357\016N\227E\373\272G\247\266\372iY\021!\307\250\261\337\346\340s\212\2579\014\302\322R\330\034Z\357\031\217\314~\326\2736\017pq\036\032\217\025D\200\216\010\236""\315\nB\233\216\260\362\252Ts\333\273%\372\002\314DQ\371\311\352\\Gjix\207F\\\362\007\262>\032\026(\377\222`\324L\001\275p\257\361\227*\001\243n'\323+d\255T\021\321\212\374\234\224\r\177HN\270\316\2143\205\260v\032\352\340\354\202\260\316`\277U\215\231\001J\351\213\263\264\376\227\212\222Y\233|\314\204\330\301?\216u\241S\177\0219h\3429B\201`\017x\360\030\274\224\037y`(bgGf\306$\0345G\267W\233\361Ip\037z\026\361\345\331IU\326\037\374\313\033\346\306\227G\251\221\271\27332\335\r2\177\376\203\365\253H\315\"\226=\n\r\311V\352X@\246\327\332h\312\036\262\367b\330\244\357_\377\352\332;\247\315\003\235\202\262\237\305\214YO\3148\375'C\366\010\224^\002\200MaN\213y\334?eN@Gs\362\356\335\205\363U\303v\024N\211\035\216\345\204\014e\240\235UU}\204\272\342Z\225\"\365\224U\n4\373\251\300-\215\257\\\277\201\230\254\277\275\020OM\tX\013\273\270\350\300\034\036;E@\035!\321L\251\212\213p4\223\242\317\327\034\315g\031\251\037X\261\014&\271n\024\204\205I\212.\262.\221\207\225\355`\274\177(\202\204\330Ea\341\371E\rQ{\254\251LJ\r\227M\370\002t\302a\233\324FT\367KR\312d\2024`\n\344\272`\230\007h2:!\004<\257S\036\252n\257\322\035\326\332\034\333\262%\211\016?\252Q\346\360)\035\263`T\236\257\272\026/Yf\3269\333\037\2109\340\033\307P\261\032\255\206A4\215y\022\263o\224^\0338\235\r\007\245\321\242>\301\312[BzdC \234\023\3618\264\027\336;\243 \325\320\034G\010\217G5V\353\224\362\337\344\364\\\177mq`\321l\210\027S\350\356\010\021\n\005|RM\330^\21280&)\242O\177\225\320\365\221\3449\021X\013)\303Rd\234d\014\357aT\367Q`\250\345\030\245!\267Z\257\254\240\244@\237O\202gS:N\"\301uH\254\335>p4\375et\2676\345\030\027\337\204Y\027~\361\274\210\266\350j\237]4\217\001\037\376C\244\211\301@\224,\245\035\253\235\274\034\312\222\313\313\32454\327\016\204\262*\363K\240\251\202\255^L\345\023\356\336sV\272D\002?\035Y\216\333\010\215(\302\263\272\354\276\345%\033K\341\274\213,\214\020\227Jd,!r\261nX\201\356/X{fXE\211\245\201m#!$\360\306\313)O\243\222\237\310i?B\035\372W\271\003\271;o\226\033\266'cjx^\233\266\311B""\377\362\344\340\005\306L\007G\251\020\227p\342`\277\307\363\261\202\237r]j\303\301\316\272\340\375\252\336\375~\014\002\342\245\004\347\220:\007~K\313S@>\352\266\177\032\257\260 \253}\312o\200Rd t\t\315+o\273\263\201\214\020\202d\000\300\364\343d\207\177mm\031\215\313\254H\205&\327oM\331\240\343\347O\345$\003kt\226\235\337\324_\024\272[t\367N/\210\221\254z\351\262\256\265V?\265uI\n0\320\357tQ\213o\035\260\227\000\353\267D\022\252\307v\273\316\307g]\236\032\037\300oV{\351gU\354\226H\300\361\325lo\375=0 \250\251O\"H\026\372\203-\326\227mC!\"\202\004\264\360\200\024\331\302\353g;\005R\213#\001j\367\320\243\034\302\312\242\361\004~m\306\262\363\312K\221\311\267\002\243\226\273\010d\357\311\021\320j\013\370\307\024m\207\224\rs\304*-\224S\255v\017=CH\022\306a\203\226\220\230\223\313\232%\263[\311\306\256\214\230\336\023\037?\373\253e\344u\202WL\2555IP>\031\211p\317~!\206\272p\274\340\\\361/m\002*\353\261\323\022\213\262\325\230\007\236 H\372\216\344\263\231\303\007\355\007/\350\333\220\263\245 \231@>\350:\251\223\224\331\302\326 \353$\256\000\003~\022\341\367\202\376\3475\014\345\201\203\336c\227\210\243\231\230\246\212%*\207?=\3510\357V\204\243\206\342\377d.E\244\327\r\010\237kA\020\2037\257\222\320\036\312\267\020O\214HnK_\270n\363\005\031dXjcp\223\t:\311\251\270\347\001\203x\204P\307\017>\341W9G\346\343\343z\310\202z\322\\l\252\t)t6\005\236\300\022\r\200Yu\200\020\230\272_\177\350\n*=9p\323\204\270\330\342\222\241\304\211\224\204\210\316\007V\367Q\317G\251\267@\026\315J\303GNdx\036=[R\005\006<\226\361\325\234*(\360\2736\010\211\357C\232\237U\354\325S}\353\nV\254)\014!\317\227d\233#6I~\214\335\314=f\260\366P\347\335\226ga\220\2261\301\337\017\261`0K;-\375\367n\364\003\352\361\352c\204k\"\255\211\014'\271:W\234\231\327\342MJ/\214N&\3065 [\213\335\306\006+\311\212g\010Z\214\243~\242\343/kR\312\335\\$&6G\346\035\235\351\357\r\334\314\215\"\034\202\363\345\234\273\027\301\003\"2\024\205(\020\324\264\274\223\342\212\220`\267\355\274\021\323\270\037\250e\241\003{l\204a-\376t""\210\013\213\256\220\327\026\301\rZQ\245\n,>\003:g9SB\024\351\304\351\305\010\303\264N\376\"\344\352N0\224\215h3\2118\313\021.\r\n#\242d\306\037\270\246\204\350\252\032H9\221\302r\004\034\254\243\374z\312\304\2003g\007^\300.5\357w`\270\315\002&P\301\226\263\346\310Pc\321\017\3411J\"\305\261W\235\006HH\216\264,\244\352\004\332/>\353`\360\365\255\334\177\206\240\031\340\002'`SVC\266\322\026\017\206\341#}D\250\321\226\254\370e'+.\035\216q\211\000\013s\261,(\250:O\r\336\231ZJu/\200\000\264h\3262\300_\276\332\000\340\007\331\275\234\265\3636\323x\311\265\322\035\034\2034W\016lg\300\263\235T\002^\n \2727r\212\353\207\003cS\313,N2\\\031D\356\270H\313C\030od\244\300\376\323\303\336\364\242O1\215\251\030>uad;\244\000\027\021=\226#:z\037(g\322\311\312\225I2\204\225\250\221\354\345:\222?\263\315\315\0177g\350\363\367\222\302\035I\262\307\276\310\324\342\036d*\034\325\2333\020/S/\324S\3032\026\356q\343d\316V\310u\373\272>/\005\003\347m\013W\267\0342s\350\256\225\356\3740\331\2234T\366\333\230c#Q\r#\304\263\316\217I\347N\014M\370\275N\254\332\351\332\211q\261\354\210\006&\000\003~\313CW\013\230?\344\241\272\216\206\035\310\266\235{jMt\201[\371pk\260\002R\231*\232Z\177\347\230!\330j3>\201\206u\3357<\311n7d\366\262[q/\3011=\026\305^\322\300\336\303?<\350\\5'UgQ\215>:\031\244\374\031\322JG\301j\030\375\310\355\024$\311\020\324Q\244*VI.Q\305\217\335~Ct\237\214\234\003\233'\204f\213\0300;eq\201\177\024\264\227\232\202\023\264\026`i\035P\332\303\244\rR\177\232\203=\n\317\236Jf\\^- jN\026\033I\260\234\315\365\217 \240\3269\371\030\276X\256P\231\320\233\014\021B\375\001\177C'Btm\270\270<\330\275\013\333\210\271c7c\254\311\252yT\322\nIg\222\\\260\237\355t\232DUMn\223\274\021\276K\343\033\250\266\322\035u\201\302z{;m\226\237\224\333@\266\310\036 \202\207\342\331\031\021\350_l\366\013\256\243\273|i\354H\257\024\347#O\030\331IX\344dAV*\331 \3403\032\221}p\227\312\273\371\020\000\262\024\322\000\225\262\033\030SJ\357]'\210\365\333\202W\033Z4.\001\323\236vB\310\0231~\007\013!\321z2:<\216I,P""\014O\242#a\275\367:\232/\264\0026*sn\303/0U\261q\261\274\006n7\2410g$\241m\207\014\334\271\330\325\300\006:\266\21431\243\236\250\315kX\317b\235/\357\315\211\241x*0\323\344\374B*\217\001r\377B\241$\020}\303E\210\271x\225\327\000X\272\023\356\227\352\"\r\372\246k\336\260\032j\360Y,^\235\035\342n\035u\003"; + PyObject *data = __Pyx_DecompressString(cstring, 4308, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (4262 bytes) */ +const char* const cstring = "BZh91AY&SY\304;\357\201\000\003}\177\377\377\377\377\377\377\377\377\377\277\377\377\377\277\377\377\377\300@@@@@@@@@@@@\000@\000`\022\037=\016Qv\031\267;\256\326\361\316\273\273\256\3505H\243\320b\225A%K\333\t\016\260\245y\307\253TS\342\260\002Q\002L*fM4\004\360\223\324\236S\3244\365=OL&\247\264\324\324\330\243\324==\t\342\246\203C\3226(f\215&\3054=F\232=C\324\004\221\000\232\010\3224\322b\236@\247\345OA4\3106\246\200\003!\240\000\000\000h\000\321\220\323@h\003LBI\251\023@z\200\007\251\2404\006@\000\304\365=G\212=F\232\0004\006\312\000=F\203\324\000\000\031\250\221CS\323Ph\001\220\003@\321\240\001\240\001\240\000\r\000\001\240\003&\200\000\00054\222\0324\3654\001\3514\003M\244\321\247\224\331CM\014\232\r2h\032\0314\000\001\246 \032\000\000\000\022\"\020&\204i\210CB\236e6\224\036S\312\032i\232\203!\352\003\324\000\000\000\000\000\000\321\246\3224k\311c\202\032fl\372\342=c\375?W\324\237Z\002\020z\276Z\322\325\"&E\3533\3125QR\342H\"\203k\376$*\225\030\317\373\353\261\r\210cm!\r\203\030\301\246\t\2460\032C\023\004\300\022@\223lhc$\t\271_\302\205\273\327\265\203 \314\276\337\371\00696166!\266&\000\332CLm\r\251\274\270\266(\242@b\252\253]'\001\210`\000b64\330\003`\315$.E\222\021\2223 \212Xh,\213^\2132\304#\210\301x\201^\221\2030\235\314\030\231\221\352\376\245eq\223!\\6\356#d\227Bt \315\2043-\333\207B\307f\213hQ\004\2312dd\311^$\256\211!x\200\310Tq\322\243!Kq\244\3312j6`b\251{3\032\305\266A32\030\353\273@\255\225&\262\210\273f\224-Y\014\3075\345\256\272\352\355\007\313\033gj\0131\233\267S\225\241\034.\021\214\\w`\346\214\346;FM8C^\223\024\266\266\331WlC2q1}\250\266\316\346\001D\031h\264Ey\033\034\257b\245s \210[b\265R\225\315\265\231#\024;\026Xt\335\317Z\334&\026\232\202\355\201Pl\300|U\232\255V\266\325e\366F\203\244\222~T\230\005\351\024\302!\360\236X\025W\257\324\364q7\231A\313\020\317{\232\017{\030#\322\257g\254\356\320\222\204\241?B\212\351V^\235jZ\223\223\271/<\302)\223iO\205\034\247[\372oz\237\344=G%%\352\347-\216\027\220h\321Nb\325u|?\246u{B\004\307_\333\352\006""\010)9R-\007 \032\033\262\224%-\314\231\022\244&]=6\353\232\300\225\026\324\363\031V6\203L \232$n)\316\016\023\235\274'\017\033\271\346w]\274q\273\201+\320\222\316z.\206\202\303\004\325\323(\227\003V\222Hp\317\005\321 \312\220\301.\365\t\224*.yP\217\0267\343P*\227\232\214,Z\271\365\t\315\t\303;8\330\271K\221\333\303\304\3577\316\346\364\342\350\\\231\356J\264\020\244\224\242x\250\267\310kkB\235\3619\031\033\345\302\331B\247\017:\246\376\353\241\301\212\311J\205?Ox&/.~B\212\335gJ\251L\315V\253\355D[W\347\315\352w\352\305\365\365\316\023\263f\312\265xD@\004D\000E\304\311\002\252`\001\304\300B(Z\244\010@\351b\272R\202.Z\231\020\233lT\264\"d\256d\003\255\005TV\244\021(\033Ei\302\036\344\331F8<\303p`\375E\253\0332\366\214\257U+\3070\252L\225X1r1\225\203\334\305A\300\302B\245\336\216\274\203\301k\207\204F8\342\334\216\n\024\231\202\260\016kO\356\264:\316\371J\3125\307\355\375Y\375\240\242A\201US#\307\303yEJ}.`\254\205!J\037?\262\324\224\227\322$\244i5c\254\331\243\217\257\203\216\020HC(oO\037/\253\232\211y\000\240\177Y\271\003\017\312L\232\ryw\027\023K\300cE\251\257\243\263\305\251\220\372\357\357\330m\356\203\005\025\357\347\205\276\032\305\326\200u\323R\320\004\020\357g\353\360\351\317\277\032\315\225)Clw\347`\350\226\214\010\212:c\233\305\360\372H)\256&t\231m\262[`\221S)\321t\250\322\231\222\001\224\2539d\267=8\310s\232{\273\374\263\311\035&\021-$\222L\266\231@\204[P\213)\246[L\266\231D2\312i\247VI`=\236\033\373\371\010\020\025\225\032\300Z\263&!A\002\202\0240\363i\336\350p\362sR\230\230&\230+y0Q\"\254\264\224\304RI\023\251\366\336\362T\210\227\027\305N\2304\246=\354pd\323\275\r\026\3763\016\234\254@\303\275\333\212\317\216\253dB\264j\215\337\236\330\314+\350\376[u\352\215|\237K\227\327\257J~\\q\230J\265\306\263$u\361\347\232\376^F=E\\%J+\210\270\254\376/%\2168\320\017N\276\313w\217\222\266\260pwx1)\347\217s7t\357\244S\2658\267\026RE*\024\202bA`3A\244\250\270m\311\2070\203@\007;\332Z:\036\257\255\340$\222I\335\335\335\331\223&q\231\356y\306\213\320\0220\324\370\373""\216\246\347\353\316\021\354\300%\323\241\021:JBR'\343W\253\201S\n\371)\252$\364D\r\251\200&I\204\247L^^\264\010\004\302]=\\\3754\245\026\020J\005j<\233YCy\303\201\034A\225\260\303\0173\242\257j\312\347T\026\246V\367\006\315>\010\363*7V\306\320.8\203?6=\256_6D\265\235\002\031!\373\372y\333m\266\331\034\t\222\\\266\334\331\252\252\300\201\201\340;\312%\350\233\271\361\354\024\216\214\255T\237\251\242%,\330\023=9\343\266\"\032\362\306\231\354\027A\230\314w\265\300\305Z8X\353\233\032\333\271\n\3447\n\2460\351v\314tx+\222F `K\330+q\312UeX\215T\002\234\002\033(\"-\010\342\020\3330a\256\2012^^\333m\302\021\"\325J\002\246-\030c\027j\233\346\203\246\006$\325\322\024\231\250\352\3659\325\300\333\006$\225\206\203c\314xb\323^\332Y\363\264\020\314\2764F\n\270\036\371)\"\034\021v\307\324zc\215L\220\366\332\321T\247a\324\033\177V\005\247\313\351\264hZ\020\322\021\254\305\021\220u\325M\003a\335\230\264\315\271\3475\020[[`u\006\013{\345\227\253\n\361D\r\264dc\004\267\257I\246 \006\325Q^\347]w;\213\262\0355T\212\2654\n\214)3J\320?5\2430\331\2748\314G\016Tvs!\242\221\326\207\027G\034\340\274\200\037\222\312\310I\214\207\001c\325v(\234S\034\201\026\355f]\220\335t?\217L\344\005\231\226L[\232+\026\271\222s&\014Z\275e\274\331\323$\033\241/\222\030\0223y\357\241y\310o\032\006\002*\031\201\002\210I\232U\022.\346 \016\261\314\254\032\213\321\002\3624\365\017\332q\322@\315\275\301\3068\206\304T\216\324j\330Z2B\331\306\222\335\034h\002;\272\342qT\260\246\253\206\342\223PzGJ\031V.\246\313\020i[\n\000\375\243\241\035H\357\007\006\0149\215\353]\340\361%\334bPZ\366oxMj\315h\244z\352\313\266\272\270\261t\246k\265D\005)2\014\004\201 \000\006\023!Wr\020\253\2734Z@\017\t\200\321\272\3026y\305`\356\357\332\234nK9\316\2224D'&fff\275m\236\362\342\263mE\326\032_\"\226\306\307\256\014\305\027$\225\235\215-VI\00346C\026\331\033\245\224cI\007\205\346\243\035q),\266\362\211\211\026\277\2543!\t\215\320/\212\013B\321\335|5}a%\304,-3Vd7\353\316\021K\027\t^.\202)N""\330\3423\260\3106\241e\006\010\032J<\230\232L\320\302\263\021a\336f\023\257-\"\333\226\014!\304\222\366\244&6\333a\277\317Y\003\006\322L\315\3008Hm'\3330\211\214\007\216\324VR\364\220\014E\245,n3\313\r\274{\244V\361\306\235\034\313\235u\371\316\310\274\356M\257\266\216\266\300\207|\335\242F\342;\317\022&4\\\\\231a\251\267o\215\341\272\004g\245_\224\005q\262\n>Z\351\221\026\230F\251\264\034Wb\213\212$\2212,A\255F\343_A\254;F\247\264\010XiK\253 \274\340n\310\243\221K!(\n\256\023}e0\006X\343\334B\341 \343B\024\023\270\217&\303\255.\216\215\"\0029\327\265uprbs\211\364!\365lB\014q\002vR\212\367]\024\316\306\0105\262\205\220\251\340\303k\t\034\314%\202\0304\213\363U\006h\302$rD\270I +\301T4\312\315h\274(I\260L\332\tR\310\274\016\363\353\341\\\350\013`d\331\240A\277X\034\2476\344h\236[\302\314G\237w\242d\215\300\300F\226\333m\200\333c\202\023gmrG\214\301\033N\262G\002\355p`\210Oi\263?0\206\357\254+\220a\326D,\252\210\324\304\330\20111\346/%k\252\326\024R1I\005\n\350\232%\276\274b\346\344\335\311r\305\243\001\211C\022\342\230\022\243\264\005\332\214:w\035]\023\231D\2138N|#\242\r\344vRH\266\347\260\211\371v\301\251\031\327\320\251\030\343\262*\210TQ\t\000\365\213N,\221\273\2758\320'\002f \204\004D\002\030\345\303\201\360\203Z\260\336\313b\330\372\327\306\005\020\"f\024@\027\265\003z#\004'K\352')$\241\2064\204\014 \254\252\204\345C\222\316&\225\246\255dT\2108Dq\230,\207\240R\000\243 )\004\222\301W\1776X\203\016\302j\346u\330\331t\000\340\031\007\231\307\264^\367\307\000\277:\357\265El)X$\221\255\026)s\000>k9\270\003\014\221\000\035\331\226^\315\362\005\220\252.\356\013\267h\232\035\201\004H&\240\244\245:\245p\001\233\304\302\356\030J\371\205\301\313\237\300I\003\3143\000S\001\251\021,\314\251\206\225b]\205\330\300GU\002\244\256\n\300\332\302_&\023`=\374S\252\026\304\343\331)7\237\225\325d\233\330b\201\210\335\306A\203=\276\n\243\261j\201x\035\376\023\267\341#\243t\261I\335&\2210?\003\232P\227\021S\275i\204\302\245\253>!\253\247\034\306\014\032\341`v\010\002\030\320\210\360""\264\023\355\022H\203\214+\275\334JR\2429{\242\342\216\230F\323,2\267A=\225[\256b|h\245\312\211i-rp \rM\241\003l\022\322\t\245E\t\206z\034\276\307\254]Xl\253\210\261\272\312\021W\274\344D\2122B\212\\[\312K\276S~)\273\231\217\357\023\n\\|+j\371D\350G\000\202'\342\214\311_\026\266\223\264\255P\202x\3218Y\341\207\010K\304$\333\253\034\354\212\231\030\3620\257\022\206\034\254\314\324\006\273\357Up2\013\237%\026\3155\274/\031G\"\255\013\230KzRH\361\235 B\022\222\305\366\217\r1\303UQD\220\177SN\372p\353\205m|\247(\021\265r\355\223\0168\016P\301r\2772\342\312Z\212oM1\244\210\025\010\210i\250\200\002\010\"\266\201\327\023Ht\251$\"\201%\2746\225FM\230\005Z@\r\251\364);\354\213\2002\244\347i\243\004\362!U\017*\247\214PxF\024\271$\2105yw 3.\210\370\020E\025\235\021U\225\t\234\217O+\253uj3[7HO$\361\026\310\244?\026)h\226K&@\3701\271$\210\241\340\n\300q\373\343\324\321.9\350\324Q/\024\254\367~?\207\372\343\277}\367!z\305\235\274\014\\\241Z7""\276\376?\213\033mF\257\273\\j\255\000\331\324\324\341f\323l7\265oZ zs\367\330\342O\001\372\016\033,\321\275\322q\316\035\322^\227/\307\257\256\301>\204'\226`/r5\315\211\347vlm\"\243\346\336\330\037\017\262@:6g\373#\313q/v\206\324\212\342%f\337\037\301\265\312\333^\220\343\334\200\257\333B\013\337\340\205\305\"%\301i-\304\316\334\374\202\325\261\234`\316']X[\266\227\030\\\361\335\264[\266\377C\207\177#.\265\253r(v\377b\333\030\233\214UN\347\226\351\376\377\235\327\272N\350\322_\221\2229I\242\374Y\321\334\376\301G\027z1\334/\334\310+v\360\271\323\312;BG&\177@\353\223>n\316\272;\rC\332\373;o\033ca\re\344\275\302\316\347\027\214\270\257\216u\265s\"\327s\366#I\372\325ls\243]\252\353.\325V\345\270\324\323\311\225C\311\274\324\346y\237`\316\323\320\342\350s\364\230v48\023\213\203\202\216\2134\2547|\337\320\263\273\356ooY\207\203\206\306\351e\272V\003w\236\303,.|Y\271\352\t\017&\336~\240\344\357.\231\220Y\301H\316\221n\264\242\\\350\035{\223\377I3\262D:\\)\016\321\314\304\014uI\207\301\272\nY\003\272\341@\314e55\250\230>\320\000\352\321\352\345\344(\204&\341\361\342D(n6\003@I\246\334\014x\334\332\306`\234(ET\004\034D\236'7\001\263\270\322`?\tn\326=\014Z=\002\235h5l\321\277u\027\315y;d\243\262q\016\337\3574\334\252fh\351-\031\356\352\212\325\367\332\346xXB&\020W.\231\310\206\236\213b \014\240\232J\307\006\352\237d\341\253h\372\374F\177\024\3462#\202\305!\266\346\\=*J\350\033\203\227i\220\324\324\353\0329pA\031\230\2428-\342\022\231\244\005\234\026-\025U#\004E\261\207\216^\023:\214w\023\022xdh9f\213L\220\206\234\311\327\306\372\253\177\202\002\010\203K)\264\326\340\261u\033\353\301\025\025\234\225yZ&C\265H\022\014\301 \214\003.\345\252\305`\3365n\352\202\200\325!i\341\3456\004\305P\0235\210I\335\300j\025 \032\263X\227M\336.xU\226X5|)]}Nb\002\006#4\204r\212$\301\310N\223\3131&\334\246\312\264\264\220\263\014<\324B\302\027\024\332?\370\273\222)\302\204\206!\337|\010"; + PyObject *data = __Pyx_DecompressString(cstring, 4262, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (4364 bytes) */ +const char* const cstring = "x\332\275YKw\324V\266n\023\033\374\300\200\203\001\023\002Q5\246\rib0\230&\341\021\226\203m !\020c\033\372&p\265T\322qYA%\225%\025v\301\345^\017k\250\241\206\032\326\260\206\036z\310P\303\032\372'\344'\334o\237#\251\364(7\364Z\275\222\025\253\316\331\347\265\037\337~\234\303\364\324\\\331qmEu\177f\256\255\253\367\231aL\375`\325M\215i+\266\316\346\025W\271\370\356\375\245%0QW\335\272\315$w]q\245u\313\320\0341\242\224\255\272+)RE\251W\030N&\r\361\265\017R\004GR\260\324f$\213\3522Mr-\316X\205\331\016g*:MG\257\374;S]\t-\323rq\232\315\024Mr\2245vYr\260\310\235\022\003N\275V\263\034\261S\031\307X\232\276\2463\r\273\224\033\222\345\2563\23385\361a\202\023\262\232`^\265LW\321M\007\233Mc\376\237\251\244e\310oV\226\231\233VT\236\330KY\016F\2555:\001S\377\004\225%<\355\243\266Hl@\261\252\0204\2119\0053\005\203\222\301\314\212\273.\255A\265)\241\t\361\222\252\230\304\014\333R\031X\231\221~\376\201\033\241ns\006\024M\323\343\375\230\301\252\314t\205:4\333\252\325\230\366\2371\030|\371\265\303\345T\353\266\2153\2447\212Qg\222bj\222\306\014p)8\207r]\253b+\325\264\271\026\024u]R\271Z\272\3738\256\3422\256\204h*8\324X\215\341c\272FC\252A6R \333ry\273\214\270`\260i\241F\233\3418\030\213\321\316\321\362u\005rK\260\320\032\343\014\362\003uS\314\021\253/\013\273\300\354\006\016\267\261\227R\251\330\254\202\216\326\005\207j(\216C\223R\270\220\034\335T\231D\261\3116\032d\260\256\244]0\245\026\374\331~\322S\361\377\031\254\343\000G\327\030\267\332\303\370\030B9\311x\207\207\n\036\2319\"x4u\365*|Q\251\326(\244~/\246D\241x\277IS\231\235\273\275$Ud(Sw\222n\264ov\017A\234z\004\335+e\203\375\006\375\275zb\271\221\372\3567\334u8\0144\002\350\352e\314q\031\020\027E\217\310\247\177Y\370\345\233\331og9\302mF*t""\240\2432\007\007s\010\270\345\272n\270\000\230\333\250\301^\322\2435\251a\325%\223\t\035\326\010D\251\005\320\236\311\203\022\251q\212\2734\217\0032\226\003OS@\256\215C\3647\214V/*\206\303\246\237\326h\206b\374\226\223\376U2\200\030\361\n\177\\@\372u\3535\203\275\312\304\217w\357o\275{?\225!M\025\003\250Mn\0026U\245\246\250\200\342t\022`\000|\253J\210O\242\313\246eN\271\004\0220l\331\310\326\323\322\375(*8\372[vK\272\240]\206\2079n\274$!O\023\242mn\034\341\372\351d\035#\367\036B\232\014\3650be\235\311e\246T\257D|^!\257v\246k\rMw\310\262\314\244oE\325\035\321\322\242yr\255|m:UK\354C\246\022#=\224\250\3719\301\364N\224<\254\272\255\262\357\213%M\2212\rU\225u\223\365\030\2510WV\353\325:\"\017l\334c\002\324\302\334\036\364\336T\327\222\355\272i2[Vj\272\\\265L\335\265\210YY7\327,Y\257\326zqW\257!f\260\224\374\251&M\310u\247a\210<\351\343\347\346j\272\\wZ\226m\246\325U&\253\334\013e\2718\001\022\363\354\260\357\224,_\202\344\310nV N\216\354Q$\213\314\234\247\257\301:.3Ya\3735\333\252\3125\333r\255\374H\326\256\275F\005\336\363#:\34598\232\034\371H~\034\t\247b0\3272\213\003o\013\307\300*y\346\010\332\362G\372Ec\364\230Q\260Fa\016\371k/\032\312\233\002=\326|a Q}q$\321}a\250\312\354JQ*\322P\201\030\253\2508`\353\325\373t1`6!<\325\214\321\223&iLMw\263\326O\217 l\246\273\334\273\323\204\217;Rz\266\360\\y~aqn\365\361\212\374\303\323\325'\363\351\330I\223\362\375\230\375\002=\313ta\230\263Z\240~\234\337\302\022\301t\376\006\227\357\027A\330cF\001\204\2059=\204\355\341\237=\207\205\203\026\206\362\036Z\230\220\270h\361\312Y\244@\010\266\221\345;\031@\351\272\276\317\220\016=\3573d\263\232\335s\210_s{\320q\331\355E\305\325\267\027Y\357E\305\365e\021\356\010\361\031\325o\311=1i|\002N\222\2121iD\272I\367\205J\322\024\241\2114E(\240K\211 \320%dm\237\245\013\243wiykwG\0223\247\352\330T3\315|\316\242YZJ\200\234\r\323\264\244,N\023y\325\374Pq\026ufhI\221\222)\2313\235E\344}\313n\364\242\341P\225\002\263\274\317 \311\262\317\220\020j\237A!]\366~\320\233\032\231)K\314\232*;\306\003R\226""\364/Q\226\235*\242P\246\200\316t\3622g\000\230\247\346\344\311\0001K\315K\231+#\262\364}\244\317\2015K\317\0036;\032\247\273\334\225(\327\315\313\236\303o\221\236\223?\207\343<}\275\200\324h\240\366\335\325\"\351F\221\364]|\203\223\037?}\360`\341\331cK}\335\255g\273\255\010\206\005B\002\366T\021\234\244\033y\337\352<_\225\177j\335\375o\325\347\205\272\374\211e\262\370b'\313\2774\266\3607\217\033\251\374\004o \317\330\232\274\274\362\354\321\223\007\362\362\302\212\274\374\350\327\005\371\361\243\237\037\255\340\022\227yz\312t\250\014\313\022>\316W\346\246\230\351Dh\311\323\004V\362T\201\224[\256\211\333\226im\212\367H\376z\316?\202\031\336t\220\027\220\007\020\367kx\273\306#\257\276%\303\250\254\206\367ljX0\007\240KV\256\001\227\246C(\300@\203$bxY\256G\275\330F\324\216\214DM\001{j\325\315\232\256\2766X\376i!7\232/\371s\303\205\3735\037~""\343\362\214\205\3776\352\212!\364!^\312\272\251\247x\361\216\tlKtjv\367\267\000\351}\007\n\004\236\277\204:l\206\027d\323\266,\027\017\222\025\376\224\027\377\312\000\217\3550c\215\376\204A\360\240\206?\227_\275\"\243\242\245\2615\205k\326I\241\277p9K\"'\017\002\374\317Ul\204\035Q\333\272\374\243\253\200\332\272\245A\303\321;\033\377\212\335D\213/\344C\260,\036\250a}\304\032\304,\332\001_\376\226\255\323?\234\330\326&m\236\024\317\324x\213|\032\227A\231\264\367/s\340\307\023d\027y\272F\217\007\364\327\325{\354xx\2617U\372\207\0059i\211\227^\221\354a\t\370q\242:\356\323e\201&\036\3179\201T/\024PwU~\007\340\037\007\377t\200XP\331D\354g\220\265\261]\332\353\037\tG\256\266\017\2657:\203\207\233\017\275y\277/\322\374\335\357\303\310Lg\370\270w\333W\366\360s\313\177\036\314\004s\235\376\301\3460\316\354\037i\316\0043\333%\354:p8\0349\343\317\370\367\375Fk\240\265\024\tG\224\371\340`\240\265.\266'\333k;\363\273}\231\331\017\202\353A\245\265\344\317\320\374\301\346`xL\n\245\231\366\030\237\304\031-y\264\377 V4\321\350L]\244C\357\202\261\323A)\230\t\017\234\t\317`\276P\327M\357\274\267\352O\372Zp\271\245\202xp\264\271D\312\253x\313\376\200\277\002\221\215\366\371\366\022\247\357\035\034j\2167_x\367\241\247\371` x\321z\320\236\351\014\036i\256{\025\037S\306\274q\357\277|\305w\203o[0\303P\363\004\266y\001\225\016\036\363\016z\niw\017\315~o\016G\226\"[\370\375\376\243`\265\205.\231\363\201\177\r\207\216\321\212\001\217\237*\373s\376jP\332&\315\205#\327\332S;c)\313\177\341s\215^o*M\227\244\356\234=\027\367\033\341\304\305V_kl;\232\241{\033\\\364\3316l\301m\356]\000\024\372\207\241\261I\217\371\337\302J\013\2551n \254\231\340\363F\232\367p\302 A\002\222~N+\240\026\271""\265\020\316\314\355\202\221\241\316\341/\375\237\200\003\330\257st\334{\344/\371\325\326\2148s\266\371\316?O\314'|b3\177\326\377\277\226\022O\330\340F\247\006\251%<0\001\214v\373\311,\321\0213mh\371\237\244\244\010\025 \325\273\243\274\331\245?\344\206zI\350\210\307\177\204\255K\361\316[\236MpM\035\374\326?\027@Q'\274\227a\351f\373\375.\007\356\021\357up2\330H{\007G\303\321\263\341Y\n\222\303\024\363\342\217\005\267\035>\341-Q\3448\202)\376\177Cbn\210y\377h\340\266n\"\002A\201d\356x/\021!\372\217y\237y3\2305\034L\265\306[+\"\2344\274C\004\205}\343.\205S\235\007\331T0\214<\373\257\330\210{\366\202\367Ex\346\n\267$\2057@\377\247\360+p\216\376\020\035\215\255\256\370c~\004aa\303%1y\324\243 z\342bk\264\275\364\307\360_\006\006\267\337{?\360\310,L.\016E`:\005F7:Q,\202\036'\374\317\020Y\347(\222\337\365\017\000rP\313\2307\201\205G\216\356\0359\33292\206hQ\352\014\217D\034\357\tNx\024\311\364NxV\260\224p\232\242\354\365\223\t\260o\317x\023\036\340C\244\342;\320\340\244\257Dj\036A\200.\221\266\373)\336u\372\0177\347\275a\032\367\337\004K)D\037ij\336\327\210\224\377\014/\334\240hM\001\353^P\342\371\213\246\301lG\341\373\330\303\037K+\237\"\323\337\305No!\342\024\251\352\020!\240\352_\367YpW\000\306\020al\217x\212cY8\002\226\021J\256\264y\204\035\016\207E\037\031f\033\214\002\236\255\265\366\334v\037\345\241#\320\303\227\010Y\023\200\312\022\t\361\000\330Y\364/\007\212\020\341\205\267@F\244\000[\242p\262\261""\207\217\353\337\246<'\270\037<\032\036\235i\217\267\227\332\225\235\337>\034\372\200\031\031J_\367\240\tl\365\034\271\371\215@\345\247\035\266\361o\037s\032VXG\222.}\272<7\001\361\023\310\262\343\355\227\273\247>\364u\217\274\332\356o\317\265_\354\374\264\273\371A\331\313R\"?\030h\376\352m\302\354\324\375\362l\204\374\244}O\270\303`\010$\203\312\r\322\344\3411\372\3411%*\030<\344\315s@X\224\017\236R\370O\372\rBH\322'\357:\016X\255\004\347Zn{&C\207\200I\332\270\035\236\374\033\204\207\274\344\363\203\360\226\316aJ\226\215\240\257s\230\222\277\216\242\340V\3539\202\344\350X8V\n\306\272\354\n/\037\r\317N\267\224V\224\017o#\362\273\376\275V)\016\002\3210x\340\256\324\374\215\326\r7'y\336\247bm!\21027\3504\363M\233;\335\000\245\350\317O#^L\372k\301<\312\265\376\366\342\316\344\316\332\356\374\207\276(\362\234\363+\301\022,\371u8\373\360C_W&\317\010x\352\327\310\210$\231\025\254\204\227n\355\240G\216}\022\322Q\225v\271\255 \351\365\355\365\177\345o\204\322\325\366\310\316\355\335\327\341\322\263N\377q\270\340\305V\251\305s\340\377\200M\254D\341\025^\233\337}\022>[\216\370\355\2650<~\236j\250\326\\j\345\265v)\274\276\270k\206+\253|%\026\035 |A?\207P!\364e{\336\030\317{\210\243T\354\274\342u\307\376\305N\274\212\262\347W4O\304\301Rw\017\216\033Qb\036kn\374q\230*\315\257y\205\"\026\360\324\337\351\037\330^i\2165\343\330\"\026\213H\234N\275\024\347nD\275\244\376\346#G\233\016\312\327Y\332\n\032\017O^\242\234@\2727cv\357\212\002\233\230N2\022e\204\211`\034V\\o\001\237\250R\303Qd\214\366I\334\022\372\017n\277\366\316\362\2524\251\"\216\021C\304B\224\256\242PK\336\260\340\177\016M\325\203\271(\316\3055\362R\207\027\277/\311\035\270_\303M9\257\224\004\017\007\367\003J\262$\"\252\263\347\376-\236\004\242\305S\"\377@H\221\207\375d\257Sp\217A\n\351\264J\324\330\333\245}\352r\221G\241,Z6\020\254 \224\276\3349\2763\267w\360P\267.\347\227\242G\274\032\342\271\364\211(\263\377\026\3459>\357y|\271\241\t\213T\321\306g\336\362\226D!\237\350\343\177\375e\234\005\246\310\206C0\261\033\236""\201w\321\312\237\021\000\250Z\210\021\264o\356\032\201\236?\203I\337\005\223\344d\010k\253;\227vgv\347\272\2536\3435\020\357\005\356\0003B_'\371\215!\255\225d*no\020\343<\277+\344\027!\350\004c|Y\373\334N}\227\227\306\271\322OT\246\274\330\370\334\273\341sU<\360\256\361kIt\271\030\360\237\001\006?\266\230(\354r\244\342\236T\345\376\204jz\334\217/KAbstractMetricCellAbstractMetricCell.combineAbstractMetricCell.get_cumulativeAbstractMetricCell.resetAbstractMetricCell.setAbstractMetricCell.to_runner_api_monitoring_info_implAbstractMetricCell.updateBoundedTrieBoundedTrieCellBoundedTrieCell.addBoundedTrieCell.to_runner_api_monitoring_info_implBoundedTrieDataBoundedTrieData.__reduce_cython__BoundedTrieData.__setstate_cython__BoundedTrieData.addBoundedTrieData.as_trieBoundedTrieData.combineBoundedTrieData.containsBoundedTrieData.flattenedBoundedTrieData.from_protoBoundedTrieData.get_cumulativeBoundedTrieData.get_resultBoundedTrieData.identity_elementBoundedTrieData.singletonBoundedTrieData.sizeBoundedTrieData.to_protoBoundedTrieNode_BoundedTrieNode_BoundedTrieNode.__reduce_cython___BoundedTrieNode.__setstate_cython___BoundedTrieNode.add_BoundedTrieNode.add_all_BoundedTrieNode.contains_BoundedTrieNode.flattened_BoundedTrieNode.from_proto_BoundedTrieNode.merge_BoundedTrieNode.size_BoundedTrieNode.to_proto_BoundedTrieNode.trimCounterCellCounterCell.combineCounterCell.decCounterCell.get_cumulativeCounterCell.incCounterCell.resetCounterCell.to_runner_api_monitoring_info_implCounterCell.update_DEFAULT_BOUNDDistributionCellDistributionCell.combineDistributionCell.get_cumulativeDistributionCell.resetDistributionCell.to_runner_api_monitoring_info_implDistributionCell.updateDistributionDataDistributionData.__reduce_cython__DistributionData.__setstate_cython__DistributionData.combineDistributionData.get_cumulativeDistributionData.get_resultDistributionData.identity_elementDistributionData.singletonDistributionResultDistributionResult.__eq__DistributionResult.__hash__DistributionResult.__init__DistributionResult.__repr__DistributionResult"".countDistributionResult.maxDistributionResult.meanDistributionResult.minDistributionResult.sumFromDatetimeGaugeCellGaugeCell.to_runner_api_monitoring_info_implGaugeDataGaugeData.__eq__GaugeData.__hash__GaugeData.__init__GaugeData.__repr__GaugeData.combineGaugeData.get_cumulativeGaugeData.get_resultGaugeData.identity_elementGaugeData.singletonGaugeResultGaugeResult.__eq__GaugeResult.__hash__GaugeResult.__init__GaugeResult.__repr__GaugeResult.timestampGaugeResult.valueHasFieldHistogramHistogramCellHistogramCellFactoryHistogramCellFactory.__call__HistogramCellFactory.__eq__HistogramCellFactory.__hash__HistogramCellFactory.__init__HistogramCell.__init__HistogramCell.combineHistogramCell.get_cumulativeHistogramCell.resetHistogramCell.to_runner_api_monitoring_infoHistogramCell.updateHistogramDataHistogramData.__eq__HistogramData.__hash__HistogramData.__init__HistogramData.__repr__HistogramData.combineHistogramData.from_protoHistogramData.get_cumulativeHistogramData.get_resultHistogramData.identity_elementHistogramData.to_protoHistogramResultHistogramResult.__eq__HistogramResult.__hash__HistogramResult.__init__HistogramResult.__repr__HistogramResult.histogramHistogramResult.p90HistogramResult.p95HistogramResult.p99Iterable_LOGGERLockMetricCellMetricCellFactoryMetricCellFactory.__call__MetricCell.__reduce__MetricCell.get_cumulativeMetricCell.resetMetricCell.to_runner_api_monitoring_infoMetricCell.to_runner_api_monitoring_info_implMetricCell.updateNoneOptional__Pyx_PyDict_NextRef_STRING_SET_SIZE_LIMITSetStringSetCellStringSetCell.addStringSetCell.to_runner_api_monitoring_info_implStringSetDataStringSetData.__eq__StringSetData.__hash__StringSetData.__init__StringSetData.__repr__StringSetData.addStringSetData.add_until_capacityStringSetData.combineStringSetData.get_cumulativeStringSetData.get_resultStringSetData.identity_elementStringSetData.singletonaddadd_alladd_all..genexpradd_until_capacity__all__apache_beam.metricsapache_beam.metrics.cellsapache_beam.portability.""apiapache_beam.utils.histogramas_trieasyncio.coroutinesboolboundbucket_type_bucket_type__call__childchildren_childrencline_in_tracebackcloseclscombinecombinedcontainscopycountcurrent_sizedatadata_classdatetimedecdeepcopydelta__dict___dict__doc____enter____eq____exit__flattenedformatfrom_protofrom_proto..genexprfrom_runner_api__func__genexprgetgetLoggerget_cumulativeget_percentile_infoget_result__getstate____hash__headhistogramidentity_elementinc__init__intint64_counterint64_user_counterint64_user_distributionint64_user_gauge_is_coroutineitemskeylabelslogging__main__maxmax_childmeanmerge__metaclass__metrics_pb2mimin__module__monitoring_infos__mro_entries__nname__name__namespace__new__nextnodenowobjectotherother_childothersp90p95p99popprefix__prepare__propertyprotoptransform__pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_BoundedTrieData__pyx_unpickle_DistributionData__pyx_unpickle__BoundedTrieNode__pyx_vtable____qualname__record__reduce____reduce_cython____reduce_ex____repr____repr__..genexpr__repr__..genexpr..genexprresetresultreturnrootssegmentssegments_iterselfself_childsendset__set_name__setdefault__setstate____setstate_cython__singleton_sizesizestart_timestatestaticmethodstrstringstring_setstring_sizestringssumsuperttail__test__threadingthrowtimetimestamptimezoneto_prototo_runner_apito_runner_api_monitoring_infoto_runner_api_monitoring_info_impltransform_idtrimtrim..truncated_truncatedtypingupdateurnuse_setstateuser_bounded_trieuser_set_stringutcvaluevalueswarningwas_empty\200!\340\004\013\320\0130\260\007\260q\330\010\014\210H\220D\230\001\320\002\031\320\0310\260\001\330\004\007\200t\2101\330\006\016\210a\330\t\016\210a\330\006\016\210b\220\002\220$\220a\330\006\n\210.\230\001\330\006\n\210-\220q\330\t\r\210U\220!\330\006\016\210a\330\t\r\210T\220\021\330\006\n\210-\220u\230A\330\006\016\210e\2207\230\"\230D\240\001\340\006\016\210a\360\006\000\007\013\210(\220/\240\025\240j\260\006\260a\330""\010\025\220T\230\032\2404\240q\250\010\260\001\330\010\013\210;\220c\230\021\330\n\016\210j\230\001\230\032\2401\330\n\023\220;\230a\340\n\023\220:\230V\2401\240A\330\004\010\210\n\220!\330\004\013\2101\2401\200!\360\006\000\005\014\320\013\033\2301\230C\230y\250\005\250Q\200!\340\004\013\320\013\033\2301\230D\240\006\240d\250(\260$\260f\270D\300\001\200!\360\006\000\005\014\320\013\033\2301\230G\2403\240g\250Q\2301\200!\340\004\010\210\010\320\020 \320 1\260\021\200!\360\006\000\007\013\210(\220!\2201\200!\360\010\000\005\014\2101\200!\330'(\330\004\013\210=\230\001\230\031\240!\2401\320\002\033\320\0331\260\021\330\004\007\200t\2107\220#\220U\230$\230d\240,\250c\260\021\330\006\r\210Q\330\t\016\210g\220S\230\005\230T\240\025\240l\260#\260Q\330\006\r\210Q\340\006\t\210\024\210W\220C\220u\230D\240\005\240W\250G\2601\330\010\016\210h\220g\230Q\330\006\021\220\024\220Y\230a\230t\2408\2501\330\006\t\210\025\210g\220W\230A\330\010\020\220\006\220a\220u\230A\340\010\020\220\004\220A\220U\230!\330\006\n\210-\220q\230\004\230I\240U\250!\330\006\014\210H\220G\2302\230T\240\021\330\010\020\220\005\220Q\330\006\r\210_\230A\230U\240!\200!\330\004\013\320\0132\260'\270\021\330\010\014\210H\220D\230\001\320\002\032\230!\330\004\013\2103\210a\210t\2201\200!\330\035\036\330\004\013\2103\210a\210y\320\030(\250\001\250\021\200!\330\004\013\2103\210i\220q\320\002\033\320\0334\260A\330\004\r\210T\220\021\220%\220q\330\004\n\210(\220$\220e\2308\2401\240E\250\021\330\004\013\2101\200!\330\0304\260A\330\004\013\210?\230!\330\010\016\210e\2201\330\010\022\220%\220q\230\005\230_\250E\3201A\300\021\330\010\t\330\014\034\230K\240q\250\005\250Q\330\017\024\220I\230Q\230m\2501\200!\330\004\013\2104\210{\230#\230U\240!\320\002\032\230!\330\004\013\210?\230!\2304\230\177\250a\200!\330\004\013\2104\210q\200!\340\004\013\2104\210q\220\004\220A\320\002\030\230\001\330\004\013\2104\210q\220\004\220A\200!\330\004\013\2104\210q\220\004\220A\200!\340\004\013\2104\210r\220\024\220X\230T\240\021\200!""\360\006\000\005\014\2104\210u\220A\200!\340\004\013\2104\210u\220A\200!\360\006\000\005\014\2104\210u\220H\230D\240\005\240\\\260\021\200!\340\004\013\2104\210u\220J\230d\240!\200!\330\004\013\2104\210x\220r\230\032\2401\320\002\030\230\001\330\004\013\2104\210z\230\036\240q\320\002\025\220\\\320!7\260}\300A\330\004\010\210\016\220k\240\026\240q\330\004\007\200t\2101\330\006\024\220A\330\006\n\210%\210t\2201\330\010\027\220s\230!\2301\330\004\010\210\017\220q\200!\330\0308\270\001\330\004\013\320\013\033\2301\330\004\007\200u\210A\330\006\n\210.\230\001\330\006\n\210-\220q\340\006\n\210-\220q\330\n\020\320\020 \240\013\2501\250A\330\n\016\210f\220I\230U\240)\2506\260\021\340\006\n\210,\220a\220s\230#\230V\2401\330\004\013\2101\200!\360\006\000\005\014\2109\220A\220S\230\n\240!\200!\340\004\013\2109\220A\220T\230\030\240\032\2504\250q\200!\330\027\030\340\004\013\2109\220A\220W\230J\240a\320\002\033\320\0339\270\021\330\004\007\200v\210S\220\001\330\006\r\210Q\340\004\013\210=\230\001\230\024\230Z\240x\250q\260\005\260Q\200!\330\004\t\320\t$\240A\330\004\013\320\013\033\320\033+\2501\330\010\014\210A\330\010\014\210A\330\010\014\210O\2301\330\010\023\2201\200!\330\004\t\320\t$\240A\330\004\013\320\013\033\320\0333\2601\330\010\014\210A\330\010\014\210A\330\010\014\210O\2301\330\010\023\2201\200!\330\004\t\320\t$\240A\330\004\013\320\013\033\320\033,\250A\330\010\014\210A\330\010\014\210A\330\010\014\210O\2301\330\010\023\2201\320\002\034\230A\340\004\010\210\t\220\021\330\004\010\210\r\220]\240*\250G\260:\270Q\200!\330\004\t\320\t$\240A\330\004\013\320\013\033\320\033-\250Q\330\010\014\210A\330\010\014\210A\330\010\014\210O\2301\330\010\023\2201\200!\330\004\t\320\t$\240A\330\004\007\200t\2104\210q\340\006\r\320\r\035\320\0350\260\001\330\n\016\210a\330\n\016\210a\330\n\016\210o\230Q\330\n\025\220Q\360\006\000\007\016\320\r\035\230^\2501\330\n\016\210f\220D\230\017\240t\2507\260$\260a\320\002\024\220A\330\004\007\200t\2104\210q\330\006\r\210Q\330\004\020\220\003""\2201\220D\230\n\240'\250\024\250T\260\021\330\004\007\200y\220\007\220s\230!\330\006\016\210b\220\002\220$\220a\330\006\n\210.\230\001\330\006\n\210-\220q\340\006\016\210i\220u\230A\330\004\010\210\n\220!\330\004\013\2101\200!\330\004\013\320\013\"\240'\250\021\330\010\014\210E\220\032\320\033/\250q\200!\330\004\010\210\010\220\004\220K\320\0370\260\001\200!\330\t\r\210Q\330\006\n\210/\230\021\230!\200!\330\004\013\210=\230\001\230\024\230Q\200!\330\004\010\210\r\220Q\200!\340\025(\250\r\260Q\360\n\000\005\010\200}\220B\220c\230\021\330\006\r\210Q\340\004\010\210\n\220!\330\006\t\210\027\220\007\220q\330\010\020\220\004\220A\220Q\330\010\030\230\003\2301\230A\330\010\013\210=\230\002\230#\230Q\330\n\021\220\030\230\021\330\016\017\340\016\017\330\016\021\220\021\220!\330\n\013\330\004\013\2101\200!\340\t\r\210Q\330\006\r\210T\220\021\200!\340\t\r\210Q\330\006\r\210T\220\025\220o\240Q\200!\330\t\r\210Q\330\006\r\210T\220\025\220o\240Q\200!\340\004\r\320\r\035\230Q\330\004\n\210(\220$\220e\2308\2401\240E\250\021\330\004\013\2101\320\002\035\230Q\330\004\007\200t\210<\220s\230$\230a\330\006\r\210Q\330\004\013\2107\220!\330\004\020\220\004\220D\230\001\330\004\014\210D\220\n\230$\230a\230v\240Q\330\004\007\200v\210S\220\001\330\006\016\210d\220*\230A\230X\320%5\260Q\330\006\016\210e\220?\240!\340\006\016\210a\330\004\007\200q\330\006\017\210u\220D\230\001\230\021\330\004\010\210\n\220!\330\004\013\2101\320\002\032\230+\240Q\330\004\007\200z\220\021\220'\230\021\330\006\007\330\n\016\210m\2303\230e\240=\260\001\330\n\016\210l\230#\230U\240!\340\006\r\210Q\320\002\032\230!\330\004\013\320\013\035\230Q\230d\240/\260\021\200!\330\004\n\320\n\035\230Q\230d\240!\2401\200\001\330\004-\250Q\250f\260A\200\001\360\010\000\005\016\210T\220\034\230T\240\030\250\024\250Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230;\240g\250Q\330\004\007\200q\330\010\017\320\0171\260\024\260Q\260g\270[\310\007""\310q\340\010\017\320\0171\260\024\260Q\260g\270[\310\001\200\001\360\010\000\005\016\210T\220\030\230\024\230V\2404\240v\250T\260\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0171\260\024\260Q\260g\270[\310\007\310q\340\010\017\320\0171\260\024\260Q\260g\270[\310\001\200\001\360\010\000\005\016\210T\220\031\230$\230h\240d\250!\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\025\250c\260\024\260\\\300\027\310\001\330\004\007\200q\330\010\017\320\0170\260\004\260A\260W\270K\300w\310a\340\010\017\320\0170\260\004\260A\260W\270K\300q\200!\330\004\010\210\005\210Z\220w\230a\230q\200!\330\034\035\330\004\013\210=\230\001\200!\330\034\035\330\004\013\210?\230!\200!\330\004\010\320\010\030\230\001\200!\200!\330\004\n\210!\200!\340\004\n\210!\200!\340\004\010\210\t\220\021\200!\340\004\010\210\010\220\001\320\002\036\230a\330\004\013\2104\210u\220O\2401\320\002\036\230a\330\004\013\2104\210y\230\001\230\021\320\002\036\230a\330\004\013\210=\230\001\230\023\230A\230T\240\036\250t\2601\320\002\036\230a\330\004\013\210=\230\001\230\024\230Q\320\002\030\230\001\330\004\013\210;\320\026&\240a\330\010\022\220$\220a\330\010\021\220\021\330\014\022\220%\220y\240\001\330\014\020\220\006\220i\230t\240:\250V\2601\330\r\021\320\021!\240\021\200!\330\004\010\320\010\030\230\001\330\004\010\210\010\220\r\320\035.\250a\250q\200!\340\004\013\210;\220a\220t\230?\250!\200!\330\004\010\210\010\220\r\320\035.\250a\250t\2601\200!\340\004\r\210[\230\001\330\004\n\210$\210a\210t\2207\230\"\230E\240\021\330\004\013\2101\200\001\330\004.\250a\250v\260Q\200!\340\004\005\330\010\t\330\022\031\230\021\230$\230f\240D\250\010\260\004\260F\270$\270f\300D\310\001\200!\330\004\013\320\013\036\230g\240Q\240d\250*\3204H\310\001\320\002\030\230\001\330\004\013\210;\220l\240!\330\010\016\210d\220!""\330\010\022\220$\220o\240T\320):\270!\330\010\r\210T\220\026\220y\240\006\240d\250,\260a\220q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220?\240(\250!\2501\330\004\007\200|\2207\230!\330\0101\260\021\3202D\300N\320RS\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023#\2408\2501\250A\330\004\007\200|\2207\230!\330\0102\260!\3203F\300n\320TU\330\004\013\2101\230q\320\002\022\220!\330\004\010\210\007\210q\220\001\320\002\022\220!\330\004\010\210\007\210q\220\001\220\021\320\002\033\320\033/\250q\330\004\r\210]\230!\2304\230q\330\004\n\210(\220$\220e\2308\2401\240E\250\021\330\004\013\2101\200!\330\004\010\210\007\210q\220\001\200!\330\027\037\230q\330\004\013\210=\230\002\230!\320\002\033\320\033/\250q\330\004\010\210\010\220\001\200!\360\006\000\007\020\210q\360\014\000\007\013\210*\220A\200!\330\027\037\230q\330\004\010\210\017\220q\330\004\005\200T\210\021\210!\330\004\013\2101\320\002\033\320\033/\250q\360\n\000\005\010\200v\210S\220\001\330\006\r\210Q\340\004\007\200t\2105\220\001\330\006\r\210Q\330\t\r\210T\220\021\330\006\r\210Q\340\004\017\210s\220!\2204\220q\330\004\022\220$\320\026)\250\021\330\010\022\220$\220n\240E\250\021\330\004\013\210=\230\001\230\032\2401\200!\330\004\007\200t\2104\210q\330\006\n\210/\230\030\240\024\240Q\240h\250a\330\004\t\210\024\320\r0\260\001\260\026\260q\330\004\006\200k\220\035\230a\230t\2401\330\004\013\2101\200!\360\020\000\005\010\200t\2105\220\007\220s\230!\330\006\r\210Q\330\004\013\2104\210u\220E\230\022\2304\230u\240A\320\002\032\230!\330\004\007\200t\2107\220#\220Q\330\006\t\210\024\210\\\230\023\230A\330\010\022\220!\340\010\017\210s\220!\2201\220D\230\014\240C\240q\340\006\r\210S\220\001\220\024\220V\230:\240Q\200!\330\004\007\200t\2107\220'\230\021\330\006\r\210T\220\021\340\006\r\320\r\035\230Q\330\006\t\210\024\210\\\230\027\240\001\330\010\014\210D\220\001\220\024\220Q\330\006\r\210Q\200!\330\004\007\200t\2107\220#\220U\230$\230d\240,\250c\260\021""\330\006\n\210.\230\001\330\t\r\210\\\230\027\240\005\240T\250\024\250\\\270\023\270A\340\006\007\340\006\t\210\024\210W\220C\220q\330\010\014\210I\220T\230\030\240\021\330\010\014\210N\230!\330\006\n\210&\220\004\220A\220Q\330\006\t\210\024\210V\2207\230\"\230D\240\001\330\010\014\210F\220%\220q\200!\330\004\007\200t\210:\220Q\220g\230Q\330\006\r\210Q\330\004\013\2104\210~\230S\240\005\240Q\200!\360\n\000\005\t\210\017\220t\320\033.\250a\330\010\014\210M\230\024\230^\2501\330\004\013\2101\200!\330\004\007\200t\210<\220s\230$\230a\330\006\r\210Q\330\004\013\2107\220!\330\004\013\2105\220\003\2204\220{\240$\240d\250*\260A\260U\270)\3001\300A\200!\330\004\007\200t\210<\220w\230a\330\006\r\210Q\330\t\r\210W\220G\2301\330\006\r\210T\220\026\220u\230A\340\006\r\210Q\200!\330\004\007\200t\210<\220w\230a\330\006\r\210U\220!\2207\230#\230T\240\021\330\t\r\210W\220G\2301\330\006\r\210T\220\026\220y\240\001\240\021\340\006\r\210Q\260\036\270u\300A\200!\340\004\007\200v\210S\220\001\330\006\r\210Q\340\004\013\320\013\033\2301\330\010\014\210E\220\022\2205\230\001\330\010\014\210G\2202\220U\230!\330\010\014\210H\220D\230\005\230R\230u\240J\250e\2601\330\010\014\210H\220D\230\005\230R\230u\240J\250e\2601\200!\340\004\007\200v\210S\220\001\330\006\r\210Q\340\004\007\200u\210K\220r\230\024\230Q\330\006\r\210Q\340\006\r\210Q\320\002\030\230\001\330\004\013\320\013\037\230w\240a\240t\250=\270\004\270A\200!\340\004\007\200z\220\021\220'\230\021\330\006\r\210T\220\027\230\003\2305\240\007\240t\2504\250{\270#\270U\300!\340\006\r\210Q\200!\340\004\007\200z\220\021\220'\230\021\330\006\r\210T\220\026\220s\230%\230q\340\006\r\210Q\200!\330\004\007\200z\220\021\220'\230\021\330\006\r\210T\220\026\220s\230%\230q\340\006\r\210Q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 373; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 40) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 373; i < 487; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 487; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 373; + for (Py_ssize_t i=0; i<114; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,1,100}; + int32_t const cint_constants_4[] = {1000000L,17678593L,50871570L,157087211L}; + int64_t const cint_constants_8[] = {9223372036854775807LL}; + for (int i = 0; i < 8; i++) { + numbertab[i] = PyLong_FromLongLong((i < 3 ? cint_constants_1[i - 0] : (i < 7 ? cint_constants_4[i - 3] : cint_constants_8[i - 7]))); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 8; + const char* c_constant = "-8000000000000"; + for (int i = 0; i < 1; i++) { + char *end_pos; + numbertab[i] = PyLong_FromString(c_constant, &end_pos, 32); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + c_constant = end_pos + 1; + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<9; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 11; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 695}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_child}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 724}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_segments}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 729}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_child}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 765}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_prefix, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_flattened}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_flattened, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 787}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 787}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 72}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_mi}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info, __pyx_mstate->__pyx_kp_b_iso88591_t4q_Qha_0_q_k_at1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 82}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 85}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 89}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 94}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 118}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_at7_E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 124}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_inc, __pyx_mstate->__pyx_kp_b_iso88591_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 127}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_dec, __pyx_mstate->__pyx_kp_b_iso88591_q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 130}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 144}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_Q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 149}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_monitoring_infos}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_A_t4q_0_a_a_oQ_Q_1_fD_t7_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 179}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 183}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_Q_e81E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 189}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 209}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_Q_T_oQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 214}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_monitoring_infos}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_A_31_A_A_O1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 235}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_K_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_4A_T_q_e81E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 243}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 247}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 254}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_Q_T_oQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 258}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 282}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_monitoring_infos}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_A_A_A_A_O1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 305}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 311}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_monitoring_infos}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_A_1_A_A_O1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 334}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 340}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_monitoring_infos}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info_im, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_A_A_O1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 351}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_z_T_s_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 362}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 366}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_fD_F_fD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 372}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_max, __pyx_mstate->__pyx_kp_b_iso88591_4uHD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 377}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_min, __pyx_mstate->__pyx_kp_b_iso88591_4uHD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 382}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_kp_b_iso88591_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 387}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_kp_b_iso88591_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 392}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_mean, __pyx_mstate->__pyx_kp_b_iso88591_t5_s_Q_4uE_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 406}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 410}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_z_T_s_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 417}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 421}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_2_HD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 425}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_kp_b_iso88591_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 430}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_kp_b_iso88591_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 446}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_G_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 451}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_z_T_5_t4_U_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 458}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4r_XT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 462}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_0_q_HD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 467}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_9AT_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 471}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 475}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_vS_Q_uKr_Q_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 485}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_singleton, __pyx_mstate->__pyx_kp_b_iso88591_9AWJa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 490}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_identity_element, __pyx_mstate->__pyx_kp_b_iso88591_9AS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 537}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_1D_d_fD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 541}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 544}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_vS_Q_1_E_5_G2U_HD_RuJe1_HD_RuJe, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 555}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_singleton, __pyx_mstate->__pyx_kp_b_iso88591_1G3gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 560}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_identity_element, __pyx_mstate->__pyx_kp_b_iso88591_1Cy_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_V4vT_G1F_a_vWE_Q_q_q_q_1_Qg_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 582}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_string_set, __pyx_mstate->__pyx_n_u_string_size, __pyx_mstate->__pyx_n_u_s}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_7_A_k_q_t1_A_t1_s_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 590}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_Q_z_m3e_l_U_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 598}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 601}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_wat_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 604}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_a_AT_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 607}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_3at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 610}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_strings}; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_t_a_M_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 619}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_combined, __pyx_mstate->__pyx_n_u_string_size}; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_q_vS_Q_t5_Q_T_Q_s_4q_nE_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 637}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_combined, __pyx_mstate->__pyx_n_u_current_size, __pyx_mstate->__pyx_n_u_others, __pyx_mstate->__pyx_n_u_string}; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add_until_capacity, __pyx_mstate->__pyx_kp_b_iso88591_Q_Bc_Q_q_AQ_1A_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 660}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_singleton, __pyx_mstate->__pyx_kp_b_iso88591_q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 664}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_identity_element, __pyx_mstate->__pyx_kp_b_iso88591__10, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 676}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_child}; + __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_proto, __pyx_mstate->__pyx_kp_b_iso88591_a_a_y_it_V1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 684}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_proto, __pyx_mstate->__pyx_n_u_node, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_from_proto, __pyx_mstate->__pyx_kp_b_iso88591_8_1_uA_q_q_1A_fIU_6_as_V1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 698}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 701}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_segments, __pyx_mstate->__pyx_n_u_head, __pyx_mstate->__pyx_n_u_tail}; + __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_contains, __pyx_mstate->__pyx_kp_b_iso88591_t_s_a_Q_7_5_4_d_AU_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 707}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_segments, __pyx_mstate->__pyx_n_u_head, __pyx_mstate->__pyx_n_u_tail, __pyx_mstate->__pyx_n_u_was_empty, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_n_u_delta}; + __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_Q_t_s_a_Q_7_D_D_avQ_vS_d_AX_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 723}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_segments_iter, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add_all, __pyx_mstate->__pyx_kp_b_iso88591_3iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 726}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_child, __pyx_mstate->__pyx_n_u_delta}; + __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_trim, __pyx_mstate->__pyx_kp_b_iso88591_A_t4q_Q_1D_T_y_s_b_a_q_iuA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 739}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_delta, __pyx_mstate->__pyx_n_u_other_child, __pyx_mstate->__pyx_n_u_self_child, __pyx_mstate->__pyx_n_u_prefix}; + __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_0_t1_a_a_b_a_q_U_a_T_uA_e7_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_Q_G1F_a_vWE_Q_q_t_gQ_q_1_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 799}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_size_2, __pyx_mstate->__pyx_kp_b_iso88591_t_wa_Q_WG1_T_uA_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 807}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_contains, __pyx_mstate->__pyx_kp_b_iso88591_t_wa_U_7_T_WG1_T_y_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 815}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_flattened, __pyx_mstate->__pyx_kp_b_iso88591_4xr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 818}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_proto, __pyx_mstate->__pyx_kp_b_iso88591_l_d_oT_T_y_d_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 824}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_proto}; + __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_from_proto, __pyx_mstate->__pyx_kp_b_iso88591_4A_e1_q__E1A_Kq_Q_IQm1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 833}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_root}; + __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_as_trie, __pyx_mstate->__pyx_kp_b_iso88591_t7_T_Q_D_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 854}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_a_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 857}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_t7_Q_A_s_1D_Cq_S_V_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 866}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_segments}; + __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_t7_U_d_c_T_A_WCq_IT_N_AQ_V7_D_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 880}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_combined}; + __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_1_t7_U_d_c_Q_gS_T_l_Q_Q_WCuD_WG, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 898}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_s}; + __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_singleton, __pyx_mstate->__pyx_kp_b_iso88591_q_q_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 904}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_identity_element, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_hd_G1F_a_vWE_Q_q_t7_c_q_0_AWK, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 920}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_bucket_type}; + __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 924}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 927}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_result}; + __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_q_4q_e81E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 932}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_Zwaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 935}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_a_4uO1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 938}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_info, __pyx_mstate->__pyx_kp_b_iso88591_1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 946}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_bucket_type}; + __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591__12, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 949}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 952}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_t_QgQ_Q_4_S_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 957}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 962}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 965}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_z_T_s_q_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 971}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 974}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_E_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 978}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_p99, __pyx_mstate->__pyx_kp_b_iso88591_4uJd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 982}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_p95, __pyx_mstate->__pyx_kp_b_iso88591_4uJd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 986}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_p90, __pyx_mstate->__pyx_kp_b_iso88591_4uJd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 990}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_histogram, __pyx_mstate->__pyx_kp_b_iso88591_4uA_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1003}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_histogram}; + __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1006}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_4_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1009}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1012}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_gQd_4H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1015}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1018}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_9_vS_Q_Zxq_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1024}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_bucket_type}; + __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_identity_element, __pyx_mstate->__pyx_kp_b_iso88591_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1028}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_4_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1031}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_to_proto, __pyx_mstate->__pyx_kp_b_iso88591_4z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1034}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_proto}; + __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_cells_py, __pyx_mstate->__pyx_n_u_from_proto, __pyx_mstate->__pyx_kp_b_iso88591_3ay, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DistributionData, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__BoundedTrieNode, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_BoundedTrieData, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* pybuiltin_invalid (used by pyint_simplify) */ +static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + if (argname) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", + argname, type_name, obj_type_name + ); + } else { + PyErr_Format(PyExc_TypeError, + "Expected %.200s, got " __Pyx_FMT_TYPENAME, + type_name, obj_type_name + ); + } + __Pyx_DECREF_TypeName(obj_type_name); +} + +/* pyint_simplify */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { + PyObject *number = *number_var; + if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { + return 0; + } + PyObject *int_object; + if (likely(PyNumber_Check(number))) { + int_object = PyNumber_Long(number); + if (unlikely(!int_object)) goto bad; + } else { + __Pyx_PyBuiltin_Invalid(number, "int", argname); + goto bad; + } + *number_var = int_object; + Py_DECREF(number); + return 0; +bad: + *number_var = NULL; + Py_DECREF(number); + return -1; +} + +/* PyObjectCallNoArg (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* pyfrozenset_new (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000) +#if CYTHON_COMPILING_IN_LIMITED_API + || __Pyx_get_runtime_version() >= 0x030A0000 +#endif + ) + return result; + { + Py_ssize_t size = __Pyx_PySet_GET_SIZE(result); + if (likely(size > 0)) + return result; +#if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) { + Py_DECREF(result); + return NULL; + } +#endif + } + Py_DECREF(result); +#endif + } + return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type); +} + +/* PySetContains */ +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return __Pyx_CallCFunction(cfunc, self, arg); + } else if (flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); + } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); + } + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); + } +#endif + PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + } else +#endif + { + result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); + } + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* RaiseClosureNameError */ +static void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* GetNameInClass */ +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + PyObject *dict; + assert(PyType_Check(nmspace)); +#if CYTHON_USE_TYPE_SLOTS + dict = ((PyTypeObject*)nmspace)->tp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* ClassMethod */ +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (PyMethodDescr_Check(method)) +#else + if (__Pyx_TypeCheck(method, &PyMethodDescr_Type)) +#endif + { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyErr_Format( + PyExc_SystemError, + "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. " + "This is most likely a classmethod in a cdef class method with binding=False. " + "Try setting 'binding' to True.", + method); +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PyTypeObject *d_type = GraalPyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); +#elif CYTHON_COMPILING_IN_GRAAL + PyTypeObject *d_type = PyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); +#else + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + PyTypeObject *d_type = descr->d_common.d_type; + return PyDescr_NewClassMethod(d_type, descr->d_method); +#endif + } +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API + else if (PyMethod_Check(method)) { + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else { + return PyClassMethod_New(method); + } +#else + { + PyObject *func=NULL; + PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; + if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { + func = PyObject_GetAttrString(method, "__func__"); + if (!func) goto bad; + } else { + func = method; + Py_INCREF(func); + } + builtins = PyEval_GetBuiltins(); // borrowed + if (unlikely(!builtins)) goto bad; + classmethod_str = PyUnicode_FromString("classmethod"); + if (unlikely(!classmethod_str)) goto bad; + classmethod = PyObject_GetItem(builtins, classmethod_str); + Py_DECREF(classmethod_str); + if (unlikely(!classmethod)) goto bad; + result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); + Py_DECREF(classmethod); + bad: + Py_XDECREF(func); + return result; + } +#endif +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* SwapException (used by CoroutineBase) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* IterNextPlain (used by CoroutineBase) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* ReturnWithStopIteration (used by CoroutineBase) */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase (used by Generator) */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; +#endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/metrics/cells.cp314-win_amd64.pyd b/sdks/python/apache_beam/metrics/cells.cp314-win_amd64.pyd new file mode 100644 index 000000000000..7888a331b089 Binary files /dev/null and b/sdks/python/apache_beam/metrics/cells.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/metrics/execution.c b/sdks/python/apache_beam/metrics/execution.c new file mode 100644 index 000000000000..2d6d6e4db447 --- /dev/null +++ b/sdks/python/apache_beam/metrics/execution.c @@ -0,0 +1,22285 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.metrics.execution", + "sources": [ + "apache_beam/metrics/execution.py" + ] + }, + "module_name": "apache_beam.metrics.execution" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__metrics__execution +#define __PYX_HAVE_API__apache_beam__metrics__execution +/* Early includes */ +#include +#include +#include + + #if CYTHON_COMPILING_IN_LIMITED_API + #ifdef _MSC_VER + #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.") + #else + #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API. + #endif + #endif + +#include "datetime.h" + + #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->DateTimeType) + #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType) + + #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC + #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name) + + /* Backport for Python < 3.10 */ + #if PY_VERSION_HEX < 0x030a00a1 + #ifndef PyDateTime_TIME_GET_TZINFO + #define PyDateTime_TIME_GET_TZINFO(o) ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None) + #endif + #ifndef PyDateTime_DATE_GET_TZINFO + #define PyDateTime_DATE_GET_TZINFO(o) ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None) + #endif + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/metrics/execution.py", + "cpython/datetime.pxd", + "apache_beam/metrics/execution.pxd", + "cpython/type.pxd", + "apache_beam/metrics/cells.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData; +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData; +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer; +struct __pyx_opt_args_7cpython_8datetime_time_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_new; +struct __pyx_opt_args_7cpython_8datetime_timezone_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp; + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_time_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_timezone_new { + int __pyx_n; + PyObject *name; +}; + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp { + int __pyx_n; + PyObject *tz; +}; + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab; + PyObject *_lock; + PyDateTime_DateTime *_start_time; +}; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int64_t value; +}; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data; +}; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + PyObject *data_class; + PyObject *data; +}; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":62 + * + * + * cdef class DistributionData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData { + PyObject_HEAD + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/metrics/cells.pxd":69 + * + * + * cdef class _BoundedTrieNode(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode { + PyObject_HEAD + int64_t _size; + PyObject *_children; + int _truncated; +}; + + +/* "apache_beam/metrics/cells.pxd":74 + * cdef readonly bint _truncated + * + * cdef class BoundedTrieData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData { + PyObject_HEAD + int64_t _bound; + PyObject *_singleton; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *_root; +}; + + +/* "apache_beam/metrics/execution.pxd":26 + * + * + * cdef class _TypedMetricName(object): # <<<<<<<<<<<<<< + * cdef readonly object cell_type + * cdef readonly object metric_name +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName { + PyObject_HEAD + PyObject *cell_type; + PyObject *metric_name; + PyObject *fast_name; + int64_t _hash; +}; + + +/* "apache_beam/metrics/execution.pxd":36 + * + * + * cdef class MetricUpdater(object): # <<<<<<<<<<<<<< + * cdef _TypedMetricName typed_metric_name + * cdef object default_value +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *typed_metric_name; + PyObject *default_value; + int process_wide; +}; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtab; + PyObject *step_name; + PyObject *lock; + PyObject *metrics; +}; + + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell { + int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update_locked)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; + + +/* "apache_beam/metrics/execution.py":238 + * + * + * class MetricsContainer(object): # <<<<<<<<<<<<<< + * """Holds the metrics of a single step and a single bundle. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*get_metric_cell)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* pyfrozenset_new.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* CallUnboundCMethod1.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto (used by CIntToPy) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_f_11apache_beam_7metrics_9execution_16MetricsContainer_get_metric_cell(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_typed_metric_name, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "datetime" */ + +/* Module declarations from "cpython.datetime" */ + +/* Module declarations from "apache_beam.metrics.cells" */ + +/* Module declarations from "apache_beam.metrics.execution" */ +static PyObject *__pyx_v_11apache_beam_7metrics_9execution_get_current_tracker = 0; +static PyObject *__pyx_v_11apache_beam_7metrics_9execution__DEFAULT = 0; +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.metrics.execution" +extern int __pyx_module_is_main_apache_beam__metrics__execution; +int __pyx_module_is_main_apache_beam__metrics__execution = 0; + +/* Implementation of "apache_beam.metrics.execution" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_property; +/* #### Code section: string_decls ### */ +static const char __pyx_k_This_module_is_for_internal_use[] = "\nThis module is for internal use only; no backwards-compatibility guarantees.\n\nThe classes in this file keep shared state, and organize metrics information.\n\nAvailable classes:\n\n- MetricKey - Internal key for a metric.\n- MetricResult - Current status of a metric's updates/commits.\n- _MetricsEnvironment - Keeps track of MetricsContainer and other metrics\n information for every single execution working thread.\n- MetricsContainer - Holds the metrics of a single step and a single\n unit-of-commit (bundle).\n"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_step, PyObject *__pyx_v_metric, PyObject *__pyx_v_labels); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_committed, PyObject *__pyx_v_attempted); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_8__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_10result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_current_container(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_2process_wide_container(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName___init__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self, PyObject *__pyx_v_cell_type, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_2__eq__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_4__hash__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_6__str__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_8__reduce__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater___init__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self, PyObject *__pyx_v_cell_type, PyObject *__pyx_v_metric_name, PyObject *__pyx_v_default_value, PyObject *__pyx_v_process_wide); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_2__call__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_4__reduce__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer___init__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_step_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_2get_counter(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_4get_distribution(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_6get_gauge(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_8get_string_set(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_10get_bounded_trie(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_12get_metric_cell(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_typed_metric_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_16to_runner_api(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_20reset(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_22__reduce__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics___get__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_2__set__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_4__del__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdates___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counters, PyObject *__pyx_v_distributions, PyObject *__pyx_v_gauges, PyObject *__pyx_v_string_sets, PyObject *__pyx_v_bounded_tries, PyObject *__pyx_v_histograms); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution__TypedMetricName(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution_MetricUpdater(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution_MetricsContainer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_8datetime_date; + PyTypeObject *__pyx_ptype_7cpython_8datetime_time; + PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime; + PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta; + PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData; + PyObject *__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName; + PyObject *__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater; + PyObject *__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_k__2; + PyObject *__pyx_tuple[11]; + PyObject *__pyx_codeobj_tab[26]; + PyObject *__pyx_string_tab[195]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Contains_updates_for_several_met __pyx_string_tab[1] +#define __pyx_kp_u_Holds_the_MetricsContainer_for_e __pyx_string_tab[2] +#define __pyx_kp_u_Keeps_track_of_the_status_of_a_m __pyx_string_tab[3] +#define __pyx_kp_u_Key_used_to_identify_instance_of __pyx_string_tab[4] +#define __pyx_kp_u_MetricKey_step_metric_labels __pyx_string_tab[5] +#define __pyx_kp_u_MetricResult_key_committed_attem __pyx_string_tab[6] +#define __pyx_kp_u_Missing_value_for_update_of_s __pyx_string_tab[7] +#define __pyx_kp_u__3 __pyx_string_tab[8] +#define __pyx_kp_u__4 __pyx_string_tab[9] +#define __pyx_kp_u_apache_beam_metrics_execution_py __pyx_string_tab[10] +#define __pyx_kp_u_disable __pyx_string_tab[11] +#define __pyx_kp_u_enable __pyx_string_tab[12] +#define __pyx_kp_u_gc __pyx_string_tab[13] +#define __pyx_kp_u_isenabled __pyx_string_tab[14] +#define __pyx_n_u_Any __pyx_string_tab[15] +#define __pyx_n_u_BoundedTrieCell __pyx_string_tab[16] +#define __pyx_n_u_BoundedTrieData __pyx_string_tab[17] +#define __pyx_n_u_CounterCell __pyx_string_tab[18] +#define __pyx_n_u_Dict __pyx_string_tab[19] +#define __pyx_n_u_DistributionCell __pyx_string_tab[20] +#define __pyx_n_u_DistributionData __pyx_string_tab[21] +#define __pyx_n_u_FrozenSet __pyx_string_tab[22] +#define __pyx_n_u_GaugeCell __pyx_string_tab[23] +#define __pyx_n_u_GaugeData __pyx_string_tab[24] +#define __pyx_n_u_HistogramCellFactory __pyx_string_tab[25] +#define __pyx_n_u_HistogramData __pyx_string_tab[26] +#define __pyx_n_u_Lock __pyx_string_tab[27] +#define __pyx_n_u_MetricCell __pyx_string_tab[28] +#define __pyx_n_u_MetricCellFactory __pyx_string_tab[29] +#define __pyx_n_u_MetricKey __pyx_string_tab[30] +#define __pyx_n_u_MetricKey___eq __pyx_string_tab[31] +#define __pyx_n_u_MetricKey___hash __pyx_string_tab[32] +#define __pyx_n_u_MetricKey___init __pyx_string_tab[33] +#define __pyx_n_u_MetricKey___repr __pyx_string_tab[34] +#define __pyx_n_u_MetricName __pyx_string_tab[35] +#define __pyx_n_u_MetricResult __pyx_string_tab[36] +#define __pyx_n_u_MetricResult___eq __pyx_string_tab[37] +#define __pyx_n_u_MetricResult___hash __pyx_string_tab[38] +#define __pyx_n_u_MetricResult___init __pyx_string_tab[39] +#define __pyx_n_u_MetricResult___repr __pyx_string_tab[40] +#define __pyx_n_u_MetricResult___str __pyx_string_tab[41] +#define __pyx_n_u_MetricResult_result __pyx_string_tab[42] +#define __pyx_n_u_MetricUpdater __pyx_string_tab[43] +#define __pyx_n_u_MetricUpdater___reduce __pyx_string_tab[44] +#define __pyx_n_u_MetricUpdates __pyx_string_tab[45] +#define __pyx_n_u_MetricUpdates___init __pyx_string_tab[46] +#define __pyx_n_u_MetricsContainer __pyx_string_tab[47] +#define __pyx_n_u_MetricsContainer___reduce __pyx_string_tab[48] +#define __pyx_n_u_MetricsContainer_get_bounded_tri __pyx_string_tab[49] +#define __pyx_n_u_MetricsContainer_get_counter __pyx_string_tab[50] +#define __pyx_n_u_MetricsContainer_get_cumulative __pyx_string_tab[51] +#define __pyx_n_u_MetricsContainer_get_distributio __pyx_string_tab[52] +#define __pyx_n_u_MetricsContainer_get_gauge __pyx_string_tab[53] +#define __pyx_n_u_MetricsContainer_get_metric_cell __pyx_string_tab[54] +#define __pyx_n_u_MetricsContainer_get_string_set __pyx_string_tab[55] +#define __pyx_n_u_MetricsContainer_reset __pyx_string_tab[56] +#define __pyx_n_u_MetricsContainer_to_runner_api __pyx_string_tab[57] +#define __pyx_n_u_MetricsContainer_to_runner_api_m __pyx_string_tab[58] +#define __pyx_n_u_MetricsEnvironment __pyx_string_tab[59] +#define __pyx_n_u_MetricsEnvironment_2 __pyx_string_tab[60] +#define __pyx_n_u_MetricsEnvironment_current_cont __pyx_string_tab[61] +#define __pyx_n_u_MetricsEnvironment_process_wide __pyx_string_tab[62] +#define __pyx_n_u_Optional __pyx_string_tab[63] +#define __pyx_n_u_PROCESS_WIDE_METRICS_CONTAINER __pyx_string_tab[64] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[65] +#define __pyx_n_u_StringSetCell __pyx_string_tab[66] +#define __pyx_n_u_StringSetData __pyx_string_tab[67] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[68] +#define __pyx_n_u_Type __pyx_string_tab[69] +#define __pyx_n_u_TypedMetricName __pyx_string_tab[70] +#define __pyx_n_u_TypedMetricName___reduce __pyx_string_tab[71] +#define __pyx_n_u_Union __pyx_string_tab[72] +#define __pyx_n_u_all_metrics __pyx_string_tab[73] +#define __pyx_n_u_apache_beam_metrics __pyx_string_tab[74] +#define __pyx_n_u_apache_beam_metrics_cells __pyx_string_tab[75] +#define __pyx_n_u_apache_beam_metrics_execution __pyx_string_tab[76] +#define __pyx_n_u_apache_beam_metrics_metricbase __pyx_string_tab[77] +#define __pyx_n_u_apache_beam_portability_api __pyx_string_tab[78] +#define __pyx_n_u_apache_beam_runners_worker __pyx_string_tab[79] +#define __pyx_n_u_apache_beam_runners_worker_state __pyx_string_tab[80] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[81] +#define __pyx_n_u_attempted __pyx_string_tab[82] +#define __pyx_n_u_bounded_tries __pyx_string_tab[83] +#define __pyx_n_u_cast __pyx_string_tab[84] +#define __pyx_n_u_cell __pyx_string_tab[85] +#define __pyx_n_u_cell_type __pyx_string_tab[86] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[87] +#define __pyx_n_u_committed __pyx_string_tab[88] +#define __pyx_n_u_counters __pyx_string_tab[89] +#define __pyx_n_u_current_container __pyx_string_tab[90] +#define __pyx_n_u_current_state __pyx_string_tab[91] +#define __pyx_n_u_default_value __pyx_string_tab[92] +#define __pyx_n_u_distributions __pyx_string_tab[93] +#define __pyx_n_u_doc __pyx_string_tab[94] +#define __pyx_n_u_enter __pyx_string_tab[95] +#define __pyx_n_u_eq __pyx_string_tab[96] +#define __pyx_n_u_exit __pyx_string_tab[97] +#define __pyx_n_u_fast_name __pyx_string_tab[98] +#define __pyx_n_u_format __pyx_string_tab[99] +#define __pyx_n_u_func __pyx_string_tab[100] +#define __pyx_n_u_gauges __pyx_string_tab[101] +#define __pyx_n_u_get __pyx_string_tab[102] +#define __pyx_n_u_get_bounded_trie __pyx_string_tab[103] +#define __pyx_n_u_get_counter __pyx_string_tab[104] +#define __pyx_n_u_get_cumulative __pyx_string_tab[105] +#define __pyx_n_u_get_current_tracker __pyx_string_tab[106] +#define __pyx_n_u_get_distribution __pyx_string_tab[107] +#define __pyx_n_u_get_gauge __pyx_string_tab[108] +#define __pyx_n_u_get_metric_cell __pyx_string_tab[109] +#define __pyx_n_u_get_string_set __pyx_string_tab[110] +#define __pyx_n_u_hash __pyx_string_tab[111] +#define __pyx_n_u_histograms __pyx_string_tab[112] +#define __pyx_n_u_init __pyx_string_tab[113] +#define __pyx_n_u_is_coroutine __pyx_string_tab[114] +#define __pyx_n_u_items __pyx_string_tab[115] +#define __pyx_n_u_k __pyx_string_tab[116] +#define __pyx_n_u_key __pyx_string_tab[117] +#define __pyx_n_u_labels __pyx_string_tab[118] +#define __pyx_n_u_main __pyx_string_tab[119] +#define __pyx_n_u_metaclass __pyx_string_tab[120] +#define __pyx_n_u_metric __pyx_string_tab[121] +#define __pyx_n_u_metric_name __pyx_string_tab[122] +#define __pyx_n_u_metrics_container __pyx_string_tab[123] +#define __pyx_n_u_metrics_pb2 __pyx_string_tab[124] +#define __pyx_n_u_mi __pyx_string_tab[125] +#define __pyx_n_u_module __pyx_string_tab[126] +#define __pyx_n_u_monitoring_infos __pyx_string_tab[127] +#define __pyx_n_u_mro_entries __pyx_string_tab[128] +#define __pyx_n_u_name __pyx_string_tab[129] +#define __pyx_n_u_object __pyx_string_tab[130] +#define __pyx_n_u_other __pyx_string_tab[131] +#define __pyx_n_u_pop __pyx_string_tab[132] +#define __pyx_n_u_prepare __pyx_string_tab[133] +#define __pyx_n_u_process_wide __pyx_string_tab[134] +#define __pyx_n_u_process_wide_container __pyx_string_tab[135] +#define __pyx_n_u_property __pyx_string_tab[136] +#define __pyx_n_u_pyx_capi __pyx_string_tab[137] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[138] +#define __pyx_n_u_qualname __pyx_string_tab[139] +#define __pyx_n_u_reduce __pyx_string_tab[140] +#define __pyx_n_u_repr __pyx_string_tab[141] +#define __pyx_n_u_reset __pyx_string_tab[142] +#define __pyx_n_u_result __pyx_string_tab[143] +#define __pyx_n_u_sampler __pyx_string_tab[144] +#define __pyx_n_u_self __pyx_string_tab[145] +#define __pyx_n_u_set_name __pyx_string_tab[146] +#define __pyx_n_u_setdefault __pyx_string_tab[147] +#define __pyx_n_u_statesampler __pyx_string_tab[148] +#define __pyx_n_u_step __pyx_string_tab[149] +#define __pyx_n_u_step_name __pyx_string_tab[150] +#define __pyx_n_u_str __pyx_string_tab[151] +#define __pyx_n_u_string_sets __pyx_string_tab[152] +#define __pyx_n_u_test __pyx_string_tab[153] +#define __pyx_n_u_threading __pyx_string_tab[154] +#define __pyx_n_u_to_key __pyx_string_tab[155] +#define __pyx_n_u_to_runner_api __pyx_string_tab[156] +#define __pyx_n_u_to_runner_api_monitoring_info __pyx_string_tab[157] +#define __pyx_n_u_to_runner_api_monitoring_infos __pyx_string_tab[158] +#define __pyx_n_u_to_runner_api_user_metric __pyx_string_tab[159] +#define __pyx_n_u_transform_id __pyx_string_tab[160] +#define __pyx_n_u_typed_metric_name __pyx_string_tab[161] +#define __pyx_n_u_typing __pyx_string_tab[162] +#define __pyx_n_u_update __pyx_string_tab[163] +#define __pyx_n_u_update_metric __pyx_string_tab[164] +#define __pyx_n_u_v __pyx_string_tab[165] +#define __pyx_n_u_value __pyx_string_tab[166] +#define __pyx_n_u_values __pyx_string_tab[167] +#define __pyx_kp_b_PyObject__DEFAULT_get_current_tr __pyx_string_tab[168] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[169] +#define __pyx_kp_b_iso88591_1_L __pyx_string_tab[170] +#define __pyx_kp_b_iso88591_1_a_a_A __pyx_string_tab[171] +#define __pyx_kp_b_iso88591_1_as_E_XV1 __pyx_string_tab[172] +#define __pyx_kp_b_iso88591_4_T_1_Q __pyx_string_tab[173] +#define __pyx_kp_b_iso88591_4_q_0_1B __pyx_string_tab[174] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[175] +#define __pyx_kp_b_iso88591_4q_A_Q __pyx_string_tab[176] +#define __pyx_kp_b_iso88591_4q_A_Qk __pyx_string_tab[177] +#define __pyx_kp_b_iso88591_4q_A_Qm1 __pyx_string_tab[178] +#define __pyx_kp_b_iso88591_4q_A_QoQ __pyx_string_tab[179] +#define __pyx_kp_b_iso88591_4r_V4_4q __pyx_string_tab[180] +#define __pyx_kp_b_iso88591_4r_WD_4q __pyx_string_tab[181] +#define __pyx_kp_b_iso88591_4xt1_q_uCq_q_t81_11B_A_1 __pyx_string_tab[182] +#define __pyx_kp_b_iso88591_5WA_G4y_A __pyx_string_tab[183] +#define __pyx_kp_b_iso88591_E_E_d_k_E_A_Ks_q __pyx_string_tab[184] +#define __pyx_kp_b_iso88591_F_U_D_5_HCuA __pyx_string_tab[185] +#define __pyx_kp_b_iso88591_IS_s_A_3a_s_k_A __pyx_string_tab[186] +#define __pyx_kp_b_iso88591_Q_d_4xvQ_3nA_E_1_q_Q_F_c_G1 __pyx_string_tab[187] +#define __pyx_kp_b_iso88591_WA_F_Qd_s_4q __pyx_string_tab[188] +#define __pyx_kp_b_iso88591__5 __pyx_string_tab[189] +#define __pyx_kp_b_iso88591_d_d __pyx_string_tab[190] +#define __pyx_kp_b_iso88591_hgQ_F __pyx_string_tab[191] +#define __pyx_kp_b_iso88591_l_a_xs_Q_7 __pyx_string_tab[192] +#define __pyx_kp_b_iso88591_q_Q_Q __pyx_string_tab[193] +#define __pyx_kp_b_iso88591_q_l_CuD_c_A_1_A_l_CuD_c_A_1_Q_l __pyx_string_tab[194] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer); + Py_CLEAR(clear_module_state->__pyx_k__2); + for (int i=0; i<11; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<26; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<195; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer); + Py_VISIT(traverse_module_state->__pyx_k__2); + for (int i=0; i<11; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<26; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<195; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":46 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":50 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":54 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":59 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":63 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":67 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":71 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":75 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":80 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":85 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":89 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":93 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":97 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":101 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":105 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":109 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":113 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":118 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":123 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":127 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":131 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + +static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) { + + /* "cpython/datetime.pxd":256 + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: + * PyDateTime_IMPORT # <<<<<<<<<<<<<< + * + * # Create date object using DateTime CAPI factory function. +*/ + (void)(PyDateTime_IMPORT); + + /* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + + /* function exit code */ +} + +/* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_new", 0); + + /* "cpython/datetime.pxd":261 + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) # <<<<<<<<<<<<<< + * + * # Create time object using DateTime CAPI factory function +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Date *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_Time *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("time_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":266 + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create datetime object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) + __pyx_r = ((PyDateTime_Time *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":271 + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + +static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) { + PyDateTime_Delta *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timedelta_new", 0); + + /* "cpython/datetime.pxd":276 + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) { + PyObject *__pyx_v_name = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timezone_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_name = __pyx_optional_args->name; + } + } + + /* "cpython/datetime.pxd":280 + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) # <<<<<<<<<<<<<< + * + * # Create datetime object using DB API constructor. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_name != Py_None); + if (__pyx_t_2) { + __pyx_t_1 = ((PyObject *)__pyx_v_name); + } else { + __pyx_t_1 = NULL; + } + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) { + PyObject *__pyx_v_tz = ((PyObject *)Py_None); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_from_timestamp", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_tz = __pyx_optional_args->tz; + } + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "cpython/datetime.pxd":285 + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) # <<<<<<<<<<<<<< + * + * # Create date object using DB API constructor. +*/ + __pyx_t_2 = (__pyx_v_tz != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_tz); + __Pyx_GIVEREF(__pyx_v_tz); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_from_timestamp", 0); + + /* "cpython/datetime.pxd":289 + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) # <<<<<<<<<<<<<< + * + * # More recognizable getters for date/time/datetime/timedelta. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_Date *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_utc", 0); + + /* "cpython/datetime.pxd":298 + * # Get UTC singleton + * cdef inline object get_utc(): + * return __Pyx_TimeZone_UTC # <<<<<<<<<<<<<< + * + * # Get tzinfo of time +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC)); + __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC); + goto __pyx_L0; + + /* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("time_tzinfo", 0); + + /* "cpython/datetime.pxd":302 + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): + * return PyDateTime_TIME_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get tzinfo of datetime +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("datetime_tzinfo", 0); + + /* "cpython/datetime.pxd":306 + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): + * return PyDateTime_DATE_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get year of date +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":310 + * # Get year of date + * cdef inline int date_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of date +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":314 + * # Get month of date + * cdef inline int date_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of date +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":318 + * # Get day of date + * cdef inline int date_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get year of datetime +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":322 + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of datetime +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":326 + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of datetime +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":330 + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get hour of time +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":334 + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: + * return PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of time +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":338 + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: + * return PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of time +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":342 + * # Get second of time + * cdef inline int time_second(object o) noexcept: + * return PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of time +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":346 + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of time +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":351 + * cdef inline int time_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get hour of datetime +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":355 + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: + * return PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":359 + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: + * return PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":363 + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: + * return PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":367 + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":372 + * cdef inline int datetime_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get days of timedelta +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":376 + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< + * + * # Get seconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":380 + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< + * + * # Get microseconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":384 + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< + * + * cdef inline double total_seconds(timedelta obj) noexcept: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + +static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) { + double __pyx_v_days; + double __pyx_v_seconds; + double __pyx_v_micros; + double __pyx_r; + + /* "cpython/datetime.pxd":392 + * cdef: + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) # <<<<<<<<<<<<<< + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) +*/ + __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":393 + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) # <<<<<<<<<<<<<< + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":394 + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) # <<<<<<<<<<<<<< + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":395 + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 # <<<<<<<<<<<<<< +*/ + __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":75 + * service. + * """ + * def __init__(self, step, metric, labels=None): # <<<<<<<<<<<<<< + * """Initializes ``MetricKey``. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_9MetricKey___init__, "Initializes ``MetricKey``.\n\n Args:\n step: A string with the step this metric cell is part of.\n metric: A ``MetricName`` namespace+name that identifies a metric.\n labels: An arbitrary set of labels that also identifies the metric.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_9MetricKey___init__}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_step = 0; + PyObject *__pyx_v_metric = 0; + PyObject *__pyx_v_labels = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_step,&__pyx_mstate_global->__pyx_n_u_metric,&__pyx_mstate_global->__pyx_n_u_labels,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 75, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 75, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 75, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 75, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_step = values[1]; + __pyx_v_metric = values[2]; + __pyx_v_labels = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_9MetricKey___init__(__pyx_self, __pyx_v_self, __pyx_v_step, __pyx_v_metric, __pyx_v_labels); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_step, PyObject *__pyx_v_metric, PyObject *__pyx_v_labels) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":83 + * labels: An arbitrary set of labels that also identifies the metric. + * """ + * self.step = step # <<<<<<<<<<<<<< + * self.metric = metric + * self.labels = labels if labels else {} +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step, __pyx_v_step) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":84 + * """ + * self.step = step + * self.metric = metric # <<<<<<<<<<<<<< + * self.labels = labels if labels else {} + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metric, __pyx_v_metric) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":85 + * self.step = step + * self.metric = metric + * self.labels = labels if labels else {} # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_labels); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 85, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_v_labels); + __pyx_t_1 = __pyx_v_labels; + } else { + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_labels, __pyx_t_1) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":75 + * service. + * """ + * def __init__(self, step, metric, labels=None): # <<<<<<<<<<<<<< + * """Initializes ``MetricKey``. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":87 + * self.labels = labels if labels else {} + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.step == other.step and self.metric == other.metric and +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 87, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 87, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 87, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 87, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 87, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 87, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 87, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 87, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/execution.py":88 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * self.step == other.step and self.metric == other.metric and + * self.labels == other.labels) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/execution.py":89 + * def __eq__(self, other): + * return ( + * self.step == other.step and self.metric == other.metric and # <<<<<<<<<<<<<< + * self.labels == other.labels) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 89, __pyx_L1_error) + if (__pyx_t_5) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metric); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_metric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 89, __pyx_L1_error) + if (__pyx_t_5) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/metrics/execution.py":90 + * return ( + * self.step == other.step and self.metric == other.metric and + * self.labels == other.labels) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":87 + * self.labels = labels if labels else {} + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.step == other.step and self.metric == other.metric and +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":92 + * self.labels == other.labels) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.step, self.metric, frozenset(self.labels))) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 92, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 92, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 92, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 92, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 92, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 92, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_hash_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/execution.py":93 + * + * def __hash__(self): + * return hash((self.step, self.metric, frozenset(self.labels))) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyFrozenSet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 93, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 93, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 93, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromHash_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":92 + * self.labels == other.labels) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.step, self.metric, frozenset(self.labels))) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":95 + * return hash((self.step, self.metric, frozenset(self.labels))) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricKey(step={}, metric={}, labels={})'.format( + * self.step, self.metric, self.labels) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_9MetricKey_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 95, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 95, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 95, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 95, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 95, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 95, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_9MetricKey_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/execution.py":96 + * + * def __repr__(self): + * return 'MetricKey(step={}, metric={}, labels={})'.format( # <<<<<<<<<<<<<< + * self.step, self.metric, self.labels) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_MetricKey_step_metric_labels; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/execution.py":97 + * def __repr__(self): + * return 'MetricKey(step={}, metric={}, labels={})'.format( + * self.step, self.metric, self.labels) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metric); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_labels); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":95 + * return hash((self.step, self.metric, frozenset(self.labels))) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricKey(step={}, metric={}, labels={})'.format( + * self.step, self.metric, self.labels) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricKey.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":115 + * of metric type result (e.g. int, DistributionResult, GaugeResult). + * """ + * def __init__(self, key, committed, attempted): # <<<<<<<<<<<<<< + * """Initializes ``MetricResult``. + * Args: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_12MetricResult___init__, "Initializes ``MetricResult``.\n Args:\n key: A ``MetricKey`` object.\n committed: Metric data that has been committed (e.g. logical updates)\n attempted: Metric data that has been attempted (e.g. physical updates)\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_12MetricResult___init__}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_committed = 0; + PyObject *__pyx_v_attempted = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_committed,&__pyx_mstate_global->__pyx_n_u_attempted,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 115, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 115, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 115, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 115, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 115, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 115, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 115, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 115, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 115, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 115, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 115, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_key = values[1]; + __pyx_v_committed = values[2]; + __pyx_v_attempted = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 115, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult___init__(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_committed, __pyx_v_attempted); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_committed, PyObject *__pyx_v_attempted) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":122 + * attempted: Metric data that has been attempted (e.g. physical updates) + * """ + * self.key = key # <<<<<<<<<<<<<< + * self.committed = committed + * self.attempted = attempted +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key, __pyx_v_key) < (0)) __PYX_ERR(0, 122, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":123 + * """ + * self.key = key + * self.committed = committed # <<<<<<<<<<<<<< + * self.attempted = attempted + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed, __pyx_v_committed) < (0)) __PYX_ERR(0, 123, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":124 + * self.key = key + * self.committed = committed + * self.attempted = attempted # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted, __pyx_v_attempted) < (0)) __PYX_ERR(0, 124, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":115 + * of metric type result (e.g. int, DistributionResult, GaugeResult). + * """ + * def __init__(self, key, committed, attempted): # <<<<<<<<<<<<<< + * """Initializes ``MetricResult``. + * Args: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":126 + * self.attempted = attempted + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.key == other.key and self.committed == other.committed and +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 126, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 126, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 126, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 126, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 126, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 126, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 126, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 126, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/execution.py":127 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * self.key == other.key and self.committed == other.committed and + * self.attempted == other.attempted) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/execution.py":128 + * def __eq__(self, other): + * return ( + * self.key == other.key and self.committed == other.committed and # <<<<<<<<<<<<<< + * self.attempted == other.attempted) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 128, __pyx_L1_error) + if (__pyx_t_5) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 128, __pyx_L1_error) + if (__pyx_t_5) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/metrics/execution.py":129 + * return ( + * self.key == other.key and self.committed == other.committed and + * self.attempted == other.attempted) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_attempted); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":126 + * self.attempted = attempted + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.key == other.key and self.committed == other.committed and +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":131 + * self.attempted == other.attempted) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.key, self.committed, self.attempted)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_5__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_5__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_5__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 131, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 131, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 131, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 131, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 131, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 131, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_4__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_4__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_hash_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/metrics/execution.py":132 + * + * def __hash__(self): + * return hash((self.key, self.committed, self.attempted)) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 132, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 132, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 132, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyLong_FromHash_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":131 + * self.attempted == other.attempted) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.key, self.committed, self.attempted)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":134 + * return hash((self.key, self.committed, self.attempted)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricResult(key={}, committed={}, attempted={})'.format( + * self.key, str(self.committed), str(self.attempted)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_7__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_7__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_7__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 134, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 134, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 134, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_6__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/metrics/execution.py":135 + * + * def __repr__(self): + * return 'MetricResult(key={}, committed={}, attempted={})'.format( # <<<<<<<<<<<<<< + * self.key, str(self.committed), str(self.attempted)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_MetricResult_key_committed_attem; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/metrics/execution.py":136 + * def __repr__(self): + * return 'MetricResult(key={}, committed={}, attempted={})'.format( + * self.key, str(self.committed), str(self.attempted)) # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":134 + * return hash((self.key, self.committed, self.attempted)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricResult(key={}, committed={}, attempted={})'.format( + * self.key, str(self.committed), str(self.attempted)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":138 + * self.key, str(self.committed), str(self.attempted)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return repr(self) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_9__str__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_9__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_9__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_9__str__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 138, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 138, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 138, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 138, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_8__str__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_8__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/metrics/execution.py":139 + * + * def __str__(self): + * return repr(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_Repr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":138 + * self.key, str(self.committed), str(self.attempted)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return repr(self) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":141 + * return repr(self) + * + * @property # <<<<<<<<<<<<<< + * def result(self): + * """Short-hand for falling back to attempted metrics if it seems that +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_11result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_12MetricResult_10result, "Short-hand for falling back to attempted metrics if it seems that\n committed was not populated (e.g. due to not being supported on a given\n runner"); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_11result = {"result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_11result, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_12MetricResult_10result}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_12MetricResult_11result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 141, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 141, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "result", 0) < (0)) __PYX_ERR(0, 141, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("result", 1, 1, 1, i); __PYX_ERR(0, 141, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 141, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("result", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 141, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_10result(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_12MetricResult_10result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("result", 0); + + /* "apache_beam/metrics/execution.py":146 + * committed was not populated (e.g. due to not being supported on a given + * runner""" + * return self.committed if self.committed else self.attempted # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_committed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":141 + * return repr(self) + * + * @property # <<<<<<<<<<<<<< + * def result(self): + * """Short-hand for falling back to attempted metrics if it seems that +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricResult.result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":155 + * track of global state. + * """ + * def current_container(self): # <<<<<<<<<<<<<< + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_1current_container(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_19_MetricsEnvironment_current_container, "Returns the current MetricsContainer."); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_19_MetricsEnvironment_1current_container = {"current_container", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_1current_container, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_19_MetricsEnvironment_current_container}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_1current_container(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_container (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 155, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "current_container", 0) < (0)) __PYX_ERR(0, 155, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("current_container", 1, 1, 1, i); __PYX_ERR(0, 155, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("current_container", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution._MetricsEnvironment.current_container", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_current_container(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_current_container(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_v_sampler = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_container", 0); + + /* "apache_beam/metrics/execution.py":157 + * def current_container(self): + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() # <<<<<<<<<<<<<< + * if sampler is None: + * return None +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_statesampler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_current_tracker); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_sampler = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":158 + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() + * if sampler is None: # <<<<<<<<<<<<<< + * return None + * return sampler.current_state().metrics_container +*/ + __pyx_t_6 = (__pyx_v_sampler == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/metrics/execution.py":159 + * sampler = statesampler.get_current_tracker() + * if sampler is None: + * return None # <<<<<<<<<<<<<< + * return sampler.current_state().metrics_container + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":158 + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() + * if sampler is None: # <<<<<<<<<<<<<< + * return None + * return sampler.current_state().metrics_container +*/ + } + + /* "apache_beam/metrics/execution.py":160 + * if sampler is None: + * return None + * return sampler.current_state().metrics_container # <<<<<<<<<<<<<< + * + * def process_wide_container(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_sampler; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_state, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_metrics_container); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":155 + * track of global state. + * """ + * def current_container(self): # <<<<<<<<<<<<<< + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution._MetricsEnvironment.current_container", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sampler); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":162 + * return sampler.current_state().metrics_container + * + * def process_wide_container(self): # <<<<<<<<<<<<<< + * """Returns the MetricsContainer for process wide metrics, e.g. memory.""" + * return PROCESS_WIDE_METRICS_CONTAINER +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_3process_wide_container(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_19_MetricsEnvironment_2process_wide_container, "Returns the MetricsContainer for process wide metrics, e.g. memory."); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_19_MetricsEnvironment_3process_wide_container = {"process_wide_container", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_3process_wide_container, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_19_MetricsEnvironment_2process_wide_container}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_19_MetricsEnvironment_3process_wide_container(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_wide_container (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 162, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_wide_container", 0) < (0)) __PYX_ERR(0, 162, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_wide_container", 1, 1, 1, i); __PYX_ERR(0, 162, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 162, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_wide_container", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 162, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution._MetricsEnvironment.process_wide_container", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_2process_wide_container(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_19_MetricsEnvironment_2process_wide_container(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_wide_container", 0); + + /* "apache_beam/metrics/execution.py":164 + * def process_wide_container(self): + * """Returns the MetricsContainer for process wide metrics, e.g. memory.""" + * return PROCESS_WIDE_METRICS_CONTAINER # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PROCESS_WIDE_METRICS_CONTAINER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":162 + * return sampler.current_state().metrics_container + * + * def process_wide_container(self): # <<<<<<<<<<<<<< + * """Returns the MetricsContainer for process wide metrics, e.g. memory.""" + * return PROCESS_WIDE_METRICS_CONTAINER +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.execution._MetricsEnvironment.process_wide_container", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":172 + * class _TypedMetricName(object): + * """Like MetricName, but also stores the cell type of the metric.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_cell_type = 0; + PyObject *__pyx_v_metric_name = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cell_type,&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 172, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 172, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 172, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 172, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 172, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 172, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 172, __pyx_L3_error) + } + __pyx_v_cell_type = values[0]; + __pyx_v_metric_name = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 172, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution._TypedMetricName.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName___init__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self), __pyx_v_cell_type, __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName___init__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self, PyObject *__pyx_v_cell_type, PyObject *__pyx_v_metric_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + Py_hash_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":178 + * ): + * # type: (...) -> None + * self.cell_type = cell_type # <<<<<<<<<<<<<< + * self.metric_name = metric_name + * if isinstance(metric_name, str): +*/ + __Pyx_INCREF(__pyx_v_cell_type); + __Pyx_GIVEREF(__pyx_v_cell_type); + __Pyx_GOTREF(__pyx_v_self->cell_type); + __Pyx_DECREF(__pyx_v_self->cell_type); + __pyx_v_self->cell_type = __pyx_v_cell_type; + + /* "apache_beam/metrics/execution.py":179 + * # type: (...) -> None + * self.cell_type = cell_type + * self.metric_name = metric_name # <<<<<<<<<<<<<< + * if isinstance(metric_name, str): + * self.fast_name = metric_name +*/ + __Pyx_INCREF(__pyx_v_metric_name); + __Pyx_GIVEREF(__pyx_v_metric_name); + __Pyx_GOTREF(__pyx_v_self->metric_name); + __Pyx_DECREF(__pyx_v_self->metric_name); + __pyx_v_self->metric_name = __pyx_v_metric_name; + + /* "apache_beam/metrics/execution.py":180 + * self.cell_type = cell_type + * self.metric_name = metric_name + * if isinstance(metric_name, str): # <<<<<<<<<<<<<< + * self.fast_name = metric_name + * else: +*/ + __pyx_t_1 = PyUnicode_Check(__pyx_v_metric_name); + if (__pyx_t_1) { + + /* "apache_beam/metrics/execution.py":181 + * self.metric_name = metric_name + * if isinstance(metric_name, str): + * self.fast_name = metric_name # <<<<<<<<<<<<<< + * else: + * self.fast_name = metric_name.fast_name() +*/ + __Pyx_INCREF(__pyx_v_metric_name); + __Pyx_GIVEREF(__pyx_v_metric_name); + __Pyx_GOTREF(__pyx_v_self->fast_name); + __Pyx_DECREF(__pyx_v_self->fast_name); + __pyx_v_self->fast_name = __pyx_v_metric_name; + + /* "apache_beam/metrics/execution.py":180 + * self.cell_type = cell_type + * self.metric_name = metric_name + * if isinstance(metric_name, str): # <<<<<<<<<<<<<< + * self.fast_name = metric_name + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/metrics/execution.py":183 + * self.fast_name = metric_name + * else: + * self.fast_name = metric_name.fast_name() # <<<<<<<<<<<<<< + * # Cached for speed, as this is used as a key for every counter update. + * self._hash = hash((cell_type, self.fast_name)) +*/ + /*else*/ { + __pyx_t_3 = __pyx_v_metric_name; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fast_name, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->fast_name); + __Pyx_DECREF(__pyx_v_self->fast_name); + __pyx_v_self->fast_name = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "apache_beam/metrics/execution.py":185 + * self.fast_name = metric_name.fast_name() + * # Cached for speed, as this is used as a key for every counter update. + * self._hash = hash((cell_type, self.fast_name)) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cell_type); + __Pyx_GIVEREF(__pyx_v_cell_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cell_type) != (0)) __PYX_ERR(0, 185, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->fast_name); + __Pyx_GIVEREF(__pyx_v_self->fast_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->fast_name) != (0)) __PYX_ERR(0, 185, __pyx_L1_error); + __pyx_t_5 = PyObject_Hash(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_hash = __pyx_t_5; + + /* "apache_beam/metrics/execution.py":172 + * class _TypedMetricName(object): + * """Like MetricName, but also stores the cell type of the metric.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.execution._TypedMetricName.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":187 + * self._hash = hash((cell_type, self.fast_name)) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self is other or ( + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_3__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_2__eq__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_2__eq__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/metrics/execution.py":188 + * + * def __eq__(self, other): + * return self is other or ( # <<<<<<<<<<<<<< + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (((PyObject *)__pyx_v_self) == __pyx_v_other); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/metrics/execution.py":189 + * def __eq__(self, other): + * return self is other or ( + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->cell_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 189, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_fast_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->fast_name, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":187 + * self._hash = hash((cell_type, self.fast_name)) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self is other or ( + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution._TypedMetricName.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":191 + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return self._hash + * +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_5__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_5__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_4__hash__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_4__hash__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + Py_hash_t __pyx_r; + + /* "apache_beam/metrics/execution.py":192 + * + * def __hash__(self): + * return self._hash # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __pyx_r = __pyx_v_self->_hash; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":191 + * self.cell_type == other.cell_type and self.fast_name == other.fast_name) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return self._hash + * +*/ + + /* function exit code */ + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":194 + * return self._hash + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '%s %s' % (self.cell_type, self.metric_name) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_7__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_7__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_6__str__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_6__str__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3[3]; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/metrics/execution.py":195 + * + * def __str__(self): + * return '%s %s' % (self.cell_type, self.metric_name) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->cell_type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->metric_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3[0] = __pyx_t_1; + __pyx_t_3[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_3[2] = __pyx_t_2; + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":194 + * return self._hash + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '%s %s' % (self.cell_type, self.metric_name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution._TypedMetricName.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":197 + * return '%s %s' % (self.cell_type, self.metric_name) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return _TypedMetricName, (self.cell_type, self.metric_name) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_8__reduce__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_8__reduce__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/metrics/execution.py":198 + * + * def __reduce__(self): + * return _TypedMetricName, (self.cell_type, self.metric_name) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->cell_type); + __Pyx_GIVEREF(__pyx_v_self->cell_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->cell_type) != (0)) __PYX_ERR(0, 198, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->metric_name); + __Pyx_GIVEREF(__pyx_v_self->metric_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->metric_name) != (0)) __PYX_ERR(0, 198, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName)) != (0)) __PYX_ERR(0, 198, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 198, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":197 + * return '%s %s' % (self.cell_type, self.metric_name) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return _TypedMetricName, (self.cell_type, self.metric_name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.execution._TypedMetricName.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.pxd":27 + * + * cdef class _TypedMetricName(object): + * cdef readonly object cell_type # <<<<<<<<<<<<<< + * cdef readonly object metric_name + * cdef readonly object fast_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type___get__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->cell_type); + __pyx_r = __pyx_v_self->cell_type; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.pxd":28 + * cdef class _TypedMetricName(object): + * cdef readonly object cell_type + * cdef readonly object metric_name # <<<<<<<<<<<<<< + * cdef readonly object fast_name + * cdef libc.stdint.int64_t _hash +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name___get__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->metric_name); + __pyx_r = __pyx_v_self->metric_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.pxd":29 + * cdef readonly object cell_type + * cdef readonly object metric_name + * cdef readonly object fast_name # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t _hash + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name___get__(((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name___get__(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->fast_name); + __pyx_r = __pyx_v_self->fast_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":206 + * class MetricUpdater(object): + * """A callable that updates the metric as quickly as possible.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_cell_type = 0; + PyObject *__pyx_v_metric_name = 0; + PyObject *__pyx_v_default_value = 0; + PyObject *__pyx_v_process_wide = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cell_type,&__pyx_mstate_global->__pyx_n_u_metric_name,&__pyx_mstate_global->__pyx_n_u_default_value,&__pyx_mstate_global->__pyx_n_u_process_wide,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 206, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 206, __pyx_L3_error) + + /* "apache_beam/metrics/execution.py":210 + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] + * metric_name, # type: Union[str, MetricName] + * default_value=None, # <<<<<<<<<<<<<< + * process_wide=False): + * self.process_wide = process_wide +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":211 + * metric_name, # type: Union[str, MetricName] + * default_value=None, + * process_wide=False): # <<<<<<<<<<<<<< + * self.process_wide = process_wide + * self.typed_metric_name = _TypedMetricName(cell_type, metric_name) +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 206, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 206, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 206, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/metrics/execution.py":210 + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] + * metric_name, # type: Union[str, MetricName] + * default_value=None, # <<<<<<<<<<<<<< + * process_wide=False): + * self.process_wide = process_wide +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":211 + * metric_name, # type: Union[str, MetricName] + * default_value=None, + * process_wide=False): # <<<<<<<<<<<<<< + * self.process_wide = process_wide + * self.typed_metric_name = _TypedMetricName(cell_type, metric_name) +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_cell_type = values[0]; + __pyx_v_metric_name = values[1]; + __pyx_v_default_value = values[2]; + __pyx_v_process_wide = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 206, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdater.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater___init__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)__pyx_v_self), __pyx_v_cell_type, __pyx_v_metric_name, __pyx_v_default_value, __pyx_v_process_wide); + + /* "apache_beam/metrics/execution.py":206 + * class MetricUpdater(object): + * """A callable that updates the metric as quickly as possible.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater___init__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self, PyObject *__pyx_v_cell_type, PyObject *__pyx_v_metric_name, PyObject *__pyx_v_default_value, PyObject *__pyx_v_process_wide) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":212 + * default_value=None, + * process_wide=False): + * self.process_wide = process_wide # <<<<<<<<<<<<<< + * self.typed_metric_name = _TypedMetricName(cell_type, metric_name) + * self.default_value = default_value +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_process_wide); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_v_self->process_wide = __pyx_t_1; + + /* "apache_beam/metrics/execution.py":213 + * process_wide=False): + * self.process_wide = process_wide + * self.typed_metric_name = _TypedMetricName(cell_type, metric_name) # <<<<<<<<<<<<<< + * self.default_value = default_value + * +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_cell_type, __pyx_v_metric_name}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->typed_metric_name); + __Pyx_DECREF((PyObject *)__pyx_v_self->typed_metric_name); + __pyx_v_self->typed_metric_name = ((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":214 + * self.process_wide = process_wide + * self.typed_metric_name = _TypedMetricName(cell_type, metric_name) + * self.default_value = default_value # <<<<<<<<<<<<<< + * + * def __call__(self, value=_DEFAULT): +*/ + __Pyx_INCREF(__pyx_v_default_value); + __Pyx_GIVEREF(__pyx_v_default_value); + __Pyx_GOTREF(__pyx_v_self->default_value); + __Pyx_DECREF(__pyx_v_self->default_value); + __pyx_v_self->default_value = __pyx_v_default_value; + + /* "apache_beam/metrics/execution.py":206 + * class MetricUpdater(object): + * """A callable that updates the metric as quickly as possible.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * cell_type, # type: Union[Type[MetricCell], MetricCellFactory] +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdater.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":216 + * self.default_value = default_value + * + * def __call__(self, value=_DEFAULT): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * if value is _DEFAULT: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 216, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 216, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 216, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 216, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2); + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 216, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdater.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_2__call__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_2__call__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_v_tracker = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_INCREF(__pyx_v_value); + + /* "apache_beam/metrics/execution.py":218 + * def __call__(self, value=_DEFAULT): + * # type: (Any) -> None + * if value is _DEFAULT: # <<<<<<<<<<<<<< + * if self.default_value is _DEFAULT: + * raise ValueError( +*/ + __pyx_t_1 = (__pyx_v_value == __pyx_v_11apache_beam_7metrics_9execution__DEFAULT); + if (__pyx_t_1) { + + /* "apache_beam/metrics/execution.py":219 + * # type: (Any) -> None + * if value is _DEFAULT: + * if self.default_value is _DEFAULT: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) +*/ + __pyx_t_1 = (__pyx_v_self->default_value == __pyx_v_11apache_beam_7metrics_9execution__DEFAULT); + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/metrics/execution.py":220 + * if value is _DEFAULT: + * if self.default_value is _DEFAULT: + * raise ValueError( # <<<<<<<<<<<<<< + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) + * value = self.default_value +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/metrics/execution.py":221 + * if self.default_value is _DEFAULT: + * raise ValueError( + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) # <<<<<<<<<<<<<< + * value = self.default_value + * if self.process_wide: +*/ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Missing_value_for_update_of_s, __pyx_v_self->typed_metric_name->fast_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 220, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":219 + * # type: (Any) -> None + * if value is _DEFAULT: + * if self.default_value is _DEFAULT: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) +*/ + } + + /* "apache_beam/metrics/execution.py":222 + * raise ValueError( + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) + * value = self.default_value # <<<<<<<<<<<<<< + * if self.process_wide: + * MetricsEnvironment.process_wide_container().get_metric_cell( +*/ + __pyx_t_2 = __pyx_v_self->default_value; + __Pyx_INCREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":218 + * def __call__(self, value=_DEFAULT): + * # type: (Any) -> None + * if value is _DEFAULT: # <<<<<<<<<<<<<< + * if self.default_value is _DEFAULT: + * raise ValueError( +*/ + } + + /* "apache_beam/metrics/execution.py":223 + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) + * value = self.default_value + * if self.process_wide: # <<<<<<<<<<<<<< + * MetricsEnvironment.process_wide_container().get_metric_cell( + * self.typed_metric_name).update(value) +*/ + if (__pyx_v_self->process_wide) { + + /* "apache_beam/metrics/execution.py":224 + * value = self.default_value + * if self.process_wide: + * MetricsEnvironment.process_wide_container().get_metric_cell( # <<<<<<<<<<<<<< + * self.typed_metric_name).update(value) + * else: +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_process_wide_container); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_6 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_6); + + /* "apache_beam/metrics/execution.py":225 + * if self.process_wide: + * MetricsEnvironment.process_wide_container().get_metric_cell( + * self.typed_metric_name).update(value) # <<<<<<<<<<<<<< + * else: + * tracker = get_current_tracker() +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self->typed_metric_name)}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_metric_cell, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":223 + * 'Missing value for update of %s' % self.typed_metric_name.fast_name) + * value = self.default_value + * if self.process_wide: # <<<<<<<<<<<<<< + * MetricsEnvironment.process_wide_container().get_metric_cell( + * self.typed_metric_name).update(value) +*/ + goto __pyx_L5; + } + + /* "apache_beam/metrics/execution.py":227 + * self.typed_metric_name).update(value) + * else: + * tracker = get_current_tracker() # <<<<<<<<<<<<<< + * if tracker is not None: + * tracker.update_metric(self.typed_metric_name, value) +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_11apache_beam_7metrics_9execution_get_current_tracker); + __pyx_t_4 = __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_tracker = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":228 + * else: + * tracker = get_current_tracker() + * if tracker is not None: # <<<<<<<<<<<<<< + * tracker.update_metric(self.typed_metric_name, value) + * +*/ + __pyx_t_1 = (__pyx_v_tracker != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/metrics/execution.py":229 + * tracker = get_current_tracker() + * if tracker is not None: + * tracker.update_metric(self.typed_metric_name, value) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_4 = __pyx_v_tracker; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_self->typed_metric_name), __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_metric, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":228 + * else: + * tracker = get_current_tracker() + * if tracker is not None: # <<<<<<<<<<<<<< + * tracker.update_metric(self.typed_metric_name, value) + * +*/ + } + } + __pyx_L5:; + + /* "apache_beam/metrics/execution.py":216 + * self.default_value = default_value + * + * def __call__(self, value=_DEFAULT): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * if value is _DEFAULT: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdater.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tracker); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":231 + * tracker.update_metric(self.typed_metric_name, value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return MetricUpdater, ( + * self.typed_metric_name.cell_type, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_4__reduce__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdater_4__reduce__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/metrics/execution.py":232 + * + * def __reduce__(self): + * return MetricUpdater, ( # <<<<<<<<<<<<<< + * self.typed_metric_name.cell_type, + * self.typed_metric_name.metric_name, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/metrics/execution.py":233 + * def __reduce__(self): + * return MetricUpdater, ( + * self.typed_metric_name.cell_type, # <<<<<<<<<<<<<< + * self.typed_metric_name.metric_name, + * self.default_value) +*/ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->typed_metric_name->cell_type); + __Pyx_GIVEREF(__pyx_v_self->typed_metric_name->cell_type); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->typed_metric_name->cell_type) != (0)) __PYX_ERR(0, 233, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->typed_metric_name->metric_name); + __Pyx_GIVEREF(__pyx_v_self->typed_metric_name->metric_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->typed_metric_name->metric_name) != (0)) __PYX_ERR(0, 233, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->default_value); + __Pyx_GIVEREF(__pyx_v_self->default_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->default_value) != (0)) __PYX_ERR(0, 233, __pyx_L1_error); + + /* "apache_beam/metrics/execution.py":232 + * + * def __reduce__(self): + * return MetricUpdater, ( # <<<<<<<<<<<<<< + * self.typed_metric_name.cell_type, + * self.typed_metric_name.metric_name, +*/ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater)) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":231 + * tracker.update_metric(self.typed_metric_name, value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return MetricUpdater, ( + * self.typed_metric_name.cell_type, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdater.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":243 + * Or the metrics associated with the process/SDK harness. I.e. memory usage. + * """ + * def __init__(self, step_name): # <<<<<<<<<<<<<< + * self.step_name = step_name + * self.lock = threading.Lock() +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_step_name = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 243, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 243, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 243, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 243, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer___init__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_step_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer___init__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_step_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":244 + * """ + * def __init__(self, step_name): + * self.step_name = step_name # <<<<<<<<<<<<<< + * self.lock = threading.Lock() + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] +*/ + __Pyx_INCREF(__pyx_v_step_name); + __Pyx_GIVEREF(__pyx_v_step_name); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = __pyx_v_step_name; + + /* "apache_beam/metrics/execution.py":245 + * def __init__(self, step_name): + * self.step_name = step_name + * self.lock = threading.Lock() # <<<<<<<<<<<<<< + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->lock); + __Pyx_DECREF(__pyx_v_self->lock); + __pyx_v_self->lock = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":246 + * self.step_name = step_name + * self.lock = threading.Lock() + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] # <<<<<<<<<<<<<< + * + * def get_counter(self, metric_name): +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->metrics); + __Pyx_DECREF(__pyx_v_self->metrics); + __pyx_v_self->metrics = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":243 + * Or the metrics associated with the process/SDK harness. I.e. memory usage. + * """ + * def __init__(self, step_name): # <<<<<<<<<<<<<< + * self.step_name = step_name + * self.lock = threading.Lock() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":248 + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] + * + * def get_counter(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> CounterCell + * return cast( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter = {"get_counter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_counter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 248, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 248, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_counter", 0) < (0)) __PYX_ERR(0, 248, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_counter", 1, 1, 1, i); __PYX_ERR(0, 248, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 248, __pyx_L3_error) + } + __pyx_v_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_counter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 248, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_2get_counter(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_2get_counter(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_counter", 0); + + /* "apache_beam/metrics/execution.py":250 + * def get_counter(self, metric_name): + * # type: (MetricName) -> CounterCell + * return cast( # <<<<<<<<<<<<<< + * CounterCell, + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":251 + * # type: (MetricName) -> CounterCell + * return cast( + * CounterCell, # <<<<<<<<<<<<<< + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CounterCell); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/metrics/execution.py":252 + * return cast( + * CounterCell, + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) # <<<<<<<<<<<<<< + * + * def get_distribution(self, metric_name): +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CounterCell); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_metric_name}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self->__pyx_vtab)->get_metric_cell(__pyx_v_self, ((PyObject *)__pyx_t_5), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":248 + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] + * + * def get_counter(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> CounterCell + * return cast( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":254 + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) + * + * def get_distribution(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> DistributionCell + * return cast( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution = {"get_distribution", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_distribution (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 254, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 254, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_distribution", 0) < (0)) __PYX_ERR(0, 254, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_distribution", 1, 1, 1, i); __PYX_ERR(0, 254, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 254, __pyx_L3_error) + } + __pyx_v_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_distribution", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 254, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_distribution", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_4get_distribution(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_4get_distribution(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_distribution", 0); + + /* "apache_beam/metrics/execution.py":256 + * def get_distribution(self, metric_name): + * # type: (MetricName) -> DistributionCell + * return cast( # <<<<<<<<<<<<<< + * DistributionCell, + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":257 + * # type: (MetricName) -> DistributionCell + * return cast( + * DistributionCell, # <<<<<<<<<<<<<< + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DistributionCell); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/metrics/execution.py":258 + * return cast( + * DistributionCell, + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) # <<<<<<<<<<<<<< + * + * def get_gauge(self, metric_name): +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DistributionCell); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_metric_name}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self->__pyx_vtab)->get_metric_cell(__pyx_v_self, ((PyObject *)__pyx_t_5), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":254 + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) + * + * def get_distribution(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> DistributionCell + * return cast( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_distribution", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":260 + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) + * + * def get_gauge(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> GaugeCell + * return cast( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge = {"get_gauge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_gauge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 260, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 260, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_gauge", 0) < (0)) __PYX_ERR(0, 260, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_gauge", 1, 1, 1, i); __PYX_ERR(0, 260, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 260, __pyx_L3_error) + } + __pyx_v_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_gauge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 260, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_gauge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_6get_gauge(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_6get_gauge(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_gauge", 0); + + /* "apache_beam/metrics/execution.py":262 + * def get_gauge(self, metric_name): + * # type: (MetricName) -> GaugeCell + * return cast( # <<<<<<<<<<<<<< + * GaugeCell, + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":263 + * # type: (MetricName) -> GaugeCell + * return cast( + * GaugeCell, # <<<<<<<<<<<<<< + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GaugeCell); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/metrics/execution.py":264 + * return cast( + * GaugeCell, + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) # <<<<<<<<<<<<<< + * + * def get_string_set(self, metric_name): +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_GaugeCell); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_metric_name}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self->__pyx_vtab)->get_metric_cell(__pyx_v_self, ((PyObject *)__pyx_t_5), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":260 + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) + * + * def get_gauge(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> GaugeCell + * return cast( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_gauge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":266 + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) + * + * def get_string_set(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> StringSetCell + * return cast( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set = {"get_string_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_string_set (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 266, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_string_set", 0) < (0)) __PYX_ERR(0, 266, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_string_set", 1, 1, 1, i); __PYX_ERR(0, 266, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + } + __pyx_v_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_string_set", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 266, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_string_set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_8get_string_set(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_8get_string_set(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_string_set", 0); + + /* "apache_beam/metrics/execution.py":268 + * def get_string_set(self, metric_name): + * # type: (MetricName) -> StringSetCell + * return cast( # <<<<<<<<<<<<<< + * StringSetCell, + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":269 + * # type: (MetricName) -> StringSetCell + * return cast( + * StringSetCell, # <<<<<<<<<<<<<< + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_StringSetCell); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/metrics/execution.py":270 + * return cast( + * StringSetCell, + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) # <<<<<<<<<<<<<< + * + * def get_bounded_trie(self, metric_name): +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_StringSetCell); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_metric_name}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self->__pyx_vtab)->get_metric_cell(__pyx_v_self, ((PyObject *)__pyx_t_5), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":266 + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) + * + * def get_string_set(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> StringSetCell + * return cast( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_string_set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":272 + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) + * + * def get_bounded_trie(self, metric_name): # <<<<<<<<<<<<<< + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie = {"get_bounded_trie", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_bounded_trie (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 272, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_bounded_trie", 0) < (0)) __PYX_ERR(0, 272, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_bounded_trie", 1, 1, 1, i); __PYX_ERR(0, 272, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + } + __pyx_v_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_bounded_trie", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 272, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_bounded_trie", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_10get_bounded_trie(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_10get_bounded_trie(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_bounded_trie", 0); + + /* "apache_beam/metrics/execution.py":273 + * + * def get_bounded_trie(self, metric_name): + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) # <<<<<<<<<<<<<< + * + * def get_metric_cell(self, typed_metric_name): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BoundedTrieCell); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_metric_name}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self->__pyx_vtab)->get_metric_cell(__pyx_v_self, ((PyObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":272 + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) + * + * def get_bounded_trie(self, metric_name): # <<<<<<<<<<<<<< + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_bounded_trie", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":275 + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * + * def get_metric_cell(self, typed_metric_name): # <<<<<<<<<<<<<< + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) +*/ + +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_f_11apache_beam_7metrics_9execution_16MetricsContainer_get_metric_cell(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_typed_metric_name, int __pyx_skip_dispatch) { + PyObject *__pyx_v_cell = NULL; + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_metric_cell", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_metric_cell); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell)) { + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_typed_metric_name}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell))))) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/metrics/execution.py":277 + * def get_metric_cell(self, typed_metric_name): + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) # <<<<<<<<<<<<<< + * if cell is None: + * with self.lock: +*/ + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 277, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->metrics, __pyx_v_typed_metric_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_cell = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":278 + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) + * if cell is None: # <<<<<<<<<<<<<< + * with self.lock: + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() +*/ + __pyx_t_6 = (__pyx_v_cell == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/metrics/execution.py":279 + * cell = self.metrics.get(typed_metric_name, None) + * if cell is None: + * with self.lock: # <<<<<<<<<<<<<< + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() + * return cell +*/ + /*with:*/ { + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/metrics/execution.py":280 + * if cell is None: + * with self.lock: + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() # <<<<<<<<<<<<<< + * return cell + * +*/ + __pyx_t_4 = __pyx_v_typed_metric_name; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cell_type, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_cell, __pyx_t_1); + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 280, __pyx_L8_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_self->metrics, __pyx_v_typed_metric_name, __pyx_t_1) < 0))) __PYX_ERR(0, 280, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":279 + * cell = self.metrics.get(typed_metric_name, None) + * if cell is None: + * with self.lock: # <<<<<<<<<<<<<< + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() + * return cell +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L13_try_end; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_metric_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 279, __pyx_L10_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L10_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 279, __pyx_L10_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_6 < (0)) __PYX_ERR(0, 279, __pyx_L10_except_error) + __pyx_t_12 = (!__pyx_t_6); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 279, __pyx_L10_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L9_exception_handled; + } + __pyx_L10_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L9_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L13_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_7) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L7; + } + __pyx_L7:; + } + goto __pyx_L17; + __pyx_L4_error:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/metrics/execution.py":278 + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) + * if cell is None: # <<<<<<<<<<<<<< + * with self.lock: + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() +*/ + } + + /* "apache_beam/metrics/execution.py":281 + * with self.lock: + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() + * return cell # <<<<<<<<<<<<<< + * + * def get_cumulative(self): +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + if (!(likely(((__pyx_v_cell) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_cell, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell))))) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_INCREF(__pyx_v_cell); + __pyx_r = ((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_v_cell); + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":275 + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * + * def get_metric_cell(self, typed_metric_name): # <<<<<<<<<<<<<< + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_metric_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cell); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell = {"get_metric_cell", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_typed_metric_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_metric_cell (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_typed_metric_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 275, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 275, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_metric_cell", 0) < (0)) __PYX_ERR(0, 275, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_metric_cell", 1, 1, 1, i); __PYX_ERR(0, 275, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 275, __pyx_L3_error) + } + __pyx_v_typed_metric_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_metric_cell", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 275, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_metric_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_12get_metric_cell(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_typed_metric_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_12get_metric_cell(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_typed_metric_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_metric_cell", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_7metrics_9execution_16MetricsContainer_get_metric_cell(__pyx_v_self, __pyx_v_typed_metric_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_metric_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":283 + * return cell + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> MetricUpdates + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative, "Return MetricUpdates with cumulative values of all metrics in container.\n\n This returns all the cumulative values for all metrics.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative = {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_cumulative (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_cumulative", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_cumulative", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + PyObject *__pyx_v_counters = NULL; + PyObject *__pyx_v_distributions = NULL; + PyObject *__pyx_v_gauges = NULL; + PyObject *__pyx_v_string_sets = NULL; + PyObject *__pyx_v_bounded_tries = NULL; + PyObject *__pyx_v_histograms = NULL; + PyObject *__pyx_7genexpr__pyx_v_k = NULL; + PyObject *__pyx_7genexpr__pyx_v_v = NULL; + PyObject *__pyx_8genexpr1__pyx_v_k = NULL; + PyObject *__pyx_8genexpr1__pyx_v_v = NULL; + PyObject *__pyx_8genexpr2__pyx_v_k = NULL; + PyObject *__pyx_8genexpr2__pyx_v_v = NULL; + PyObject *__pyx_8genexpr3__pyx_v_k = NULL; + PyObject *__pyx_8genexpr3__pyx_v_v = NULL; + PyObject *__pyx_8genexpr4__pyx_v_k = NULL; + PyObject *__pyx_8genexpr4__pyx_v_v = NULL; + PyObject *__pyx_8genexpr5__pyx_v_k = NULL; + PyObject *__pyx_8genexpr5__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cumulative", 0); + + /* "apache_beam/metrics/execution.py":290 + * This returns all the cumulative values for all metrics. + * """ + * counters = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == CounterCell +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":292 + * counters = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == CounterCell # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 292, __pyx_L5_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CounterCell); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 292, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":291 + * """ + * counters = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() if k.cell_type == CounterCell + * } +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_self->step_name, __pyx_t_11}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_11 = __pyx_7genexpr__pyx_v_v; + __Pyx_INCREF(__pyx_t_11); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_9, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":292 + * counters = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == CounterCell # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_v_counters = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":295 + * } + * + * distributions = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == DistributionCell +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":297 + * distributions = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == DistributionCell # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_4 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 297, __pyx_L12_error) + } + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_7; + __pyx_t_7 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_3, &__pyx_t_4, &__pyx_t_7, &__pyx_t_9, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DistributionCell); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 297, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":296 + * + * distributions = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() if k.cell_type == DistributionCell + * } +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 296, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_self->step_name, __pyx_t_6}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_6 = __pyx_8genexpr1__pyx_v_v; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 296, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_11, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 296, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/metrics/execution.py":297 + * distributions = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == DistributionCell # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; + goto __pyx_L16_exit_scope; + __pyx_L12_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L16_exit_scope:; + } /* exit inner scope */ + __pyx_v_distributions = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":300 + * } + * + * gauges = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == GaugeCell +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":302 + * gauges = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == GaugeCell # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 302, __pyx_L19_error) + } + __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_9; + __pyx_t_9 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_9, &__pyx_t_11, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_k, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_v, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_GaugeCell); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 302, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":301 + * + * gauges = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() if k.cell_type == GaugeCell + * } +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 301, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_self->step_name, __pyx_t_7}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_7 = __pyx_8genexpr2__pyx_v_v; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 301, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_6, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 301, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/execution.py":302 + * gauges = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == GaugeCell # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); __pyx_8genexpr2__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; + goto __pyx_L23_exit_scope; + __pyx_L19_error:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); __pyx_8genexpr2__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); __pyx_8genexpr2__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L23_exit_scope:; + } /* exit inner scope */ + __pyx_v_gauges = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":305 + * } + * + * string_sets = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == StringSetCell +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":307 + * string_sets = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == StringSetCell # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_4 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 307, __pyx_L26_error) + } + __pyx_t_11 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_5)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_11; + __pyx_t_11 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_3, &__pyx_t_4, &__pyx_t_11, &__pyx_t_6, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_k, __pyx_t_11); + __pyx_t_11 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_v, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_StringSetCell); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 307, __pyx_L26_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":306 + * + * string_sets = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() if k.cell_type == StringSetCell + * } +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 306, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_v_self->step_name, __pyx_t_9}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 306, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_9 = __pyx_8genexpr3__pyx_v_v; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L26_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_7, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 306, __pyx_L26_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/metrics/execution.py":307 + * string_sets = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == StringSetCell # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_k); __pyx_8genexpr3__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); __pyx_8genexpr3__pyx_v_v = 0; + goto __pyx_L30_exit_scope; + __pyx_L26_error:; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_k); __pyx_8genexpr3__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); __pyx_8genexpr3__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L30_exit_scope:; + } /* exit inner scope */ + __pyx_v_string_sets = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":310 + * } + * + * bounded_tries = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == BoundedTrieCell +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":312 + * bounded_tries = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == BoundedTrieCell # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 312, __pyx_L33_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_k, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_v, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BoundedTrieCell); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 312, __pyx_L33_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":311 + * + * bounded_tries = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() if k.cell_type == BoundedTrieCell + * } +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 311, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_self->step_name, __pyx_t_11}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 311, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_11 = __pyx_8genexpr4__pyx_v_v; + __Pyx_INCREF(__pyx_t_11); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L33_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_9, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 311, __pyx_L33_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":312 + * bounded_tries = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() if k.cell_type == BoundedTrieCell # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0; + goto __pyx_L37_exit_scope; + __pyx_L33_error:; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); __pyx_8genexpr4__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L37_exit_scope:; + } /* exit inner scope */ + __pyx_v_bounded_tries = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":315 + * } + * + * histograms = { # <<<<<<<<<<<<<< + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":317 + * histograms = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() # <<<<<<<<<<<<<< + * if isinstance(k.cell_type, HistogramCellFactory) + * } +*/ + __pyx_t_4 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 317, __pyx_L40_error) + } + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 317, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_7; + __pyx_t_7 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_3, &__pyx_t_4, &__pyx_t_7, &__pyx_t_9, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 317, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_k, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_v, __pyx_t_9); + __pyx_t_9 = 0; + + /* "apache_beam/metrics/execution.py":318 + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() + * if isinstance(k.cell_type, HistogramCellFactory) # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_k, __pyx_mstate_global->__pyx_n_u_cell_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 318, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HistogramCellFactory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = PyObject_IsInstance(__pyx_t_9, __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L40_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_10) { + + /* "apache_beam/metrics/execution.py":316 + * + * histograms = { + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() # <<<<<<<<<<<<<< + * for k, v in self.metrics.items() + * if isinstance(k.cell_type, HistogramCellFactory) +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MetricKey); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_k, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 316, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_self->step_name, __pyx_t_6}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 316, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_6 = __pyx_8genexpr5__pyx_v_v; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 316, __pyx_L40_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/metrics/execution.py":318 + * MetricKey(self.step_name, k.metric_name): v.get_cumulative() + * for k, v in self.metrics.items() + * if isinstance(k.cell_type, HistogramCellFactory) # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v); __pyx_8genexpr5__pyx_v_v = 0; + goto __pyx_L44_exit_scope; + __pyx_L40_error:; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v); __pyx_8genexpr5__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L44_exit_scope:; + } /* exit inner scope */ + __pyx_v_histograms = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":321 + * } + * + * return MetricUpdates( # <<<<<<<<<<<<<< + * counters, distributions, gauges, string_sets, bounded_tries, histograms) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MetricUpdates); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/metrics/execution.py":322 + * + * return MetricUpdates( + * counters, distributions, gauges, string_sets, bounded_tries, histograms) # <<<<<<<<<<<<<< + * + * def to_runner_api(self): +*/ + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_counters, __pyx_v_distributions, __pyx_v_gauges, __pyx_v_string_sets, __pyx_v_bounded_tries, __pyx_v_histograms}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (7-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":283 + * return cell + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> MetricUpdates + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.get_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_counters); + __Pyx_XDECREF(__pyx_v_distributions); + __Pyx_XDECREF(__pyx_v_gauges); + __Pyx_XDECREF(__pyx_v_string_sets); + __Pyx_XDECREF(__pyx_v_bounded_tries); + __Pyx_XDECREF(__pyx_v_histograms); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_k); + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_v); + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_k); + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_v); + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_v); + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":324 + * counters, distributions, gauges, string_sets, bounded_tries, histograms) + * + * def to_runner_api(self): # <<<<<<<<<<<<<< + * return [ + * cell.to_runner_api_user_metric(key.metric_name) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api = {"to_runner_api", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_runner_api", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_runner_api", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_16to_runner_api(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_16to_runner_api(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + PyObject *__pyx_8genexpr6__pyx_v_key = NULL; + PyObject *__pyx_8genexpr6__pyx_v_cell = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api", 0); + + /* "apache_beam/metrics/execution.py":325 + * + * def to_runner_api(self): + * return [ # <<<<<<<<<<<<<< + * cell.to_runner_api_user_metric(key.metric_name) + * for key, cell in self.metrics.items() +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/metrics/execution.py":327 + * return [ + * cell.to_runner_api_user_metric(key.metric_name) + * for key, cell in self.metrics.items() # <<<<<<<<<<<<<< + * ] + * +*/ + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 327, __pyx_L5_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 327, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_key, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_cell, __pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":326 + * def to_runner_api(self): + * return [ + * cell.to_runner_api_user_metric(key.metric_name) # <<<<<<<<<<<<<< + * for key, cell in self.metrics.items() + * ] +*/ + __pyx_t_6 = __pyx_8genexpr6__pyx_v_cell; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_key, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_runner_api_user_metric, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 325, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_cell); __pyx_8genexpr6__pyx_v_cell = 0; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_key); __pyx_8genexpr6__pyx_v_key = 0; + goto __pyx_L8_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_cell); __pyx_8genexpr6__pyx_v_cell = 0; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_key); __pyx_8genexpr6__pyx_v_key = 0; + goto __pyx_L1_error; + __pyx_L8_exit_scope:; + } /* exit inner scope */ + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":324 + * counters, distributions, gauges, string_sets, bounded_tries, histograms) + * + * def to_runner_api(self): # <<<<<<<<<<<<<< + * return [ + * cell.to_runner_api_user_metric(key.metric_name) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.to_runner_api", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_key); + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_cell); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":330 + * ] + * + * def to_runner_api_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos, "Returns a list of MonitoringInfos for the metrics in this container."); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos = {"to_runner_api_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_runner_api_monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 330, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 330, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_runner_api_monitoring_infos", 0) < (0)) __PYX_ERR(0, 330, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_infos", 1, 1, 1, i); __PYX_ERR(0, 330, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 330, __pyx_L3_error) + } + __pyx_v_transform_id = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_runner_api_monitoring_infos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 330, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.to_runner_api_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_v_items = NULL; + PyObject *__pyx_v_all_metrics = NULL; + PyObject *__pyx_8genexpr7__pyx_v_key = NULL; + PyObject *__pyx_8genexpr7__pyx_v_cell = NULL; + PyObject *__pyx_8genexpr8__pyx_v_mi = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *(*__pyx_t_16)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_runner_api_monitoring_infos", 0); + + /* "apache_beam/metrics/execution.py":334 + * + * """Returns a list of MonitoringInfos for the metrics in this container.""" + * with self.lock: # <<<<<<<<<<<<<< + * items = list(self.metrics.items()) + * all_metrics = [ +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/metrics/execution.py":335 + * """Returns a list of MonitoringInfos for the metrics in this container.""" + * with self.lock: + * items = list(self.metrics.items()) # <<<<<<<<<<<<<< + * all_metrics = [ + * cell.to_runner_api_monitoring_info(key.metric_name, transform_id) +*/ + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 335, __pyx_L7_error) + } + __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_self->metrics); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_items = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/metrics/execution.py":334 + * + * """Returns a list of MonitoringInfos for the metrics in this container.""" + * with self.lock: # <<<<<<<<<<<<<< + * items = list(self.metrics.items()) + * all_metrics = [ +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.to_runner_api_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 334, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 334, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 334, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 334, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_3); + __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 334, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/metrics/execution.py":336 + * with self.lock: + * items = list(self.metrics.items()) + * all_metrics = [ # <<<<<<<<<<<<<< + * cell.to_runner_api_monitoring_info(key.metric_name, transform_id) + * for key, cell in items +*/ + { /* enter inner scope */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":338 + * all_metrics = [ + * cell.to_runner_api_monitoring_info(key.metric_name, transform_id) + * for key, cell in items # <<<<<<<<<<<<<< + * ] + * return { +*/ + if (unlikely(!__pyx_v_items)) { __Pyx_RaiseUnboundLocalError("items"); __PYX_ERR(0, 338, __pyx_L19_error) } + __pyx_t_2 = __pyx_v_items; __Pyx_INCREF(__pyx_t_2); + __pyx_t_13 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 338, __pyx_L19_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_13; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_4); + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 338, __pyx_L19_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_14); + } else { + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_14 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_XGOTREF(__pyx_t_14); + } + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_14); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_15 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 338, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); + index = 0; __pyx_t_9 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_9)) goto __pyx_L22_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L22_unpacking_failed; + __Pyx_GOTREF(__pyx_t_14); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < (0)) __PYX_ERR(0, 338, __pyx_L19_error) + __pyx_t_16 = NULL; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L23_unpacking_done; + __pyx_L22_unpacking_failed:; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_16 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 338, __pyx_L19_error) + __pyx_L23_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_key, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_cell, __pyx_t_14); + __pyx_t_14 = 0; + + /* "apache_beam/metrics/execution.py":337 + * items = list(self.metrics.items()) + * all_metrics = [ + * cell.to_runner_api_monitoring_info(key.metric_name, transform_id) # <<<<<<<<<<<<<< + * for key, cell in items + * ] +*/ + __pyx_t_14 = __pyx_8genexpr7__pyx_v_cell; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr7__pyx_v_key, __pyx_mstate_global->__pyx_n_u_metric_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_9, __pyx_v_transform_id}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_info, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 336, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/execution.py":338 + * all_metrics = [ + * cell.to_runner_api_monitoring_info(key.metric_name, transform_id) + * for key, cell in items # <<<<<<<<<<<<<< + * ] + * return { +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_cell); __pyx_8genexpr7__pyx_v_cell = 0; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key); __pyx_8genexpr7__pyx_v_key = 0; + goto __pyx_L25_exit_scope; + __pyx_L19_error:; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_cell); __pyx_8genexpr7__pyx_v_cell = 0; + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key); __pyx_8genexpr7__pyx_v_key = 0; + goto __pyx_L1_error; + __pyx_L25_exit_scope:; + } /* exit inner scope */ + __pyx_v_all_metrics = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/metrics/execution.py":340 + * for key, cell in items + * ] + * return { # <<<<<<<<<<<<<< + * monitoring_infos.to_key(mi): mi + * for mi in all_metrics if mi is not None +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/metrics/execution.py":342 + * return { + * monitoring_infos.to_key(mi): mi + * for mi in all_metrics if mi is not None # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_2 = __pyx_v_all_metrics; __Pyx_INCREF(__pyx_t_2); + __pyx_t_13 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 342, __pyx_L28_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_13; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_mi, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_12 = (__pyx_8genexpr8__pyx_v_mi != Py_None); + if (__pyx_t_12) { + + /* "apache_beam/metrics/execution.py":341 + * ] + * return { + * monitoring_infos.to_key(mi): mi # <<<<<<<<<<<<<< + * for mi in all_metrics if mi is not None + * } +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 341, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 341, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_15); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_8genexpr8__pyx_v_mi}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_t_4, (PyObject*)__pyx_8genexpr8__pyx_v_mi))) __PYX_ERR(0, 341, __pyx_L28_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/metrics/execution.py":342 + * return { + * monitoring_infos.to_key(mi): mi + * for mi in all_metrics if mi is not None # <<<<<<<<<<<<<< + * } + * +*/ + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_mi); __pyx_8genexpr8__pyx_v_mi = 0; + goto __pyx_L33_exit_scope; + __pyx_L28_error:; + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_mi); __pyx_8genexpr8__pyx_v_mi = 0; + goto __pyx_L1_error; + __pyx_L33_exit_scope:; + } /* exit inner scope */ + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/metrics/execution.py":330 + * ] + * + * def to_runner_api_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.to_runner_api_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_items); + __Pyx_XDECREF(__pyx_v_all_metrics); + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key); + __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_cell); + __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_mi); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":345 + * } + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_21reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_20reset, "Reset all metrics in the MetricsContainer. This does not delete added\n metrics.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_21reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_21reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_20reset}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_21reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_20reset(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_20reset(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + PyObject *__pyx_v_metric = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/metrics/execution.py":352 + * """ + * + * for metric in self.metrics.values(): # <<<<<<<<<<<<<< + * metric.reset() + * +*/ + __pyx_t_2 = 0; + if (unlikely(__pyx_v_self->metrics == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 352, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->metrics, 1, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); + if (unlikely(__pyx_t_6 == 0)) break; + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_metric, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/metrics/execution.py":353 + * + * for metric in self.metrics.values(): + * metric.reset() # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_7 = __pyx_v_metric; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":345 + * } + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_metric); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":355 + * metric.reset() + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_22__reduce__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_22__reduce__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/metrics/execution.py":356 + * + * def __reduce__(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 356, __pyx_L1_error) + + /* "apache_beam/metrics/execution.py":355 + * metric.reset() + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.pxd":45 + * cdef object step_name + * cdef object lock + * cdef public dict metrics # <<<<<<<<<<<<<< + * cpdef MetricCell get_metric_cell(self, metric_key) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics___get__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics___get__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->metrics); + __pyx_r = __pyx_v_self->metrics; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_2__set__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_2__set__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(2, 45, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->metrics); + __Pyx_DECREF(__pyx_v_self->metrics); + __pyx_v_self->metrics = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricsContainer.metrics.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_4__del__(((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_4__del__(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->metrics); + __Pyx_DECREF(__pyx_v_self->metrics); + __pyx_v_self->metrics = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/metrics/execution.py":369 + * it's an int. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdates_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7metrics_9execution_13MetricUpdates___init__, "Create a MetricUpdates object.\n\n Args:\n counters: Dictionary of MetricKey:MetricUpdate updates.\n distributions: Dictionary of MetricKey:MetricUpdate objects.\n gauges: Dictionary of MetricKey:MetricUpdate objects.\n string_sets: Dictionary of MetricKey:MetricUpdate objects.\n bounded_tries: Dictionary of MetricKey:MetricUpdate objects.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7metrics_9execution_13MetricUpdates_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdates_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_13MetricUpdates___init__}; +static PyObject *__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdates_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_counters = 0; + PyObject *__pyx_v_distributions = 0; + PyObject *__pyx_v_gauges = 0; + PyObject *__pyx_v_string_sets = 0; + PyObject *__pyx_v_bounded_tries = 0; + PyObject *__pyx_v_histograms = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_counters,&__pyx_mstate_global->__pyx_n_u_distributions,&__pyx_mstate_global->__pyx_n_u_gauges,&__pyx_mstate_global->__pyx_n_u_string_sets,&__pyx_mstate_global->__pyx_n_u_bounded_tries,&__pyx_mstate_global->__pyx_n_u_histograms,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 369, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 369, __pyx_L3_error) + + /* "apache_beam/metrics/execution.py":371 + * def __init__( + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] # <<<<<<<<<<<<<< + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":372 + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] # <<<<<<<<<<<<<< + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":373 + * counters=None, # type: Optional[Dict[MetricKey, int]] + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] # <<<<<<<<<<<<<< + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":374 + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] # <<<<<<<<<<<<<< + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":375 + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] # <<<<<<<<<<<<<< + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] + * ): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":376 + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] # <<<<<<<<<<<<<< + * ): + * # type: (...) -> None +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, i); __PYX_ERR(0, 369, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 369, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 369, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/metrics/execution.py":371 + * def __init__( + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] # <<<<<<<<<<<<<< + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":372 + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] # <<<<<<<<<<<<<< + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":373 + * counters=None, # type: Optional[Dict[MetricKey, int]] + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] # <<<<<<<<<<<<<< + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":374 + * distributions=None, # type: Optional[Dict[MetricKey, DistributionData]] + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] # <<<<<<<<<<<<<< + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":375 + * gauges=None, # type: Optional[Dict[MetricKey, GaugeData]] + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] # <<<<<<<<<<<<<< + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] + * ): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/metrics/execution.py":376 + * string_sets=None, # type: Optional[Dict[MetricKey, StringSetData]] + * bounded_tries=None, # type: Optional[Dict[MetricKey, BoundedTrieData]] + * histograms=None, # type: Optional[Dict[MetricKey, HistogramData]] # <<<<<<<<<<<<<< + * ): + * # type: (...) -> None +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_counters = values[1]; + __pyx_v_distributions = values[2]; + __pyx_v_gauges = values[3]; + __pyx_v_string_sets = values[4]; + __pyx_v_bounded_tries = values[5]; + __pyx_v_histograms = values[6]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 369, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdates.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdates___init__(__pyx_self, __pyx_v_self, __pyx_v_counters, __pyx_v_distributions, __pyx_v_gauges, __pyx_v_string_sets, __pyx_v_bounded_tries, __pyx_v_histograms); + + /* "apache_beam/metrics/execution.py":369 + * it's an int. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7metrics_9execution_13MetricUpdates___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counters, PyObject *__pyx_v_distributions, PyObject *__pyx_v_gauges, PyObject *__pyx_v_string_sets, PyObject *__pyx_v_bounded_tries, PyObject *__pyx_v_histograms) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/metrics/execution.py":389 + * bounded_tries: Dictionary of MetricKey:MetricUpdate objects. + * """ + * self.counters = counters or {} # <<<<<<<<<<<<<< + * self.distributions = distributions or {} + * self.gauges = gauges or {} +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_counters); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 389, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_counters); + __pyx_t_1 = __pyx_v_counters; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters, __pyx_t_1) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":390 + * """ + * self.counters = counters or {} + * self.distributions = distributions or {} # <<<<<<<<<<<<<< + * self.gauges = gauges or {} + * self.string_sets = string_sets or {} +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_distributions); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 390, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_distributions); + __pyx_t_1 = __pyx_v_distributions; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L5_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_distributions, __pyx_t_1) < (0)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":391 + * self.counters = counters or {} + * self.distributions = distributions or {} + * self.gauges = gauges or {} # <<<<<<<<<<<<<< + * self.string_sets = string_sets or {} + * self.bounded_tries = bounded_tries or {} +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_gauges); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 391, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_gauges); + __pyx_t_1 = __pyx_v_gauges; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L7_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_gauges, __pyx_t_1) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":392 + * self.distributions = distributions or {} + * self.gauges = gauges or {} + * self.string_sets = string_sets or {} # <<<<<<<<<<<<<< + * self.bounded_tries = bounded_tries or {} + * self.histograms = histograms or {} +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_string_sets); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 392, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_string_sets); + __pyx_t_1 = __pyx_v_string_sets; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L9_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_string_sets, __pyx_t_1) < (0)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":393 + * self.gauges = gauges or {} + * self.string_sets = string_sets or {} + * self.bounded_tries = bounded_tries or {} # <<<<<<<<<<<<<< + * self.histograms = histograms or {} +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_bounded_tries); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 393, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_bounded_tries); + __pyx_t_1 = __pyx_v_bounded_tries; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L11_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_bounded_tries, __pyx_t_1) < (0)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":394 + * self.string_sets = string_sets or {} + * self.bounded_tries = bounded_tries or {} + * self.histograms = histograms or {} # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_histograms); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 394, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_histograms); + __pyx_t_1 = __pyx_v_histograms; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L13_bool_binop_done:; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_histograms, __pyx_t_1) < (0)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/metrics/execution.py":369 + * it's an int. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.metrics.execution.MetricUpdates.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution__TypedMetricName(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)o); + p->cell_type = Py_None; Py_INCREF(Py_None); + p->metric_name = Py_None; Py_INCREF(Py_None); + p->fast_name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_9execution__TypedMetricName(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *p = (struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_9execution__TypedMetricName) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->cell_type); + Py_CLEAR(p->metric_name); + Py_CLEAR(p->fast_name); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_9execution__TypedMetricName(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *p = (struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->cell_type) { + e = (*v)(p->cell_type, a); if (e) return e; + } + if (p->metric_name) { + e = (*v)(p->metric_name, a); if (e) return e; + } + if (p->fast_name) { + e = (*v)(p->fast_name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_9execution__TypedMetricName(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *p = (struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)o; + tmp = ((PyObject*)p->cell_type); + p->cell_type = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->metric_name); + p->metric_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->fast_name); + p->fast_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_7metrics_9execution__TypedMetricName(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_3__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_3__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_cell_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9cell_type_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_metric_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_11metric_name_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_fast_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9fast_name_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_9execution__TypedMetricName[] = { + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_9execution__TypedMetricName[] = { + {"cell_type", __pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_cell_type, 0, 0, 0}, + {"metric_name", __pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_metric_name, 0, 0, 0}, + {"fast_name", __pyx_getprop_11apache_beam_7metrics_9execution_16_TypedMetricName_fast_name, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_9execution__TypedMetricName_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_5__hash__}, + {Py_tp_str, (void *)__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_7__str__}, + {Py_tp_doc, (void *)PyDoc_STR("Like MetricName, but also stores the cell type of the metric.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_9execution__TypedMetricName}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_9execution__TypedMetricName}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_9execution__TypedMetricName_spec = { + "apache_beam.metrics.execution._TypedMetricName", + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_9execution__TypedMetricName_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_9execution__TypedMetricName = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.execution.""_TypedMetricName", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_5__hash__, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_7__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Like MetricName, but also stores the cell type of the metric."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_9execution_16_TypedMetricName_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_9execution__TypedMetricName, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution_MetricUpdater(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)o); + p->typed_metric_name = ((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)Py_None); Py_INCREF(Py_None); + p->default_value = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricUpdater(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricUpdater) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->typed_metric_name); + Py_CLEAR(p->default_value); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricUpdater(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->typed_metric_name) { + e = (*v)(((PyObject *)p->typed_metric_name), a); if (e) return e; + } + if (p->default_value) { + e = (*v)(p->default_value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_9execution_MetricUpdater(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater *)o; + tmp = ((PyObject*)p->typed_metric_name); + p->typed_metric_name = ((struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->default_value); + p->default_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_9execution_MetricUpdater[] = { + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_9execution_MetricUpdater_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricUpdater}, + {Py_tp_call, (void *)__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_3__call__}, + {Py_tp_doc, (void *)PyDoc_STR("A callable that updates the metric as quickly as possible.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricUpdater}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_9execution_MetricUpdater}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_9execution_MetricUpdater}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_9execution_MetricUpdater}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_9execution_MetricUpdater_spec = { + "apache_beam.metrics.execution.MetricUpdater", + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_9execution_MetricUpdater_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_9execution_MetricUpdater = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.execution.""MetricUpdater", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricUpdater, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_3__call__, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A callable that updates the metric as quickly as possible."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricUpdater, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_9execution_MetricUpdater, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_9execution_MetricUpdater, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_9execution_13MetricUpdater_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_9execution_MetricUpdater, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer __pyx_vtable_11apache_beam_7metrics_9execution_MetricsContainer; + +static PyObject *__pyx_tp_new_11apache_beam_7metrics_9execution_MetricsContainer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer; + p->step_name = Py_None; Py_INCREF(Py_None); + p->lock = Py_None; Py_INCREF(Py_None); + p->metrics = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricsContainer(PyObject *o) { + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricsContainer) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->step_name); + Py_CLEAR(p->lock); + Py_CLEAR(p->metrics); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricsContainer(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->step_name) { + e = (*v)(p->step_name, a); if (e) return e; + } + if (p->lock) { + e = (*v)(p->lock, a); if (e) return e; + } + if (p->metrics) { + e = (*v)(p->metrics, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7metrics_9execution_MetricsContainer(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *p = (struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)o; + tmp = ((PyObject*)p->step_name); + p->step_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lock); + p->lock = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->metrics); + p->metrics = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7metrics_9execution_16MetricsContainer_metrics(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7metrics_9execution_16MetricsContainer_metrics(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7metrics_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7metrics_9execution_MetricsContainer[] = { + {"get_counter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_distribution", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_gauge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_string_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_bounded_trie", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_cumulative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_14get_cumulative}, + {"to_runner_api", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"to_runner_api_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_18to_runner_api_monitoring_infos}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_21reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7metrics_9execution_16MetricsContainer_20reset}, + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7metrics_9execution_MetricsContainer[] = { + {"metrics", __pyx_getprop_11apache_beam_7metrics_9execution_16MetricsContainer_metrics, __pyx_setprop_11apache_beam_7metrics_9execution_16MetricsContainer_metrics, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7metrics_9execution_MetricsContainer_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricsContainer}, + {Py_tp_doc, (void *)PyDoc_STR("Holds the metrics of a single step and a single bundle.\n\n Or the metrics associated with the process/SDK harness. I.e. memory usage.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricsContainer}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7metrics_9execution_MetricsContainer}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7metrics_9execution_MetricsContainer}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7metrics_9execution_MetricsContainer}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7metrics_9execution_MetricsContainer}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7metrics_9execution_MetricsContainer_spec = { + "apache_beam.metrics.execution.MetricsContainer", + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7metrics_9execution_MetricsContainer_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7metrics_9execution_MetricsContainer = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.metrics.execution.""MetricsContainer", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Holds the metrics of a single step and a single bundle.\n\n Or the metrics associated with the process/SDK harness. I.e. memory usage.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7metrics_9execution_16MetricsContainer_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7metrics_9execution_MetricsContainer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker = Py_None; Py_INCREF(Py_None); + __pyx_v_11apache_beam_7metrics_9execution__DEFAULT = Py_None; Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject__DEFAULT_get_current_tr); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 12; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_7metrics_9execution__DEFAULT, (void *)&__pyx_v_11apache_beam_7metrics_9execution_get_current_tracker, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName)) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = &__pyx_type_11apache_beam_7metrics_9execution__TypedMetricName; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TypedMetricName, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater)) __PYX_ERR(0, 204, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = &__pyx_type_11apache_beam_7metrics_9execution_MetricUpdater; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MetricUpdater, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer = &__pyx_vtable_11apache_beam_7metrics_9execution_MetricsContainer; + __pyx_vtable_11apache_beam_7metrics_9execution_MetricsContainer.get_metric_cell = (struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7metrics_9execution_16MetricsContainer_get_metric_cell; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = &__pyx_type_11apache_beam_7metrics_9execution_MetricsContainer; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MetricsContainer, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #else + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #else + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #else + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #else + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #else + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.cells"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "MetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) __PYX_ERR(4, 23, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(4, 23, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "CounterCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) __PYX_ERR(4, 29, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(4, 29, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) __PYX_ERR(4, 37, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(4, 37, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "AbstractMetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) __PYX_ERR(4, 44, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell)) __PYX_ERR(4, 44, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "GaugeCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) __PYX_ERR(4, 50, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(4, 50, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "StringSetCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) __PYX_ERR(4, 54, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell)) __PYX_ERR(4, 54, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) __PYX_ERR(4, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell)) __PYX_ERR(4, 58, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) __PYX_ERR(4, 62, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "_BoundedTrieNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) __PYX_ERR(4, 69, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) __PYX_ERR(4, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_execution(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_execution}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "execution", + __pyx_k_This_module_is_for_internal_use, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_execution(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_execution(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_execution(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'execution' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "execution" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_execution", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__metrics__execution) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.metrics.execution")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.metrics.execution", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/metrics/execution.py":35 + * # pytype: skip-file + * + * import threading # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":36 + * + * import threading + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Dict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":37 + * import threading + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Dict + * from typing import FrozenSet +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":38 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import Dict # <<<<<<<<<<<<<< + * from typing import FrozenSet + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":39 + * from typing import Any + * from typing import Dict + * from typing import FrozenSet # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Type +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FrozenSet}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FrozenSet}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":40 + * from typing import Dict + * from typing import FrozenSet + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Type + * from typing import Union +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":41 + * from typing import FrozenSet + * from typing import Optional + * from typing import Type # <<<<<<<<<<<<<< + * from typing import Union + * from typing import cast +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Type}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Type}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":42 + * from typing import Optional + * from typing import Type + * from typing import Union # <<<<<<<<<<<<<< + * from typing import cast + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Union}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Union}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":43 + * from typing import Type + * from typing import Union + * from typing import cast # <<<<<<<<<<<<<< + * + * from apache_beam.metrics import monitoring_infos +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cast}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cast}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":45 + * from typing import cast + * + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import BoundedTrieCell + * from apache_beam.metrics.cells import CounterCell +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":46 + * + * from apache_beam.metrics import monitoring_infos + * from apache_beam.metrics.cells import BoundedTrieCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import CounterCell + * from apache_beam.metrics.cells import DistributionCell +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedTrieCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedTrieCell}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":47 + * from apache_beam.metrics import monitoring_infos + * from apache_beam.metrics.cells import BoundedTrieCell + * from apache_beam.metrics.cells import CounterCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import DistributionCell + * from apache_beam.metrics.cells import GaugeCell +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterCell}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":48 + * from apache_beam.metrics.cells import BoundedTrieCell + * from apache_beam.metrics.cells import CounterCell + * from apache_beam.metrics.cells import DistributionCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import GaugeCell + * from apache_beam.metrics.cells import HistogramCellFactory +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionCell}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":49 + * from apache_beam.metrics.cells import CounterCell + * from apache_beam.metrics.cells import DistributionCell + * from apache_beam.metrics.cells import GaugeCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import HistogramCellFactory + * from apache_beam.metrics.cells import HistogramData +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GaugeCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GaugeCell}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":50 + * from apache_beam.metrics.cells import DistributionCell + * from apache_beam.metrics.cells import GaugeCell + * from apache_beam.metrics.cells import HistogramCellFactory # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import HistogramData + * from apache_beam.metrics.cells import StringSetCell +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HistogramCellFactory}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HistogramCellFactory}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":51 + * from apache_beam.metrics.cells import GaugeCell + * from apache_beam.metrics.cells import HistogramCellFactory + * from apache_beam.metrics.cells import HistogramData # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import StringSetCell + * from apache_beam.metrics.cells import StringSetData +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HistogramData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HistogramData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":52 + * from apache_beam.metrics.cells import HistogramCellFactory + * from apache_beam.metrics.cells import HistogramData + * from apache_beam.metrics.cells import StringSetCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import StringSetData + * from apache_beam.runners.worker import statesampler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StringSetCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StringSetCell}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":53 + * from apache_beam.metrics.cells import HistogramData + * from apache_beam.metrics.cells import StringSetCell + * from apache_beam.metrics.cells import StringSetData # <<<<<<<<<<<<<< + * from apache_beam.runners.worker import statesampler + * from apache_beam.runners.worker.statesampler import get_current_tracker +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StringSetData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StringSetData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":54 + * from apache_beam.metrics.cells import StringSetCell + * from apache_beam.metrics.cells import StringSetData + * from apache_beam.runners.worker import statesampler # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.statesampler import get_current_tracker + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_statesampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_statesampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":55 + * from apache_beam.metrics.cells import StringSetData + * from apache_beam.runners.worker import statesampler + * from apache_beam.runners.worker.statesampler import get_current_tracker # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_current_tracker}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_get_current_tracker}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __Pyx_INCREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_v_11apache_beam_7metrics_9execution_get_current_tracker); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7metrics_9execution_get_current_tracker, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":57 + * from apache_beam.runners.worker.statesampler import get_current_tracker + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import BoundedTrieData + * from apache_beam.metrics.cells import DistributionData +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/metrics/execution.py":58 + * + * if TYPE_CHECKING: + * from apache_beam.metrics.cells import BoundedTrieData # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.cells import GaugeData +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedTrieData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedTrieData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":59 + * if TYPE_CHECKING: + * from apache_beam.metrics.cells import BoundedTrieData + * from apache_beam.metrics.cells import DistributionData # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import GaugeData + * from apache_beam.metrics.cells import MetricCell +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":60 + * from apache_beam.metrics.cells import BoundedTrieData + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.cells import GaugeData # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import MetricCell + * from apache_beam.metrics.cells import MetricCellFactory +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GaugeData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GaugeData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":61 + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.cells import GaugeData + * from apache_beam.metrics.cells import MetricCell # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import MetricCellFactory + * from apache_beam.metrics.metricbase import MetricName +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricCell}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":62 + * from apache_beam.metrics.cells import GaugeData + * from apache_beam.metrics.cells import MetricCell + * from apache_beam.metrics.cells import MetricCellFactory # <<<<<<<<<<<<<< + * from apache_beam.metrics.metricbase import MetricName + * from apache_beam.portability.api import metrics_pb2 +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricCellFactory}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricCellFactory}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":63 + * from apache_beam.metrics.cells import MetricCell + * from apache_beam.metrics.cells import MetricCellFactory + * from apache_beam.metrics.metricbase import MetricName # <<<<<<<<<<<<<< + * from apache_beam.portability.api import metrics_pb2 + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricName}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_metricbase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricName}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":64 + * from apache_beam.metrics.cells import MetricCellFactory + * from apache_beam.metrics.metricbase import MetricName + * from apache_beam.portability.api import metrics_pb2 # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_portability_api, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":57 + * from apache_beam.runners.worker.statesampler import get_current_tracker + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import BoundedTrieData + * from apache_beam.metrics.cells import DistributionData +*/ + } + + /* "apache_beam/metrics/execution.py":67 + * + * + * class MetricKey(object): # <<<<<<<<<<<<<< + * """Key used to identify instance of metric cell. + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[2]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MetricKey, __pyx_mstate_global->__pyx_n_u_MetricKey, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_kp_u_Key_used_to_identify_instance_of); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[2]) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[2]) < 0))) __PYX_ERR(0, 67, __pyx_L1_error) + } + + /* "apache_beam/metrics/execution.py":75 + * service. + * """ + * def __init__(self, step, metric, labels=None): # <<<<<<<<<<<<<< + * """Initializes ``MetricKey``. + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MetricKey___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":87 + * self.labels = labels if labels else {} + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.step == other.step and self.metric == other.metric and +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_MetricKey___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_7) < (0)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":92 + * self.labels == other.labels) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.step, self.metric, frozenset(self.labels))) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_MetricKey___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_7) < (0)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":95 + * return hash((self.step, self.metric, frozenset(self.labels))) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricKey(step={}, metric={}, labels={})'.format( + * self.step, self.metric, self.labels) +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_9MetricKey_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_MetricKey___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_7) < (0)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":67 + * + * + * class MetricKey(object): # <<<<<<<<<<<<<< + * """Key used to identify instance of metric cell. + * +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MetricKey, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricKey, __pyx_t_7) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":100 + * + * + * class MetricResult(object): # <<<<<<<<<<<<<< + * """Keeps track of the status of a metric within a single bundle. + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[5]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MetricResult, __pyx_mstate_global->__pyx_n_u_MetricResult, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_kp_u_Keeps_track_of_the_status_of_a_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[5]) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[5]) < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + } + + /* "apache_beam/metrics/execution.py":115 + * of metric type result (e.g. int, DistributionResult, GaugeResult). + * """ + * def __init__(self, key, committed, attempted): # <<<<<<<<<<<<<< + * """Initializes ``MetricResult``. + * Args: +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MetricResult___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":126 + * self.attempted = attempted + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * self.key == other.key and self.committed == other.committed and +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_MetricResult___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_7) < (0)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":131 + * self.attempted == other.attempted) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self.key, self.committed, self.attempted)) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_5__hash__, 0, __pyx_mstate_global->__pyx_n_u_MetricResult___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_7) < (0)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":134 + * return hash((self.key, self.committed, self.attempted)) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'MetricResult(key={}, committed={}, attempted={})'.format( + * self.key, str(self.committed), str(self.attempted)) +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_7__repr__, 0, __pyx_mstate_global->__pyx_n_u_MetricResult___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_7) < (0)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":138 + * self.key, str(self.committed), str(self.attempted)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return repr(self) + * +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_9__str__, 0, __pyx_mstate_global->__pyx_n_u_MetricResult___str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_7) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":141 + * return repr(self) + * + * @property # <<<<<<<<<<<<<< + * def result(self): + * """Short-hand for falling back to attempted metrics if it seems that +*/ + __pyx_t_8 = NULL; + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_12MetricResult_11result, 0, __pyx_mstate_global->__pyx_n_u_MetricResult_result, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_result, __pyx_t_7) < (0)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":100 + * + * + * class MetricResult(object): # <<<<<<<<<<<<<< + * """Keeps track of the status of a metric within a single bundle. + * +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MetricResult, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricResult, __pyx_t_7) < (0)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":149 + * + * + * class _MetricsEnvironment(object): # <<<<<<<<<<<<<< + * """Holds the MetricsContainer for every thread and other metric information. + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_2, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_2, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_kp_u_Holds_the_MetricsContainer_for_e); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[7]) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[7]) < 0))) __PYX_ERR(0, 149, __pyx_L1_error) + } + + /* "apache_beam/metrics/execution.py":155 + * track of global state. + * """ + * def current_container(self): # <<<<<<<<<<<<<< + * """Returns the current MetricsContainer.""" + * sampler = statesampler.get_current_tracker() +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_19_MetricsEnvironment_1current_container, 0, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_current_cont, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_current_container, __pyx_t_7) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":162 + * return sampler.current_state().metrics_container + * + * def process_wide_container(self): # <<<<<<<<<<<<<< + * """Returns the MetricsContainer for process wide metrics, e.g. memory.""" + * return PROCESS_WIDE_METRICS_CONTAINER +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_19_MetricsEnvironment_3process_wide_container, 0, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_process_wide, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_process_wide_container, __pyx_t_7) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":149 + * + * + * class _MetricsEnvironment(object): # <<<<<<<<<<<<<< + * """Holds the MetricsContainer for every thread and other metric information. + * +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_2, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_2, __pyx_t_7) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":167 + * + * + * MetricsEnvironment = _MetricsEnvironment() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricsEnvironment, __pyx_t_2) < (0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":197 + * return '%s %s' % (self.cell_type, self.metric_name) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return _TypedMetricName, (self.cell_type, self.metric_name) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16_TypedMetricName_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TypedMetricName___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":201 + * + * + * _DEFAULT = None # type: Any # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_11apache_beam_7metrics_9execution__DEFAULT); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7metrics_9execution__DEFAULT, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "apache_beam/metrics/execution.py":216 + * self.default_value = default_value + * + * def __call__(self, value=_DEFAULT): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * if value is _DEFAULT: +*/ + __Pyx_INCREF(__pyx_v_11apache_beam_7metrics_9execution__DEFAULT); + __pyx_mstate_global->__pyx_k__2 = __pyx_v_11apache_beam_7metrics_9execution__DEFAULT; + __Pyx_GIVEREF(__pyx_v_11apache_beam_7metrics_9execution__DEFAULT); + + /* "apache_beam/metrics/execution.py":231 + * tracker.update_metric(self.typed_metric_name, value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return MetricUpdater, ( + * self.typed_metric_name.cell_type, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_13MetricUpdater_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricUpdater___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":248 + * self.metrics = {} # type: Dict[_TypedMetricName, MetricCell] + * + * def get_counter(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> CounterCell + * return cast( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_3get_counter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_counter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_counter, __pyx_t_2) < (0)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":254 + * self.get_metric_cell(_TypedMetricName(CounterCell, metric_name))) + * + * def get_distribution(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> DistributionCell + * return cast( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_5get_distribution, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_distributio, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_distribution, __pyx_t_2) < (0)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":260 + * self.get_metric_cell(_TypedMetricName(DistributionCell, metric_name))) + * + * def get_gauge(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> GaugeCell + * return cast( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_7get_gauge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_gauge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_gauge, __pyx_t_2) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":266 + * self.get_metric_cell(_TypedMetricName(GaugeCell, metric_name))) + * + * def get_string_set(self, metric_name): # <<<<<<<<<<<<<< + * # type: (MetricName) -> StringSetCell + * return cast( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_9get_string_set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_string_set, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_string_set, __pyx_t_2) < (0)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":272 + * self.get_metric_cell(_TypedMetricName(StringSetCell, metric_name))) + * + * def get_bounded_trie(self, metric_name): # <<<<<<<<<<<<<< + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_11get_bounded_trie, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_bounded_tri, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_bounded_trie, __pyx_t_2) < (0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":275 + * return self.get_metric_cell(_TypedMetricName(BoundedTrieCell, metric_name)) + * + * def get_metric_cell(self, typed_metric_name): # <<<<<<<<<<<<<< + * # type: (_TypedMetricName) -> MetricCell + * cell = self.metrics.get(typed_metric_name, None) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_13get_metric_cell, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_metric_cell, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_metric_cell, __pyx_t_2) < (0)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":283 + * return cell + * + * def get_cumulative(self): # <<<<<<<<<<<<<< + * # type: () -> MetricUpdates + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_15get_cumulative, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_get_cumulative, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_get_cumulative, __pyx_t_2) < (0)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":324 + * counters, distributions, gauges, string_sets, bounded_tries, histograms) + * + * def to_runner_api(self): # <<<<<<<<<<<<<< + * return [ + * cell.to_runner_api_user_metric(key.metric_name) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_17to_runner_api, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_to_runner_api, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_to_runner_api, __pyx_t_2) < (0)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":330 + * ] + * + * def to_runner_api_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_19to_runner_api_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_to_runner_api_m, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_infos, __pyx_t_2) < (0)) __PYX_ERR(0, 330, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":345 + * } + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_21reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":355 + * metric.reset() + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_16MetricsContainer_23__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MetricsContainer___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":359 + * + * + * PROCESS_WIDE_METRICS_CONTAINER = MetricsContainer(None) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_6 = NULL; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, Py_None}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PROCESS_WIDE_METRICS_CONTAINER, ((PyObject *)__pyx_t_2)) < (0)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":362 + * + * + * class MetricUpdates(object): # <<<<<<<<<<<<<< + * """Contains updates for several metrics. + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[9]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MetricUpdates, __pyx_mstate_global->__pyx_n_u_MetricUpdates, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_kp_u_Contains_updates_for_several_met); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[9]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[9]) < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + } + + /* "apache_beam/metrics/execution.py":369 + * it's an int. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7metrics_9execution_13MetricUpdates_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MetricUpdates___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[10]); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/metrics/execution.py":362 + * + * + * class MetricUpdates(object): # <<<<<<<<<<<<<< + * """Contains updates for several metrics. + * +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MetricUpdates, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MetricUpdates, __pyx_t_7) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/metrics/execution.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.metrics.execution", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.metrics.execution"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 141, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/metrics/execution.py":279 + * cell = self.metrics.get(typed_metric_name, None) + * if cell is None: + * with self.lock: # <<<<<<<<<<<<<< + * cell = self.metrics[typed_metric_name] = typed_metric_name.cell_type() + * return cell +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/metrics/execution.py":67 + * + * + * class MetricKey(object): # <<<<<<<<<<<<<< + * """Key used to identify instance of metric cell. + * +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/metrics/execution.py":75 + * service. + * """ + * def __init__(self, step, metric, labels=None): # <<<<<<<<<<<<<< + * """Initializes ``MetricKey``. + * +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + + /* "apache_beam/metrics/execution.py":100 + * + * + * class MetricResult(object): # <<<<<<<<<<<<<< + * """Keeps track of the status of a metric within a single bundle. + * +*/ + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + + /* "apache_beam/metrics/execution.py":149 + * + * + * class _MetricsEnvironment(object): # <<<<<<<<<<<<<< + * """Holds the MetricsContainer for every thread and other metric information. + * +*/ + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + + /* "apache_beam/metrics/execution.py":362 + * + * + * class MetricUpdates(object): # <<<<<<<<<<<<<< + * """Contains updates for several metrics. + * +*/ + __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); + __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]); + + /* "apache_beam/metrics/execution.py":369 + * it's an int. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counters=None, # type: Optional[Dict[MetricKey, int]] +*/ + __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<11; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 10; } index[] = {{1},{207},{175},{706},{291},{40},{48},{30},{1},{1},{32},{7},{6},{2},{9},{3},{15},{15},{11},{4},{16},{16},{9},{9},{9},{20},{13},{4},{10},{17},{9},{16},{18},{18},{18},{10},{12},{19},{21},{21},{21},{20},{19},{13},{24},{13},{22},{16},{27},{33},{28},{31},{33},{26},{32},{31},{22},{30},{47},{18},{19},{37},{42},{8},{30},{20},{13},{13},{13},{4},{16},{27},{5},{11},{19},{25},{29},{30},{27},{26},{39},{18},{9},{13},{4},{4},{9},{18},{9},{8},{17},{13},{13},{13},{7},{9},{6},{8},{9},{6},{8},{6},{3},{16},{11},{14},{19},{16},{9},{15},{14},{8},{10},{8},{13},{5},{1},{3},{6},{8},{13},{6},{11},{17},{11},{2},{10},{16},{15},{8},{6},{5},{3},{11},{12},{22},{8},{12},{14},{12},{10},{8},{5},{6},{7},{4},{12},{10},{12},{4},{9},{7},{11},{8},{9},{6},{13},{29},{30},{25},{12},{17},{6},{6},{13},{1},{5},{6},{40},{7},{32},{28},{34},{20},{22},{11},{30},{29},{29},{29},{21},{25},{56},{25},{41},{41},{90},{83},{33},{7},{16},{24},{37},{25},{333}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2089 bytes) */ +const char* const cstring = "(\265/\375`+\022\375@\000\212Q\300\0209\020y:\000\200B\005\200(TP8\010(\260\002+\260\002\025\214\036gF\266\024\331\266\310\226\234h6\355Nv\031\033\032R\206RH&:M\005\205Wh\212_)\\\306\005\371\343\000\356\000\376\000?\3625\321\332\000\225\274j\257\027\2414\034\273\375\027,\362\337\374\257\322\355\371\301\233\2244~NR\022\215\321\227\221\276\360\357:T\374\276\351\351\347\213?\274\341\026\301\007-\256_\034.\377\323\350\210\357\266\234\377\367\371u\326F\273\375m}\250\3565\215\261\375.\037m!\316c0\2134\372\230\347k\353\227\311r\221\347tN\261\245i\\\243J\232\336>\273{\370\177\003\237\213O+\001\277\333\333\371\323z\266]g\316-\376(\2776![\327\240\375=\356\337\241o\353\224\203X\337\364|C\372\335\337\263\250e`\266\264\304vK\323/-\021i\374\322\324\274\254\3564\353\333-._Z\313\367\243\375\373%\232\246\331R~i\214\322\204\204\027\377\356\356\217\243\330\356\327=\247[+Q\376\335\202\241Hy\276\266g-\243\001GBAJ\017\324\233\236\2476\215>\265\002\315xpbB<=\262\032$\303\001\022\232\355\324\031\rNQ\r\n\232\311z\200|\260\r{\036\274LU\357\360\333[\374^\265\347\307e\275\257.\317\270\3567k\\\275\241\255U\367\337\375y\255\345Z\003u\267[,\342\304\357+\255\366\257\361\377Dp\017\355\316\037gyv\370\273\337|m\334\332j\315}\255\257\333\247u\306\255\373gkpv\327\364M\377\240\374Nz\327\364\357\322`\374\262\277[(\213zf\3141\220\337\257\226\3771\315\362\013\216\341\311\t\316>\255\276\315\306\274\370\307\213\330\3528\277\"#\274$\352\tF\344\273\272\3571\326\337\367!\317\342\006AKm\267\240\305O\263\230\332\335\307lG\300\317W\351A\272\255\322\025\261!\3774\3476d\014\377q6\217?bl\363\305\370\277\377\306\020\027\032\275X\231\201\320\272\n s;W\325\014\254\027\300C\241\275\\\311\341\320[\371\341M\360`\256\236P)\265[\331-\024\000$d\271\246`'\221iTN\224\025\344\314ur\323\232 \261\235-7\026z\013\255\253\251\200S\247$q\221\t\273\026\301U\000\331\332!\024\000\350T,\260\367\230\371zl\216\213\216\267\002'\205\344Xh \244K\216o\307\300H*f`\023\324\313\033f\360\274\241\344\022\326J\227\257\025\3046\204yd\242$\r/a\025v\226\334\330G\304\r\302T\240\006L\271\010h\372\301\303v$\371pn}\024?\274w\237\221\206\022\337\217\370vd\017[,\r\250\002\374V\000U\313\030\242D\330\023\027\002\212\251+\246\3778\322=\337\257\276\263(H7\214Yo\271\261\331\343\347M\376U\021L3\217\372\317\315& \237O&\260\233\336a\361\325\356\027\221i\004d;\007\373d`T\232\010\264\230\337\201*\346\212\305\264d0\337hH\354\230}\336\230Vd\003D\354v4\"s\214\256\207\277\257\225\321\r-\017\215\241\315\366\247]C\241\206\246\014\310\330\022\242\211#\310@\242\213\np\231D2\317\273P\016U"; + PyObject *data = __Pyx_DecompressString(cstring, 2089, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2217 bytes) */ +const char* const cstring = "BZh91AY&SY\241h\214\"\000\000\320\377\377\377\377\376\177\357\367\376\322\377\357\377\350\377\377\377\377@@@@@@@@@@@@@\000@\000`\010\257\264\331\275\247bn\001\333(\002\204\222\006\3408%\021'\244\231\032O#L\020\362\232\237\250#A\246G\2424\310\003L\322h\323\0204\310f\211\246\2324\310\364jz\032\203D\010\304d\010\325<\324Fj\031\000\000\032\000\000\000\000\000\036\241\246\206\324\000\002\014\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\302\021&\251\342S\361\024\365?JoR='\250\364\215\036\2204\320h\000\000\000\001\223A\246\200\000h\002\014\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\221!\006\210\320hL\246\215\006\232\003T6\246\233B\036\240\000\000\000\000\000a\000d\320a\334\313Z\022\244\215P\270~\003M*\261\202r\177\253\330[\r\261\315\034y\326P\347DN\205\025T\030\332\033\231\240\023\346?\360\251@&)\237\367\r\202\266\301 \304\261+,\005\027\250\\\003\253\001\333\342\0201\307\311\362\300\024\014\310\306\202\276\030\322\203\323\205@Ya$\211d\324\001\254\220\215\314V0\"\rkE'm-\352\272W[\234\305\330K\204\357\234N{\316\010\3432qB,\231d\026_\215Y\340\006\023\203E\347\213\235%\255$oQ'\254\212N5\370\313\332C\312(_)l\307\305\033\245&5\374}\325\035\275#\205\375\361\303\232\264\214\211\373\233\001\255\002V\032\235+*\024$\326\326\245\252\236@\037\357\231\254}\002t\211A\270\326\351\336\330\255\220s\242\247O\024\n\034\326 \311\314sT\030\350%f\214\210\347$%!\207S&\365\327\027\204\312\030?e\231le\373&\344x\\[\240\246\253am/z4\023\2664\005\216\326\322\2547y|<\034\035\243`\362D\023\376\207)\202\035\201\206 \202\207z\211\265x\206\262\213k\0220\222\250\240\177\002\227$\354\275\222P/6\3035\2406\020\344\200\266F\334:\251\240\252\024\311\3260\327\267\202IF\360\302d)\353\341\310\242_\352D\343.\00324s\\\307\227\257(\344l\345\257:7E\331\353\254B\374\325\344\201\210\274\r\371\356\033\254\373\233\302a\210\237\024h\375Kq$\010\311\206O\326K]\036\345\227(1\013S\"U\230K\207X\337\313\333]\332p\323\206\223\307\213,\201_\032\353H\251\232g\270\315\356\242\227\244\322a\240""\257[\217\325\243\217G\334\253\000\254\235\213Q\001\013\354\002j\026\260\250\302JV\275-=\376\222\342\324\013\210\245\370\275V\345GAQQ\036\206rOsbHjsS\205M\nB\320y\2074\203\350\300%n!\253\260\227\206\3750\371\317D\223\036v~m\305\257\000\357a\025W\027\006)\367t\n#\021\036\233\305P\215\2317\003\213\022\332*\010S8\250\221\361\031\322\t\304\346\262\205\027\347\321A\310\022\246\325cA(@\245\226\322\025\365@\345\3609\366\265\255\0342&9\001\246\257\307\344\362\256rG41\203\017\214\314\342\205\356\3279p\330\214\273\363\n-\213\006\000 \325\211)\024\207\000a\361X@\321\351\323\244$\212:\035\021\323\205\262\324\330\354\324\361%\213AQ`@\351\003\032\331\006+\032\313M\353\254\331\335\246\250\010\025\311\225\265\345c\001\236\263)\352\233\010\277l\234\220\215\266[\001z\367=\320\270\013\t\236\024\300\320\245\201V(\262R\231G:l\376\333\261a\314\357Z\357\313\222\332S\225\370\321\033y\274\342kc\324D\002c\231S\267\206\206Y\3429\330\315&+\301\341\351gQ\2377sv\216\0000\361\207\245B\002f\352-\340\230\300E9\341\0053\213g\035\001+l\341\2769\352\264\332\004Ew\314\233W\272a \346~\235Q\003\2532\261\tZ1\3348\231L\271\344QS=\310\273&\3501\261\202#r\002\010,\036\262\n\246u\2231<2@\212\330\240*\227m\202#\0040a\243.\314B+\246\354\306_i\260\001\204c\2165`\215\305\204\253[\352\033{\022\207\214\030\306\307\010m\344C\020\006q\237-7\240\0139_eOt\301\370\027,l\270\305\005\267\024\033R[4\006\205gk\325\361\334\265S<\363\277'\226[|\3116\302eu\207e{\327D\303b;\332\216\335.T\t\312S*\371\265\323H\201\270\203\t \2203\242uMCve\310\321{\336\211\324\200\337\020]\032L\365m\013&nCi3\255b\255\022l\264\210p\222\370`&&\322h\006(v\341.\341\354\365g\345\237>\366\215\243\032\357\255\255\007\036n0Lw\006\210\340*R\003@\320IO$\247\251\311\356\215R\223\265\315\341\\U1\205\007z\264X\250E\211\372CH\342\003\010Nl\354z\235Ps4[M@\036F\222\014\016\302\216\323\022]c=\343!\351\220\\\317\016\030\0353\354\371.\340_l\304\017\002\201\276\356:\341\003\351\333}\240\313\222\323T*\265f\300\240iM\273\257\273\273\350,\314(\306Z\260\017\026\255\306""\211\207\001g\250\334\262\n\346A\332\341>\346|9u\371ymb\311\003j\363\311\240\357\023\356\364q6\322\220\270,$\356\351\201\030\262\254\202\270\222-\252A@\266Y\013\256b7\335\266\024\220I\234A\360\220\005\r/\276\240\263\312\317\222(\341\370\361\301\322\014\221&\345\267\240n\272\322\351C@\207\001\006W\023fU\t:V\376\014P\225K\032\326\304\230\232c\004X\303\320\302\000\242\n\022%d&\326($\204QC\223\234\227\250\021\353e\320\213uBZ\260\313\261E\331\365\363\260>\210\305+\213\327W$\261\000\270*\021\346B\232O\242~?;W\207Q\001id\311.F\231K\334:V\005\313\005\273\342r\\\357\177 #\2178l\010\000\202\344\021d\007[\206\234\204\313{\2476\376S\225\267\014I\347Uo\321]\326\201\243\263\201\014\001\234Y\"\222D\201\2745\266\331(\025\302[?\207X\007\020\314skE\362%\224lQZ\214\004\2170\302\274 \322\r1P\317\005\274\034\316\335\013P\321'\206\"\304\2211\354/\206k|\245\t\361\212\310\201\235\367\333zn\021\201\373\351\235\300\237\003 \007\231\013i\254\325\252\371\224\227\204\251\262\250\0316\366\203\301\215Z\254\212O4\\\354\031+;\250\240\300\310\332\270\2346\363\305S\342\325\237G\030\342\021\006\260@_\273\313\326\022\314\314\371\022\013\312\233\265J\325\003M\241\217\002\347\003>\004\311\321\027S6PhQ\0202\331\245\227\301\241D\"\300\"\212\243%\2346\315\203n\032\254\302\331\266\320\320X\326\307u\231\2402\0342\226\253M.\341\201\203PX\216\215\345k\2173P\025Pl\321x\311\351\311X\202\001 \231\223\363\223S\332TY#\3378\317\020\277\263w\036>\211\206\001T\271\311h\000\223z\317&\344x\314\220B2ZX\034\325\271\033\246\265\336\027\016\203\023c\247P*\244\221\371Q+\002Dm\001\223g\240\232.\027\024\240\241\010Z\373\310\244BR*\314;%\346\253\036m\372\223\332\030*\242\230c\316qo?\224F\023y\304\227\004\007\321\232:\257+4\013\247n5\216\214\370\363\007\366\312\306\272\250\252\037\r4\023\334\250\247]@76\202\275\262\206\305l\326\231\0174F\223..\304\373y\247\ne\344]a;z0\364q\024g,j\036\314O\301\235DI4h\355q1x\010N8\024MK\373\353\343\277\006/\353PE\316XxH}4\351X\263J\260^\355\376\352\332\275\376\234\02137O\036\274\027\376\274\374""\376J\225\004\300\331\322\331\330\321\022\022\3262\324\023\216\005]]n>\211\234\325\304\251f\023\271Zu\342\036\216\337W\034<8\327\204\353\304%\006\202\024\361s\t\253\204`sE\025^\236W\000\222\354\250\222\361\371\371eZA\266\371\273R\020\371e\373\374\226\256\367\346\010\256\264\377Ns\347\2654\200\272\251\030\300\014\257\234>\365l\025\314\230\025.\363Q\010\032Ex\244&\254\005\010\007\276\263N\235\327\020\026\310/\207\271a\204N\026\210\262&\001D,\177\361w$S\205\t\n\026\210\302 "; + PyObject *data = __Pyx_DecompressString(cstring, 2217, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2072 bytes) */ +const char* const cstring = "x\332\265W\315s\333\306\025\227\022I\246eE\216,g\306I\023\027\234|\370c\024\272l\224I\3063\036\207\241([cG\326\227\343vzX/\201\025\271\025\010\200X@\026\3324\343#\2178\342\210#\216<\362\250c\217<\352\350?A\177B\337\333\005@\220\246\334d\246\365X\344\356{o\337\307\357}\354R\253\333\226G\271%4\3371\250\307\204vh\273\232`\307\314\245\246\326a\236\313uQY\\\324\264Z\272K\0055.4jiv\363\357L\3674]i\341VK\343\026h\350P\217\333\226\346\331\2314MOW@\323&X\330\340\002\266M_\212\245f\3264\356\241\332\"o\203zt\r\014\031\322\257\272\355[\036s\363\003\240\214{\267\244#\334\362P\367c\3334\204\346\265\231\366\223\222I\343\203C\250\000\343\n\200\3552jH\2556\210f\372\212\256\313\220\017\332\340\215nR!\320-\313\366@\220Z\036\206\325\004\000,\341\301\216Cx\306\232\334\241\322&C\020|\301\014\024;b\314\001E\236K\365#\315>\324Z\246\335\004\\\341\240\307\320\335'\300\027#6\372\215<_\340.\303L{\305\2756\267`/@\267\311\264\246o\031&\223.n\345\330\253\250\235v \270\016&08\323n\311u\226Zp\010e\322Lh;\231l\312\007u\324e#\3516\365\2646=f2r\213\351L\010\352r3\200\030\231\005f;\035\356\311\330!U\005i\311\355P\203\201>\303w\021\016\207;\314\204$h\354\204\3512\257\025\355\351\204s\323M\2432\320\223\033S\245\350\251\372`\342>\3544@9\270\017\365\371\362\245\312\371\023\026\274|\251tp\203A\206\0169\023\205\310%6\nC\005:$\327e\3027e\005\025\214\335\207\n`\243m\356^\232\251\014GY&4\363\t\312\321\013\034\354\017\251LC\351\324\256\244+K\332mViU\260j\327\306\352}Or\327\264G\324o1\265\271\243\274\002\003\254\343\344^M\346\3667\372$a\371_:\006`\347\325\236\242\035\244\255\241\263\202\t\235\231\246L^\332\2272\337\034\273\331\242&\324\024\344\020\2244\003\031\205E;l\324\017\314\301Ep\013\016@+\332\272\3548\331\0248\000ry\314*.\204C\301\362m~\230\216\023\212\376\271\232\301\016\241\002\215\324\237;\343\200\241\"\363d\355\240\204\\ \3531\210\332-\227v\220\272Iu\317v\203\234\206\002Om\375H\341\202\022\243U*\233C\233/*\204\260.!\305}\233\212\3668\005n*o\234\3422\307\315(\333PD\305\\\024\327c\352sR\321BN,\032\311\211E;9\021\340\232\240\271\005\303\317eR\335\261\215\324d\370:\313\316)\272\030\333L\3700\272\n'\367oi+\260Z\314#M\225~\002,6U@W\0051\235\347w|\023\356\324\343\351G\215B\261L\025ha\255L\345\250\232&z^\030\023|Tl\265\210`\336[l\300w\n\325\263\211jmB\035\376n.\351\330\000\255-\r\340\263!E^4\254c\356\332V\007\006!\371M\244\212\356\273.\262\364\314\3204!\307\265\361\372%\257`\304\216$\2379\210\0325w\366\236\325\033\373\373\344\305\326F\203\374\3248\330\333\252\357\223\372\263\355\203\332\326vc\217\220\235\340\004\376\260U\3116L\267=v\270/\241\201\226\304^\3127\330p\007\177\335i\220\372\343F\375\311\326\366\243\003\270\027\010~\030\243\316\230\334\027\212\347\271%\3351\323\314\210\302\000\252\\L\252`\002\2472\362a5\215\251\276\233T\260\"\327\261]\2176\271\311\275\240\002i*\262T\362D\345\225\355\036\301\353\366BNE\276\316\004\3558&\210\211\300\322\271]\321m\327\006W,\240g#\270\330\025B\247\302\3038\360\217\340u\252\343{\007J\203\340\343\2165\341\201\227O\362\264[\304[\231\317\010\322\001\270\257(\314\000\"\247{\261K\004!\206\255\023\370\307P\215\\t\345\347\t6\373!xB\360\036ToY \370\026H\3136\022\320\026\223\r]\350\337\361vU;\345\221|\241*\201\242+y\177N\264\343x\367e\363\261\235\rv\221\r&\302\005\311\221\345\200\2538\202{O\335\210\204t\000\024\214\013/a\371\n'\251\215\324\022\006\231V\303\010\303\214\3404\377\334\341p\3006|\223\221\267\332\025(\256\215\000b\362\320\010*#D\375\234\221?\n\034\333!\304\201y\r\017\025\\\214\032pz3\002\325a\256\027\200,\264\233\2163\202\250\365\261\207\327*""\356\272>5\225\241Q\323dw\202\034Ij\356\247\265'\230yH$\200\352\014\254\322\242(V(\276)\360/\023\302\273d\204=\304\006\222\000\265\372\315\003T\030c\200\361\3300{\347d{\367\330\033\347\342C+\315\021T\214%\260\004\t7\260\037\014R\310\032\020@\203z\255\250\317\224{,\253]~\210\235\340\231\372qywf\206l46k\317\237\036\314L)\312\327\3457sWz\325\341{\237\307\325\363\017g\346/\367J\341\354\331\\\251\267\030\226\325\327\335\350i2\373\0326 vVZ\032.\335\214h\341\273W+\362\276\212i,\2222\322\033\341\215\350z\364\227\370\347\244\372\272|\27683\277\324[\357\375\032\035\014\313\325\376\365\376\256:\265>\274\372\307\250;\324\376\324\237\035V\177<-\247\324^7\234U\236\301\362\254tY\352\3764\252\r?\373:\331\035V~8\275\230\233\034\rV.fv\006\325\213\231\366 \363\252\347\206\327\303\237\243\365\350\227d=\351\026\211/\242\215\370r\362q\277\334_\357w3U'\241\027U\207\237\336K\272gs\227^\373\275:(\277r\025-\\\355y\341\367\310\253bxw\377]\223PI\205\303+\337\366_\014j\010\325\243p=\014\342\271XB9\257\300[\r\033\321G\221\021\177\021\037\365W\373\215\301\037N\245\350\223PD_F\335\\p3\374<|\036}\005\2077\222R\377\375\376\267\203\322\351,2\036\207\365\320\217@\343\233\205Kg\343\377\317?\301\216n\312\264\311\204\337\212V\243\032.\257\206\277\304\337\304tRb9<\212W\321\327\363\322\314\342ro\367la\271g\204e\210\341$:\216w\317\346\256\205e\t\354\335\244\234|\223X*F,\207\2257\252PnD\227\242n<\017\2622\202\265H\007\205\217\222\014\227\007\203\027*X\014n74\242\257\321t\226\211\305^9\225\273\t\360\254%F\037\366\347\313\030\322b\370E\330\216Z\240w\001\017\2271?\313=s\370I%\241\230\231\223\236\000\327\026>\000\237\301\221\357\302J\374^\234\037\276\004\371\202\350>\010w\323/\305\370\020\323\270\022\256\200j3.\307\017!\363\017Oe\201\327{~\270\021\225\342\205XOV\223Z\362\267\301\373\203\352\371\302\314\374Ga\355\367\036A\030\177\347\221UD\371\377\356\330\265p\345\277\036\2011p\245w\0372E\241`\344\251\245\336\203\010\252\360Zx/\276\221|\326\267Ow\377\003\034\342EM"; + PyObject *data = __Pyx_DecompressString(cstring, 2072, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (4907 bytes) */ +const char* const bytes = " Contains updates for several metrics.\n\n A metric update is an object containing information to update a metric.\n For Distribution metrics, it is DistributionData, and for Counter metrics,\n it's an int.\n Holds the MetricsContainer for every thread and other metric information.\n\n This class is not meant to be instantiated, instead being used to keep\n track of global state.\n Keeps track of the status of a metric within a single bundle.\n\n It contains the physical and logical updates to the metric. Physical updates\n are updates that have not necessarily been committed, but that have been made\n during pipeline execution. Logical updates are updates that have been\n committed.\n\n Attributes:\n key: A ``MetricKey`` that identifies the metric and bundle of this result.\n committed: The committed updates of the metric. This attribute's type is\n of metric type result (e.g. int, DistributionResult, GaugeResult).\n attempted: The logical updates of the metric. This attribute's type is that\n of metric type result (e.g. int, DistributionResult, GaugeResult).\n Key used to identify instance of metric cell.\n\n Metrics are internally keyed by the name of the step they're associated with,\n the name and namespace (if it is a user defined metric) of the metric,\n and any extra label metadata added by the runner specific metric collection\n service.\n MetricKey(step={}, metric={}, labels={})MetricResult(key={}, committed={}, attempted={})Missing value for update of %s.?apache_beam/metrics/execution.pydisableenablegcisenabledAnyBoundedTrieCellBoundedTrieDataCounterCellDictDistributionCellDistributionDataFrozenSetGaugeCellGaugeDataHistogramCellFactoryHistogramDataLockMetricCellMetricCellFactoryMetricKeyMetricKey.__eq__MetricKey.__hash__MetricKey.__init__MetricKey.__repr__MetricNameMetricResultMetricResult.__eq__MetricResult.__hash__MetricResult.__init__MetricResult.__repr__MetricResult.__str__MetricResult.resultMetricUpdaterMetricUpda""ter.__reduce__MetricUpdatesMetricUpdates.__init__MetricsContainerMetricsContainer.__reduce__MetricsContainer.get_bounded_trieMetricsContainer.get_counterMetricsContainer.get_cumulativeMetricsContainer.get_distributionMetricsContainer.get_gaugeMetricsContainer.get_metric_cellMetricsContainer.get_string_setMetricsContainer.resetMetricsContainer.to_runner_apiMetricsContainer.to_runner_api_monitoring_infosMetricsEnvironment_MetricsEnvironment_MetricsEnvironment.current_container_MetricsEnvironment.process_wide_containerOptionalPROCESS_WIDE_METRICS_CONTAINER__Pyx_PyDict_NextRefStringSetCellStringSetDataTYPE_CHECKINGType_TypedMetricName_TypedMetricName.__reduce__Unionall_metricsapache_beam.metricsapache_beam.metrics.cellsapache_beam.metrics.executionapache_beam.metrics.metricbaseapache_beam.portability.apiapache_beam.runners.workerapache_beam.runners.worker.statesamplerasyncio.coroutinesattemptedbounded_triescastcellcell_typecline_in_tracebackcommittedcounterscurrent_containercurrent_statedefault_valuedistributions__doc____enter____eq____exit__fast_nameformat__func__gaugesgetget_bounded_trieget_counterget_cumulativeget_current_trackerget_distributionget_gaugeget_metric_cellget_string_set__hash__histograms__init___is_coroutineitemskkeylabels__main____metaclass__metricmetric_namemetrics_containermetrics_pb2mi__module__monitoring_infos__mro_entries____name__objectotherpop__prepare__process_wideprocess_wide_containerproperty__pyx_capi____pyx_vtable____qualname____reduce____repr__resetresultsamplerself__set_name__setdefaultstatesamplerstepstep_name__str__string_sets__test__threadingto_keyto_runner_apito_runner_api_monitoring_infoto_runner_api_monitoring_infosto_runner_api_user_metrictransform_idtyped_metric_nametypingupdateupdate_metricvvaluevaluesPyObject *\000\000_DEFAULT\000get_current_tracker\200!\340\004\013\2101\320\002#\2401\360\020\000\005\t\210\010\220\001\330\004\010\210\n\220!\330\004\010\210\n\220*\230L\250\001\200!\330\004\013\2101\330\010\014\320\014\036\230a""\330\010\014\320\014\036\230a\330\010\014\210A\200!\330\004\013\2101\330\010\014\320\014&\240a\240s\250!\330\010\014\210E\220\030\230\024\230X\240V\2501\200!\360\n\000\005\014\2104\210~\230T\320!1\260\024\260Q\200!\330\004\013\2104\320\017\037\230q\320 0\260\001\3201B\300!\200!\330\004\013\2104\210q\220\001\200!\340\004\013\2104\210q\330\010\t\330\010\014\320\014\034\230A\320\035-\250Q\320.@\300\001\200!\340\004\013\2104\210q\330\010\t\330\010\014\320\014\034\230A\320\035-\250Q\250k\270\021\200!\340\004\013\2104\210q\330\010\t\330\010\014\320\014\034\230A\320\035-\250Q\250m\2701\200!\340\004\013\2104\210q\330\010\t\330\010\014\320\014\034\230A\320\035-\250Q\250o\270Q\200!\330\004\013\2104\210r\220\024\220V\2304\230|\2504\250q\200!\330\004\013\2104\210r\220\024\220W\230D\240\t\250\031\260!\2604\260q\200!\340\004\013\2104\210x\220t\2301\320\034/\250q\330\004\007\200u\210C\210q\330\013\017\210q\330\010\017\210t\2208\2301\320\0341\3201B\300*\310A\330\004\013\2101\200!\330\004\013\320\0135\260W\270A\330\010\014\210G\2204\220y\240\004\240A\200!\330\004\005\330\010\014\210E\220\023\220E\230\025\230d\240$\240k\260\023\260E\270\033\300A\330\010\014\210K\220s\230%\230q\200!\330\004\005\330\010\014\210F\220#\220U\230&\240\004\240D\250\010\260\003\2605\270\010\300\001\330\010\014\210H\220C\220u\230A\200!\340\006\007\330\006\007\330\006\007\330\006\007\330\006\007\330\006\007\360\032\000\005\t\210\014\220I\230S\240\001\330\004\010\320\010\031\230\036\240s\250!\330\004\010\210\n\220'\230\023\230A\330\004\010\210\017\220|\2403\240a\330\004\010\320\010\031\230\036\240s\250!\330\004\010\210\016\220k\240\023\240A\200!\360\010\000\n\016\210Q\330\006\016\210d\220!\2204\220x\230v\240Q\330\004\022\220!\330\010\014\320\014*\250!\2503\250n\270A\330\010\014\210E\220\030\230\021\340\004\013\2101\330\010\030\230\007\230q\240\005\240Q\330\010\014\210F\220,\230c\240\023\240G\2501\200!\330\004\013\320\013=\270W\300A\330\010\014\210F\220#\220Q\220d\230-\240s\250!\2504\250q\200!\330\004\n\210!""\200!\330\004\013\320\013\036\230d\240,\250d\260!\200!\360\016\000\005\t\210\n\220$\220h\230g\240Q\330\006\014\210F\220!\200!\340\004\016\210l\320\032.\250a\330\004\007\200x\210s\220!\330\006\r\210Q\330\004\013\2107\220.\240\002\240!\200!\360\016\000\005\t\210\007\210q\330\004\010\210\r\220Q\330\004\010\210\r\220Q\200!\360\016\000\005\020\210q\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240c\250\023\250A\250[\270\003\2701\360\006\000\005\025\220A\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240c\250\023\250A\250[\270\003\2701\360\006\000\005\016\210Q\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240c\250\023\250A\250[\270\003\2701\360\006\000\005\023\220!\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240c\250\023\250A\250[\270\003\2701\360\006\000\005\025\220A\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240c\250\023\250A\250[\270\003\2701\360\006\000\005\022\220\021\330\010\021\220\021\220$\220l\240!\240?\260!\260?\300!\330\010\014\210C\210u\220D\230\010\240\006\240a\330\010\013\210:\220Q\220a\220|\2401\360\006\000\005\014\210=\230\001\330\010\022\220/\240\030\250\035\260o\300Q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 168; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 15) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 168; i < 195; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 195; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 168; + for (Py_ssize_t i=0; i<27; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 5; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_step, __pyx_mstate->__pyx_n_u_metric, __pyx_mstate->__pyx_n_u_labels}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_1_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_F_U_D_5_HCuA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 92}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4r_WD_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 95}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_5WA_G4y_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 115}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_committed, __pyx_mstate->__pyx_n_u_attempted}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 126}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_E_E_d_k_E_A_Ks_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 131}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4r_V4_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 134}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_WA_F_Qd_s_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 141}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_kp_b_iso88591_4_T_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 155}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_current_container, __pyx_mstate->__pyx_kp_b_iso88591_l_a_xs_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 162}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_process_wide_container, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 197}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_d_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 231}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_1_a_a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 248}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_counter, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_Qm1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 254}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_distribution, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 260}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_gauge, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_Qk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_string_set, __pyx_mstate->__pyx_kp_b_iso88591_4q_A_QoQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 272}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_bounded_trie, __pyx_mstate->__pyx_kp_b_iso88591_4_q_0_1B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 275}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_typed_metric_name}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_metric_cell, __pyx_mstate->__pyx_kp_b_iso88591_4xt1_q_uCq_q_t81_11B_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 283}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counters, __pyx_mstate->__pyx_n_u_distributions, __pyx_mstate->__pyx_n_u_gauges, __pyx_mstate->__pyx_n_u_string_sets, __pyx_mstate->__pyx_n_u_bounded_tries, __pyx_mstate->__pyx_n_u_histograms, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_get_cumulative, __pyx_mstate->__pyx_kp_b_iso88591_q_l_CuD_c_A_1_A_l_CuD_c_A_1_Q_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 324}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_cell}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_to_runner_api, __pyx_mstate->__pyx_kp_b_iso88591_1_as_E_XV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 330}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_items, __pyx_mstate->__pyx_n_u_all_metrics, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_cell, __pyx_mstate->__pyx_n_u_mi}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_to_runner_api_monitoring_infos, __pyx_mstate->__pyx_kp_b_iso88591_Q_d_4xvQ_3nA_E_1_q_Q_F_c_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 345}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_metric}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_hgQ_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 369}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counters, __pyx_mstate->__pyx_n_u_distributions, __pyx_mstate->__pyx_n_u_gauges, __pyx_mstate->__pyx_n_u_string_sets, __pyx_mstate->__pyx_n_u_bounded_tries, __pyx_mstate->__pyx_n_u_histograms}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_metrics_execution_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_IS_s_A_3a_s_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyObjectCallNoArg (used by pyfrozenset_new) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* pyfrozenset_new */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000) +#if CYTHON_COMPILING_IN_LIMITED_API + || __Pyx_get_runtime_version() >= 0x030A0000 +#endif + ) + return result; + { + Py_ssize_t size = __Pyx_PySet_GET_SIZE(result); + if (likely(size > 0)) + return result; +#if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) { + Py_DECREF(result); + return NULL; + } +#endif + } + Py_DECREF(result); +#endif + } + return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return __Pyx_CallCFunction(cfunc, self, arg); + } else if (flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); + } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); + } + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); + } +#endif + PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + } else +#endif + { + result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); + } + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify (used by CIntFromPy) */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/metrics/execution.cp314-win_amd64.pyd b/sdks/python/apache_beam/metrics/execution.cp314-win_amd64.pyd new file mode 100644 index 000000000000..f7b8859f1a88 Binary files /dev/null and b/sdks/python/apache_beam/metrics/execution.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/portability/api/__init__.py b/sdks/python/apache_beam/portability/api/__init__.py new file mode 100644 index 000000000000..886355e31cd8 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/__init__.py @@ -0,0 +1,56 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +""" +For internal use only; no backwards-compatibility guarantees. +Automatically generated when running python -m build. +""" +from .org.apache.beam.model.fn_execution import v1 +from .org.apache.beam.model.interactive import v1 as v1_2 +from .org.apache.beam.model.job_management import v1 as v1_3 +from .org.apache.beam.model.pipeline import v1 as v1_4 + +beam_fn_api_pb2 = v1.beam_fn_api_pb2 +beam_fn_api_pb2_grpc = v1.beam_fn_api_pb2_grpc +beam_fn_api_pb2_urns = v1.beam_fn_api_pb2_urns +beam_provision_api_pb2 = v1.beam_provision_api_pb2 +beam_provision_api_pb2_grpc = v1.beam_provision_api_pb2_grpc +beam_interactive_api_pb2 = v1_2.beam_interactive_api_pb2 +beam_interactive_api_pb2_grpc = v1_2.beam_interactive_api_pb2_grpc +beam_artifact_api_pb2 = v1_3.beam_artifact_api_pb2 +beam_artifact_api_pb2_grpc = v1_3.beam_artifact_api_pb2_grpc +beam_artifact_api_pb2_urns = v1_3.beam_artifact_api_pb2_urns +beam_expansion_api_pb2 = v1_3.beam_expansion_api_pb2 +beam_expansion_api_pb2_grpc = v1_3.beam_expansion_api_pb2_grpc +beam_job_api_pb2 = v1_3.beam_job_api_pb2 +beam_job_api_pb2_grpc = v1_3.beam_job_api_pb2_grpc +beam_runner_api_pb2 = v1_4.beam_runner_api_pb2 +beam_runner_api_pb2_grpc = v1_4.beam_runner_api_pb2_grpc +beam_runner_api_pb2_urns = v1_4.beam_runner_api_pb2_urns +endpoints_pb2 = v1_4.endpoints_pb2 +endpoints_pb2_grpc = v1_4.endpoints_pb2_grpc +external_transforms_pb2 = v1_4.external_transforms_pb2 +external_transforms_pb2_grpc = v1_4.external_transforms_pb2_grpc +external_transforms_pb2_urns = v1_4.external_transforms_pb2_urns +metrics_pb2 = v1_4.metrics_pb2 +metrics_pb2_grpc = v1_4.metrics_pb2_grpc +metrics_pb2_urns = v1_4.metrics_pb2_urns +schema_pb2 = v1_4.schema_pb2 +schema_pb2_grpc = v1_4.schema_pb2_grpc +schema_pb2_urns = v1_4.schema_pb2_urns +standard_window_fns_pb2 = v1_4.standard_window_fns_pb2 +standard_window_fns_pb2_grpc = v1_4.standard_window_fns_pb2_grpc +standard_window_fns_pb2_urns = v1_4.standard_window_fns_pb2_urns diff --git a/sdks/python/apache_beam/portability/api/org/__init__.py b/sdks/python/apache_beam/portability/api/org/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/__init__.py new file mode 100644 index 000000000000..17332783cb7c --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/__init__.py @@ -0,0 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from . import beam_fn_api_pb2 +from . import beam_fn_api_pb2_grpc +from . import beam_fn_api_pb2_urns +from . import beam_provision_api_pb2 +from . import beam_provision_api_pb2_grpc diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.py new file mode 100644 index 000000000000..3200d3fd7031 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.py @@ -0,0 +1,252 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/fn_execution/v1/beam_fn_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/fn_execution/v1/beam_fn_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from ...pipeline.v1 import endpoints_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_endpoints__pb2 +from ...pipeline.v1 import metrics_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_metrics__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7org/apache/beam/model/fn_execution/v1/beam_fn_api.proto\x12%org.apache.beam.model.fn_execution.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a\x31org/apache/beam/model/pipeline/v1/endpoints.proto\x1a/org/apache/beam/model/pipeline/v1/metrics.proto\x1a google/protobuf/descriptor.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"s\n\x0f\x46nApiTransforms\"`\n\x06Runner\x12,\n\x0b\x44\x41TA_SOURCE\x10\x00\x1a\x1b\xa2\xb4\xfa\xc2\x05\x15\x62\x65\x61m:runner:source:v1\x12(\n\tDATA_SINK\x10\x01\x1a\x19\xa2\xb4\xfa\xc2\x05\x13\x62\x65\x61m:runner:sink:v1\"{\n\x0eRemoteGrpcPort\x12W\n\x16\x61pi_service_descriptor\x18\x01 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12\x10\n\x08\x63oder_id\x18\x02 \x01(\t\"I\n!GetProcessBundleDescriptorRequest\x12$\n\x1cprocess_bundle_descriptor_id\x18\x01 \x01(\t\"\xa3\x06\n\x12InstructionRequest\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12V\n\x0eprocess_bundle\x18\xe9\x07 \x01(\x0b\x32;.org.apache.beam.model.fn_execution.v1.ProcessBundleRequestH\x00\x12g\n\x17process_bundle_progress\x18\xea\x07 \x01(\x0b\x32\x43.org.apache.beam.model.fn_execution.v1.ProcessBundleProgressRequestH\x00\x12\x61\n\x14process_bundle_split\x18\xeb\x07 \x01(\x0b\x32@.org.apache.beam.model.fn_execution.v1.ProcessBundleSplitRequestH\x00\x12X\n\x0f\x66inalize_bundle\x18\xec\x07 \x01(\x0b\x32<.org.apache.beam.model.fn_execution.v1.FinalizeBundleRequestH\x00\x12\x62\n\x10monitoring_infos\x18\xed\x07 \x01(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.MonitoringInfosMetadataRequestH\x00\x12i\n\x18harness_monitoring_infos\x18\xee\x07 \x01(\x0b\x32\x44.org.apache.beam.model.fn_execution.v1.HarnessMonitoringInfosRequestH\x00\x12P\n\x0bsample_data\x18\xef\x07 \x01(\x0b\x32\x38.org.apache.beam.model.fn_execution.v1.SampleDataRequestH\x00\x12K\n\x08register\x18\xe8\x07 \x01(\x0b\x32\x36.org.apache.beam.model.fn_execution.v1.RegisterRequestH\x00\x42\t\n\x07request\"\xbc\x06\n\x13InstructionResponse\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12W\n\x0eprocess_bundle\x18\xe9\x07 \x01(\x0b\x32<.org.apache.beam.model.fn_execution.v1.ProcessBundleResponseH\x00\x12h\n\x17process_bundle_progress\x18\xea\x07 \x01(\x0b\x32\x44.org.apache.beam.model.fn_execution.v1.ProcessBundleProgressResponseH\x00\x12\x62\n\x14process_bundle_split\x18\xeb\x07 \x01(\x0b\x32\x41.org.apache.beam.model.fn_execution.v1.ProcessBundleSplitResponseH\x00\x12Y\n\x0f\x66inalize_bundle\x18\xec\x07 \x01(\x0b\x32=.org.apache.beam.model.fn_execution.v1.FinalizeBundleResponseH\x00\x12\x63\n\x10monitoring_infos\x18\xed\x07 \x01(\x0b\x32\x46.org.apache.beam.model.fn_execution.v1.MonitoringInfosMetadataResponseH\x00\x12j\n\x18harness_monitoring_infos\x18\xee\x07 \x01(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.HarnessMonitoringInfosResponseH\x00\x12Q\n\x0bsample_data\x18\xef\x07 \x01(\x0b\x32\x39.org.apache.beam.model.fn_execution.v1.SampleDataResponseH\x00\x12L\n\x08register\x18\xe8\x07 \x01(\x0b\x32\x37.org.apache.beam.model.fn_execution.v1.RegisterResponseH\x00\x42\n\n\x08response\",\n\x11SampleDataRequest\x12\x17\n\x0fpcollection_ids\x18\x01 \x03(\t\"\xf5\x01\n\x0eSampledElement\x12\x0f\n\x07\x65lement\x18\x01 \x01(\x0c\x12\x34\n\x10sample_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12R\n\texception\x18\x03 \x01(\x0b\x32?.org.apache.beam.model.fn_execution.v1.SampledElement.Exception\x1aH\n\tException\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12\x14\n\x0ctransform_id\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"\xd2\x02\n\x12SampleDataResponse\x12\x66\n\x0f\x65lement_samples\x18\x01 \x03(\x0b\x32M.org.apache.beam.model.fn_execution.v1.SampleDataResponse.ElementSamplesEntry\x1aV\n\x0b\x45lementList\x12G\n\x08\x65lements\x18\x01 \x03(\x0b\x32\x35.org.apache.beam.model.fn_execution.v1.SampledElement\x1a|\n\x13\x45lementSamplesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12T\n\x05value\x18\x02 \x01(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.SampleDataResponse.ElementList:\x02\x38\x01\"\x1f\n\x1dHarnessMonitoringInfosRequest\"\xcb\x01\n\x1eHarnessMonitoringInfosResponse\x12r\n\x0fmonitoring_data\x18\x01 \x03(\x0b\x32Y.org.apache.beam.model.fn_execution.v1.HarnessMonitoringInfosResponse.MonitoringDataEntry\x1a\x35\n\x13MonitoringDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"t\n\x0fRegisterRequest\x12\x61\n\x19process_bundle_descriptor\x18\x01 \x03(\x0b\x32>.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor\"\x12\n\x10RegisterResponse\"\xe1\t\n\x17ProcessBundleDescriptor\x12\n\n\x02id\x18\x01 \x01(\t\x12\x62\n\ntransforms\x18\x02 \x03(\x0b\x32N.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor.TransformsEntry\x12\x66\n\x0cpcollections\x18\x03 \x03(\x0b\x32P.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor.PcollectionsEntry\x12u\n\x14windowing_strategies\x18\x04 \x03(\x0b\x32W.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor.WindowingStrategiesEntry\x12Z\n\x06\x63oders\x18\x05 \x03(\x0b\x32J.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor.CodersEntry\x12\x66\n\x0c\x65nvironments\x18\x06 \x03(\x0b\x32P.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor.EnvironmentsEntry\x12]\n\x1cstate_api_service_descriptor\x18\x07 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12]\n\x1ctimer_api_service_descriptor\x18\x08 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x1a`\n\x0fTransformsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.PTransform:\x02\x38\x01\x1a\x63\n\x11PcollectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.PCollection:\x02\x38\x01\x1ap\n\x18WindowingStrategiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.WindowingStrategy:\x02\x38\x01\x1aW\n\x0b\x43odersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.org.apache.beam.model.pipeline.v1.Coder:\x02\x38\x01\x1a\x63\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.Environment:\x02\x38\x01\"\xd3\x02\n\x11\x42undleApplication\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x10\n\x08input_id\x18\x02 \x01(\t\x12\x0f\n\x07\x65lement\x18\x03 \x01(\x0c\x12i\n\x11output_watermarks\x18\x04 \x03(\x0b\x32N.org.apache.beam.model.fn_execution.v1.BundleApplication.OutputWatermarksEntry\x12\x45\n\nis_bounded\x18\x05 \x01(\x0e\x32\x31.org.apache.beam.model.pipeline.v1.IsBounded.Enum\x1aS\n\x15OutputWatermarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\x02\x38\x01\"\xa2\x01\n\x18\x44\x65layedBundleApplication\x12M\n\x0b\x61pplication\x18\x01 \x01(\x0b\x32\x38.org.apache.beam.model.fn_execution.v1.BundleApplication\x12\x37\n\x14requested_time_delay\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xce\x04\n\x14ProcessBundleRequest\x12$\n\x1cprocess_bundle_descriptor_id\x18\x01 \x01(\t\x12\\\n\x0c\x63\x61\x63he_tokens\x18\x02 \x03(\x0b\x32\x46.org.apache.beam.model.fn_execution.v1.ProcessBundleRequest.CacheToken\x12\x41\n\x08\x65lements\x18\x03 \x01(\x0b\x32/.org.apache.beam.model.fn_execution.v1.Elements\x12\x14\n\x0chas_no_state\x18\x04 \x01(\x08\x12\x1c\n\x14only_bundle_for_keys\x18\x05 \x01(\x08\x1a\xba\x02\n\nCacheToken\x12\x66\n\nuser_state\x18\x01 \x01(\x0b\x32P.org.apache.beam.model.fn_execution.v1.ProcessBundleRequest.CacheToken.UserStateH\x00\x12\x66\n\nside_input\x18\x02 \x01(\x0b\x32P.org.apache.beam.model.fn_execution.v1.ProcessBundleRequest.CacheToken.SideInputH\x00\x12\r\n\x05token\x18\n \x01(\x0c\x1a\x0b\n\tUserState\x1a\x38\n\tSideInput\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\rside_input_id\x18\x02 \x01(\tB\x06\n\x04type\"\xc7\x03\n\x15ProcessBundleResponse\x12W\n\x0eresidual_roots\x18\x02 \x03(\x0b\x32?.org.apache.beam.model.fn_execution.v1.DelayedBundleApplication\x12K\n\x10monitoring_infos\x18\x03 \x03(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.MonitoringInfo\x12\x1d\n\x15requires_finalization\x18\x04 \x01(\x08\x12i\n\x0fmonitoring_data\x18\x05 \x03(\x0b\x32P.org.apache.beam.model.fn_execution.v1.ProcessBundleResponse.MonitoringDataEntry\x12\x41\n\x08\x65lements\x18\x06 \x01(\x0b\x32/.org.apache.beam.model.fn_execution.v1.Elements\x1a\x35\n\x13MonitoringDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01J\x04\x08\x01\x10\x02\"6\n\x1cProcessBundleProgressRequest\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\"<\n\x1eMonitoringInfosMetadataRequest\x12\x1a\n\x12monitoring_info_id\x18\x01 \x03(\t\"\xea\x02\n\x1dProcessBundleProgressResponse\x12K\n\x10monitoring_infos\x18\x03 \x03(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.MonitoringInfo\x12q\n\x0fmonitoring_data\x18\x05 \x03(\x0b\x32X.org.apache.beam.model.fn_execution.v1.ProcessBundleProgressResponse.MonitoringDataEntry\x12$\n\x17\x63onsuming_received_data\x18\x06 \x01(\x08H\x00\x88\x01\x01\x1a\x35\n\x13MonitoringDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x1a\n\x18_consuming_received_dataJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05\"\x80\x02\n\x1fMonitoringInfosMetadataResponse\x12s\n\x0fmonitoring_info\x18\x01 \x03(\x0b\x32Z.org.apache.beam.model.fn_execution.v1.MonitoringInfosMetadataResponse.MonitoringInfoEntry\x1ah\n\x13MonitoringInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.MonitoringInfo:\x02\x38\x01\"\x95\x03\n\x19ProcessBundleSplitRequest\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12k\n\x0e\x64\x65sired_splits\x18\x03 \x03(\x0b\x32S.org.apache.beam.model.fn_execution.v1.ProcessBundleSplitRequest.DesiredSplitsEntry\x1am\n\x0c\x44\x65siredSplit\x12\x1d\n\x15\x66raction_of_remainder\x18\x01 \x01(\x01\x12\x1c\n\x14\x61llowed_split_points\x18\x03 \x03(\x03\x12 \n\x18\x65stimated_input_elements\x18\x02 \x01(\x03\x1a\x83\x01\n\x12\x44\x65siredSplitsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\\\n\x05value\x18\x02 \x01(\x0b\x32M.org.apache.beam.model.fn_execution.v1.ProcessBundleSplitRequest.DesiredSplit:\x02\x38\x01\"\x92\x03\n\x1aProcessBundleSplitResponse\x12O\n\rprimary_roots\x18\x01 \x03(\x0b\x32\x38.org.apache.beam.model.fn_execution.v1.BundleApplication\x12W\n\x0eresidual_roots\x18\x02 \x03(\x0b\x32?.org.apache.beam.model.fn_execution.v1.DelayedBundleApplication\x12\x66\n\x0e\x63hannel_splits\x18\x03 \x03(\x0b\x32N.org.apache.beam.model.fn_execution.v1.ProcessBundleSplitResponse.ChannelSplit\x1a\x62\n\x0c\x43hannelSplit\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x1c\n\x14last_primary_element\x18\x02 \x01(\x03\x12\x1e\n\x16\x66irst_residual_element\x18\x03 \x01(\x03\"/\n\x15\x46inalizeBundleRequest\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\"\x18\n\x16\x46inalizeBundleResponse\"\xeb\x04\n\x08\x45lements\x12\x42\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x34.org.apache.beam.model.fn_execution.v1.Elements.Data\x12\x46\n\x06timers\x18\x02 \x03(\x0b\x32\x36.org.apache.beam.model.fn_execution.v1.Elements.Timers\x1aW\n\x04\x44\x61ta\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12\x14\n\x0ctransform_id\x18\x02 \x01(\t\x12\x10\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\x02\x08\x01\x12\x0f\n\x07is_last\x18\x04 \x01(\x08\x1a\x44\n\tDrainMode\"7\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_DRAINING\x10\x01\x12\x0c\n\x08\x44RAINING\x10\x02\x1a\xc1\x01\n\x0f\x45lementMetadata\x12R\n\x05\x64rain\x18\x01 \x01(\x0e\x32>.org.apache.beam.model.fn_execution.v1.Elements.DrainMode.EnumH\x00\x88\x01\x01\x12\x18\n\x0btraceparent\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ntracestate\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_drainB\x0e\n\x0c_traceparentB\r\n\x0b_tracestate\x1ap\n\x06Timers\x12\x16\n\x0einstruction_id\x18\x01 \x01(\t\x12\x14\n\x0ctransform_id\x18\x02 \x01(\t\x12\x17\n\x0ftimer_family_id\x18\x03 \x01(\t\x12\x0e\n\x06timers\x18\x04 \x01(\x0c\x12\x0f\n\x07is_last\x18\x05 \x01(\x08\"\xe3\x02\n\x0cStateRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x16\n\x0einstruction_id\x18\x02 \x01(\t\x12\x42\n\tstate_key\x18\x03 \x01(\x0b\x32/.org.apache.beam.model.fn_execution.v1.StateKey\x12\x46\n\x03get\x18\xe8\x07 \x01(\x0b\x32\x36.org.apache.beam.model.fn_execution.v1.StateGetRequestH\x00\x12L\n\x06\x61ppend\x18\xe9\x07 \x01(\x0b\x32\x39.org.apache.beam.model.fn_execution.v1.StateAppendRequestH\x00\x12J\n\x05\x63lear\x18\xea\x07 \x01(\x0b\x32\x38.org.apache.beam.model.fn_execution.v1.StateClearRequestH\x00\x42\t\n\x07request\"\x9b\x02\n\rStateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12G\n\x03get\x18\xe8\x07 \x01(\x0b\x32\x37.org.apache.beam.model.fn_execution.v1.StateGetResponseH\x00\x12M\n\x06\x61ppend\x18\xe9\x07 \x01(\x0b\x32:.org.apache.beam.model.fn_execution.v1.StateAppendResponseH\x00\x12K\n\x05\x63lear\x18\xea\x07 \x01(\x0b\x32\x39.org.apache.beam.model.fn_execution.v1.StateClearResponseH\x00\x42\n\n\x08response\"\xba\x0f\n\x08StateKey\x12H\n\x06runner\x18\x01 \x01(\x0b\x32\x36.org.apache.beam.model.fn_execution.v1.StateKey.RunnerH\x00\x12`\n\x13multimap_side_input\x18\x02 \x01(\x0b\x32\x41.org.apache.beam.model.fn_execution.v1.StateKey.MultimapSideInputH\x00\x12V\n\x0e\x62\x61g_user_state\x18\x03 \x01(\x0b\x32<.org.apache.beam.model.fn_execution.v1.StateKey.BagUserStateH\x00\x12`\n\x13iterable_side_input\x18\x04 \x01(\x0b\x32\x41.org.apache.beam.model.fn_execution.v1.StateKey.IterableSideInputH\x00\x12i\n\x18multimap_keys_side_input\x18\x05 \x01(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.StateKey.MultimapKeysSideInputH\x00\x12v\n\x1fmultimap_keys_values_side_input\x18\x08 \x01(\x0b\x32K.org.apache.beam.model.fn_execution.v1.StateKey.MultimapKeysValuesSideInputH\x00\x12i\n\x18multimap_keys_user_state\x18\x06 \x01(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.StateKey.MultimapKeysUserStateH\x00\x12o\n\x1bmultimap_entries_user_state\x18\n \x01(\x0b\x32H.org.apache.beam.model.fn_execution.v1.StateKey.MultimapEntriesUserStateH\x00\x12`\n\x13multimap_user_state\x18\x07 \x01(\x0b\x32\x41.org.apache.beam.model.fn_execution.v1.StateKey.MultimapUserStateH\x00\x12g\n\x17ordered_list_user_state\x18\t \x01(\x0b\x32\x44.org.apache.beam.model.fn_execution.v1.StateKey.OrderedListUserStateH\x00\x1a\x15\n\x06Runner\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x1aP\n\x11IterableSideInput\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\rside_input_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x1a]\n\x11MultimapSideInput\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\rside_input_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x1aT\n\x15MultimapKeysSideInput\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\rside_input_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x1aZ\n\x1bMultimapKeysValuesSideInput\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\rside_input_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x1aX\n\x0c\x42\x61gUserState\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\ruser_state_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x1a\x61\n\x15MultimapKeysUserState\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\ruser_state_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x1a\x64\n\x18MultimapEntriesUserState\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\ruser_state_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x1an\n\x11MultimapUserState\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\ruser_state_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x0f\n\x07map_key\x18\x05 \x01(\x0c\x1a\xa8\x01\n\x14OrderedListUserState\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x15\n\ruser_state_id\x18\x02 \x01(\t\x12\x0e\n\x06window\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x46\n\x05range\x18\x05 \x01(\x0b\x32\x37.org.apache.beam.model.fn_execution.v1.OrderedListRangeB\x06\n\x04type\"-\n\x0fStateGetRequest\x12\x1a\n\x12\x63ontinuation_token\x18\x01 \x01(\x0c\"<\n\x10StateGetResponse\x12\x1a\n\x12\x63ontinuation_token\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\"\n\x12StateAppendRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"\x15\n\x13StateAppendResponse\"\x13\n\x11StateClearRequest\"\x14\n\x12StateClearResponse\".\n\x10OrderedListRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xee\x03\n\x08LogEntry\x12O\n\x08severity\x18\x01 \x01(\x0e\x32=.org.apache.beam.model.fn_execution.v1.LogEntry.Severity.Enum\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\r\n\x05trace\x18\x04 \x01(\t\x12\x16\n\x0einstruction_id\x18\x05 \x01(\t\x12\x14\n\x0ctransform_id\x18\x06 \x01(\t\x12\x14\n\x0clog_location\x18\x07 \x01(\t\x12\x0e\n\x06thread\x18\x08 \x01(\t\x12,\n\x0b\x63ustom_data\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x1aL\n\x04List\x12\x44\n\x0blog_entries\x18\x01 \x03(\x0b\x32/.org.apache.beam.model.fn_execution.v1.LogEntry\x1ar\n\x08Severity\"f\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\n\n\x06NOTICE\x10\x04\x12\x08\n\x04WARN\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\x0c\n\x08\x43RITICAL\x10\x07\"\x0c\n\nLogControl\"\xfc\x03\n\x12StartWorkerRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12Q\n\x10\x63ontrol_endpoint\x18\x02 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12Q\n\x10logging_endpoint\x18\x03 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12R\n\x11\x61rtifact_endpoint\x18\x04 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12S\n\x12provision_endpoint\x18\x05 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12U\n\x06params\x18\n \x03(\x0b\x32\x45.org.apache.beam.model.fn_execution.v1.StartWorkerRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"$\n\x13StartWorkerResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"&\n\x11StopWorkerRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\"#\n\x12StopWorkerResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"!\n\x13WorkerStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"F\n\x14WorkerStatusResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x13\n\x0bstatus_info\x18\x03 \x01(\t2\xc3\x02\n\rBeamFnControl\x12\x86\x01\n\x07\x43ontrol\x12:.org.apache.beam.model.fn_execution.v1.InstructionResponse\x1a\x39.org.apache.beam.model.fn_execution.v1.InstructionRequest\"\x00(\x01\x30\x01\x12\xa8\x01\n\x1aGetProcessBundleDescriptor\x12H.org.apache.beam.model.fn_execution.v1.GetProcessBundleDescriptorRequest\x1a>.org.apache.beam.model.fn_execution.v1.ProcessBundleDescriptor\"\x00\x32|\n\nBeamFnData\x12n\n\x04\x44\x61ta\x12/.org.apache.beam.model.fn_execution.v1.Elements\x1a/.org.apache.beam.model.fn_execution.v1.Elements\"\x00(\x01\x30\x01\x32\x87\x01\n\x0b\x42\x65\x61mFnState\x12x\n\x05State\x12\x33.org.apache.beam.model.fn_execution.v1.StateRequest\x1a\x34.org.apache.beam.model.fn_execution.v1.StateResponse\"\x00(\x01\x30\x01\x32\x89\x01\n\rBeamFnLogging\x12x\n\x07Logging\x12\x34.org.apache.beam.model.fn_execution.v1.LogEntry.List\x1a\x31.org.apache.beam.model.fn_execution.v1.LogControl\"\x00(\x01\x30\x01\x32\xa9\x02\n\x18\x42\x65\x61mFnExternalWorkerPool\x12\x86\x01\n\x0bStartWorker\x12\x39.org.apache.beam.model.fn_execution.v1.StartWorkerRequest\x1a:.org.apache.beam.model.fn_execution.v1.StartWorkerResponse\"\x00\x12\x83\x01\n\nStopWorker\x12\x38.org.apache.beam.model.fn_execution.v1.StopWorkerRequest\x1a\x39.org.apache.beam.model.fn_execution.v1.StopWorkerResponse\"\x00\x32\xa4\x01\n\x12\x42\x65\x61mFnWorkerStatus\x12\x8d\x01\n\x0cWorkerStatus\x12;.org.apache.beam.model.fn_execution.v1.WorkerStatusResponse\x1a:.org.apache.beam.model.fn_execution.v1.WorkerStatusRequest\"\x00(\x01\x30\x01\x42\x81\x01\n$org.apache.beam.model.fnexecution.v1B\tBeamFnApiZNgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1;fnexecution_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.fn_execution.v1.beam_fn_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n$org.apache.beam.model.fnexecution.v1B\tBeamFnApiZNgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1;fnexecution_v1' + _globals['_FNAPITRANSFORMS_RUNNER'].values_by_name["DATA_SOURCE"]._loaded_options = None + _globals['_FNAPITRANSFORMS_RUNNER'].values_by_name["DATA_SOURCE"]._serialized_options = b'\242\264\372\302\005\025beam:runner:source:v1' + _globals['_FNAPITRANSFORMS_RUNNER'].values_by_name["DATA_SINK"]._loaded_options = None + _globals['_FNAPITRANSFORMS_RUNNER'].values_by_name["DATA_SINK"]._serialized_options = b'\242\264\372\302\005\023beam:runner:sink:v1' + _globals['_SAMPLEDATARESPONSE_ELEMENTSAMPLESENTRY']._loaded_options = None + _globals['_SAMPLEDATARESPONSE_ELEMENTSAMPLESENTRY']._serialized_options = b'8\001' + _globals['_HARNESSMONITORINGINFOSRESPONSE_MONITORINGDATAENTRY']._loaded_options = None + _globals['_HARNESSMONITORINGINFOSRESPONSE_MONITORINGDATAENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEDESCRIPTOR_TRANSFORMSENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEDESCRIPTOR_TRANSFORMSENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEDESCRIPTOR_PCOLLECTIONSENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEDESCRIPTOR_PCOLLECTIONSENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEDESCRIPTOR_WINDOWINGSTRATEGIESENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEDESCRIPTOR_WINDOWINGSTRATEGIESENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEDESCRIPTOR_CODERSENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEDESCRIPTOR_CODERSENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEDESCRIPTOR_ENVIRONMENTSENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEDESCRIPTOR_ENVIRONMENTSENTRY']._serialized_options = b'8\001' + _globals['_BUNDLEAPPLICATION_OUTPUTWATERMARKSENTRY']._loaded_options = None + _globals['_BUNDLEAPPLICATION_OUTPUTWATERMARKSENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLERESPONSE_MONITORINGDATAENTRY']._loaded_options = None + _globals['_PROCESSBUNDLERESPONSE_MONITORINGDATAENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLEPROGRESSRESPONSE_MONITORINGDATAENTRY']._loaded_options = None + _globals['_PROCESSBUNDLEPROGRESSRESPONSE_MONITORINGDATAENTRY']._serialized_options = b'8\001' + _globals['_MONITORINGINFOSMETADATARESPONSE_MONITORINGINFOENTRY']._loaded_options = None + _globals['_MONITORINGINFOSMETADATARESPONSE_MONITORINGINFOENTRY']._serialized_options = b'8\001' + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLITSENTRY']._loaded_options = None + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLITSENTRY']._serialized_options = b'8\001' + _globals['_ELEMENTS_DATA'].fields_by_name['data']._loaded_options = None + _globals['_ELEMENTS_DATA'].fields_by_name['data']._serialized_options = b'\010\001' + _globals['_STARTWORKERREQUEST_PARAMSENTRY']._loaded_options = None + _globals['_STARTWORKERREQUEST_PARAMSENTRY']._serialized_options = b'8\001' + _globals['_FNAPITRANSFORMS']._serialized_start=384 + _globals['_FNAPITRANSFORMS']._serialized_end=499 + _globals['_FNAPITRANSFORMS_RUNNER']._serialized_start=403 + _globals['_FNAPITRANSFORMS_RUNNER']._serialized_end=499 + _globals['_REMOTEGRPCPORT']._serialized_start=501 + _globals['_REMOTEGRPCPORT']._serialized_end=624 + _globals['_GETPROCESSBUNDLEDESCRIPTORREQUEST']._serialized_start=626 + _globals['_GETPROCESSBUNDLEDESCRIPTORREQUEST']._serialized_end=699 + _globals['_INSTRUCTIONREQUEST']._serialized_start=702 + _globals['_INSTRUCTIONREQUEST']._serialized_end=1505 + _globals['_INSTRUCTIONRESPONSE']._serialized_start=1508 + _globals['_INSTRUCTIONRESPONSE']._serialized_end=2336 + _globals['_SAMPLEDATAREQUEST']._serialized_start=2338 + _globals['_SAMPLEDATAREQUEST']._serialized_end=2382 + _globals['_SAMPLEDELEMENT']._serialized_start=2385 + _globals['_SAMPLEDELEMENT']._serialized_end=2630 + _globals['_SAMPLEDELEMENT_EXCEPTION']._serialized_start=2558 + _globals['_SAMPLEDELEMENT_EXCEPTION']._serialized_end=2630 + _globals['_SAMPLEDATARESPONSE']._serialized_start=2633 + _globals['_SAMPLEDATARESPONSE']._serialized_end=2971 + _globals['_SAMPLEDATARESPONSE_ELEMENTLIST']._serialized_start=2759 + _globals['_SAMPLEDATARESPONSE_ELEMENTLIST']._serialized_end=2845 + _globals['_SAMPLEDATARESPONSE_ELEMENTSAMPLESENTRY']._serialized_start=2847 + _globals['_SAMPLEDATARESPONSE_ELEMENTSAMPLESENTRY']._serialized_end=2971 + _globals['_HARNESSMONITORINGINFOSREQUEST']._serialized_start=2973 + _globals['_HARNESSMONITORINGINFOSREQUEST']._serialized_end=3004 + _globals['_HARNESSMONITORINGINFOSRESPONSE']._serialized_start=3007 + _globals['_HARNESSMONITORINGINFOSRESPONSE']._serialized_end=3210 + _globals['_HARNESSMONITORINGINFOSRESPONSE_MONITORINGDATAENTRY']._serialized_start=3157 + _globals['_HARNESSMONITORINGINFOSRESPONSE_MONITORINGDATAENTRY']._serialized_end=3210 + _globals['_REGISTERREQUEST']._serialized_start=3212 + _globals['_REGISTERREQUEST']._serialized_end=3328 + _globals['_REGISTERRESPONSE']._serialized_start=3330 + _globals['_REGISTERRESPONSE']._serialized_end=3348 + _globals['_PROCESSBUNDLEDESCRIPTOR']._serialized_start=3351 + _globals['_PROCESSBUNDLEDESCRIPTOR']._serialized_end=4600 + _globals['_PROCESSBUNDLEDESCRIPTOR_TRANSFORMSENTRY']._serialized_start=4099 + _globals['_PROCESSBUNDLEDESCRIPTOR_TRANSFORMSENTRY']._serialized_end=4195 + _globals['_PROCESSBUNDLEDESCRIPTOR_PCOLLECTIONSENTRY']._serialized_start=4197 + _globals['_PROCESSBUNDLEDESCRIPTOR_PCOLLECTIONSENTRY']._serialized_end=4296 + _globals['_PROCESSBUNDLEDESCRIPTOR_WINDOWINGSTRATEGIESENTRY']._serialized_start=4298 + _globals['_PROCESSBUNDLEDESCRIPTOR_WINDOWINGSTRATEGIESENTRY']._serialized_end=4410 + _globals['_PROCESSBUNDLEDESCRIPTOR_CODERSENTRY']._serialized_start=4412 + _globals['_PROCESSBUNDLEDESCRIPTOR_CODERSENTRY']._serialized_end=4499 + _globals['_PROCESSBUNDLEDESCRIPTOR_ENVIRONMENTSENTRY']._serialized_start=4501 + _globals['_PROCESSBUNDLEDESCRIPTOR_ENVIRONMENTSENTRY']._serialized_end=4600 + _globals['_BUNDLEAPPLICATION']._serialized_start=4603 + _globals['_BUNDLEAPPLICATION']._serialized_end=4942 + _globals['_BUNDLEAPPLICATION_OUTPUTWATERMARKSENTRY']._serialized_start=4859 + _globals['_BUNDLEAPPLICATION_OUTPUTWATERMARKSENTRY']._serialized_end=4942 + _globals['_DELAYEDBUNDLEAPPLICATION']._serialized_start=4945 + _globals['_DELAYEDBUNDLEAPPLICATION']._serialized_end=5107 + _globals['_PROCESSBUNDLEREQUEST']._serialized_start=5110 + _globals['_PROCESSBUNDLEREQUEST']._serialized_end=5700 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN']._serialized_start=5386 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN']._serialized_end=5700 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN_USERSTATE']._serialized_start=5623 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN_USERSTATE']._serialized_end=5634 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN_SIDEINPUT']._serialized_start=5636 + _globals['_PROCESSBUNDLEREQUEST_CACHETOKEN_SIDEINPUT']._serialized_end=5692 + _globals['_PROCESSBUNDLERESPONSE']._serialized_start=5703 + _globals['_PROCESSBUNDLERESPONSE']._serialized_end=6158 + _globals['_PROCESSBUNDLERESPONSE_MONITORINGDATAENTRY']._serialized_start=3157 + _globals['_PROCESSBUNDLERESPONSE_MONITORINGDATAENTRY']._serialized_end=3210 + _globals['_PROCESSBUNDLEPROGRESSREQUEST']._serialized_start=6160 + _globals['_PROCESSBUNDLEPROGRESSREQUEST']._serialized_end=6214 + _globals['_MONITORINGINFOSMETADATAREQUEST']._serialized_start=6216 + _globals['_MONITORINGINFOSMETADATAREQUEST']._serialized_end=6276 + _globals['_PROCESSBUNDLEPROGRESSRESPONSE']._serialized_start=6279 + _globals['_PROCESSBUNDLEPROGRESSRESPONSE']._serialized_end=6641 + _globals['_PROCESSBUNDLEPROGRESSRESPONSE_MONITORINGDATAENTRY']._serialized_start=3157 + _globals['_PROCESSBUNDLEPROGRESSRESPONSE_MONITORINGDATAENTRY']._serialized_end=3210 + _globals['_MONITORINGINFOSMETADATARESPONSE']._serialized_start=6644 + _globals['_MONITORINGINFOSMETADATARESPONSE']._serialized_end=6900 + _globals['_MONITORINGINFOSMETADATARESPONSE_MONITORINGINFOENTRY']._serialized_start=6796 + _globals['_MONITORINGINFOSMETADATARESPONSE_MONITORINGINFOENTRY']._serialized_end=6900 + _globals['_PROCESSBUNDLESPLITREQUEST']._serialized_start=6903 + _globals['_PROCESSBUNDLESPLITREQUEST']._serialized_end=7308 + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLIT']._serialized_start=7065 + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLIT']._serialized_end=7174 + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLITSENTRY']._serialized_start=7177 + _globals['_PROCESSBUNDLESPLITREQUEST_DESIREDSPLITSENTRY']._serialized_end=7308 + _globals['_PROCESSBUNDLESPLITRESPONSE']._serialized_start=7311 + _globals['_PROCESSBUNDLESPLITRESPONSE']._serialized_end=7713 + _globals['_PROCESSBUNDLESPLITRESPONSE_CHANNELSPLIT']._serialized_start=7615 + _globals['_PROCESSBUNDLESPLITRESPONSE_CHANNELSPLIT']._serialized_end=7713 + _globals['_FINALIZEBUNDLEREQUEST']._serialized_start=7715 + _globals['_FINALIZEBUNDLEREQUEST']._serialized_end=7762 + _globals['_FINALIZEBUNDLERESPONSE']._serialized_start=7764 + _globals['_FINALIZEBUNDLERESPONSE']._serialized_end=7788 + _globals['_ELEMENTS']._serialized_start=7791 + _globals['_ELEMENTS']._serialized_end=8410 + _globals['_ELEMENTS_DATA']._serialized_start=7943 + _globals['_ELEMENTS_DATA']._serialized_end=8030 + _globals['_ELEMENTS_DRAINMODE']._serialized_start=8032 + _globals['_ELEMENTS_DRAINMODE']._serialized_end=8100 + _globals['_ELEMENTS_DRAINMODE_ENUM']._serialized_start=8045 + _globals['_ELEMENTS_DRAINMODE_ENUM']._serialized_end=8100 + _globals['_ELEMENTS_ELEMENTMETADATA']._serialized_start=8103 + _globals['_ELEMENTS_ELEMENTMETADATA']._serialized_end=8296 + _globals['_ELEMENTS_TIMERS']._serialized_start=8298 + _globals['_ELEMENTS_TIMERS']._serialized_end=8410 + _globals['_STATEREQUEST']._serialized_start=8413 + _globals['_STATEREQUEST']._serialized_end=8768 + _globals['_STATERESPONSE']._serialized_start=8771 + _globals['_STATERESPONSE']._serialized_end=9054 + _globals['_STATEKEY']._serialized_start=9057 + _globals['_STATEKEY']._serialized_end=11035 + _globals['_STATEKEY_RUNNER']._serialized_start=10077 + _globals['_STATEKEY_RUNNER']._serialized_end=10098 + _globals['_STATEKEY_ITERABLESIDEINPUT']._serialized_start=10100 + _globals['_STATEKEY_ITERABLESIDEINPUT']._serialized_end=10180 + _globals['_STATEKEY_MULTIMAPSIDEINPUT']._serialized_start=10182 + _globals['_STATEKEY_MULTIMAPSIDEINPUT']._serialized_end=10275 + _globals['_STATEKEY_MULTIMAPKEYSSIDEINPUT']._serialized_start=10277 + _globals['_STATEKEY_MULTIMAPKEYSSIDEINPUT']._serialized_end=10361 + _globals['_STATEKEY_MULTIMAPKEYSVALUESSIDEINPUT']._serialized_start=10363 + _globals['_STATEKEY_MULTIMAPKEYSVALUESSIDEINPUT']._serialized_end=10453 + _globals['_STATEKEY_BAGUSERSTATE']._serialized_start=10455 + _globals['_STATEKEY_BAGUSERSTATE']._serialized_end=10543 + _globals['_STATEKEY_MULTIMAPKEYSUSERSTATE']._serialized_start=10545 + _globals['_STATEKEY_MULTIMAPKEYSUSERSTATE']._serialized_end=10642 + _globals['_STATEKEY_MULTIMAPENTRIESUSERSTATE']._serialized_start=10644 + _globals['_STATEKEY_MULTIMAPENTRIESUSERSTATE']._serialized_end=10744 + _globals['_STATEKEY_MULTIMAPUSERSTATE']._serialized_start=10746 + _globals['_STATEKEY_MULTIMAPUSERSTATE']._serialized_end=10856 + _globals['_STATEKEY_ORDEREDLISTUSERSTATE']._serialized_start=10859 + _globals['_STATEKEY_ORDEREDLISTUSERSTATE']._serialized_end=11027 + _globals['_STATEGETREQUEST']._serialized_start=11037 + _globals['_STATEGETREQUEST']._serialized_end=11082 + _globals['_STATEGETRESPONSE']._serialized_start=11084 + _globals['_STATEGETRESPONSE']._serialized_end=11144 + _globals['_STATEAPPENDREQUEST']._serialized_start=11146 + _globals['_STATEAPPENDREQUEST']._serialized_end=11180 + _globals['_STATEAPPENDRESPONSE']._serialized_start=11182 + _globals['_STATEAPPENDRESPONSE']._serialized_end=11203 + _globals['_STATECLEARREQUEST']._serialized_start=11205 + _globals['_STATECLEARREQUEST']._serialized_end=11224 + _globals['_STATECLEARRESPONSE']._serialized_start=11226 + _globals['_STATECLEARRESPONSE']._serialized_end=11246 + _globals['_ORDEREDLISTRANGE']._serialized_start=11248 + _globals['_ORDEREDLISTRANGE']._serialized_end=11294 + _globals['_LOGENTRY']._serialized_start=11297 + _globals['_LOGENTRY']._serialized_end=11791 + _globals['_LOGENTRY_LIST']._serialized_start=11599 + _globals['_LOGENTRY_LIST']._serialized_end=11675 + _globals['_LOGENTRY_SEVERITY']._serialized_start=11677 + _globals['_LOGENTRY_SEVERITY']._serialized_end=11791 + _globals['_LOGENTRY_SEVERITY_ENUM']._serialized_start=11689 + _globals['_LOGENTRY_SEVERITY_ENUM']._serialized_end=11791 + _globals['_LOGCONTROL']._serialized_start=11793 + _globals['_LOGCONTROL']._serialized_end=11805 + _globals['_STARTWORKERREQUEST']._serialized_start=11808 + _globals['_STARTWORKERREQUEST']._serialized_end=12316 + _globals['_STARTWORKERREQUEST_PARAMSENTRY']._serialized_start=12271 + _globals['_STARTWORKERREQUEST_PARAMSENTRY']._serialized_end=12316 + _globals['_STARTWORKERRESPONSE']._serialized_start=12318 + _globals['_STARTWORKERRESPONSE']._serialized_end=12354 + _globals['_STOPWORKERREQUEST']._serialized_start=12356 + _globals['_STOPWORKERREQUEST']._serialized_end=12394 + _globals['_STOPWORKERRESPONSE']._serialized_start=12396 + _globals['_STOPWORKERRESPONSE']._serialized_end=12431 + _globals['_WORKERSTATUSREQUEST']._serialized_start=12433 + _globals['_WORKERSTATUSREQUEST']._serialized_end=12466 + _globals['_WORKERSTATUSRESPONSE']._serialized_start=12468 + _globals['_WORKERSTATUSRESPONSE']._serialized_end=12538 + _globals['_BEAMFNCONTROL']._serialized_start=12541 + _globals['_BEAMFNCONTROL']._serialized_end=12864 + _globals['_BEAMFNDATA']._serialized_start=12866 + _globals['_BEAMFNDATA']._serialized_end=12990 + _globals['_BEAMFNSTATE']._serialized_start=12993 + _globals['_BEAMFNSTATE']._serialized_end=13128 + _globals['_BEAMFNLOGGING']._serialized_start=13131 + _globals['_BEAMFNLOGGING']._serialized_end=13268 + _globals['_BEAMFNEXTERNALWORKERPOOL']._serialized_start=13271 + _globals['_BEAMFNEXTERNALWORKERPOOL']._serialized_end=13568 + _globals['_BEAMFNWORKERSTATUS']._serialized_start=13571 + _globals['_BEAMFNWORKERSTATUS']._serialized_end=13735 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.pyi new file mode 100644 index 000000000000..48d56b40f180 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2.pyi @@ -0,0 +1,2791 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +TODO: Consider consolidating common components in another package +and language namespaces for re-use with Runner Api. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +from ...pipeline.v1 import endpoints_pb2 as _endpoints_pb2 +from ...pipeline.v1 import metrics_pb2 as _metrics_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class FnApiTransforms(_message.Message): + """Describes transforms necessary to execute Beam over the FnAPI but are + implementation details rather than part of the core model. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Runner: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _RunnerEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[FnApiTransforms._Runner.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + DATA_SOURCE: FnApiTransforms._Runner.ValueType # 0 + """DataSource is a Root Transform, and a source of data for downstream + transforms in the same ProcessBundleDescriptor. + It represents a stream of values coming in from an external source/over + a data channel, typically from the runner. It's not the PCollection itself + but a description of how to get the portion of the PCollection for a given + bundle. + + The DataSource transform is implemented in each SDK and not explicitly + provided during pipeline construction. A runner inserts the transform + in ProcessBundleDescriptors to indicate where the bundle + can retrieve data for an associated ProcessBundleRequest. + Data for the same request will be retrieved with the matching instruction ID, + and transform ID determined by the runner. + + The DataSource transform will take a stream of bytes from the remote + source for the matching instruction ID and decode them as windowed + values using the provided coder ID, which must be a windowed value coder. + + Payload: RemoteGrpcPort + """ + DATA_SINK: FnApiTransforms._Runner.ValueType # 1 + """DataSink is a transform that sends PCollection elements to a remote + port using the Data API. + + The DataSink transform is implemented in each SDK and not explicitly + provided during pipeline construction. A runner inserts the transform in + ProcessBundleDescriptors to indicate where the bundle can send + data for each associated ProcessBundleRequest. Data for the same + request will be sent with the matching instruction ID and transform ID. + Each PCollection that exits the ProcessBundleDescriptor subgraph will have + it's own DataSink, keyed by a transform ID determined by the runner. + + The DataSink will take in a stream of elements for a given instruction ID + and encode them for transmission to the remote sink. The coder ID must be + for a windowed value coder. + + Payload: RemoteGrpcPort + """ + + class Runner(_Runner, metaclass=_RunnerEnumTypeWrapper): ... + DATA_SOURCE: FnApiTransforms.Runner.ValueType # 0 + """DataSource is a Root Transform, and a source of data for downstream + transforms in the same ProcessBundleDescriptor. + It represents a stream of values coming in from an external source/over + a data channel, typically from the runner. It's not the PCollection itself + but a description of how to get the portion of the PCollection for a given + bundle. + + The DataSource transform is implemented in each SDK and not explicitly + provided during pipeline construction. A runner inserts the transform + in ProcessBundleDescriptors to indicate where the bundle + can retrieve data for an associated ProcessBundleRequest. + Data for the same request will be retrieved with the matching instruction ID, + and transform ID determined by the runner. + + The DataSource transform will take a stream of bytes from the remote + source for the matching instruction ID and decode them as windowed + values using the provided coder ID, which must be a windowed value coder. + + Payload: RemoteGrpcPort + """ + DATA_SINK: FnApiTransforms.Runner.ValueType # 1 + """DataSink is a transform that sends PCollection elements to a remote + port using the Data API. + + The DataSink transform is implemented in each SDK and not explicitly + provided during pipeline construction. A runner inserts the transform in + ProcessBundleDescriptors to indicate where the bundle can send + data for each associated ProcessBundleRequest. Data for the same + request will be sent with the matching instruction ID and transform ID. + Each PCollection that exits the ProcessBundleDescriptor subgraph will have + it's own DataSink, keyed by a transform ID determined by the runner. + + The DataSink will take in a stream of elements for a given instruction ID + and encode them for transmission to the remote sink. The coder ID must be + for a windowed value coder. + + Payload: RemoteGrpcPort + """ + + def __init__( + self, + ) -> None: ... + +Global___FnApiTransforms: _TypeAlias = FnApiTransforms # noqa: Y015 + +@_typing.final +class RemoteGrpcPort(_message.Message): + """A descriptor for connecting to a remote port using the Beam Fn Data API. + Allows for communication between two environments (for example between the + runner and the SDK). + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + API_SERVICE_DESCRIPTOR_FIELD_NUMBER: _builtins.int + CODER_ID_FIELD_NUMBER: _builtins.int + coder_id: _builtins.str + """(Required) The ID of the Coder that will be used to encode and decode data + sent over this port. + """ + @_builtins.property + def api_service_descriptor(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(Required) An API descriptor which describes where to + connect to including any authentication that is required. + """ + + def __init__( + self, + *, + api_service_descriptor: _endpoints_pb2.ApiServiceDescriptor | None = ..., + coder_id: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["api_service_descriptor", b"api_service_descriptor"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["api_service_descriptor", b"api_service_descriptor", "coder_id", b"coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RemoteGrpcPort: _TypeAlias = RemoteGrpcPort # noqa: Y015 + +@_typing.final +class GetProcessBundleDescriptorRequest(_message.Message): + """Requests the ProcessBundleDescriptor with the given id.""" + + DESCRIPTOR: _descriptor.Descriptor + + PROCESS_BUNDLE_DESCRIPTOR_ID_FIELD_NUMBER: _builtins.int + process_bundle_descriptor_id: _builtins.str + def __init__( + self, + *, + process_bundle_descriptor_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["process_bundle_descriptor_id", b"process_bundle_descriptor_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetProcessBundleDescriptorRequest: _TypeAlias = GetProcessBundleDescriptorRequest # noqa: Y015 + +@_typing.final +class InstructionRequest(_message.Message): + """A request sent by a runner which the SDK is asked to fulfill. + For any unsupported request type, an error should be returned with a + matching instruction id. + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_PROGRESS_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_SPLIT_FIELD_NUMBER: _builtins.int + FINALIZE_BUNDLE_FIELD_NUMBER: _builtins.int + MONITORING_INFOS_FIELD_NUMBER: _builtins.int + HARNESS_MONITORING_INFOS_FIELD_NUMBER: _builtins.int + SAMPLE_DATA_FIELD_NUMBER: _builtins.int + REGISTER_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A unique identifier provided by the runner which represents + this requests execution. The InstructionResponse MUST have the matching id. + """ + @_builtins.property + def process_bundle(self) -> Global___ProcessBundleRequest: ... + @_builtins.property + def process_bundle_progress(self) -> Global___ProcessBundleProgressRequest: ... + @_builtins.property + def process_bundle_split(self) -> Global___ProcessBundleSplitRequest: ... + @_builtins.property + def finalize_bundle(self) -> Global___FinalizeBundleRequest: ... + @_builtins.property + def monitoring_infos(self) -> Global___MonitoringInfosMetadataRequest: ... + @_builtins.property + def harness_monitoring_infos(self) -> Global___HarnessMonitoringInfosRequest: ... + @_builtins.property + def sample_data(self) -> Global___SampleDataRequest: ... + @_builtins.property + def register(self) -> Global___RegisterRequest: + """DEPRECATED""" + + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + process_bundle: Global___ProcessBundleRequest | None = ..., + process_bundle_progress: Global___ProcessBundleProgressRequest | None = ..., + process_bundle_split: Global___ProcessBundleSplitRequest | None = ..., + finalize_bundle: Global___FinalizeBundleRequest | None = ..., + monitoring_infos: Global___MonitoringInfosMetadataRequest | None = ..., + harness_monitoring_infos: Global___HarnessMonitoringInfosRequest | None = ..., + sample_data: Global___SampleDataRequest | None = ..., + register: Global___RegisterRequest | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["finalize_bundle", b"finalize_bundle", "harness_monitoring_infos", b"harness_monitoring_infos", "monitoring_infos", b"monitoring_infos", "process_bundle", b"process_bundle", "process_bundle_progress", b"process_bundle_progress", "process_bundle_split", b"process_bundle_split", "register", b"register", "request", b"request", "sample_data", b"sample_data"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["finalize_bundle", b"finalize_bundle", "harness_monitoring_infos", b"harness_monitoring_infos", "instruction_id", b"instruction_id", "monitoring_infos", b"monitoring_infos", "process_bundle", b"process_bundle", "process_bundle_progress", b"process_bundle_progress", "process_bundle_split", b"process_bundle_split", "register", b"register", "request", b"request", "sample_data", b"sample_data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_request: _TypeAlias = _typing.Literal["process_bundle", "process_bundle_progress", "process_bundle_split", "finalize_bundle", "monitoring_infos", "harness_monitoring_infos", "sample_data", "register"] # noqa: Y015 + _WhichOneofArgType_request: _TypeAlias = _typing.Literal["request", b"request"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_request) -> _WhichOneofReturnType_request | None: ... + +Global___InstructionRequest: _TypeAlias = InstructionRequest # noqa: Y015 + +@_typing.final +class InstructionResponse(_message.Message): + """The response for an associated request the SDK had been asked to fulfill. + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_PROGRESS_FIELD_NUMBER: _builtins.int + PROCESS_BUNDLE_SPLIT_FIELD_NUMBER: _builtins.int + FINALIZE_BUNDLE_FIELD_NUMBER: _builtins.int + MONITORING_INFOS_FIELD_NUMBER: _builtins.int + HARNESS_MONITORING_INFOS_FIELD_NUMBER: _builtins.int + SAMPLE_DATA_FIELD_NUMBER: _builtins.int + REGISTER_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference provided by the runner which represents a requests + execution. The InstructionResponse MUST have the matching id when + responding to the runner. + """ + error: _builtins.str + """If this is specified, then this instruction has failed. + A human readable string representing the reason as to why processing has + failed. + """ + @_builtins.property + def process_bundle(self) -> Global___ProcessBundleResponse: ... + @_builtins.property + def process_bundle_progress(self) -> Global___ProcessBundleProgressResponse: ... + @_builtins.property + def process_bundle_split(self) -> Global___ProcessBundleSplitResponse: ... + @_builtins.property + def finalize_bundle(self) -> Global___FinalizeBundleResponse: ... + @_builtins.property + def monitoring_infos(self) -> Global___MonitoringInfosMetadataResponse: ... + @_builtins.property + def harness_monitoring_infos(self) -> Global___HarnessMonitoringInfosResponse: ... + @_builtins.property + def sample_data(self) -> Global___SampleDataResponse: ... + @_builtins.property + def register(self) -> Global___RegisterResponse: + """DEPRECATED""" + + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + error: _builtins.str | None = ..., + process_bundle: Global___ProcessBundleResponse | None = ..., + process_bundle_progress: Global___ProcessBundleProgressResponse | None = ..., + process_bundle_split: Global___ProcessBundleSplitResponse | None = ..., + finalize_bundle: Global___FinalizeBundleResponse | None = ..., + monitoring_infos: Global___MonitoringInfosMetadataResponse | None = ..., + harness_monitoring_infos: Global___HarnessMonitoringInfosResponse | None = ..., + sample_data: Global___SampleDataResponse | None = ..., + register: Global___RegisterResponse | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["finalize_bundle", b"finalize_bundle", "harness_monitoring_infos", b"harness_monitoring_infos", "monitoring_infos", b"monitoring_infos", "process_bundle", b"process_bundle", "process_bundle_progress", b"process_bundle_progress", "process_bundle_split", b"process_bundle_split", "register", b"register", "response", b"response", "sample_data", b"sample_data"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "finalize_bundle", b"finalize_bundle", "harness_monitoring_infos", b"harness_monitoring_infos", "instruction_id", b"instruction_id", "monitoring_infos", b"monitoring_infos", "process_bundle", b"process_bundle", "process_bundle_progress", b"process_bundle_progress", "process_bundle_split", b"process_bundle_split", "register", b"register", "response", b"response", "sample_data", b"sample_data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_response: _TypeAlias = _typing.Literal["process_bundle", "process_bundle_progress", "process_bundle_split", "finalize_bundle", "monitoring_infos", "harness_monitoring_infos", "sample_data", "register"] # noqa: Y015 + _WhichOneofArgType_response: _TypeAlias = _typing.Literal["response", b"response"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_response) -> _WhichOneofReturnType_response | None: ... + +Global___InstructionResponse: _TypeAlias = InstructionResponse # noqa: Y015 + +@_typing.final +class SampleDataRequest(_message.Message): + """If supported, the `SampleDataRequest` will respond with a + `SampleDataResponse`. The SDK being queried must have the + "beam:protocol:data_sampling:v1" capability. Samples are taken only from the + specified PCollection ids. An empty list will return everything. + """ + + DESCRIPTOR: _descriptor.Descriptor + + PCOLLECTION_IDS_FIELD_NUMBER: _builtins.int + @_builtins.property + def pcollection_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Optional) The PCollection ids to filter for.""" + + def __init__( + self, + *, + pcollection_ids: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["pcollection_ids", b"pcollection_ids"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SampleDataRequest: _TypeAlias = SampleDataRequest # noqa: Y015 + +@_typing.final +class SampledElement(_message.Message): + """An element sampled when the SDK is processing a bundle. This is a proto + message to allow for additional per-element metadata. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Exception(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) The instruction ID of the associated ProcessBundleRequest.""" + transform_id: _builtins.str + """(Required) The transform ID of the executing PTransform during the + exception. + """ + error: _builtins.str + """(Required) The error message to be displayed to the user. Can use the + other fields to query for contextual logs. + """ + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + transform_id: _builtins.str | None = ..., + error: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "instruction_id", b"instruction_id", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + ELEMENT_FIELD_NUMBER: _builtins.int + SAMPLE_TIMESTAMP_FIELD_NUMBER: _builtins.int + EXCEPTION_FIELD_NUMBER: _builtins.int + element: _builtins.bytes + """(Required) Sampled raw bytes for an element. This is a + single encoded element in the nested context. + """ + @_builtins.property + def sample_timestamp(self) -> _timestamp_pb2.Timestamp: + """(Required) Timestamp of when the sample was taken.""" + + @_builtins.property + def exception(self) -> Global___SampledElement.Exception: + """(Optional) This will be set if this element was sampled because of a user + exception. + """ + + def __init__( + self, + *, + element: _builtins.bytes | None = ..., + sample_timestamp: _timestamp_pb2.Timestamp | None = ..., + exception: Global___SampledElement.Exception | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["exception", b"exception", "sample_timestamp", b"sample_timestamp"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element", b"element", "exception", b"exception", "sample_timestamp", b"sample_timestamp"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SampledElement: _TypeAlias = SampledElement # noqa: Y015 + +@_typing.final +class SampleDataResponse(_message.Message): + """If supported, the `SampleDataResponse` will contain samples from PCollections + based upon the filters specified in the request. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ElementList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def elements(self) -> _containers.RepeatedCompositeFieldContainer[Global___SampledElement]: + """Required. The individual elements sampled from a PCollection.""" + + def __init__( + self, + *, + elements: _abc.Iterable[Global___SampledElement] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["elements", b"elements"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class ElementSamplesEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___SampleDataResponse.ElementList: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___SampleDataResponse.ElementList | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + ELEMENT_SAMPLES_FIELD_NUMBER: _builtins.int + @_builtins.property + def element_samples(self) -> _containers.MessageMap[_builtins.str, Global___SampleDataResponse.ElementList]: + """Map from PCollection id to sampled elements.""" + + def __init__( + self, + *, + element_samples: _abc.Mapping[_builtins.str, Global___SampleDataResponse.ElementList] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_samples", b"element_samples"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SampleDataResponse: _TypeAlias = SampleDataResponse # noqa: Y015 + +@_typing.final +class HarnessMonitoringInfosRequest(_message.Message): + """A request to provide full MonitoringInfo associated with the entire SDK + harness process, not specific to a bundle. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers + for the lifetime of the associated control connection as long + as the MonitoringInfo could be reconstructed fully by overwriting its + payload field with the bytes specified here. + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___HarnessMonitoringInfosRequest: _TypeAlias = HarnessMonitoringInfosRequest # noqa: Y015 + +@_typing.final +class HarnessMonitoringInfosResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class MonitoringDataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.bytes + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + MONITORING_DATA_FIELD_NUMBER: _builtins.int + @_builtins.property + def monitoring_data(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: + """An identifier to MonitoringInfo.payload mapping containing + Metrics associated with the SDK harness, not a specific bundle. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers + for the lifetime of the associated control connection as long + as the MonitoringInfo could be reconstructed fully by overwriting its + payload field with the bytes specified here. + """ + + def __init__( + self, + *, + monitoring_data: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["monitoring_data", b"monitoring_data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___HarnessMonitoringInfosResponse: _TypeAlias = HarnessMonitoringInfosResponse # noqa: Y015 + +@_typing.final +class RegisterRequest(_message.Message): + """A list of objects which can be referred to by the runner in + future requests. + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + PROCESS_BUNDLE_DESCRIPTOR_FIELD_NUMBER: _builtins.int + @_builtins.property + def process_bundle_descriptor(self) -> _containers.RepeatedCompositeFieldContainer[Global___ProcessBundleDescriptor]: + """(Optional) The set of descriptors used to process bundles.""" + + def __init__( + self, + *, + process_bundle_descriptor: _abc.Iterable[Global___ProcessBundleDescriptor] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["process_bundle_descriptor", b"process_bundle_descriptor"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RegisterRequest: _TypeAlias = RegisterRequest # noqa: Y015 + +@_typing.final +class RegisterResponse(_message.Message): + """Stable""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___RegisterResponse: _TypeAlias = RegisterResponse # noqa: Y015 + +@_typing.final +class ProcessBundleDescriptor(_message.Message): + """Definitions that should be used to construct the bundle processing graph.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class TransformsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _beam_runner_api_pb2.PTransform: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _beam_runner_api_pb2.PTransform | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class PcollectionsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _beam_runner_api_pb2.PCollection: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _beam_runner_api_pb2.PCollection | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class WindowingStrategiesEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _beam_runner_api_pb2.WindowingStrategy: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _beam_runner_api_pb2.WindowingStrategy | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class CodersEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _beam_runner_api_pb2.Coder: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _beam_runner_api_pb2.Coder | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class EnvironmentsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _beam_runner_api_pb2.Environment: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _beam_runner_api_pb2.Environment | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + ID_FIELD_NUMBER: _builtins.int + TRANSFORMS_FIELD_NUMBER: _builtins.int + PCOLLECTIONS_FIELD_NUMBER: _builtins.int + WINDOWING_STRATEGIES_FIELD_NUMBER: _builtins.int + CODERS_FIELD_NUMBER: _builtins.int + ENVIRONMENTS_FIELD_NUMBER: _builtins.int + STATE_API_SERVICE_DESCRIPTOR_FIELD_NUMBER: _builtins.int + TIMER_API_SERVICE_DESCRIPTOR_FIELD_NUMBER: _builtins.int + id: _builtins.str + """(Required) A pipeline level unique id which can be used as a reference to + refer to this. + """ + @_builtins.property + def transforms(self) -> _containers.MessageMap[_builtins.str, _beam_runner_api_pb2.PTransform]: + """(Required) A map from pipeline-scoped id to PTransform.""" + + @_builtins.property + def pcollections(self) -> _containers.MessageMap[_builtins.str, _beam_runner_api_pb2.PCollection]: + """(Required) A map from pipeline-scoped id to PCollection.""" + + @_builtins.property + def windowing_strategies(self) -> _containers.MessageMap[_builtins.str, _beam_runner_api_pb2.WindowingStrategy]: + """(Required) A map from pipeline-scoped id to WindowingStrategy.""" + + @_builtins.property + def coders(self) -> _containers.MessageMap[_builtins.str, _beam_runner_api_pb2.Coder]: + """(Required) A map from pipeline-scoped id to Coder.""" + + @_builtins.property + def environments(self) -> _containers.MessageMap[_builtins.str, _beam_runner_api_pb2.Environment]: + """(Required) A map from pipeline-scoped id to Environment.""" + + @_builtins.property + def state_api_service_descriptor(self) -> _endpoints_pb2.ApiServiceDescriptor: + """A descriptor describing the end point to use for State API + calls. Required if the Runner intends to send remote references over the + data plane or if any of the transforms rely on user state or side inputs. + """ + + @_builtins.property + def timer_api_service_descriptor(self) -> _endpoints_pb2.ApiServiceDescriptor: + """A descriptor describing the end point to use for Data API for user timers. + Required if the ProcessBundleDescriptor contains any transforms that have user timers. + """ + + def __init__( + self, + *, + id: _builtins.str | None = ..., + transforms: _abc.Mapping[_builtins.str, _beam_runner_api_pb2.PTransform] | None = ..., + pcollections: _abc.Mapping[_builtins.str, _beam_runner_api_pb2.PCollection] | None = ..., + windowing_strategies: _abc.Mapping[_builtins.str, _beam_runner_api_pb2.WindowingStrategy] | None = ..., + coders: _abc.Mapping[_builtins.str, _beam_runner_api_pb2.Coder] | None = ..., + environments: _abc.Mapping[_builtins.str, _beam_runner_api_pb2.Environment] | None = ..., + state_api_service_descriptor: _endpoints_pb2.ApiServiceDescriptor | None = ..., + timer_api_service_descriptor: _endpoints_pb2.ApiServiceDescriptor | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["state_api_service_descriptor", b"state_api_service_descriptor", "timer_api_service_descriptor", b"timer_api_service_descriptor"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coders", b"coders", "environments", b"environments", "id", b"id", "pcollections", b"pcollections", "state_api_service_descriptor", b"state_api_service_descriptor", "timer_api_service_descriptor", b"timer_api_service_descriptor", "transforms", b"transforms", "windowing_strategies", b"windowing_strategies"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleDescriptor: _TypeAlias = ProcessBundleDescriptor # noqa: Y015 + +@_typing.final +class BundleApplication(_message.Message): + """One of the applications specifying the scope of work for a bundle. + See + https://docs.google.com/document/d/1tUDb45sStdR8u7-jBkGdw3OGFK7aa2-V7eo86zYSE_4/edit#heading=h.9g3g5weg2u9 + for further details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class OutputWatermarksEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + INPUT_ID_FIELD_NUMBER: _builtins.int + ELEMENT_FIELD_NUMBER: _builtins.int + OUTPUT_WATERMARKS_FIELD_NUMBER: _builtins.int + IS_BOUNDED_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The transform to which to pass the element""" + input_id: _builtins.str + """(Required) Name of the transform's input to which to pass the element.""" + element: _builtins.bytes + """(Required) The encoded element to pass to the transform.""" + is_bounded: _beam_runner_api_pb2.IsBounded.Enum.ValueType + """Whether this application potentially produces an unbounded + amount of data. Note that this should only be set to BOUNDED if and + only if the application is known to produce a finite amount of output. + """ + @_builtins.property + def output_watermarks(self) -> _containers.MessageMap[_builtins.str, _timestamp_pb2.Timestamp]: + """The map is keyed by the local output name of the PTransform. Each + value represents a lower bound on the timestamps of elements that + are produced by this PTransform into each of its output PCollections + when invoked with this application. + + If there is no watermark reported from RestrictionTracker, the runner will + use MIN_TIMESTAMP by default. + """ + + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + input_id: _builtins.str | None = ..., + element: _builtins.bytes | None = ..., + output_watermarks: _abc.Mapping[_builtins.str, _timestamp_pb2.Timestamp] | None = ..., + is_bounded: _beam_runner_api_pb2.IsBounded.Enum.ValueType | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element", b"element", "input_id", b"input_id", "is_bounded", b"is_bounded", "output_watermarks", b"output_watermarks", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___BundleApplication: _TypeAlias = BundleApplication # noqa: Y015 + +@_typing.final +class DelayedBundleApplication(_message.Message): + """An Application should be scheduled for execution after a delay. + Either an absolute timestamp or a relative timestamp can represent a + scheduled execution time. + """ + + DESCRIPTOR: _descriptor.Descriptor + + APPLICATION_FIELD_NUMBER: _builtins.int + REQUESTED_TIME_DELAY_FIELD_NUMBER: _builtins.int + @_builtins.property + def application(self) -> Global___BundleApplication: + """(Required) The application that should be scheduled.""" + + @_builtins.property + def requested_time_delay(self) -> _duration_pb2.Duration: + """Recommended time delay at which the application should be scheduled to + execute by the runner. Time delay that equals 0 may be scheduled to execute + immediately. The unit of time delay should be microsecond. + """ + + def __init__( + self, + *, + application: Global___BundleApplication | None = ..., + requested_time_delay: _duration_pb2.Duration | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["application", b"application", "requested_time_delay", b"requested_time_delay"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["application", b"application", "requested_time_delay", b"requested_time_delay"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DelayedBundleApplication: _TypeAlias = DelayedBundleApplication # noqa: Y015 + +@_typing.final +class ProcessBundleRequest(_message.Message): + """A request to process a given bundle. + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class CacheToken(_message.Message): + """Contains the cache token and also defines the scope of what the token applies to. + + See https://s.apache.org/beam-fn-state-api-and-bundle-processing#heading=h.7ghoih5aig5m + for additional details on how to use the cache token with the State API + to cache data across bundle boundaries. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class UserState(_message.Message): + """A flag to indicate a cache token is valid for all user state.""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @_typing.final + class SideInput(_message.Message): + """A flag to indicate a cache token is valid for a side input.""" + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + SIDE_INPUT_ID_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing a side input.""" + side_input_id: _builtins.str + """(Required) The id of the side input.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + side_input_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["side_input_id", b"side_input_id", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + USER_STATE_FIELD_NUMBER: _builtins.int + SIDE_INPUT_FIELD_NUMBER: _builtins.int + TOKEN_FIELD_NUMBER: _builtins.int + token: _builtins.bytes + """An opaque token used with the StateKey to create a globally unique + identifier. + """ + @_builtins.property + def user_state(self) -> Global___ProcessBundleRequest.CacheToken.UserState: ... + @_builtins.property + def side_input(self) -> Global___ProcessBundleRequest.CacheToken.SideInput: ... + def __init__( + self, + *, + user_state: Global___ProcessBundleRequest.CacheToken.UserState | None = ..., + side_input: Global___ProcessBundleRequest.CacheToken.SideInput | None = ..., + token: _builtins.bytes | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["side_input", b"side_input", "type", b"type", "user_state", b"user_state"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["side_input", b"side_input", "token", b"token", "type", b"type", "user_state", b"user_state"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_type: _TypeAlias = _typing.Literal["user_state", "side_input"] # noqa: Y015 + _WhichOneofArgType_type: _TypeAlias = _typing.Literal["type", b"type"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None: ... + + PROCESS_BUNDLE_DESCRIPTOR_ID_FIELD_NUMBER: _builtins.int + CACHE_TOKENS_FIELD_NUMBER: _builtins.int + ELEMENTS_FIELD_NUMBER: _builtins.int + HAS_NO_STATE_FIELD_NUMBER: _builtins.int + ONLY_BUNDLE_FOR_KEYS_FIELD_NUMBER: _builtins.int + process_bundle_descriptor_id: _builtins.str + """(Required) A reference to the process bundle descriptor that must be + instantiated and executed by the SDK harness. + """ + has_no_state: _builtins.bool + """indicates that the runner has no stare for the keys in this bundle + so SDk can safely begin stateful processing with a locally-generated + initial empty state + """ + only_bundle_for_keys: _builtins.bool + """indicates that the runner will never process another bundle for the keys + in this bundle so state need not be included in the bundle commit. + """ + @_builtins.property + def cache_tokens(self) -> _containers.RepeatedCompositeFieldContainer[Global___ProcessBundleRequest.CacheToken]: + """(Optional) A list of cache tokens that can be used by an SDK to reuse + cached data returned by the State API across multiple bundles. + + Note that SDKs that can efficiently consume this field should declare + the beam:protocol:state_caching:v1 capability enabling runners to reduce + the amount of memory used. + + See https://s.apache.org/beam-fn-state-api-and-bundle-processing#heading=h.7ghoih5aig5m + for additional details on how to use the cache token with the State API + to cache data across bundle boundaries. + """ + + @_builtins.property + def elements(self) -> Global___Elements: + """(Optional) Elements to be processed with the bundle. Either all or + none of the bundle elements should be included in the ProcessBundleRequest. + This embedding is to achieve better efficiency for bundles that contain + only small amounts of data and are cheap to be processed on the SDK harness + side. This field can be set only if the SDK declares that it supports the + beam:protocol:control_request_elements_embedding:v1 capability. See more + at https://s.apache.org/beam-fn-api-control-data-embedding. + """ + + def __init__( + self, + *, + process_bundle_descriptor_id: _builtins.str | None = ..., + cache_tokens: _abc.Iterable[Global___ProcessBundleRequest.CacheToken] | None = ..., + elements: Global___Elements | None = ..., + has_no_state: _builtins.bool | None = ..., + only_bundle_for_keys: _builtins.bool | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["elements", b"elements"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["cache_tokens", b"cache_tokens", "elements", b"elements", "has_no_state", b"has_no_state", "only_bundle_for_keys", b"only_bundle_for_keys", "process_bundle_descriptor_id", b"process_bundle_descriptor_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleRequest: _TypeAlias = ProcessBundleRequest # noqa: Y015 + +@_typing.final +class ProcessBundleResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class MonitoringDataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.bytes + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + RESIDUAL_ROOTS_FIELD_NUMBER: _builtins.int + MONITORING_INFOS_FIELD_NUMBER: _builtins.int + REQUIRES_FINALIZATION_FIELD_NUMBER: _builtins.int + MONITORING_DATA_FIELD_NUMBER: _builtins.int + ELEMENTS_FIELD_NUMBER: _builtins.int + requires_finalization: _builtins.bool + """(Optional) Specifies that the runner must callback to this worker + once the output of the bundle is committed. The Runner must send a + FinalizeBundleRequest with the instruction id of the ProcessBundleRequest + that is related to this ProcessBundleResponse. + """ + @_builtins.property + def residual_roots(self) -> _containers.RepeatedCompositeFieldContainer[Global___DelayedBundleApplication]: + """(Optional) Specifies that the bundle has not been completed and the + following applications need to be scheduled and executed in the future. + A runner that does not yet support residual roots MUST still check that + this is empty for correctness. + + Note that these residual roots must not have been returned as part of a + prior split for this bundle. + """ + + @_builtins.property + def monitoring_infos(self) -> _containers.RepeatedCompositeFieldContainer[_metrics_pb2.MonitoringInfo]: + """DEPRECATED (Required) The list of metrics or other MonitoredState + collected while processing this bundle. + """ + + @_builtins.property + def monitoring_data(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: + """An identifier to MonitoringInfo.payload mapping. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers across multiple bundles as long + as the MonitoringInfo could be reconstructed fully by overwriting its + payload field with the bytes specified here. + """ + + @_builtins.property + def elements(self) -> Global___Elements: + """(Optional) Output elements of the processed bundle. Either all or + none of the bundle elements should be included in the ProcessBundleResponse. + This embedding is to achieve better efficiency for bundles that only + contain small amounts of data. his field can be set only if the runner + declares that it supports the + beam:protocol:control_request_elements_embedding:v1 capability. See more at + https://s.apache.org/beam-fn-api-control-data-embedding. + """ + + def __init__( + self, + *, + residual_roots: _abc.Iterable[Global___DelayedBundleApplication] | None = ..., + monitoring_infos: _abc.Iterable[_metrics_pb2.MonitoringInfo] | None = ..., + requires_finalization: _builtins.bool | None = ..., + monitoring_data: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ..., + elements: Global___Elements | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["elements", b"elements"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["elements", b"elements", "monitoring_data", b"monitoring_data", "monitoring_infos", b"monitoring_infos", "requires_finalization", b"requires_finalization", "residual_roots", b"residual_roots"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleResponse: _TypeAlias = ProcessBundleResponse # noqa: Y015 + +@_typing.final +class ProcessBundleProgressRequest(_message.Message): + """A request to report progress information for a given bundle. + This is an optional request to be handled and is used to support advanced + SDK features such as SplittableDoFn, user level metrics etc. + """ + + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference to an active process bundle request with the given + instruction id. + """ + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["instruction_id", b"instruction_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleProgressRequest: _TypeAlias = ProcessBundleProgressRequest # noqa: Y015 + +@_typing.final +class MonitoringInfosMetadataRequest(_message.Message): + """A request to provide full MonitoringInfo for a set of provided ids. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers for the lifetime of the + associated control connection as long as the MonitoringInfo could be + reconstructed fully by overwriting its payload field with the bytes specified + here. + """ + + DESCRIPTOR: _descriptor.Descriptor + + MONITORING_INFO_ID_FIELD_NUMBER: _builtins.int + @_builtins.property + def monitoring_info_id(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """A list of ids for which the full MonitoringInfo is requested for.""" + + def __init__( + self, + *, + monitoring_info_id: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["monitoring_info_id", b"monitoring_info_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MonitoringInfosMetadataRequest: _TypeAlias = MonitoringInfosMetadataRequest # noqa: Y015 + +@_typing.final +class ProcessBundleProgressResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class MonitoringDataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.bytes + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + MONITORING_INFOS_FIELD_NUMBER: _builtins.int + MONITORING_DATA_FIELD_NUMBER: _builtins.int + CONSUMING_RECEIVED_DATA_FIELD_NUMBER: _builtins.int + consuming_received_data: _builtins.bool + """Indicates that the SDK is still busy consuming the data that as already + been received on the data channel. If this is set, a runner may abstain + from sending further data on the data channel until this field becomes + unset. This field is currently used during shuffle reads on large elements. + """ + @_builtins.property + def monitoring_infos(self) -> _containers.RepeatedCompositeFieldContainer[_metrics_pb2.MonitoringInfo]: + """DEPRECATED (Required) The list of metrics or other MonitoredState + collected while processing this bundle. + """ + + @_builtins.property + def monitoring_data(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: + """An identifier to MonitoringInfo.payload mapping. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers + for the lifetime of the associated control connection as long + as the MonitoringInfo could be reconstructed fully by overwriting its + payload field with the bytes specified here. + """ + + def __init__( + self, + *, + monitoring_infos: _abc.Iterable[_metrics_pb2.MonitoringInfo] | None = ..., + monitoring_data: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ..., + consuming_received_data: _builtins.bool | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["_consuming_received_data", b"_consuming_received_data", "consuming_received_data", b"consuming_received_data"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_consuming_received_data", b"_consuming_received_data", "consuming_received_data", b"consuming_received_data", "monitoring_data", b"monitoring_data", "monitoring_infos", b"monitoring_infos"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__consuming_received_data: _TypeAlias = _typing.Literal["consuming_received_data"] # noqa: Y015 + _WhichOneofArgType__consuming_received_data: _TypeAlias = _typing.Literal["_consuming_received_data", b"_consuming_received_data"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType__consuming_received_data) -> _WhichOneofReturnType__consuming_received_data | None: ... + +Global___ProcessBundleProgressResponse: _TypeAlias = ProcessBundleProgressResponse # noqa: Y015 + +@_typing.final +class MonitoringInfosMetadataResponse(_message.Message): + """A response that contains the full mapping information associated with + a specified set of identifiers. + + An SDK can report metrics using an identifier that only contains the + associated payload. A runner who wants to receive the full metrics + information can request all the monitoring metadata via a + MonitoringInfosMetadataRequest providing a list of ids as necessary. + + The SDK is allowed to reuse the identifiers + for the lifetime of the associated control connection as long + as the MonitoringInfo could be reconstructed fully by overwriting its + payload field with the bytes specified here. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class MonitoringInfoEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> _metrics_pb2.MonitoringInfo: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _metrics_pb2.MonitoringInfo | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + MONITORING_INFO_FIELD_NUMBER: _builtins.int + @_builtins.property + def monitoring_info(self) -> _containers.MessageMap[_builtins.str, _metrics_pb2.MonitoringInfo]: + """A mapping from an identifier to the full metrics information.""" + + def __init__( + self, + *, + monitoring_info: _abc.Mapping[_builtins.str, _metrics_pb2.MonitoringInfo] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["monitoring_info", b"monitoring_info"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MonitoringInfosMetadataResponse: _TypeAlias = MonitoringInfosMetadataResponse # noqa: Y015 + +@_typing.final +class ProcessBundleSplitRequest(_message.Message): + """Represents a request to the SDK to split a currently active bundle.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class DesiredSplit(_message.Message): + """A message specifying the desired split for a single transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + FRACTION_OF_REMAINDER_FIELD_NUMBER: _builtins.int + ALLOWED_SPLIT_POINTS_FIELD_NUMBER: _builtins.int + ESTIMATED_INPUT_ELEMENTS_FIELD_NUMBER: _builtins.int + fraction_of_remainder: _builtins.float + """(Required) The fraction of known work remaining in this bundle + for this transform that should be kept by the SDK after this split. + + Set to 0 to "checkpoint" as soon as possible (keeping as little work as + possible and returning the remainder). + """ + estimated_input_elements: _builtins.int + """(Required for gRPC Read operation transforms) Number of total elements + expected to be sent to this GrpcRead operation, required to correctly + account for unreceived data when determining where to split. + """ + @_builtins.property + def allowed_split_points(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: + """(Optional) A set of allowed element indices where the SDK may split. When + this is empty, there are no constraints on where to split. + """ + + def __init__( + self, + *, + fraction_of_remainder: _builtins.float | None = ..., + allowed_split_points: _abc.Iterable[_builtins.int] | None = ..., + estimated_input_elements: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["allowed_split_points", b"allowed_split_points", "estimated_input_elements", b"estimated_input_elements", "fraction_of_remainder", b"fraction_of_remainder"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class DesiredSplitsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___ProcessBundleSplitRequest.DesiredSplit: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___ProcessBundleSplitRequest.DesiredSplit | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + DESIRED_SPLITS_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference to an active process bundle request with the given + instruction id. + """ + @_builtins.property + def desired_splits(self) -> _containers.MessageMap[_builtins.str, Global___ProcessBundleSplitRequest.DesiredSplit]: + """(Required) Specifies the desired split for each transform. + + Currently only splits at gRPC read operations are supported. + This may, of course, limit the amount of work downstream operations + receive. + """ + + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + desired_splits: _abc.Mapping[_builtins.str, Global___ProcessBundleSplitRequest.DesiredSplit] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["desired_splits", b"desired_splits", "instruction_id", b"instruction_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleSplitRequest: _TypeAlias = ProcessBundleSplitRequest # noqa: Y015 + +@_typing.final +class ProcessBundleSplitResponse(_message.Message): + """Represents a partition of the bundle: a "primary" and a "residual", with the + following properties: + - The work in primary and residual doesn't overlap, and combined, adds up + to the work in the current bundle if the split hadn't happened. + - The current bundle, if it keeps executing, will have done exactly none of + the work under residual_roots and none of the elements at and beyond the + first_residual_element. + - The current bundle, if no further splits happen, will have done exactly + the work under primary_roots and all elements up to and including the + channel split's last_primary_element. + + This allows the SDK to relinquish ownership of and commit to not process some + of the elements that it may have been sent (the residual) while retaining + ownership and commitment to finish the other portion (the primary). + + Example with three splits of a single bundle: + Let's say the SDK is processing elements [A B C D E]. These elements make + up the 0-indexed channel. + + ** First Split ** + Channel Split = [ A B C D <> E ] + Primary Roots = [] (No elements were split) + Residual Roots = [] + + Say a split request comes in. The SDK could return a response with a channel + split representing a last_primary_element of 3 (D) and + first_residual_element of 4 (E). The SDK is now responsible for processing A + B C D and the runner must process E in the future. + + (A B C D) | (E) + + ** Second Split ** + Channel Split = [ A < B C > D E ] + Primary Roots = [B1 C1] + Residual Roots = [B2 C2] + + A future split request could have the SDK split the elements B into B1 and + B2 and C into C1 and C2 representing their primary and residual roots. The + + (A B1 C1) | (B2 C2 D) + + SDK would return a response with a channel split representing a + last_primary_element of 0 (A) and first_residual_element of 3 (D) with + primary_roots (B1, C1) and residual_roots (B2, C2). The SDK is now + responsible for processing A B1 C1 and the runner must process B2 C2 D (and + E from the prior split) in the future. + + ** Third Split ** + Channel Split = [ A < B C > D E ] + Primary Roots = [B1a] + Residual Roots [B1b C1] + Yet another future split request could have the SDK could split B1 further + into B1a and B1b primary and residuals and return C1 as a residual (assuming + C1 was left unprocessed). The SDK would return a response with a channel + split representing a last_primary_element of 0 (A) and + first_residual_element of 3 (E) with primary_roots (B1a) and residual_roots + (B1b, C1). The SDK is now responsible for processing A B1a the runner must + process B1b C1 (in addition to C2, D, E from prior splits) in the future. + + (A B1a) | (B1b C1) + + For more rigorous definitions see https://s.apache.org/beam-breaking-fusion + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ChannelSplit(_message.Message): + """Represents contiguous portions of the data channel that are either + entirely processed or entirely unprocessed and belong to the primary + or residual respectively. + + This affords both a more efficient representation over the FnAPI + (if the bundle is large) and often a more efficient representation + on the runner side (e.g. if the set of elements can be represented + as some range in an underlying dataset). + + Note that for a split the following properties must hold: + - last_primary_element < first_residual_element + - primary roots and residual roots can only be specified if the + last_primary_element + 1 < first_residual_element + (typically there is one primary and residual root per element in the + range (last_primary_element, first_residual_element)) + - primary roots and residual roots must represent a disjoint but full + coverage of work represented by the elements between last_primary_element + and first_residual_element + + Note that subsequent splits of the same bundle must ensure that: + - the first_residual_element does not increase + - the first_residual_element does not decrease if there were residual + or primary roots returned in a prior split. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LAST_PRIMARY_ELEMENT_FIELD_NUMBER: _builtins.int + FIRST_RESIDUAL_ELEMENT_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The grpc read transform reading this channel.""" + last_primary_element: _builtins.int + """(Required) The last element of the input channel that should be entirely + considered part of the primary, identified by its absolute zero-based + index in the (ordered) channel. + """ + first_residual_element: _builtins.int + """(Required) The first element of the input channel that should be entirely + considered part of the residual, identified by its absolute zero-based + index in the (ordered) channel. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + last_primary_element: _builtins.int | None = ..., + first_residual_element: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["first_residual_element", b"first_residual_element", "last_primary_element", b"last_primary_element", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + PRIMARY_ROOTS_FIELD_NUMBER: _builtins.int + RESIDUAL_ROOTS_FIELD_NUMBER: _builtins.int + CHANNEL_SPLITS_FIELD_NUMBER: _builtins.int + @_builtins.property + def primary_roots(self) -> _containers.RepeatedCompositeFieldContainer[Global___BundleApplication]: + """(Optional) Root applications that should replace the current bundle. + + Note that primary roots can only be specified if a channel split's + last_primary_element + 1 < first_residual_element + + Note that there must be a corresponding residual root contained within + residual_roots representing the remainder of processing for the original + element this this primary root represents a fraction of. + """ + + @_builtins.property + def residual_roots(self) -> _containers.RepeatedCompositeFieldContainer[Global___DelayedBundleApplication]: + """(Optional) Root applications that have been removed from the current bundle and + have to be executed in a separate bundle (e.g. in parallel on a different + worker, or after the current bundle completes, etc.) + + Note that residual roots can only be specified if a channel split's + last_primary_element + 1 < first_residual_element + + Note that there must be a corresponding primary root contained within + primary_roots representing the remainder of processing for the original + element this this residual root represents a fraction of. + + Note that subsequent splits must not return prior residual roots. + """ + + @_builtins.property + def channel_splits(self) -> _containers.RepeatedCompositeFieldContainer[Global___ProcessBundleSplitResponse.ChannelSplit]: + """(Required) Partitions of input data channels into primary and residual + elements, if any. Must not include any elements represented in the bundle + applications roots above of the current split or any prior split of the + same bundle. + """ + + def __init__( + self, + *, + primary_roots: _abc.Iterable[Global___BundleApplication] | None = ..., + residual_roots: _abc.Iterable[Global___DelayedBundleApplication] | None = ..., + channel_splits: _abc.Iterable[Global___ProcessBundleSplitResponse.ChannelSplit] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["channel_splits", b"channel_splits", "primary_roots", b"primary_roots", "residual_roots", b"residual_roots"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessBundleSplitResponse: _TypeAlias = ProcessBundleSplitResponse # noqa: Y015 + +@_typing.final +class FinalizeBundleRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference to a completed process bundle request with the given + instruction id. + """ + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["instruction_id", b"instruction_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___FinalizeBundleRequest: _TypeAlias = FinalizeBundleRequest # noqa: Y015 + +@_typing.final +class FinalizeBundleResponse(_message.Message): + """Empty""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___FinalizeBundleResponse: _TypeAlias = FinalizeBundleResponse # noqa: Y015 + +@_typing.final +class Elements(_message.Message): + """ + Data Plane API + + Messages used to represent logical byte streams. + Stable + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Data(_message.Message): + """Represents multiple encoded elements in nested context for a given named + instruction and transform. + """ + + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + IS_LAST_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference to an active instruction request with the given + instruction id. + """ + transform_id: _builtins.str + """(Required) A definition representing a consumer or producer of this data. + If received by a harness, this represents the consumer within that + harness that should consume these bytes. If sent by a harness, this + represents the producer of these bytes. + + Note that a single element may span multiple Data messages. + + Note that a sending/receiving pair should share the same identifier. + """ + data: _builtins.bytes + """(Optional) Represents a part of a logical byte stream. Elements within + the logical byte stream are encoded in the nested context and + concatenated together. + """ + is_last: _builtins.bool + """(Optional) Set this bit to indicate the this is the last data block + for the given instruction and transform, ending the stream. + """ + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + transform_id: _builtins.str | None = ..., + data: _builtins.bytes | None = ..., + is_last: _builtins.bool | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "instruction_id", b"instruction_id", "is_last", b"is_last", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class DrainMode(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Elements.DrainMode._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: Elements.DrainMode._Enum.ValueType # 0 + NOT_DRAINING: Elements.DrainMode._Enum.ValueType # 1 + DRAINING: Elements.DrainMode._Enum.ValueType # 2 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: Elements.DrainMode.Enum.ValueType # 0 + NOT_DRAINING: Elements.DrainMode.Enum.ValueType # 1 + DRAINING: Elements.DrainMode.Enum.ValueType # 2 + + def __init__( + self, + ) -> None: ... + + @_typing.final + class ElementMetadata(_message.Message): + """Element metadata passed as part of WindowedValue to make WindowedValue + extensible and backward compatible + """ + + DESCRIPTOR: _descriptor.Descriptor + + DRAIN_FIELD_NUMBER: _builtins.int + TRACEPARENT_FIELD_NUMBER: _builtins.int + TRACESTATE_FIELD_NUMBER: _builtins.int + drain: Global___Elements.DrainMode.Enum.ValueType + traceparent: _builtins.str + """(Optional) As part of https://www.w3.org/TR/trace-context/ we are forwarding a trace and participating in it. + Traceparent header represents the incoming request in a tracing system in a common format. + Example value: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01 + """ + tracestate: _builtins.str + """(Optional) tracestate extends traceparent with open telemetry data represented by a set of name/value pairs. + Format specified https://www.w3.org/TR/trace-context/#list for interoperability and commonly used + across IOs - Kafka, PubSub, http. + Example value: congo=t61rcWkgMzE + """ + def __init__( + self, + *, + drain: Global___Elements.DrainMode.Enum.ValueType | None = ..., + traceparent: _builtins.str | None = ..., + tracestate: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["_drain", b"_drain", "_traceparent", b"_traceparent", "_tracestate", b"_tracestate", "drain", b"drain", "traceparent", b"traceparent", "tracestate", b"tracestate"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_drain", b"_drain", "_traceparent", b"_traceparent", "_tracestate", b"_tracestate", "drain", b"drain", "traceparent", b"traceparent", "tracestate", b"tracestate"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__drain: _TypeAlias = _typing.Literal["drain"] # noqa: Y015 + _WhichOneofArgType__drain: _TypeAlias = _typing.Literal["_drain", b"_drain"] # noqa: Y015 + _WhichOneofReturnType__traceparent: _TypeAlias = _typing.Literal["traceparent"] # noqa: Y015 + _WhichOneofArgType__traceparent: _TypeAlias = _typing.Literal["_traceparent", b"_traceparent"] # noqa: Y015 + _WhichOneofReturnType__tracestate: _TypeAlias = _typing.Literal["tracestate"] # noqa: Y015 + _WhichOneofArgType__tracestate: _TypeAlias = _typing.Literal["_tracestate", b"_tracestate"] # noqa: Y015 + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__drain) -> _WhichOneofReturnType__drain | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__traceparent) -> _WhichOneofReturnType__traceparent | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__tracestate) -> _WhichOneofReturnType__tracestate | None: ... + + @_typing.final + class Timers(_message.Message): + """Represent the encoded user timer for a given instruction, transform and + timer id. + """ + + DESCRIPTOR: _descriptor.Descriptor + + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + TIMER_FAMILY_ID_FIELD_NUMBER: _builtins.int + TIMERS_FIELD_NUMBER: _builtins.int + IS_LAST_FIELD_NUMBER: _builtins.int + instruction_id: _builtins.str + """(Required) A reference to an active instruction request with the given + instruction id. + """ + transform_id: _builtins.str + """(Required) A definition representing a consumer or producer of this data. + If received by a harness, this represents the consumer within that + harness that should consume these timers. If sent by a harness, this + represents the producer of these timers. + """ + timer_family_id: _builtins.str + """(Required) The local timer family name used to identify the associated + timer family specification + """ + timers: _builtins.bytes + """(Optional) Represents a logical byte stream of timers. Encoded according + to the coder in the timer spec. + """ + is_last: _builtins.bool + """(Optional) Set this bit to indicate the this is the last data block + for the given instruction and transform, ending the stream. + """ + def __init__( + self, + *, + instruction_id: _builtins.str | None = ..., + transform_id: _builtins.str | None = ..., + timer_family_id: _builtins.str | None = ..., + timers: _builtins.bytes | None = ..., + is_last: _builtins.bool | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["instruction_id", b"instruction_id", "is_last", b"is_last", "timer_family_id", b"timer_family_id", "timers", b"timers", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + DATA_FIELD_NUMBER: _builtins.int + TIMERS_FIELD_NUMBER: _builtins.int + @_builtins.property + def data(self) -> _containers.RepeatedCompositeFieldContainer[Global___Elements.Data]: + """(Optional) A list containing parts of logical byte streams.""" + + @_builtins.property + def timers(self) -> _containers.RepeatedCompositeFieldContainer[Global___Elements.Timers]: + """(Optional) A list of timer byte streams.""" + + def __init__( + self, + *, + data: _abc.Iterable[Global___Elements.Data] | None = ..., + timers: _abc.Iterable[Global___Elements.Timers] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "timers", b"timers"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Elements: _TypeAlias = Elements # noqa: Y015 + +@_typing.final +class StateRequest(_message.Message): + """ + State API + """ + + DESCRIPTOR: _descriptor.Descriptor + + ID_FIELD_NUMBER: _builtins.int + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + STATE_KEY_FIELD_NUMBER: _builtins.int + GET_FIELD_NUMBER: _builtins.int + APPEND_FIELD_NUMBER: _builtins.int + CLEAR_FIELD_NUMBER: _builtins.int + id: _builtins.str + """(Required) A unique identifier provided by the SDK which represents this + requests execution. The StateResponse corresponding with this request + will have the matching id. + """ + instruction_id: _builtins.str + """(Required) The associated instruction id of the work that is currently + being processed. This allows for the runner to associate any modifications + to state to be committed with the appropriate work execution. + """ + @_builtins.property + def state_key(self) -> Global___StateKey: + """(Required) The state key this request is for.""" + + @_builtins.property + def get(self) -> Global___StateGetRequest: + """A request to get state.""" + + @_builtins.property + def append(self) -> Global___StateAppendRequest: + """A request to append to state.""" + + @_builtins.property + def clear(self) -> Global___StateClearRequest: + """A request to clear state.""" + + def __init__( + self, + *, + id: _builtins.str | None = ..., + instruction_id: _builtins.str | None = ..., + state_key: Global___StateKey | None = ..., + get: Global___StateGetRequest | None = ..., + append: Global___StateAppendRequest | None = ..., + clear: Global___StateClearRequest | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["append", b"append", "clear", b"clear", "get", b"get", "request", b"request", "state_key", b"state_key"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["append", b"append", "clear", b"clear", "get", b"get", "id", b"id", "instruction_id", b"instruction_id", "request", b"request", "state_key", b"state_key"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_request: _TypeAlias = _typing.Literal["get", "append", "clear"] # noqa: Y015 + _WhichOneofArgType_request: _TypeAlias = _typing.Literal["request", b"request"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_request) -> _WhichOneofReturnType_request | None: ... + +Global___StateRequest: _TypeAlias = StateRequest # noqa: Y015 + +@_typing.final +class StateResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ID_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + GET_FIELD_NUMBER: _builtins.int + APPEND_FIELD_NUMBER: _builtins.int + CLEAR_FIELD_NUMBER: _builtins.int + id: _builtins.str + """(Required) A reference provided by the SDK which represents a requests + execution. The StateResponse must have the matching id when responding + to the SDK. + """ + error: _builtins.str + """(Optional) If this is specified, then the state request has failed. + A human readable string representing the reason as to why the request + failed. + """ + @_builtins.property + def get(self) -> Global___StateGetResponse: + """A response to getting state.""" + + @_builtins.property + def append(self) -> Global___StateAppendResponse: + """A response to appending to state.""" + + @_builtins.property + def clear(self) -> Global___StateClearResponse: + """A response to clearing state.""" + + def __init__( + self, + *, + id: _builtins.str | None = ..., + error: _builtins.str | None = ..., + get: Global___StateGetResponse | None = ..., + append: Global___StateAppendResponse | None = ..., + clear: Global___StateClearResponse | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["append", b"append", "clear", b"clear", "get", b"get", "response", b"response"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["append", b"append", "clear", b"clear", "error", b"error", "get", b"get", "id", b"id", "response", b"response"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_response: _TypeAlias = _typing.Literal["get", "append", "clear"] # noqa: Y015 + _WhichOneofArgType_response: _TypeAlias = _typing.Literal["response", b"response"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_response) -> _WhichOneofReturnType_response | None: ... + +Global___StateResponse: _TypeAlias = StateResponse # noqa: Y015 + +@_typing.final +class StateKey(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Runner(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + key: _builtins.bytes + """(Required) Opaque information supplied by the runner. Used to support + remote references. + https://s.apache.org/beam-fn-api-send-and-receive-data + + Used by state backed iterable. And in this use case, request type can + only be of type get. Details see: + https://s.apache.org/beam-fn-api-state-backed-iterables + """ + def __init__( + self, + *, + key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class IterableSideInput(_message.Message): + """Represents a request for the values associated with a specified window + in a PCollection. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + Can only be used to perform StateGetRequests on side inputs of the URN + beam:side_input:iterable:v1. + + For a PCollection, the response data stream will be a concatenation + of all V's. See https://s.apache.org/beam-fn-api-send-and-receive-data + for further details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + SIDE_INPUT_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing a side input.""" + side_input_id: _builtins.str + """(Required) The id of the side input.""" + window: _builtins.bytes + """(Required) The window (after mapping the currently executing elements + window into the side input windows domain) encoded in a nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + side_input_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["side_input_id", b"side_input_id", "transform_id", b"transform_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapSideInput(_message.Message): + """Represents a request for the values associated with a specified user key + and window in a PCollection. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + Can only be used to perform StateGetRequests on side inputs of the URN + beam:side_input:multimap:v1. + + For a PCollection>, the response data stream will be a + concatenation of all V's associated with the specified key K. See + https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + SIDE_INPUT_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing a side input.""" + side_input_id: _builtins.str + """(Required) The id of the side input.""" + window: _builtins.bytes + """(Required) The window (after mapping the currently executing elements + window into the side input windows domain) encoded in a nested context. + """ + key: _builtins.bytes + """(Required) The key encoded in a nested context.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + side_input_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "side_input_id", b"side_input_id", "transform_id", b"transform_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapKeysSideInput(_message.Message): + """Represents a request for the keys associated with a specified window in a PCollection. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + Can only be used to perform StateGetRequests on side inputs of the URN + beam:side_input:multimap:v1. + + For a PCollection>, the response data stream will be a + concatenation of all K's associated with the specified window. See + https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + SIDE_INPUT_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing a side input.""" + side_input_id: _builtins.str + """(Required) The id of the side input.""" + window: _builtins.bytes + """(Required) The window (after mapping the currently executing elements + window into the side input windows domain) encoded in a nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + side_input_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["side_input_id", b"side_input_id", "transform_id", b"transform_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapKeysValuesSideInput(_message.Message): + """Represents a request for the keys and values associated with a specified window in a PCollection. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + This is expected to be more efficient than iterating over they keys and + looking up the values one at a time. If a runner chooses not to implement + this protocol, or a key has too many values to fit into a single response, + the runner is free to fail the request and a fallback to point lookups + will be performed by the SDK. + + Can only be used to perform StateGetRequests on side inputs of the URN + beam:side_input:multimap:v1. + + For a PCollection>, the response data stream will be a + concatenation of all KVs associated with the specified window, + encoded with the the KV> coder. + See + https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + SIDE_INPUT_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing a side input.""" + side_input_id: _builtins.str + """(Required) The id of the side input.""" + window: _builtins.bytes + """(Required) The window (after mapping the currently executing elements + window into the side input windows domain) encoded in a nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + side_input_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["side_input_id", b"side_input_id", "transform_id", b"transform_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class BagUserState(_message.Message): + """Represents a request for an unordered set of values associated with a + specified user key and window for a PTransform. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + The response data stream will be a concatenation of all V's associated + with the specified user key and window. + See https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + USER_STATE_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing user state.""" + user_state_id: _builtins.str + """(Required) The id of the user state.""" + window: _builtins.bytes + """(Required) The window encoded in a nested context.""" + key: _builtins.bytes + """(Required) The key of the currently executing element encoded in a + nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + user_state_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "transform_id", b"transform_id", "user_state_id", b"user_state_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapKeysUserState(_message.Message): + """Represents a request for the keys of a multimap associated with a specified + user key and window for a PTransform. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + Can only be used to perform StateGetRequests and StateClearRequests on the + user state. + + The response data stream will be a concatenation of all K's associated + with the specified user key and window. + See https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + USER_STATE_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing user state.""" + user_state_id: _builtins.str + """(Required) The id of the user state.""" + window: _builtins.bytes + """(Required) The window encoded in a nested context.""" + key: _builtins.bytes + """(Required) The key of the currently executing element encoded in a + nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + user_state_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "transform_id", b"transform_id", "user_state_id", b"user_state_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapEntriesUserState(_message.Message): + """Represents a request for all of the entries of a multimap associated with a + specified user key and window for a PTransform. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + Can only be used to perform StateGetRequests and StateClearRequests on the + user state. + + The response data stream will be a concatenation of pairs, where the first + component is the map key and the second component is a concatenation of + values associated with that map key. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + USER_STATE_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing user state.""" + user_state_id: _builtins.str + """(Required) The id of the user state.""" + window: _builtins.bytes + """(Required) The window encoded in a nested context.""" + key: _builtins.bytes + """(Required) The key of the currently executing element encoded in a + nested context. + """ + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + user_state_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "transform_id", b"transform_id", "user_state_id", b"user_state_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class MultimapUserState(_message.Message): + """Represents a request for the values of the map key associated with a + specified user key and window for a PTransform. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + The response data stream will be a concatenation of all V's associated + with the specified map key, user key, and window. + See https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + USER_STATE_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + MAP_KEY_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing user state.""" + user_state_id: _builtins.str + """(Required) The id of the user state.""" + window: _builtins.bytes + """(Required) The window encoded in a nested context.""" + key: _builtins.bytes + """(Required) The key of the currently executing element encoded in a + nested context. + """ + map_key: _builtins.bytes + """(Required) The map key encoded in a nested context.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + user_state_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + map_key: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "map_key", b"map_key", "transform_id", b"transform_id", "user_state_id", b"user_state_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class OrderedListUserState(_message.Message): + """Represents a request for an ordered list of values associated with a + specified user key and window for a PTransform. See + https://s.apache.org/beam-fn-state-api-and-bundle-processing for further + details. + + The response data stream will be a concatenation of all entries of sort key + and V's associated with the specified user key and window. + See https://s.apache.org/beam-fn-api-send-and-receive-data for further + details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + USER_STATE_ID_FIELD_NUMBER: _builtins.int + WINDOW_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + RANGE_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform containing user state.""" + user_state_id: _builtins.str + """(Required) The id of the user state.""" + window: _builtins.bytes + """(Required) The window encoded in a nested context.""" + key: _builtins.bytes + """(Required) The key of the currently executing element encoded in a + nested context. + """ + @_builtins.property + def range(self) -> Global___OrderedListRange: + """(Required) The sort range encoded in a nested context.""" + + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + user_state_id: _builtins.str | None = ..., + window: _builtins.bytes | None = ..., + key: _builtins.bytes | None = ..., + range: Global___OrderedListRange | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["range", b"range"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "range", b"range", "transform_id", b"transform_id", "user_state_id", b"user_state_id", "window", b"window"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + RUNNER_FIELD_NUMBER: _builtins.int + MULTIMAP_SIDE_INPUT_FIELD_NUMBER: _builtins.int + BAG_USER_STATE_FIELD_NUMBER: _builtins.int + ITERABLE_SIDE_INPUT_FIELD_NUMBER: _builtins.int + MULTIMAP_KEYS_SIDE_INPUT_FIELD_NUMBER: _builtins.int + MULTIMAP_KEYS_VALUES_SIDE_INPUT_FIELD_NUMBER: _builtins.int + MULTIMAP_KEYS_USER_STATE_FIELD_NUMBER: _builtins.int + MULTIMAP_ENTRIES_USER_STATE_FIELD_NUMBER: _builtins.int + MULTIMAP_USER_STATE_FIELD_NUMBER: _builtins.int + ORDERED_LIST_USER_STATE_FIELD_NUMBER: _builtins.int + @_builtins.property + def runner(self) -> Global___StateKey.Runner: ... + @_builtins.property + def multimap_side_input(self) -> Global___StateKey.MultimapSideInput: ... + @_builtins.property + def bag_user_state(self) -> Global___StateKey.BagUserState: ... + @_builtins.property + def iterable_side_input(self) -> Global___StateKey.IterableSideInput: ... + @_builtins.property + def multimap_keys_side_input(self) -> Global___StateKey.MultimapKeysSideInput: ... + @_builtins.property + def multimap_keys_values_side_input(self) -> Global___StateKey.MultimapKeysValuesSideInput: ... + @_builtins.property + def multimap_keys_user_state(self) -> Global___StateKey.MultimapKeysUserState: ... + @_builtins.property + def multimap_entries_user_state(self) -> Global___StateKey.MultimapEntriesUserState: ... + @_builtins.property + def multimap_user_state(self) -> Global___StateKey.MultimapUserState: ... + @_builtins.property + def ordered_list_user_state(self) -> Global___StateKey.OrderedListUserState: ... + def __init__( + self, + *, + runner: Global___StateKey.Runner | None = ..., + multimap_side_input: Global___StateKey.MultimapSideInput | None = ..., + bag_user_state: Global___StateKey.BagUserState | None = ..., + iterable_side_input: Global___StateKey.IterableSideInput | None = ..., + multimap_keys_side_input: Global___StateKey.MultimapKeysSideInput | None = ..., + multimap_keys_values_side_input: Global___StateKey.MultimapKeysValuesSideInput | None = ..., + multimap_keys_user_state: Global___StateKey.MultimapKeysUserState | None = ..., + multimap_entries_user_state: Global___StateKey.MultimapEntriesUserState | None = ..., + multimap_user_state: Global___StateKey.MultimapUserState | None = ..., + ordered_list_user_state: Global___StateKey.OrderedListUserState | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["bag_user_state", b"bag_user_state", "iterable_side_input", b"iterable_side_input", "multimap_entries_user_state", b"multimap_entries_user_state", "multimap_keys_side_input", b"multimap_keys_side_input", "multimap_keys_user_state", b"multimap_keys_user_state", "multimap_keys_values_side_input", b"multimap_keys_values_side_input", "multimap_side_input", b"multimap_side_input", "multimap_user_state", b"multimap_user_state", "ordered_list_user_state", b"ordered_list_user_state", "runner", b"runner", "type", b"type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bag_user_state", b"bag_user_state", "iterable_side_input", b"iterable_side_input", "multimap_entries_user_state", b"multimap_entries_user_state", "multimap_keys_side_input", b"multimap_keys_side_input", "multimap_keys_user_state", b"multimap_keys_user_state", "multimap_keys_values_side_input", b"multimap_keys_values_side_input", "multimap_side_input", b"multimap_side_input", "multimap_user_state", b"multimap_user_state", "ordered_list_user_state", b"ordered_list_user_state", "runner", b"runner", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_type: _TypeAlias = _typing.Literal["runner", "multimap_side_input", "bag_user_state", "iterable_side_input", "multimap_keys_side_input", "multimap_keys_values_side_input", "multimap_keys_user_state", "multimap_entries_user_state", "multimap_user_state", "ordered_list_user_state"] # noqa: Y015 + _WhichOneofArgType_type: _TypeAlias = _typing.Literal["type", b"type"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None: ... + +Global___StateKey: _TypeAlias = StateKey # noqa: Y015 + +@_typing.final +class StateGetRequest(_message.Message): + """A request to get state.""" + + DESCRIPTOR: _descriptor.Descriptor + + CONTINUATION_TOKEN_FIELD_NUMBER: _builtins.int + continuation_token: _builtins.bytes + """(Optional) If specified, signals to the runner that the response + should resume from the following continuation token. + + If unspecified, signals to the runner that the response should start + from the beginning of the logical continuable stream. + """ + def __init__( + self, + *, + continuation_token: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["continuation_token", b"continuation_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StateGetRequest: _TypeAlias = StateGetRequest # noqa: Y015 + +@_typing.final +class StateGetResponse(_message.Message): + """A response to get state representing a logical byte stream which can be + continued using the state API. + """ + + DESCRIPTOR: _descriptor.Descriptor + + CONTINUATION_TOKEN_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + continuation_token: _builtins.bytes + """(Optional) If specified, represents a token which can be used with the + state API to get the next chunk of this logical byte stream. The end of + the logical byte stream is signalled by this field being unset. + """ + data: _builtins.bytes + """Represents a part of a logical byte stream. Elements within + the logical byte stream are encoded in the nested context and + concatenated together. + + See also the note about OrderedListState in StateAppendRequest. + """ + def __init__( + self, + *, + continuation_token: _builtins.bytes | None = ..., + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["continuation_token", b"continuation_token", "data", b"data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StateGetResponse: _TypeAlias = StateGetResponse # noqa: Y015 + +@_typing.final +class StateAppendRequest(_message.Message): + """A request to append state.""" + + DESCRIPTOR: _descriptor.Descriptor + + DATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes + """Represents a part of a logical byte stream. Elements within + the logical byte stream are encoded in the nested context and + multiple append requests are concatenated together. + + For OrderedListState, elements of should be encoded with the + beam:coder:kv:v1 coder, where the first (key) component must be a + beam:coder:varint:v1 and the second (value) component must be encoded + with a beam:coder:length_prefix:v1 coder. + """ + def __init__( + self, + *, + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StateAppendRequest: _TypeAlias = StateAppendRequest # noqa: Y015 + +@_typing.final +class StateAppendResponse(_message.Message): + """A response to append state.""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___StateAppendResponse: _TypeAlias = StateAppendResponse # noqa: Y015 + +@_typing.final +class StateClearRequest(_message.Message): + """A request to clear state.""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___StateClearRequest: _TypeAlias = StateClearRequest # noqa: Y015 + +@_typing.final +class StateClearResponse(_message.Message): + """A response to clear state.""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___StateClearResponse: _TypeAlias = StateClearResponse # noqa: Y015 + +@_typing.final +class OrderedListRange(_message.Message): + """A message describes a sort key range [start, end).""" + + DESCRIPTOR: _descriptor.Descriptor + + START_FIELD_NUMBER: _builtins.int + END_FIELD_NUMBER: _builtins.int + start: _builtins.int + end: _builtins.int + def __init__( + self, + *, + start: _builtins.int | None = ..., + end: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["end", b"end", "start", b"start"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___OrderedListRange: _TypeAlias = OrderedListRange # noqa: Y015 + +@_typing.final +class LogEntry(_message.Message): + """ + Logging API + + This is very stable. There can be some changes to how we define a LogEntry, + to increase/decrease the severity types, the way we format an exception/stack + trace, or the log site. + + A log entry + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class List(_message.Message): + """A list of log entries, enables buffering and batching of multiple + log messages using the logging API. + """ + + DESCRIPTOR: _descriptor.Descriptor + + LOG_ENTRIES_FIELD_NUMBER: _builtins.int + @_builtins.property + def log_entries(self) -> _containers.RepeatedCompositeFieldContainer[Global___LogEntry]: + """(Required) One or or more log messages.""" + + def __init__( + self, + *, + log_entries: _abc.Iterable[Global___LogEntry] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["log_entries", b"log_entries"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class Severity(_message.Message): + """The severity of the event described in a log entry, expressed as one of the + severity levels listed below. For your reference, the levels are + assigned the listed numeric values. The effect of using numeric values + other than those listed is undefined. + + If you are writing log entries, you should map other severity encodings to + one of these standard levels. For example, you might map all of + Java's FINE, FINER, and FINEST levels to `Severity.DEBUG`. + + This list is intentionally not comprehensive; the intent is to provide a + common set of "good enough" severity levels so that logging front ends + can provide filtering and searching across log types. Users of the API are + free not to use all severity levels in their log messages. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[LogEntry.Severity._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: LogEntry.Severity._Enum.ValueType # 0 + """Unspecified level information. Will be logged at the TRACE level.""" + TRACE: LogEntry.Severity._Enum.ValueType # 1 + DEBUG: LogEntry.Severity._Enum.ValueType # 2 + """Debugging information.""" + INFO: LogEntry.Severity._Enum.ValueType # 3 + """Normal events.""" + NOTICE: LogEntry.Severity._Enum.ValueType # 4 + """Normal but significant events, such as start up, shut down, or + configuration. + """ + WARN: LogEntry.Severity._Enum.ValueType # 5 + """Warning events might cause problems.""" + ERROR: LogEntry.Severity._Enum.ValueType # 6 + """Error events are likely to cause problems.""" + CRITICAL: LogEntry.Severity._Enum.ValueType # 7 + """Critical events cause severe problems or brief outages and may + indicate that a person must take action. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: LogEntry.Severity.Enum.ValueType # 0 + """Unspecified level information. Will be logged at the TRACE level.""" + TRACE: LogEntry.Severity.Enum.ValueType # 1 + DEBUG: LogEntry.Severity.Enum.ValueType # 2 + """Debugging information.""" + INFO: LogEntry.Severity.Enum.ValueType # 3 + """Normal events.""" + NOTICE: LogEntry.Severity.Enum.ValueType # 4 + """Normal but significant events, such as start up, shut down, or + configuration. + """ + WARN: LogEntry.Severity.Enum.ValueType # 5 + """Warning events might cause problems.""" + ERROR: LogEntry.Severity.Enum.ValueType # 6 + """Error events are likely to cause problems.""" + CRITICAL: LogEntry.Severity.Enum.ValueType # 7 + """Critical events cause severe problems or brief outages and may + indicate that a person must take action. + """ + + def __init__( + self, + ) -> None: ... + + SEVERITY_FIELD_NUMBER: _builtins.int + TIMESTAMP_FIELD_NUMBER: _builtins.int + MESSAGE_FIELD_NUMBER: _builtins.int + TRACE_FIELD_NUMBER: _builtins.int + INSTRUCTION_ID_FIELD_NUMBER: _builtins.int + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LOG_LOCATION_FIELD_NUMBER: _builtins.int + THREAD_FIELD_NUMBER: _builtins.int + CUSTOM_DATA_FIELD_NUMBER: _builtins.int + severity: Global___LogEntry.Severity.Enum.ValueType + """(Required) The severity of the log statement.""" + message: _builtins.str + """(Required) A human readable message.""" + trace: _builtins.str + """(Optional) An optional trace of the functions involved. For example, in + Java this can include multiple causes and multiple suppressed exceptions. + """ + instruction_id: _builtins.str + """(Optional) A reference to the instruction this log statement is associated + with. + """ + transform_id: _builtins.str + """(Optional) A reference to the transform this log statement is + associated with. + """ + log_location: _builtins.str + """(Optional) Human-readable name of the function or method being invoked, + with optional context such as the class or package name. The format can + vary by language. For example: + qual.if.ied.Class.method (Java) + dir/package.func (Go) + module.function (Python) + file.cc:382 (C++) + """ + thread: _builtins.str + """(Optional) The name of the thread this log statement is associated with.""" + @_builtins.property + def timestamp(self) -> _timestamp_pb2.Timestamp: + """(Required) The time at which this log statement occurred.""" + + @_builtins.property + def custom_data(self) -> _struct_pb2.Struct: + """(Optional) Additional structured data to log. + Keys are limited to these characters: [a-zA-Z_-] + """ + + def __init__( + self, + *, + severity: Global___LogEntry.Severity.Enum.ValueType | None = ..., + timestamp: _timestamp_pb2.Timestamp | None = ..., + message: _builtins.str | None = ..., + trace: _builtins.str | None = ..., + instruction_id: _builtins.str | None = ..., + transform_id: _builtins.str | None = ..., + log_location: _builtins.str | None = ..., + thread: _builtins.str | None = ..., + custom_data: _struct_pb2.Struct | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["custom_data", b"custom_data", "timestamp", b"timestamp"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["custom_data", b"custom_data", "instruction_id", b"instruction_id", "log_location", b"log_location", "message", b"message", "severity", b"severity", "thread", b"thread", "timestamp", b"timestamp", "trace", b"trace", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___LogEntry: _TypeAlias = LogEntry # noqa: Y015 + +@_typing.final +class LogControl(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___LogControl: _TypeAlias = LogControl # noqa: Y015 + +@_typing.final +class StartWorkerRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ParamsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + WORKER_ID_FIELD_NUMBER: _builtins.int + CONTROL_ENDPOINT_FIELD_NUMBER: _builtins.int + LOGGING_ENDPOINT_FIELD_NUMBER: _builtins.int + ARTIFACT_ENDPOINT_FIELD_NUMBER: _builtins.int + PROVISION_ENDPOINT_FIELD_NUMBER: _builtins.int + PARAMS_FIELD_NUMBER: _builtins.int + worker_id: _builtins.str + @_builtins.property + def control_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: ... + @_builtins.property + def logging_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: ... + @_builtins.property + def artifact_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: ... + @_builtins.property + def provision_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: ... + @_builtins.property + def params(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... + def __init__( + self, + *, + worker_id: _builtins.str | None = ..., + control_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + logging_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + artifact_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + provision_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + params: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["artifact_endpoint", b"artifact_endpoint", "control_endpoint", b"control_endpoint", "logging_endpoint", b"logging_endpoint", "provision_endpoint", b"provision_endpoint"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact_endpoint", b"artifact_endpoint", "control_endpoint", b"control_endpoint", "logging_endpoint", b"logging_endpoint", "params", b"params", "provision_endpoint", b"provision_endpoint", "worker_id", b"worker_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StartWorkerRequest: _TypeAlias = StartWorkerRequest # noqa: Y015 + +@_typing.final +class StartWorkerResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ERROR_FIELD_NUMBER: _builtins.int + error: _builtins.str + def __init__( + self, + *, + error: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StartWorkerResponse: _TypeAlias = StartWorkerResponse # noqa: Y015 + +@_typing.final +class StopWorkerRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + WORKER_ID_FIELD_NUMBER: _builtins.int + worker_id: _builtins.str + def __init__( + self, + *, + worker_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["worker_id", b"worker_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StopWorkerRequest: _TypeAlias = StopWorkerRequest # noqa: Y015 + +@_typing.final +class StopWorkerResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ERROR_FIELD_NUMBER: _builtins.int + error: _builtins.str + def __init__( + self, + *, + error: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___StopWorkerResponse: _TypeAlias = StopWorkerResponse # noqa: Y015 + +@_typing.final +class WorkerStatusRequest(_message.Message): + """Request from runner to SDK Harness asking for its status. For more details see + https://s.apache.org/beam-fn-api-harness-status + """ + + DESCRIPTOR: _descriptor.Descriptor + + ID_FIELD_NUMBER: _builtins.int + id: _builtins.str + """(Required) Unique ID identifying this request.""" + def __init__( + self, + *, + id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id", b"id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___WorkerStatusRequest: _TypeAlias = WorkerStatusRequest # noqa: Y015 + +@_typing.final +class WorkerStatusResponse(_message.Message): + """Response from SDK Harness to runner containing the debug related status info.""" + + DESCRIPTOR: _descriptor.Descriptor + + ID_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + STATUS_INFO_FIELD_NUMBER: _builtins.int + id: _builtins.str + """(Required) Unique ID from the original request.""" + error: _builtins.str + """(Optional) Error message if exception encountered generating the status response.""" + status_info: _builtins.str + """(Optional) Status debugging info reported by SDK harness worker. Content and + format is not strongly enforced but should be print-friendly and + appropriate as an HTTP response body for end user. For details of the preferred + info to include in the message see + https://s.apache.org/beam-fn-api-harness-status + """ + def __init__( + self, + *, + id: _builtins.str | None = ..., + error: _builtins.str | None = ..., + status_info: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "id", b"id", "status_info", b"status_info"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___WorkerStatusResponse: _TypeAlias = WorkerStatusResponse # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_grpc.py new file mode 100644 index 000000000000..fb764c9a8860 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_grpc.py @@ -0,0 +1,589 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_fn_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class BeamFnControlStub(object): + """ + Control Plane API + + Progress reporting and splitting still need further vetting. Also, this may + change with the addition of new types of instructions/responses related to + metrics. + + An API that describes the work that a SDK harness is meant to do. + Stable + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Control = channel.stream_stream( + '/org.apache.beam.model.fn_execution.v1.BeamFnControl/Control', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.FromString, + _registered_method=True) + self.GetProcessBundleDescriptor = channel.unary_unary( + '/org.apache.beam.model.fn_execution.v1.BeamFnControl/GetProcessBundleDescriptor', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.FromString, + _registered_method=True) + + +class BeamFnControlServicer(object): + """ + Control Plane API + + Progress reporting and splitting still need further vetting. Also, this may + change with the addition of new types of instructions/responses related to + metrics. + + An API that describes the work that a SDK harness is meant to do. + Stable + """ + + def Control(self, request_iterator, context): + """Instructions sent by the runner to the SDK requesting different types + of work. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetProcessBundleDescriptor(self, request, context): + """Used to get the full process bundle descriptors for bundles one + is asked to process. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnControlServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Control': grpc.stream_stream_rpc_method_handler( + servicer.Control, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.SerializeToString, + ), + 'GetProcessBundleDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.GetProcessBundleDescriptor, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnControl', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnControl', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnControl(object): + """ + Control Plane API + + Progress reporting and splitting still need further vetting. Also, this may + change with the addition of new types of instructions/responses related to + metrics. + + An API that describes the work that a SDK harness is meant to do. + Stable + """ + + @staticmethod + def Control(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnControl/Control', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetProcessBundleDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnControl/GetProcessBundleDescriptor', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class BeamFnDataStub(object): + """Stable + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Data = channel.stream_stream( + '/org.apache.beam.model.fn_execution.v1.BeamFnData/Data', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString, + _registered_method=True) + + +class BeamFnDataServicer(object): + """Stable + """ + + def Data(self, request_iterator, context): + """Used to send data between harnesses. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnDataServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Data': grpc.stream_stream_rpc_method_handler( + servicer.Data, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnData', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnData', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnData(object): + """Stable + """ + + @staticmethod + def Data(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnData/Data', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class BeamFnStateStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.State = channel.stream_stream( + '/org.apache.beam.model.fn_execution.v1.BeamFnState/State', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.FromString, + _registered_method=True) + + +class BeamFnStateServicer(object): + """Missing associated documentation comment in .proto file.""" + + def State(self, request_iterator, context): + """Used to get/append/clear state stored by the runner on behalf of the SDK. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnStateServicer_to_server(servicer, server): + rpc_method_handlers = { + 'State': grpc.stream_stream_rpc_method_handler( + servicer.State, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnState', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnState', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnState(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def State(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnState/State', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class BeamFnLoggingStub(object): + """Stable + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Logging = channel.stream_stream( + '/org.apache.beam.model.fn_execution.v1.BeamFnLogging/Logging', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.FromString, + _registered_method=True) + + +class BeamFnLoggingServicer(object): + """Stable + """ + + def Logging(self, request_iterator, context): + """Allows for the SDK to emit log entries which the runner can + associate with the active job. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnLoggingServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Logging': grpc.stream_stream_rpc_method_handler( + servicer.Logging, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnLogging', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnLogging', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnLogging(object): + """Stable + """ + + @staticmethod + def Logging(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnLogging/Logging', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class BeamFnExternalWorkerPoolStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StartWorker = channel.unary_unary( + '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StartWorker', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.FromString, + _registered_method=True) + self.StopWorker = channel.unary_unary( + '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StopWorker', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.FromString, + _registered_method=True) + + +class BeamFnExternalWorkerPoolServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StartWorker(self, request, context): + """Start the SDK worker with the given ID. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StopWorker(self, request, context): + """Stop the SDK worker. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnExternalWorkerPoolServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StartWorker': grpc.unary_unary_rpc_method_handler( + servicer.StartWorker, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.SerializeToString, + ), + 'StopWorker': grpc.unary_unary_rpc_method_handler( + servicer.StopWorker, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnExternalWorkerPool(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StartWorker(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StartWorker', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def StopWorker(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StopWorker', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class BeamFnWorkerStatusStub(object): + """API for SDKs to report debug-related statuses to runner during pipeline execution. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.WorkerStatus = channel.stream_stream( + '/org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus/WorkerStatus', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.FromString, + _registered_method=True) + + +class BeamFnWorkerStatusServicer(object): + """API for SDKs to report debug-related statuses to runner during pipeline execution. + """ + + def WorkerStatus(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BeamFnWorkerStatusServicer_to_server(servicer, server): + rpc_method_handlers = { + 'WorkerStatus': grpc.stream_stream_rpc_method_handler( + servicer.WorkerStatus, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class BeamFnWorkerStatus(object): + """API for SDKs to report debug-related statuses to runner during pipeline execution. + """ + + @staticmethod + def WorkerStatus(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus/WorkerStatus', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_urns.py new file mode 100644 index 000000000000..4d2c2b8e6fe1 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_fn_api_pb2_urns.py @@ -0,0 +1,11 @@ +from ........utils import PropertiesFromEnumValue +from ...pipeline.v1 import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class FnApiTransforms(object): + + class Runner(object): + DATA_SOURCE = PropertiesFromEnumValue('beam:runner:source:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DATA_SINK = PropertiesFromEnumValue('beam:runner:sink:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.py new file mode 100644 index 000000000000..9a95134175a6 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/fn_execution/v1/beam_provision_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/fn_execution/v1/beam_provision_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from ...pipeline.v1 import endpoints_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_endpoints__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>org/apache/beam/model/fn_execution/v1/beam_provision_api.proto\x12%org.apache.beam.model.fn_execution.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a\x31org/apache/beam/model/pipeline/v1/endpoints.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x19\n\x17GetProvisionInfoRequest\"^\n\x18GetProvisionInfoResponse\x12\x42\n\x04info\x18\x01 \x01(\x0b\x32\x34.org.apache.beam.model.fn_execution.v1.ProvisionInfo\"\xb5\x05\n\rProvisionInfo\x12\x31\n\x10pipeline_options\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x17\n\x0fretrieval_token\x18\x06 \x01(\t\x12P\n\x0fstatus_endpoint\x18\x07 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12Q\n\x10logging_endpoint\x18\x08 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12R\n\x11\x61rtifact_endpoint\x18\t \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12Q\n\x10\x63ontrol_endpoint\x18\n \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12L\n\x0c\x64\x65pendencies\x18\x0b \x03(\x0b\x32\x36.org.apache.beam.model.pipeline.v1.ArtifactInformation\x12\x1b\n\x13runner_capabilities\x18\x0c \x03(\t\x12T\n\x08metadata\x18\r \x03(\x0b\x32\x42.org.apache.beam.model.fn_execution.v1.ProvisionInfo.MetadataEntry\x12\x1a\n\x12sibling_worker_ids\x18\x0e \x03(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xa8\x01\n\x10ProvisionService\x12\x93\x01\n\x10GetProvisionInfo\x12>.org.apache.beam.model.fn_execution.v1.GetProvisionInfoRequest\x1a?.org.apache.beam.model.fn_execution.v1.GetProvisionInfoResponseB\x84\x01\n$org.apache.beam.model.fnexecution.v1B\x0cProvisionApiZNgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1;fnexecution_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.fn_execution.v1.beam_provision_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n$org.apache.beam.model.fnexecution.v1B\014ProvisionApiZNgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1;fnexecution_v1' + _globals['_PROVISIONINFO_METADATAENTRY']._loaded_options = None + _globals['_PROVISIONINFO_METADATAENTRY']._serialized_options = b'8\001' + _globals['_GETPROVISIONINFOREQUEST']._serialized_start=243 + _globals['_GETPROVISIONINFOREQUEST']._serialized_end=268 + _globals['_GETPROVISIONINFORESPONSE']._serialized_start=270 + _globals['_GETPROVISIONINFORESPONSE']._serialized_end=364 + _globals['_PROVISIONINFO']._serialized_start=367 + _globals['_PROVISIONINFO']._serialized_end=1060 + _globals['_PROVISIONINFO_METADATAENTRY']._serialized_start=1013 + _globals['_PROVISIONINFO_METADATAENTRY']._serialized_end=1060 + _globals['_PROVISIONSERVICE']._serialized_start=1063 + _globals['_PROVISIONSERVICE']._serialized_end=1231 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.pyi new file mode 100644 index 000000000000..2f20c5a87e7a --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2.pyi @@ -0,0 +1,167 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the Provision API, for communicating with a runner +for job and environment provisioning information over GRPC. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf.internal import containers as _containers +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +from ...pipeline.v1 import endpoints_pb2 as _endpoints_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class GetProvisionInfoRequest(_message.Message): + """A request to get the provision info of a SDK harness worker instance.""" + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___GetProvisionInfoRequest: _TypeAlias = GetProvisionInfoRequest # noqa: Y015 + +@_typing.final +class GetProvisionInfoResponse(_message.Message): + """A response containing the provision info of a SDK harness worker instance.""" + + DESCRIPTOR: _descriptor.Descriptor + + INFO_FIELD_NUMBER: _builtins.int + @_builtins.property + def info(self) -> Global___ProvisionInfo: ... + def __init__( + self, + *, + info: Global___ProvisionInfo | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["info", b"info"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["info", b"info"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetProvisionInfoResponse: _TypeAlias = GetProvisionInfoResponse # noqa: Y015 + +@_typing.final +class ProvisionInfo(_message.Message): + """Runtime provisioning information for a SDK harness worker instance, + such as pipeline options, resource constraints and other job metadata + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class MetadataEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + PIPELINE_OPTIONS_FIELD_NUMBER: _builtins.int + RETRIEVAL_TOKEN_FIELD_NUMBER: _builtins.int + STATUS_ENDPOINT_FIELD_NUMBER: _builtins.int + LOGGING_ENDPOINT_FIELD_NUMBER: _builtins.int + ARTIFACT_ENDPOINT_FIELD_NUMBER: _builtins.int + CONTROL_ENDPOINT_FIELD_NUMBER: _builtins.int + DEPENDENCIES_FIELD_NUMBER: _builtins.int + RUNNER_CAPABILITIES_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + SIBLING_WORKER_IDS_FIELD_NUMBER: _builtins.int + retrieval_token: _builtins.str + """(required) The artifact retrieval token produced by + LegacyArtifactStagingService.CommitManifestResponse. + """ + @_builtins.property + def pipeline_options(self) -> _struct_pb2.Struct: + """(required) Pipeline options. For non-template jobs, the options are + identical to what is passed to job submission. + """ + + @_builtins.property + def status_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(optional) The endpoint that the runner is hosting for the SDK to submit + status reports to during pipeline execution. This field will only be + populated if the runner supports SDK status reports. For more details see + https://s.apache.org/beam-fn-api-harness-status + """ + + @_builtins.property + def logging_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(optional) The logging endpoint this SDK should use.""" + + @_builtins.property + def artifact_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(optional) The artifact retrieval endpoint this SDK should use.""" + + @_builtins.property + def control_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(optional) The control endpoint this SDK should use.""" + + @_builtins.property + def dependencies(self) -> _containers.RepeatedCompositeFieldContainer[_beam_runner_api_pb2.ArtifactInformation]: + """The set of dependencies that should be staged into this environment.""" + + @_builtins.property + def runner_capabilities(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(optional) A set of capabilities that this SDK is allowed to use in its + interactions with this runner. + """ + + @_builtins.property + def metadata(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """(optional) Runtime environment metadata that are static throughout the + pipeline execution. + """ + + @_builtins.property + def sibling_worker_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(optional) If this environment supports SIBLING_WORKERS, used to indicate + the ids of sibling workers, if any, that should be started in addition + to this worker (which already has its own worker id). + """ + + def __init__( + self, + *, + pipeline_options: _struct_pb2.Struct | None = ..., + retrieval_token: _builtins.str | None = ..., + status_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + logging_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + artifact_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + control_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + dependencies: _abc.Iterable[_beam_runner_api_pb2.ArtifactInformation] | None = ..., + runner_capabilities: _abc.Iterable[_builtins.str] | None = ..., + metadata: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + sibling_worker_ids: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["artifact_endpoint", b"artifact_endpoint", "control_endpoint", b"control_endpoint", "logging_endpoint", b"logging_endpoint", "pipeline_options", b"pipeline_options", "status_endpoint", b"status_endpoint"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact_endpoint", b"artifact_endpoint", "control_endpoint", b"control_endpoint", "dependencies", b"dependencies", "logging_endpoint", b"logging_endpoint", "metadata", b"metadata", "pipeline_options", b"pipeline_options", "retrieval_token", b"retrieval_token", "runner_capabilities", b"runner_capabilities", "sibling_worker_ids", b"sibling_worker_ids", "status_endpoint", b"status_endpoint"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProvisionInfo: _TypeAlias = ProvisionInfo # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2_grpc.py new file mode 100644 index 000000000000..4a45fff50798 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2_grpc.py @@ -0,0 +1,107 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_provision_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/fn_execution/v1/beam_provision_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ProvisionServiceStub(object): + """A service to provide runtime provisioning information to the SDK harness + worker instances -- such as pipeline options, resource constraints and + other job metadata -- needed by an SDK harness instance to initialize. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetProvisionInfo = channel.unary_unary( + '/org.apache.beam.model.fn_execution.v1.ProvisionService/GetProvisionInfo', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoResponse.FromString, + _registered_method=True) + + +class ProvisionServiceServicer(object): + """A service to provide runtime provisioning information to the SDK harness + worker instances -- such as pipeline options, resource constraints and + other job metadata -- needed by an SDK harness instance to initialize. + """ + + def GetProvisionInfo(self, request, context): + """Get provision information for the SDK harness worker instance. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ProvisionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetProvisionInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetProvisionInfo, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.fn_execution.v1.ProvisionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.fn_execution.v1.ProvisionService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ProvisionService(object): + """A service to provide runtime provisioning information to the SDK harness + worker instances -- such as pipeline options, resource constraints and + other job metadata -- needed by an SDK harness instance to initialize. + """ + + @staticmethod + def GetProvisionInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.fn_execution.v1.ProvisionService/GetProvisionInfo', + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__provision__api__pb2.GetProvisionInfoResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/__init__.py new file mode 100644 index 000000000000..41c2be820659 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/__init__.py @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from . import beam_interactive_api_pb2 +from . import beam_interactive_api_pb2_grpc diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.py new file mode 100644 index 000000000000..f594c4c7ad44 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/interactive/v1/beam_interactive_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/interactive/v1/beam_interactive_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n?org/apache/beam/model/interactive/v1/beam_interactive_api.proto\x12$org.apache.beam.model.interactive.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x14TestStreamFileHeader\x12\x0b\n\x03tag\x18\x01 \x01(\t\"j\n\x14TestStreamFileRecord\x12R\n\x0erecorded_event\x18\x01 \x01(\x0b\x32:.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event\"#\n\rEventsRequest\x12\x12\n\noutput_ids\x18\x01 \x03(\t2\x92\x01\n\x11TestStreamService\x12}\n\x06\x45vents\x12\x33.org.apache.beam.model.interactive.v1.EventsRequest\x1a:.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event\"\x00\x30\x01\x42\x46\n$org.apache.beam.model.interactive.v1B\x0eInteractiveApiZ\x0einteractive_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.interactive.v1.beam_interactive_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n$org.apache.beam.model.interactive.v1B\016InteractiveApiZ\016interactive_v1' + _globals['_TESTSTREAMFILEHEADER']._serialized_start=195 + _globals['_TESTSTREAMFILEHEADER']._serialized_end=230 + _globals['_TESTSTREAMFILERECORD']._serialized_start=232 + _globals['_TESTSTREAMFILERECORD']._serialized_end=338 + _globals['_EVENTSREQUEST']._serialized_start=340 + _globals['_EVENTSREQUEST']._serialized_end=375 + _globals['_TESTSTREAMSERVICE']._serialized_start=378 + _globals['_TESTSTREAMSERVICE']._serialized_end=524 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.pyi new file mode 100644 index 000000000000..b1ee820135d0 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2.pyi @@ -0,0 +1,96 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing any Interactive Beam specific protos. + +TestStreamFileHeader: A record written at the top of a cached of TestStream + events. This is used as metadata for the entire + stream. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class TestStreamFileHeader(_message.Message): + """The first record. This contains metadata about the stream and how to + properly process it. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TAG_FIELD_NUMBER: _builtins.int + tag: _builtins.str + """The PCollection tag this stream is associated with.""" + def __init__( + self, + *, + tag: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["tag", b"tag"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___TestStreamFileHeader: _TypeAlias = TestStreamFileHeader # noqa: Y015 + +@_typing.final +class TestStreamFileRecord(_message.Message): + """A record is a recorded element that a source produced. Its function is to + give enough information to create a faithful recreation of the original + stream of data. + """ + + DESCRIPTOR: _descriptor.Descriptor + + RECORDED_EVENT_FIELD_NUMBER: _builtins.int + @_builtins.property + def recorded_event(self) -> _beam_runner_api_pb2.TestStreamPayload.Event: + """The recorded event from an element stream.""" + + def __init__( + self, + *, + recorded_event: _beam_runner_api_pb2.TestStreamPayload.Event | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["recorded_event", b"recorded_event"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["recorded_event", b"recorded_event"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___TestStreamFileRecord: _TypeAlias = TestStreamFileRecord # noqa: Y015 + +@_typing.final +class EventsRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + OUTPUT_IDS_FIELD_NUMBER: _builtins.int + @_builtins.property + def output_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """The set of PCollections to read from. These are the PTransform outputs + local names. These are a subset of the TestStream's outputs. This allows + Interactive Beam to cache many PCollections from a pipeline then replay a + subset of them. + """ + + def __init__( + self, + *, + output_ids: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["output_ids", b"output_ids"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___EventsRequest: _TypeAlias = EventsRequest # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2_grpc.py new file mode 100644 index 000000000000..b0b42ffd0b81 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/interactive/v1/beam_interactive_api_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_interactive_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_interactive_dot_v1_dot_beam__interactive__api__pb2 +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/interactive/v1/beam_interactive_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class TestStreamServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Events = channel.unary_stream( + '/org.apache.beam.model.interactive.v1.TestStreamService/Events', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_interactive_dot_v1_dot_beam__interactive__api__pb2.EventsRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2.TestStreamPayload.Event.FromString, + _registered_method=True) + + +class TestStreamServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Events(self, request, context): + """A TestStream will request for events using this RPC. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TestStreamServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Events': grpc.unary_stream_rpc_method_handler( + servicer.Events, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_interactive_dot_v1_dot_beam__interactive__api__pb2.EventsRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2.TestStreamPayload.Event.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.interactive.v1.TestStreamService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.interactive.v1.TestStreamService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class TestStreamService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Events(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/org.apache.beam.model.interactive.v1.TestStreamService/Events', + org_dot_apache_dot_beam_dot_model_dot_interactive_dot_v1_dot_beam__interactive__api__pb2.EventsRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2.TestStreamPayload.Event.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/__init__.py new file mode 100644 index 000000000000..9971c59fa048 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/__init__.py @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from . import beam_artifact_api_pb2 +from . import beam_artifact_api_pb2_grpc +from . import beam_artifact_api_pb2_urns +from . import beam_expansion_api_pb2 +from . import beam_expansion_api_pb2_grpc +from . import beam_job_api_pb2 +from . import beam_job_api_pb2_grpc diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.py new file mode 100644 index 000000000000..e5666419535d --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/job_management/v1/beam_artifact_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/job_management/v1/beam_artifact_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n?org/apache/beam/model/job_management/v1/beam_artifact_api.proto\x12\'org.apache.beam.model.job_management.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\"|\n\x17ResolveArtifactsRequest\x12I\n\tartifacts\x18\x01 \x03(\x0b\x32\x36.org.apache.beam.model.pipeline.v1.ArtifactInformation\x12\x16\n\x0epreferred_urns\x18\x02 \x03(\t\"h\n\x18ResolveArtifactsResponse\x12L\n\x0creplacements\x18\x01 \x03(\x0b\x32\x36.org.apache.beam.model.pipeline.v1.ArtifactInformation\"^\n\x12GetArtifactRequest\x12H\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32\x36.org.apache.beam.model.pipeline.v1.ArtifactInformation\"#\n\x13GetArtifactResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"\xd8\x01\n\x16\x41rtifactRequestWrapper\x12]\n\x10resolve_artifact\x18\xe8\x07 \x01(\x0b\x32@.org.apache.beam.model.job_management.v1.ResolveArtifactsRequestH\x00\x12T\n\x0cget_artifact\x18\xe9\x07 \x01(\x0b\x32;.org.apache.beam.model.job_management.v1.GetArtifactRequestH\x00\x42\t\n\x07request\"\x96\x02\n\x17\x41rtifactResponseWrapper\x12\x15\n\rstaging_token\x18\x01 \x01(\t\x12\x0f\n\x07is_last\x18\x02 \x01(\x08\x12g\n\x19resolve_artifact_response\x18\xe8\x07 \x01(\x0b\x32\x41.org.apache.beam.model.job_management.v1.ResolveArtifactsResponseH\x00\x12^\n\x15get_artifact_response\x18\xe9\x07 \x01(\x0b\x32<.org.apache.beam.model.job_management.v1.GetArtifactResponseH\x00\x42\n\n\x08response\"E\n\x10\x41rtifactMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bpermissions\x18\x02 \x01(\r\x12\x0e\n\x06sha256\x18\x04 \x01(\t\"W\n\x08Manifest\x12K\n\x08\x61rtifact\x18\x01 \x03(\x0b\x32\x39.org.apache.beam.model.job_management.v1.ArtifactMetadata\"\xce\x01\n\rProxyManifest\x12\x43\n\x08manifest\x18\x01 \x01(\x0b\x32\x31.org.apache.beam.model.job_management.v1.Manifest\x12Q\n\x08location\x18\x02 \x03(\x0b\x32?.org.apache.beam.model.job_management.v1.ProxyManifest.Location\x1a%\n\x08Location\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"-\n\x12GetManifestRequest\x12\x17\n\x0fretrieval_token\x18\x01 \x01(\t\"Z\n\x13GetManifestResponse\x12\x43\n\x08manifest\x18\x01 \x01(\x0b\x32\x31.org.apache.beam.model.job_management.v1.Manifest\"A\n\x18LegacyGetArtifactRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0fretrieval_token\x18\x02 \x01(\t\"\x1d\n\rArtifactChunk\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"\x81\x01\n\x13PutArtifactMetadata\x12\x1d\n\x15staging_session_token\x18\x01 \x01(\t\x12K\n\x08metadata\x18\x02 \x01(\x0b\x32\x39.org.apache.beam.model.job_management.v1.ArtifactMetadata\"\xb9\x01\n\x12PutArtifactRequest\x12P\n\x08metadata\x18\x01 \x01(\x0b\x32<.org.apache.beam.model.job_management.v1.PutArtifactMetadataH\x00\x12\x46\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x36.org.apache.beam.model.job_management.v1.ArtifactChunkH\x00\x42\t\n\x07\x63ontent\"\x15\n\x13PutArtifactResponse\"{\n\x15\x43ommitManifestRequest\x12\x43\n\x08manifest\x18\x01 \x01(\x0b\x32\x31.org.apache.beam.model.job_management.v1.Manifest\x12\x1d\n\x15staging_session_token\x18\x02 \x01(\t\"|\n\x16\x43ommitManifestResponse\x12\x17\n\x0fretrieval_token\x18\x01 \x01(\t\"I\n\tConstants\x12<\n\x19NO_ARTIFACTS_STAGED_TOKEN\x10\x00\x1a\x1d\xaa\xb4\xfa\xc2\x05\x17__no_artifacts_staged__2\xc1\x02\n\x18\x41rtifactRetrievalService\x12\x97\x01\n\x10ResolveArtifacts\x12@.org.apache.beam.model.job_management.v1.ResolveArtifactsRequest\x1a\x41.org.apache.beam.model.job_management.v1.ResolveArtifactsResponse\x12\x8a\x01\n\x0bGetArtifact\x12;.org.apache.beam.model.job_management.v1.GetArtifactRequest\x1a<.org.apache.beam.model.job_management.v1.GetArtifactResponse0\x01\x32\xc3\x01\n\x16\x41rtifactStagingService\x12\xa8\x01\n\x1fReverseArtifactRetrievalService\x12@.org.apache.beam.model.job_management.v1.ArtifactResponseWrapper\x1a?.org.apache.beam.model.job_management.v1.ArtifactRequestWrapper(\x01\x30\x01\x32\xbf\x02\n\x1cLegacyArtifactStagingService\x12\x8a\x01\n\x0bPutArtifact\x12;.org.apache.beam.model.job_management.v1.PutArtifactRequest\x1a<.org.apache.beam.model.job_management.v1.PutArtifactResponse(\x01\x12\x91\x01\n\x0e\x43ommitManifest\x12>.org.apache.beam.model.job_management.v1.CommitManifestRequest\x1a?.org.apache.beam.model.job_management.v1.CommitManifestResponse2\xb8\x02\n\x1eLegacyArtifactRetrievalService\x12\x88\x01\n\x0bGetManifest\x12;.org.apache.beam.model.job_management.v1.GetManifestRequest\x1a<.org.apache.beam.model.job_management.v1.GetManifestResponse\x12\x8a\x01\n\x0bGetArtifact\x12\x41.org.apache.beam.model.job_management.v1.LegacyGetArtifactRequest\x1a\x36.org.apache.beam.model.job_management.v1.ArtifactChunk0\x01\x42\x89\x01\n&org.apache.beam.model.jobmanagement.v1B\x0b\x41rtifactApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.job_management.v1.beam_artifact_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&org.apache.beam.model.jobmanagement.v1B\013ArtifactApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1' + _globals['_COMMITMANIFESTRESPONSE_CONSTANTS'].values_by_name["NO_ARTIFACTS_STAGED_TOKEN"]._loaded_options = None + _globals['_COMMITMANIFESTRESPONSE_CONSTANTS'].values_by_name["NO_ARTIFACTS_STAGED_TOKEN"]._serialized_options = b'\252\264\372\302\005\027__no_artifacts_staged__' + _globals['_RESOLVEARTIFACTSREQUEST']._serialized_start=165 + _globals['_RESOLVEARTIFACTSREQUEST']._serialized_end=289 + _globals['_RESOLVEARTIFACTSRESPONSE']._serialized_start=291 + _globals['_RESOLVEARTIFACTSRESPONSE']._serialized_end=395 + _globals['_GETARTIFACTREQUEST']._serialized_start=397 + _globals['_GETARTIFACTREQUEST']._serialized_end=491 + _globals['_GETARTIFACTRESPONSE']._serialized_start=493 + _globals['_GETARTIFACTRESPONSE']._serialized_end=528 + _globals['_ARTIFACTREQUESTWRAPPER']._serialized_start=531 + _globals['_ARTIFACTREQUESTWRAPPER']._serialized_end=747 + _globals['_ARTIFACTRESPONSEWRAPPER']._serialized_start=750 + _globals['_ARTIFACTRESPONSEWRAPPER']._serialized_end=1028 + _globals['_ARTIFACTMETADATA']._serialized_start=1030 + _globals['_ARTIFACTMETADATA']._serialized_end=1099 + _globals['_MANIFEST']._serialized_start=1101 + _globals['_MANIFEST']._serialized_end=1188 + _globals['_PROXYMANIFEST']._serialized_start=1191 + _globals['_PROXYMANIFEST']._serialized_end=1397 + _globals['_PROXYMANIFEST_LOCATION']._serialized_start=1360 + _globals['_PROXYMANIFEST_LOCATION']._serialized_end=1397 + _globals['_GETMANIFESTREQUEST']._serialized_start=1399 + _globals['_GETMANIFESTREQUEST']._serialized_end=1444 + _globals['_GETMANIFESTRESPONSE']._serialized_start=1446 + _globals['_GETMANIFESTRESPONSE']._serialized_end=1536 + _globals['_LEGACYGETARTIFACTREQUEST']._serialized_start=1538 + _globals['_LEGACYGETARTIFACTREQUEST']._serialized_end=1603 + _globals['_ARTIFACTCHUNK']._serialized_start=1605 + _globals['_ARTIFACTCHUNK']._serialized_end=1634 + _globals['_PUTARTIFACTMETADATA']._serialized_start=1637 + _globals['_PUTARTIFACTMETADATA']._serialized_end=1766 + _globals['_PUTARTIFACTREQUEST']._serialized_start=1769 + _globals['_PUTARTIFACTREQUEST']._serialized_end=1954 + _globals['_PUTARTIFACTRESPONSE']._serialized_start=1956 + _globals['_PUTARTIFACTRESPONSE']._serialized_end=1977 + _globals['_COMMITMANIFESTREQUEST']._serialized_start=1979 + _globals['_COMMITMANIFESTREQUEST']._serialized_end=2102 + _globals['_COMMITMANIFESTRESPONSE']._serialized_start=2104 + _globals['_COMMITMANIFESTRESPONSE']._serialized_end=2228 + _globals['_COMMITMANIFESTRESPONSE_CONSTANTS']._serialized_start=2155 + _globals['_COMMITMANIFESTRESPONSE_CONSTANTS']._serialized_end=2228 + _globals['_ARTIFACTRETRIEVALSERVICE']._serialized_start=2231 + _globals['_ARTIFACTRETRIEVALSERVICE']._serialized_end=2552 + _globals['_ARTIFACTSTAGINGSERVICE']._serialized_start=2555 + _globals['_ARTIFACTSTAGINGSERVICE']._serialized_end=2750 + _globals['_LEGACYARTIFACTSTAGINGSERVICE']._serialized_start=2753 + _globals['_LEGACYARTIFACTSTAGINGSERVICE']._serialized_end=3072 + _globals['_LEGACYARTIFACTRETRIEVALSERVICE']._serialized_start=3075 + _globals['_LEGACYARTIFACTRETRIEVALSERVICE']._serialized_end=3387 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.pyi new file mode 100644 index 000000000000..d479860ee2b5 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2.pyi @@ -0,0 +1,496 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the Artifact API, for communicating with a runner +for artifact staging and retrieval over GRPC. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class ResolveArtifactsRequest(_message.Message): + """A request for artifact resolution.""" + + DESCRIPTOR: _descriptor.Descriptor + + ARTIFACTS_FIELD_NUMBER: _builtins.int + PREFERRED_URNS_FIELD_NUMBER: _builtins.int + @_builtins.property + def artifacts(self) -> _containers.RepeatedCompositeFieldContainer[_beam_runner_api_pb2.ArtifactInformation]: + """An (ordered) set of artifacts to (jointly) resolve.""" + + @_builtins.property + def preferred_urns(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """A set of artifact type urns that are understood by the requester. + An attempt should be made to resolve the artifacts in terms of these URNs, + but other URNs may be used as well with the understanding that they must + be fetch-able as bytes via GetArtifact. + """ + + def __init__( + self, + *, + artifacts: _abc.Iterable[_beam_runner_api_pb2.ArtifactInformation] | None = ..., + preferred_urns: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifacts", b"artifacts", "preferred_urns", b"preferred_urns"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ResolveArtifactsRequest: _TypeAlias = ResolveArtifactsRequest # noqa: Y015 + +@_typing.final +class ResolveArtifactsResponse(_message.Message): + """A response for artifact resolution.""" + + DESCRIPTOR: _descriptor.Descriptor + + REPLACEMENTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def replacements(self) -> _containers.RepeatedCompositeFieldContainer[_beam_runner_api_pb2.ArtifactInformation]: + """A full (ordered) set of replacements for the set of requested artifacts, + preferably in terms of the requested type URNs. If there is no better + resolution, the original list is returned. + """ + + def __init__( + self, + *, + replacements: _abc.Iterable[_beam_runner_api_pb2.ArtifactInformation] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["replacements", b"replacements"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ResolveArtifactsResponse: _TypeAlias = ResolveArtifactsResponse # noqa: Y015 + +@_typing.final +class GetArtifactRequest(_message.Message): + """A request to get an artifact.""" + + DESCRIPTOR: _descriptor.Descriptor + + ARTIFACT_FIELD_NUMBER: _builtins.int + @_builtins.property + def artifact(self) -> _beam_runner_api_pb2.ArtifactInformation: ... + def __init__( + self, + *, + artifact: _beam_runner_api_pb2.ArtifactInformation | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["artifact", b"artifact"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact", b"artifact"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetArtifactRequest: _TypeAlias = GetArtifactRequest # noqa: Y015 + +@_typing.final +class GetArtifactResponse(_message.Message): + """Part of a response to getting an artifact.""" + + DESCRIPTOR: _descriptor.Descriptor + + DATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes + def __init__( + self, + *, + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetArtifactResponse: _TypeAlias = GetArtifactResponse # noqa: Y015 + +@_typing.final +class ArtifactRequestWrapper(_message.Message): + """Wraps an ArtifactRetrievalService request for use in ReverseArtifactRetrievalService.""" + + DESCRIPTOR: _descriptor.Descriptor + + RESOLVE_ARTIFACT_FIELD_NUMBER: _builtins.int + GET_ARTIFACT_FIELD_NUMBER: _builtins.int + @_builtins.property + def resolve_artifact(self) -> Global___ResolveArtifactsRequest: ... + @_builtins.property + def get_artifact(self) -> Global___GetArtifactRequest: ... + def __init__( + self, + *, + resolve_artifact: Global___ResolveArtifactsRequest | None = ..., + get_artifact: Global___GetArtifactRequest | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["get_artifact", b"get_artifact", "request", b"request", "resolve_artifact", b"resolve_artifact"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["get_artifact", b"get_artifact", "request", b"request", "resolve_artifact", b"resolve_artifact"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_request: _TypeAlias = _typing.Literal["resolve_artifact", "get_artifact"] # noqa: Y015 + _WhichOneofArgType_request: _TypeAlias = _typing.Literal["request", b"request"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_request) -> _WhichOneofReturnType_request | None: ... + +Global___ArtifactRequestWrapper: _TypeAlias = ArtifactRequestWrapper # noqa: Y015 + +@_typing.final +class ArtifactResponseWrapper(_message.Message): + """Wraps an ArtifactRetrievalService response for use in ReverseArtifactRetrievalService.""" + + DESCRIPTOR: _descriptor.Descriptor + + STAGING_TOKEN_FIELD_NUMBER: _builtins.int + IS_LAST_FIELD_NUMBER: _builtins.int + RESOLVE_ARTIFACT_RESPONSE_FIELD_NUMBER: _builtins.int + GET_ARTIFACT_RESPONSE_FIELD_NUMBER: _builtins.int + staging_token: _builtins.str + """A token indicating which job these artifacts are being staged for.""" + is_last: _builtins.bool + """Whether this is the last response for this request (for those responses that + would typically be terminated by the end of the response stream.) + """ + @_builtins.property + def resolve_artifact_response(self) -> Global___ResolveArtifactsResponse: ... + @_builtins.property + def get_artifact_response(self) -> Global___GetArtifactResponse: ... + def __init__( + self, + *, + staging_token: _builtins.str | None = ..., + is_last: _builtins.bool | None = ..., + resolve_artifact_response: Global___ResolveArtifactsResponse | None = ..., + get_artifact_response: Global___GetArtifactResponse | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["get_artifact_response", b"get_artifact_response", "resolve_artifact_response", b"resolve_artifact_response", "response", b"response"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["get_artifact_response", b"get_artifact_response", "is_last", b"is_last", "resolve_artifact_response", b"resolve_artifact_response", "response", b"response", "staging_token", b"staging_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_response: _TypeAlias = _typing.Literal["resolve_artifact_response", "get_artifact_response"] # noqa: Y015 + _WhichOneofArgType_response: _TypeAlias = _typing.Literal["response", b"response"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_response) -> _WhichOneofReturnType_response | None: ... + +Global___ArtifactResponseWrapper: _TypeAlias = ArtifactResponseWrapper # noqa: Y015 + +@_typing.final +class ArtifactMetadata(_message.Message): + """An artifact identifier and associated metadata.""" + + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + PERMISSIONS_FIELD_NUMBER: _builtins.int + SHA256_FIELD_NUMBER: _builtins.int + name: _builtins.str + """(Required) The name of the artifact.""" + permissions: _builtins.int + """(Optional) The Unix-like permissions of the artifact""" + sha256: _builtins.str + """(Optional) The hex-encoded sha256 checksum of the artifact. Used, among other things, by + harness boot code to validate the integrity of the artifact. + """ + def __init__( + self, + *, + name: _builtins.str | None = ..., + permissions: _builtins.int | None = ..., + sha256: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "permissions", b"permissions", "sha256", b"sha256"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactMetadata: _TypeAlias = ArtifactMetadata # noqa: Y015 + +@_typing.final +class Manifest(_message.Message): + """A collection of artifacts.""" + + DESCRIPTOR: _descriptor.Descriptor + + ARTIFACT_FIELD_NUMBER: _builtins.int + @_builtins.property + def artifact(self) -> _containers.RepeatedCompositeFieldContainer[Global___ArtifactMetadata]: ... + def __init__( + self, + *, + artifact: _abc.Iterable[Global___ArtifactMetadata] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact", b"artifact"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Manifest: _TypeAlias = Manifest # noqa: Y015 + +@_typing.final +class ProxyManifest(_message.Message): + """A manifest with location information.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Location(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + URI_FIELD_NUMBER: _builtins.int + name: _builtins.str + uri: _builtins.str + def __init__( + self, + *, + name: _builtins.str | None = ..., + uri: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "uri", b"uri"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + MANIFEST_FIELD_NUMBER: _builtins.int + LOCATION_FIELD_NUMBER: _builtins.int + @_builtins.property + def manifest(self) -> Global___Manifest: ... + @_builtins.property + def location(self) -> _containers.RepeatedCompositeFieldContainer[Global___ProxyManifest.Location]: ... + def __init__( + self, + *, + manifest: Global___Manifest | None = ..., + location: _abc.Iterable[Global___ProxyManifest.Location] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["manifest", b"manifest"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["location", b"location", "manifest", b"manifest"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProxyManifest: _TypeAlias = ProxyManifest # noqa: Y015 + +@_typing.final +class GetManifestRequest(_message.Message): + """A request to get the manifest of a Job.""" + + DESCRIPTOR: _descriptor.Descriptor + + RETRIEVAL_TOKEN_FIELD_NUMBER: _builtins.int + retrieval_token: _builtins.str + """(Required) An opaque token representing the entirety of the staged artifacts. + Returned in CommitManifestResponse. + """ + def __init__( + self, + *, + retrieval_token: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["retrieval_token", b"retrieval_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetManifestRequest: _TypeAlias = GetManifestRequest # noqa: Y015 + +@_typing.final +class GetManifestResponse(_message.Message): + """A response containing a job manifest.""" + + DESCRIPTOR: _descriptor.Descriptor + + MANIFEST_FIELD_NUMBER: _builtins.int + @_builtins.property + def manifest(self) -> Global___Manifest: ... + def __init__( + self, + *, + manifest: Global___Manifest | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["manifest", b"manifest"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["manifest", b"manifest"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetManifestResponse: _TypeAlias = GetManifestResponse # noqa: Y015 + +@_typing.final +class LegacyGetArtifactRequest(_message.Message): + """A request to get an artifact. The artifact must be present in the manifest for the job.""" + + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + RETRIEVAL_TOKEN_FIELD_NUMBER: _builtins.int + name: _builtins.str + """(Required) The name of the artifact to retrieve.""" + retrieval_token: _builtins.str + """(Required) An opaque token representing the entirety of the staged artifacts. + Returned in CommitManifestResponse. + """ + def __init__( + self, + *, + name: _builtins.str | None = ..., + retrieval_token: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "retrieval_token", b"retrieval_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___LegacyGetArtifactRequest: _TypeAlias = LegacyGetArtifactRequest # noqa: Y015 + +@_typing.final +class ArtifactChunk(_message.Message): + """Part of an artifact.""" + + DESCRIPTOR: _descriptor.Descriptor + + DATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes + def __init__( + self, + *, + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactChunk: _TypeAlias = ArtifactChunk # noqa: Y015 + +@_typing.final +class PutArtifactMetadata(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + STAGING_SESSION_TOKEN_FIELD_NUMBER: _builtins.int + METADATA_FIELD_NUMBER: _builtins.int + staging_session_token: _builtins.str + """(Required) A token for artifact staging session. This token can be obtained + from PrepareJob request in JobService + """ + @_builtins.property + def metadata(self) -> Global___ArtifactMetadata: + """(Required) The Artifact metadata.""" + + def __init__( + self, + *, + staging_session_token: _builtins.str | None = ..., + metadata: Global___ArtifactMetadata | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["metadata", b"metadata", "staging_session_token", b"staging_session_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PutArtifactMetadata: _TypeAlias = PutArtifactMetadata # noqa: Y015 + +@_typing.final +class PutArtifactRequest(_message.Message): + """A request to stage an artifact.""" + + DESCRIPTOR: _descriptor.Descriptor + + METADATA_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + @_builtins.property + def metadata(self) -> Global___PutArtifactMetadata: + """The first message in a PutArtifact call must contain this field.""" + + @_builtins.property + def data(self) -> Global___ArtifactChunk: + """A chunk of the artifact. All messages after the first in a PutArtifact call must contain a + chunk. + """ + + def __init__( + self, + *, + metadata: Global___PutArtifactMetadata | None = ..., + data: Global___ArtifactChunk | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["content", b"content", "data", b"data", "metadata", b"metadata"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["content", b"content", "data", b"data", "metadata", b"metadata"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_content: _TypeAlias = _typing.Literal["metadata", "data"] # noqa: Y015 + _WhichOneofArgType_content: _TypeAlias = _typing.Literal["content", b"content"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_content) -> _WhichOneofReturnType_content | None: ... + +Global___PutArtifactRequest: _TypeAlias = PutArtifactRequest # noqa: Y015 + +@_typing.final +class PutArtifactResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___PutArtifactResponse: _TypeAlias = PutArtifactResponse # noqa: Y015 + +@_typing.final +class CommitManifestRequest(_message.Message): + """A request to commit the manifest for a Job. All artifacts must have been successfully uploaded + before this call is made. + """ + + DESCRIPTOR: _descriptor.Descriptor + + MANIFEST_FIELD_NUMBER: _builtins.int + STAGING_SESSION_TOKEN_FIELD_NUMBER: _builtins.int + staging_session_token: _builtins.str + """(Required) A token for artifact staging session. This token can be obtained + from PrepareJob request in JobService + """ + @_builtins.property + def manifest(self) -> Global___Manifest: + """(Required) The manifest to commit.""" + + def __init__( + self, + *, + manifest: Global___Manifest | None = ..., + staging_session_token: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["manifest", b"manifest"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["manifest", b"manifest", "staging_session_token", b"staging_session_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CommitManifestRequest: _TypeAlias = CommitManifestRequest # noqa: Y015 + +@_typing.final +class CommitManifestResponse(_message.Message): + """The result of committing a manifest.""" + + DESCRIPTOR: _descriptor.Descriptor + + class _Constants: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _ConstantsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[CommitManifestResponse._Constants.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + NO_ARTIFACTS_STAGED_TOKEN: CommitManifestResponse._Constants.ValueType # 0 + """Token indicating that no artifacts were staged and therefore no retrieval attempt is necessary.""" + + class Constants(_Constants, metaclass=_ConstantsEnumTypeWrapper): ... + NO_ARTIFACTS_STAGED_TOKEN: CommitManifestResponse.Constants.ValueType # 0 + """Token indicating that no artifacts were staged and therefore no retrieval attempt is necessary.""" + + RETRIEVAL_TOKEN_FIELD_NUMBER: _builtins.int + retrieval_token: _builtins.str + """(Required) An opaque token representing the entirety of the staged artifacts. + This can be used to retrieve the manifest and artifacts from an associated + LegacyArtifactRetrievalService. + """ + def __init__( + self, + *, + retrieval_token: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["retrieval_token", b"retrieval_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CommitManifestResponse: _TypeAlias = CommitManifestResponse # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_grpc.py new file mode 100644 index 000000000000..8068db6b4bbe --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_grpc.py @@ -0,0 +1,488 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_artifact_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ArtifactRetrievalServiceStub(object): + """A service to retrieve artifacts for use in a Job. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ResolveArtifacts = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/ResolveArtifacts', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsResponse.FromString, + _registered_method=True) + self.GetArtifact = channel.unary_stream( + '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/GetArtifact', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactResponse.FromString, + _registered_method=True) + + +class ArtifactRetrievalServiceServicer(object): + """A service to retrieve artifacts for use in a Job. + """ + + def ResolveArtifacts(self, request, context): + """Resolves the given artifact references into one or more replacement + artifact references (e.g. a Maven dependency into a (transitive) set + of jars. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetArtifact(self, request, context): + """Retrieves the given artifact as a stream of bytes. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ArtifactRetrievalServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ResolveArtifacts': grpc.unary_unary_rpc_method_handler( + servicer.ResolveArtifacts, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsResponse.SerializeToString, + ), + 'GetArtifact': grpc.unary_stream_rpc_method_handler( + servicer.GetArtifact, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.job_management.v1.ArtifactRetrievalService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.job_management.v1.ArtifactRetrievalService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ArtifactRetrievalService(object): + """A service to retrieve artifacts for use in a Job. + """ + + @staticmethod + def ResolveArtifacts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/ResolveArtifacts', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ResolveArtifactsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetArtifact(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/GetArtifact', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetArtifactResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class ArtifactStagingServiceStub(object): + """A service that allows the client to act as an ArtifactRetrievalService, + for a particular job with the server initiating requests and receiving + responses. + + A client calls the service with an ArtifactResponseWrapper that has the + staging token set, and thereafter responds to the server's requests. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ReverseArtifactRetrievalService = channel.stream_stream( + '/org.apache.beam.model.job_management.v1.ArtifactStagingService/ReverseArtifactRetrievalService', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactResponseWrapper.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactRequestWrapper.FromString, + _registered_method=True) + + +class ArtifactStagingServiceServicer(object): + """A service that allows the client to act as an ArtifactRetrievalService, + for a particular job with the server initiating requests and receiving + responses. + + A client calls the service with an ArtifactResponseWrapper that has the + staging token set, and thereafter responds to the server's requests. + """ + + def ReverseArtifactRetrievalService(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ArtifactStagingServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ReverseArtifactRetrievalService': grpc.stream_stream_rpc_method_handler( + servicer.ReverseArtifactRetrievalService, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactResponseWrapper.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactRequestWrapper.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.job_management.v1.ArtifactStagingService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.job_management.v1.ArtifactStagingService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ArtifactStagingService(object): + """A service that allows the client to act as an ArtifactRetrievalService, + for a particular job with the server initiating requests and receiving + responses. + + A client calls the service with an ArtifactResponseWrapper that has the + staging token set, and thereafter responds to the server's requests. + """ + + @staticmethod + def ReverseArtifactRetrievalService(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/org.apache.beam.model.job_management.v1.ArtifactStagingService/ReverseArtifactRetrievalService', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactResponseWrapper.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactRequestWrapper.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class LegacyArtifactStagingServiceStub(object): + """Legacy artifact staging service for pipeline-level artifacts. + + A service to stage artifacts for use in a Job. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PutArtifact = channel.stream_unary( + '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/PutArtifact', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactResponse.FromString, + _registered_method=True) + self.CommitManifest = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/CommitManifest', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestResponse.FromString, + _registered_method=True) + + +class LegacyArtifactStagingServiceServicer(object): + """Legacy artifact staging service for pipeline-level artifacts. + + A service to stage artifacts for use in a Job. + """ + + def PutArtifact(self, request_iterator, context): + """Stage an artifact to be available during job execution. The first request must contain the + name of the artifact. All future requests must contain sequential chunks of the content of + the artifact. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CommitManifest(self, request, context): + """Commit the manifest for a Job. All artifacts must have been successfully uploaded + before this call is made. + + Throws error INVALID_ARGUMENT if not all of the members of the manifest are present + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_LegacyArtifactStagingServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PutArtifact': grpc.stream_unary_rpc_method_handler( + servicer.PutArtifact, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactResponse.SerializeToString, + ), + 'CommitManifest': grpc.unary_unary_rpc_method_handler( + servicer.CommitManifest, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.job_management.v1.LegacyArtifactStagingService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.job_management.v1.LegacyArtifactStagingService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class LegacyArtifactStagingService(object): + """Legacy artifact staging service for pipeline-level artifacts. + + A service to stage artifacts for use in a Job. + """ + + @staticmethod + def PutArtifact(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary( + request_iterator, + target, + '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/PutArtifact', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.PutArtifactResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CommitManifest(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/CommitManifest', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.CommitManifestResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + +class LegacyArtifactRetrievalServiceStub(object): + """A service to retrieve artifacts for use in a Job. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetManifest = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetManifest', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestResponse.FromString, + _registered_method=True) + self.GetArtifact = channel.unary_stream( + '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetArtifact', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.LegacyGetArtifactRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactChunk.FromString, + _registered_method=True) + + +class LegacyArtifactRetrievalServiceServicer(object): + """A service to retrieve artifacts for use in a Job. + """ + + def GetManifest(self, request, context): + """Get the manifest for the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetArtifact(self, request, context): + """Get an artifact staged for the job. The requested artifact must be within the manifest + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_LegacyArtifactRetrievalServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetManifest': grpc.unary_unary_rpc_method_handler( + servicer.GetManifest, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestResponse.SerializeToString, + ), + 'GetArtifact': grpc.unary_stream_rpc_method_handler( + servicer.GetArtifact, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.LegacyGetArtifactRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactChunk.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class LegacyArtifactRetrievalService(object): + """A service to retrieve artifacts for use in a Job. + """ + + @staticmethod + def GetManifest(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetManifest', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.GetManifestResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetArtifact(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetArtifact', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.LegacyGetArtifactRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__artifact__api__pb2.ArtifactChunk.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_urns.py new file mode 100644 index 000000000000..9ec6eccd2457 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_artifact_api_pb2_urns.py @@ -0,0 +1,10 @@ +from ........utils import PropertiesFromEnumValue +from ...pipeline.v1 import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class CommitManifestResponse(object): + + class Constants(object): + NO_ARTIFACTS_STAGED_TOKEN = PropertiesFromEnumValue('', '__no_artifacts_staged__', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.py new file mode 100644 index 000000000000..34d84bb0dfc1 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/job_management/v1/beam_expansion_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/job_management/v1/beam_expansion_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from ...pipeline.v1 import schema_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_schema__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n@org/apache/beam/model/job_management/v1/beam_expansion_api.proto\x12\"org.apache.beam.model.expansion.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a.org/apache/beam/model/pipeline/v1/schema.proto\"\x9d\x03\n\x10\x45xpansionRequest\x12\x41\n\ncomponents\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.Components\x12@\n\ttransform\x18\x02 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.PTransform\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12l\n\x15output_coder_requests\x18\x04 \x03(\x0b\x32M.org.apache.beam.model.expansion.v1.ExpansionRequest.OutputCoderRequestsEntry\x12\x14\n\x0crequirements\x18\x05 \x03(\t\x12\x31\n\x10pipeline_options\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a:\n\x18OutputCoderRequestsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbd\x01\n\x11\x45xpansionResponse\x12\x41\n\ncomponents\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.Components\x12@\n\ttransform\x18\x02 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.PTransform\x12\x14\n\x0crequirements\x18\x03 \x03(\t\x12\r\n\x05\x65rror\x18\n \x01(\t\" \n\x1e\x44iscoverSchemaTransformRequest\"\xb1\x01\n\x15SchemaTransformConfig\x12@\n\rconfig_schema\x18\x01 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x1f\n\x17input_pcollection_names\x18\x02 \x03(\t\x12 \n\x18output_pcollection_names\x18\x03 \x03(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"\xae\x02\n\x1f\x44iscoverSchemaTransformResponse\x12\x81\x01\n\x18schema_transform_configs\x18\x01 \x03(\x0b\x32_.org.apache.beam.model.expansion.v1.DiscoverSchemaTransformResponse.SchemaTransformConfigsEntry\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x1ax\n\x1bSchemaTransformConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.org.apache.beam.model.expansion.v1.SchemaTransformConfig:\x02\x38\x01\x32\xae\x02\n\x10\x45xpansionService\x12u\n\x06\x45xpand\x12\x34.org.apache.beam.model.expansion.v1.ExpansionRequest\x1a\x35.org.apache.beam.model.expansion.v1.ExpansionResponse\x12\xa2\x01\n\x17\x44iscoverSchemaTransform\x12\x42.org.apache.beam.model.expansion.v1.DiscoverSchemaTransformRequest\x1a\x43.org.apache.beam.model.expansion.v1.DiscoverSchemaTransformResponseB\x86\x01\n\"org.apache.beam.model.expansion.v1B\x0c\x45xpansionApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.job_management.v1.beam_expansion_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"org.apache.beam.model.expansion.v1B\014ExpansionApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1' + _globals['_EXPANSIONREQUEST_OUTPUTCODERREQUESTSENTRY']._loaded_options = None + _globals['_EXPANSIONREQUEST_OUTPUTCODERREQUESTSENTRY']._serialized_options = b'8\001' + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE_SCHEMATRANSFORMCONFIGSENTRY']._loaded_options = None + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE_SCHEMATRANSFORMCONFIGSENTRY']._serialized_options = b'8\001' + _globals['_EXPANSIONREQUEST']._serialized_start=240 + _globals['_EXPANSIONREQUEST']._serialized_end=653 + _globals['_EXPANSIONREQUEST_OUTPUTCODERREQUESTSENTRY']._serialized_start=595 + _globals['_EXPANSIONREQUEST_OUTPUTCODERREQUESTSENTRY']._serialized_end=653 + _globals['_EXPANSIONRESPONSE']._serialized_start=656 + _globals['_EXPANSIONRESPONSE']._serialized_end=845 + _globals['_DISCOVERSCHEMATRANSFORMREQUEST']._serialized_start=847 + _globals['_DISCOVERSCHEMATRANSFORMREQUEST']._serialized_end=879 + _globals['_SCHEMATRANSFORMCONFIG']._serialized_start=882 + _globals['_SCHEMATRANSFORMCONFIG']._serialized_end=1059 + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE']._serialized_start=1062 + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE']._serialized_end=1364 + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE_SCHEMATRANSFORMCONFIGSENTRY']._serialized_start=1244 + _globals['_DISCOVERSCHEMATRANSFORMRESPONSE_SCHEMATRANSFORMCONFIGSENTRY']._serialized_end=1364 + _globals['_EXPANSIONSERVICE']._serialized_start=1367 + _globals['_EXPANSIONSERVICE']._serialized_end=1669 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.pyi new file mode 100644 index 000000000000..9562e770920d --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2.pyi @@ -0,0 +1,249 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the Expansion API, an api for expanding +transforms in a remote SDK. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf.internal import containers as _containers +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +from ...pipeline.v1 import schema_pb2 as _schema_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class ExpansionRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class OutputCoderRequestsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + COMPONENTS_FIELD_NUMBER: _builtins.int + TRANSFORM_FIELD_NUMBER: _builtins.int + NAMESPACE_FIELD_NUMBER: _builtins.int + OUTPUT_CODER_REQUESTS_FIELD_NUMBER: _builtins.int + REQUIREMENTS_FIELD_NUMBER: _builtins.int + PIPELINE_OPTIONS_FIELD_NUMBER: _builtins.int + namespace: _builtins.str + """A namespace (prefix) to use for the id of any newly created + components. + """ + @_builtins.property + def components(self) -> _beam_runner_api_pb2.Components: + """Set of components needed to interpret the transform, or which + may be useful for its expansion. This includes the input + PCollections (if any) to the to-be-expanded transform, along + with their coders and windowing strategies. + """ + + @_builtins.property + def transform(self) -> _beam_runner_api_pb2.PTransform: + """The actual PTransform to be expaneded according to its spec. + Its input should be set, but its subtransforms and outputs + should not be. + """ + + @_builtins.property + def output_coder_requests(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """(Optional) Map from a local output tag to a coder id. + If it is set, asks the expansion service to use the given + coders for the output PCollections. Note that the request + may not be fulfilled. + """ + + @_builtins.property + def requirements(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """A set of requirements that must be used by the expansion service to + interpret the components provided with this request. + """ + + @_builtins.property + def pipeline_options(self) -> _struct_pb2.Struct: + """(Optional) A set of Pipeline Options that should be used + when expanding this transform. + """ + + def __init__( + self, + *, + components: _beam_runner_api_pb2.Components | None = ..., + transform: _beam_runner_api_pb2.PTransform | None = ..., + namespace: _builtins.str | None = ..., + output_coder_requests: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + requirements: _abc.Iterable[_builtins.str] | None = ..., + pipeline_options: _struct_pb2.Struct | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "pipeline_options", b"pipeline_options", "transform", b"transform"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "namespace", b"namespace", "output_coder_requests", b"output_coder_requests", "pipeline_options", b"pipeline_options", "requirements", b"requirements", "transform", b"transform"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ExpansionRequest: _TypeAlias = ExpansionRequest # noqa: Y015 + +@_typing.final +class ExpansionResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + COMPONENTS_FIELD_NUMBER: _builtins.int + TRANSFORM_FIELD_NUMBER: _builtins.int + REQUIREMENTS_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + error: _builtins.str + """(Optional) An string representation of any error encountered while + attempting to expand this transform. + """ + @_builtins.property + def components(self) -> _beam_runner_api_pb2.Components: + """Set of components needed to execute the expanded transform, + including the (original) inputs, outputs, and subtransforms. + """ + + @_builtins.property + def transform(self) -> _beam_runner_api_pb2.PTransform: + """The expanded transform itself, with references to its outputs + and subtransforms. + """ + + @_builtins.property + def requirements(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """A set of requirements that must be appended to this pipeline's + requirements. + """ + + def __init__( + self, + *, + components: _beam_runner_api_pb2.Components | None = ..., + transform: _beam_runner_api_pb2.PTransform | None = ..., + requirements: _abc.Iterable[_builtins.str] | None = ..., + error: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "transform", b"transform"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "error", b"error", "requirements", b"requirements", "transform", b"transform"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ExpansionResponse: _TypeAlias = ExpansionResponse # noqa: Y015 + +@_typing.final +class DiscoverSchemaTransformRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___DiscoverSchemaTransformRequest: _TypeAlias = DiscoverSchemaTransformRequest # noqa: Y015 + +@_typing.final +class SchemaTransformConfig(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + CONFIG_SCHEMA_FIELD_NUMBER: _builtins.int + INPUT_PCOLLECTION_NAMES_FIELD_NUMBER: _builtins.int + OUTPUT_PCOLLECTION_NAMES_FIELD_NUMBER: _builtins.int + DESCRIPTION_FIELD_NUMBER: _builtins.int + description: _builtins.str + """Description of this transform and usage used for documentation. + May be markdown formatted. + Note that configuration parameters may also have documentation attached + as part of the config_schema. + """ + @_builtins.property + def config_schema(self) -> _schema_pb2.Schema: + """Config schema of the SchemaTransform""" + + @_builtins.property + def input_pcollection_names(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """Names of input PCollections""" + + @_builtins.property + def output_pcollection_names(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """Names of output PCollections""" + + def __init__( + self, + *, + config_schema: _schema_pb2.Schema | None = ..., + input_pcollection_names: _abc.Iterable[_builtins.str] | None = ..., + output_pcollection_names: _abc.Iterable[_builtins.str] | None = ..., + description: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["config_schema", b"config_schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["config_schema", b"config_schema", "description", b"description", "input_pcollection_names", b"input_pcollection_names", "output_pcollection_names", b"output_pcollection_names"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SchemaTransformConfig: _TypeAlias = SchemaTransformConfig # noqa: Y015 + +@_typing.final +class DiscoverSchemaTransformResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class SchemaTransformConfigsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___SchemaTransformConfig: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___SchemaTransformConfig | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + SCHEMA_TRANSFORM_CONFIGS_FIELD_NUMBER: _builtins.int + ERROR_FIELD_NUMBER: _builtins.int + error: _builtins.str + """If list of identifies are empty, this may contain an error.""" + @_builtins.property + def schema_transform_configs(self) -> _containers.MessageMap[_builtins.str, Global___SchemaTransformConfig]: + """A mapping from SchemaTransform ID to schema transform config of discovered + SchemaTransforms + """ + + def __init__( + self, + *, + schema_transform_configs: _abc.Mapping[_builtins.str, Global___SchemaTransformConfig] | None = ..., + error: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "schema_transform_configs", b"schema_transform_configs"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DiscoverSchemaTransformResponse: _TypeAlias = DiscoverSchemaTransformResponse # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2_grpc.py new file mode 100644 index 000000000000..bb8614635248 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_expansion_api_pb2_grpc.py @@ -0,0 +1,145 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_expansion_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/job_management/v1/beam_expansion_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ExpansionServiceStub(object): + """Job Service for constructing pipelines + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Expand = channel.unary_unary( + '/org.apache.beam.model.expansion.v1.ExpansionService/Expand', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.FromString, + _registered_method=True) + self.DiscoverSchemaTransform = channel.unary_unary( + '/org.apache.beam.model.expansion.v1.ExpansionService/DiscoverSchemaTransform', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.FromString, + _registered_method=True) + + +class ExpansionServiceServicer(object): + """Job Service for constructing pipelines + """ + + def Expand(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DiscoverSchemaTransform(self, request, context): + """A RPC to discover already registered SchemaTransformProviders. + See https://s.apache.org/easy-multi-language for more details. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ExpansionServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Expand': grpc.unary_unary_rpc_method_handler( + servicer.Expand, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.SerializeToString, + ), + 'DiscoverSchemaTransform': grpc.unary_unary_rpc_method_handler( + servicer.DiscoverSchemaTransform, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.expansion.v1.ExpansionService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.expansion.v1.ExpansionService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ExpansionService(object): + """Job Service for constructing pipelines + """ + + @staticmethod + def Expand(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.expansion.v1.ExpansionService/Expand', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DiscoverSchemaTransform(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.expansion.v1.ExpansionService/DiscoverSchemaTransform', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.py new file mode 100644 index 000000000000..02e8216dc537 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/job_management/v1/beam_job_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/job_management/v1/beam_job_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...pipeline.v1 import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from ...pipeline.v1 import endpoints_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_endpoints__pb2 +from ...pipeline.v1 import metrics_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_metrics__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:org/apache/beam/model/job_management/v1/beam_job_api.proto\x12\'org.apache.beam.model.job_management.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a\x31org/apache/beam/model/pipeline/v1/endpoints.proto\x1a/org/apache/beam/model/pipeline/v1/metrics.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x01\n\x11PrepareJobRequest\x12=\n\x08pipeline\x18\x01 \x01(\x0b\x32+.org.apache.beam.model.pipeline.v1.Pipeline\x12\x31\n\x10pipeline_options\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08job_name\x18\x03 \x01(\t\"\xa7\x01\n\x12PrepareJobResponse\x12\x16\n\x0epreparation_id\x18\x01 \x01(\t\x12Z\n\x19\x61rtifact_staging_endpoint\x18\x02 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12\x1d\n\x15staging_session_token\x18\x03 \x01(\t\"@\n\rRunJobRequest\x12\x16\n\x0epreparation_id\x18\x01 \x01(\t\x12\x17\n\x0fretrieval_token\x18\x02 \x01(\t\" \n\x0eRunJobResponse\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"\"\n\x10\x43\x61ncelJobRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"Z\n\x11\x43\x61ncelJobResponse\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.org.apache.beam.model.job_management.v1.JobState.Enum\"!\n\x0f\x44rainJobRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"Y\n\x10\x44rainJobResponse\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.org.apache.beam.model.job_management.v1.JobState.Enum\"\xa5\x01\n\x07JobInfo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x10\n\x08job_name\x18\x02 \x01(\t\x12\x31\n\x10pipeline_options\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x45\n\x05state\x18\x04 \x01(\x0e\x32\x36.org.apache.beam.model.job_management.v1.JobState.Enum\"\x10\n\x0eGetJobsRequest\"U\n\x0fGetJobsResponse\x12\x42\n\x08job_info\x18\x01 \x03(\x0b\x32\x30.org.apache.beam.model.job_management.v1.JobInfo\"$\n\x12GetJobStateRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"\x85\x01\n\rJobStateEvent\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.org.apache.beam.model.job_management.v1.JobState.Enum\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\'\n\x15GetJobPipelineRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"W\n\x16GetJobPipelineResponse\x12=\n\x08pipeline\x18\x01 \x01(\x0b\x32+.org.apache.beam.model.pipeline.v1.Pipeline\"$\n\x12JobMessagesRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"\xd1\x02\n\nJobMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\t\x12Y\n\nimportance\x18\x03 \x01(\x0e\x32\x45.org.apache.beam.model.job_management.v1.JobMessage.MessageImportance\x12\x14\n\x0cmessage_text\x18\x04 \x01(\t\"\xaf\x01\n\x11MessageImportance\x12\"\n\x1eMESSAGE_IMPORTANCE_UNSPECIFIED\x10\x00\x12\x15\n\x11JOB_MESSAGE_DEBUG\x10\x01\x12\x18\n\x14JOB_MESSAGE_DETAILED\x10\x02\x12\x15\n\x11JOB_MESSAGE_BASIC\x10\x03\x12\x17\n\x13JOB_MESSAGE_WARNING\x10\x04\x12\x15\n\x11JOB_MESSAGE_ERROR\x10\x05\"\xc4\x01\n\x13JobMessagesResponse\x12O\n\x10message_response\x18\x01 \x01(\x0b\x32\x33.org.apache.beam.model.job_management.v1.JobMessageH\x00\x12P\n\x0estate_response\x18\x02 \x01(\x0b\x32\x36.org.apache.beam.model.job_management.v1.JobStateEventH\x00\x42\n\n\x08response\"\xb7\x01\n\x08JobState\"\xaa\x01\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07STOPPED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tCANCELLED\x10\x05\x12\x0b\n\x07UPDATED\x10\x06\x12\x0c\n\x08\x44RAINING\x10\x07\x12\x0b\n\x07\x44RAINED\x10\x08\x12\x0c\n\x08STARTING\x10\t\x12\x0e\n\nCANCELLING\x10\n\x12\x0c\n\x08UPDATING\x10\x0b\"&\n\x14GetJobMetricsRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\"`\n\x15GetJobMetricsResponse\x12G\n\x07metrics\x18\x01 \x01(\x0b\x32\x36.org.apache.beam.model.job_management.v1.MetricResults\"\x9b\x01\n\rMetricResults\x12\x44\n\tattempted\x18\x01 \x03(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.MonitoringInfo\x12\x44\n\tcommitted\x18\x02 \x03(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.MonitoringInfo\" \n\x1e\x44\x65scribePipelineOptionsRequest\"e\n\x12PipelineOptionType\"O\n\x04\x45num\x12\n\n\x06STRING\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\n\n\x06NUMBER\x10\x03\x12\t\n\x05\x41RRAY\x10\x04\x12\n\n\x06OBJECT\x10\x05\"\xb3\x01\n\x18PipelineOptionDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32@.org.apache.beam.model.job_management.v1.PipelineOptionType.Enum\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rdefault_value\x18\x04 \x01(\t\x12\r\n\x05group\x18\x05 \x01(\t\"u\n\x1f\x44\x65scribePipelineOptionsResponse\x12R\n\x07options\x18\x01 \x03(\x0b\x32\x41.org.apache.beam.model.job_management.v1.PipelineOptionDescriptor2\xf4\x0b\n\nJobService\x12\x82\x01\n\x07Prepare\x12:.org.apache.beam.model.job_management.v1.PrepareJobRequest\x1a;.org.apache.beam.model.job_management.v1.PrepareJobResponse\x12v\n\x03Run\x12\x36.org.apache.beam.model.job_management.v1.RunJobRequest\x1a\x37.org.apache.beam.model.job_management.v1.RunJobResponse\x12|\n\x07GetJobs\x12\x37.org.apache.beam.model.job_management.v1.GetJobsRequest\x1a\x38.org.apache.beam.model.job_management.v1.GetJobsResponse\x12\x7f\n\x08GetState\x12;.org.apache.beam.model.job_management.v1.GetJobStateRequest\x1a\x36.org.apache.beam.model.job_management.v1.JobStateEvent\x12\x8e\x01\n\x0bGetPipeline\x12>.org.apache.beam.model.job_management.v1.GetJobPipelineRequest\x1a?.org.apache.beam.model.job_management.v1.GetJobPipelineResponse\x12\x7f\n\x06\x43\x61ncel\x12\x39.org.apache.beam.model.job_management.v1.CancelJobRequest\x1a:.org.apache.beam.model.job_management.v1.CancelJobResponse\x12|\n\x05\x44rain\x12\x38.org.apache.beam.model.job_management.v1.DrainJobRequest\x1a\x39.org.apache.beam.model.job_management.v1.DrainJobResponse\x12\x87\x01\n\x0eGetStateStream\x12;.org.apache.beam.model.job_management.v1.GetJobStateRequest\x1a\x36.org.apache.beam.model.job_management.v1.JobStateEvent0\x01\x12\x8f\x01\n\x10GetMessageStream\x12;.org.apache.beam.model.job_management.v1.JobMessagesRequest\x1a<.org.apache.beam.model.job_management.v1.JobMessagesResponse0\x01\x12\x8e\x01\n\rGetJobMetrics\x12=.org.apache.beam.model.job_management.v1.GetJobMetricsRequest\x1a>.org.apache.beam.model.job_management.v1.GetJobMetricsResponse\x12\xac\x01\n\x17\x44\x65scribePipelineOptions\x12G.org.apache.beam.model.job_management.v1.DescribePipelineOptionsRequest\x1aH.org.apache.beam.model.job_management.v1.DescribePipelineOptionsResponseB\x84\x01\n&org.apache.beam.model.jobmanagement.v1B\x06JobApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.job_management.v1.beam_job_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&org.apache.beam.model.jobmanagement.v1B\006JobApiZRgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1;jobmanagement_v1' + _globals['_PREPAREJOBREQUEST']._serialized_start=324 + _globals['_PREPAREJOBREQUEST']._serialized_end=475 + _globals['_PREPAREJOBRESPONSE']._serialized_start=478 + _globals['_PREPAREJOBRESPONSE']._serialized_end=645 + _globals['_RUNJOBREQUEST']._serialized_start=647 + _globals['_RUNJOBREQUEST']._serialized_end=711 + _globals['_RUNJOBRESPONSE']._serialized_start=713 + _globals['_RUNJOBRESPONSE']._serialized_end=745 + _globals['_CANCELJOBREQUEST']._serialized_start=747 + _globals['_CANCELJOBREQUEST']._serialized_end=781 + _globals['_CANCELJOBRESPONSE']._serialized_start=783 + _globals['_CANCELJOBRESPONSE']._serialized_end=873 + _globals['_DRAINJOBREQUEST']._serialized_start=875 + _globals['_DRAINJOBREQUEST']._serialized_end=908 + _globals['_DRAINJOBRESPONSE']._serialized_start=910 + _globals['_DRAINJOBRESPONSE']._serialized_end=999 + _globals['_JOBINFO']._serialized_start=1002 + _globals['_JOBINFO']._serialized_end=1167 + _globals['_GETJOBSREQUEST']._serialized_start=1169 + _globals['_GETJOBSREQUEST']._serialized_end=1185 + _globals['_GETJOBSRESPONSE']._serialized_start=1187 + _globals['_GETJOBSRESPONSE']._serialized_end=1272 + _globals['_GETJOBSTATEREQUEST']._serialized_start=1274 + _globals['_GETJOBSTATEREQUEST']._serialized_end=1310 + _globals['_JOBSTATEEVENT']._serialized_start=1313 + _globals['_JOBSTATEEVENT']._serialized_end=1446 + _globals['_GETJOBPIPELINEREQUEST']._serialized_start=1448 + _globals['_GETJOBPIPELINEREQUEST']._serialized_end=1487 + _globals['_GETJOBPIPELINERESPONSE']._serialized_start=1489 + _globals['_GETJOBPIPELINERESPONSE']._serialized_end=1576 + _globals['_JOBMESSAGESREQUEST']._serialized_start=1578 + _globals['_JOBMESSAGESREQUEST']._serialized_end=1614 + _globals['_JOBMESSAGE']._serialized_start=1617 + _globals['_JOBMESSAGE']._serialized_end=1954 + _globals['_JOBMESSAGE_MESSAGEIMPORTANCE']._serialized_start=1779 + _globals['_JOBMESSAGE_MESSAGEIMPORTANCE']._serialized_end=1954 + _globals['_JOBMESSAGESRESPONSE']._serialized_start=1957 + _globals['_JOBMESSAGESRESPONSE']._serialized_end=2153 + _globals['_JOBSTATE']._serialized_start=2156 + _globals['_JOBSTATE']._serialized_end=2339 + _globals['_JOBSTATE_ENUM']._serialized_start=2169 + _globals['_JOBSTATE_ENUM']._serialized_end=2339 + _globals['_GETJOBMETRICSREQUEST']._serialized_start=2341 + _globals['_GETJOBMETRICSREQUEST']._serialized_end=2379 + _globals['_GETJOBMETRICSRESPONSE']._serialized_start=2381 + _globals['_GETJOBMETRICSRESPONSE']._serialized_end=2477 + _globals['_METRICRESULTS']._serialized_start=2480 + _globals['_METRICRESULTS']._serialized_end=2635 + _globals['_DESCRIBEPIPELINEOPTIONSREQUEST']._serialized_start=2637 + _globals['_DESCRIBEPIPELINEOPTIONSREQUEST']._serialized_end=2669 + _globals['_PIPELINEOPTIONTYPE']._serialized_start=2671 + _globals['_PIPELINEOPTIONTYPE']._serialized_end=2772 + _globals['_PIPELINEOPTIONTYPE_ENUM']._serialized_start=2693 + _globals['_PIPELINEOPTIONTYPE_ENUM']._serialized_end=2772 + _globals['_PIPELINEOPTIONDESCRIPTOR']._serialized_start=2775 + _globals['_PIPELINEOPTIONDESCRIPTOR']._serialized_end=2954 + _globals['_DESCRIBEPIPELINEOPTIONSRESPONSE']._serialized_start=2956 + _globals['_DESCRIBEPIPELINEOPTIONSRESPONSE']._serialized_end=3073 + _globals['_JOBSERVICE']._serialized_start=3076 + _globals['_JOBSERVICE']._serialized_end=4600 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.pyi new file mode 100644 index 000000000000..578e224f3a85 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2.pyi @@ -0,0 +1,730 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the Job API, api for communicating with a runner +for job submission over GRPC. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from ...pipeline.v1 import beam_runner_api_pb2 as _beam_runner_api_pb2 +from ...pipeline.v1 import endpoints_pb2 as _endpoints_pb2 +from ...pipeline.v1 import metrics_pb2 as _metrics_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class PrepareJobRequest(_message.Message): + """Prepare is a synchronous request that returns a preparationId back + Throws error GRPC_STATUS_UNAVAILABLE if server is down + Throws error ALREADY_EXISTS if the jobName is reused. Runners are permitted to deduplicate based on the name of the job. + Throws error UNKNOWN for all other issues + """ + + DESCRIPTOR: _descriptor.Descriptor + + PIPELINE_FIELD_NUMBER: _builtins.int + PIPELINE_OPTIONS_FIELD_NUMBER: _builtins.int + JOB_NAME_FIELD_NUMBER: _builtins.int + job_name: _builtins.str + """(required)""" + @_builtins.property + def pipeline(self) -> _beam_runner_api_pb2.Pipeline: + """(required)""" + + @_builtins.property + def pipeline_options(self) -> _struct_pb2.Struct: + """(required)""" + + def __init__( + self, + *, + pipeline: _beam_runner_api_pb2.Pipeline | None = ..., + pipeline_options: _struct_pb2.Struct | None = ..., + job_name: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["pipeline", b"pipeline", "pipeline_options", b"pipeline_options"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_name", b"job_name", "pipeline", b"pipeline", "pipeline_options", b"pipeline_options"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PrepareJobRequest: _TypeAlias = PrepareJobRequest # noqa: Y015 + +@_typing.final +class PrepareJobResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + PREPARATION_ID_FIELD_NUMBER: _builtins.int + ARTIFACT_STAGING_ENDPOINT_FIELD_NUMBER: _builtins.int + STAGING_SESSION_TOKEN_FIELD_NUMBER: _builtins.int + preparation_id: _builtins.str + """(required) The ID used to associate calls made while preparing the job. preparationId is used + to run the job. + """ + staging_session_token: _builtins.str + """(required) Token for the artifact staging. This token also represent an artifact + staging session with the artifact staging service. + """ + @_builtins.property + def artifact_staging_endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """An endpoint which exposes the Beam Artifact Staging API. Artifacts used by the job should be + staged to this endpoint, and will be available during job execution. + """ + + def __init__( + self, + *, + preparation_id: _builtins.str | None = ..., + artifact_staging_endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + staging_session_token: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["artifact_staging_endpoint", b"artifact_staging_endpoint"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact_staging_endpoint", b"artifact_staging_endpoint", "preparation_id", b"preparation_id", "staging_session_token", b"staging_session_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PrepareJobResponse: _TypeAlias = PrepareJobResponse # noqa: Y015 + +@_typing.final +class RunJobRequest(_message.Message): + """Run is a synchronous request that returns a jobId back. + Throws error GRPC_STATUS_UNAVAILABLE if server is down + Throws error NOT_FOUND if the preparation ID does not exist + Throws error UNKNOWN for all other issues + """ + + DESCRIPTOR: _descriptor.Descriptor + + PREPARATION_ID_FIELD_NUMBER: _builtins.int + RETRIEVAL_TOKEN_FIELD_NUMBER: _builtins.int + preparation_id: _builtins.str + """(required) The ID provided by an earlier call to prepare. Runs the job. All prerequisite tasks + must have been completed. + """ + retrieval_token: _builtins.str + """(optional) If any artifacts have been staged for this job, contains the retrieval_token returned + from the CommitManifestResponse. + """ + def __init__( + self, + *, + preparation_id: _builtins.str | None = ..., + retrieval_token: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["preparation_id", b"preparation_id", "retrieval_token", b"retrieval_token"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RunJobRequest: _TypeAlias = RunJobRequest # noqa: Y015 + +@_typing.final +class RunJobResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required) The ID for the executing job""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RunJobResponse: _TypeAlias = RunJobResponse # noqa: Y015 + +@_typing.final +class CancelJobRequest(_message.Message): + """Cancel is a synchronus request that returns a job state back + Throws error GRPC_STATUS_UNAVAILABLE if server is down + Throws error NOT_FOUND if the jobId is not found + """ + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CancelJobRequest: _TypeAlias = CancelJobRequest # noqa: Y015 + +@_typing.final +class CancelJobResponse(_message.Message): + """Valid responses include any terminal state or CANCELLING""" + + DESCRIPTOR: _descriptor.Descriptor + + STATE_FIELD_NUMBER: _builtins.int + state: Global___JobState.Enum.ValueType + """(required)""" + def __init__( + self, + *, + state: Global___JobState.Enum.ValueType | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["state", b"state"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CancelJobResponse: _TypeAlias = CancelJobResponse # noqa: Y015 + +@_typing.final +class DrainJobRequest(_message.Message): + """Drain is a request to: + - stop a pipeline Job from ingesting new data from input sources + - process remaining data in the pipeline + - truncate Splittable DoFns + """ + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DrainJobRequest: _TypeAlias = DrainJobRequest # noqa: Y015 + +@_typing.final +class DrainJobResponse(_message.Message): + """Valid responses include any terminal state or DRAINING""" + + DESCRIPTOR: _descriptor.Descriptor + + STATE_FIELD_NUMBER: _builtins.int + state: Global___JobState.Enum.ValueType + """(required)""" + def __init__( + self, + *, + state: Global___JobState.Enum.ValueType | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["state", b"state"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DrainJobResponse: _TypeAlias = DrainJobResponse # noqa: Y015 + +@_typing.final +class JobInfo(_message.Message): + """A subset of info provided by ProvisionApi.ProvisionInfo""" + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + JOB_NAME_FIELD_NUMBER: _builtins.int + PIPELINE_OPTIONS_FIELD_NUMBER: _builtins.int + STATE_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + job_name: _builtins.str + """(required)""" + state: Global___JobState.Enum.ValueType + """(required)""" + @_builtins.property + def pipeline_options(self) -> _struct_pb2.Struct: + """(required)""" + + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + job_name: _builtins.str | None = ..., + pipeline_options: _struct_pb2.Struct | None = ..., + state: Global___JobState.Enum.ValueType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["pipeline_options", b"pipeline_options"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id", "job_name", b"job_name", "pipeline_options", b"pipeline_options", "state", b"state"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___JobInfo: _TypeAlias = JobInfo # noqa: Y015 + +@_typing.final +class GetJobsRequest(_message.Message): + """GetJobs is a synchronus request that returns a list of invoked jobs back + Throws error GRPC_STATUS_UNAVAILABLE if server is down + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___GetJobsRequest: _TypeAlias = GetJobsRequest # noqa: Y015 + +@_typing.final +class GetJobsResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + JOB_INFO_FIELD_NUMBER: _builtins.int + @_builtins.property + def job_info(self) -> _containers.RepeatedCompositeFieldContainer[Global___JobInfo]: + """(required)""" + + def __init__( + self, + *, + job_info: _abc.Iterable[Global___JobInfo] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_info", b"job_info"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobsResponse: _TypeAlias = GetJobsResponse # noqa: Y015 + +@_typing.final +class GetJobStateRequest(_message.Message): + """GetState is a synchronus request that returns a job state back + Throws error GRPC_STATUS_UNAVAILABLE if server is down + Throws error NOT_FOUND if the jobId is not found + """ + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobStateRequest: _TypeAlias = GetJobStateRequest # noqa: Y015 + +@_typing.final +class JobStateEvent(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + STATE_FIELD_NUMBER: _builtins.int + TIMESTAMP_FIELD_NUMBER: _builtins.int + state: Global___JobState.Enum.ValueType + """(required)""" + @_builtins.property + def timestamp(self) -> _timestamp_pb2.Timestamp: + """(required)""" + + def __init__( + self, + *, + state: Global___JobState.Enum.ValueType | None = ..., + timestamp: _timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["timestamp", b"timestamp"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["state", b"state", "timestamp", b"timestamp"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___JobStateEvent: _TypeAlias = JobStateEvent # noqa: Y015 + +@_typing.final +class GetJobPipelineRequest(_message.Message): + """GetPipeline is a synchronus request that returns a pipeline back + Throws error GRPC_STATUS_UNAVAILABLE if server is down + Throws error NOT_FOUND if the jobId is not found + """ + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobPipelineRequest: _TypeAlias = GetJobPipelineRequest # noqa: Y015 + +@_typing.final +class GetJobPipelineResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + PIPELINE_FIELD_NUMBER: _builtins.int + @_builtins.property + def pipeline(self) -> _beam_runner_api_pb2.Pipeline: + """(required)""" + + def __init__( + self, + *, + pipeline: _beam_runner_api_pb2.Pipeline | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["pipeline", b"pipeline"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["pipeline", b"pipeline"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobPipelineResponse: _TypeAlias = GetJobPipelineResponse # noqa: Y015 + +@_typing.final +class JobMessagesRequest(_message.Message): + """GetJobMessages is a streaming api for streaming job messages from the service + One request will connect you to the job and you'll get a stream of job state + and job messages back; one is used for logging and the other for detecting + the job ended. + """ + + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___JobMessagesRequest: _TypeAlias = JobMessagesRequest # noqa: Y015 + +@_typing.final +class JobMessage(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _MessageImportance: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _MessageImportanceEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[JobMessage._MessageImportance.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + MESSAGE_IMPORTANCE_UNSPECIFIED: JobMessage._MessageImportance.ValueType # 0 + JOB_MESSAGE_DEBUG: JobMessage._MessageImportance.ValueType # 1 + JOB_MESSAGE_DETAILED: JobMessage._MessageImportance.ValueType # 2 + JOB_MESSAGE_BASIC: JobMessage._MessageImportance.ValueType # 3 + JOB_MESSAGE_WARNING: JobMessage._MessageImportance.ValueType # 4 + JOB_MESSAGE_ERROR: JobMessage._MessageImportance.ValueType # 5 + + class MessageImportance(_MessageImportance, metaclass=_MessageImportanceEnumTypeWrapper): ... + MESSAGE_IMPORTANCE_UNSPECIFIED: JobMessage.MessageImportance.ValueType # 0 + JOB_MESSAGE_DEBUG: JobMessage.MessageImportance.ValueType # 1 + JOB_MESSAGE_DETAILED: JobMessage.MessageImportance.ValueType # 2 + JOB_MESSAGE_BASIC: JobMessage.MessageImportance.ValueType # 3 + JOB_MESSAGE_WARNING: JobMessage.MessageImportance.ValueType # 4 + JOB_MESSAGE_ERROR: JobMessage.MessageImportance.ValueType # 5 + + MESSAGE_ID_FIELD_NUMBER: _builtins.int + TIME_FIELD_NUMBER: _builtins.int + IMPORTANCE_FIELD_NUMBER: _builtins.int + MESSAGE_TEXT_FIELD_NUMBER: _builtins.int + message_id: _builtins.str + time: _builtins.str + importance: Global___JobMessage.MessageImportance.ValueType + message_text: _builtins.str + def __init__( + self, + *, + message_id: _builtins.str | None = ..., + time: _builtins.str | None = ..., + importance: Global___JobMessage.MessageImportance.ValueType | None = ..., + message_text: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["importance", b"importance", "message_id", b"message_id", "message_text", b"message_text", "time", b"time"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___JobMessage: _TypeAlias = JobMessage # noqa: Y015 + +@_typing.final +class JobMessagesResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + MESSAGE_RESPONSE_FIELD_NUMBER: _builtins.int + STATE_RESPONSE_FIELD_NUMBER: _builtins.int + @_builtins.property + def message_response(self) -> Global___JobMessage: ... + @_builtins.property + def state_response(self) -> Global___JobStateEvent: ... + def __init__( + self, + *, + message_response: Global___JobMessage | None = ..., + state_response: Global___JobStateEvent | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["message_response", b"message_response", "response", b"response", "state_response", b"state_response"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["message_response", b"message_response", "response", b"response", "state_response", b"state_response"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_response: _TypeAlias = _typing.Literal["message_response", "state_response"] # noqa: Y015 + _WhichOneofArgType_response: _TypeAlias = _typing.Literal["response", b"response"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_response) -> _WhichOneofReturnType_response | None: ... + +Global___JobMessagesResponse: _TypeAlias = JobMessagesResponse # noqa: Y015 + +@_typing.final +class JobState(_message.Message): + """Enumeration of all JobStates + + The state transition diagram is: + STOPPED -> STARTING -> RUNNING -> DONE + \\> FAILED + \\> CANCELLING -> CANCELLED + \\> UPDATING -> UPDATED + \\> DRAINING -> DRAINED + + Transitions are optional such that a job may go from STOPPED to RUNNING + without needing to pass through STARTING. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[JobState._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: JobState._Enum.ValueType # 0 + """The job state reported by a runner cannot be interpreted by the SDK.""" + STOPPED: JobState._Enum.ValueType # 1 + """The job has not yet started.""" + RUNNING: JobState._Enum.ValueType # 2 + """The job is currently running.""" + DONE: JobState._Enum.ValueType # 3 + """The job has successfully completed. (terminal)""" + FAILED: JobState._Enum.ValueType # 4 + """The job has failed. (terminal)""" + CANCELLED: JobState._Enum.ValueType # 5 + """The job has been explicitly cancelled. (terminal)""" + UPDATED: JobState._Enum.ValueType # 6 + """The job has been updated. (terminal)""" + DRAINING: JobState._Enum.ValueType # 7 + """The job is draining its data. (optional)""" + DRAINED: JobState._Enum.ValueType # 8 + """The job has completed draining its data. (terminal)""" + STARTING: JobState._Enum.ValueType # 9 + """The job is starting up.""" + CANCELLING: JobState._Enum.ValueType # 10 + """The job is cancelling. (optional)""" + UPDATING: JobState._Enum.ValueType # 11 + """The job is in the process of being updated. (optional)""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: JobState.Enum.ValueType # 0 + """The job state reported by a runner cannot be interpreted by the SDK.""" + STOPPED: JobState.Enum.ValueType # 1 + """The job has not yet started.""" + RUNNING: JobState.Enum.ValueType # 2 + """The job is currently running.""" + DONE: JobState.Enum.ValueType # 3 + """The job has successfully completed. (terminal)""" + FAILED: JobState.Enum.ValueType # 4 + """The job has failed. (terminal)""" + CANCELLED: JobState.Enum.ValueType # 5 + """The job has been explicitly cancelled. (terminal)""" + UPDATED: JobState.Enum.ValueType # 6 + """The job has been updated. (terminal)""" + DRAINING: JobState.Enum.ValueType # 7 + """The job is draining its data. (optional)""" + DRAINED: JobState.Enum.ValueType # 8 + """The job has completed draining its data. (terminal)""" + STARTING: JobState.Enum.ValueType # 9 + """The job is starting up.""" + CANCELLING: JobState.Enum.ValueType # 10 + """The job is cancelling. (optional)""" + UPDATING: JobState.Enum.ValueType # 11 + """The job is in the process of being updated. (optional)""" + + def __init__( + self, + ) -> None: ... + +Global___JobState: _TypeAlias = JobState # noqa: Y015 + +@_typing.final +class GetJobMetricsRequest(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + JOB_ID_FIELD_NUMBER: _builtins.int + job_id: _builtins.str + """(required)""" + def __init__( + self, + *, + job_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["job_id", b"job_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobMetricsRequest: _TypeAlias = GetJobMetricsRequest # noqa: Y015 + +@_typing.final +class GetJobMetricsResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + METRICS_FIELD_NUMBER: _builtins.int + @_builtins.property + def metrics(self) -> Global___MetricResults: ... + def __init__( + self, + *, + metrics: Global___MetricResults | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["metrics", b"metrics"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["metrics", b"metrics"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GetJobMetricsResponse: _TypeAlias = GetJobMetricsResponse # noqa: Y015 + +@_typing.final +class MetricResults(_message.Message): + """All metrics for a given job. Runners may support one or the other or both.""" + + DESCRIPTOR: _descriptor.Descriptor + + ATTEMPTED_FIELD_NUMBER: _builtins.int + COMMITTED_FIELD_NUMBER: _builtins.int + @_builtins.property + def attempted(self) -> _containers.RepeatedCompositeFieldContainer[_metrics_pb2.MonitoringInfo]: ... + @_builtins.property + def committed(self) -> _containers.RepeatedCompositeFieldContainer[_metrics_pb2.MonitoringInfo]: ... + def __init__( + self, + *, + attempted: _abc.Iterable[_metrics_pb2.MonitoringInfo] | None = ..., + committed: _abc.Iterable[_metrics_pb2.MonitoringInfo] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["attempted", b"attempted", "committed", b"committed"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MetricResults: _TypeAlias = MetricResults # noqa: Y015 + +@_typing.final +class DescribePipelineOptionsRequest(_message.Message): + """DescribePipelineOptions provides metadata about the options supported by a runner. + It will be used by the SDK client to validate the options specified by or + list available options to the user. + Throws error GRPC_STATUS_UNAVAILABLE if server is down + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +Global___DescribePipelineOptionsRequest: _TypeAlias = DescribePipelineOptionsRequest # noqa: Y015 + +@_typing.final +class PipelineOptionType(_message.Message): + """Type for pipeline options. + Types mirror those of JSON, since that's how pipeline options are serialized. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[PipelineOptionType._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + STRING: PipelineOptionType._Enum.ValueType # 0 + BOOLEAN: PipelineOptionType._Enum.ValueType # 1 + INTEGER: PipelineOptionType._Enum.ValueType # 2 + """whole numbers, see https://json-schema.org/understanding-json-schema/reference/numeric.html""" + NUMBER: PipelineOptionType._Enum.ValueType # 3 + ARRAY: PipelineOptionType._Enum.ValueType # 4 + OBJECT: PipelineOptionType._Enum.ValueType # 5 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + STRING: PipelineOptionType.Enum.ValueType # 0 + BOOLEAN: PipelineOptionType.Enum.ValueType # 1 + INTEGER: PipelineOptionType.Enum.ValueType # 2 + """whole numbers, see https://json-schema.org/understanding-json-schema/reference/numeric.html""" + NUMBER: PipelineOptionType.Enum.ValueType # 3 + ARRAY: PipelineOptionType.Enum.ValueType # 4 + OBJECT: PipelineOptionType.Enum.ValueType # 5 + + def __init__( + self, + ) -> None: ... + +Global___PipelineOptionType: _TypeAlias = PipelineOptionType # noqa: Y015 + +@_typing.final +class PipelineOptionDescriptor(_message.Message): + """Metadata for a pipeline option.""" + + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + DESCRIPTION_FIELD_NUMBER: _builtins.int + DEFAULT_VALUE_FIELD_NUMBER: _builtins.int + GROUP_FIELD_NUMBER: _builtins.int + name: _builtins.str + """(Required) The option name.""" + type: Global___PipelineOptionType.Enum.ValueType + """(Required) Type of option.""" + description: _builtins.str + """(Optional) Description suitable for display / help text.""" + default_value: _builtins.str + """(Optional) Default value.""" + group: _builtins.str + """(Required) The group this option belongs to.""" + def __init__( + self, + *, + name: _builtins.str | None = ..., + type: Global___PipelineOptionType.Enum.ValueType | None = ..., + description: _builtins.str | None = ..., + default_value: _builtins.str | None = ..., + group: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["default_value", b"default_value", "description", b"description", "group", b"group", "name", b"name", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PipelineOptionDescriptor: _TypeAlias = PipelineOptionDescriptor # noqa: Y015 + +@_typing.final +class DescribePipelineOptionsResponse(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + OPTIONS_FIELD_NUMBER: _builtins.int + @_builtins.property + def options(self) -> _containers.RepeatedCompositeFieldContainer[Global___PipelineOptionDescriptor]: + """List of pipeline option descriptors.""" + + def __init__( + self, + *, + options: _abc.Iterable[Global___PipelineOptionDescriptor] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["options", b"options"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DescribePipelineOptionsResponse: _TypeAlias = DescribePipelineOptionsResponse # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2_grpc.py new file mode 100644 index 000000000000..cf2ada574d57 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/job_management/v1/beam_job_api_pb2_grpc.py @@ -0,0 +1,542 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from . import beam_job_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/job_management/v1/beam_job_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class JobServiceStub(object): + """Job Service for running RunnerAPI pipelines + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Prepare = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/Prepare', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobResponse.FromString, + _registered_method=True) + self.Run = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/Run', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobResponse.FromString, + _registered_method=True) + self.GetJobs = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/GetJobs', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsResponse.FromString, + _registered_method=True) + self.GetState = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/GetState', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.FromString, + _registered_method=True) + self.GetPipeline = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/GetPipeline', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineResponse.FromString, + _registered_method=True) + self.Cancel = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/Cancel', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobResponse.FromString, + _registered_method=True) + self.Drain = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/Drain', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobResponse.FromString, + _registered_method=True) + self.GetStateStream = channel.unary_stream( + '/org.apache.beam.model.job_management.v1.JobService/GetStateStream', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.FromString, + _registered_method=True) + self.GetMessageStream = channel.unary_stream( + '/org.apache.beam.model.job_management.v1.JobService/GetMessageStream', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesResponse.FromString, + _registered_method=True) + self.GetJobMetrics = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/GetJobMetrics', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsResponse.FromString, + _registered_method=True) + self.DescribePipelineOptions = channel.unary_unary( + '/org.apache.beam.model.job_management.v1.JobService/DescribePipelineOptions', + request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsRequest.SerializeToString, + response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsResponse.FromString, + _registered_method=True) + + +class JobServiceServicer(object): + """Job Service for running RunnerAPI pipelines + """ + + def Prepare(self, request, context): + """Prepare a job for execution. The job will not be executed until a call is made to run with the + returned preparationId. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Run(self, request, context): + """Submit the job for execution + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetJobs(self, request, context): + """Get a list of all invoked jobs + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetState(self, request, context): + """Get the current state of the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPipeline(self, request, context): + """Get the job's pipeline + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Cancel(self, request, context): + """Cancel the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Drain(self, request, context): + """Drain the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStateStream(self, request, context): + """Subscribe to a stream of state changes of the job, will immediately return the current state of the job as the first response. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetMessageStream(self, request, context): + """Subscribe to a stream of state changes and messages from the job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetJobMetrics(self, request, context): + """Fetch metrics for a given job + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribePipelineOptions(self, request, context): + """Get the supported pipeline options of the runner + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_JobServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Prepare': grpc.unary_unary_rpc_method_handler( + servicer.Prepare, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobResponse.SerializeToString, + ), + 'Run': grpc.unary_unary_rpc_method_handler( + servicer.Run, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobResponse.SerializeToString, + ), + 'GetJobs': grpc.unary_unary_rpc_method_handler( + servicer.GetJobs, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsResponse.SerializeToString, + ), + 'GetState': grpc.unary_unary_rpc_method_handler( + servicer.GetState, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.SerializeToString, + ), + 'GetPipeline': grpc.unary_unary_rpc_method_handler( + servicer.GetPipeline, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineResponse.SerializeToString, + ), + 'Cancel': grpc.unary_unary_rpc_method_handler( + servicer.Cancel, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobResponse.SerializeToString, + ), + 'Drain': grpc.unary_unary_rpc_method_handler( + servicer.Drain, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobResponse.SerializeToString, + ), + 'GetStateStream': grpc.unary_stream_rpc_method_handler( + servicer.GetStateStream, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.SerializeToString, + ), + 'GetMessageStream': grpc.unary_stream_rpc_method_handler( + servicer.GetMessageStream, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesResponse.SerializeToString, + ), + 'GetJobMetrics': grpc.unary_unary_rpc_method_handler( + servicer.GetJobMetrics, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsResponse.SerializeToString, + ), + 'DescribePipelineOptions': grpc.unary_unary_rpc_method_handler( + servicer.DescribePipelineOptions, + request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsRequest.FromString, + response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'org.apache.beam.model.job_management.v1.JobService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('org.apache.beam.model.job_management.v1.JobService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class JobService(object): + """Job Service for running RunnerAPI pipelines + """ + + @staticmethod + def Prepare(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/Prepare', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.PrepareJobResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Run(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/Run', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.RunJobResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetJobs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetJobs', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetState', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetPipeline(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetPipeline', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobPipelineResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Cancel(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/Cancel', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.CancelJobResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Drain(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/Drain', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DrainJobResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetStateStream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetStateStream', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobStateRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobStateEvent.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetMessageStream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetMessageStream', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.JobMessagesResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetJobMetrics(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/GetJobMetrics', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.GetJobMetricsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DescribePipelineOptions(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/org.apache.beam.model.job_management.v1.JobService/DescribePipelineOptions', + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsRequest.SerializeToString, + org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__job__api__pb2.DescribePipelineOptionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/__init__.py new file mode 100644 index 000000000000..cce3acad34a4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/__init__.py @@ -0,0 +1,16 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/__init__.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/__init__.py new file mode 100644 index 000000000000..a8b89d01c23c --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/__init__.py @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from . import beam_runner_api_pb2 +from . import beam_runner_api_pb2_grpc +from . import beam_runner_api_pb2_urns +from . import endpoints_pb2 +from . import endpoints_pb2_grpc +from . import external_transforms_pb2 +from . import external_transforms_pb2_grpc +from . import external_transforms_pb2_urns +from . import metrics_pb2 +from . import metrics_pb2_grpc +from . import metrics_pb2_urns +from . import schema_pb2 +from . import schema_pb2_grpc +from . import schema_pb2_urns +from . import standard_window_fns_pb2 +from . import standard_window_fns_pb2_grpc +from . import standard_window_fns_pb2_urns diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2.py new file mode 100644 index 000000000000..7b354825f578 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/beam_runner_api.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/beam_runner_api.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import endpoints_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_endpoints__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x12!org.apache.beam.model.pipeline.v1\x1a\x31org/apache/beam/model/pipeline/v1/endpoints.proto\x1a google/protobuf/descriptor.proto\"\xc2\x01\n\rBeamConstants\"\xb0\x01\n\tConstants\x12\x31\n\x14MIN_TIMESTAMP_MILLIS\x10\x00\x1a\x17\xaa\xb4\xfa\xc2\x05\x11-9223372036854775\x12\x30\n\x14MAX_TIMESTAMP_MILLIS\x10\x01\x1a\x16\xaa\xb4\xfa\xc2\x05\x10\x39\x32\x32\x33\x33\x37\x32\x30\x33\x36\x38\x35\x34\x37\x37\x35\x12>\n\"GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS\x10\x02\x1a\x16\xaa\xb4\xfa\xc2\x05\x10\x39\x32\x32\x33\x33\x37\x31\x39\x35\x30\x34\x35\x34\x37\x37\x35\"\xb5\x07\n\nComponents\x12Q\n\ntransforms\x18\x01 \x03(\x0b\x32=.org.apache.beam.model.pipeline.v1.Components.TransformsEntry\x12U\n\x0cpcollections\x18\x02 \x03(\x0b\x32?.org.apache.beam.model.pipeline.v1.Components.PcollectionsEntry\x12\x64\n\x14windowing_strategies\x18\x03 \x03(\x0b\x32\x46.org.apache.beam.model.pipeline.v1.Components.WindowingStrategiesEntry\x12I\n\x06\x63oders\x18\x04 \x03(\x0b\x32\x39.org.apache.beam.model.pipeline.v1.Components.CodersEntry\x12U\n\x0c\x65nvironments\x18\x05 \x03(\x0b\x32?.org.apache.beam.model.pipeline.v1.Components.EnvironmentsEntry\x1a`\n\x0fTransformsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.PTransform:\x02\x38\x01\x1a\x63\n\x11PcollectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.PCollection:\x02\x38\x01\x1ap\n\x18WindowingStrategiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.WindowingStrategy:\x02\x38\x01\x1aW\n\x0b\x43odersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.org.apache.beam.model.pipeline.v1.Coder:\x02\x38\x01\x1a\x63\n\x11\x45nvironmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.Environment:\x02\x38\x01\"\xc5\x01\n\x08Pipeline\x12\x41\n\ncomponents\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.Components\x12\x1a\n\x12root_transform_ids\x18\x02 \x03(\t\x12\x44\n\x0c\x64isplay_data\x18\x03 \x03(\x0b\x32..org.apache.beam.model.pipeline.v1.DisplayData\x12\x14\n\x0crequirements\x18\x04 \x03(\t\"\xd5\x04\n\nPTransform\x12\x13\n\x0bunique_name\x18\x05 \x01(\t\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x15\n\rsubtransforms\x18\x02 \x03(\t\x12I\n\x06inputs\x18\x03 \x03(\x0b\x32\x39.org.apache.beam.model.pipeline.v1.PTransform.InputsEntry\x12K\n\x07outputs\x18\x04 \x03(\x0b\x32:.org.apache.beam.model.pipeline.v1.PTransform.OutputsEntry\x12\x44\n\x0c\x64isplay_data\x18\x06 \x03(\x0b\x32..org.apache.beam.model.pipeline.v1.DisplayData\x12\x16\n\x0e\x65nvironment_id\x18\x07 \x01(\t\x12S\n\x0b\x61nnotations\x18\x08 \x03(\x0b\x32>.org.apache.beam.model.pipeline.v1.PTransform.AnnotationsEntry\x1a-\n\x0bInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a.\n\x0cOutputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\xdb\x11\n\x13StandardPTransforms\"\xdb\x03\n\nPrimitives\x12)\n\x06PAR_DO\x10\x00\x1a\x1d\xa2\xb4\xfa\xc2\x05\x17\x62\x65\x61m:transform:pardo:v1\x12,\n\x07\x46LATTEN\x10\x01\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:transform:flatten:v1\x12\x36\n\x0cGROUP_BY_KEY\x10\x02\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:transform:group_by_key:v1\x12,\n\x07IMPULSE\x10\x03\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:transform:impulse:v1\x12\x37\n\x0e\x41SSIGN_WINDOWS\x10\x04\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:transform:window_into:v1\x12\x33\n\x0bTEST_STREAM\x10\x05\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:transform:teststream:v1\x12\x34\n\x0bMAP_WINDOWS\x10\x06\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:transform:map_windows:v1\x12\x38\n\rMERGE_WINDOWS\x10\x07\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:transform:merge_windows:v1\x12\x30\n\tTO_STRING\x10\x08\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:transform:to_string:v1\"t\n\x14\x44\x65precatedPrimitives\x12&\n\x04READ\x10\x00\x1a\x1c\xa2\xb4\xfa\xc2\x05\x16\x62\x65\x61m:transform:read:v1\x12\x34\n\x0b\x43REATE_VIEW\x10\x01\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:transform:create_view:v1\"\x97\x05\n\nComposites\x12<\n\x0f\x43OMBINE_PER_KEY\x10\x00\x1a\'\xa2\xb4\xfa\xc2\x05!beam:transform:combine_per_key:v1\x12>\n\x10\x43OMBINE_GLOBALLY\x10\x01\x1a(\xa2\xb4\xfa\xc2\x05\"beam:transform:combine_globally:v1\x12\x30\n\tRESHUFFLE\x10\x02\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:transform:reshuffle:v1\x12\x34\n\x0bWRITE_FILES\x10\x03\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:transform:write_files:v1\x12\x34\n\x0bPUBSUB_READ\x10\x04\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:transform:pubsub_read:v1\x12\x36\n\x0cPUBSUB_WRITE\x10\x05\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:transform:pubsub_write:v1\x12\x39\n\x0fPUBSUB_WRITE_V2\x10\x07\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:transform:pubsub_write:v2\x12\x64\n#GROUP_INTO_BATCHES_WITH_SHARDED_KEY\x10\x06\x1a;\xa2\xb4\xfa\xc2\x05\x35\x62\x65\x61m:transform:group_into_batches_with_sharded_key:v1\x12\x44\n\x13REDISTRIBUTE_BY_KEY\x10\x08\x1a+\xa2\xb4\xfa\xc2\x05%beam:transform:redistribute_by_key:v1\x12N\n\x18REDISTRIBUTE_ARBITRARILY\x10\t\x1a\x30\xa2\xb4\xfa\xc2\x05*beam:transform:redistribute_arbitrarily:v1\"\xe3\x03\n\x11\x43ombineComponents\x12R\n\x1a\x43OMBINE_PER_KEY_PRECOMBINE\x10\x00\x1a\x32\xa2\xb4\xfa\xc2\x05,beam:transform:combine_per_key_precombine:v1\x12\x62\n\"COMBINE_PER_KEY_MERGE_ACCUMULATORS\x10\x01\x1a:\xa2\xb4\xfa\xc2\x05\x34\x62\x65\x61m:transform:combine_per_key_merge_accumulators:v1\x12\\\n\x1f\x43OMBINE_PER_KEY_EXTRACT_OUTPUTS\x10\x02\x1a\x37\xa2\xb4\xfa\xc2\x05\x31\x62\x65\x61m:transform:combine_per_key_extract_outputs:v1\x12J\n\x16\x43OMBINE_GROUPED_VALUES\x10\x03\x1a.\xa2\xb4\xfa\xc2\x05(beam:transform:combine_grouped_values:v1\x12l\n\'COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS\x10\x04\x1a?\xa2\xb4\xfa\xc2\x05\x39\x62\x65\x61m:transform:combine_per_key_convert_to_accumulators:v1\"\x8d\x03\n\x19SplittableParDoComponents\x12L\n\x15PAIR_WITH_RESTRICTION\x10\x00\x1a\x31\xa2\xb4\xfa\xc2\x05+beam:transform:sdf_pair_with_restriction:v1\x12X\n\x1bSPLIT_AND_SIZE_RESTRICTIONS\x10\x01\x1a\x37\xa2\xb4\xfa\xc2\x05\x31\x62\x65\x61m:transform:sdf_split_and_size_restrictions:v1\x12o\n\'PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS\x10\x02\x1a\x42\xa2\xb4\xfa\xc2\x05\n\x05\x64o_fn\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12T\n\x0bside_inputs\x18\x03 \x03(\x0b\x32?.org.apache.beam.model.pipeline.v1.ParDoPayload.SideInputsEntry\x12T\n\x0bstate_specs\x18\x04 \x03(\x0b\x32?.org.apache.beam.model.pipeline.v1.ParDoPayload.StateSpecsEntry\x12\x61\n\x12timer_family_specs\x18\t \x03(\x0b\x32\x45.org.apache.beam.model.pipeline.v1.ParDoPayload.TimerFamilySpecsEntry\x12\x1c\n\x14restriction_coder_id\x18\x07 \x01(\t\x12\x1d\n\x15requests_finalization\x18\x08 \x01(\x08\x12\"\n\x1arequires_time_sorted_input\x18\n \x01(\x08\x12\x1d\n\x15requires_stable_input\x18\x0b \x01(\x08\x12.\n&on_window_expiration_timer_family_spec\x18\x0c \x01(\t\x1a_\n\x0fSideInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.SideInput:\x02\x38\x01\x1a_\n\x0fStateSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.StateSpec:\x02\x38\x01\x1ak\n\x15TimerFamilySpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.org.apache.beam.model.pipeline.v1.TimerFamilySpec:\x02\x38\x01J\x04\x08\x06\x10\x07\"\xfa\x04\n\tStateSpec\x12]\n\x16read_modify_write_spec\x18\x01 \x01(\x0b\x32;.org.apache.beam.model.pipeline.v1.ReadModifyWriteStateSpecH\x00\x12\x43\n\x08\x62\x61g_spec\x18\x02 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.BagStateSpecH\x00\x12O\n\x0e\x63ombining_spec\x18\x03 \x01(\x0b\x32\x35.org.apache.beam.model.pipeline.v1.CombiningStateSpecH\x00\x12\x43\n\x08map_spec\x18\x04 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.MapStateSpecH\x00\x12\x43\n\x08set_spec\x18\x05 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.SetStateSpecH\x00\x12T\n\x11ordered_list_spec\x18\x06 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.OrderedListStateSpecH\x00\x12M\n\rmultimap_spec\x18\x08 \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.MultimapStateSpecH\x00\x12\x41\n\x08protocol\x18\x07 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpecB\x06\n\x04spec\",\n\x18ReadModifyWriteStateSpec\x12\x10\n\x08\x63oder_id\x18\x01 \x01(\t\"(\n\x0c\x42\x61gStateSpec\x12\x18\n\x10\x65lement_coder_id\x18\x01 \x01(\t\"0\n\x14OrderedListStateSpec\x12\x18\n\x10\x65lement_coder_id\x18\x01 \x01(\t\"w\n\x12\x43ombiningStateSpec\x12\x1c\n\x14\x61\x63\x63umulator_coder_id\x18\x01 \x01(\t\x12\x43\n\ncombine_fn\x18\x02 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\"<\n\x0cMapStateSpec\x12\x14\n\x0ckey_coder_id\x18\x01 \x01(\t\x12\x16\n\x0evalue_coder_id\x18\x02 \x01(\t\"A\n\x11MultimapStateSpec\x12\x14\n\x0ckey_coder_id\x18\x01 \x01(\t\x12\x16\n\x0evalue_coder_id\x18\x02 \x01(\t\"(\n\x0cSetStateSpec\x12\x18\n\x10\x65lement_coder_id\x18\x01 \x01(\t\"y\n\x0fTimerFamilySpec\x12G\n\x0btime_domain\x18\x01 \x01(\x0e\x32\x32.org.apache.beam.model.pipeline.v1.TimeDomain.Enum\x12\x1d\n\x15timer_family_coder_id\x18\x02 \x01(\t\"@\n\tIsBounded\"3\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\r\n\tUNBOUNDED\x10\x01\x12\x0b\n\x07\x42OUNDED\x10\x02\"\x95\x01\n\x0bReadPayload\x12?\n\x06source\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x45\n\nis_bounded\x18\x02 \x01(\x0e\x32\x31.org.apache.beam.model.pipeline.v1.IsBounded.Enum\"W\n\x11WindowIntoPayload\x12\x42\n\twindow_fn\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\"s\n\x0e\x43ombinePayload\x12\x43\n\ncombine_fn\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x1c\n\x14\x61\x63\x63umulator_coder_id\x18\x02 \x01(\t\"\xaf\x06\n\x11TestStreamPayload\x12\x10\n\x08\x63oder_id\x18\x01 \x01(\t\x12J\n\x06\x65vents\x18\x02 \x03(\x0b\x32:.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event\x12I\n\x08\x65ndpoint\x18\x03 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x1a\xae\x04\n\x05\x45vent\x12\x66\n\x0fwatermark_event\x18\x01 \x01(\x0b\x32K.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AdvanceWatermarkH\x00\x12q\n\x15processing_time_event\x18\x02 \x01(\x0b\x32P.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AdvanceProcessingTimeH\x00\x12_\n\relement_event\x18\x03 \x01(\x0b\x32\x46.org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AddElementsH\x00\x1a\x36\n\x10\x41\x64vanceWatermark\x12\x15\n\rnew_watermark\x18\x01 \x01(\x03\x12\x0b\n\x03tag\x18\x02 \x01(\t\x1a\x31\n\x15\x41\x64vanceProcessingTime\x12\x18\n\x10\x61\x64vance_duration\x18\x01 \x01(\x03\x1au\n\x0b\x41\x64\x64\x45lements\x12Y\n\x08\x65lements\x18\x01 \x03(\x0b\x32G.org.apache.beam.model.pipeline.v1.TestStreamPayload.TimestampedElement\x12\x0b\n\x03tag\x18\x03 \x01(\tB\x07\n\x05\x65vent\x1a@\n\x12TimestampedElement\x12\x17\n\x0f\x65ncoded_element\x18\x01 \x01(\x0c\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\"\xab\x03\n\x11WriteFilesPayload\x12=\n\x04sink\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12H\n\x0f\x66ormat_function\x18\x02 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x17\n\x0fwindowed_writes\x18\x03 \x01(\x08\x12\"\n\x1arunner_determined_sharding\x18\x04 \x01(\x08\x12Y\n\x0bside_inputs\x18\x05 \x03(\x0b\x32\x44.org.apache.beam.model.pipeline.v1.WriteFilesPayload.SideInputsEntry\x12\x14\n\x0c\x61uto_sharded\x18\x06 \x01(\x08\x1a_\n\x0fSideInputsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.SideInput:\x02\x38\x01\"\xcf\x01\n\x11PubSubReadPayload\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x14\n\x0csubscription\x18\x02 \x01(\t\x12\x1b\n\x13timestamp_attribute\x18\x03 \x01(\t\x12\x14\n\x0cid_attribute\x18\x04 \x01(\t\x12\x17\n\x0fwith_attributes\x18\x05 \x01(\x08\x12 \n\x18topic_runtime_overridden\x18\x06 \x01(\t\x12\'\n\x1fsubscription_runtime_overridden\x18\x07 \x01(\t\"x\n\x12PubSubWritePayload\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x1b\n\x13timestamp_attribute\x18\x02 \x01(\t\x12\x14\n\x0cid_attribute\x18\x03 \x01(\t\x12 \n\x18topic_runtime_overridden\x18\x04 \x01(\t\"n\n\x17GroupIntoBatchesPayload\x12\x12\n\nbatch_size\x18\x01 \x01(\x03\x12\x18\n\x10\x62\x61tch_size_bytes\x18\x03 \x01(\x03\x12%\n\x1dmax_buffering_duration_millis\x18\x02 \x01(\x03\"/\n\x13RedistributePayload\x12\x18\n\x10\x61llow_duplicates\x18\x01 \x01(\x08\"c\n\x05\x43oder\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x1b\n\x13\x63omponent_coder_ids\x18\x02 \x03(\t\"\x9d\x07\n\x0eStandardCoders\"\x8a\x07\n\x04\x45num\x12$\n\x05\x42YTES\x10\x00\x1a\x19\xa2\xb4\xfa\xc2\x05\x13\x62\x65\x61m:coder:bytes:v1\x12\x30\n\x0bSTRING_UTF8\x10\n\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:coder:string_utf8:v1\x12\x1e\n\x02KV\x10\x01\x1a\x16\xa2\xb4\xfa\xc2\x05\x10\x62\x65\x61m:coder:kv:v1\x12\"\n\x04\x42OOL\x10\x0c\x1a\x18\xa2\xb4\xfa\xc2\x05\x12\x62\x65\x61m:coder:bool:v1\x12&\n\x06VARINT\x10\x02\x1a\x1a\xa2\xb4\xfa\xc2\x05\x14\x62\x65\x61m:coder:varint:v1\x12&\n\x06\x44OUBLE\x10\x0b\x1a\x1a\xa2\xb4\xfa\xc2\x05\x14\x62\x65\x61m:coder:double:v1\x12*\n\x08ITERABLE\x10\x03\x1a\x1c\xa2\xb4\xfa\xc2\x05\x16\x62\x65\x61m:coder:iterable:v1\x12$\n\x05TIMER\x10\x04\x1a\x19\xa2\xb4\xfa\xc2\x05\x13\x62\x65\x61m:coder:timer:v1\x12\x38\n\x0fINTERVAL_WINDOW\x10\x05\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:coder:interval_window:v1\x12\x34\n\rLENGTH_PREFIX\x10\x06\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:coder:length_prefix:v1\x12\x34\n\rGLOBAL_WINDOW\x10\x07\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:coder:global_window:v1\x12\x36\n\x0eWINDOWED_VALUE\x10\x08\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:coder:windowed_value:v1\x12\x42\n\x14PARAM_WINDOWED_VALUE\x10\x0e\x1a(\xa2\xb4\xfa\xc2\x05\"beam:coder:param_windowed_value:v1\x12\x44\n\x15STATE_BACKED_ITERABLE\x10\t\x1a)\xa2\xb4\xfa\xc2\x05#beam:coder:state_backed_iterable:v1\x12\x34\n\rCUSTOM_WINDOW\x10\x10\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:coder:custom_window:v1\x12 \n\x03ROW\x10\r\x1a\x17\xa2\xb4\xfa\xc2\x05\x11\x62\x65\x61m:coder:row:v1\x12&\n\x06SCHEMA\x10\x12\x1a\x1a\xa2\xb4\xfa\xc2\x05\x14\x62\x65\x61m:coder:schema:v1\x12\x30\n\x0bSHARDED_KEY\x10\x0f\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:coder:sharded_key:v1\x12*\n\x08NULLABLE\x10\x11\x1a\x1c\xa2\xb4\xfa\xc2\x05\x16\x62\x65\x61m:coder:nullable:v1\"\x8c\x05\n\x11WindowingStrategy\x12\x42\n\twindow_fn\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12I\n\x0cmerge_status\x18\x02 \x01(\x0e\x32\x33.org.apache.beam.model.pipeline.v1.MergeStatus.Enum\x12\x17\n\x0fwindow_coder_id\x18\x03 \x01(\t\x12;\n\x07trigger\x18\x04 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x12S\n\x11\x61\x63\x63umulation_mode\x18\x05 \x01(\x0e\x32\x38.org.apache.beam.model.pipeline.v1.AccumulationMode.Enum\x12G\n\x0boutput_time\x18\x06 \x01(\x0e\x32\x32.org.apache.beam.model.pipeline.v1.OutputTime.Enum\x12Q\n\x10\x63losing_behavior\x18\x07 \x01(\x0e\x32\x37.org.apache.beam.model.pipeline.v1.ClosingBehavior.Enum\x12\x18\n\x10\x61llowed_lateness\x18\x08 \x01(\x03\x12P\n\x10on_time_behavior\x18\t \x01(\x0e\x32\x36.org.apache.beam.model.pipeline.v1.OnTimeBehavior.Enum\x12\x1d\n\x15\x61ssigns_to_one_window\x18\n \x01(\x08\x12\x16\n\x0e\x65nvironment_id\x18\x0b \x01(\t\"\\\n\x0bMergeStatus\"M\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0f\n\x0bNON_MERGING\x10\x01\x12\x0f\n\x0bNEEDS_MERGE\x10\x02\x12\x12\n\x0e\x41LREADY_MERGED\x10\x03\"]\n\x10\x41\x63\x63umulationMode\"I\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nDISCARDING\x10\x01\x12\x10\n\x0c\x41\x43\x43UMULATING\x10\x02\x12\x0e\n\nRETRACTING\x10\x03\"Q\n\x0f\x43losingBehavior\">\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45MIT_ALWAYS\x10\x01\x12\x14\n\x10\x45MIT_IF_NONEMPTY\x10\x02\"P\n\x0eOnTimeBehavior\">\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46IRE_ALWAYS\x10\x01\x12\x14\n\x10\x46IRE_IF_NONEMPTY\x10\x02\"b\n\nOutputTime\"T\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x11\n\rEND_OF_WINDOW\x10\x01\x12\x12\n\x0eLATEST_IN_PANE\x10\x02\x12\x14\n\x10\x45\x41RLIEST_IN_PANE\x10\x03\"n\n\nTimeDomain\"`\n\x04\x45num\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nEVENT_TIME\x10\x01\x12\x13\n\x0fPROCESSING_TIME\x10\x02\"\x04\x08\x03\x10\x03*\x1cSYNCHRONIZED_PROCESSING_TIME\"\x82\x0e\n\x07Trigger\x12H\n\tafter_all\x18\x01 \x01(\x0b\x32\x33.org.apache.beam.model.pipeline.v1.Trigger.AfterAllH\x00\x12H\n\tafter_any\x18\x02 \x01(\x0b\x32\x33.org.apache.beam.model.pipeline.v1.Trigger.AfterAnyH\x00\x12J\n\nafter_each\x18\x03 \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.Trigger.AfterEachH\x00\x12Z\n\x13\x61\x66ter_end_of_window\x18\x04 \x01(\x0b\x32;.org.apache.beam.model.pipeline.v1.Trigger.AfterEndOfWindowH\x00\x12_\n\x15\x61\x66ter_processing_time\x18\x05 \x01(\x0b\x32>.org.apache.beam.model.pipeline.v1.Trigger.AfterProcessingTimeH\x00\x12x\n\"after_synchronized_processing_time\x18\x06 \x01(\x0b\x32J.org.apache.beam.model.pipeline.v1.Trigger.AfterSynchronizedProcessingTimeH\x00\x12\x43\n\x06\x61lways\x18\x0c \x01(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.Trigger.AlwaysH\x00\x12\x45\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\x0b\x32\x32.org.apache.beam.model.pipeline.v1.Trigger.DefaultH\x00\x12P\n\relement_count\x18\x08 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.Trigger.ElementCountH\x00\x12\x41\n\x05never\x18\t \x01(\x0b\x32\x30.org.apache.beam.model.pipeline.v1.Trigger.NeverH\x00\x12J\n\nor_finally\x18\n \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.Trigger.OrFinallyH\x00\x12\x43\n\x06repeat\x18\x0b \x01(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.Trigger.RepeatH\x00\x1aK\n\x08\x41\x66terAll\x12?\n\x0bsubtriggers\x18\x01 \x03(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x1aK\n\x08\x41\x66terAny\x12?\n\x0bsubtriggers\x18\x01 \x03(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x1aL\n\tAfterEach\x12?\n\x0bsubtriggers\x18\x01 \x03(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x1a\x97\x01\n\x10\x41\x66terEndOfWindow\x12\x41\n\rearly_firings\x18\x01 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x12@\n\x0clate_firings\x18\x02 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x1aj\n\x13\x41\x66terProcessingTime\x12S\n\x14timestamp_transforms\x18\x01 \x03(\x0b\x32\x35.org.apache.beam.model.pipeline.v1.TimestampTransform\x1a!\n\x1f\x41\x66terSynchronizedProcessingTime\x1a\t\n\x07\x44\x65\x66\x61ult\x1a%\n\x0c\x45lementCount\x12\x15\n\relement_count\x18\x01 \x01(\x05\x1a\x07\n\x05Never\x1a\x08\n\x06\x41lways\x1a\x82\x01\n\tOrFinally\x12\x38\n\x04main\x18\x01 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x12;\n\x07\x66inally\x18\x02 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.Trigger\x1aH\n\x06Repeat\x12>\n\nsubtrigger\x18\x01 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.TriggerB\t\n\x07trigger\"\x96\x02\n\x12TimestampTransform\x12L\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32;.org.apache.beam.model.pipeline.v1.TimestampTransform.DelayH\x00\x12Q\n\x08\x61lign_to\x18\x02 \x01(\x0b\x32=.org.apache.beam.model.pipeline.v1.TimestampTransform.AlignToH\x00\x1a\x1d\n\x05\x44\x65lay\x12\x14\n\x0c\x64\x65lay_millis\x18\x01 \x01(\x03\x1a)\n\x07\x41lignTo\x12\x0e\n\x06period\x18\x03 \x01(\x03\x12\x0e\n\x06offset\x18\x04 \x01(\x03\x42\x15\n\x13timestamp_transform\"\xe2\x01\n\tSideInput\x12G\n\x0e\x61\x63\x63\x65ss_pattern\x18\x01 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12@\n\x07view_fn\x18\x02 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12J\n\x11window_mapping_fn\x18\x03 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\"\x89\x04\n\x11StandardArtifacts\"\x9f\x02\n\x05Types\x12*\n\x04\x46ILE\x10\x00\x1a \xa2\xb4\xfa\xc2\x05\x1a\x62\x65\x61m:artifact:type:file:v1\x12(\n\x03URL\x10\x01\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:artifact:type:url:v1\x12\x32\n\x08\x45MBEDDED\x10\x02\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:artifact:type:embedded:v1\x12*\n\x04PYPI\x10\x03\x1a \xa2\xb4\xfa\xc2\x05\x1a\x62\x65\x61m:artifact:type:pypi:v1\x12,\n\x05MAVEN\x10\x04\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:artifact:type:maven:v1\x12\x32\n\x08\x44\x45\x46\x45RRED\x10\x05\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:artifact:type:deferred:v1\"\xd1\x01\n\x05Roles\x12\x36\n\nSTAGING_TO\x10\x00\x1a&\xa2\xb4\xfa\xc2\x05 beam:artifact:role:staging_to:v1\x12L\n\x15PIP_REQUIREMENTS_FILE\x10\x01\x1a\x31\xa2\xb4\xfa\xc2\x05+beam:artifact:role:pip_requirements_file:v1\x12\x42\n\x10GO_WORKER_BINARY\x10\x02\x1a,\xa2\xb4\xfa\xc2\x05&beam:artifact:role:go_worker_binary:v1\"3\n\x13\x41rtifactFilePayload\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0e\n\x06sha256\x18\x02 \x01(\t\"1\n\x12\x41rtifactUrlPayload\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06sha256\x18\x02 \x01(\t\"#\n\x13\x45mbeddedFilePayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"3\n\x0bPyPIPayload\x12\x13\n\x0b\x61rtifact_id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"8\n\x0cMavenPayload\x12\x10\n\x08\x61rtifact\x18\x01 \x01(\t\x12\x16\n\x0erepository_url\x18\x02 \x01(\t\"4\n\x17\x44\x65\x66\x65rredArtifactPayload\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"3\n\x1c\x41rtifactStagingToRolePayload\x12\x13\n\x0bstaged_name\x18\x01 \x01(\t\"e\n\x13\x41rtifactInformation\x12\x10\n\x08type_urn\x18\x01 \x01(\t\x12\x14\n\x0ctype_payload\x18\x02 \x01(\x0c\x12\x10\n\x08role_urn\x18\x03 \x01(\t\x12\x14\n\x0crole_payload\x18\x04 \x01(\x0c\"\xec\x02\n\x0b\x45nvironment\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x44\n\x0c\x64isplay_data\x18\x04 \x03(\x0b\x32..org.apache.beam.model.pipeline.v1.DisplayData\x12\x14\n\x0c\x63\x61pabilities\x18\x05 \x03(\t\x12L\n\x0c\x64\x65pendencies\x18\x06 \x03(\x0b\x32\x36.org.apache.beam.model.pipeline.v1.ArtifactInformation\x12Y\n\x0eresource_hints\x18\x07 \x03(\x0b\x32\x41.org.apache.beam.model.pipeline.v1.Environment.ResourceHintsEntry\x1a\x34\n\x12ResourceHintsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01J\x04\x08\x01\x10\x02\"\xeb\x01\n\x14StandardEnvironments\"\xd2\x01\n\x0c\x45nvironments\x12$\n\x06\x44OCKER\x10\x00\x1a\x18\xa2\xb4\xfa\xc2\x05\x12\x62\x65\x61m:env:docker:v1\x12&\n\x07PROCESS\x10\x01\x1a\x19\xa2\xb4\xfa\xc2\x05\x13\x62\x65\x61m:env:process:v1\x12(\n\x08\x45XTERNAL\x10\x02\x1a\x1a\xa2\xb4\xfa\xc2\x05\x14\x62\x65\x61m:env:external:v1\x12&\n\x07\x44\x45\x46\x41ULT\x10\x03\x1a\x19\xa2\xb4\xfa\xc2\x05\x13\x62\x65\x61m:env:default:v1\x12\"\n\x05\x41NYOF\x10\x04\x1a\x17\xa2\xb4\xfa\xc2\x05\x11\x62\x65\x61m:env:anyof:v1\"(\n\rDockerPayload\x12\x17\n\x0f\x63ontainer_image\x18\x01 \x01(\t\"\xb0\x01\n\x0eProcessPayload\x12\n\n\x02os\x18\x01 \x01(\t\x12\x0c\n\x04\x61rch\x18\x02 \x01(\t\x12\x0f\n\x07\x63ommand\x18\x03 \x01(\t\x12G\n\x03\x65nv\x18\x04 \x03(\x0b\x32:.org.apache.beam.model.pipeline.v1.ProcessPayload.EnvEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdb\x01\n\x0f\x45xternalPayload\x12I\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x37.org.apache.beam.model.pipeline.v1.ApiServiceDescriptor\x12N\n\x06params\x18\x02 \x03(\x0b\x32>.org.apache.beam.model.pipeline.v1.ExternalPayload.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x17\x41nyOfEnvironmentPayload\x12\x44\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32..org.apache.beam.model.pipeline.v1.Environment\"\xac\x07\n\x11StandardProtocols\"\x96\x07\n\x04\x45num\x12H\n\x19LEGACY_PROGRESS_REPORTING\x10\x00\x1a)\xa2\xb4\xfa\xc2\x05#beam:protocol:progress_reporting:v0\x12\x41\n\x12PROGRESS_REPORTING\x10\x01\x1a)\xa2\xb4\xfa\xc2\x05#beam:protocol:progress_reporting:v1\x12\x37\n\rWORKER_STATUS\x10\x02\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:protocol:worker_status:v1\x12U\n\x1cMULTI_CORE_BUNDLE_PROCESSING\x10\x03\x1a\x33\xa2\xb4\xfa\xc2\x05-beam:protocol:multi_core_bundle_processing:v1\x12;\n\x0fSIBLING_WORKERS\x10\x05\x1a&\xa2\xb4\xfa\xc2\x05 beam:protocol:sibling_workers:v1\x12M\n\x18HARNESS_MONITORING_INFOS\x10\x04\x1a/\xa2\xb4\xfa\xc2\x05)beam:protocol:harness_monitoring_infos:v1\x12\x61\n\"CONTROL_REQUEST_ELEMENTS_EMBEDDING\x10\x06\x1a\x39\xa2\xb4\xfa\xc2\x05\x33\x62\x65\x61m:protocol:control_request_elements_embedding:v1\x12\x37\n\rSTATE_CACHING\x10\x07\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:protocol:state_caching:v1\x12\x37\n\rDATA_SAMPLING\x10\x08\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:protocol:data_sampling:v1\x12S\n\x1bSDK_CONSUMING_RECEIVED_DATA\x10\t\x1a\x32\xa2\xb4\xfa\xc2\x05,beam:protocol:sdk_consuming_received_data:v1\x12\x41\n\x12ORDERED_LIST_STATE\x10\n\x1a)\xa2\xb4\xfa\xc2\x05#beam:protocol:ordered_list_state:v1\x12=\n\x10\x45LEMENT_METADATA\x10\x0b\x1a\'\xa2\xb4\xfa\xc2\x05!beam:protocol:element_metadata:v1\x12\x39\n\x0eMULTIMAP_STATE\x10\x0c\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:protocol:multimap_state:v1\"\xb5\x02\n\x17StandardRunnerProtocols\"\x99\x02\n\x04\x45num\x12O\n\x19MONITORING_INFO_SHORT_IDS\x10\x00\x1a\x30\xa2\xb4\xfa\xc2\x05*beam:protocol:monitoring_info_short_ids:v1\x12\x63\n#CONTROL_RESPONSE_ELEMENTS_EMBEDDING\x10\x06\x1a:\xa2\xb4\xfa\xc2\x05\x34\x62\x65\x61m:protocol:control_response_elements_embedding:v1\x12[\n\x1fMULTIMAP_KEYS_VALUES_SIDE_INPUT\x10\x07\x1a\x36\xa2\xb4\xfa\xc2\x05\x30\x62\x65\x61m:protocol:multimap_keys_values_side_input:v1\"\xff\x03\n\x14StandardRequirements\"\xe6\x03\n\x04\x45num\x12J\n\x1cREQUIRES_STATEFUL_PROCESSING\x10\x00\x1a(\xa2\xb4\xfa\xc2\x05\"beam:requirement:pardo:stateful:v1\x12N\n\x1cREQUIRES_BUNDLE_FINALIZATION\x10\x01\x1a,\xa2\xb4\xfa\xc2\x05&beam:requirement:pardo:finalization:v1\x12G\n\x15REQUIRES_STABLE_INPUT\x10\x02\x1a,\xa2\xb4\xfa\xc2\x05&beam:requirement:pardo:stable_input:v1\x12Q\n\x1aREQUIRES_TIME_SORTED_INPUT\x10\x03\x1a\x31\xa2\xb4\xfa\xc2\x05+beam:requirement:pardo:time_sorted_input:v1\x12M\n\x18REQUIRES_SPLITTABLE_DOFN\x10\x04\x1a/\xa2\xb4\xfa\xc2\x05)beam:requirement:pardo:splittable_dofn:v1\x12W\n\x1dREQUIRES_ON_WINDOW_EXPIRATION\x10\x05\x1a\x34\xa2\xb4\xfa\xc2\x05.beam:requirement:pardo:on_window_expiration:v1\",\n\x0c\x46unctionSpec\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\"W\n\x13StandardDisplayData\"@\n\x0b\x44isplayData\x12\x31\n\x08LABELLED\x10\x00\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:display_data:labelled:v1\"\xa4\x01\n\x0fLabelledPayload\x12\r\n\x05label\x18\x01 \x01(\t\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x13\n\tint_value\x18\x05 \x01(\x03H\x00\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x11\n\tnamespace\x18\x07 \x01(\tB\x07\n\x05value\"+\n\x0b\x44isplayData\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"\xc1\x06\n\x15MessageWithComponents\x12\x41\n\ncomponents\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.Components\x12\x39\n\x05\x63oder\x18\x02 \x01(\x0b\x32(.org.apache.beam.model.pipeline.v1.CoderH\x00\x12L\n\x0f\x63ombine_payload\x18\x03 \x01(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.CombinePayloadH\x00\x12H\n\rfunction_spec\x18\x04 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpecH\x00\x12I\n\x0epar_do_payload\x18\x06 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.ParDoPayloadH\x00\x12\x43\n\nptransform\x18\x07 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.PTransformH\x00\x12\x45\n\x0bpcollection\x18\x08 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.PCollectionH\x00\x12\x46\n\x0cread_payload\x18\t \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.ReadPayloadH\x00\x12\x42\n\nside_input\x18\x0b \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.SideInputH\x00\x12S\n\x13window_into_payload\x18\x0c \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.WindowIntoPayloadH\x00\x12R\n\x12windowing_strategy\x18\r \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.WindowingStrategyH\x00\x42\x06\n\x04root\"\xb9\x08\n\x16\x45xecutableStagePayload\x12\x43\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.Environment\x12g\n\x13wire_coder_settings\x18\t \x03(\x0b\x32J.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.WireCoderSetting\x12\r\n\x05input\x18\x02 \x01(\t\x12Z\n\x0bside_inputs\x18\x03 \x03(\x0b\x32\x45.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.SideInputId\x12\x12\n\ntransforms\x18\x04 \x03(\t\x12\x0f\n\x07outputs\x18\x05 \x03(\t\x12\x41\n\ncomponents\x18\x06 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.Components\x12Z\n\x0buser_states\x18\x07 \x03(\x0b\x32\x45.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.UserStateId\x12Q\n\x06timers\x18\x08 \x03(\x0b\x32\x41.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.TimerId\x12^\n\rtimerFamilies\x18\n \x03(\x0b\x32G.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.TimerFamilyId\x1a\x37\n\x0bSideInputId\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x12\n\nlocal_name\x18\x02 \x01(\t\x1a\x37\n\x0bUserStateId\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x12\n\nlocal_name\x18\x02 \x01(\t\x1a\x33\n\x07TimerId\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x12\n\nlocal_name\x18\x02 \x01(\t\x1a\x39\n\rTimerFamilyId\x12\x14\n\x0ctransform_id\x18\x01 \x01(\t\x12\x12\n\nlocal_name\x18\x02 \x01(\t\x1a\xac\x01\n\x10WireCoderSetting\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x12input_or_output_id\x18\x03 \x01(\tH\x00\x12R\n\x05timer\x18\x04 \x01(\x0b\x32\x41.org.apache.beam.model.pipeline.v1.ExecutableStagePayload.TimerIdH\x00\x42\x08\n\x06target\"\x9c\x02\n\x15StandardResourceHints\"\x82\x02\n\x04\x45num\x12\x34\n\x0b\x41\x43\x43\x45LERATOR\x10\x00\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:resources:accelerator:v1\x12\x38\n\rMIN_RAM_BYTES\x10\x01\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:resources:min_ram_bytes:v1\x12\x30\n\tCPU_COUNT\x10\x02\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:resources:cpu_count:v1\x12X\n\x1dMAX_ACTIVE_BUNDLES_PER_WORKER\x10\x03\x1a\x35\xa2\xb4\xfa\xc2\x05/beam:resources:max_active_bundles_per_worker:v1:6\n\x08\x62\x65\x61m_urn\x12!.google.protobuf.EnumValueOptions\x18\xc4\xa6\xafX \x01(\t:;\n\rbeam_constant\x12!.google.protobuf.EnumValueOptions\x18\xc5\xa6\xafX \x01(\tBx\n!org.apache.beam.model.pipeline.v1B\tRunnerApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.beam_runner_api_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\tRunnerApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["MIN_TIMESTAMP_MILLIS"]._loaded_options = None + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["MIN_TIMESTAMP_MILLIS"]._serialized_options = b'\252\264\372\302\005\021-9223372036854775' + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["MAX_TIMESTAMP_MILLIS"]._loaded_options = None + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["MAX_TIMESTAMP_MILLIS"]._serialized_options = b'\252\264\372\302\005\0209223372036854775' + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS"]._loaded_options = None + _globals['_BEAMCONSTANTS_CONSTANTS'].values_by_name["GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS"]._serialized_options = b'\252\264\372\302\005\0209223371950454775' + _globals['_COMPONENTS_TRANSFORMSENTRY']._loaded_options = None + _globals['_COMPONENTS_TRANSFORMSENTRY']._serialized_options = b'8\001' + _globals['_COMPONENTS_PCOLLECTIONSENTRY']._loaded_options = None + _globals['_COMPONENTS_PCOLLECTIONSENTRY']._serialized_options = b'8\001' + _globals['_COMPONENTS_WINDOWINGSTRATEGIESENTRY']._loaded_options = None + _globals['_COMPONENTS_WINDOWINGSTRATEGIESENTRY']._serialized_options = b'8\001' + _globals['_COMPONENTS_CODERSENTRY']._loaded_options = None + _globals['_COMPONENTS_CODERSENTRY']._serialized_options = b'8\001' + _globals['_COMPONENTS_ENVIRONMENTSENTRY']._loaded_options = None + _globals['_COMPONENTS_ENVIRONMENTSENTRY']._serialized_options = b'8\001' + _globals['_PTRANSFORM_INPUTSENTRY']._loaded_options = None + _globals['_PTRANSFORM_INPUTSENTRY']._serialized_options = b'8\001' + _globals['_PTRANSFORM_OUTPUTSENTRY']._loaded_options = None + _globals['_PTRANSFORM_OUTPUTSENTRY']._serialized_options = b'8\001' + _globals['_PTRANSFORM_ANNOTATIONSENTRY']._loaded_options = None + _globals['_PTRANSFORM_ANNOTATIONSENTRY']._serialized_options = b'8\001' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["PAR_DO"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["PAR_DO"]._serialized_options = b'\242\264\372\302\005\027beam:transform:pardo:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["FLATTEN"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["FLATTEN"]._serialized_options = b'\242\264\372\302\005\031beam:transform:flatten:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["GROUP_BY_KEY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["GROUP_BY_KEY"]._serialized_options = b'\242\264\372\302\005\036beam:transform:group_by_key:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["IMPULSE"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["IMPULSE"]._serialized_options = b'\242\264\372\302\005\031beam:transform:impulse:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["ASSIGN_WINDOWS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["ASSIGN_WINDOWS"]._serialized_options = b'\242\264\372\302\005\035beam:transform:window_into:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["TEST_STREAM"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["TEST_STREAM"]._serialized_options = b'\242\264\372\302\005\034beam:transform:teststream:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["MAP_WINDOWS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["MAP_WINDOWS"]._serialized_options = b'\242\264\372\302\005\035beam:transform:map_windows:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["MERGE_WINDOWS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["MERGE_WINDOWS"]._serialized_options = b'\242\264\372\302\005\037beam:transform:merge_windows:v1' + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["TO_STRING"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_PRIMITIVES'].values_by_name["TO_STRING"]._serialized_options = b'\242\264\372\302\005\033beam:transform:to_string:v1' + _globals['_STANDARDPTRANSFORMS_DEPRECATEDPRIMITIVES'].values_by_name["READ"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_DEPRECATEDPRIMITIVES'].values_by_name["READ"]._serialized_options = b'\242\264\372\302\005\026beam:transform:read:v1' + _globals['_STANDARDPTRANSFORMS_DEPRECATEDPRIMITIVES'].values_by_name["CREATE_VIEW"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_DEPRECATEDPRIMITIVES'].values_by_name["CREATE_VIEW"]._serialized_options = b'\242\264\372\302\005\035beam:transform:create_view:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["COMBINE_PER_KEY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["COMBINE_PER_KEY"]._serialized_options = b'\242\264\372\302\005!beam:transform:combine_per_key:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["COMBINE_GLOBALLY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["COMBINE_GLOBALLY"]._serialized_options = b'\242\264\372\302\005\"beam:transform:combine_globally:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["RESHUFFLE"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["RESHUFFLE"]._serialized_options = b'\242\264\372\302\005\033beam:transform:reshuffle:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["WRITE_FILES"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["WRITE_FILES"]._serialized_options = b'\242\264\372\302\005\035beam:transform:write_files:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_READ"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_READ"]._serialized_options = b'\242\264\372\302\005\035beam:transform:pubsub_read:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_WRITE"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_WRITE"]._serialized_options = b'\242\264\372\302\005\036beam:transform:pubsub_write:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_WRITE_V2"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["PUBSUB_WRITE_V2"]._serialized_options = b'\242\264\372\302\005\036beam:transform:pubsub_write:v2' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["GROUP_INTO_BATCHES_WITH_SHARDED_KEY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["GROUP_INTO_BATCHES_WITH_SHARDED_KEY"]._serialized_options = b'\242\264\372\302\0055beam:transform:group_into_batches_with_sharded_key:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["REDISTRIBUTE_BY_KEY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["REDISTRIBUTE_BY_KEY"]._serialized_options = b'\242\264\372\302\005%beam:transform:redistribute_by_key:v1' + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["REDISTRIBUTE_ARBITRARILY"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMPOSITES'].values_by_name["REDISTRIBUTE_ARBITRARILY"]._serialized_options = b'\242\264\372\302\005*beam:transform:redistribute_arbitrarily:v1' + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_PRECOMBINE"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_PRECOMBINE"]._serialized_options = b'\242\264\372\302\005,beam:transform:combine_per_key_precombine:v1' + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_MERGE_ACCUMULATORS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_MERGE_ACCUMULATORS"]._serialized_options = b'\242\264\372\302\0054beam:transform:combine_per_key_merge_accumulators:v1' + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_EXTRACT_OUTPUTS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_EXTRACT_OUTPUTS"]._serialized_options = b'\242\264\372\302\0051beam:transform:combine_per_key_extract_outputs:v1' + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_GROUPED_VALUES"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_GROUPED_VALUES"]._serialized_options = b'\242\264\372\302\005(beam:transform:combine_grouped_values:v1' + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_COMBINECOMPONENTS'].values_by_name["COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS"]._serialized_options = b'\242\264\372\302\0059beam:transform:combine_per_key_convert_to_accumulators:v1' + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["PAIR_WITH_RESTRICTION"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["PAIR_WITH_RESTRICTION"]._serialized_options = b'\242\264\372\302\005+beam:transform:sdf_pair_with_restriction:v1' + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["SPLIT_AND_SIZE_RESTRICTIONS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["SPLIT_AND_SIZE_RESTRICTIONS"]._serialized_options = b'\242\264\372\302\0051beam:transform:sdf_split_and_size_restrictions:v1' + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS"]._loaded_options = None + _globals['_STANDARDPTRANSFORMS_SPLITTABLEPARDOCOMPONENTS'].values_by_name["PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS"]._serialized_options = b'\242\264\372\302\005= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class BeamConstants(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Constants: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _ConstantsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[BeamConstants._Constants.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + MIN_TIMESTAMP_MILLIS: BeamConstants._Constants.ValueType # 0 + """All timestamps of elements or window boundaries must be within + the interval [MIN_TIMESTAMP_MILLIS, MAX_TIMESTAMP_MILLIS]. + The smallest representable timestamp of an element or a window boundary. + """ + MAX_TIMESTAMP_MILLIS: BeamConstants._Constants.ValueType # 1 + """The largest representable timestamp of an element or a window boundary.""" + GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS: BeamConstants._Constants.ValueType # 2 + """The maximum timestamp for the global window. + Triggers use max timestamp to set timers' timestamp. Timers fire when + the watermark passes their timestamps. So, the timestamp needs to be + smaller than the MAX_TIMESTAMP_MILLIS. + One standard day is subtracted from MAX_TIMESTAMP_MILLIS to make sure + the max timestamp is smaller than MAX_TIMESTAMP_MILLIS even after rounding up + to seconds or minutes. + """ + + class Constants(_Constants, metaclass=_ConstantsEnumTypeWrapper): + """All timestamps in milliseconds since Jan 1, 1970.""" + + MIN_TIMESTAMP_MILLIS: BeamConstants.Constants.ValueType # 0 + """All timestamps of elements or window boundaries must be within + the interval [MIN_TIMESTAMP_MILLIS, MAX_TIMESTAMP_MILLIS]. + The smallest representable timestamp of an element or a window boundary. + """ + MAX_TIMESTAMP_MILLIS: BeamConstants.Constants.ValueType # 1 + """The largest representable timestamp of an element or a window boundary.""" + GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS: BeamConstants.Constants.ValueType # 2 + """The maximum timestamp for the global window. + Triggers use max timestamp to set timers' timestamp. Timers fire when + the watermark passes their timestamps. So, the timestamp needs to be + smaller than the MAX_TIMESTAMP_MILLIS. + One standard day is subtracted from MAX_TIMESTAMP_MILLIS to make sure + the max timestamp is smaller than MAX_TIMESTAMP_MILLIS even after rounding up + to seconds or minutes. + """ + + def __init__( + self, + ) -> None: ... + +Global___BeamConstants: _TypeAlias = BeamConstants # noqa: Y015 + +@_typing.final +class Components(_message.Message): + """A set of mappings from id to message. This is included as an optional field + on any proto message that may contain references needing resolution. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class TransformsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___PTransform: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___PTransform | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class PcollectionsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___PCollection: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___PCollection | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class WindowingStrategiesEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___WindowingStrategy: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___WindowingStrategy | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class CodersEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___Coder: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___Coder | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class EnvironmentsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___Environment: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___Environment | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + TRANSFORMS_FIELD_NUMBER: _builtins.int + PCOLLECTIONS_FIELD_NUMBER: _builtins.int + WINDOWING_STRATEGIES_FIELD_NUMBER: _builtins.int + CODERS_FIELD_NUMBER: _builtins.int + ENVIRONMENTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def transforms(self) -> _containers.MessageMap[_builtins.str, Global___PTransform]: + """(Required) A map from pipeline-scoped id to PTransform. + + Keys of the transforms map may be used by runners to identify pipeline + steps. Hence it's recommended to use strings that are not too long that + match regex '[A-Za-z0-9-_]+'. + """ + + @_builtins.property + def pcollections(self) -> _containers.MessageMap[_builtins.str, Global___PCollection]: + """(Required) A map from pipeline-scoped id to PCollection.""" + + @_builtins.property + def windowing_strategies(self) -> _containers.MessageMap[_builtins.str, Global___WindowingStrategy]: + """(Required) A map from pipeline-scoped id to WindowingStrategy.""" + + @_builtins.property + def coders(self) -> _containers.MessageMap[_builtins.str, Global___Coder]: + """(Required) A map from pipeline-scoped id to Coder.""" + + @_builtins.property + def environments(self) -> _containers.MessageMap[_builtins.str, Global___Environment]: + """(Required) A map from pipeline-scoped id to Environment.""" + + def __init__( + self, + *, + transforms: _abc.Mapping[_builtins.str, Global___PTransform] | None = ..., + pcollections: _abc.Mapping[_builtins.str, Global___PCollection] | None = ..., + windowing_strategies: _abc.Mapping[_builtins.str, Global___WindowingStrategy] | None = ..., + coders: _abc.Mapping[_builtins.str, Global___Coder] | None = ..., + environments: _abc.Mapping[_builtins.str, Global___Environment] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coders", b"coders", "environments", b"environments", "pcollections", b"pcollections", "transforms", b"transforms", "windowing_strategies", b"windowing_strategies"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Components: _TypeAlias = Components # noqa: Y015 + +@_typing.final +class Pipeline(_message.Message): + """A Pipeline is a hierarchical graph of PTransforms, linked + by PCollections. A typical graph may look like: + + Impulse -> PCollection -> ParDo -> PCollection -> GroupByKey -> ... + \\> PCollection -> ParDo -> ... + \\> ParDo -> ... + Impulse -> PCollection -> ParDo -> PCollection -> ... + + This is represented by a number of by-reference maps to transforms, + PCollections, SDK environments, coders, etc., for + supporting compact reuse and arbitrary graph structure. + """ + + DESCRIPTOR: _descriptor.Descriptor + + COMPONENTS_FIELD_NUMBER: _builtins.int + ROOT_TRANSFORM_IDS_FIELD_NUMBER: _builtins.int + DISPLAY_DATA_FIELD_NUMBER: _builtins.int + REQUIREMENTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def components(self) -> Global___Components: + """(Required) The coders, UDFs, graph nodes, etc, that make up + this pipeline. + """ + + @_builtins.property + def root_transform_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Required) The ids of all PTransforms that are not contained within another + PTransform. These must be in shallow topological order, so that traversing + them recursively in this order yields a recursively topological traversal. + """ + + @_builtins.property + def display_data(self) -> _containers.RepeatedCompositeFieldContainer[Global___DisplayData]: + """(Optional) Static display data for the pipeline. If there is none, + it may be omitted. + """ + + @_builtins.property + def requirements(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Optional) A set of requirements that the runner MUST understand and be + able to faithfully provide in order to execute this pipeline. These + may indicate that a runner must inspect new fields on a component or + provide additional guarantees when processing specific transforms. + A runner should reject any pipelines with unknown requirements. + """ + + def __init__( + self, + *, + components: Global___Components | None = ..., + root_transform_ids: _abc.Iterable[_builtins.str] | None = ..., + display_data: _abc.Iterable[Global___DisplayData] | None = ..., + requirements: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["components", b"components"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "display_data", b"display_data", "requirements", b"requirements", "root_transform_ids", b"root_transform_ids"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Pipeline: _TypeAlias = Pipeline # noqa: Y015 + +@_typing.final +class PTransform(_message.Message): + """Transforms are the operations in your pipeline, and provide a generic + processing framework. You provide processing logic in the form of a function + object (colloquially referred to as “user code”), and your user code is + applied to each element of an input PCollection (or more than one + PCollection). Depending on the pipeline runner and back-end that you choose, + many different workers across a cluster may execute instances of your user + code in parallel. The user code running on each worker generates the output + elements that are ultimately added to the final output PCollection that the + transform produces. + + The Beam SDKs contain a number of different transforms that you can apply to + your pipeline’s PCollections. These include general-purpose core transforms, + such as ParDo or Combine. There are also pre-written composite transforms + included in the SDKs, which combine one or more of the core transforms in a + useful processing pattern, such as counting or combining elements in a + collection. You can also define your own more complex composite transforms to + fit your pipeline’s exact use case. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class InputsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class OutputsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AnnotationsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.bytes + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + UNIQUE_NAME_FIELD_NUMBER: _builtins.int + SPEC_FIELD_NUMBER: _builtins.int + SUBTRANSFORMS_FIELD_NUMBER: _builtins.int + INPUTS_FIELD_NUMBER: _builtins.int + OUTPUTS_FIELD_NUMBER: _builtins.int + DISPLAY_DATA_FIELD_NUMBER: _builtins.int + ENVIRONMENT_ID_FIELD_NUMBER: _builtins.int + ANNOTATIONS_FIELD_NUMBER: _builtins.int + unique_name: _builtins.str + """(Required) A unique name for the application node. + + Ideally, this should be stable over multiple evolutions of a pipeline + for the purposes of logging and associating pipeline state with a node, + etc. + + If it is not stable, then the runner decides what will happen. But, most + importantly, it must always be here and be unique, even if it is + autogenerated. + """ + environment_id: _builtins.str + """Environment where the current PTransform should be executed in. + + Transforms that are required to be implemented by a runner must omit this. + All other transforms are required to specify this. + """ + @_builtins.property + def spec(self) -> Global___FunctionSpec: + """(Optional) A URN and payload that, together, fully defined the semantics + of this transform. + + If absent, this must be an "anonymous" composite transform. + + For primitive transform in the Runner API, this is required, and the + payloads are well-defined messages. When the URN indicates ParDo it + is a ParDoPayload, and so on. For some special composite transforms, + the payload is also officially defined. See StandardPTransforms for + details. + """ + + @_builtins.property + def subtransforms(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Optional) A list of the ids of transforms that it contains. + + Primitive transforms (see StandardPTransforms.Primitives) are not allowed + to specify subtransforms. + + Note that a composite transform may have zero subtransforms as long as it + only outputs PCollections that are in its inputs. + """ + + @_builtins.property + def inputs(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """(Required) A map from local names of inputs (unique only with this map, and + likely embedded in the transform payload and serialized user code) to + PCollection ids. + + The payload for this transform may clarify the relationship of these + inputs. For example: + + - for a Flatten transform they are merged + - for a ParDo transform, some may be side inputs + + All inputs are recorded here so that the topological ordering of + the graph is consistent whether or not the payload is understood. + """ + + @_builtins.property + def outputs(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """(Required) A map from local names of outputs (unique only within this map, + and likely embedded in the transform payload and serialized user code) + to PCollection ids. + + The URN or payload for this transform node may clarify the type and + relationship of these outputs. For example: + + - for a ParDo transform, these are tags on PCollections, which will be + embedded in the DoFn. + """ + + @_builtins.property + def display_data(self) -> _containers.RepeatedCompositeFieldContainer[Global___DisplayData]: + """(Optional) Static display data for this PTransform application. If + there is none, it may be omitted. + """ + + @_builtins.property + def annotations(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: + """(Optional) A map from URNs designating a type of annotation, to the + annotation in binary format. For example, an annotation could indicate + that this PTransform has specific privacy properties. + + A runner MAY ignore types of annotations it doesn't understand. Therefore + annotations MUST NOT be used for metadata that can affect correct + execution of the transform. + """ + + def __init__( + self, + *, + unique_name: _builtins.str | None = ..., + spec: Global___FunctionSpec | None = ..., + subtransforms: _abc.Iterable[_builtins.str] | None = ..., + inputs: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + outputs: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + display_data: _abc.Iterable[Global___DisplayData] | None = ..., + environment_id: _builtins.str | None = ..., + annotations: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["spec", b"spec"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["annotations", b"annotations", "display_data", b"display_data", "environment_id", b"environment_id", "inputs", b"inputs", "outputs", b"outputs", "spec", b"spec", "subtransforms", b"subtransforms", "unique_name", b"unique_name"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PTransform: _TypeAlias = PTransform # noqa: Y015 + +@_typing.final +class StandardPTransforms(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Primitives: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _PrimitivesEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._Primitives.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PAR_DO: StandardPTransforms._Primitives.ValueType # 0 + """ParDo is a Beam transform for generic parallel processing. The ParDo + processing paradigm is similar to the “Map” phase of a + Map/Shuffle/Reduce-style algorithm: a ParDo transform considers each + element in the input PCollection, performs some processing function + (your user code) on that element, and emits zero, one, or multiple + elements to an output PCollection. + + See https://beam.apache.org/documentation/programming-guide/#pardo + for additional details. + + Payload: ParDoPayload + """ + FLATTEN: StandardPTransforms._Primitives.ValueType # 1 + """Flatten is a Beam transform for PCollection objects that store the same + data type. Flatten merges multiple PCollection objects into a single + logical PCollection. + + See https://beam.apache.org/documentation/programming-guide/#flatten + for additional details. + + Payload: None + """ + GROUP_BY_KEY: StandardPTransforms._Primitives.ValueType # 2 + """GroupByKey is a Beam transform for processing collections of key/value + pairs. It’s a parallel reduction operation, analogous to the Shuffle + phase of a Map/Shuffle/Reduce-style algorithm. The input to GroupByKey is + a collection of key/value pairs that represents a multimap, where the + collection contains multiple pairs that have the same key, but different + values. Given such a collection, you use GroupByKey to collect all of the + values associated with each unique key. + + See https://beam.apache.org/documentation/programming-guide/#groupbykey + for additional details. + + Never defines an environment as the runner is required to implement this + transform. + + Payload: None + """ + IMPULSE: StandardPTransforms._Primitives.ValueType # 3 + """A transform which produces a single empty byte array at the minimum + timestamp in the GlobalWindow. + + Never defines an environment as the runner is required to implement this + transform. + + Payload: None + """ + ASSIGN_WINDOWS: StandardPTransforms._Primitives.ValueType # 4 + """Windowing subdivides a PCollection according to the timestamps of its + individual elements. Transforms that aggregate multiple elements, such as + GroupByKey and Combine, work implicitly on a per-window basis — they + process each PCollection as a succession of multiple, finite windows, + though the entire collection itself may be of unbounded size. + + See https://beam.apache.org/documentation/programming-guide/#windowing + for additional details. + + Payload: WindowIntoPayload + """ + TEST_STREAM: StandardPTransforms._Primitives.ValueType # 5 + """A testing input that generates an unbounded {@link PCollection} of + elements, advancing the watermark and processing time as elements are + emitted. After all of the specified elements are emitted, ceases to + produce output. + + See https://beam.apache.org/blog/2016/10/20/test-stream.html + for additional details. + + Payload: TestStreamPayload + """ + MAP_WINDOWS: StandardPTransforms._Primitives.ValueType # 6 + """Represents mapping of main input window onto side input window. + + Side input window mapping function: + Input: KV + Output: KV + + For each main input window, the side input window is returned. The + nonce is used by a runner to associate each input with its output. + The nonce is represented as an opaque set of bytes. + + Payload: SideInput#window_mapping_fn FunctionSpec + """ + MERGE_WINDOWS: StandardPTransforms._Primitives.ValueType # 7 + """Used to merge windows during a GroupByKey. + + Window merging function: + Input: KV> + Output: KV, iterable>>> + + For each set of original windows, a list of all unmerged windows is + output alongside a map of merged window to set of consumed windows. + All original windows must be contained in either the unmerged original + window set or one of the consumed original window sets. Each original + window can only be part of one output set. The nonce is used by a runner + to associate each input with its output. The nonce is represented as an + opaque set of bytes. + + Payload: WindowingStrategy#window_fn FunctionSpec + """ + TO_STRING: StandardPTransforms._Primitives.ValueType # 8 + """A transform that translates a given element to its human-readable + representation. + + Input: KV + Output: KV + + For each given element, the implementation returns the best-effort + human-readable representation. When possible, the implementation could + call a user-overridable method on the type. For example, Java could + call `toString()`, Python could call `str()`, Golang could call + `String()`. The nonce is used by a runner to associate each input with + its output. The nonce is represented as an opaque set of bytes. + + Payload: none + """ + + class Primitives(_Primitives, metaclass=_PrimitivesEnumTypeWrapper): + """Primitive transforms may not specify composite sub-transforms.""" + + PAR_DO: StandardPTransforms.Primitives.ValueType # 0 + """ParDo is a Beam transform for generic parallel processing. The ParDo + processing paradigm is similar to the “Map” phase of a + Map/Shuffle/Reduce-style algorithm: a ParDo transform considers each + element in the input PCollection, performs some processing function + (your user code) on that element, and emits zero, one, or multiple + elements to an output PCollection. + + See https://beam.apache.org/documentation/programming-guide/#pardo + for additional details. + + Payload: ParDoPayload + """ + FLATTEN: StandardPTransforms.Primitives.ValueType # 1 + """Flatten is a Beam transform for PCollection objects that store the same + data type. Flatten merges multiple PCollection objects into a single + logical PCollection. + + See https://beam.apache.org/documentation/programming-guide/#flatten + for additional details. + + Payload: None + """ + GROUP_BY_KEY: StandardPTransforms.Primitives.ValueType # 2 + """GroupByKey is a Beam transform for processing collections of key/value + pairs. It’s a parallel reduction operation, analogous to the Shuffle + phase of a Map/Shuffle/Reduce-style algorithm. The input to GroupByKey is + a collection of key/value pairs that represents a multimap, where the + collection contains multiple pairs that have the same key, but different + values. Given such a collection, you use GroupByKey to collect all of the + values associated with each unique key. + + See https://beam.apache.org/documentation/programming-guide/#groupbykey + for additional details. + + Never defines an environment as the runner is required to implement this + transform. + + Payload: None + """ + IMPULSE: StandardPTransforms.Primitives.ValueType # 3 + """A transform which produces a single empty byte array at the minimum + timestamp in the GlobalWindow. + + Never defines an environment as the runner is required to implement this + transform. + + Payload: None + """ + ASSIGN_WINDOWS: StandardPTransforms.Primitives.ValueType # 4 + """Windowing subdivides a PCollection according to the timestamps of its + individual elements. Transforms that aggregate multiple elements, such as + GroupByKey and Combine, work implicitly on a per-window basis — they + process each PCollection as a succession of multiple, finite windows, + though the entire collection itself may be of unbounded size. + + See https://beam.apache.org/documentation/programming-guide/#windowing + for additional details. + + Payload: WindowIntoPayload + """ + TEST_STREAM: StandardPTransforms.Primitives.ValueType # 5 + """A testing input that generates an unbounded {@link PCollection} of + elements, advancing the watermark and processing time as elements are + emitted. After all of the specified elements are emitted, ceases to + produce output. + + See https://beam.apache.org/blog/2016/10/20/test-stream.html + for additional details. + + Payload: TestStreamPayload + """ + MAP_WINDOWS: StandardPTransforms.Primitives.ValueType # 6 + """Represents mapping of main input window onto side input window. + + Side input window mapping function: + Input: KV + Output: KV + + For each main input window, the side input window is returned. The + nonce is used by a runner to associate each input with its output. + The nonce is represented as an opaque set of bytes. + + Payload: SideInput#window_mapping_fn FunctionSpec + """ + MERGE_WINDOWS: StandardPTransforms.Primitives.ValueType # 7 + """Used to merge windows during a GroupByKey. + + Window merging function: + Input: KV> + Output: KV, iterable>>> + + For each set of original windows, a list of all unmerged windows is + output alongside a map of merged window to set of consumed windows. + All original windows must be contained in either the unmerged original + window set or one of the consumed original window sets. Each original + window can only be part of one output set. The nonce is used by a runner + to associate each input with its output. The nonce is represented as an + opaque set of bytes. + + Payload: WindowingStrategy#window_fn FunctionSpec + """ + TO_STRING: StandardPTransforms.Primitives.ValueType # 8 + """A transform that translates a given element to its human-readable + representation. + + Input: KV + Output: KV + + For each given element, the implementation returns the best-effort + human-readable representation. When possible, the implementation could + call a user-overridable method on the type. For example, Java could + call `toString()`, Python could call `str()`, Golang could call + `String()`. The nonce is used by a runner to associate each input with + its output. The nonce is represented as an opaque set of bytes. + + Payload: none + """ + + class _DeprecatedPrimitives: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _DeprecatedPrimitivesEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._DeprecatedPrimitives.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + READ: StandardPTransforms._DeprecatedPrimitives.ValueType # 0 + """Represents the operation to read a Bounded or Unbounded source. + Payload: ReadPayload. + """ + CREATE_VIEW: StandardPTransforms._DeprecatedPrimitives.ValueType # 1 + """Runners should move away from translating `CreatePCollectionView` and treat this as + part of the translation for a `ParDo` side input. + """ + + class DeprecatedPrimitives(_DeprecatedPrimitives, metaclass=_DeprecatedPrimitivesEnumTypeWrapper): ... + READ: StandardPTransforms.DeprecatedPrimitives.ValueType # 0 + """Represents the operation to read a Bounded or Unbounded source. + Payload: ReadPayload. + """ + CREATE_VIEW: StandardPTransforms.DeprecatedPrimitives.ValueType # 1 + """Runners should move away from translating `CreatePCollectionView` and treat this as + part of the translation for a `ParDo` side input. + """ + + class _Composites: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _CompositesEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._Composites.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + COMBINE_PER_KEY: StandardPTransforms._Composites.ValueType # 0 + """Represents the Combine.perKey() operation. + If this is produced by an SDK, it is assumed that the SDK understands + each of CombineComponents. + Payload: CombinePayload + """ + COMBINE_GLOBALLY: StandardPTransforms._Composites.ValueType # 1 + """Represents the Combine.globally() operation. + If this is produced by an SDK, it is assumed that the SDK understands + each of CombineComponents. + Payload: CombinePayload + """ + RESHUFFLE: StandardPTransforms._Composites.ValueType # 2 + """Represents the Reshuffle operation.""" + WRITE_FILES: StandardPTransforms._Composites.ValueType # 3 + """Less well-known. Payload: WriteFilesPayload.""" + PUBSUB_READ: StandardPTransforms._Composites.ValueType # 4 + """Payload: PubSubReadPayload.""" + PUBSUB_WRITE: StandardPTransforms._Composites.ValueType # 5 + """Payload: PubSubWritePayload.""" + PUBSUB_WRITE_V2: StandardPTransforms._Composites.ValueType # 7 + """Used for pubsub dynamic destinations. + Payload: PubSubWritePayload. + """ + GROUP_INTO_BATCHES_WITH_SHARDED_KEY: StandardPTransforms._Composites.ValueType # 6 + """Represents the GroupIntoBatches.WithShardedKey operation. + Payload: GroupIntoBatchesPayload + """ + REDISTRIBUTE_BY_KEY: StandardPTransforms._Composites.ValueType # 8 + REDISTRIBUTE_ARBITRARILY: StandardPTransforms._Composites.ValueType # 9 + + class Composites(_Composites, metaclass=_CompositesEnumTypeWrapper): ... + COMBINE_PER_KEY: StandardPTransforms.Composites.ValueType # 0 + """Represents the Combine.perKey() operation. + If this is produced by an SDK, it is assumed that the SDK understands + each of CombineComponents. + Payload: CombinePayload + """ + COMBINE_GLOBALLY: StandardPTransforms.Composites.ValueType # 1 + """Represents the Combine.globally() operation. + If this is produced by an SDK, it is assumed that the SDK understands + each of CombineComponents. + Payload: CombinePayload + """ + RESHUFFLE: StandardPTransforms.Composites.ValueType # 2 + """Represents the Reshuffle operation.""" + WRITE_FILES: StandardPTransforms.Composites.ValueType # 3 + """Less well-known. Payload: WriteFilesPayload.""" + PUBSUB_READ: StandardPTransforms.Composites.ValueType # 4 + """Payload: PubSubReadPayload.""" + PUBSUB_WRITE: StandardPTransforms.Composites.ValueType # 5 + """Payload: PubSubWritePayload.""" + PUBSUB_WRITE_V2: StandardPTransforms.Composites.ValueType # 7 + """Used for pubsub dynamic destinations. + Payload: PubSubWritePayload. + """ + GROUP_INTO_BATCHES_WITH_SHARDED_KEY: StandardPTransforms.Composites.ValueType # 6 + """Represents the GroupIntoBatches.WithShardedKey operation. + Payload: GroupIntoBatchesPayload + """ + REDISTRIBUTE_BY_KEY: StandardPTransforms.Composites.ValueType # 8 + REDISTRIBUTE_ARBITRARILY: StandardPTransforms.Composites.ValueType # 9 + + class _CombineComponents: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _CombineComponentsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._CombineComponents.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + COMBINE_PER_KEY_PRECOMBINE: StandardPTransforms._CombineComponents.ValueType # 0 + """Represents the Pre-Combine part of a lifted Combine Per Key, as described + in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.ta0g6ase8z07 + Payload: CombinePayload + """ + COMBINE_PER_KEY_MERGE_ACCUMULATORS: StandardPTransforms._CombineComponents.ValueType # 1 + """Represents the Merge Accumulators part of a lifted Combine Per Key, as + described in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.jco9rvatld5m + Payload: CombinePayload + """ + COMBINE_PER_KEY_EXTRACT_OUTPUTS: StandardPTransforms._CombineComponents.ValueType # 2 + """Represents the Extract Outputs part of a lifted Combine Per Key, as + described in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.i9i6p8gtl6ku + Payload: CombinePayload + """ + COMBINE_GROUPED_VALUES: StandardPTransforms._CombineComponents.ValueType # 3 + """Represents the Combine Grouped Values transform, as described in the + following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.aj86ew4v1wk + Payload: CombinePayload + """ + COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS: StandardPTransforms._CombineComponents.ValueType # 4 + """Represents the Convert To Accumulators transform, as described in the + following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.h5697l1scd9x + Payload: CombinePayload + """ + + class CombineComponents(_CombineComponents, metaclass=_CombineComponentsEnumTypeWrapper): + """Payload for all of these: CombinePayload""" + + COMBINE_PER_KEY_PRECOMBINE: StandardPTransforms.CombineComponents.ValueType # 0 + """Represents the Pre-Combine part of a lifted Combine Per Key, as described + in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.ta0g6ase8z07 + Payload: CombinePayload + """ + COMBINE_PER_KEY_MERGE_ACCUMULATORS: StandardPTransforms.CombineComponents.ValueType # 1 + """Represents the Merge Accumulators part of a lifted Combine Per Key, as + described in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.jco9rvatld5m + Payload: CombinePayload + """ + COMBINE_PER_KEY_EXTRACT_OUTPUTS: StandardPTransforms.CombineComponents.ValueType # 2 + """Represents the Extract Outputs part of a lifted Combine Per Key, as + described in the following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.i9i6p8gtl6ku + Payload: CombinePayload + """ + COMBINE_GROUPED_VALUES: StandardPTransforms.CombineComponents.ValueType # 3 + """Represents the Combine Grouped Values transform, as described in the + following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.aj86ew4v1wk + Payload: CombinePayload + """ + COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS: StandardPTransforms.CombineComponents.ValueType # 4 + """Represents the Convert To Accumulators transform, as described in the + following document: + https://s.apache.org/beam-runner-api-combine-model#heading=h.h5697l1scd9x + Payload: CombinePayload + """ + + class _SplittableParDoComponents: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _SplittableParDoComponentsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._SplittableParDoComponents.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PAIR_WITH_RESTRICTION: StandardPTransforms._SplittableParDoComponents.ValueType # 0 + """Pairs the input element with its initial restriction. + Input: element; output: KV(element, restriction). + """ + SPLIT_AND_SIZE_RESTRICTIONS: StandardPTransforms._SplittableParDoComponents.ValueType # 1 + """Splits the restriction of each element/restriction pair and returns the + resulting splits, with a corresponding floating point size estimation + for each. + + A reasonable value for size is the number of bytes expected to be + produced by this (element, restriction) pair. + + Input: KV(element, restriction) + Output: KV(KV(element, restriction), size)) + """ + PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS: StandardPTransforms._SplittableParDoComponents.ValueType # 2 + """Applies the DoFn to every element and restriction. + + All primary and residuals returned from checkpointing or splitting must + have the same type as the input to this transform. + + Input: KV(KV(element, restriction), size); output: DoFn's output. + """ + TRUNCATE_SIZED_RESTRICTION: StandardPTransforms._SplittableParDoComponents.ValueType # 3 + """Truncates the restriction of each element/restriction pair and returns + the finite restriction which will be processed when a pipeline is + drained. See + https://docs.google.com/document/d/1NExwHlj-2q2WUGhSO4jTu8XGhDPmm3cllSN8IMmWci8/edit#. + for additional details about drain. + + Input: KV(KV(element, restriction), size); + Output: KV(KV(element, restriction), size). + """ + + class SplittableParDoComponents(_SplittableParDoComponents, metaclass=_SplittableParDoComponentsEnumTypeWrapper): + """Payload for all of these: ParDoPayload containing the user's SDF""" + + PAIR_WITH_RESTRICTION: StandardPTransforms.SplittableParDoComponents.ValueType # 0 + """Pairs the input element with its initial restriction. + Input: element; output: KV(element, restriction). + """ + SPLIT_AND_SIZE_RESTRICTIONS: StandardPTransforms.SplittableParDoComponents.ValueType # 1 + """Splits the restriction of each element/restriction pair and returns the + resulting splits, with a corresponding floating point size estimation + for each. + + A reasonable value for size is the number of bytes expected to be + produced by this (element, restriction) pair. + + Input: KV(element, restriction) + Output: KV(KV(element, restriction), size)) + """ + PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS: StandardPTransforms.SplittableParDoComponents.ValueType # 2 + """Applies the DoFn to every element and restriction. + + All primary and residuals returned from checkpointing or splitting must + have the same type as the input to this transform. + + Input: KV(KV(element, restriction), size); output: DoFn's output. + """ + TRUNCATE_SIZED_RESTRICTION: StandardPTransforms.SplittableParDoComponents.ValueType # 3 + """Truncates the restriction of each element/restriction pair and returns + the finite restriction which will be processed when a pipeline is + drained. See + https://docs.google.com/document/d/1NExwHlj-2q2WUGhSO4jTu8XGhDPmm3cllSN8IMmWci8/edit#. + for additional details about drain. + + Input: KV(KV(element, restriction), size); + Output: KV(KV(element, restriction), size). + """ + + class _GroupIntoBatchesComponents: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _GroupIntoBatchesComponentsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardPTransforms._GroupIntoBatchesComponents.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + GROUP_INTO_BATCHES: StandardPTransforms._GroupIntoBatchesComponents.ValueType # 0 + + class GroupIntoBatchesComponents(_GroupIntoBatchesComponents, metaclass=_GroupIntoBatchesComponentsEnumTypeWrapper): + """Payload for all of these: GroupIntoBatchesPayload""" + + GROUP_INTO_BATCHES: StandardPTransforms.GroupIntoBatchesComponents.ValueType # 0 + + def __init__( + self, + ) -> None: ... + +Global___StandardPTransforms: _TypeAlias = StandardPTransforms # noqa: Y015 + +@_typing.final +class StandardSideInputTypes(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardSideInputTypes._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + ITERABLE: StandardSideInputTypes._Enum.ValueType # 0 + """Represents a view over a PCollection. + + StateGetRequests performed on this side input must use + StateKey.IterableSideInput. + """ + MULTIMAP: StandardSideInputTypes._Enum.ValueType # 1 + """Represents a view over a PCollection>. + + StateGetRequests performed on this side input must use + StateKey.MultimapKeysSideInput or StateKey.MultimapSideInput. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + ITERABLE: StandardSideInputTypes.Enum.ValueType # 0 + """Represents a view over a PCollection. + + StateGetRequests performed on this side input must use + StateKey.IterableSideInput. + """ + MULTIMAP: StandardSideInputTypes.Enum.ValueType # 1 + """Represents a view over a PCollection>. + + StateGetRequests performed on this side input must use + StateKey.MultimapKeysSideInput or StateKey.MultimapSideInput. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardSideInputTypes: _TypeAlias = StandardSideInputTypes # noqa: Y015 + +@_typing.final +class StandardUserStateTypes(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardUserStateTypes._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + BAG: StandardUserStateTypes._Enum.ValueType # 0 + """Represents a user state specification that supports a bag. + + StateRequests performed on this user state must use + StateKey.BagUserState. + """ + MULTIMAP: StandardUserStateTypes._Enum.ValueType # 1 + """Represents a user state specification that supports a multimap. + + StateRequests performed on this user state must use + StateKey.MultimapKeysUserState or StateKey.MultimapUserState. + """ + ORDERED_LIST: StandardUserStateTypes._Enum.ValueType # 2 + """Represents a user state specification that supports an ordered list. + + StateRequests performed on this user state must use + StateKey.OrderedListUserState. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + BAG: StandardUserStateTypes.Enum.ValueType # 0 + """Represents a user state specification that supports a bag. + + StateRequests performed on this user state must use + StateKey.BagUserState. + """ + MULTIMAP: StandardUserStateTypes.Enum.ValueType # 1 + """Represents a user state specification that supports a multimap. + + StateRequests performed on this user state must use + StateKey.MultimapKeysUserState or StateKey.MultimapUserState. + """ + ORDERED_LIST: StandardUserStateTypes.Enum.ValueType # 2 + """Represents a user state specification that supports an ordered list. + + StateRequests performed on this user state must use + StateKey.OrderedListUserState. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardUserStateTypes: _TypeAlias = StandardUserStateTypes # noqa: Y015 + +@_typing.final +class PCollection(_message.Message): + """A PCollection!""" + + DESCRIPTOR: _descriptor.Descriptor + + UNIQUE_NAME_FIELD_NUMBER: _builtins.int + CODER_ID_FIELD_NUMBER: _builtins.int + IS_BOUNDED_FIELD_NUMBER: _builtins.int + WINDOWING_STRATEGY_ID_FIELD_NUMBER: _builtins.int + DISPLAY_DATA_FIELD_NUMBER: _builtins.int + unique_name: _builtins.str + """(Required) A unique name for the PCollection. + + Ideally, this should be stable over multiple evolutions of a pipeline + for the purposes of logging and associating pipeline state with a node, + etc. + + If it is not stable, then the runner decides what will happen. But, most + importantly, it must always be here, even if it is autogenerated. + """ + coder_id: _builtins.str + """(Required) The id of the Coder for this PCollection.""" + is_bounded: Global___IsBounded.Enum.ValueType + """(Required) Whether this PCollection is bounded or unbounded""" + windowing_strategy_id: _builtins.str + """(Required) The id of the windowing strategy for this PCollection.""" + @_builtins.property + def display_data(self) -> _containers.RepeatedCompositeFieldContainer[Global___DisplayData]: + """(Optional) Static display data for the PCollection. If there is none, + it may be omitted. + """ + + def __init__( + self, + *, + unique_name: _builtins.str | None = ..., + coder_id: _builtins.str | None = ..., + is_bounded: Global___IsBounded.Enum.ValueType | None = ..., + windowing_strategy_id: _builtins.str | None = ..., + display_data: _abc.Iterable[Global___DisplayData] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coder_id", b"coder_id", "display_data", b"display_data", "is_bounded", b"is_bounded", "unique_name", b"unique_name", "windowing_strategy_id", b"windowing_strategy_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PCollection: _TypeAlias = PCollection # noqa: Y015 + +@_typing.final +class ParDoPayload(_message.Message): + """The payload for the primitive ParDo transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class SideInputsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___SideInput: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___SideInput | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class StateSpecsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___StateSpec: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___StateSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class TimerFamilySpecsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___TimerFamilySpec: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___TimerFamilySpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + DO_FN_FIELD_NUMBER: _builtins.int + SIDE_INPUTS_FIELD_NUMBER: _builtins.int + STATE_SPECS_FIELD_NUMBER: _builtins.int + TIMER_FAMILY_SPECS_FIELD_NUMBER: _builtins.int + RESTRICTION_CODER_ID_FIELD_NUMBER: _builtins.int + REQUESTS_FINALIZATION_FIELD_NUMBER: _builtins.int + REQUIRES_TIME_SORTED_INPUT_FIELD_NUMBER: _builtins.int + REQUIRES_STABLE_INPUT_FIELD_NUMBER: _builtins.int + ON_WINDOW_EXPIRATION_TIMER_FAMILY_SPEC_FIELD_NUMBER: _builtins.int + restriction_coder_id: _builtins.str + """(Optional) Only set when this ParDo contains a splittable DoFn. + If this is set, the corresponding standard requirement should also + be placed in the pipeline requirements. + """ + requests_finalization: _builtins.bool + """(Optional) Only set when this ParDo can request bundle finalization. + If this is set, the corresponding standard requirement should also + be placed in the pipeline requirements. + """ + requires_time_sorted_input: _builtins.bool + """Whether this stage requires time sorted input. + If this is set, the corresponding standard requirement should also + be placed in the pipeline requirements. + """ + requires_stable_input: _builtins.bool + """Whether this stage requires stable input. + If this is set, the corresponding standard requirement should also + be placed in the pipeline requirements. + """ + on_window_expiration_timer_family_spec: _builtins.str + """If populated, the name of the timer family spec which should be notified + on each window expiry. + If this is set, the corresponding standard requirement should also + be placed in the pipeline requirements. + """ + @_builtins.property + def do_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the DoFn.""" + + @_builtins.property + def side_inputs(self) -> _containers.MessageMap[_builtins.str, Global___SideInput]: + """(Optional) A mapping of local input names to side inputs, describing + the expected access pattern. + """ + + @_builtins.property + def state_specs(self) -> _containers.MessageMap[_builtins.str, Global___StateSpec]: + """(Optional) A mapping of local state names to state specifications. + If this is set, the stateful processing requirement should also + be placed in the pipeline requirements. + """ + + @_builtins.property + def timer_family_specs(self) -> _containers.MessageMap[_builtins.str, Global___TimerFamilySpec]: + """(Optional) A mapping of local timer family names to timer family + specifications. If this is set, the stateful processing requirement should + also be placed in the pipeline requirements. + """ + + def __init__( + self, + *, + do_fn: Global___FunctionSpec | None = ..., + side_inputs: _abc.Mapping[_builtins.str, Global___SideInput] | None = ..., + state_specs: _abc.Mapping[_builtins.str, Global___StateSpec] | None = ..., + timer_family_specs: _abc.Mapping[_builtins.str, Global___TimerFamilySpec] | None = ..., + restriction_coder_id: _builtins.str | None = ..., + requests_finalization: _builtins.bool | None = ..., + requires_time_sorted_input: _builtins.bool | None = ..., + requires_stable_input: _builtins.bool | None = ..., + on_window_expiration_timer_family_spec: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["do_fn", b"do_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["do_fn", b"do_fn", "on_window_expiration_timer_family_spec", b"on_window_expiration_timer_family_spec", "requests_finalization", b"requests_finalization", "requires_stable_input", b"requires_stable_input", "requires_time_sorted_input", b"requires_time_sorted_input", "restriction_coder_id", b"restriction_coder_id", "side_inputs", b"side_inputs", "state_specs", b"state_specs", "timer_family_specs", b"timer_family_specs"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ParDoPayload: _TypeAlias = ParDoPayload # noqa: Y015 + +@_typing.final +class StateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + READ_MODIFY_WRITE_SPEC_FIELD_NUMBER: _builtins.int + BAG_SPEC_FIELD_NUMBER: _builtins.int + COMBINING_SPEC_FIELD_NUMBER: _builtins.int + MAP_SPEC_FIELD_NUMBER: _builtins.int + SET_SPEC_FIELD_NUMBER: _builtins.int + ORDERED_LIST_SPEC_FIELD_NUMBER: _builtins.int + MULTIMAP_SPEC_FIELD_NUMBER: _builtins.int + PROTOCOL_FIELD_NUMBER: _builtins.int + @_builtins.property + def read_modify_write_spec(self) -> Global___ReadModifyWriteStateSpec: ... + @_builtins.property + def bag_spec(self) -> Global___BagStateSpec: ... + @_builtins.property + def combining_spec(self) -> Global___CombiningStateSpec: ... + @_builtins.property + def map_spec(self) -> Global___MapStateSpec: ... + @_builtins.property + def set_spec(self) -> Global___SetStateSpec: ... + @_builtins.property + def ordered_list_spec(self) -> Global___OrderedListStateSpec: ... + @_builtins.property + def multimap_spec(self) -> Global___MultimapStateSpec: ... + @_builtins.property + def protocol(self) -> Global___FunctionSpec: + """(Required) URN of the protocol required by this state specification to present + the desired SDK-specific interface to a UDF. + + This protocol defines the SDK harness <-> Runner Harness RPC + interface for accessing and mutating user state. + + See StandardUserStateTypes for an enumeration of all user state types + defined. + """ + + def __init__( + self, + *, + read_modify_write_spec: Global___ReadModifyWriteStateSpec | None = ..., + bag_spec: Global___BagStateSpec | None = ..., + combining_spec: Global___CombiningStateSpec | None = ..., + map_spec: Global___MapStateSpec | None = ..., + set_spec: Global___SetStateSpec | None = ..., + ordered_list_spec: Global___OrderedListStateSpec | None = ..., + multimap_spec: Global___MultimapStateSpec | None = ..., + protocol: Global___FunctionSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["bag_spec", b"bag_spec", "combining_spec", b"combining_spec", "map_spec", b"map_spec", "multimap_spec", b"multimap_spec", "ordered_list_spec", b"ordered_list_spec", "protocol", b"protocol", "read_modify_write_spec", b"read_modify_write_spec", "set_spec", b"set_spec", "spec", b"spec"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bag_spec", b"bag_spec", "combining_spec", b"combining_spec", "map_spec", b"map_spec", "multimap_spec", b"multimap_spec", "ordered_list_spec", b"ordered_list_spec", "protocol", b"protocol", "read_modify_write_spec", b"read_modify_write_spec", "set_spec", b"set_spec", "spec", b"spec"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_spec: _TypeAlias = _typing.Literal["read_modify_write_spec", "bag_spec", "combining_spec", "map_spec", "set_spec", "ordered_list_spec", "multimap_spec"] # noqa: Y015 + _WhichOneofArgType_spec: _TypeAlias = _typing.Literal["spec", b"spec"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_spec) -> _WhichOneofReturnType_spec | None: ... + +Global___StateSpec: _TypeAlias = StateSpec # noqa: Y015 + +@_typing.final +class ReadModifyWriteStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + CODER_ID_FIELD_NUMBER: _builtins.int + coder_id: _builtins.str + def __init__( + self, + *, + coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coder_id", b"coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ReadModifyWriteStateSpec: _TypeAlias = ReadModifyWriteStateSpec # noqa: Y015 + +@_typing.final +class BagStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_CODER_ID_FIELD_NUMBER: _builtins.int + element_coder_id: _builtins.str + def __init__( + self, + *, + element_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_coder_id", b"element_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___BagStateSpec: _TypeAlias = BagStateSpec # noqa: Y015 + +@_typing.final +class OrderedListStateSpec(_message.Message): + """OrderedListState values are encoded with the var int encoded + millis-since-epoch followed by the value encoded by the provided coder. + Be aware this is not the standard timestamp value encoding. + """ + + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_CODER_ID_FIELD_NUMBER: _builtins.int + element_coder_id: _builtins.str + def __init__( + self, + *, + element_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_coder_id", b"element_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___OrderedListStateSpec: _TypeAlias = OrderedListStateSpec # noqa: Y015 + +@_typing.final +class CombiningStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ACCUMULATOR_CODER_ID_FIELD_NUMBER: _builtins.int + COMBINE_FN_FIELD_NUMBER: _builtins.int + accumulator_coder_id: _builtins.str + @_builtins.property + def combine_fn(self) -> Global___FunctionSpec: ... + def __init__( + self, + *, + accumulator_coder_id: _builtins.str | None = ..., + combine_fn: Global___FunctionSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["combine_fn", b"combine_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["accumulator_coder_id", b"accumulator_coder_id", "combine_fn", b"combine_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CombiningStateSpec: _TypeAlias = CombiningStateSpec # noqa: Y015 + +@_typing.final +class MapStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_CODER_ID_FIELD_NUMBER: _builtins.int + VALUE_CODER_ID_FIELD_NUMBER: _builtins.int + key_coder_id: _builtins.str + value_coder_id: _builtins.str + def __init__( + self, + *, + key_coder_id: _builtins.str | None = ..., + value_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key_coder_id", b"key_coder_id", "value_coder_id", b"value_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MapStateSpec: _TypeAlias = MapStateSpec # noqa: Y015 + +@_typing.final +class MultimapStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_CODER_ID_FIELD_NUMBER: _builtins.int + VALUE_CODER_ID_FIELD_NUMBER: _builtins.int + key_coder_id: _builtins.str + value_coder_id: _builtins.str + def __init__( + self, + *, + key_coder_id: _builtins.str | None = ..., + value_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key_coder_id", b"key_coder_id", "value_coder_id", b"value_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MultimapStateSpec: _TypeAlias = MultimapStateSpec # noqa: Y015 + +@_typing.final +class SetStateSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_CODER_ID_FIELD_NUMBER: _builtins.int + element_coder_id: _builtins.str + def __init__( + self, + *, + element_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_coder_id", b"element_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SetStateSpec: _TypeAlias = SetStateSpec # noqa: Y015 + +@_typing.final +class TimerFamilySpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + TIME_DOMAIN_FIELD_NUMBER: _builtins.int + TIMER_FAMILY_CODER_ID_FIELD_NUMBER: _builtins.int + time_domain: Global___TimeDomain.Enum.ValueType + timer_family_coder_id: _builtins.str + def __init__( + self, + *, + time_domain: Global___TimeDomain.Enum.ValueType | None = ..., + timer_family_coder_id: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["time_domain", b"time_domain", "timer_family_coder_id", b"timer_family_coder_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___TimerFamilySpec: _TypeAlias = TimerFamilySpec # noqa: Y015 + +@_typing.final +class IsBounded(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[IsBounded._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: IsBounded._Enum.ValueType # 0 + UNBOUNDED: IsBounded._Enum.ValueType # 1 + BOUNDED: IsBounded._Enum.ValueType # 2 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: IsBounded.Enum.ValueType # 0 + UNBOUNDED: IsBounded.Enum.ValueType # 1 + BOUNDED: IsBounded.Enum.ValueType # 2 + + def __init__( + self, + ) -> None: ... + +Global___IsBounded: _TypeAlias = IsBounded # noqa: Y015 + +@_typing.final +class ReadPayload(_message.Message): + """The payload for the primitive Read transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + SOURCE_FIELD_NUMBER: _builtins.int + IS_BOUNDED_FIELD_NUMBER: _builtins.int + is_bounded: Global___IsBounded.Enum.ValueType + """(Required) Whether the source is bounded or unbounded""" + @_builtins.property + def source(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the source for this Read.""" + + def __init__( + self, + *, + source: Global___FunctionSpec | None = ..., + is_bounded: Global___IsBounded.Enum.ValueType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["source", b"source"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["is_bounded", b"is_bounded", "source", b"source"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ReadPayload: _TypeAlias = ReadPayload # noqa: Y015 + +@_typing.final +class WindowIntoPayload(_message.Message): + """The payload for the WindowInto transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + WINDOW_FN_FIELD_NUMBER: _builtins.int + @_builtins.property + def window_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the WindowFn.""" + + def __init__( + self, + *, + window_fn: Global___FunctionSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["window_fn", b"window_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["window_fn", b"window_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___WindowIntoPayload: _TypeAlias = WindowIntoPayload # noqa: Y015 + +@_typing.final +class CombinePayload(_message.Message): + """The payload for the special-but-not-primitive Combine transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + COMBINE_FN_FIELD_NUMBER: _builtins.int + ACCUMULATOR_CODER_ID_FIELD_NUMBER: _builtins.int + accumulator_coder_id: _builtins.str + """(Required) A reference to the Coder to use for accumulators of the CombineFn""" + @_builtins.property + def combine_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the CombineFn.""" + + def __init__( + self, + *, + combine_fn: Global___FunctionSpec | None = ..., + accumulator_coder_id: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["combine_fn", b"combine_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["accumulator_coder_id", b"accumulator_coder_id", "combine_fn", b"combine_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___CombinePayload: _TypeAlias = CombinePayload # noqa: Y015 + +@_typing.final +class TestStreamPayload(_message.Message): + """The payload for the test-only primitive TestStream""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Event(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class AdvanceWatermark(_message.Message): + """Advances the watermark to the specified timestamp.""" + + DESCRIPTOR: _descriptor.Descriptor + + NEW_WATERMARK_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + new_watermark: _builtins.int + """(Required) The watermark in millisecond to advance to.""" + tag: _builtins.str + """(Optional) The output watermark tag for a PCollection. If unspecified + or with an empty string, this will default to the Main PCollection + Output + """ + def __init__( + self, + *, + new_watermark: _builtins.int | None = ..., + tag: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["new_watermark", b"new_watermark", "tag", b"tag"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AdvanceProcessingTime(_message.Message): + """Advances the processing time clock by the specified amount.""" + + DESCRIPTOR: _descriptor.Descriptor + + ADVANCE_DURATION_FIELD_NUMBER: _builtins.int + advance_duration: _builtins.int + """(Required) The duration in millisecond to advance by.""" + def __init__( + self, + *, + advance_duration: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["advance_duration", b"advance_duration"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AddElements(_message.Message): + """Adds elements to the stream to be emitted.""" + + DESCRIPTOR: _descriptor.Descriptor + + ELEMENTS_FIELD_NUMBER: _builtins.int + TAG_FIELD_NUMBER: _builtins.int + tag: _builtins.str + """(Optional) The output PCollection tag to add these elements to. If + unspecified or with an empty string, this will default to the Main + PCollection Output. + """ + @_builtins.property + def elements(self) -> _containers.RepeatedCompositeFieldContainer[Global___TestStreamPayload.TimestampedElement]: + """(Required) The elements to add to the TestStream.""" + + def __init__( + self, + *, + elements: _abc.Iterable[Global___TestStreamPayload.TimestampedElement] | None = ..., + tag: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["elements", b"elements", "tag", b"tag"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + WATERMARK_EVENT_FIELD_NUMBER: _builtins.int + PROCESSING_TIME_EVENT_FIELD_NUMBER: _builtins.int + ELEMENT_EVENT_FIELD_NUMBER: _builtins.int + @_builtins.property + def watermark_event(self) -> Global___TestStreamPayload.Event.AdvanceWatermark: ... + @_builtins.property + def processing_time_event(self) -> Global___TestStreamPayload.Event.AdvanceProcessingTime: ... + @_builtins.property + def element_event(self) -> Global___TestStreamPayload.Event.AddElements: ... + def __init__( + self, + *, + watermark_event: Global___TestStreamPayload.Event.AdvanceWatermark | None = ..., + processing_time_event: Global___TestStreamPayload.Event.AdvanceProcessingTime | None = ..., + element_event: Global___TestStreamPayload.Event.AddElements | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["element_event", b"element_event", "event", b"event", "processing_time_event", b"processing_time_event", "watermark_event", b"watermark_event"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_event", b"element_event", "event", b"event", "processing_time_event", b"processing_time_event", "watermark_event", b"watermark_event"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_event: _TypeAlias = _typing.Literal["watermark_event", "processing_time_event", "element_event"] # noqa: Y015 + _WhichOneofArgType_event: _TypeAlias = _typing.Literal["event", b"event"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_event) -> _WhichOneofReturnType_event | None: ... + + @_typing.final + class TimestampedElement(_message.Message): + """A single element inside of the TestStream.""" + + DESCRIPTOR: _descriptor.Descriptor + + ENCODED_ELEMENT_FIELD_NUMBER: _builtins.int + TIMESTAMP_FIELD_NUMBER: _builtins.int + encoded_element: _builtins.bytes + """(Required) The element encoded. Currently the TestStream only supports + encoding primitives. + """ + timestamp: _builtins.int + """(Required) The event timestamp in millisecond of this element.""" + def __init__( + self, + *, + encoded_element: _builtins.bytes | None = ..., + timestamp: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["encoded_element", b"encoded_element", "timestamp", b"timestamp"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + CODER_ID_FIELD_NUMBER: _builtins.int + EVENTS_FIELD_NUMBER: _builtins.int + ENDPOINT_FIELD_NUMBER: _builtins.int + coder_id: _builtins.str + """(Required) the coder for elements in the TestStream events""" + @_builtins.property + def events(self) -> _containers.RepeatedCompositeFieldContainer[Global___TestStreamPayload.Event]: + """(Optional) If specified, the TestStream will replay these events.""" + + @_builtins.property + def endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """(Optional) If specified, points to a TestStreamService to be + used to retrieve events. + """ + + def __init__( + self, + *, + coder_id: _builtins.str | None = ..., + events: _abc.Iterable[Global___TestStreamPayload.Event] | None = ..., + endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["endpoint", b"endpoint"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coder_id", b"coder_id", "endpoint", b"endpoint", "events", b"events"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___TestStreamPayload: _TypeAlias = TestStreamPayload # noqa: Y015 + +@_typing.final +class WriteFilesPayload(_message.Message): + """The payload for the special-but-not-primitive WriteFiles transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class SideInputsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___SideInput: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___SideInput | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + SINK_FIELD_NUMBER: _builtins.int + FORMAT_FUNCTION_FIELD_NUMBER: _builtins.int + WINDOWED_WRITES_FIELD_NUMBER: _builtins.int + RUNNER_DETERMINED_SHARDING_FIELD_NUMBER: _builtins.int + SIDE_INPUTS_FIELD_NUMBER: _builtins.int + AUTO_SHARDED_FIELD_NUMBER: _builtins.int + windowed_writes: _builtins.bool + runner_determined_sharding: _builtins.bool + auto_sharded: _builtins.bool + """This is different from runner based sharding. This is done by the runner backend, where as runner_determined_sharding + is by the runner translator + """ + @_builtins.property + def sink(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the FileBasedSink.""" + + @_builtins.property + def format_function(self) -> Global___FunctionSpec: + """(Required) The format function.""" + + @_builtins.property + def side_inputs(self) -> _containers.MessageMap[_builtins.str, Global___SideInput]: ... + def __init__( + self, + *, + sink: Global___FunctionSpec | None = ..., + format_function: Global___FunctionSpec | None = ..., + windowed_writes: _builtins.bool | None = ..., + runner_determined_sharding: _builtins.bool | None = ..., + side_inputs: _abc.Mapping[_builtins.str, Global___SideInput] | None = ..., + auto_sharded: _builtins.bool | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["format_function", b"format_function", "sink", b"sink"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["auto_sharded", b"auto_sharded", "format_function", b"format_function", "runner_determined_sharding", b"runner_determined_sharding", "side_inputs", b"side_inputs", "sink", b"sink", "windowed_writes", b"windowed_writes"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___WriteFilesPayload: _TypeAlias = WriteFilesPayload # noqa: Y015 + +@_typing.final +class PubSubReadPayload(_message.Message): + """Payload used by Google Cloud Pub/Sub read transform. + This can be used by runners that wish to override Beam Pub/Sub read transform + with a native implementation. + The SDK should guarantee that only one of topic, subscription, + topic_runtime_overridden and subscription_runtime_overridden is set. + The output of PubSubReadPayload should be bytes of serialized PubsubMessage + proto if with_attributes == true. Otherwise, the bytes is the raw payload. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TOPIC_FIELD_NUMBER: _builtins.int + SUBSCRIPTION_FIELD_NUMBER: _builtins.int + TIMESTAMP_ATTRIBUTE_FIELD_NUMBER: _builtins.int + ID_ATTRIBUTE_FIELD_NUMBER: _builtins.int + WITH_ATTRIBUTES_FIELD_NUMBER: _builtins.int + TOPIC_RUNTIME_OVERRIDDEN_FIELD_NUMBER: _builtins.int + SUBSCRIPTION_RUNTIME_OVERRIDDEN_FIELD_NUMBER: _builtins.int + topic: _builtins.str + """Topic to read from. Exactly one of topic or subscription should be set. + Topic format is: /topics/project_id/subscription_name + """ + subscription: _builtins.str + """Subscription to read from. Exactly one of topic or subscription should be set. + Subscription format is: /subscriptions/project_id/subscription_name + """ + timestamp_attribute: _builtins.str + """Attribute that provides element timestamps.""" + id_attribute: _builtins.str + """Attribute to be used for uniquely identifying messages.""" + with_attributes: _builtins.bool + """If true, reads Pub/Sub payload as well as attributes. If false, reads only the payload.""" + topic_runtime_overridden: _builtins.str + """If set, the topic is expected to be provided during runtime.""" + subscription_runtime_overridden: _builtins.str + """If set, the subscription that is expected to be provided during runtime.""" + def __init__( + self, + *, + topic: _builtins.str | None = ..., + subscription: _builtins.str | None = ..., + timestamp_attribute: _builtins.str | None = ..., + id_attribute: _builtins.str | None = ..., + with_attributes: _builtins.bool | None = ..., + topic_runtime_overridden: _builtins.str | None = ..., + subscription_runtime_overridden: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id_attribute", b"id_attribute", "subscription", b"subscription", "subscription_runtime_overridden", b"subscription_runtime_overridden", "timestamp_attribute", b"timestamp_attribute", "topic", b"topic", "topic_runtime_overridden", b"topic_runtime_overridden", "with_attributes", b"with_attributes"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PubSubReadPayload: _TypeAlias = PubSubReadPayload # noqa: Y015 + +@_typing.final +class PubSubWritePayload(_message.Message): + """Payload used by Google Cloud Pub/Sub write transform. + This can be used by runners that wish to override Beam Pub/Sub write transform + with a native implementation. + The SDK should guarantee that only one of topic and topic_runtime_overridden + is set. + The output of PubSubWritePayload should be bytes if serialized PubsubMessage + proto. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TOPIC_FIELD_NUMBER: _builtins.int + TIMESTAMP_ATTRIBUTE_FIELD_NUMBER: _builtins.int + ID_ATTRIBUTE_FIELD_NUMBER: _builtins.int + TOPIC_RUNTIME_OVERRIDDEN_FIELD_NUMBER: _builtins.int + topic: _builtins.str + """Topic to write to. + Topic format is: /topics/project_id/subscription_name + """ + timestamp_attribute: _builtins.str + """Attribute that provides element timestamps.""" + id_attribute: _builtins.str + """Attribute that uniquely identify messages.""" + topic_runtime_overridden: _builtins.str + """If set, the topic is expected to be provided during runtime.""" + def __init__( + self, + *, + topic: _builtins.str | None = ..., + timestamp_attribute: _builtins.str | None = ..., + id_attribute: _builtins.str | None = ..., + topic_runtime_overridden: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["id_attribute", b"id_attribute", "timestamp_attribute", b"timestamp_attribute", "topic", b"topic", "topic_runtime_overridden", b"topic_runtime_overridden"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PubSubWritePayload: _TypeAlias = PubSubWritePayload # noqa: Y015 + +@_typing.final +class GroupIntoBatchesPayload(_message.Message): + """Payload for GroupIntoBatches composite transform.""" + + DESCRIPTOR: _descriptor.Descriptor + + BATCH_SIZE_FIELD_NUMBER: _builtins.int + BATCH_SIZE_BYTES_FIELD_NUMBER: _builtins.int + MAX_BUFFERING_DURATION_MILLIS_FIELD_NUMBER: _builtins.int + batch_size: _builtins.int + """Max size of a batch.""" + batch_size_bytes: _builtins.int + """Max byte size of a batch in element.""" + max_buffering_duration_millis: _builtins.int + """(Optional) Max duration a batch is allowed to be cached in states.""" + def __init__( + self, + *, + batch_size: _builtins.int | None = ..., + batch_size_bytes: _builtins.int | None = ..., + max_buffering_duration_millis: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["batch_size", b"batch_size", "batch_size_bytes", b"batch_size_bytes", "max_buffering_duration_millis", b"max_buffering_duration_millis"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___GroupIntoBatchesPayload: _TypeAlias = GroupIntoBatchesPayload # noqa: Y015 + +@_typing.final +class RedistributePayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ALLOW_DUPLICATES_FIELD_NUMBER: _builtins.int + allow_duplicates: _builtins.bool + def __init__( + self, + *, + allow_duplicates: _builtins.bool | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["allow_duplicates", b"allow_duplicates"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RedistributePayload: _TypeAlias = RedistributePayload # noqa: Y015 + +@_typing.final +class Coder(_message.Message): + """A coder, the binary format for serialization and deserialization of data in + a pipeline. + """ + + DESCRIPTOR: _descriptor.Descriptor + + SPEC_FIELD_NUMBER: _builtins.int + COMPONENT_CODER_IDS_FIELD_NUMBER: _builtins.int + @_builtins.property + def spec(self) -> Global___FunctionSpec: + """(Required) A specification for the coder, as a URN plus parameters. This + may be a cross-language agreed-upon format, or it may be a "custom coder" + that can only be used by a particular SDK. It does not include component + coders, as it is beneficial for these to be comprehensible to a runner + regardless of whether the binary format is agreed-upon. + """ + + @_builtins.property + def component_coder_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Optional) If this coder is parametric, such as ListCoder(VarIntCoder), + this is a list of the components. In order for encodings to be identical, + the FunctionSpec and all components must be identical, recursively. + """ + + def __init__( + self, + *, + spec: Global___FunctionSpec | None = ..., + component_coder_ids: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["spec", b"spec"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["component_coder_ids", b"component_coder_ids", "spec", b"spec"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Coder: _TypeAlias = Coder # noqa: Y015 + +@_typing.final +class StandardCoders(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardCoders._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + BYTES: StandardCoders._Enum.ValueType # 0 + """Components: None""" + STRING_UTF8: StandardCoders._Enum.ValueType # 10 + """Components: None""" + KV: StandardCoders._Enum.ValueType # 1 + """Components: The key and value coder, in that order.""" + BOOL: StandardCoders._Enum.ValueType # 12 + """Components: None""" + VARINT: StandardCoders._Enum.ValueType # 2 + """Variable length Encodes a 64-bit integer. + Components: None + """ + DOUBLE: StandardCoders._Enum.ValueType # 11 + """Encodes the floating point value as a big-endian 64-bit integer + according to the IEEE 754 double format bit layout. + Components: None + """ + ITERABLE: StandardCoders._Enum.ValueType # 3 + """Encodes an iterable of elements. + + The encoding for an iterable [e1...eN] of known length N is + + fixed32(N) + encode(e1) encode(e2) encode(e3) ... encode(eN) + + If the length is unknown, it is batched up into groups of size b1..bM + and encoded as + + fixed32(-1) + varInt64(b1) encode(e1) encode(e2) ... encode(e_b1) + varInt64(b2) encode(e_(b1+1)) encode(e_(b1+2)) ... encode(e_(b1+b2)) + ... + varInt64(bM) encode(e_(N-bM+1)) encode(e_(N-bM+2)) ... encode(eN) + varInt64(0) + + Components: Coder for a single element. + """ + TIMER: StandardCoders._Enum.ValueType # 4 + """Encodes a timer containing a user key, a dynamic timer tag, a clear bit, + a fire timestamp, a hold timestamp, the windows and the paneinfo. + The encoding is represented as: + user key - user defined key, uses the component coder. + dynamic timer tag - a string which identifies a timer. + windows - uses component coders. + clear bit - a boolean set for clearing the timer. + fire timestamp - a big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation of + negative values are lexicographically ordered before the byte representation + of positive values. This is typically done by subtracting -9223372036854775808 + from the value and encoding it as a signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + hold timestamp - similar to the fire timestamp. + paneinfo - similar to the paneinfo of the windowed_value. + Components: Coder for the key and windows. + """ + INTERVAL_WINDOW: StandardCoders._Enum.ValueType # 5 + """ + The following coders are typically not specified manually by the user, + but are used at runtime and must be supported by every SDK. + + Components: None + """ + LENGTH_PREFIX: StandardCoders._Enum.ValueType # 6 + """Components: The coder to attach a length prefix to""" + GLOBAL_WINDOW: StandardCoders._Enum.ValueType # 7 + """Components: None""" + WINDOWED_VALUE: StandardCoders._Enum.ValueType # 8 + """Encodes an element, the windows it is in, the timestamp of the element, + and the pane of the element. The encoding is represented as: + timestamp windows pane element + timestamp - A big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation + of negative values are lexicographically ordered before the byte + representation of positive values. This is typically done by + subtracting -9223372036854775808 from the value and encoding it as a + signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + + windows - The windows are encoded using the beam:coder:iterable:v1 + format, where the windows are encoded using the supplied window + coder. + + pane - The first byte of the pane info determines which type of + encoding is used, as well as the is_first, is_last and timing + fields. If this byte is bits [0 1 2 3 4 5 6 7], then: + * bits [0 1 2 3] determine the encoding as follows: + 0000 - The entire pane info is encoded as a single byte. + The is_first, is_last, and timing fields are encoded + as below, and the index and non-speculative index are + both zero (and hence are not encoded here). + 0001 - The pane info is encoded as this byte plus a single + VarInt encoded integer representing the pane index. The + non-speculative index can be derived as follows: + -1 if the pane is early, otherwise equal to index. + 0010 - The pane info is encoded as this byte plus two VarInt + encoded integers representing the pane index and + non-speculative index respectively. + * bits [4 5] encode the timing as follows: + 00 - early + 01 - on time + 10 - late + 11 - unknown + * bit 6 is 1 if this is the last pane, 0 otherwise. + Commonly set with `byte |= 0x02` + * bit 7 is 1 if this is the first pane, 0 otherwise. + Commonly set with `byte |= 0x01` + + element - The element incoded using the supplied element coder. + + Components: The element coder and the window coder, in that order. + """ + PARAM_WINDOWED_VALUE: StandardCoders._Enum.ValueType # 14 + """A windowed value coder with parameterized timestamp, windows and pane info. + Encodes an element with only the value of the windowed value. + Decodes the value and assigns the parameterized timestamp, windows and pane info to the + windowed value. + Components: The element coder and the window coder, in that order + The payload of this coder is an encoded windowed value using the + beam:coder:windowed_value:v1 coder parameterized by a beam:coder:bytes:v1 + element coder and the window coder that this param_windowed_value coder uses. + """ + STATE_BACKED_ITERABLE: StandardCoders._Enum.ValueType # 9 + """Encodes an iterable of elements, some of which may be stored elsewhere. + + The encoding for a state-backed iterable is the same as that for + an iterable, but the final varInt64(0) terminating the set of batches + may instead be replaced by + + varInt64(-1) + varInt64(len(token)) + token + + where token is an opaque byte string that can be used to fetch the + remainder of the iterable (e.g. over the state API). + + Components: Coder for a single element. + """ + CUSTOM_WINDOW: StandardCoders._Enum.ValueType # 16 + """Encodes an arbitrary user defined window and its max timestamp (inclusive). + The encoding format is: + maxTimestamp window + + maxTimestamp - A big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation + of negative values are lexicographically ordered before the byte + representation of positive values. This is typically done by + subtracting -9223372036854775808 from the value and encoding it as a + signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + + window - the window is encoded using the supplied window coder. + + Components: Coder for the custom window type. + """ + ROW: StandardCoders._Enum.ValueType # 13 + """Additional Standard Coders + -------------------------- + The following coders are not required to be implemented for an SDK or + runner to support the Beam model, but enable users to take advantage of + schema-aware transforms. + + Encodes a "row", an element with a known schema, defined by an + instance of Schema from schema.proto. + + A row is encoded as the concatenation of: + - The number of attributes in the schema, encoded with + beam:coder:varint:v1. This makes it possible to detect certain + allowed schema changes (appending or removing columns) in + long-running streaming pipelines. + - A byte array representing a packed bitset indicating null fields (a + 1 indicating a null) encoded with beam:coder:bytes:v1. The unused + bits in the last byte must be set to 0. If there are no nulls an + empty byte array is encoded. + The two-byte bitset (not including the lenghth-prefix) for the row + [NULL, 0, 0, 0, NULL, 0, 0, NULL, 0, NULL] would be + [0b10010001, 0b00000010] + - An encoding for each non-null field, concatenated together. + + Schema types are mapped to coders as follows: + AtomicType: + BYTE: not yet a standard coder (https://github.com/apache/beam/issues/19815) + INT16: not yet a standard coder (https://github.com/apache/beam/issues/19815) + INT32: beam:coder:varint:v1 + INT64: beam:coder:varint:v1 + FLOAT: not yet a standard coder (https://github.com/apache/beam/issues/19815) + DOUBLE: beam:coder:double:v1 + STRING: beam:coder:string_utf8:v1 + BOOLEAN: beam:coder:bool:v1 + BYTES: beam:coder:bytes:v1 + ArrayType: beam:coder:iterable:v1 (always has a known length) + MapType: not a standard coder, specification defined below. + RowType: beam:coder:row:v1 + LogicalType: Uses the coder for its representation. + + The MapType is encoded by: + - An INT32 representing the size of the map (N) + - Followed by N interleaved keys and values, encoded with their + corresponding coder. + + Nullable types in container types (ArrayType, MapType) per the + encoding described for general Nullable types below. + + Logical types understood by all SDKs should be defined in schema.proto. + Example of well known logical types: + beam:logical_type:schema:v1 + - Representation type: BYTES + - A Beam Schema stored as a serialized proto. + + The payload for RowCoder is an instance of Schema. + Components: None + """ + SCHEMA: StandardCoders._Enum.ValueType # 18 + """Similar to ROW above, but for arbitrary types that can be converted + to and from row objects, which can then be encoded with a schema. + """ + SHARDED_KEY: StandardCoders._Enum.ValueType # 15 + """Encodes a user key and a shard id which is an opaque byte string. + + The encoding for a sharded key consists of a shard id byte string and the + encoded user key in the following order: + + - shard id using beam:coder:bytes:v1 + - encoded user key + + Examples: + user key with an empty shard id + 0x00 + encode(user_key) + + user key with a shard id taking up two bytes. + 0x02 + 0x11 0x22 + encode(user_key) + + Components: the user key coder. + """ + NULLABLE: StandardCoders._Enum.ValueType # 17 + """Wraps a coder of a potentially null value + A Nullable Type is encoded by: + - A one byte null indicator, 0x00 for null values, or 0x01 for present + values. + - For present values the null indicator is followed by the value + encoded with it's corresponding coder. + Components: single coder for the value + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + BYTES: StandardCoders.Enum.ValueType # 0 + """Components: None""" + STRING_UTF8: StandardCoders.Enum.ValueType # 10 + """Components: None""" + KV: StandardCoders.Enum.ValueType # 1 + """Components: The key and value coder, in that order.""" + BOOL: StandardCoders.Enum.ValueType # 12 + """Components: None""" + VARINT: StandardCoders.Enum.ValueType # 2 + """Variable length Encodes a 64-bit integer. + Components: None + """ + DOUBLE: StandardCoders.Enum.ValueType # 11 + """Encodes the floating point value as a big-endian 64-bit integer + according to the IEEE 754 double format bit layout. + Components: None + """ + ITERABLE: StandardCoders.Enum.ValueType # 3 + """Encodes an iterable of elements. + + The encoding for an iterable [e1...eN] of known length N is + + fixed32(N) + encode(e1) encode(e2) encode(e3) ... encode(eN) + + If the length is unknown, it is batched up into groups of size b1..bM + and encoded as + + fixed32(-1) + varInt64(b1) encode(e1) encode(e2) ... encode(e_b1) + varInt64(b2) encode(e_(b1+1)) encode(e_(b1+2)) ... encode(e_(b1+b2)) + ... + varInt64(bM) encode(e_(N-bM+1)) encode(e_(N-bM+2)) ... encode(eN) + varInt64(0) + + Components: Coder for a single element. + """ + TIMER: StandardCoders.Enum.ValueType # 4 + """Encodes a timer containing a user key, a dynamic timer tag, a clear bit, + a fire timestamp, a hold timestamp, the windows and the paneinfo. + The encoding is represented as: + user key - user defined key, uses the component coder. + dynamic timer tag - a string which identifies a timer. + windows - uses component coders. + clear bit - a boolean set for clearing the timer. + fire timestamp - a big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation of + negative values are lexicographically ordered before the byte representation + of positive values. This is typically done by subtracting -9223372036854775808 + from the value and encoding it as a signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + hold timestamp - similar to the fire timestamp. + paneinfo - similar to the paneinfo of the windowed_value. + Components: Coder for the key and windows. + """ + INTERVAL_WINDOW: StandardCoders.Enum.ValueType # 5 + """ + The following coders are typically not specified manually by the user, + but are used at runtime and must be supported by every SDK. + + Components: None + """ + LENGTH_PREFIX: StandardCoders.Enum.ValueType # 6 + """Components: The coder to attach a length prefix to""" + GLOBAL_WINDOW: StandardCoders.Enum.ValueType # 7 + """Components: None""" + WINDOWED_VALUE: StandardCoders.Enum.ValueType # 8 + """Encodes an element, the windows it is in, the timestamp of the element, + and the pane of the element. The encoding is represented as: + timestamp windows pane element + timestamp - A big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation + of negative values are lexicographically ordered before the byte + representation of positive values. This is typically done by + subtracting -9223372036854775808 from the value and encoding it as a + signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + + windows - The windows are encoded using the beam:coder:iterable:v1 + format, where the windows are encoded using the supplied window + coder. + + pane - The first byte of the pane info determines which type of + encoding is used, as well as the is_first, is_last and timing + fields. If this byte is bits [0 1 2 3 4 5 6 7], then: + * bits [0 1 2 3] determine the encoding as follows: + 0000 - The entire pane info is encoded as a single byte. + The is_first, is_last, and timing fields are encoded + as below, and the index and non-speculative index are + both zero (and hence are not encoded here). + 0001 - The pane info is encoded as this byte plus a single + VarInt encoded integer representing the pane index. The + non-speculative index can be derived as follows: + -1 if the pane is early, otherwise equal to index. + 0010 - The pane info is encoded as this byte plus two VarInt + encoded integers representing the pane index and + non-speculative index respectively. + * bits [4 5] encode the timing as follows: + 00 - early + 01 - on time + 10 - late + 11 - unknown + * bit 6 is 1 if this is the last pane, 0 otherwise. + Commonly set with `byte |= 0x02` + * bit 7 is 1 if this is the first pane, 0 otherwise. + Commonly set with `byte |= 0x01` + + element - The element incoded using the supplied element coder. + + Components: The element coder and the window coder, in that order. + """ + PARAM_WINDOWED_VALUE: StandardCoders.Enum.ValueType # 14 + """A windowed value coder with parameterized timestamp, windows and pane info. + Encodes an element with only the value of the windowed value. + Decodes the value and assigns the parameterized timestamp, windows and pane info to the + windowed value. + Components: The element coder and the window coder, in that order + The payload of this coder is an encoded windowed value using the + beam:coder:windowed_value:v1 coder parameterized by a beam:coder:bytes:v1 + element coder and the window coder that this param_windowed_value coder uses. + """ + STATE_BACKED_ITERABLE: StandardCoders.Enum.ValueType # 9 + """Encodes an iterable of elements, some of which may be stored elsewhere. + + The encoding for a state-backed iterable is the same as that for + an iterable, but the final varInt64(0) terminating the set of batches + may instead be replaced by + + varInt64(-1) + varInt64(len(token)) + token + + where token is an opaque byte string that can be used to fetch the + remainder of the iterable (e.g. over the state API). + + Components: Coder for a single element. + """ + CUSTOM_WINDOW: StandardCoders.Enum.ValueType # 16 + """Encodes an arbitrary user defined window and its max timestamp (inclusive). + The encoding format is: + maxTimestamp window + + maxTimestamp - A big endian 8 byte integer representing millis-since-epoch. + The encoded representation is shifted so that the byte representation + of negative values are lexicographically ordered before the byte + representation of positive values. This is typically done by + subtracting -9223372036854775808 from the value and encoding it as a + signed big endian integer. Example values: + + -9223372036854775808: 00 00 00 00 00 00 00 00 + -255: 7F FF FF FF FF FF FF 01 + -1: 7F FF FF FF FF FF FF FF + 0: 80 00 00 00 00 00 00 00 + 1: 80 00 00 00 00 00 00 01 + 256: 80 00 00 00 00 00 01 00 + 9223372036854775807: FF FF FF FF FF FF FF FF + + window - the window is encoded using the supplied window coder. + + Components: Coder for the custom window type. + """ + ROW: StandardCoders.Enum.ValueType # 13 + """Additional Standard Coders + -------------------------- + The following coders are not required to be implemented for an SDK or + runner to support the Beam model, but enable users to take advantage of + schema-aware transforms. + + Encodes a "row", an element with a known schema, defined by an + instance of Schema from schema.proto. + + A row is encoded as the concatenation of: + - The number of attributes in the schema, encoded with + beam:coder:varint:v1. This makes it possible to detect certain + allowed schema changes (appending or removing columns) in + long-running streaming pipelines. + - A byte array representing a packed bitset indicating null fields (a + 1 indicating a null) encoded with beam:coder:bytes:v1. The unused + bits in the last byte must be set to 0. If there are no nulls an + empty byte array is encoded. + The two-byte bitset (not including the lenghth-prefix) for the row + [NULL, 0, 0, 0, NULL, 0, 0, NULL, 0, NULL] would be + [0b10010001, 0b00000010] + - An encoding for each non-null field, concatenated together. + + Schema types are mapped to coders as follows: + AtomicType: + BYTE: not yet a standard coder (https://github.com/apache/beam/issues/19815) + INT16: not yet a standard coder (https://github.com/apache/beam/issues/19815) + INT32: beam:coder:varint:v1 + INT64: beam:coder:varint:v1 + FLOAT: not yet a standard coder (https://github.com/apache/beam/issues/19815) + DOUBLE: beam:coder:double:v1 + STRING: beam:coder:string_utf8:v1 + BOOLEAN: beam:coder:bool:v1 + BYTES: beam:coder:bytes:v1 + ArrayType: beam:coder:iterable:v1 (always has a known length) + MapType: not a standard coder, specification defined below. + RowType: beam:coder:row:v1 + LogicalType: Uses the coder for its representation. + + The MapType is encoded by: + - An INT32 representing the size of the map (N) + - Followed by N interleaved keys and values, encoded with their + corresponding coder. + + Nullable types in container types (ArrayType, MapType) per the + encoding described for general Nullable types below. + + Logical types understood by all SDKs should be defined in schema.proto. + Example of well known logical types: + beam:logical_type:schema:v1 + - Representation type: BYTES + - A Beam Schema stored as a serialized proto. + + The payload for RowCoder is an instance of Schema. + Components: None + """ + SCHEMA: StandardCoders.Enum.ValueType # 18 + """Similar to ROW above, but for arbitrary types that can be converted + to and from row objects, which can then be encoded with a schema. + """ + SHARDED_KEY: StandardCoders.Enum.ValueType # 15 + """Encodes a user key and a shard id which is an opaque byte string. + + The encoding for a sharded key consists of a shard id byte string and the + encoded user key in the following order: + + - shard id using beam:coder:bytes:v1 + - encoded user key + + Examples: + user key with an empty shard id + 0x00 + encode(user_key) + + user key with a shard id taking up two bytes. + 0x02 + 0x11 0x22 + encode(user_key) + + Components: the user key coder. + """ + NULLABLE: StandardCoders.Enum.ValueType # 17 + """Wraps a coder of a potentially null value + A Nullable Type is encoded by: + - A one byte null indicator, 0x00 for null values, or 0x01 for present + values. + - For present values the null indicator is followed by the value + encoded with it's corresponding coder. + Components: single coder for the value + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardCoders: _TypeAlias = StandardCoders # noqa: Y015 + +@_typing.final +class WindowingStrategy(_message.Message): + """A windowing strategy describes the window function, triggering, allowed + lateness, and accumulation mode for a PCollection. + + TODO: consider inlining field on PCollection + """ + + DESCRIPTOR: _descriptor.Descriptor + + WINDOW_FN_FIELD_NUMBER: _builtins.int + MERGE_STATUS_FIELD_NUMBER: _builtins.int + WINDOW_CODER_ID_FIELD_NUMBER: _builtins.int + TRIGGER_FIELD_NUMBER: _builtins.int + ACCUMULATION_MODE_FIELD_NUMBER: _builtins.int + OUTPUT_TIME_FIELD_NUMBER: _builtins.int + CLOSING_BEHAVIOR_FIELD_NUMBER: _builtins.int + ALLOWED_LATENESS_FIELD_NUMBER: _builtins.int + ON_TIME_BEHAVIOR_FIELD_NUMBER: _builtins.int + ASSIGNS_TO_ONE_WINDOW_FIELD_NUMBER: _builtins.int + ENVIRONMENT_ID_FIELD_NUMBER: _builtins.int + merge_status: Global___MergeStatus.Enum.ValueType + """(Required) Whether or not the window fn is merging. + + This knowledge is required for many optimizations. + """ + window_coder_id: _builtins.str + """(Required) The coder for the windows of this PCollection.""" + accumulation_mode: Global___AccumulationMode.Enum.ValueType + """(Required) The accumulation mode indicates whether new panes are a full + replacement for prior panes or whether they are deltas to be combined + with other panes (the combine should correspond to whatever the upstream + grouping transform is). + """ + output_time: Global___OutputTime.Enum.ValueType + """(Required) The OutputTime specifies, for a grouping transform, how to + compute the aggregate timestamp. The window_fn will first possibly shift + it later, then the OutputTime takes the max, min, or ignores it and takes + the end of window. + + This is actually only for input to grouping transforms, but since they + may be introduced in runner-specific ways, it is carried along with the + windowing strategy. + """ + closing_behavior: Global___ClosingBehavior.Enum.ValueType + """(Required) Indicate when output should be omitted upon window expiration.""" + allowed_lateness: _builtins.int + """(Required) The duration, in milliseconds, beyond the end of a window at + which the window becomes droppable. + """ + on_time_behavior: Global___OnTimeBehavior.Enum.ValueType + """(Required) Indicate whether empty on-time panes should be omitted.""" + assigns_to_one_window: _builtins.bool + """(Required) Whether or not the window fn assigns inputs to exactly one window + + This knowledge is required for some optimizations + """ + environment_id: _builtins.str + """(Optional) Environment where the current window_fn should be applied in. + Runner that executes the pipeline may choose to override this if needed. + If not specified, environment will be decided by the runner. + """ + @_builtins.property + def window_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the UDF that assigns windows, + merges windows, and shifts timestamps before they are + combined according to the OutputTime. + """ + + @_builtins.property + def trigger(self) -> Global___Trigger: + """(Required) The trigger to use when grouping this PCollection.""" + + def __init__( + self, + *, + window_fn: Global___FunctionSpec | None = ..., + merge_status: Global___MergeStatus.Enum.ValueType | None = ..., + window_coder_id: _builtins.str | None = ..., + trigger: Global___Trigger | None = ..., + accumulation_mode: Global___AccumulationMode.Enum.ValueType | None = ..., + output_time: Global___OutputTime.Enum.ValueType | None = ..., + closing_behavior: Global___ClosingBehavior.Enum.ValueType | None = ..., + allowed_lateness: _builtins.int | None = ..., + on_time_behavior: Global___OnTimeBehavior.Enum.ValueType | None = ..., + assigns_to_one_window: _builtins.bool | None = ..., + environment_id: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["trigger", b"trigger", "window_fn", b"window_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["accumulation_mode", b"accumulation_mode", "allowed_lateness", b"allowed_lateness", "assigns_to_one_window", b"assigns_to_one_window", "closing_behavior", b"closing_behavior", "environment_id", b"environment_id", "merge_status", b"merge_status", "on_time_behavior", b"on_time_behavior", "output_time", b"output_time", "trigger", b"trigger", "window_coder_id", b"window_coder_id", "window_fn", b"window_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___WindowingStrategy: _TypeAlias = WindowingStrategy # noqa: Y015 + +@_typing.final +class MergeStatus(_message.Message): + """Whether or not a PCollection's WindowFn is non-merging, merging, or + merging-but-already-merged, in which case a subsequent GroupByKey is almost + always going to do something the user does not want + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[MergeStatus._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: MergeStatus._Enum.ValueType # 0 + NON_MERGING: MergeStatus._Enum.ValueType # 1 + """The WindowFn does not require merging. + Examples: global window, FixedWindows, SlidingWindows + """ + NEEDS_MERGE: MergeStatus._Enum.ValueType # 2 + """The WindowFn is merging and the PCollection has not had merging + performed. + Example: Sessions prior to a GroupByKey + """ + ALREADY_MERGED: MergeStatus._Enum.ValueType # 3 + """The WindowFn is merging and the PCollection has had merging occur + already. + Example: Sessions after a GroupByKey + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: MergeStatus.Enum.ValueType # 0 + NON_MERGING: MergeStatus.Enum.ValueType # 1 + """The WindowFn does not require merging. + Examples: global window, FixedWindows, SlidingWindows + """ + NEEDS_MERGE: MergeStatus.Enum.ValueType # 2 + """The WindowFn is merging and the PCollection has not had merging + performed. + Example: Sessions prior to a GroupByKey + """ + ALREADY_MERGED: MergeStatus.Enum.ValueType # 3 + """The WindowFn is merging and the PCollection has had merging occur + already. + Example: Sessions after a GroupByKey + """ + + def __init__( + self, + ) -> None: ... + +Global___MergeStatus: _TypeAlias = MergeStatus # noqa: Y015 + +@_typing.final +class AccumulationMode(_message.Message): + """Whether or not subsequent outputs of aggregations should be entire + replacement values or just the aggregation of inputs received since + the prior output. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[AccumulationMode._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: AccumulationMode._Enum.ValueType # 0 + DISCARDING: AccumulationMode._Enum.ValueType # 1 + """The aggregation is discarded when it is output""" + ACCUMULATING: AccumulationMode._Enum.ValueType # 2 + """The aggregation is accumulated across outputs""" + RETRACTING: AccumulationMode._Enum.ValueType # 3 + """The aggregation emits retractions when it is output""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: AccumulationMode.Enum.ValueType # 0 + DISCARDING: AccumulationMode.Enum.ValueType # 1 + """The aggregation is discarded when it is output""" + ACCUMULATING: AccumulationMode.Enum.ValueType # 2 + """The aggregation is accumulated across outputs""" + RETRACTING: AccumulationMode.Enum.ValueType # 3 + """The aggregation emits retractions when it is output""" + + def __init__( + self, + ) -> None: ... + +Global___AccumulationMode: _TypeAlias = AccumulationMode # noqa: Y015 + +@_typing.final +class ClosingBehavior(_message.Message): + """Controls whether or not an aggregating transform should output data + when a window expires. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ClosingBehavior._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: ClosingBehavior._Enum.ValueType # 0 + EMIT_ALWAYS: ClosingBehavior._Enum.ValueType # 1 + """Emit output when a window expires, whether or not there has been + any new data since the last output. + """ + EMIT_IF_NONEMPTY: ClosingBehavior._Enum.ValueType # 2 + """Only emit output when new data has arrives since the last output""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: ClosingBehavior.Enum.ValueType # 0 + EMIT_ALWAYS: ClosingBehavior.Enum.ValueType # 1 + """Emit output when a window expires, whether or not there has been + any new data since the last output. + """ + EMIT_IF_NONEMPTY: ClosingBehavior.Enum.ValueType # 2 + """Only emit output when new data has arrives since the last output""" + + def __init__( + self, + ) -> None: ... + +Global___ClosingBehavior: _TypeAlias = ClosingBehavior # noqa: Y015 + +@_typing.final +class OnTimeBehavior(_message.Message): + """Controls whether or not an aggregating transform should output data + when an on-time pane is empty. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[OnTimeBehavior._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: OnTimeBehavior._Enum.ValueType # 0 + FIRE_ALWAYS: OnTimeBehavior._Enum.ValueType # 1 + """Always fire the on-time pane. Even if there is no new data since + the previous firing, an element will be produced. + """ + FIRE_IF_NONEMPTY: OnTimeBehavior._Enum.ValueType # 2 + """Only fire the on-time pane if there is new data since the previous firing.""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: OnTimeBehavior.Enum.ValueType # 0 + FIRE_ALWAYS: OnTimeBehavior.Enum.ValueType # 1 + """Always fire the on-time pane. Even if there is no new data since + the previous firing, an element will be produced. + """ + FIRE_IF_NONEMPTY: OnTimeBehavior.Enum.ValueType # 2 + """Only fire the on-time pane if there is new data since the previous firing.""" + + def __init__( + self, + ) -> None: ... + +Global___OnTimeBehavior: _TypeAlias = OnTimeBehavior # noqa: Y015 + +@_typing.final +class OutputTime(_message.Message): + """When a number of windowed, timestamped inputs are aggregated, the timestamp + for the resulting output. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[OutputTime._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: OutputTime._Enum.ValueType # 0 + END_OF_WINDOW: OutputTime._Enum.ValueType # 1 + """The output has the timestamp of the end of the window.""" + LATEST_IN_PANE: OutputTime._Enum.ValueType # 2 + """The output has the latest timestamp of the input elements since + the last output. + """ + EARLIEST_IN_PANE: OutputTime._Enum.ValueType # 3 + """The output has the earliest timestamp of the input elements since + the last output. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: OutputTime.Enum.ValueType # 0 + END_OF_WINDOW: OutputTime.Enum.ValueType # 1 + """The output has the timestamp of the end of the window.""" + LATEST_IN_PANE: OutputTime.Enum.ValueType # 2 + """The output has the latest timestamp of the input elements since + the last output. + """ + EARLIEST_IN_PANE: OutputTime.Enum.ValueType # 3 + """The output has the earliest timestamp of the input elements since + the last output. + """ + + def __init__( + self, + ) -> None: ... + +Global___OutputTime: _TypeAlias = OutputTime # noqa: Y015 + +@_typing.final +class TimeDomain(_message.Message): + """The different time domains in the Beam model.""" + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[TimeDomain._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: TimeDomain._Enum.ValueType # 0 + EVENT_TIME: TimeDomain._Enum.ValueType # 1 + """Event time is time from the perspective of the data""" + PROCESSING_TIME: TimeDomain._Enum.ValueType # 2 + """Processing time is time from the perspective of the + execution of your pipeline + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + UNSPECIFIED: TimeDomain.Enum.ValueType # 0 + EVENT_TIME: TimeDomain.Enum.ValueType # 1 + """Event time is time from the perspective of the data""" + PROCESSING_TIME: TimeDomain.Enum.ValueType # 2 + """Processing time is time from the perspective of the + execution of your pipeline + """ + + def __init__( + self, + ) -> None: ... + +Global___TimeDomain: _TypeAlias = TimeDomain # noqa: Y015 + +@_typing.final +class Trigger(_message.Message): + """A small DSL for expressing when to emit new aggregations + from a GroupByKey or CombinePerKey + + A trigger is described in terms of when it is _ready_ to permit output. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class AfterAll(_message.Message): + """Ready when all subtriggers are ready.""" + + DESCRIPTOR: _descriptor.Descriptor + + SUBTRIGGERS_FIELD_NUMBER: _builtins.int + @_builtins.property + def subtriggers(self) -> _containers.RepeatedCompositeFieldContainer[Global___Trigger]: ... + def __init__( + self, + *, + subtriggers: _abc.Iterable[Global___Trigger] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["subtriggers", b"subtriggers"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AfterAny(_message.Message): + """Ready when any subtrigger is ready.""" + + DESCRIPTOR: _descriptor.Descriptor + + SUBTRIGGERS_FIELD_NUMBER: _builtins.int + @_builtins.property + def subtriggers(self) -> _containers.RepeatedCompositeFieldContainer[Global___Trigger]: ... + def __init__( + self, + *, + subtriggers: _abc.Iterable[Global___Trigger] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["subtriggers", b"subtriggers"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AfterEach(_message.Message): + """Starting with the first subtrigger, ready when the _current_ subtrigger + is ready. After output, advances the current trigger by one. + """ + + DESCRIPTOR: _descriptor.Descriptor + + SUBTRIGGERS_FIELD_NUMBER: _builtins.int + @_builtins.property + def subtriggers(self) -> _containers.RepeatedCompositeFieldContainer[Global___Trigger]: ... + def __init__( + self, + *, + subtriggers: _abc.Iterable[Global___Trigger] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["subtriggers", b"subtriggers"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AfterEndOfWindow(_message.Message): + """Ready after the input watermark is past the end of the window. + + May have implicitly-repeated subtriggers for early and late firings. + When the end of the window is reached, the trigger transitions between + the subtriggers. + """ + + DESCRIPTOR: _descriptor.Descriptor + + EARLY_FIRINGS_FIELD_NUMBER: _builtins.int + LATE_FIRINGS_FIELD_NUMBER: _builtins.int + @_builtins.property + def early_firings(self) -> Global___Trigger: + """(Optional) A trigger governing output prior to the end of the window.""" + + @_builtins.property + def late_firings(self) -> Global___Trigger: + """(Optional) A trigger governing output after the end of the window.""" + + def __init__( + self, + *, + early_firings: Global___Trigger | None = ..., + late_firings: Global___Trigger | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["early_firings", b"early_firings", "late_firings", b"late_firings"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["early_firings", b"early_firings", "late_firings", b"late_firings"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AfterProcessingTime(_message.Message): + """After input arrives, ready when the specified delay has passed.""" + + DESCRIPTOR: _descriptor.Descriptor + + TIMESTAMP_TRANSFORMS_FIELD_NUMBER: _builtins.int + @_builtins.property + def timestamp_transforms(self) -> _containers.RepeatedCompositeFieldContainer[Global___TimestampTransform]: + """(Required) The transforms to apply to an arriving element's timestamp, + in order + """ + + def __init__( + self, + *, + timestamp_transforms: _abc.Iterable[Global___TimestampTransform] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["timestamp_transforms", b"timestamp_transforms"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AfterSynchronizedProcessingTime(_message.Message): + """Ready whenever upstream processing time has all caught up with + the arrival time of an input element + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @_typing.final + class Default(_message.Message): + """The default trigger. Equivalent to AfterEndOfWindow { Late: Always }} but + specially denoted to indicate the user did not alter the triggering. + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @_typing.final + class ElementCount(_message.Message): + """Ready whenever the requisite number of input elements have arrived""" + + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_COUNT_FIELD_NUMBER: _builtins.int + element_count: _builtins.int + def __init__( + self, + *, + element_count: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_count", b"element_count"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class Never(_message.Message): + """Never ready. There will only be an ON_TIME final output at window + expiration. + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @_typing.final + class Always(_message.Message): + """Always ready. This can also be expressed as Repeat{ ElementCount(1) } but + is more explicit. + """ + + DESCRIPTOR: _descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @_typing.final + class OrFinally(_message.Message): + """Ready whenever either of its subtriggers are ready, but finishes output + when the finally subtrigger fires. + """ + + DESCRIPTOR: _descriptor.Descriptor + + MAIN_FIELD_NUMBER: _builtins.int + FINALLY_FIELD_NUMBER: _builtins.int + @_builtins.property + def main(self) -> Global___Trigger: + """(Required) Trigger governing main output; may fire repeatedly.""" + + def __init__( + self, + *, + main: Global___Trigger | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["finally", b"finally", "main", b"main"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["finally", b"finally", "main", b"main"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class Repeat(_message.Message): + """Ready whenever the subtrigger is ready; resets state when the subtrigger + completes. + """ + + DESCRIPTOR: _descriptor.Descriptor + + SUBTRIGGER_FIELD_NUMBER: _builtins.int + @_builtins.property + def subtrigger(self) -> Global___Trigger: + """(Require) Trigger that is run repeatedly.""" + + def __init__( + self, + *, + subtrigger: Global___Trigger | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["subtrigger", b"subtrigger"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["subtrigger", b"subtrigger"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + AFTER_ALL_FIELD_NUMBER: _builtins.int + AFTER_ANY_FIELD_NUMBER: _builtins.int + AFTER_EACH_FIELD_NUMBER: _builtins.int + AFTER_END_OF_WINDOW_FIELD_NUMBER: _builtins.int + AFTER_PROCESSING_TIME_FIELD_NUMBER: _builtins.int + AFTER_SYNCHRONIZED_PROCESSING_TIME_FIELD_NUMBER: _builtins.int + ALWAYS_FIELD_NUMBER: _builtins.int + DEFAULT_FIELD_NUMBER: _builtins.int + ELEMENT_COUNT_FIELD_NUMBER: _builtins.int + NEVER_FIELD_NUMBER: _builtins.int + OR_FINALLY_FIELD_NUMBER: _builtins.int + REPEAT_FIELD_NUMBER: _builtins.int + @_builtins.property + def after_all(self) -> Global___Trigger.AfterAll: ... + @_builtins.property + def after_any(self) -> Global___Trigger.AfterAny: ... + @_builtins.property + def after_each(self) -> Global___Trigger.AfterEach: ... + @_builtins.property + def after_end_of_window(self) -> Global___Trigger.AfterEndOfWindow: ... + @_builtins.property + def after_processing_time(self) -> Global___Trigger.AfterProcessingTime: ... + @_builtins.property + def after_synchronized_processing_time(self) -> Global___Trigger.AfterSynchronizedProcessingTime: ... + @_builtins.property + def always(self) -> Global___Trigger.Always: ... + @_builtins.property + def default(self) -> Global___Trigger.Default: ... + @_builtins.property + def element_count(self) -> Global___Trigger.ElementCount: ... + @_builtins.property + def never(self) -> Global___Trigger.Never: ... + @_builtins.property + def or_finally(self) -> Global___Trigger.OrFinally: ... + @_builtins.property + def repeat(self) -> Global___Trigger.Repeat: ... + def __init__( + self, + *, + after_all: Global___Trigger.AfterAll | None = ..., + after_any: Global___Trigger.AfterAny | None = ..., + after_each: Global___Trigger.AfterEach | None = ..., + after_end_of_window: Global___Trigger.AfterEndOfWindow | None = ..., + after_processing_time: Global___Trigger.AfterProcessingTime | None = ..., + after_synchronized_processing_time: Global___Trigger.AfterSynchronizedProcessingTime | None = ..., + always: Global___Trigger.Always | None = ..., + default: Global___Trigger.Default | None = ..., + element_count: Global___Trigger.ElementCount | None = ..., + never: Global___Trigger.Never | None = ..., + or_finally: Global___Trigger.OrFinally | None = ..., + repeat: Global___Trigger.Repeat | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["after_all", b"after_all", "after_any", b"after_any", "after_each", b"after_each", "after_end_of_window", b"after_end_of_window", "after_processing_time", b"after_processing_time", "after_synchronized_processing_time", b"after_synchronized_processing_time", "always", b"always", "default", b"default", "element_count", b"element_count", "never", b"never", "or_finally", b"or_finally", "repeat", b"repeat", "trigger", b"trigger"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["after_all", b"after_all", "after_any", b"after_any", "after_each", b"after_each", "after_end_of_window", b"after_end_of_window", "after_processing_time", b"after_processing_time", "after_synchronized_processing_time", b"after_synchronized_processing_time", "always", b"always", "default", b"default", "element_count", b"element_count", "never", b"never", "or_finally", b"or_finally", "repeat", b"repeat", "trigger", b"trigger"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_trigger: _TypeAlias = _typing.Literal["after_all", "after_any", "after_each", "after_end_of_window", "after_processing_time", "after_synchronized_processing_time", "always", "default", "element_count", "never", "or_finally", "repeat"] # noqa: Y015 + _WhichOneofArgType_trigger: _TypeAlias = _typing.Literal["trigger", b"trigger"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_trigger) -> _WhichOneofReturnType_trigger | None: ... + +Global___Trigger: _TypeAlias = Trigger # noqa: Y015 + +@_typing.final +class TimestampTransform(_message.Message): + """A specification for a transformation on a timestamp. + + Primarily used by AfterProcessingTime triggers to transform + the arrival time of input to a target time for firing. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Delay(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + DELAY_MILLIS_FIELD_NUMBER: _builtins.int + delay_millis: _builtins.int + """(Required) The delay, in milliseconds.""" + def __init__( + self, + *, + delay_millis: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["delay_millis", b"delay_millis"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class AlignTo(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + PERIOD_FIELD_NUMBER: _builtins.int + OFFSET_FIELD_NUMBER: _builtins.int + period: _builtins.int + """(Required) A duration to which delays should be quantized + in milliseconds. + """ + offset: _builtins.int + """(Required) An offset from 0 for the quantization specified by + alignment_size, in milliseconds + """ + def __init__( + self, + *, + period: _builtins.int | None = ..., + offset: _builtins.int | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["offset", b"offset", "period", b"period"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + DELAY_FIELD_NUMBER: _builtins.int + ALIGN_TO_FIELD_NUMBER: _builtins.int + @_builtins.property + def delay(self) -> Global___TimestampTransform.Delay: ... + @_builtins.property + def align_to(self) -> Global___TimestampTransform.AlignTo: ... + def __init__( + self, + *, + delay: Global___TimestampTransform.Delay | None = ..., + align_to: Global___TimestampTransform.AlignTo | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["align_to", b"align_to", "delay", b"delay", "timestamp_transform", b"timestamp_transform"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["align_to", b"align_to", "delay", b"delay", "timestamp_transform", b"timestamp_transform"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_timestamp_transform: _TypeAlias = _typing.Literal["delay", "align_to"] # noqa: Y015 + _WhichOneofArgType_timestamp_transform: _TypeAlias = _typing.Literal["timestamp_transform", b"timestamp_transform"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_timestamp_transform) -> _WhichOneofReturnType_timestamp_transform | None: ... + +Global___TimestampTransform: _TypeAlias = TimestampTransform # noqa: Y015 + +@_typing.final +class SideInput(_message.Message): + """A specification for how to "side input" a PCollection.""" + + DESCRIPTOR: _descriptor.Descriptor + + ACCESS_PATTERN_FIELD_NUMBER: _builtins.int + VIEW_FN_FIELD_NUMBER: _builtins.int + WINDOW_MAPPING_FN_FIELD_NUMBER: _builtins.int + @_builtins.property + def access_pattern(self) -> Global___FunctionSpec: + """(Required) URN of the access pattern required by the `view_fn` to present + the desired SDK-specific interface to a UDF. + + This access pattern defines the SDK harness <-> Runner Harness RPC + interface for accessing a side input. + + See StandardSideInputTypes for an enumeration of all side input types + defined. + """ + + @_builtins.property + def view_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the UDF that adapts a particular + access_pattern to a user-facing view type. + + For example, View.asSingleton() may include a `view_fn` that adapts a + specially-designed multimap to a single value per window. + """ + + @_builtins.property + def window_mapping_fn(self) -> Global___FunctionSpec: + """(Required) The FunctionSpec of the UDF that maps a main input window + to a side input window. + + For example, when the main input is in fixed windows of one hour, this + can specify that the side input should be accessed according to the day + in which that hour falls. + """ + + def __init__( + self, + *, + access_pattern: Global___FunctionSpec | None = ..., + view_fn: Global___FunctionSpec | None = ..., + window_mapping_fn: Global___FunctionSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["access_pattern", b"access_pattern", "view_fn", b"view_fn", "window_mapping_fn", b"window_mapping_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["access_pattern", b"access_pattern", "view_fn", b"view_fn", "window_mapping_fn", b"window_mapping_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SideInput: _TypeAlias = SideInput # noqa: Y015 + +@_typing.final +class StandardArtifacts(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Types: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _TypesEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardArtifacts._Types.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + FILE: StandardArtifacts._Types.ValueType # 0 + """A URN for locally-accessible artifact files. + payload: ArtifactFilePayload + """ + URL: StandardArtifacts._Types.ValueType # 1 + """A URN for artifacts described by URLs. + payload: ArtifactUrlPayload + """ + EMBEDDED: StandardArtifacts._Types.ValueType # 2 + """A URN for artifacts embedded in ArtifactInformation proto. + payload: EmbeddedFilePayload. + """ + PYPI: StandardArtifacts._Types.ValueType # 3 + """A URN for Python artifacts hosted on PYPI. + payload: PypiPayload + """ + MAVEN: StandardArtifacts._Types.ValueType # 4 + """A URN for Java artifacts hosted on a Maven repository. + payload: MavenPayload + """ + DEFERRED: StandardArtifacts._Types.ValueType # 5 + """A URN for deferred artifacts. + payload: DeferredArtifactPayload + """ + + class Types(_Types, metaclass=_TypesEnumTypeWrapper): ... + FILE: StandardArtifacts.Types.ValueType # 0 + """A URN for locally-accessible artifact files. + payload: ArtifactFilePayload + """ + URL: StandardArtifacts.Types.ValueType # 1 + """A URN for artifacts described by URLs. + payload: ArtifactUrlPayload + """ + EMBEDDED: StandardArtifacts.Types.ValueType # 2 + """A URN for artifacts embedded in ArtifactInformation proto. + payload: EmbeddedFilePayload. + """ + PYPI: StandardArtifacts.Types.ValueType # 3 + """A URN for Python artifacts hosted on PYPI. + payload: PypiPayload + """ + MAVEN: StandardArtifacts.Types.ValueType # 4 + """A URN for Java artifacts hosted on a Maven repository. + payload: MavenPayload + """ + DEFERRED: StandardArtifacts.Types.ValueType # 5 + """A URN for deferred artifacts. + payload: DeferredArtifactPayload + """ + + class _Roles: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _RolesEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardArtifacts._Roles.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + STAGING_TO: StandardArtifacts._Roles.ValueType # 0 + """A URN for staging-to role. + payload: ArtifactStagingToRolePayload + """ + PIP_REQUIREMENTS_FILE: StandardArtifacts._Roles.ValueType # 1 + """A URN for pip-requirements-file role. + payload: None + """ + GO_WORKER_BINARY: StandardArtifacts._Roles.ValueType # 2 + """A URN for the Go worker binary role. + This represents the executable for a Go SDK environment. + A Go environment may have one such artifact with this role. + payload: None + """ + + class Roles(_Roles, metaclass=_RolesEnumTypeWrapper): ... + STAGING_TO: StandardArtifacts.Roles.ValueType # 0 + """A URN for staging-to role. + payload: ArtifactStagingToRolePayload + """ + PIP_REQUIREMENTS_FILE: StandardArtifacts.Roles.ValueType # 1 + """A URN for pip-requirements-file role. + payload: None + """ + GO_WORKER_BINARY: StandardArtifacts.Roles.ValueType # 2 + """A URN for the Go worker binary role. + This represents the executable for a Go SDK environment. + A Go environment may have one such artifact with this role. + payload: None + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardArtifacts: _TypeAlias = StandardArtifacts # noqa: Y015 + +@_typing.final +class ArtifactFilePayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + PATH_FIELD_NUMBER: _builtins.int + SHA256_FIELD_NUMBER: _builtins.int + path: _builtins.str + """a string for an artifact file path e.g. "/tmp/foo.jar" """ + sha256: _builtins.str + """The hex-encoded sha256 checksum of the artifact.""" + def __init__( + self, + *, + path: _builtins.str | None = ..., + sha256: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["path", b"path", "sha256", b"sha256"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactFilePayload: _TypeAlias = ArtifactFilePayload # noqa: Y015 + +@_typing.final +class ArtifactUrlPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + URL_FIELD_NUMBER: _builtins.int + SHA256_FIELD_NUMBER: _builtins.int + url: _builtins.str + """a string for an artifact URL e.g. "https://.../foo.jar" or "gs://tmp/foo.jar" """ + sha256: _builtins.str + """(Optional) The hex-encoded sha256 checksum of the artifact if available.""" + def __init__( + self, + *, + url: _builtins.str | None = ..., + sha256: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["sha256", b"sha256", "url", b"url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactUrlPayload: _TypeAlias = ArtifactUrlPayload # noqa: Y015 + +@_typing.final +class EmbeddedFilePayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + DATA_FIELD_NUMBER: _builtins.int + data: _builtins.bytes + """raw data bytes for an embedded artifact""" + def __init__( + self, + *, + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___EmbeddedFilePayload: _TypeAlias = EmbeddedFilePayload # noqa: Y015 + +@_typing.final +class PyPIPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ARTIFACT_ID_FIELD_NUMBER: _builtins.int + VERSION_FIELD_NUMBER: _builtins.int + artifact_id: _builtins.str + """Pypi compatible artifact id e.g. "apache-beam" """ + version: _builtins.str + """Pypi compatible version string.""" + def __init__( + self, + *, + artifact_id: _builtins.str | None = ..., + version: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact_id", b"artifact_id", "version", b"version"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___PyPIPayload: _TypeAlias = PyPIPayload # noqa: Y015 + +@_typing.final +class MavenPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ARTIFACT_FIELD_NUMBER: _builtins.int + REPOSITORY_URL_FIELD_NUMBER: _builtins.int + artifact: _builtins.str + """A string specifying Maven artifact. + The standard format is "groupId:artifactId:version[:packaging[:classifier]]" + """ + repository_url: _builtins.str + """(Optional) Repository URL. If not specified, Maven central is used by default.""" + def __init__( + self, + *, + artifact: _builtins.str | None = ..., + repository_url: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["artifact", b"artifact", "repository_url", b"repository_url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MavenPayload: _TypeAlias = MavenPayload # noqa: Y015 + +@_typing.final +class DeferredArtifactPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + DATA_FIELD_NUMBER: _builtins.int + key: _builtins.str + """A unique string identifier assigned by the creator of this payload. The creator may use this key to confirm + whether they can parse the data. + """ + data: _builtins.bytes + """Data for deferred artifacts. Interpretation of bytes is delegated to the creator of this payload.""" + def __init__( + self, + *, + key: _builtins.str | None = ..., + data: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "key", b"key"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DeferredArtifactPayload: _TypeAlias = DeferredArtifactPayload # noqa: Y015 + +@_typing.final +class ArtifactStagingToRolePayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + STAGED_NAME_FIELD_NUMBER: _builtins.int + staged_name: _builtins.str + """A generated staged name (relative path under staging directory).""" + def __init__( + self, + *, + staged_name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["staged_name", b"staged_name"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactStagingToRolePayload: _TypeAlias = ArtifactStagingToRolePayload # noqa: Y015 + +@_typing.final +class ArtifactInformation(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + TYPE_URN_FIELD_NUMBER: _builtins.int + TYPE_PAYLOAD_FIELD_NUMBER: _builtins.int + ROLE_URN_FIELD_NUMBER: _builtins.int + ROLE_PAYLOAD_FIELD_NUMBER: _builtins.int + type_urn: _builtins.str + """A URN that describes the type of artifact""" + type_payload: _builtins.bytes + role_urn: _builtins.str + """A URN that describes the role of artifact""" + role_payload: _builtins.bytes + def __init__( + self, + *, + type_urn: _builtins.str | None = ..., + type_payload: _builtins.bytes | None = ..., + role_urn: _builtins.str | None = ..., + role_payload: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["role_payload", b"role_payload", "role_urn", b"role_urn", "type_payload", b"type_payload", "type_urn", b"type_urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArtifactInformation: _TypeAlias = ArtifactInformation # noqa: Y015 + +@_typing.final +class Environment(_message.Message): + """An environment for executing UDFs. By default, an SDK container URL, but + can also be a process forked by a command, or an externally managed process. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ResourceHintsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.bytes + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + DISPLAY_DATA_FIELD_NUMBER: _builtins.int + CAPABILITIES_FIELD_NUMBER: _builtins.int + DEPENDENCIES_FIELD_NUMBER: _builtins.int + RESOURCE_HINTS_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """(Required) The URN of the payload""" + payload: _builtins.bytes + """(Optional) The data specifying any parameters to the URN. If + the URN does not require any arguments, this may be omitted. + """ + @_builtins.property + def display_data(self) -> _containers.RepeatedCompositeFieldContainer[Global___DisplayData]: + """(Optional) Static display data for the environment. If there is none, + it may be omitted. + """ + + @_builtins.property + def capabilities(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """(Optional) A set of capabilities this environment supports. This is + typically a list of common URNs designating coders, transforms, etc. that + this environment understands (and a runner MAY use) despite not + appearing in the pipeline proto. This may also be used to indicate + support of optional protocols not tied to a concrete component. + """ + + @_builtins.property + def dependencies(self) -> _containers.RepeatedCompositeFieldContainer[Global___ArtifactInformation]: + """(Optional) artifact dependency information used for executing UDFs in this environment.""" + + @_builtins.property + def resource_hints(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: + """(Optional) A mapping of resource URNs to requested values. The encoding + of the values is specified by the URN. Resource hints are advisory; + a runner is free to ignore resource hints that it does not understand. + """ + + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + display_data: _abc.Iterable[Global___DisplayData] | None = ..., + capabilities: _abc.Iterable[_builtins.str] | None = ..., + dependencies: _abc.Iterable[Global___ArtifactInformation] | None = ..., + resource_hints: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["capabilities", b"capabilities", "dependencies", b"dependencies", "display_data", b"display_data", "payload", b"payload", "resource_hints", b"resource_hints", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Environment: _TypeAlias = Environment # noqa: Y015 + +@_typing.final +class StandardEnvironments(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Environments: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnvironmentsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardEnvironments._Environments.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + DOCKER: StandardEnvironments._Environments.ValueType # 0 + """A managed docker container to run user code. + Payload should be DockerPayload. + """ + PROCESS: StandardEnvironments._Environments.ValueType # 1 + """A managed native process to run user code. + Payload should be ProcessPayload. + """ + EXTERNAL: StandardEnvironments._Environments.ValueType # 2 + """An external non managed process to run user code. + Payload should be ExternalPayload. + """ + DEFAULT: StandardEnvironments._Environments.ValueType # 3 + """Used as a stub when context is missing a runner-provided default environment.""" + ANYOF: StandardEnvironments._Environments.ValueType # 4 + """A selection of equivalent fully-specified environments a runner may use. + Note that this environment itself does not declare any dependencies or capabilities, + as those may differ among the several alternatives. + Payload should be AnyOfEnvironmentPayload. + """ + + class Environments(_Environments, metaclass=_EnvironmentsEnumTypeWrapper): ... + DOCKER: StandardEnvironments.Environments.ValueType # 0 + """A managed docker container to run user code. + Payload should be DockerPayload. + """ + PROCESS: StandardEnvironments.Environments.ValueType # 1 + """A managed native process to run user code. + Payload should be ProcessPayload. + """ + EXTERNAL: StandardEnvironments.Environments.ValueType # 2 + """An external non managed process to run user code. + Payload should be ExternalPayload. + """ + DEFAULT: StandardEnvironments.Environments.ValueType # 3 + """Used as a stub when context is missing a runner-provided default environment.""" + ANYOF: StandardEnvironments.Environments.ValueType # 4 + """A selection of equivalent fully-specified environments a runner may use. + Note that this environment itself does not declare any dependencies or capabilities, + as those may differ among the several alternatives. + Payload should be AnyOfEnvironmentPayload. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardEnvironments: _TypeAlias = StandardEnvironments # noqa: Y015 + +@_typing.final +class DockerPayload(_message.Message): + """The payload of a Docker image""" + + DESCRIPTOR: _descriptor.Descriptor + + CONTAINER_IMAGE_FIELD_NUMBER: _builtins.int + container_image: _builtins.str + """implicitly linux_amd64.""" + def __init__( + self, + *, + container_image: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["container_image", b"container_image"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DockerPayload: _TypeAlias = DockerPayload # noqa: Y015 + +@_typing.final +class ProcessPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class EnvEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + OS_FIELD_NUMBER: _builtins.int + ARCH_FIELD_NUMBER: _builtins.int + COMMAND_FIELD_NUMBER: _builtins.int + ENV_FIELD_NUMBER: _builtins.int + os: _builtins.str + """"linux", "darwin", ..""" + arch: _builtins.str + """"amd64", ..""" + command: _builtins.str + """process to execute""" + @_builtins.property + def env(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """Environment variables""" + + def __init__( + self, + *, + os: _builtins.str | None = ..., + arch: _builtins.str | None = ..., + command: _builtins.str | None = ..., + env: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["arch", b"arch", "command", b"command", "env", b"env", "os", b"os"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ProcessPayload: _TypeAlias = ProcessPayload # noqa: Y015 + +@_typing.final +class ExternalPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ParamsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + ENDPOINT_FIELD_NUMBER: _builtins.int + PARAMS_FIELD_NUMBER: _builtins.int + @_builtins.property + def endpoint(self) -> _endpoints_pb2.ApiServiceDescriptor: + """Serving BeamFnExternalWorkerPool API.""" + + @_builtins.property + def params(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """Arbitrary extra parameters to pass""" + + def __init__( + self, + *, + endpoint: _endpoints_pb2.ApiServiceDescriptor | None = ..., + params: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["endpoint", b"endpoint"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["endpoint", b"endpoint", "params", b"params"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ExternalPayload: _TypeAlias = ExternalPayload # noqa: Y015 + +@_typing.final +class AnyOfEnvironmentPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ENVIRONMENTS_FIELD_NUMBER: _builtins.int + @_builtins.property + def environments(self) -> _containers.RepeatedCompositeFieldContainer[Global___Environment]: + """Each is fully contained (with their own dependencies, capabilities, etc.)""" + + def __init__( + self, + *, + environments: _abc.Iterable[Global___Environment] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["environments", b"environments"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___AnyOfEnvironmentPayload: _TypeAlias = AnyOfEnvironmentPayload # noqa: Y015 + +@_typing.final +class StandardProtocols(_message.Message): + """These URNs are used to indicate capabilities of environments that cannot + simply be expressed as a component (such as a Coder or PTransform) that this + environment understands. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardProtocols._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + LEGACY_PROGRESS_REPORTING: StandardProtocols._Enum.ValueType # 0 + """Indicates support for progress reporting via the legacy Metrics proto.""" + PROGRESS_REPORTING: StandardProtocols._Enum.ValueType # 1 + """Indicates support for progress reporting via the new MonitoringInfo proto.""" + WORKER_STATUS: StandardProtocols._Enum.ValueType # 2 + """Indicates support for worker status protocol defined at + https://s.apache.org/beam-fn-api-harness-status. + """ + MULTI_CORE_BUNDLE_PROCESSING: StandardProtocols._Enum.ValueType # 3 + """Indicates this SDK can take advantage of multiple cores when processing + concurrent process bundle requests. (Note that all SDKs must process + an unbounded number of concurrent process bundle requests; this capability + simply indicates this SDK can actually parallelize the work across multiple + cores. + """ + SIBLING_WORKERS: StandardProtocols._Enum.ValueType # 5 + """Indicates this SDK can cheaply spawn sibling workers (e.g. within the + same container) to work around the fact that it cannot take advantage + of multiple cores (i.e. MULTI_CORE_BUNDLE_PROCESSING is not set). + """ + HARNESS_MONITORING_INFOS: StandardProtocols._Enum.ValueType # 4 + """Indicates that this SDK handles the InstructionRequest of type + HarnessMonitoringInfosRequest. + A request to provide full MonitoringInfo data associated with + the entire SDK harness process, not specific to a bundle. + """ + CONTROL_REQUEST_ELEMENTS_EMBEDDING: StandardProtocols._Enum.ValueType # 6 + """Indicates that this SDK can process elements embedded in the + ProcessBundleRequest. See more about the protocol at + https://s.apache.org/beam-fn-api-control-data-embedding + """ + STATE_CACHING: StandardProtocols._Enum.ValueType # 7 + """Indicates that this SDK can cache user state and side inputs across + bundle boundaries. This is a hint to runners that runners can rely on the + SDKs ability to store the data in memory reducing the amount of memory + used overall. + """ + DATA_SAMPLING: StandardProtocols._Enum.ValueType # 8 + """Indicates that this SDK can sample in-flight elements. These samples can + then be queried using the SampleDataRequest. Samples are uniquely associated + with a PCollection. Meaning, samples are taken for each PCollection + during bundle processing. This is disabled by default and enabled with the + `enable_data_sampling` experiment. + """ + SDK_CONSUMING_RECEIVED_DATA: StandardProtocols._Enum.ValueType # 9 + """Indicates whether the SDK sets the consuming_received_data field on + the ProcessBundleProgressResponse messages. + """ + ORDERED_LIST_STATE: StandardProtocols._Enum.ValueType # 10 + """Indicates whether the SDK supports ordered list state.""" + ELEMENT_METADATA: StandardProtocols._Enum.ValueType # 11 + """Indicates support for reading, writing and propagating Element's metadata""" + MULTIMAP_STATE: StandardProtocols._Enum.ValueType # 12 + """Indicates whether the SDK supports multimap state.""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + LEGACY_PROGRESS_REPORTING: StandardProtocols.Enum.ValueType # 0 + """Indicates support for progress reporting via the legacy Metrics proto.""" + PROGRESS_REPORTING: StandardProtocols.Enum.ValueType # 1 + """Indicates support for progress reporting via the new MonitoringInfo proto.""" + WORKER_STATUS: StandardProtocols.Enum.ValueType # 2 + """Indicates support for worker status protocol defined at + https://s.apache.org/beam-fn-api-harness-status. + """ + MULTI_CORE_BUNDLE_PROCESSING: StandardProtocols.Enum.ValueType # 3 + """Indicates this SDK can take advantage of multiple cores when processing + concurrent process bundle requests. (Note that all SDKs must process + an unbounded number of concurrent process bundle requests; this capability + simply indicates this SDK can actually parallelize the work across multiple + cores. + """ + SIBLING_WORKERS: StandardProtocols.Enum.ValueType # 5 + """Indicates this SDK can cheaply spawn sibling workers (e.g. within the + same container) to work around the fact that it cannot take advantage + of multiple cores (i.e. MULTI_CORE_BUNDLE_PROCESSING is not set). + """ + HARNESS_MONITORING_INFOS: StandardProtocols.Enum.ValueType # 4 + """Indicates that this SDK handles the InstructionRequest of type + HarnessMonitoringInfosRequest. + A request to provide full MonitoringInfo data associated with + the entire SDK harness process, not specific to a bundle. + """ + CONTROL_REQUEST_ELEMENTS_EMBEDDING: StandardProtocols.Enum.ValueType # 6 + """Indicates that this SDK can process elements embedded in the + ProcessBundleRequest. See more about the protocol at + https://s.apache.org/beam-fn-api-control-data-embedding + """ + STATE_CACHING: StandardProtocols.Enum.ValueType # 7 + """Indicates that this SDK can cache user state and side inputs across + bundle boundaries. This is a hint to runners that runners can rely on the + SDKs ability to store the data in memory reducing the amount of memory + used overall. + """ + DATA_SAMPLING: StandardProtocols.Enum.ValueType # 8 + """Indicates that this SDK can sample in-flight elements. These samples can + then be queried using the SampleDataRequest. Samples are uniquely associated + with a PCollection. Meaning, samples are taken for each PCollection + during bundle processing. This is disabled by default and enabled with the + `enable_data_sampling` experiment. + """ + SDK_CONSUMING_RECEIVED_DATA: StandardProtocols.Enum.ValueType # 9 + """Indicates whether the SDK sets the consuming_received_data field on + the ProcessBundleProgressResponse messages. + """ + ORDERED_LIST_STATE: StandardProtocols.Enum.ValueType # 10 + """Indicates whether the SDK supports ordered list state.""" + ELEMENT_METADATA: StandardProtocols.Enum.ValueType # 11 + """Indicates support for reading, writing and propagating Element's metadata""" + MULTIMAP_STATE: StandardProtocols.Enum.ValueType # 12 + """Indicates whether the SDK supports multimap state.""" + + def __init__( + self, + ) -> None: ... + +Global___StandardProtocols: _TypeAlias = StandardProtocols # noqa: Y015 + +@_typing.final +class StandardRunnerProtocols(_message.Message): + """These URNs are used to indicate capabilities of runner that an environment + may take advantage of when interacting with this runner. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardRunnerProtocols._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + MONITORING_INFO_SHORT_IDS: StandardRunnerProtocols._Enum.ValueType # 0 + """Indicates suport the MonitoringInfo short id protocol.""" + CONTROL_RESPONSE_ELEMENTS_EMBEDDING: StandardRunnerProtocols._Enum.ValueType # 6 + """Indicates that this runner can process elements embedded in the + ProcessBundleResponse. See more about the protocol at + https://s.apache.org/beam-fn-api-control-data-embedding + """ + MULTIMAP_KEYS_VALUES_SIDE_INPUT: StandardRunnerProtocols._Enum.ValueType # 7 + """Indicates that this runner can handle the multimap_keys_values_side_input + style read of a multimap side input. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + MONITORING_INFO_SHORT_IDS: StandardRunnerProtocols.Enum.ValueType # 0 + """Indicates suport the MonitoringInfo short id protocol.""" + CONTROL_RESPONSE_ELEMENTS_EMBEDDING: StandardRunnerProtocols.Enum.ValueType # 6 + """Indicates that this runner can process elements embedded in the + ProcessBundleResponse. See more about the protocol at + https://s.apache.org/beam-fn-api-control-data-embedding + """ + MULTIMAP_KEYS_VALUES_SIDE_INPUT: StandardRunnerProtocols.Enum.ValueType # 7 + """Indicates that this runner can handle the multimap_keys_values_side_input + style read of a multimap side input. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardRunnerProtocols: _TypeAlias = StandardRunnerProtocols # noqa: Y015 + +@_typing.final +class StandardRequirements(_message.Message): + """These URNs are used to indicate requirements of a pipeline that cannot + simply be expressed as a component (such as a Coder or PTransform) that the + runner must understand. In many cases, this indicates a particular field + of a transform must be inspected and respected (which allows new fields + to be added in a forwards-compatible way). + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardRequirements._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + REQUIRES_STATEFUL_PROCESSING: StandardRequirements._Enum.ValueType # 0 + """This requirement indicates the state_specs and timer_family_specs fields of ParDo + transform payloads must be inspected. + """ + REQUIRES_BUNDLE_FINALIZATION: StandardRequirements._Enum.ValueType # 1 + """This requirement indicates the requests_finalization field of ParDo + transform payloads must be inspected. + """ + REQUIRES_STABLE_INPUT: StandardRequirements._Enum.ValueType # 2 + """This requirement indicates the requires_stable_input field of ParDo + transform payloads must be inspected. + """ + REQUIRES_TIME_SORTED_INPUT: StandardRequirements._Enum.ValueType # 3 + """This requirement indicates the requires_time_sorted_input field of ParDo + transform payloads must be inspected. + """ + REQUIRES_SPLITTABLE_DOFN: StandardRequirements._Enum.ValueType # 4 + """This requirement indicates the restriction_coder_id field of ParDo + transform payloads must be inspected. + """ + REQUIRES_ON_WINDOW_EXPIRATION: StandardRequirements._Enum.ValueType # 5 + """This requirement indicates that the on_window_expiration_timer_family_spec field + of ParDo transform payloads must be inspected. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + REQUIRES_STATEFUL_PROCESSING: StandardRequirements.Enum.ValueType # 0 + """This requirement indicates the state_specs and timer_family_specs fields of ParDo + transform payloads must be inspected. + """ + REQUIRES_BUNDLE_FINALIZATION: StandardRequirements.Enum.ValueType # 1 + """This requirement indicates the requests_finalization field of ParDo + transform payloads must be inspected. + """ + REQUIRES_STABLE_INPUT: StandardRequirements.Enum.ValueType # 2 + """This requirement indicates the requires_stable_input field of ParDo + transform payloads must be inspected. + """ + REQUIRES_TIME_SORTED_INPUT: StandardRequirements.Enum.ValueType # 3 + """This requirement indicates the requires_time_sorted_input field of ParDo + transform payloads must be inspected. + """ + REQUIRES_SPLITTABLE_DOFN: StandardRequirements.Enum.ValueType # 4 + """This requirement indicates the restriction_coder_id field of ParDo + transform payloads must be inspected. + """ + REQUIRES_ON_WINDOW_EXPIRATION: StandardRequirements.Enum.ValueType # 5 + """This requirement indicates that the on_window_expiration_timer_family_spec field + of ParDo transform payloads must be inspected. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardRequirements: _TypeAlias = StandardRequirements # noqa: Y015 + +@_typing.final +class FunctionSpec(_message.Message): + """A URN along with a parameter object whose schema is determined by the + URN. + + This structure is reused in two distinct, but compatible, ways: + + 1. This can be a specification of the function over PCollections + that a PTransform computes. + 2. This can be a specification of a user-defined function, possibly + SDK-specific. (external to this message must be adequate context + to indicate the environment in which the UDF can be understood). + + Though not explicit in this proto, there are two possibilities + for the relationship of a runner to this specification that + one should bear in mind: + + 1. The runner understands the URN. For example, it might be + a well-known URN like "beam:transform:Top" or + "beam:window_fn:FixedWindows" with + an agreed-upon payload (e.g. a number or duration, + respectively). + 2. The runner does not understand the URN. It might be an + SDK specific URN such as "beam:dofn:javasdk:1.0" + that indicates to the SDK what the payload is, + such as a serialized Java DoFn from a particular + version of the Beam Java SDK. The payload will often + then be an opaque message such as bytes in a + language-specific serialization format. + """ + + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """(Required) A URN that describes the accompanying payload. + For any URN that is not recognized (by whomever is inspecting + it) the parameter payload should be treated as opaque and + passed as-is. + """ + payload: _builtins.bytes + """(Optional) The data specifying any parameters to the URN. If + the URN does not require any arguments, this may be omitted. + """ + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___FunctionSpec: _TypeAlias = FunctionSpec # noqa: Y015 + +@_typing.final +class StandardDisplayData(_message.Message): + """A set of well known URNs describing display data. + + All descriptions must contain how the value should be classified and how it + is encoded. Note that some types are logical types which convey contextual + information about the pipeline in addition to an encoding while others only + specify the encoding itself. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _DisplayData: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _DisplayDataEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardDisplayData._DisplayData.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + LABELLED: StandardDisplayData._DisplayData.ValueType # 0 + """A string label and value. Has a payload containing an encoded + LabelledPayload. + """ + + class DisplayData(_DisplayData, metaclass=_DisplayDataEnumTypeWrapper): ... + LABELLED: StandardDisplayData.DisplayData.ValueType # 0 + """A string label and value. Has a payload containing an encoded + LabelledPayload. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardDisplayData: _TypeAlias = StandardDisplayData # noqa: Y015 + +@_typing.final +class LabelledPayload(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + LABEL_FIELD_NUMBER: _builtins.int + STRING_VALUE_FIELD_NUMBER: _builtins.int + BOOL_VALUE_FIELD_NUMBER: _builtins.int + DOUBLE_VALUE_FIELD_NUMBER: _builtins.int + INT_VALUE_FIELD_NUMBER: _builtins.int + KEY_FIELD_NUMBER: _builtins.int + NAMESPACE_FIELD_NUMBER: _builtins.int + label: _builtins.str + """(Required) A human readable label for the value.""" + string_value: _builtins.str + bool_value: _builtins.bool + double_value: _builtins.float + int_value: _builtins.int + key: _builtins.str + """(Required) The key identifies the actual content of the metadata.""" + namespace: _builtins.str + """(Required) The namespace describes the context that specified the key.""" + def __init__( + self, + *, + label: _builtins.str | None = ..., + string_value: _builtins.str | None = ..., + bool_value: _builtins.bool | None = ..., + double_value: _builtins.float | None = ..., + int_value: _builtins.int | None = ..., + key: _builtins.str | None = ..., + namespace: _builtins.str | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "int_value", b"int_value", "string_value", b"string_value", "value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "int_value", b"int_value", "key", b"key", "label", b"label", "namespace", b"namespace", "string_value", b"string_value", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_value: _TypeAlias = _typing.Literal["string_value", "bool_value", "double_value", "int_value"] # noqa: Y015 + _WhichOneofArgType_value: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_value) -> _WhichOneofReturnType_value | None: ... + +Global___LabelledPayload: _TypeAlias = LabelledPayload # noqa: Y015 + +@_typing.final +class DisplayData(_message.Message): + """Static display data associated with a pipeline component. Display data is + useful for pipeline runners IOs and diagnostic dashboards to display details + about annotated components. + """ + + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """A key used to describe the type of display data. See StandardDisplayData + for the set of well known urns describing how the payload is meant to be + interpreted. + """ + payload: _builtins.bytes + """(Optional) The data specifying any parameters to the URN. If + the URN does not require any arguments, this may be omitted. + """ + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___DisplayData: _TypeAlias = DisplayData # noqa: Y015 + +@_typing.final +class MessageWithComponents(_message.Message): + """The following transforms are not part of the RunnerApi specification, + but may be useful for graph construction and manipulation. + + A disjoint union of all the things that may contain references + that require Components to resolve. + """ + + DESCRIPTOR: _descriptor.Descriptor + + COMPONENTS_FIELD_NUMBER: _builtins.int + CODER_FIELD_NUMBER: _builtins.int + COMBINE_PAYLOAD_FIELD_NUMBER: _builtins.int + FUNCTION_SPEC_FIELD_NUMBER: _builtins.int + PAR_DO_PAYLOAD_FIELD_NUMBER: _builtins.int + PTRANSFORM_FIELD_NUMBER: _builtins.int + PCOLLECTION_FIELD_NUMBER: _builtins.int + READ_PAYLOAD_FIELD_NUMBER: _builtins.int + SIDE_INPUT_FIELD_NUMBER: _builtins.int + WINDOW_INTO_PAYLOAD_FIELD_NUMBER: _builtins.int + WINDOWING_STRATEGY_FIELD_NUMBER: _builtins.int + @_builtins.property + def components(self) -> Global___Components: + """(Optional) The by-reference components of the root message, + enabling a standalone message. + + If this is absent, it is expected that there are no + references. + """ + + @_builtins.property + def coder(self) -> Global___Coder: ... + @_builtins.property + def combine_payload(self) -> Global___CombinePayload: ... + @_builtins.property + def function_spec(self) -> Global___FunctionSpec: ... + @_builtins.property + def par_do_payload(self) -> Global___ParDoPayload: ... + @_builtins.property + def ptransform(self) -> Global___PTransform: ... + @_builtins.property + def pcollection(self) -> Global___PCollection: ... + @_builtins.property + def read_payload(self) -> Global___ReadPayload: ... + @_builtins.property + def side_input(self) -> Global___SideInput: ... + @_builtins.property + def window_into_payload(self) -> Global___WindowIntoPayload: ... + @_builtins.property + def windowing_strategy(self) -> Global___WindowingStrategy: ... + def __init__( + self, + *, + components: Global___Components | None = ..., + coder: Global___Coder | None = ..., + combine_payload: Global___CombinePayload | None = ..., + function_spec: Global___FunctionSpec | None = ..., + par_do_payload: Global___ParDoPayload | None = ..., + ptransform: Global___PTransform | None = ..., + pcollection: Global___PCollection | None = ..., + read_payload: Global___ReadPayload | None = ..., + side_input: Global___SideInput | None = ..., + window_into_payload: Global___WindowIntoPayload | None = ..., + windowing_strategy: Global___WindowingStrategy | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["coder", b"coder", "combine_payload", b"combine_payload", "components", b"components", "function_spec", b"function_spec", "par_do_payload", b"par_do_payload", "pcollection", b"pcollection", "ptransform", b"ptransform", "read_payload", b"read_payload", "root", b"root", "side_input", b"side_input", "window_into_payload", b"window_into_payload", "windowing_strategy", b"windowing_strategy"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["coder", b"coder", "combine_payload", b"combine_payload", "components", b"components", "function_spec", b"function_spec", "par_do_payload", b"par_do_payload", "pcollection", b"pcollection", "ptransform", b"ptransform", "read_payload", b"read_payload", "root", b"root", "side_input", b"side_input", "window_into_payload", b"window_into_payload", "windowing_strategy", b"windowing_strategy"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_root: _TypeAlias = _typing.Literal["coder", "combine_payload", "function_spec", "par_do_payload", "ptransform", "pcollection", "read_payload", "side_input", "window_into_payload", "windowing_strategy"] # noqa: Y015 + _WhichOneofArgType_root: _TypeAlias = _typing.Literal["root", b"root"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_root) -> _WhichOneofReturnType_root | None: ... + +Global___MessageWithComponents: _TypeAlias = MessageWithComponents # noqa: Y015 + +@_typing.final +class ExecutableStagePayload(_message.Message): + """The payload for an executable stage. This will eventually be passed to an SDK in the form of a + ProcessBundleDescriptor. + """ + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class SideInputId(_message.Message): + """A reference to a side input. Side inputs are uniquely identified by PTransform id and + local name. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LOCAL_NAME_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform that references this side input.""" + local_name: _builtins.str + """(Required) The local name of this side input from the PTransform that references it.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + local_name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["local_name", b"local_name", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class UserStateId(_message.Message): + """A reference to user state. User states are uniquely identified by PTransform id and + local name. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LOCAL_NAME_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform that references this user state.""" + local_name: _builtins.str + """(Required) The local name of this user state for the PTransform that references it.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + local_name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["local_name", b"local_name", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class TimerId(_message.Message): + """A reference to a timer. Timers are uniquely identified by PTransform id and + local name. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LOCAL_NAME_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform that references this timer.""" + local_name: _builtins.str + """(Required) The local name of this timer for the PTransform that references it.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + local_name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["local_name", b"local_name", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class TimerFamilyId(_message.Message): + """A reference to a timer. Timers are uniquely identified by PTransform id and + local name. + """ + + DESCRIPTOR: _descriptor.Descriptor + + TRANSFORM_ID_FIELD_NUMBER: _builtins.int + LOCAL_NAME_FIELD_NUMBER: _builtins.int + transform_id: _builtins.str + """(Required) The id of the PTransform that references this timer family.""" + local_name: _builtins.str + """(Required) The local name of this timer family for the PTransform that references it.""" + def __init__( + self, + *, + transform_id: _builtins.str | None = ..., + local_name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["local_name", b"local_name", "transform_id", b"transform_id"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + @_typing.final + class WireCoderSetting(_message.Message): + """Settings that decide the coder type of wire coder.""" + + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + INPUT_OR_OUTPUT_ID_FIELD_NUMBER: _builtins.int + TIMER_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """(Required) The URN of the wire coder. + Note that only windowed value coder or parameterized windowed value coder are supported. + """ + payload: _builtins.bytes + """(Optional) The data specifying any parameters to the URN. If + the URN is beam:coder:windowed_value:v1, this may be omitted. If the URN is + beam:coder:param_windowed_value:v1, the payload is an encoded windowed + value using the beam:coder:windowed_value:v1 coder parameterized by + a beam:coder:bytes:v1 element coder and the window coder that this + param_windowed_value coder uses. + """ + input_or_output_id: _builtins.str + """The input or output PCollection id this setting applies to.""" + @_builtins.property + def timer(self) -> Global___ExecutableStagePayload.TimerId: + """The timer id this setting applies to.""" + + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + input_or_output_id: _builtins.str | None = ..., + timer: Global___ExecutableStagePayload.TimerId | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["input_or_output_id", b"input_or_output_id", "target", b"target", "timer", b"timer"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["input_or_output_id", b"input_or_output_id", "payload", b"payload", "target", b"target", "timer", b"timer", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_target: _TypeAlias = _typing.Literal["input_or_output_id", "timer"] # noqa: Y015 + _WhichOneofArgType_target: _TypeAlias = _typing.Literal["target", b"target"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_target) -> _WhichOneofReturnType_target | None: ... + + ENVIRONMENT_FIELD_NUMBER: _builtins.int + WIRE_CODER_SETTINGS_FIELD_NUMBER: _builtins.int + INPUT_FIELD_NUMBER: _builtins.int + SIDE_INPUTS_FIELD_NUMBER: _builtins.int + TRANSFORMS_FIELD_NUMBER: _builtins.int + OUTPUTS_FIELD_NUMBER: _builtins.int + COMPONENTS_FIELD_NUMBER: _builtins.int + USER_STATES_FIELD_NUMBER: _builtins.int + TIMERS_FIELD_NUMBER: _builtins.int + TIMERFAMILIES_FIELD_NUMBER: _builtins.int + input: _builtins.str + """(Required) Input PCollection id. This must be present as a value in the inputs of any + PTransform the ExecutableStagePayload is the payload of. + """ + @_builtins.property + def environment(self) -> Global___Environment: + """(Required) Environment in which this stage executes. + + We use an environment rather than environment id + because ExecutableStages use environments directly. This may change in the future. + """ + + @_builtins.property + def wire_coder_settings(self) -> _containers.RepeatedCompositeFieldContainer[Global___ExecutableStagePayload.WireCoderSetting]: + """The wire coder settings of this executable stage""" + + @_builtins.property + def side_inputs(self) -> _containers.RepeatedCompositeFieldContainer[Global___ExecutableStagePayload.SideInputId]: + """The side inputs required for this executable stage. Each side input of each PTransform within + this ExecutableStagePayload must be represented within this field. + """ + + @_builtins.property + def transforms(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """PTransform ids contained within this executable stage. This must contain at least one + PTransform id. + """ + + @_builtins.property + def outputs(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """Output PCollection ids. This must be equal to the values of the outputs of any + PTransform the ExecutableStagePayload is the payload of. + """ + + @_builtins.property + def components(self) -> Global___Components: + """(Required) The components for the Executable Stage. This must contain all of the Transforms + in transforms, and the closure of all of the components they recognize. + """ + + @_builtins.property + def user_states(self) -> _containers.RepeatedCompositeFieldContainer[Global___ExecutableStagePayload.UserStateId]: + """The user states required for this executable stage. Each user state of each PTransform within + this ExecutableStagePayload must be represented within this field. + """ + + @_builtins.property + def timers(self) -> _containers.RepeatedCompositeFieldContainer[Global___ExecutableStagePayload.TimerId]: + """The timers required for this executable stage. Each timer of each PTransform within + this ExecutableStagePayload must be represented within this field. + """ + + @_builtins.property + def timerFamilies(self) -> _containers.RepeatedCompositeFieldContainer[Global___ExecutableStagePayload.TimerFamilyId]: + """The timerfamilies required for this executable stage. Each timer familyof each PTransform within + this ExecutableStagePayload must be represented within this field. + """ + + def __init__( + self, + *, + environment: Global___Environment | None = ..., + wire_coder_settings: _abc.Iterable[Global___ExecutableStagePayload.WireCoderSetting] | None = ..., + input: _builtins.str | None = ..., + side_inputs: _abc.Iterable[Global___ExecutableStagePayload.SideInputId] | None = ..., + transforms: _abc.Iterable[_builtins.str] | None = ..., + outputs: _abc.Iterable[_builtins.str] | None = ..., + components: Global___Components | None = ..., + user_states: _abc.Iterable[Global___ExecutableStagePayload.UserStateId] | None = ..., + timers: _abc.Iterable[Global___ExecutableStagePayload.TimerId] | None = ..., + timerFamilies: _abc.Iterable[Global___ExecutableStagePayload.TimerFamilyId] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "environment", b"environment"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["components", b"components", "environment", b"environment", "input", b"input", "outputs", b"outputs", "side_inputs", b"side_inputs", "timerFamilies", b"timerFamilies", "timers", b"timers", "transforms", b"transforms", "user_states", b"user_states", "wire_coder_settings", b"wire_coder_settings"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ExecutableStagePayload: _TypeAlias = ExecutableStagePayload # noqa: Y015 + +@_typing.final +class StandardResourceHints(_message.Message): + """See https://beam.apache.org/documentation/runtime/resource-hints/ for additional documentation + on the behavior of StandardResourceHint. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[StandardResourceHints._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + ACCELERATOR: StandardResourceHints._Enum.ValueType # 0 + """Describes hardware accelerators that are desired to have in the execution environment. + Payload: ASCII encoded string with the following format: "type:;count:;" where type + is an accelerator sku, count is the number of accelerators per worker, and options are + related options flags. + """ + MIN_RAM_BYTES: StandardResourceHints._Enum.ValueType # 1 + """Describes desired minimal available RAM size in transform's execution environment. + SDKs should convert the size to bytes, but can allow users to specify human-friendly units (e.g. GiB). + Payload: ASCII encoded string of the base 10 representation of an integer number of bytes. + """ + CPU_COUNT: StandardResourceHints._Enum.ValueType # 2 + """Describes desired number of CPUs available in transform's execution environment. + SDKs should accept and validate a positive integer count. + Payload: ASCII encoded string of the base 10 representation of an integer number of CPUs. + """ + MAX_ACTIVE_BUNDLES_PER_WORKER: StandardResourceHints._Enum.ValueType # 3 + """Describes max number of active bundles per worker in transform's execution environment. + SDKs should accept and validate a positive integer count. + Payload: ASCII encoded string of the base 10 representation of an integer number of active bundles. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + ACCELERATOR: StandardResourceHints.Enum.ValueType # 0 + """Describes hardware accelerators that are desired to have in the execution environment. + Payload: ASCII encoded string with the following format: "type:;count:;" where type + is an accelerator sku, count is the number of accelerators per worker, and options are + related options flags. + """ + MIN_RAM_BYTES: StandardResourceHints.Enum.ValueType # 1 + """Describes desired minimal available RAM size in transform's execution environment. + SDKs should convert the size to bytes, but can allow users to specify human-friendly units (e.g. GiB). + Payload: ASCII encoded string of the base 10 representation of an integer number of bytes. + """ + CPU_COUNT: StandardResourceHints.Enum.ValueType # 2 + """Describes desired number of CPUs available in transform's execution environment. + SDKs should accept and validate a positive integer count. + Payload: ASCII encoded string of the base 10 representation of an integer number of CPUs. + """ + MAX_ACTIVE_BUNDLES_PER_WORKER: StandardResourceHints.Enum.ValueType # 3 + """Describes max number of active bundles per worker in transform's execution environment. + SDKs should accept and validate a positive integer count. + Payload: ASCII encoded string of the base 10 representation of an integer number of active bundles. + """ + + def __init__( + self, + ) -> None: ... + +Global___StandardResourceHints: _TypeAlias = StandardResourceHints # noqa: Y015 + +BEAM_URN_FIELD_NUMBER: _builtins.int +BEAM_CONSTANT_FIELD_NUMBER: _builtins.int +beam_urn: _extension_dict._ExtensionFieldDescriptor[_descriptor_pb2.EnumValueOptions, _builtins.str] +"""An extension to be used for specifying the standard URN of various +pipeline entities, e.g. transforms, functions, coders etc. +Code should refer to the URNs of those entities by extracting +it from the (beam_urn) extension, rather than by hard-coding +the URN. + +The recommended pattern for declaring it is (exemplified by coders): + +message StandardCoders { + enum Enum { + BYTES = 0 [(beam_urn) = "beam:coder:bytes:v1"]; + ... + } +} + +If there are multiple categories of entities of this type, use the +following pattern (exemplified by PTransforms): + +message StandardPTransforms { + enum Primitives { + ... + } + enum Composites { + ... + } +} +""" +beam_constant: _extension_dict._ExtensionFieldDescriptor[_descriptor_pb2.EnumValueOptions, _builtins.str] +"""A value to store other constants""" diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_grpc.py new file mode 100644 index 000000000000..f47c5fe60b44 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_urns.py new file mode 100644 index 000000000000..29e4c98916e9 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/beam_runner_api_pb2_urns.py @@ -0,0 +1,181 @@ +from ........utils import PropertiesFromEnumValue +from . import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class BeamConstants(object): + + class Constants(object): + MIN_TIMESTAMP_MILLIS = PropertiesFromEnumValue('', '-9223372036854775', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MAX_TIMESTAMP_MILLIS = PropertiesFromEnumValue('', '9223372036854775', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + GLOBAL_WINDOW_MAX_TIMESTAMP_MILLIS = PropertiesFromEnumValue('', '9223371950454775', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardArtifacts(object): + + class Types(object): + FILE = PropertiesFromEnumValue('beam:artifact:type:file:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + URL = PropertiesFromEnumValue('beam:artifact:type:url:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + EMBEDDED = PropertiesFromEnumValue('beam:artifact:type:embedded:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PYPI = PropertiesFromEnumValue('beam:artifact:type:pypi:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MAVEN = PropertiesFromEnumValue('beam:artifact:type:maven:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DEFERRED = PropertiesFromEnumValue('beam:artifact:type:deferred:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class Roles(object): + STAGING_TO = PropertiesFromEnumValue('beam:artifact:role:staging_to:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PIP_REQUIREMENTS_FILE = PropertiesFromEnumValue('beam:artifact:role:pip_requirements_file:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + GO_WORKER_BINARY = PropertiesFromEnumValue('beam:artifact:role:go_worker_binary:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardCoders(object): + + class Enum(object): + BYTES = PropertiesFromEnumValue('beam:coder:bytes:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + STRING_UTF8 = PropertiesFromEnumValue('beam:coder:string_utf8:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + KV = PropertiesFromEnumValue('beam:coder:kv:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BOOL = PropertiesFromEnumValue('beam:coder:bool:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + VARINT = PropertiesFromEnumValue('beam:coder:varint:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DOUBLE = PropertiesFromEnumValue('beam:coder:double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ITERABLE = PropertiesFromEnumValue('beam:coder:iterable:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TIMER = PropertiesFromEnumValue('beam:coder:timer:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + INTERVAL_WINDOW = PropertiesFromEnumValue('beam:coder:interval_window:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + LENGTH_PREFIX = PropertiesFromEnumValue('beam:coder:length_prefix:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + GLOBAL_WINDOW = PropertiesFromEnumValue('beam:coder:global_window:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + WINDOWED_VALUE = PropertiesFromEnumValue('beam:coder:windowed_value:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PARAM_WINDOWED_VALUE = PropertiesFromEnumValue('beam:coder:param_windowed_value:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + STATE_BACKED_ITERABLE = PropertiesFromEnumValue('beam:coder:state_backed_iterable:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CUSTOM_WINDOW = PropertiesFromEnumValue('beam:coder:custom_window:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ROW = PropertiesFromEnumValue('beam:coder:row:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SCHEMA = PropertiesFromEnumValue('beam:coder:schema:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SHARDED_KEY = PropertiesFromEnumValue('beam:coder:sharded_key:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + NULLABLE = PropertiesFromEnumValue('beam:coder:nullable:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardDisplayData(object): + + class DisplayData(object): + LABELLED = PropertiesFromEnumValue('beam:display_data:labelled:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardEnvironments(object): + + class Environments(object): + DOCKER = PropertiesFromEnumValue('beam:env:docker:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PROCESS = PropertiesFromEnumValue('beam:env:process:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + EXTERNAL = PropertiesFromEnumValue('beam:env:external:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DEFAULT = PropertiesFromEnumValue('beam:env:default:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ANYOF = PropertiesFromEnumValue('beam:env:anyof:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardPTransforms(object): + + class Primitives(object): + PAR_DO = PropertiesFromEnumValue('beam:transform:pardo:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + FLATTEN = PropertiesFromEnumValue('beam:transform:flatten:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + GROUP_BY_KEY = PropertiesFromEnumValue('beam:transform:group_by_key:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + IMPULSE = PropertiesFromEnumValue('beam:transform:impulse:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ASSIGN_WINDOWS = PropertiesFromEnumValue('beam:transform:window_into:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TEST_STREAM = PropertiesFromEnumValue('beam:transform:teststream:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MAP_WINDOWS = PropertiesFromEnumValue('beam:transform:map_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MERGE_WINDOWS = PropertiesFromEnumValue('beam:transform:merge_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TO_STRING = PropertiesFromEnumValue('beam:transform:to_string:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class DeprecatedPrimitives(object): + READ = PropertiesFromEnumValue('beam:transform:read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CREATE_VIEW = PropertiesFromEnumValue('beam:transform:create_view:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class Composites(object): + COMBINE_PER_KEY = PropertiesFromEnumValue('beam:transform:combine_per_key:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + COMBINE_GLOBALLY = PropertiesFromEnumValue('beam:transform:combine_globally:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + RESHUFFLE = PropertiesFromEnumValue('beam:transform:reshuffle:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + WRITE_FILES = PropertiesFromEnumValue('beam:transform:write_files:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PUBSUB_READ = PropertiesFromEnumValue('beam:transform:pubsub_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PUBSUB_WRITE = PropertiesFromEnumValue('beam:transform:pubsub_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PUBSUB_WRITE_V2 = PropertiesFromEnumValue('beam:transform:pubsub_write:v2', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + GROUP_INTO_BATCHES_WITH_SHARDED_KEY = PropertiesFromEnumValue('beam:transform:group_into_batches_with_sharded_key:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REDISTRIBUTE_BY_KEY = PropertiesFromEnumValue('beam:transform:redistribute_by_key:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REDISTRIBUTE_ARBITRARILY = PropertiesFromEnumValue('beam:transform:redistribute_arbitrarily:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class CombineComponents(object): + COMBINE_PER_KEY_PRECOMBINE = PropertiesFromEnumValue('beam:transform:combine_per_key_precombine:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + COMBINE_PER_KEY_MERGE_ACCUMULATORS = PropertiesFromEnumValue('beam:transform:combine_per_key_merge_accumulators:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + COMBINE_PER_KEY_EXTRACT_OUTPUTS = PropertiesFromEnumValue('beam:transform:combine_per_key_extract_outputs:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + COMBINE_GROUPED_VALUES = PropertiesFromEnumValue('beam:transform:combine_grouped_values:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS = PropertiesFromEnumValue('beam:transform:combine_per_key_convert_to_accumulators:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class SplittableParDoComponents(object): + PAIR_WITH_RESTRICTION = PropertiesFromEnumValue('beam:transform:sdf_pair_with_restriction:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SPLIT_AND_SIZE_RESTRICTIONS = PropertiesFromEnumValue('beam:transform:sdf_split_and_size_restrictions:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS = PropertiesFromEnumValue('beam:transform:sdf_process_sized_element_and_restrictions:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TRUNCATE_SIZED_RESTRICTION = PropertiesFromEnumValue('beam:transform:sdf_truncate_sized_restrictions:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + + class GroupIntoBatchesComponents(object): + GROUP_INTO_BATCHES = PropertiesFromEnumValue('beam:transform:group_into_batches:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardProtocols(object): + + class Enum(object): + LEGACY_PROGRESS_REPORTING = PropertiesFromEnumValue('beam:protocol:progress_reporting:v0', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PROGRESS_REPORTING = PropertiesFromEnumValue('beam:protocol:progress_reporting:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + WORKER_STATUS = PropertiesFromEnumValue('beam:protocol:worker_status:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MULTI_CORE_BUNDLE_PROCESSING = PropertiesFromEnumValue('beam:protocol:multi_core_bundle_processing:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SIBLING_WORKERS = PropertiesFromEnumValue('beam:protocol:sibling_workers:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + HARNESS_MONITORING_INFOS = PropertiesFromEnumValue('beam:protocol:harness_monitoring_infos:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CONTROL_REQUEST_ELEMENTS_EMBEDDING = PropertiesFromEnumValue('beam:protocol:control_request_elements_embedding:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + STATE_CACHING = PropertiesFromEnumValue('beam:protocol:state_caching:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DATA_SAMPLING = PropertiesFromEnumValue('beam:protocol:data_sampling:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SDK_CONSUMING_RECEIVED_DATA = PropertiesFromEnumValue('beam:protocol:sdk_consuming_received_data:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ORDERED_LIST_STATE = PropertiesFromEnumValue('beam:protocol:ordered_list_state:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ELEMENT_METADATA = PropertiesFromEnumValue('beam:protocol:element_metadata:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MULTIMAP_STATE = PropertiesFromEnumValue('beam:protocol:multimap_state:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardRequirements(object): + + class Enum(object): + REQUIRES_STATEFUL_PROCESSING = PropertiesFromEnumValue('beam:requirement:pardo:stateful:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REQUIRES_BUNDLE_FINALIZATION = PropertiesFromEnumValue('beam:requirement:pardo:finalization:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REQUIRES_STABLE_INPUT = PropertiesFromEnumValue('beam:requirement:pardo:stable_input:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REQUIRES_TIME_SORTED_INPUT = PropertiesFromEnumValue('beam:requirement:pardo:time_sorted_input:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REQUIRES_SPLITTABLE_DOFN = PropertiesFromEnumValue('beam:requirement:pardo:splittable_dofn:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + REQUIRES_ON_WINDOW_EXPIRATION = PropertiesFromEnumValue('beam:requirement:pardo:on_window_expiration:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardResourceHints(object): + + class Enum(object): + ACCELERATOR = PropertiesFromEnumValue('beam:resources:accelerator:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MIN_RAM_BYTES = PropertiesFromEnumValue('beam:resources:min_ram_bytes:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CPU_COUNT = PropertiesFromEnumValue('beam:resources:cpu_count:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MAX_ACTIVE_BUNDLES_PER_WORKER = PropertiesFromEnumValue('beam:resources:max_active_bundles_per_worker:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardRunnerProtocols(object): + + class Enum(object): + MONITORING_INFO_SHORT_IDS = PropertiesFromEnumValue('beam:protocol:monitoring_info_short_ids:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CONTROL_RESPONSE_ELEMENTS_EMBEDDING = PropertiesFromEnumValue('beam:protocol:control_response_elements_embedding:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MULTIMAP_KEYS_VALUES_SIDE_INPUT = PropertiesFromEnumValue('beam:protocol:multimap_keys_values_side_input:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardSideInputTypes(object): + + class Enum(object): + ITERABLE = PropertiesFromEnumValue('beam:side_input:iterable:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MULTIMAP = PropertiesFromEnumValue('beam:side_input:multimap:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class StandardUserStateTypes(object): + + class Enum(object): + BAG = PropertiesFromEnumValue('beam:user_state:bag:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MULTIMAP = PropertiesFromEnumValue('beam:user_state:multimap:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ORDERED_LIST = PropertiesFromEnumValue('beam:user_state:ordered_list:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.py new file mode 100644 index 000000000000..06f267a05121 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/endpoints.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/endpoints.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1org/apache/beam/model/pipeline/v1/endpoints.proto\x12!org.apache.beam.model.pipeline.v1\"r\n\x14\x41piServiceDescriptor\x12\x0b\n\x03url\x18\x01 \x01(\t\x12M\n\x0e\x61uthentication\x18\x02 \x01(\x0b\x32\x35.org.apache.beam.model.pipeline.v1.AuthenticationSpec\"2\n\x12\x41uthenticationSpec\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x42x\n!org.apache.beam.model.pipeline.v1B\tEndpointsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.endpoints_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\tEndpointsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_APISERVICEDESCRIPTOR']._serialized_start=88 + _globals['_APISERVICEDESCRIPTOR']._serialized_end=202 + _globals['_AUTHENTICATIONSPEC']._serialized_start=204 + _globals['_AUTHENTICATIONSPEC']._serialized_end=254 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.pyi new file mode 100644 index 000000000000..31e9a2febaec --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2.pyi @@ -0,0 +1,76 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing endpoints containing a service. +""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class ApiServiceDescriptor(_message.Message): + """A description of how to connect to a Beam API endpoint.""" + + DESCRIPTOR: _descriptor.Descriptor + + URL_FIELD_NUMBER: _builtins.int + AUTHENTICATION_FIELD_NUMBER: _builtins.int + url: _builtins.str + """(Required) The URL to connect to.""" + @_builtins.property + def authentication(self) -> Global___AuthenticationSpec: + """(Optional) The method for authentication. If unspecified, access to the + url is already being performed in a trusted context (e.g. localhost, + private network). + """ + + def __init__( + self, + *, + url: _builtins.str | None = ..., + authentication: Global___AuthenticationSpec | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["authentication", b"authentication"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["authentication", b"authentication", "url", b"url"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ApiServiceDescriptor: _TypeAlias = ApiServiceDescriptor # noqa: Y015 + +@_typing.final +class AuthenticationSpec(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """(Required) A URN that describes the accompanying payload. + For any URN that is not recognized (by whomever is inspecting + it) the parameter payload should be treated as opaque and + passed as-is. + """ + payload: _builtins.bytes + """(Optional) The data specifying any parameters to the URN. If + the URN does not require any arguments, this may be omitted. + """ + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___AuthenticationSpec: _TypeAlias = AuthenticationSpec # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2_grpc.py new file mode 100644 index 000000000000..b8d1465b2602 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/endpoints_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/endpoints_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.py new file mode 100644 index 000000000000..9d52eeca0fb5 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.py @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/external_transforms.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/external_transforms.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import schema_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_schema__pb2 +from . import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;org/apache/beam/model/pipeline/v1/external_transforms.proto\x12!org.apache.beam.model.pipeline.v1\x1a.org/apache/beam/model/pipeline/v1/schema.proto\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\"j\n\x1c\x45xternalConfigurationPayload\x12\x39\n\x06schema\x18\x01 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"\xac\x01\n\x10\x45xpansionMethods\"\x97\x01\n\x04\x45num\x12H\n\x11JAVA_CLASS_LOOKUP\x10\x00\x1a\x31\xa2\xb4\xfa\xc2\x05+beam:expansion:payload:java_class_lookup:v1\x12\x45\n\x10SCHEMA_TRANSFORM\x10\x01\x1a/\xa2\xb4\xfa\xc2\x05)beam:expansion:payload:schematransform:v1\"\xb2\x08\n\x11ManagedTransforms\"\x9c\x08\n\x04Urns\x12L\n\x0cICEBERG_READ\x10\x00\x1a:\xa2\xb4\xfa\xc2\x05\x34\x62\x65\x61m:schematransform:org.apache.beam:iceberg_read:v1\x12N\n\rICEBERG_WRITE\x10\x01\x1a;\xa2\xb4\xfa\xc2\x05\x35\x62\x65\x61m:schematransform:org.apache.beam:iceberg_write:v1\x12H\n\nKAFKA_READ\x10\x02\x1a\x38\xa2\xb4\xfa\xc2\x05\x32\x62\x65\x61m:schematransform:org.apache.beam:kafka_read:v1\x12J\n\x0bKAFKA_WRITE\x10\x03\x1a\x39\xa2\xb4\xfa\xc2\x05\x33\x62\x65\x61m:schematransform:org.apache.beam:kafka_write:v1\x12V\n\rBIGQUERY_READ\x10\x04\x1a\x43\xa2\xb4\xfa\xc2\x05=beam:schematransform:org.apache.beam:bigquery_storage_read:v1\x12P\n\x0e\x42IGQUERY_WRITE\x10\x05\x1a<\xa2\xb4\xfa\xc2\x05\x36\x62\x65\x61m:schematransform:org.apache.beam:bigquery_write:v1\x12T\n\x10ICEBERG_CDC_READ\x10\x06\x1a>\xa2\xb4\xfa\xc2\x05\x38\x62\x65\x61m:schematransform:org.apache.beam:iceberg_cdc_read:v1\x12N\n\rPOSTGRES_READ\x10\x07\x1a;\xa2\xb4\xfa\xc2\x05\x35\x62\x65\x61m:schematransform:org.apache.beam:postgres_read:v1\x12P\n\x0ePOSTGRES_WRITE\x10\x08\x1a<\xa2\xb4\xfa\xc2\x05\x36\x62\x65\x61m:schematransform:org.apache.beam:postgres_write:v1\x12H\n\nMYSQL_READ\x10\t\x1a\x38\xa2\xb4\xfa\xc2\x05\x32\x62\x65\x61m:schematransform:org.apache.beam:mysql_read:v1\x12J\n\x0bMYSQL_WRITE\x10\n\x1a\x39\xa2\xb4\xfa\xc2\x05\x33\x62\x65\x61m:schematransform:org.apache.beam:mysql_write:v1\x12R\n\x0fSQL_SERVER_READ\x10\x0b\x1a=\xa2\xb4\xfa\xc2\x05\x37\x62\x65\x61m:schematransform:org.apache.beam:sql_server_read:v1\x12T\n\x10SQL_SERVER_WRITE\x10\x0c\x1a>\xa2\xb4\xfa\xc2\x05\x38\x62\x65\x61m:schematransform:org.apache.beam:sql_server_write:v1\"\xf7\x01\n\x16JavaClassLookupPayload\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\x1a\n\x12\x63onstructor_method\x18\x02 \x01(\t\x12\x45\n\x12\x63onstructor_schema\x18\x03 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x1b\n\x13\x63onstructor_payload\x18\x04 \x01(\x0c\x12I\n\x0f\x62uilder_methods\x18\x05 \x03(\x0b\x32\x30.org.apache.beam.model.pipeline.v1.BuilderMethod\"i\n\rBuilderMethod\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x06schema\x18\x02 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\"\xfa\x01\n\x0b\x41nnotations\"\xea\x01\n\x04\x45num\x12$\n\x0e\x43ONFIG_ROW_KEY\x10\x00\x1a\x10\xaa\xb4\xfa\xc2\x05\nconfig_row\x12\x32\n\x15\x43ONFIG_ROW_SCHEMA_KEY\x10\x01\x1a\x17\xaa\xb4\xfa\xc2\x05\x11\x63onfig_row_schema\x12\x36\n\x17SCHEMATRANSFORM_URN_KEY\x10\x02\x1a\x19\xaa\xb4\xfa\xc2\x05\x13schematransform_urn\x12P\n$MANAGED_UNDERLYING_TRANSFORM_URN_KEY\x10\x03\x1a&\xaa\xb4\xfa\xc2\x05 managed_underlying_transform_urn\"\x90\x01\n\x16SchemaTransformPayload\x12\x12\n\nidentifier\x18\x01 \x01(\t\x12G\n\x14\x63onfiguration_schema\x18\x02 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x19\n\x11\x63onfiguration_row\x18\x03 \x01(\x0c\x42\x81\x01\n!org.apache.beam.model.pipeline.v1B\x12\x45xternalTransformsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.external_transforms_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\022ExternalTransformsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_EXPANSIONMETHODS_ENUM'].values_by_name["JAVA_CLASS_LOOKUP"]._loaded_options = None + _globals['_EXPANSIONMETHODS_ENUM'].values_by_name["JAVA_CLASS_LOOKUP"]._serialized_options = b'\242\264\372\302\005+beam:expansion:payload:java_class_lookup:v1' + _globals['_EXPANSIONMETHODS_ENUM'].values_by_name["SCHEMA_TRANSFORM"]._loaded_options = None + _globals['_EXPANSIONMETHODS_ENUM'].values_by_name["SCHEMA_TRANSFORM"]._serialized_options = b'\242\264\372\302\005)beam:expansion:payload:schematransform:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_READ"]._serialized_options = b'\242\264\372\302\0054beam:schematransform:org.apache.beam:iceberg_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_WRITE"]._serialized_options = b'\242\264\372\302\0055beam:schematransform:org.apache.beam:iceberg_write:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["KAFKA_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["KAFKA_READ"]._serialized_options = b'\242\264\372\302\0052beam:schematransform:org.apache.beam:kafka_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["KAFKA_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["KAFKA_WRITE"]._serialized_options = b'\242\264\372\302\0053beam:schematransform:org.apache.beam:kafka_write:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["BIGQUERY_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["BIGQUERY_READ"]._serialized_options = b'\242\264\372\302\005=beam:schematransform:org.apache.beam:bigquery_storage_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["BIGQUERY_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["BIGQUERY_WRITE"]._serialized_options = b'\242\264\372\302\0056beam:schematransform:org.apache.beam:bigquery_write:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_CDC_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["ICEBERG_CDC_READ"]._serialized_options = b'\242\264\372\302\0058beam:schematransform:org.apache.beam:iceberg_cdc_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["POSTGRES_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["POSTGRES_READ"]._serialized_options = b'\242\264\372\302\0055beam:schematransform:org.apache.beam:postgres_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["POSTGRES_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["POSTGRES_WRITE"]._serialized_options = b'\242\264\372\302\0056beam:schematransform:org.apache.beam:postgres_write:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["MYSQL_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["MYSQL_READ"]._serialized_options = b'\242\264\372\302\0052beam:schematransform:org.apache.beam:mysql_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["MYSQL_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["MYSQL_WRITE"]._serialized_options = b'\242\264\372\302\0053beam:schematransform:org.apache.beam:mysql_write:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["SQL_SERVER_READ"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["SQL_SERVER_READ"]._serialized_options = b'\242\264\372\302\0057beam:schematransform:org.apache.beam:sql_server_read:v1' + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["SQL_SERVER_WRITE"]._loaded_options = None + _globals['_MANAGEDTRANSFORMS_URNS'].values_by_name["SQL_SERVER_WRITE"]._serialized_options = b'\242\264\372\302\0058beam:schematransform:org.apache.beam:sql_server_write:v1' + _globals['_ANNOTATIONS_ENUM'].values_by_name["CONFIG_ROW_KEY"]._loaded_options = None + _globals['_ANNOTATIONS_ENUM'].values_by_name["CONFIG_ROW_KEY"]._serialized_options = b'\252\264\372\302\005\nconfig_row' + _globals['_ANNOTATIONS_ENUM'].values_by_name["CONFIG_ROW_SCHEMA_KEY"]._loaded_options = None + _globals['_ANNOTATIONS_ENUM'].values_by_name["CONFIG_ROW_SCHEMA_KEY"]._serialized_options = b'\252\264\372\302\005\021config_row_schema' + _globals['_ANNOTATIONS_ENUM'].values_by_name["SCHEMATRANSFORM_URN_KEY"]._loaded_options = None + _globals['_ANNOTATIONS_ENUM'].values_by_name["SCHEMATRANSFORM_URN_KEY"]._serialized_options = b'\252\264\372\302\005\023schematransform_urn' + _globals['_ANNOTATIONS_ENUM'].values_by_name["MANAGED_UNDERLYING_TRANSFORM_URN_KEY"]._loaded_options = None + _globals['_ANNOTATIONS_ENUM'].values_by_name["MANAGED_UNDERLYING_TRANSFORM_URN_KEY"]._serialized_options = b'\252\264\372\302\005 managed_underlying_transform_urn' + _globals['_EXTERNALCONFIGURATIONPAYLOAD']._serialized_start=203 + _globals['_EXTERNALCONFIGURATIONPAYLOAD']._serialized_end=309 + _globals['_EXPANSIONMETHODS']._serialized_start=312 + _globals['_EXPANSIONMETHODS']._serialized_end=484 + _globals['_EXPANSIONMETHODS_ENUM']._serialized_start=333 + _globals['_EXPANSIONMETHODS_ENUM']._serialized_end=484 + _globals['_MANAGEDTRANSFORMS']._serialized_start=487 + _globals['_MANAGEDTRANSFORMS']._serialized_end=1561 + _globals['_MANAGEDTRANSFORMS_URNS']._serialized_start=509 + _globals['_MANAGEDTRANSFORMS_URNS']._serialized_end=1561 + _globals['_JAVACLASSLOOKUPPAYLOAD']._serialized_start=1564 + _globals['_JAVACLASSLOOKUPPAYLOAD']._serialized_end=1811 + _globals['_BUILDERMETHOD']._serialized_start=1813 + _globals['_BUILDERMETHOD']._serialized_end=1918 + _globals['_ANNOTATIONS']._serialized_start=1921 + _globals['_ANNOTATIONS']._serialized_end=2171 + _globals['_ANNOTATIONS_ENUM']._serialized_start=1937 + _globals['_ANNOTATIONS_ENUM']._serialized_end=2171 + _globals['_SCHEMATRANSFORMPAYLOAD']._serialized_start=2174 + _globals['_SCHEMATRANSFORMPAYLOAD']._serialized_end=2318 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.pyi new file mode 100644 index 000000000000..f61be836fdc4 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2.pyi @@ -0,0 +1,317 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the external transforms available. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from . import schema_pb2 as _schema_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class ExternalConfigurationPayload(_message.Message): + """A configuration payload for an external transform. + Used as the payload of ExternalTransform as part of an ExpansionRequest. + """ + + DESCRIPTOR: _descriptor.Descriptor + + SCHEMA_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + payload: _builtins.bytes + """A payload which can be decoded using beam:coder:row:v1 and the given + schema. + """ + @_builtins.property + def schema(self) -> _schema_pb2.Schema: + """A schema for use in beam:coder:row:v1""" + + def __init__( + self, + *, + schema: _schema_pb2.Schema | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["schema", b"schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload", "schema", b"schema"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ExternalConfigurationPayload: _TypeAlias = ExternalConfigurationPayload # noqa: Y015 + +@_typing.final +class ExpansionMethods(_message.Message): + """Defines specific expansion methods that may be used to expand cross-language + transforms. + Has to be set as the URN of the transform of the expansion request. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ExpansionMethods._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + JAVA_CLASS_LOOKUP: ExpansionMethods._Enum.ValueType # 0 + """Expand a Java transform using specified constructor and builder methods. + Transform payload will be of type JavaClassLookupPayload. + """ + SCHEMA_TRANSFORM: ExpansionMethods._Enum.ValueType # 1 + """Expanding a SchemaTransform identified by the expansion service. + Transform payload will be of type SchemaTransformPayload. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + JAVA_CLASS_LOOKUP: ExpansionMethods.Enum.ValueType # 0 + """Expand a Java transform using specified constructor and builder methods. + Transform payload will be of type JavaClassLookupPayload. + """ + SCHEMA_TRANSFORM: ExpansionMethods.Enum.ValueType # 1 + """Expanding a SchemaTransform identified by the expansion service. + Transform payload will be of type SchemaTransformPayload. + """ + + def __init__( + self, + ) -> None: ... + +Global___ExpansionMethods: _TypeAlias = ExpansionMethods # noqa: Y015 + +@_typing.final +class ManagedTransforms(_message.Message): + """Defines the URNs for managed transforms.""" + + DESCRIPTOR: _descriptor.Descriptor + + class _Urns: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _UrnsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ManagedTransforms._Urns.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + ICEBERG_READ: ManagedTransforms._Urns.ValueType # 0 + ICEBERG_WRITE: ManagedTransforms._Urns.ValueType # 1 + KAFKA_READ: ManagedTransforms._Urns.ValueType # 2 + KAFKA_WRITE: ManagedTransforms._Urns.ValueType # 3 + BIGQUERY_READ: ManagedTransforms._Urns.ValueType # 4 + BIGQUERY_WRITE: ManagedTransforms._Urns.ValueType # 5 + ICEBERG_CDC_READ: ManagedTransforms._Urns.ValueType # 6 + POSTGRES_READ: ManagedTransforms._Urns.ValueType # 7 + POSTGRES_WRITE: ManagedTransforms._Urns.ValueType # 8 + MYSQL_READ: ManagedTransforms._Urns.ValueType # 9 + MYSQL_WRITE: ManagedTransforms._Urns.ValueType # 10 + SQL_SERVER_READ: ManagedTransforms._Urns.ValueType # 11 + SQL_SERVER_WRITE: ManagedTransforms._Urns.ValueType # 12 + + class Urns(_Urns, metaclass=_UrnsEnumTypeWrapper): ... + ICEBERG_READ: ManagedTransforms.Urns.ValueType # 0 + ICEBERG_WRITE: ManagedTransforms.Urns.ValueType # 1 + KAFKA_READ: ManagedTransforms.Urns.ValueType # 2 + KAFKA_WRITE: ManagedTransforms.Urns.ValueType # 3 + BIGQUERY_READ: ManagedTransforms.Urns.ValueType # 4 + BIGQUERY_WRITE: ManagedTransforms.Urns.ValueType # 5 + ICEBERG_CDC_READ: ManagedTransforms.Urns.ValueType # 6 + POSTGRES_READ: ManagedTransforms.Urns.ValueType # 7 + POSTGRES_WRITE: ManagedTransforms.Urns.ValueType # 8 + MYSQL_READ: ManagedTransforms.Urns.ValueType # 9 + MYSQL_WRITE: ManagedTransforms.Urns.ValueType # 10 + SQL_SERVER_READ: ManagedTransforms.Urns.ValueType # 11 + SQL_SERVER_WRITE: ManagedTransforms.Urns.ValueType # 12 + + def __init__( + self, + ) -> None: ... + +Global___ManagedTransforms: _TypeAlias = ManagedTransforms # noqa: Y015 + +@_typing.final +class JavaClassLookupPayload(_message.Message): + """A configuration payload for an external transform. + Used to define a Java transform that can be directly instantiated by a Java + expansion service. + """ + + DESCRIPTOR: _descriptor.Descriptor + + CLASS_NAME_FIELD_NUMBER: _builtins.int + CONSTRUCTOR_METHOD_FIELD_NUMBER: _builtins.int + CONSTRUCTOR_SCHEMA_FIELD_NUMBER: _builtins.int + CONSTRUCTOR_PAYLOAD_FIELD_NUMBER: _builtins.int + BUILDER_METHODS_FIELD_NUMBER: _builtins.int + class_name: _builtins.str + """Name of the Java transform class.""" + constructor_method: _builtins.str + """A static method to construct the initial instance of the transform. + If not provided, the transform should be instantiated using a class + constructor. + """ + constructor_payload: _builtins.bytes + """A payload which can be decoded using beam:coder:row:v1 and the provided + constructor schema. + """ + @_builtins.property + def constructor_schema(self) -> _schema_pb2.Schema: + """The top level fields of the schema represent the method parameters in + order. + If able, top level field names are also verified against the method + parameters for a match. + Any field names in the form 'ignore[0-9]+' will not be used for validation + hence that format can be used to represent arbitrary field names. + """ + + @_builtins.property + def builder_methods(self) -> _containers.RepeatedCompositeFieldContainer[Global___BuilderMethod]: + """Set of builder methods and corresponding parameters to apply after the + transform object is constructed. + When constructing the transform object, given builder methods will be + applied in order. + """ + + def __init__( + self, + *, + class_name: _builtins.str | None = ..., + constructor_method: _builtins.str | None = ..., + constructor_schema: _schema_pb2.Schema | None = ..., + constructor_payload: _builtins.bytes | None = ..., + builder_methods: _abc.Iterable[Global___BuilderMethod] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["constructor_schema", b"constructor_schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["builder_methods", b"builder_methods", "class_name", b"class_name", "constructor_method", b"constructor_method", "constructor_payload", b"constructor_payload", "constructor_schema", b"constructor_schema"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___JavaClassLookupPayload: _TypeAlias = JavaClassLookupPayload # noqa: Y015 + +@_typing.final +class BuilderMethod(_message.Message): + """This represents a builder method of the transform class that should be + applied in-order after instantiating the initial transform object. + Each builder method may take one or more parameters and has to return an + instance of the transform object. + """ + + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + SCHEMA_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + name: _builtins.str + """Name of the builder method""" + payload: _builtins.bytes + """A payload which can be decoded using beam:coder:row:v1 and the builder + method schema. + """ + @_builtins.property + def schema(self) -> _schema_pb2.Schema: + """The top level fields of the schema represent the method parameters in + order. + If able, top level field names are also verified against the method + parameters for a match. + Any field names in the form 'ignore[0-9]+' will not be used for validation + hence that format can be used to represent arbitrary field names. + """ + + def __init__( + self, + *, + name: _builtins.str | None = ..., + schema: _schema_pb2.Schema | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["schema", b"schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "payload", b"payload", "schema", b"schema"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___BuilderMethod: _TypeAlias = BuilderMethod # noqa: Y015 + +@_typing.final +class Annotations(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[Annotations._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + CONFIG_ROW_KEY: Annotations._Enum.ValueType # 0 + """The annotation key for the encoded configuration Row used to build a transform""" + CONFIG_ROW_SCHEMA_KEY: Annotations._Enum.ValueType # 1 + """The annotation key for the configuration Schema used to decode the configuration Row""" + SCHEMATRANSFORM_URN_KEY: Annotations._Enum.ValueType # 2 + """If ths transform is a SchemaTransform, this is the annotation key for the SchemaTransform's URN""" + MANAGED_UNDERLYING_TRANSFORM_URN_KEY: Annotations._Enum.ValueType # 3 + """If the transform is a ManagedSchemaTransform, this is the annotation key for the underlying SchemaTransform's URN""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + CONFIG_ROW_KEY: Annotations.Enum.ValueType # 0 + """The annotation key for the encoded configuration Row used to build a transform""" + CONFIG_ROW_SCHEMA_KEY: Annotations.Enum.ValueType # 1 + """The annotation key for the configuration Schema used to decode the configuration Row""" + SCHEMATRANSFORM_URN_KEY: Annotations.Enum.ValueType # 2 + """If ths transform is a SchemaTransform, this is the annotation key for the SchemaTransform's URN""" + MANAGED_UNDERLYING_TRANSFORM_URN_KEY: Annotations.Enum.ValueType # 3 + """If the transform is a ManagedSchemaTransform, this is the annotation key for the underlying SchemaTransform's URN""" + + def __init__( + self, + ) -> None: ... + +Global___Annotations: _TypeAlias = Annotations # noqa: Y015 + +@_typing.final +class SchemaTransformPayload(_message.Message): + """Payload for a Schema-aware PTransform. + This is a transform that is aware of its input and output PCollection schemas + and is configured using Beam Schema-compatible parameters. + The information available in the payload can be used to instantiate the schema-aware transform. + """ + + DESCRIPTOR: _descriptor.Descriptor + + IDENTIFIER_FIELD_NUMBER: _builtins.int + CONFIGURATION_SCHEMA_FIELD_NUMBER: _builtins.int + CONFIGURATION_ROW_FIELD_NUMBER: _builtins.int + identifier: _builtins.str + """The identifier of the SchemaTransform (typically a URN).""" + configuration_row: _builtins.bytes + """The configuration of the SchemaTransform. + Should be decodable via beam:coder:row:v1. + The schema of the Row should be compatible with the schema of the + SchemaTransform. + """ + @_builtins.property + def configuration_schema(self) -> _schema_pb2.Schema: + """The configuration schema of the SchemaTransform.""" + + def __init__( + self, + *, + identifier: _builtins.str | None = ..., + configuration_schema: _schema_pb2.Schema | None = ..., + configuration_row: _builtins.bytes | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["configuration_schema", b"configuration_schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["configuration_row", b"configuration_row", "configuration_schema", b"configuration_schema", "identifier", b"identifier"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SchemaTransformPayload: _TypeAlias = SchemaTransformPayload # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_grpc.py new file mode 100644 index 000000000000..8a48796ca269 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/external_transforms_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_urns.py new file mode 100644 index 000000000000..203f7879bfeb --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/external_transforms_pb2_urns.py @@ -0,0 +1,38 @@ +from ........utils import PropertiesFromEnumValue +from . import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class Annotations(object): + + class Enum(object): + CONFIG_ROW_KEY = PropertiesFromEnumValue('', 'config_row', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + CONFIG_ROW_SCHEMA_KEY = PropertiesFromEnumValue('', 'config_row_schema', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SCHEMATRANSFORM_URN_KEY = PropertiesFromEnumValue('', 'schematransform_urn', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MANAGED_UNDERLYING_TRANSFORM_URN_KEY = PropertiesFromEnumValue('', 'managed_underlying_transform_urn', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class ExpansionMethods(object): + + class Enum(object): + JAVA_CLASS_LOOKUP = PropertiesFromEnumValue('beam:expansion:payload:java_class_lookup:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SCHEMA_TRANSFORM = PropertiesFromEnumValue('beam:expansion:payload:schematransform:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class ManagedTransforms(object): + + class Urns(object): + ICEBERG_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:iceberg_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ICEBERG_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:iceberg_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + KAFKA_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:kafka_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + KAFKA_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:kafka_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BIGQUERY_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:bigquery_storage_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BIGQUERY_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:bigquery_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + ICEBERG_CDC_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:iceberg_cdc_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + POSTGRES_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:postgres_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + POSTGRES_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:postgres_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MYSQL_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:mysql_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MYSQL_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:mysql_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SQL_SERVER_READ = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:sql_server_read:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SQL_SERVER_WRITE = PropertiesFromEnumValue('beam:schematransform:org.apache.beam:sql_server_write:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.py new file mode 100644 index 000000000000..348960f60665 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.py @@ -0,0 +1,210 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/metrics.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/metrics.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/org/apache/beam/model/pipeline/v1/metrics.proto\x12!org.apache.beam.model.pipeline.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a google/protobuf/descriptor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x01\n\x12MonitoringInfoSpec\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x17\n\x0frequired_labels\x18\x03 \x03(\t\x12\x42\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32-.org.apache.beam.model.pipeline.v1.Annotation\"(\n\nAnnotation\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xec\'\n\x13MonitoringInfoSpecs\"\xd4\'\n\x04\x45num\x12\xa7\x01\n\x0eUSER_SUM_INT64\x10\x00\x1a\x92\x01\xd2\xa7\xa7\x96\x06\x8b\x01\n\x1d\x62\x65\x61m:metric:user:sum_int64:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xaa\x01\n\x0fUSER_SUM_DOUBLE\x10\x01\x1a\x94\x01\xd2\xa7\xa7\x96\x06\x8d\x01\n\x1e\x62\x65\x61m:metric:user:sum_double:v1\x12\x1a\x62\x65\x61m:metrics:sum_double:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xc2\x01\n\x17USER_DISTRIBUTION_INT64\x10\x02\x1a\xa4\x01\xd2\xa7\xa7\x96\x06\x9d\x01\n&beam:metric:user:distribution_int64:v1\x12\"beam:metrics:distribution_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xc5\x01\n\x18USER_DISTRIBUTION_DOUBLE\x10\x03\x1a\xa6\x01\xd2\xa7\xa7\x96\x06\x9f\x01\n\'beam:metric:user:distribution_double:v1\x12#beam:metrics:distribution_double:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb0\x01\n\x11USER_LATEST_INT64\x10\x04\x1a\x98\x01\xd2\xa7\xa7\x96\x06\x91\x01\n beam:metric:user:latest_int64:v1\x12\x1c\x62\x65\x61m:metrics:latest_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb3\x01\n\x12USER_LATEST_DOUBLE\x10\x05\x1a\x9a\x01\xd2\xa7\xa7\x96\x06\x93\x01\n!beam:metric:user:latest_double:v1\x12\x1d\x62\x65\x61m:metrics:latest_double:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xad\x01\n\x10USER_TOP_N_INT64\x10\x06\x1a\x96\x01\xd2\xa7\xa7\x96\x06\x8f\x01\n\x1f\x62\x65\x61m:metric:user:top_n_int64:v1\x12\x1b\x62\x65\x61m:metrics:top_n_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb0\x01\n\x11USER_TOP_N_DOUBLE\x10\x07\x1a\x98\x01\xd2\xa7\xa7\x96\x06\x91\x01\n beam:metric:user:top_n_double:v1\x12\x1c\x62\x65\x61m:metrics:top_n_double:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb6\x01\n\x13USER_BOTTOM_N_INT64\x10\x08\x1a\x9c\x01\xd2\xa7\xa7\x96\x06\x95\x01\n\"beam:metric:user:bottom_n_int64:v1\x12\x1e\x62\x65\x61m:metrics:bottom_n_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb9\x01\n\x14USER_BOTTOM_N_DOUBLE\x10\t\x1a\x9e\x01\xd2\xa7\xa7\x96\x06\x97\x01\n#beam:metric:user:bottom_n_double:v1\x12\x1f\x62\x65\x61m:metrics:bottom_n_double:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xaa\x01\n\x0fUSER_SET_STRING\x10\x15\x1a\x94\x01\xd2\xa7\xa7\x96\x06\x8d\x01\n\x1e\x62\x65\x61m:metric:user:set_string:v1\x12\x1a\x62\x65\x61m:metrics:set_string:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xb0\x01\n\x11USER_BOUNDED_TRIE\x10\x16\x1a\x98\x01\xd2\xa7\xa7\x96\x06\x91\x01\n beam:metric:user:bounded_trie:v1\x12\x1c\x62\x65\x61m:metrics:bounded_trie:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"2\n\x0b\x64\x65scription\x12#URN utilized to report user metric.\x12\xad\x01\n\rELEMENT_COUNT\x10\n\x1a\x99\x01\xd2\xa7\xa7\x96\x06\x92\x01\n\x1c\x62\x65\x61m:metric:element_count:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\x0bPCOLLECTION\"J\n\x0b\x64\x65scription\x12;The total elements output to a Pcollection by a PTransform.\x12\xcd\x02\n\x11SAMPLED_BYTE_SIZE\x10\x0b\x1a\xb5\x02\xd2\xa7\xa7\x96\x06\xae\x02\n beam:metric:sampled_byte_size:v1\x12\"beam:metrics:distribution_int64:v1\x1a\x0bPCOLLECTION\"\xd8\x01\n\x0b\x64\x65scription\x12\xc8\x01The total byte size and count of a sampled set (or all) of elements in the pcollection. Sampling is used because calculating the byte count involves serializing the elements which is CPU intensive.\x12\xd9\x01\n\x12START_BUNDLE_MSECS\x10\x0c\x1a\xc0\x01\xd2\xa7\xa7\x96\x06\xb9\x01\n6beam:metric:pardo_execution_time:start_bundle_msecs:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\"X\n\x0b\x64\x65scription\x12IThe total estimated execution time of the start bundlefunction in a pardo\x12\xdf\x01\n\x14PROCESS_BUNDLE_MSECS\x10\r\x1a\xc4\x01\xd2\xa7\xa7\x96\x06\xbd\x01\n8beam:metric:pardo_execution_time:process_bundle_msecs:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\"Z\n\x0b\x64\x65scription\x12KThe total estimated execution time of the process bundlefunction in a pardo\x12\xdd\x01\n\x13\x46INISH_BUNDLE_MSECS\x10\x0e\x1a\xc3\x01\xd2\xa7\xa7\x96\x06\xbc\x01\n7beam:metric:pardo_execution_time:finish_bundle_msecs:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\"Z\n\x0b\x64\x65scription\x12KThe total estimated execution time of the finish bundle function in a pardo\x12\xbb\x01\n\x0bTOTAL_MSECS\x10\x0f\x1a\xa9\x01\xd2\xa7\xa7\x96\x06\xa2\x01\n4beam:metric:ptransform_execution_time:total_msecs:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\"C\n\x0b\x64\x65scription\x12\x34The total estimated execution time of the ptransform\x12\x9f\x02\n\x0eWORK_REMAINING\x10\x10\x1a\x8a\x02\xd2\xa7\xa7\x96\x06\x83\x02\n,beam:metric:ptransform_progress:remaining:v1\x12\x18\x62\x65\x61m:metrics:progress:v1\x1a\nPTRANSFORM\"\xac\x01\n\x0b\x64\x65scription\x12\x9c\x01The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.\x12\x9f\x02\n\x0eWORK_COMPLETED\x10\x11\x1a\x8a\x02\xd2\xa7\xa7\x96\x06\x83\x02\n,beam:metric:ptransform_progress:completed:v1\x12\x18\x62\x65\x61m:metrics:progress:v1\x1a\nPTRANSFORM\"\xac\x01\n\x0b\x64\x65scription\x12\x9c\x01The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.\x12\xa8\x01\n\x17\x44\x41TA_CHANNEL_READ_INDEX\x10\x12\x1a\x8a\x01\xd2\xa7\xa7\x96\x06\x83\x01\n&beam:metric:data_channel:read_index:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\nPTRANSFORM\"2\n\x0b\x64\x65scription\x12#The read index of the data channel.\x12\x8a\x02\n\x11\x41PI_REQUEST_COUNT\x10\x13\x1a\xf2\x01\xd2\xa7\xa7\x96\x06\xeb\x01\n#beam:metric:io:api_request_count:v1\x12\x19\x62\x65\x61m:metrics:sum_int64:v1\x1a\x07SERVICE\x1a\x06METHOD\x1a\x08RESOURCE\x1a\nPTRANSFORM\x1a\x06STATUS\"b\n\x0b\x64\x65scription\x12SRequest counts with status made to IO service APIs to batch read or write elements.\"\x16\n\x0eprocess_metric\x12\x04true\x12\xb3\x02\n\x15\x41PI_REQUEST_LATENCIES\x10\x14\x1a\x97\x02\xd2\xa7\xa7\x96\x06\x90\x02\n\'beam:metric:io:api_request_latencies:v1\x12\x1f\x62\x65\x61m:metrics:histogram_int64:v1\x1a\x07SERVICE\x1a\x06METHOD\x1a\x08RESOURCE\x1a\nPTRANSFORM\"n\n\x0b\x64\x65scription\x12_Histogram counts for request latencies made to IO service APIs to batch read or write elements.\"\x15\n\x05units\x12\x0cMilliseconds\"\x16\n\x0eprocess_metric\x12\x04true\x12\xb8\x01\n\x0eUSER_HISTOGRAM\x10\x17\x1a\xa3\x01\xd2\xa7\xa7\x96\x06\x9c\x01\n#beam:metric:user:histogram_int64:v1\x12\x1f\x62\x65\x61m:metrics:histogram_int64:v1\x1a\nPTRANSFORM\x1a\tNAMESPACE\x1a\x04NAME\"7\n\x0b\x64\x65scription\x12(URN utilized to report histogram metric.\"(\n\x18MonitoringInfoLabelProps\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xcc\x0b\n\x0eMonitoringInfo\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12M\n\x06labels\x18\x04 \x03(\x0b\x32=.org.apache.beam.model.pipeline.v1.MonitoringInfo.LabelsEntry\x12.\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdf\t\n\x14MonitoringInfoLabels\x12!\n\tTRANSFORM\x10\x00\x1a\x12\xa2\xd4\xe0\xe5\x03\x0c\n\nPTRANSFORM\x12$\n\x0bPCOLLECTION\x10\x01\x1a\x13\xa2\xd4\xe0\xe5\x03\r\n\x0bPCOLLECTION\x12\x32\n\x12WINDOWING_STRATEGY\x10\x02\x1a\x1a\xa2\xd4\xe0\xe5\x03\x14\n\x12WINDOWING_STRATEGY\x12\x18\n\x05\x43ODER\x10\x03\x1a\r\xa2\xd4\xe0\xe5\x03\x07\n\x05\x43ODER\x12$\n\x0b\x45NVIRONMENT\x10\x04\x1a\x13\xa2\xd4\xe0\xe5\x03\r\n\x0b\x45NVIRONMENT\x12 \n\tNAMESPACE\x10\x05\x1a\x11\xa2\xd4\xe0\xe5\x03\x0b\n\tNAMESPACE\x12\x16\n\x04NAME\x10\x06\x1a\x0c\xa2\xd4\xe0\xe5\x03\x06\n\x04NAME\x12\x1c\n\x07SERVICE\x10\x07\x1a\x0f\xa2\xd4\xe0\xe5\x03\t\n\x07SERVICE\x12\x1a\n\x06METHOD\x10\x08\x1a\x0e\xa2\xd4\xe0\xe5\x03\x08\n\x06METHOD\x12\x1e\n\x08RESOURCE\x10\t\x1a\x10\xa2\xd4\xe0\xe5\x03\n\n\x08RESOURCE\x12\x1a\n\x06STATUS\x10\n\x1a\x0e\xa2\xd4\xe0\xe5\x03\x08\n\x06STATUS\x12\x34\n\x13\x42IGQUERY_PROJECT_ID\x10\x0b\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13\x42IGQUERY_PROJECT_ID\x12.\n\x10\x42IGQUERY_DATASET\x10\x0c\x1a\x18\xa2\xd4\xe0\xe5\x03\x12\n\x10\x42IGQUERY_DATASET\x12*\n\x0e\x42IGQUERY_TABLE\x10\r\x1a\x16\xa2\xd4\xe0\xe5\x03\x10\n\x0e\x42IGQUERY_TABLE\x12(\n\rBIGQUERY_VIEW\x10\x0e\x1a\x15\xa2\xd4\xe0\xe5\x03\x0f\n\rBIGQUERY_VIEW\x12\x34\n\x13\x42IGQUERY_QUERY_NAME\x10\x0f\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13\x42IGQUERY_QUERY_NAME\x12\"\n\nGCS_BUCKET\x10\x10\x1a\x12\xa2\xd4\xe0\xe5\x03\x0c\n\nGCS_BUCKET\x12*\n\x0eGCS_PROJECT_ID\x10\x11\x1a\x16\xa2\xd4\xe0\xe5\x03\x10\n\x0eGCS_PROJECT_ID\x12\x30\n\x11\x44\x41TASTORE_PROJECT\x10\x12\x1a\x19\xa2\xd4\xe0\xe5\x03\x13\n\x11\x44\x41TASTORE_PROJECT\x12\x34\n\x13\x44\x41TASTORE_NAMESPACE\x10\x13\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13\x44\x41TASTORE_NAMESPACE\x12\x34\n\x13\x42IGTABLE_PROJECT_ID\x10\x14\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13\x42IGTABLE_PROJECT_ID\x12$\n\x0bINSTANCE_ID\x10\x15\x1a\x13\xa2\xd4\xe0\xe5\x03\r\n\x0bINSTANCE_ID\x12\x1e\n\x08TABLE_ID\x10\x16\x1a\x10\xa2\xd4\xe0\xe5\x03\n\n\x08TABLE_ID\x12\x32\n\x12SPANNER_PROJECT_ID\x10\x17\x1a\x1a\xa2\xd4\xe0\xe5\x03\x14\n\x12SPANNER_PROJECT_ID\x12\x34\n\x13SPANNER_DATABASE_ID\x10\x18\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13SPANNER_DATABASE_ID\x12.\n\x10SPANNER_TABLE_ID\x10\x19\x1a\x18\xa2\xd4\xe0\xe5\x03\x12\n\x10SPANNER_TABLE_ID\x12\x34\n\x13SPANNER_INSTANCE_ID\x10\x1a\x1a\x1b\xa2\xd4\xe0\xe5\x03\x15\n\x13SPANNER_INSTANCE_ID\x12\x32\n\x12SPANNER_QUERY_NAME\x10\x1b\x1a\x1a\xa2\xd4\xe0\xe5\x03\x14\n\x12SPANNER_QUERY_NAME\x12\x30\n\x11PER_WORKER_METRIC\x10\x1c\x1a\x19\xa2\xd4\xe0\xe5\x03\x13\n\x11PER_WORKER_METRIC\"\xe4\x06\n\x16MonitoringInfoTypeUrns\"\xc9\x06\n\x04\x45num\x12\x33\n\x0eSUM_INT64_TYPE\x10\x00\x1a\x1f\xa2\xb4\xfa\xc2\x05\x19\x62\x65\x61m:metrics:sum_int64:v1\x12\x35\n\x0fSUM_DOUBLE_TYPE\x10\x01\x1a \xa2\xb4\xfa\xc2\x05\x1a\x62\x65\x61m:metrics:sum_double:v1\x12\x45\n\x17\x44ISTRIBUTION_INT64_TYPE\x10\x02\x1a(\xa2\xb4\xfa\xc2\x05\"beam:metrics:distribution_int64:v1\x12G\n\x18\x44ISTRIBUTION_DOUBLE_TYPE\x10\x03\x1a)\xa2\xb4\xfa\xc2\x05#beam:metrics:distribution_double:v1\x12\x39\n\x11LATEST_INT64_TYPE\x10\x04\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:metrics:latest_int64:v1\x12;\n\x12LATEST_DOUBLE_TYPE\x10\x05\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:metrics:latest_double:v1\x12\x37\n\x10TOP_N_INT64_TYPE\x10\x06\x1a!\xa2\xb4\xfa\xc2\x05\x1b\x62\x65\x61m:metrics:top_n_int64:v1\x12\x39\n\x11TOP_N_DOUBLE_TYPE\x10\x07\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:metrics:top_n_double:v1\x12=\n\x13\x42OTTOM_N_INT64_TYPE\x10\x08\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:metrics:bottom_n_int64:v1\x12?\n\x14\x42OTTOM_N_DOUBLE_TYPE\x10\t\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:metrics:bottom_n_double:v1\x12\x31\n\rPROGRESS_TYPE\x10\n\x1a\x1e\xa2\xb4\xfa\xc2\x05\x18\x62\x65\x61m:metrics:progress:v1\x12\x35\n\x0fSET_STRING_TYPE\x10\x0b\x1a \xa2\xb4\xfa\xc2\x05\x1a\x62\x65\x61m:metrics:set_string:v1\x12\x39\n\x11\x42OUNDED_TRIE_TYPE\x10\x0c\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:metrics:bounded_trie:v1\x12\x34\n\tHISTOGRAM\x10\r\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:metrics:histogram_int64:v1\"\xdd\x01\n\x0f\x42oundedTrieNode\x12\x11\n\ttruncated\x18\x01 \x01(\x08\x12R\n\x08\x63hildren\x18\x02 \x03(\x0b\x32@.org.apache.beam.model.pipeline.v1.BoundedTrieNode.ChildrenEntry\x1a\x63\n\rChildrenEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.org.apache.beam.model.pipeline.v1.BoundedTrieNode:\x02\x38\x01\"q\n\x0b\x42oundedTrie\x12\r\n\x05\x62ound\x18\x01 \x01(\x05\x12@\n\x04root\x18\x02 \x01(\x0b\x32\x32.org.apache.beam.model.pipeline.v1.BoundedTrieNode\x12\x11\n\tsingleton\x18\x03 \x03(\t\"\xf8\x04\n\x0eHistogramValue\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\\\n\x0e\x62ucket_options\x18\x02 \x01(\x0b\x32?.org.apache.beam.model.pipeline.v1.HistogramValue.BucketOptionsH\x01\x88\x01\x01\x12\x15\n\rbucket_counts\x18\x03 \x03(\x03\x1a\xbf\x03\n\rBucketOptions\x12X\n\x06linear\x18\x01 \x01(\x0b\x32\x46.org.apache.beam.model.pipeline.v1.HistogramValue.BucketOptions.LinearH\x00\x12\x64\n\x0b\x65xponential\x18\x02 \x01(\x0b\x32M.org.apache.beam.model.pipeline.v1.HistogramValue.BucketOptions.Base2ExponentH\x00\x1az\n\x06Linear\x12\x1e\n\x11number_of_buckets\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x05width\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x12\n\x05start\x18\x03 \x01(\x01H\x02\x88\x01\x01\x42\x14\n\x12_number_of_bucketsB\x08\n\x06_widthB\x08\n\x06_start\x1a\x63\n\rBase2Exponent\x12\x1e\n\x11number_of_buckets\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x05scale\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x14\n\x12_number_of_bucketsB\x08\n\x06_scaleB\r\n\x0b\x62ucket_typeB\x08\n\x06_countB\x11\n\x0f_bucket_options:v\n\x0blabel_props\x12!.google.protobuf.EnumValueOptions\x18\xc4\x8a\xdc< \x01(\x0b\x32;.org.apache.beam.model.pipeline.v1.MonitoringInfoLabelProps:y\n\x14monitoring_info_spec\x12!.google.protobuf.EnumValueOptions\x18\xfa\xf4\xe4\x62 \x01(\x0b\x32\x35.org.apache.beam.model.pipeline.v1.MonitoringInfoSpecBy\n!org.apache.beam.model.pipeline.v1B\nMetricsApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.metrics_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\nMetricsApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SUM_INT64"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SUM_INT64"]._serialized_options = b'\322\247\247\226\006\213\001\n\035beam:metric:user:sum_int64:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SUM_DOUBLE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SUM_DOUBLE"]._serialized_options = b'\322\247\247\226\006\215\001\n\036beam:metric:user:sum_double:v1\022\032beam:metrics:sum_double:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_DISTRIBUTION_INT64"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_DISTRIBUTION_INT64"]._serialized_options = b'\322\247\247\226\006\235\001\n&beam:metric:user:distribution_int64:v1\022\"beam:metrics:distribution_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_DISTRIBUTION_DOUBLE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_DISTRIBUTION_DOUBLE"]._serialized_options = b'\322\247\247\226\006\237\001\n\'beam:metric:user:distribution_double:v1\022#beam:metrics:distribution_double:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_LATEST_INT64"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_LATEST_INT64"]._serialized_options = b'\322\247\247\226\006\221\001\n beam:metric:user:latest_int64:v1\022\034beam:metrics:latest_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_LATEST_DOUBLE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_LATEST_DOUBLE"]._serialized_options = b'\322\247\247\226\006\223\001\n!beam:metric:user:latest_double:v1\022\035beam:metrics:latest_double:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_TOP_N_INT64"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_TOP_N_INT64"]._serialized_options = b'\322\247\247\226\006\217\001\n\037beam:metric:user:top_n_int64:v1\022\033beam:metrics:top_n_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_TOP_N_DOUBLE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_TOP_N_DOUBLE"]._serialized_options = b'\322\247\247\226\006\221\001\n beam:metric:user:top_n_double:v1\022\034beam:metrics:top_n_double:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOTTOM_N_INT64"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOTTOM_N_INT64"]._serialized_options = b'\322\247\247\226\006\225\001\n\"beam:metric:user:bottom_n_int64:v1\022\036beam:metrics:bottom_n_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOTTOM_N_DOUBLE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOTTOM_N_DOUBLE"]._serialized_options = b'\322\247\247\226\006\227\001\n#beam:metric:user:bottom_n_double:v1\022\037beam:metrics:bottom_n_double:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SET_STRING"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_SET_STRING"]._serialized_options = b'\322\247\247\226\006\215\001\n\036beam:metric:user:set_string:v1\022\032beam:metrics:set_string:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOUNDED_TRIE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_BOUNDED_TRIE"]._serialized_options = b'\322\247\247\226\006\221\001\n beam:metric:user:bounded_trie:v1\022\034beam:metrics:bounded_trie:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"2\n\013description\022#URN utilized to report user metric.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["ELEMENT_COUNT"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["ELEMENT_COUNT"]._serialized_options = b'\322\247\247\226\006\222\001\n\034beam:metric:element_count:v1\022\031beam:metrics:sum_int64:v1\032\013PCOLLECTION\"J\n\013description\022;The total elements output to a Pcollection by a PTransform.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["SAMPLED_BYTE_SIZE"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["SAMPLED_BYTE_SIZE"]._serialized_options = b'\322\247\247\226\006\256\002\n beam:metric:sampled_byte_size:v1\022\"beam:metrics:distribution_int64:v1\032\013PCOLLECTION\"\330\001\n\013description\022\310\001The total byte size and count of a sampled set (or all) of elements in the pcollection. Sampling is used because calculating the byte count involves serializing the elements which is CPU intensive.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["START_BUNDLE_MSECS"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["START_BUNDLE_MSECS"]._serialized_options = b'\322\247\247\226\006\271\001\n6beam:metric:pardo_execution_time:start_bundle_msecs:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\"X\n\013description\022IThe total estimated execution time of the start bundlefunction in a pardo' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["PROCESS_BUNDLE_MSECS"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["PROCESS_BUNDLE_MSECS"]._serialized_options = b'\322\247\247\226\006\275\001\n8beam:metric:pardo_execution_time:process_bundle_msecs:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\"Z\n\013description\022KThe total estimated execution time of the process bundlefunction in a pardo' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["FINISH_BUNDLE_MSECS"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["FINISH_BUNDLE_MSECS"]._serialized_options = b'\322\247\247\226\006\274\001\n7beam:metric:pardo_execution_time:finish_bundle_msecs:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\"Z\n\013description\022KThe total estimated execution time of the finish bundle function in a pardo' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["TOTAL_MSECS"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["TOTAL_MSECS"]._serialized_options = b'\322\247\247\226\006\242\001\n4beam:metric:ptransform_execution_time:total_msecs:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\"C\n\013description\0224The total estimated execution time of the ptransform' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["WORK_REMAINING"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["WORK_REMAINING"]._serialized_options = b'\322\247\247\226\006\203\002\n,beam:metric:ptransform_progress:remaining:v1\022\030beam:metrics:progress:v1\032\nPTRANSFORM\"\254\001\n\013description\022\234\001The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["WORK_COMPLETED"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["WORK_COMPLETED"]._serialized_options = b'\322\247\247\226\006\203\002\n,beam:metric:ptransform_progress:completed:v1\022\030beam:metrics:progress:v1\032\nPTRANSFORM\"\254\001\n\013description\022\234\001The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["DATA_CHANNEL_READ_INDEX"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["DATA_CHANNEL_READ_INDEX"]._serialized_options = b'\322\247\247\226\006\203\001\n&beam:metric:data_channel:read_index:v1\022\031beam:metrics:sum_int64:v1\032\nPTRANSFORM\"2\n\013description\022#The read index of the data channel.' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["API_REQUEST_COUNT"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["API_REQUEST_COUNT"]._serialized_options = b'\322\247\247\226\006\353\001\n#beam:metric:io:api_request_count:v1\022\031beam:metrics:sum_int64:v1\032\007SERVICE\032\006METHOD\032\010RESOURCE\032\nPTRANSFORM\032\006STATUS\"b\n\013description\022SRequest counts with status made to IO service APIs to batch read or write elements.\"\026\n\016process_metric\022\004true' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["API_REQUEST_LATENCIES"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["API_REQUEST_LATENCIES"]._serialized_options = b'\322\247\247\226\006\220\002\n\'beam:metric:io:api_request_latencies:v1\022\037beam:metrics:histogram_int64:v1\032\007SERVICE\032\006METHOD\032\010RESOURCE\032\nPTRANSFORM\"n\n\013description\022_Histogram counts for request latencies made to IO service APIs to batch read or write elements.\"\025\n\005units\022\014Milliseconds\"\026\n\016process_metric\022\004true' + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_HISTOGRAM"]._loaded_options = None + _globals['_MONITORINGINFOSPECS_ENUM'].values_by_name["USER_HISTOGRAM"]._serialized_options = b'\322\247\247\226\006\234\001\n#beam:metric:user:histogram_int64:v1\022\037beam:metrics:histogram_int64:v1\032\nPTRANSFORM\032\tNAMESPACE\032\004NAME\"7\n\013description\022(URN utilized to report histogram metric.' + _globals['_MONITORINGINFO_LABELSENTRY']._loaded_options = None + _globals['_MONITORINGINFO_LABELSENTRY']._serialized_options = b'8\001' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["TRANSFORM"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["TRANSFORM"]._serialized_options = b'\242\324\340\345\003\014\n\nPTRANSFORM' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["PCOLLECTION"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["PCOLLECTION"]._serialized_options = b'\242\324\340\345\003\r\n\013PCOLLECTION' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["WINDOWING_STRATEGY"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["WINDOWING_STRATEGY"]._serialized_options = b'\242\324\340\345\003\024\n\022WINDOWING_STRATEGY' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["CODER"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["CODER"]._serialized_options = b'\242\324\340\345\003\007\n\005CODER' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["ENVIRONMENT"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["ENVIRONMENT"]._serialized_options = b'\242\324\340\345\003\r\n\013ENVIRONMENT' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["NAMESPACE"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["NAMESPACE"]._serialized_options = b'\242\324\340\345\003\013\n\tNAMESPACE' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["NAME"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["NAME"]._serialized_options = b'\242\324\340\345\003\006\n\004NAME' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SERVICE"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SERVICE"]._serialized_options = b'\242\324\340\345\003\t\n\007SERVICE' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["METHOD"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["METHOD"]._serialized_options = b'\242\324\340\345\003\010\n\006METHOD' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["RESOURCE"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["RESOURCE"]._serialized_options = b'\242\324\340\345\003\n\n\010RESOURCE' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["STATUS"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["STATUS"]._serialized_options = b'\242\324\340\345\003\010\n\006STATUS' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_PROJECT_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_PROJECT_ID"]._serialized_options = b'\242\324\340\345\003\025\n\023BIGQUERY_PROJECT_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_DATASET"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_DATASET"]._serialized_options = b'\242\324\340\345\003\022\n\020BIGQUERY_DATASET' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_TABLE"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_TABLE"]._serialized_options = b'\242\324\340\345\003\020\n\016BIGQUERY_TABLE' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_VIEW"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_VIEW"]._serialized_options = b'\242\324\340\345\003\017\n\rBIGQUERY_VIEW' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_QUERY_NAME"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGQUERY_QUERY_NAME"]._serialized_options = b'\242\324\340\345\003\025\n\023BIGQUERY_QUERY_NAME' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["GCS_BUCKET"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["GCS_BUCKET"]._serialized_options = b'\242\324\340\345\003\014\n\nGCS_BUCKET' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["GCS_PROJECT_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["GCS_PROJECT_ID"]._serialized_options = b'\242\324\340\345\003\020\n\016GCS_PROJECT_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["DATASTORE_PROJECT"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["DATASTORE_PROJECT"]._serialized_options = b'\242\324\340\345\003\023\n\021DATASTORE_PROJECT' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["DATASTORE_NAMESPACE"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["DATASTORE_NAMESPACE"]._serialized_options = b'\242\324\340\345\003\025\n\023DATASTORE_NAMESPACE' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGTABLE_PROJECT_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["BIGTABLE_PROJECT_ID"]._serialized_options = b'\242\324\340\345\003\025\n\023BIGTABLE_PROJECT_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["INSTANCE_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["INSTANCE_ID"]._serialized_options = b'\242\324\340\345\003\r\n\013INSTANCE_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["TABLE_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["TABLE_ID"]._serialized_options = b'\242\324\340\345\003\n\n\010TABLE_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_PROJECT_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_PROJECT_ID"]._serialized_options = b'\242\324\340\345\003\024\n\022SPANNER_PROJECT_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_DATABASE_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_DATABASE_ID"]._serialized_options = b'\242\324\340\345\003\025\n\023SPANNER_DATABASE_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_TABLE_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_TABLE_ID"]._serialized_options = b'\242\324\340\345\003\022\n\020SPANNER_TABLE_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_INSTANCE_ID"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_INSTANCE_ID"]._serialized_options = b'\242\324\340\345\003\025\n\023SPANNER_INSTANCE_ID' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_QUERY_NAME"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["SPANNER_QUERY_NAME"]._serialized_options = b'\242\324\340\345\003\024\n\022SPANNER_QUERY_NAME' + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["PER_WORKER_METRIC"]._loaded_options = None + _globals['_MONITORINGINFO_MONITORINGINFOLABELS'].values_by_name["PER_WORKER_METRIC"]._serialized_options = b'\242\324\340\345\003\023\n\021PER_WORKER_METRIC' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SUM_INT64_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SUM_INT64_TYPE"]._serialized_options = b'\242\264\372\302\005\031beam:metrics:sum_int64:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SUM_DOUBLE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SUM_DOUBLE_TYPE"]._serialized_options = b'\242\264\372\302\005\032beam:metrics:sum_double:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["DISTRIBUTION_INT64_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["DISTRIBUTION_INT64_TYPE"]._serialized_options = b'\242\264\372\302\005\"beam:metrics:distribution_int64:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["DISTRIBUTION_DOUBLE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["DISTRIBUTION_DOUBLE_TYPE"]._serialized_options = b'\242\264\372\302\005#beam:metrics:distribution_double:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["LATEST_INT64_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["LATEST_INT64_TYPE"]._serialized_options = b'\242\264\372\302\005\034beam:metrics:latest_int64:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["LATEST_DOUBLE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["LATEST_DOUBLE_TYPE"]._serialized_options = b'\242\264\372\302\005\035beam:metrics:latest_double:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["TOP_N_INT64_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["TOP_N_INT64_TYPE"]._serialized_options = b'\242\264\372\302\005\033beam:metrics:top_n_int64:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["TOP_N_DOUBLE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["TOP_N_DOUBLE_TYPE"]._serialized_options = b'\242\264\372\302\005\034beam:metrics:top_n_double:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOTTOM_N_INT64_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOTTOM_N_INT64_TYPE"]._serialized_options = b'\242\264\372\302\005\036beam:metrics:bottom_n_int64:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOTTOM_N_DOUBLE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOTTOM_N_DOUBLE_TYPE"]._serialized_options = b'\242\264\372\302\005\037beam:metrics:bottom_n_double:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["PROGRESS_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["PROGRESS_TYPE"]._serialized_options = b'\242\264\372\302\005\030beam:metrics:progress:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SET_STRING_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["SET_STRING_TYPE"]._serialized_options = b'\242\264\372\302\005\032beam:metrics:set_string:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOUNDED_TRIE_TYPE"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["BOUNDED_TRIE_TYPE"]._serialized_options = b'\242\264\372\302\005\034beam:metrics:bounded_trie:v1' + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["HISTOGRAM"]._loaded_options = None + _globals['_MONITORINGINFOTYPEURNS_ENUM'].values_by_name["HISTOGRAM"]._serialized_options = b'\242\264\372\302\005\037beam:metrics:histogram_int64:v1' + _globals['_BOUNDEDTRIENODE_CHILDRENENTRY']._loaded_options = None + _globals['_BOUNDEDTRIENODE_CHILDRENENTRY']._serialized_options = b'8\001' + _globals['_MONITORINGINFOSPEC']._serialized_start=211 + _globals['_MONITORINGINFOSPEC']._serialized_end=351 + _globals['_ANNOTATION']._serialized_start=353 + _globals['_ANNOTATION']._serialized_end=393 + _globals['_MONITORINGINFOSPECS']._serialized_start=396 + _globals['_MONITORINGINFOSPECS']._serialized_end=5496 + _globals['_MONITORINGINFOSPECS_ENUM']._serialized_start=420 + _globals['_MONITORINGINFOSPECS_ENUM']._serialized_end=5496 + _globals['_MONITORINGINFOLABELPROPS']._serialized_start=5498 + _globals['_MONITORINGINFOLABELPROPS']._serialized_end=5538 + _globals['_MONITORINGINFO']._serialized_start=5541 + _globals['_MONITORINGINFO']._serialized_end=7025 + _globals['_MONITORINGINFO_LABELSENTRY']._serialized_start=5730 + _globals['_MONITORINGINFO_LABELSENTRY']._serialized_end=5775 + _globals['_MONITORINGINFO_MONITORINGINFOLABELS']._serialized_start=5778 + _globals['_MONITORINGINFO_MONITORINGINFOLABELS']._serialized_end=7025 + _globals['_MONITORINGINFOTYPEURNS']._serialized_start=7028 + _globals['_MONITORINGINFOTYPEURNS']._serialized_end=7896 + _globals['_MONITORINGINFOTYPEURNS_ENUM']._serialized_start=7055 + _globals['_MONITORINGINFOTYPEURNS_ENUM']._serialized_end=7896 + _globals['_BOUNDEDTRIENODE']._serialized_start=7899 + _globals['_BOUNDEDTRIENODE']._serialized_end=8120 + _globals['_BOUNDEDTRIENODE_CHILDRENENTRY']._serialized_start=8021 + _globals['_BOUNDEDTRIENODE_CHILDRENENTRY']._serialized_end=8120 + _globals['_BOUNDEDTRIE']._serialized_start=8122 + _globals['_BOUNDEDTRIE']._serialized_end=8235 + _globals['_HISTOGRAMVALUE']._serialized_start=8238 + _globals['_HISTOGRAMVALUE']._serialized_end=8870 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS']._serialized_start=8394 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS']._serialized_end=8841 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS_LINEAR']._serialized_start=8603 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS_LINEAR']._serialized_end=8725 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS_BASE2EXPONENT']._serialized_start=8727 + _globals['_HISTOGRAMVALUE_BUCKETOPTIONS_BASE2EXPONENT']._serialized_end=8826 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.pyi new file mode 100644 index 000000000000..2705c4b8d4f2 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2.pyi @@ -0,0 +1,961 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers for metrics classes, used in the Fn API, Job API, and by SDKs. +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pb2 as _descriptor_pb2 +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf.internal import extension_dict as _extension_dict +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class MonitoringInfoSpec(_message.Message): + """A specification for describing a well known MonitoringInfo. + + All specifications are uniquely identified by the urn. + """ + + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + REQUIRED_LABELS_FIELD_NUMBER: _builtins.int + ANNOTATIONS_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """Defines the semantic meaning of the metric or monitored state. + + See MonitoringInfoSpecs.Enum for the set of well known metrics/monitored + state. + """ + type: _builtins.str + """Defines the required encoding and aggregation method for the payload. + + See MonitoringInfoTypeUrns.Enum for the set of well known types. + """ + @_builtins.property + def required_labels(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """The list of required labels for the specified urn and type.""" + + @_builtins.property + def annotations(self) -> _containers.RepeatedCompositeFieldContainer[Global___Annotation]: + """Extra non functional parts of the spec for descriptive purposes. + i.e. description, units, etc. + """ + + def __init__( + self, + *, + urn: _builtins.str | None = ..., + type: _builtins.str | None = ..., + required_labels: _abc.Iterable[_builtins.str] | None = ..., + annotations: _abc.Iterable[Global___Annotation] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["annotations", b"annotations", "required_labels", b"required_labels", "type", b"type", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MonitoringInfoSpec: _TypeAlias = MonitoringInfoSpec # noqa: Y015 + +@_typing.final +class Annotation(_message.Message): + """The key name and value string of MonitoringInfo annotations.""" + + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Annotation: _TypeAlias = Annotation # noqa: Y015 + +@_typing.final +class MonitoringInfoSpecs(_message.Message): + """A set of well known MonitoringInfo specifications.""" + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[MonitoringInfoSpecs._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + USER_SUM_INT64: MonitoringInfoSpecs._Enum.ValueType # 0 + """Represents an integer counter where values are summed across bundles.""" + USER_SUM_DOUBLE: MonitoringInfoSpecs._Enum.ValueType # 1 + """Represents a double counter where values are summed across bundles.""" + USER_DISTRIBUTION_INT64: MonitoringInfoSpecs._Enum.ValueType # 2 + """Represents a distribution of an integer value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + """ + USER_DISTRIBUTION_DOUBLE: MonitoringInfoSpecs._Enum.ValueType # 3 + """Represents a distribution of a double value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + """ + USER_LATEST_INT64: MonitoringInfoSpecs._Enum.ValueType # 4 + """Represents the latest seen integer value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + """ + USER_LATEST_DOUBLE: MonitoringInfoSpecs._Enum.ValueType # 5 + """Represents the latest seen double value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + """ + USER_TOP_N_INT64: MonitoringInfoSpecs._Enum.ValueType # 6 + """Represents the largest set of integer values seen across bundles.""" + USER_TOP_N_DOUBLE: MonitoringInfoSpecs._Enum.ValueType # 7 + """Represents the largest set of double values seen across bundles.""" + USER_BOTTOM_N_INT64: MonitoringInfoSpecs._Enum.ValueType # 8 + """Represents the smallest set of integer values seen across bundles.""" + USER_BOTTOM_N_DOUBLE: MonitoringInfoSpecs._Enum.ValueType # 9 + """Represents the smallest set of double values seen across bundles.""" + USER_SET_STRING: MonitoringInfoSpecs._Enum.ValueType # 21 + """Represents a set of strings seen across bundles.""" + USER_BOUNDED_TRIE: MonitoringInfoSpecs._Enum.ValueType # 22 + """Represents a set of strings seen across bundles.""" + ELEMENT_COUNT: MonitoringInfoSpecs._Enum.ValueType # 10 + """General monitored state information which contains structured information + which does not fit into a typical metric format. See MonitoringTableData + for more details. + + TODO(https://github.com/apache/beam/issues/20122): Support monitored state. + + USER_MONITORING_TABLE = XX [(monitoring_info_spec) = { + urn: "beam:metric:user:v1", + type: "beam:metrics:monitoring_table:v1", + required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"], + annotations: [{ + key: "description", + value: "URN utilized to report user monitoring data." + }] + }]; + """ + SAMPLED_BYTE_SIZE: MonitoringInfoSpecs._Enum.ValueType # 11 + START_BUNDLE_MSECS: MonitoringInfoSpecs._Enum.ValueType # 12 + PROCESS_BUNDLE_MSECS: MonitoringInfoSpecs._Enum.ValueType # 13 + FINISH_BUNDLE_MSECS: MonitoringInfoSpecs._Enum.ValueType # 14 + TOTAL_MSECS: MonitoringInfoSpecs._Enum.ValueType # 15 + WORK_REMAINING: MonitoringInfoSpecs._Enum.ValueType # 16 + """All values reported across all beam:metric:ptransform_progress:.*:v1 + metrics are of the same magnitude. + """ + WORK_COMPLETED: MonitoringInfoSpecs._Enum.ValueType # 17 + """All values reported across all beam:metric:ptransform_progress:.*:v1 + metrics are of the same magnitude. + """ + DATA_CHANNEL_READ_INDEX: MonitoringInfoSpecs._Enum.ValueType # 18 + """The (0-based) index of the latest item processed from the data channel. + This gives an indication of the SDKs progress through the data channel, + and is a lower bound on where it is able to split. + For an SDK that processes items sequentially, this is equivalently the + number of items fully processed (or -1 if processing has not yet started). + """ + API_REQUEST_COUNT: MonitoringInfoSpecs._Enum.ValueType # 19 + API_REQUEST_LATENCIES: MonitoringInfoSpecs._Enum.ValueType # 20 + USER_HISTOGRAM: MonitoringInfoSpecs._Enum.ValueType # 23 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + USER_SUM_INT64: MonitoringInfoSpecs.Enum.ValueType # 0 + """Represents an integer counter where values are summed across bundles.""" + USER_SUM_DOUBLE: MonitoringInfoSpecs.Enum.ValueType # 1 + """Represents a double counter where values are summed across bundles.""" + USER_DISTRIBUTION_INT64: MonitoringInfoSpecs.Enum.ValueType # 2 + """Represents a distribution of an integer value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + """ + USER_DISTRIBUTION_DOUBLE: MonitoringInfoSpecs.Enum.ValueType # 3 + """Represents a distribution of a double value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + """ + USER_LATEST_INT64: MonitoringInfoSpecs.Enum.ValueType # 4 + """Represents the latest seen integer value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + """ + USER_LATEST_DOUBLE: MonitoringInfoSpecs.Enum.ValueType # 5 + """Represents the latest seen double value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + """ + USER_TOP_N_INT64: MonitoringInfoSpecs.Enum.ValueType # 6 + """Represents the largest set of integer values seen across bundles.""" + USER_TOP_N_DOUBLE: MonitoringInfoSpecs.Enum.ValueType # 7 + """Represents the largest set of double values seen across bundles.""" + USER_BOTTOM_N_INT64: MonitoringInfoSpecs.Enum.ValueType # 8 + """Represents the smallest set of integer values seen across bundles.""" + USER_BOTTOM_N_DOUBLE: MonitoringInfoSpecs.Enum.ValueType # 9 + """Represents the smallest set of double values seen across bundles.""" + USER_SET_STRING: MonitoringInfoSpecs.Enum.ValueType # 21 + """Represents a set of strings seen across bundles.""" + USER_BOUNDED_TRIE: MonitoringInfoSpecs.Enum.ValueType # 22 + """Represents a set of strings seen across bundles.""" + ELEMENT_COUNT: MonitoringInfoSpecs.Enum.ValueType # 10 + """General monitored state information which contains structured information + which does not fit into a typical metric format. See MonitoringTableData + for more details. + + TODO(https://github.com/apache/beam/issues/20122): Support monitored state. + + USER_MONITORING_TABLE = XX [(monitoring_info_spec) = { + urn: "beam:metric:user:v1", + type: "beam:metrics:monitoring_table:v1", + required_labels: ["PTRANSFORM", "NAMESPACE", "NAME"], + annotations: [{ + key: "description", + value: "URN utilized to report user monitoring data." + }] + }]; + """ + SAMPLED_BYTE_SIZE: MonitoringInfoSpecs.Enum.ValueType # 11 + START_BUNDLE_MSECS: MonitoringInfoSpecs.Enum.ValueType # 12 + PROCESS_BUNDLE_MSECS: MonitoringInfoSpecs.Enum.ValueType # 13 + FINISH_BUNDLE_MSECS: MonitoringInfoSpecs.Enum.ValueType # 14 + TOTAL_MSECS: MonitoringInfoSpecs.Enum.ValueType # 15 + WORK_REMAINING: MonitoringInfoSpecs.Enum.ValueType # 16 + """All values reported across all beam:metric:ptransform_progress:.*:v1 + metrics are of the same magnitude. + """ + WORK_COMPLETED: MonitoringInfoSpecs.Enum.ValueType # 17 + """All values reported across all beam:metric:ptransform_progress:.*:v1 + metrics are of the same magnitude. + """ + DATA_CHANNEL_READ_INDEX: MonitoringInfoSpecs.Enum.ValueType # 18 + """The (0-based) index of the latest item processed from the data channel. + This gives an indication of the SDKs progress through the data channel, + and is a lower bound on where it is able to split. + For an SDK that processes items sequentially, this is equivalently the + number of items fully processed (or -1 if processing has not yet started). + """ + API_REQUEST_COUNT: MonitoringInfoSpecs.Enum.ValueType # 19 + API_REQUEST_LATENCIES: MonitoringInfoSpecs.Enum.ValueType # 20 + USER_HISTOGRAM: MonitoringInfoSpecs.Enum.ValueType # 23 + + def __init__( + self, + ) -> None: ... + +Global___MonitoringInfoSpecs: _TypeAlias = MonitoringInfoSpecs # noqa: Y015 + +@_typing.final +class MonitoringInfoLabelProps(_message.Message): + """A set of properties for the MonitoringInfoLabel, this is useful to obtain + the proper label string for the MonitoringInfoLabel. + """ + + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + name: _builtins.str + """The label key to use in the MonitoringInfo labels map.""" + def __init__( + self, + *, + name: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MonitoringInfoLabelProps: _TypeAlias = MonitoringInfoLabelProps # noqa: Y015 + +@_typing.final +class MonitoringInfo(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + class _MonitoringInfoLabels: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _MonitoringInfoLabelsEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[MonitoringInfo._MonitoringInfoLabels.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + TRANSFORM: MonitoringInfo._MonitoringInfoLabels.ValueType # 0 + """The values used for TRANSFORM, PCOLLECTION, WINDOWING_STRATEGY + CODER, ENVIRONMENT, etc. must always match the keys used to + refer to them. For actively processed bundles, these should match the + values within the ProcessBundleDescriptor. For job management APIs, + these should match values within the original pipeline representation. + """ + PCOLLECTION: MonitoringInfo._MonitoringInfoLabels.ValueType # 1 + WINDOWING_STRATEGY: MonitoringInfo._MonitoringInfoLabels.ValueType # 2 + CODER: MonitoringInfo._MonitoringInfoLabels.ValueType # 3 + ENVIRONMENT: MonitoringInfo._MonitoringInfoLabels.ValueType # 4 + NAMESPACE: MonitoringInfo._MonitoringInfoLabels.ValueType # 5 + NAME: MonitoringInfo._MonitoringInfoLabels.ValueType # 6 + SERVICE: MonitoringInfo._MonitoringInfoLabels.ValueType # 7 + METHOD: MonitoringInfo._MonitoringInfoLabels.ValueType # 8 + RESOURCE: MonitoringInfo._MonitoringInfoLabels.ValueType # 9 + STATUS: MonitoringInfo._MonitoringInfoLabels.ValueType # 10 + BIGQUERY_PROJECT_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 11 + BIGQUERY_DATASET: MonitoringInfo._MonitoringInfoLabels.ValueType # 12 + BIGQUERY_TABLE: MonitoringInfo._MonitoringInfoLabels.ValueType # 13 + BIGQUERY_VIEW: MonitoringInfo._MonitoringInfoLabels.ValueType # 14 + BIGQUERY_QUERY_NAME: MonitoringInfo._MonitoringInfoLabels.ValueType # 15 + GCS_BUCKET: MonitoringInfo._MonitoringInfoLabels.ValueType # 16 + GCS_PROJECT_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 17 + DATASTORE_PROJECT: MonitoringInfo._MonitoringInfoLabels.ValueType # 18 + DATASTORE_NAMESPACE: MonitoringInfo._MonitoringInfoLabels.ValueType # 19 + BIGTABLE_PROJECT_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 20 + INSTANCE_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 21 + TABLE_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 22 + SPANNER_PROJECT_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 23 + SPANNER_DATABASE_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 24 + SPANNER_TABLE_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 25 + SPANNER_INSTANCE_ID: MonitoringInfo._MonitoringInfoLabels.ValueType # 26 + SPANNER_QUERY_NAME: MonitoringInfo._MonitoringInfoLabels.ValueType # 27 + PER_WORKER_METRIC: MonitoringInfo._MonitoringInfoLabels.ValueType # 28 + """Label which if has a "true" value indicates that the metric is intended + to be aggregated per-worker. + """ + + class MonitoringInfoLabels(_MonitoringInfoLabels, metaclass=_MonitoringInfoLabelsEnumTypeWrapper): ... + TRANSFORM: MonitoringInfo.MonitoringInfoLabels.ValueType # 0 + """The values used for TRANSFORM, PCOLLECTION, WINDOWING_STRATEGY + CODER, ENVIRONMENT, etc. must always match the keys used to + refer to them. For actively processed bundles, these should match the + values within the ProcessBundleDescriptor. For job management APIs, + these should match values within the original pipeline representation. + """ + PCOLLECTION: MonitoringInfo.MonitoringInfoLabels.ValueType # 1 + WINDOWING_STRATEGY: MonitoringInfo.MonitoringInfoLabels.ValueType # 2 + CODER: MonitoringInfo.MonitoringInfoLabels.ValueType # 3 + ENVIRONMENT: MonitoringInfo.MonitoringInfoLabels.ValueType # 4 + NAMESPACE: MonitoringInfo.MonitoringInfoLabels.ValueType # 5 + NAME: MonitoringInfo.MonitoringInfoLabels.ValueType # 6 + SERVICE: MonitoringInfo.MonitoringInfoLabels.ValueType # 7 + METHOD: MonitoringInfo.MonitoringInfoLabels.ValueType # 8 + RESOURCE: MonitoringInfo.MonitoringInfoLabels.ValueType # 9 + STATUS: MonitoringInfo.MonitoringInfoLabels.ValueType # 10 + BIGQUERY_PROJECT_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 11 + BIGQUERY_DATASET: MonitoringInfo.MonitoringInfoLabels.ValueType # 12 + BIGQUERY_TABLE: MonitoringInfo.MonitoringInfoLabels.ValueType # 13 + BIGQUERY_VIEW: MonitoringInfo.MonitoringInfoLabels.ValueType # 14 + BIGQUERY_QUERY_NAME: MonitoringInfo.MonitoringInfoLabels.ValueType # 15 + GCS_BUCKET: MonitoringInfo.MonitoringInfoLabels.ValueType # 16 + GCS_PROJECT_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 17 + DATASTORE_PROJECT: MonitoringInfo.MonitoringInfoLabels.ValueType # 18 + DATASTORE_NAMESPACE: MonitoringInfo.MonitoringInfoLabels.ValueType # 19 + BIGTABLE_PROJECT_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 20 + INSTANCE_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 21 + TABLE_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 22 + SPANNER_PROJECT_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 23 + SPANNER_DATABASE_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 24 + SPANNER_TABLE_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 25 + SPANNER_INSTANCE_ID: MonitoringInfo.MonitoringInfoLabels.ValueType # 26 + SPANNER_QUERY_NAME: MonitoringInfo.MonitoringInfoLabels.ValueType # 27 + PER_WORKER_METRIC: MonitoringInfo.MonitoringInfoLabels.ValueType # 28 + """Label which if has a "true" value indicates that the metric is intended + to be aggregated per-worker. + """ + + @_typing.final + class LabelsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: _builtins.str | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + URN_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + LABELS_FIELD_NUMBER: _builtins.int + START_TIME_FIELD_NUMBER: _builtins.int + urn: _builtins.str + """(Required) Defines the semantic meaning of the metric or monitored state. + + See MonitoringInfoSpecs.Enum for the set of well known metrics/monitored + state. + """ + type: _builtins.str + """(Required) Defines the encoding and aggregation method for the payload. + + See MonitoringInfoTypeUrns.Enum for the set of well known types. + """ + payload: _builtins.bytes + """(Required) The metric or monitored state encoded as per the specification + defined by the type. + """ + @_builtins.property + def labels(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """A set of key and value labels which define the scope of the metric. For + well known URNs, the set of required labels is provided by the associated + MonitoringInfoSpec. + + Either a well defined entity id for matching the enum names in + the MonitoringInfoLabels enum or any arbitrary label + set by a custom metric or user metric. + + A monitoring system is expected to be able to aggregate the metrics + together for all updates having the same URN and labels. Some systems such + as Stackdriver will be able to aggregate the metrics using a subset of the + provided labels + """ + + @_builtins.property + def start_time(self) -> _timestamp_pb2.Timestamp: + """This indicates the start of the time range over which this value was + measured. + This is needed by some external metric aggregation services + to indicate when the reporter of the metric first began collecting the + cumulative value for the timeseries. + If the SDK Harness restarts, it should reset the start_time, and reset + the collection of cumulative metrics (i.e. start to count again from 0). + HarnessMonitoringInfos should set this start_time once, when the + MonitoringInfo is first reported. + ProcessBundle MonitoringInfos should set a start_time for each bundle. + """ + + def __init__( + self, + *, + urn: _builtins.str | None = ..., + type: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + labels: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + start_time: _timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["start_time", b"start_time"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["labels", b"labels", "payload", b"payload", "start_time", b"start_time", "type", b"type", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MonitoringInfo: _TypeAlias = MonitoringInfo # noqa: Y015 + +@_typing.final +class MonitoringInfoTypeUrns(_message.Message): + """A set of well known URNs that specify the encoding and aggregation method.""" + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[MonitoringInfoTypeUrns._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + SUM_INT64_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 0 + """Represents an integer counter where values are summed across bundles. + + Encoding: + - value: beam:coder:varint:v1 + """ + SUM_DOUBLE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 1 + """Represents a double counter where values are summed across bundles. + + Encoding: + value: beam:coder:double:v1 + """ + DISTRIBUTION_INT64_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 2 + """Represents a distribution of an integer value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + + Encoding: + - count: beam:coder:varint:v1 + - sum: beam:coder:varint:v1 + - min: beam:coder:varint:v1 + - max: beam:coder:varint:v1 + + Note that when count is zero, the SDK may not send sum, min, and max in + the response. If those fields are included in the payload, runners should + omit them. + """ + DISTRIBUTION_DOUBLE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 3 + """Represents a distribution of a double value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + + Encoding: + - count: beam:coder:varint:v1 + - sum: beam:coder:double:v1 + - min: beam:coder:double:v1 + - max: beam:coder:double:v1 + + Note that when count is zero, the SDK may not send sum, min, and max in + the response. If those fields are included in the payload, runners should + omit them. + """ + LATEST_INT64_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 4 + """Represents the latest seen integer value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + + Encoding: + - timestamp: beam:coder:varint:v1 (milliseconds since epoch) + - value: beam:coder:varint:v1 + """ + LATEST_DOUBLE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 5 + """Represents the latest seen double value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + + Encoding: + - timestamp: beam:coder:varint:v1 (milliseconds since epoch) + - value: beam:coder:double:v1 + """ + TOP_N_INT64_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 6 + """Represents the largest set of integer values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:varint:v1 + """ + TOP_N_DOUBLE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 7 + """Represents the largest set of double values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:varint:v1 + """ + BOTTOM_N_DOUBLE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 9 + """Represents the smallest set of double values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:double:v1 + """ + PROGRESS_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 10 + """Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:double:v1 + """ + SET_STRING_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 11 + """Represents a set of strings. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:stringutf8:v1 + """ + BOUNDED_TRIE_TYPE: MonitoringInfoTypeUrns._Enum.ValueType # 12 + """Represents a bounded trie of strings. + + Encoding: BoundedTrie proto + """ + HISTOGRAM: MonitoringInfoTypeUrns._Enum.ValueType # 13 + """Represents a histogram.""" + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + SUM_INT64_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 0 + """Represents an integer counter where values are summed across bundles. + + Encoding: + - value: beam:coder:varint:v1 + """ + SUM_DOUBLE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 1 + """Represents a double counter where values are summed across bundles. + + Encoding: + value: beam:coder:double:v1 + """ + DISTRIBUTION_INT64_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 2 + """Represents a distribution of an integer value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + + Encoding: + - count: beam:coder:varint:v1 + - sum: beam:coder:varint:v1 + - min: beam:coder:varint:v1 + - max: beam:coder:varint:v1 + + Note that when count is zero, the SDK may not send sum, min, and max in + the response. If those fields are included in the payload, runners should + omit them. + """ + DISTRIBUTION_DOUBLE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 3 + """Represents a distribution of a double value where: + - count: represents the number of values seen across all bundles + - sum: represents the total of the value across all bundles + - min: represents the smallest value seen across all bundles + - max: represents the largest value seen across all bundles + + Encoding: + - count: beam:coder:varint:v1 + - sum: beam:coder:double:v1 + - min: beam:coder:double:v1 + - max: beam:coder:double:v1 + + Note that when count is zero, the SDK may not send sum, min, and max in + the response. If those fields are included in the payload, runners should + omit them. + """ + LATEST_INT64_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 4 + """Represents the latest seen integer value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + + Encoding: + - timestamp: beam:coder:varint:v1 (milliseconds since epoch) + - value: beam:coder:varint:v1 + """ + LATEST_DOUBLE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 5 + """Represents the latest seen double value. The timestamp is used to + provide an "ordering" over multiple values to determine which is the + latest. + + Encoding: + - timestamp: beam:coder:varint:v1 (milliseconds since epoch) + - value: beam:coder:double:v1 + """ + TOP_N_INT64_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 6 + """Represents the largest set of integer values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:varint:v1 + """ + TOP_N_DOUBLE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 7 + """Represents the largest set of double values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:varint:v1 + """ + BOTTOM_N_DOUBLE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 9 + """Represents the smallest set of double values seen across bundles. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:double:v1 + """ + PROGRESS_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 10 + """Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:double:v1 + """ + SET_STRING_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 11 + """Represents a set of strings. + + Encoding: ... + - iter: beam:coder:iterable:v1 + - valueX: beam:coder:stringutf8:v1 + """ + BOUNDED_TRIE_TYPE: MonitoringInfoTypeUrns.Enum.ValueType # 12 + """Represents a bounded trie of strings. + + Encoding: BoundedTrie proto + """ + HISTOGRAM: MonitoringInfoTypeUrns.Enum.ValueType # 13 + """Represents a histogram.""" + + def __init__( + self, + ) -> None: ... + +Global___MonitoringInfoTypeUrns: _TypeAlias = MonitoringInfoTypeUrns # noqa: Y015 + +@_typing.final +class BoundedTrieNode(_message.Message): + """A single node in a BoundedTrie.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class ChildrenEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + @_builtins.property + def value(self) -> Global___BoundedTrieNode: ... + def __init__( + self, + *, + key: _builtins.str | None = ..., + value: Global___BoundedTrieNode | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + TRUNCATED_FIELD_NUMBER: _builtins.int + CHILDREN_FIELD_NUMBER: _builtins.int + truncated: _builtins.bool + """Whether this node has been truncated. + A truncated leaf represents possibly many children with the same prefix. + """ + @_builtins.property + def children(self) -> _containers.MessageMap[_builtins.str, Global___BoundedTrieNode]: + """Children of this node. Must be empty if truncated is true.""" + + def __init__( + self, + *, + truncated: _builtins.bool | None = ..., + children: _abc.Mapping[_builtins.str, Global___BoundedTrieNode] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["children", b"children", "truncated", b"truncated"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___BoundedTrieNode: _TypeAlias = BoundedTrieNode # noqa: Y015 + +@_typing.final +class BoundedTrie(_message.Message): + """The message type used for encoding metrics of type bounded trie.""" + + DESCRIPTOR: _descriptor.Descriptor + + BOUND_FIELD_NUMBER: _builtins.int + ROOT_FIELD_NUMBER: _builtins.int + SINGLETON_FIELD_NUMBER: _builtins.int + bound: _builtins.int + """The maximum number of elements to store before truncation.""" + @_builtins.property + def root(self) -> Global___BoundedTrieNode: + """A compact representation of all the elements in this trie.""" + + @_builtins.property + def singleton(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: + """A more efficient representation for metrics consisting of a single value.""" + + def __init__( + self, + *, + bound: _builtins.int | None = ..., + root: Global___BoundedTrieNode | None = ..., + singleton: _abc.Iterable[_builtins.str] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["root", b"root"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bound", b"bound", "root", b"root", "singleton", b"singleton"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___BoundedTrie: _TypeAlias = BoundedTrie # noqa: Y015 + +@_typing.final +class HistogramValue(_message.Message): + """The message type used for encoding Histogram Data""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class BucketOptions(_message.Message): + """`BucketOptions` describes the bucket boundaries used in the histogram.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class Linear(_message.Message): + """Linear buckets with the following boundaries for indices in 0 to n-1. + - i in [0, n-1]: [start + (i)*width, start + (i+1)*width) + """ + + DESCRIPTOR: _descriptor.Descriptor + + NUMBER_OF_BUCKETS_FIELD_NUMBER: _builtins.int + WIDTH_FIELD_NUMBER: _builtins.int + START_FIELD_NUMBER: _builtins.int + number_of_buckets: _builtins.int + """Must be greater than 0. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: `bucket_count` would cause confusion with + `bucket_counts` field --) + """ + width: _builtins.float + """Distance between bucket boundaries. Must be greater than 0.""" + start: _builtins.float + """Lower bound of the first bucket.""" + def __init__( + self, + *, + number_of_buckets: _builtins.int | None = ..., + width: _builtins.float | None = ..., + start: _builtins.float | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets", "_start", b"_start", "_width", b"_width", "number_of_buckets", b"number_of_buckets", "start", b"start", "width", b"width"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets", "_start", b"_start", "_width", b"_width", "number_of_buckets", b"number_of_buckets", "start", b"start", "width", b"width"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__number_of_buckets: _TypeAlias = _typing.Literal["number_of_buckets"] # noqa: Y015 + _WhichOneofArgType__number_of_buckets: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets"] # noqa: Y015 + _WhichOneofReturnType__start: _TypeAlias = _typing.Literal["start"] # noqa: Y015 + _WhichOneofArgType__start: _TypeAlias = _typing.Literal["_start", b"_start"] # noqa: Y015 + _WhichOneofReturnType__width: _TypeAlias = _typing.Literal["width"] # noqa: Y015 + _WhichOneofArgType__width: _TypeAlias = _typing.Literal["_width", b"_width"] # noqa: Y015 + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__number_of_buckets) -> _WhichOneofReturnType__number_of_buckets | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__start) -> _WhichOneofReturnType__start | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__width) -> _WhichOneofReturnType__width | None: ... + + @_typing.final + class Base2Exponent(_message.Message): + """Exponential buckets where the growth factor between buckets is + `2**(2**-scale)`. e.g. for `scale=1` growth factor is + `2**(2**(-1))=sqrt(2)`. `n` buckets will have the following boundaries. + - 0th: [0, gf) + - i in [1, n-1]: [gf^(i), gf^(i+1)) + """ + + DESCRIPTOR: _descriptor.Descriptor + + NUMBER_OF_BUCKETS_FIELD_NUMBER: _builtins.int + SCALE_FIELD_NUMBER: _builtins.int + number_of_buckets: _builtins.int + """Must be greater than 0. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: `bucket_count` would cause confusion with + `bucket_counts` field --) + """ + scale: _builtins.int + """Must be between -3 and 3. This forces the growth factor of the bucket + boundaries to be between `2^(1/8)` and `256`. + """ + def __init__( + self, + *, + number_of_buckets: _builtins.int | None = ..., + scale: _builtins.int | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets", "_scale", b"_scale", "number_of_buckets", b"number_of_buckets", "scale", b"scale"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets", "_scale", b"_scale", "number_of_buckets", b"number_of_buckets", "scale", b"scale"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__number_of_buckets: _TypeAlias = _typing.Literal["number_of_buckets"] # noqa: Y015 + _WhichOneofArgType__number_of_buckets: _TypeAlias = _typing.Literal["_number_of_buckets", b"_number_of_buckets"] # noqa: Y015 + _WhichOneofReturnType__scale: _TypeAlias = _typing.Literal["scale"] # noqa: Y015 + _WhichOneofArgType__scale: _TypeAlias = _typing.Literal["_scale", b"_scale"] # noqa: Y015 + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__number_of_buckets) -> _WhichOneofReturnType__number_of_buckets | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__scale) -> _WhichOneofReturnType__scale | None: ... + + LINEAR_FIELD_NUMBER: _builtins.int + EXPONENTIAL_FIELD_NUMBER: _builtins.int + @_builtins.property + def linear(self) -> Global___HistogramValue.BucketOptions.Linear: + """Bucket boundaries grow linearly.""" + + @_builtins.property + def exponential(self) -> Global___HistogramValue.BucketOptions.Base2Exponent: + """Bucket boundaries grow exponentially.""" + + def __init__( + self, + *, + linear: Global___HistogramValue.BucketOptions.Linear | None = ..., + exponential: Global___HistogramValue.BucketOptions.Base2Exponent | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["bucket_type", b"bucket_type", "exponential", b"exponential", "linear", b"linear"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["bucket_type", b"bucket_type", "exponential", b"exponential", "linear", b"linear"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_bucket_type: _TypeAlias = _typing.Literal["linear", "exponential"] # noqa: Y015 + _WhichOneofArgType_bucket_type: _TypeAlias = _typing.Literal["bucket_type", b"bucket_type"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_bucket_type) -> _WhichOneofReturnType_bucket_type | None: ... + + COUNT_FIELD_NUMBER: _builtins.int + BUCKET_OPTIONS_FIELD_NUMBER: _builtins.int + BUCKET_COUNTS_FIELD_NUMBER: _builtins.int + count: _builtins.int + """Number of values recorded in this histogram.""" + @_builtins.property + def bucket_options(self) -> Global___HistogramValue.BucketOptions: + """Describes the bucket boundaries used in the histogram.""" + + @_builtins.property + def bucket_counts(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]: + """The number of values in each bucket of the histogram, as described in + `bucket_options`. `bucket_counts` should contain N values, where N is the + number of buckets specified in `bucket_options`. If `bucket_counts` has + fewer than N values, the remaining values are assumed to be 0. + """ + + def __init__( + self, + *, + count: _builtins.int | None = ..., + bucket_options: Global___HistogramValue.BucketOptions | None = ..., + bucket_counts: _abc.Iterable[_builtins.int] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["_bucket_options", b"_bucket_options", "_count", b"_count", "bucket_options", b"bucket_options", "count", b"count"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["_bucket_options", b"_bucket_options", "_count", b"_count", "bucket_counts", b"bucket_counts", "bucket_options", b"bucket_options", "count", b"count"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType__bucket_options: _TypeAlias = _typing.Literal["bucket_options"] # noqa: Y015 + _WhichOneofArgType__bucket_options: _TypeAlias = _typing.Literal["_bucket_options", b"_bucket_options"] # noqa: Y015 + _WhichOneofReturnType__count: _TypeAlias = _typing.Literal["count"] # noqa: Y015 + _WhichOneofArgType__count: _TypeAlias = _typing.Literal["_count", b"_count"] # noqa: Y015 + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__bucket_options) -> _WhichOneofReturnType__bucket_options | None: ... + @_typing.overload + def WhichOneof(self, oneof_group: _WhichOneofArgType__count) -> _WhichOneofReturnType__count | None: ... + +Global___HistogramValue: _TypeAlias = HistogramValue # noqa: Y015 + +LABEL_PROPS_FIELD_NUMBER: _builtins.int +MONITORING_INFO_SPEC_FIELD_NUMBER: _builtins.int +label_props: _extension_dict._ExtensionFieldDescriptor[_descriptor_pb2.EnumValueOptions, Global___MonitoringInfoLabelProps] +"""From: commit 0x7970544.""" +monitoring_info_spec: _extension_dict._ExtensionFieldDescriptor[_descriptor_pb2.EnumValueOptions, Global___MonitoringInfoSpec] +"""Enum extension to store the MonitoringInfoSpecs.""" diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_grpc.py new file mode 100644 index 000000000000..08977cb03aeb --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/metrics_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_urns.py new file mode 100644 index 000000000000..94efd5bd885a --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/metrics_pb2_urns.py @@ -0,0 +1,86 @@ +from ........utils import PropertiesFromEnumValue +from . import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class MonitoringInfo(object): + + class MonitoringInfoLabels(object): + TRANSFORM = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='PTRANSFORM')) + PCOLLECTION = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='PCOLLECTION')) + WINDOWING_STRATEGY = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='WINDOWING_STRATEGY')) + CODER = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='CODER')) + ENVIRONMENT = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='ENVIRONMENT')) + NAMESPACE = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='NAMESPACE')) + NAME = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='NAME')) + SERVICE = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SERVICE')) + METHOD = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='METHOD')) + RESOURCE = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='RESOURCE')) + STATUS = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='STATUS')) + BIGQUERY_PROJECT_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGQUERY_PROJECT_ID')) + BIGQUERY_DATASET = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGQUERY_DATASET')) + BIGQUERY_TABLE = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGQUERY_TABLE')) + BIGQUERY_VIEW = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGQUERY_VIEW')) + BIGQUERY_QUERY_NAME = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGQUERY_QUERY_NAME')) + GCS_BUCKET = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='GCS_BUCKET')) + GCS_PROJECT_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='GCS_PROJECT_ID')) + DATASTORE_PROJECT = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='DATASTORE_PROJECT')) + DATASTORE_NAMESPACE = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='DATASTORE_NAMESPACE')) + BIGTABLE_PROJECT_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='BIGTABLE_PROJECT_ID')) + INSTANCE_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='INSTANCE_ID')) + TABLE_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='TABLE_ID')) + SPANNER_PROJECT_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SPANNER_PROJECT_ID')) + SPANNER_DATABASE_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SPANNER_DATABASE_ID')) + SPANNER_TABLE_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SPANNER_TABLE_ID')) + SPANNER_INSTANCE_ID = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SPANNER_INSTANCE_ID')) + SPANNER_QUERY_NAME = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='SPANNER_QUERY_NAME')) + PER_WORKER_METRIC = PropertiesFromEnumValue('', '', EMPTY_MONITORING_INFO_SPEC, metrics_pb2.MonitoringInfoLabelProps(name='PER_WORKER_METRIC')) + + +class MonitoringInfoSpecs(object): + + class Enum(object): + USER_SUM_INT64 = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:sum_int64:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_SUM_DOUBLE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:sum_double:v1', type='beam:metrics:sum_double:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_DISTRIBUTION_INT64 = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:distribution_int64:v1', type='beam:metrics:distribution_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_DISTRIBUTION_DOUBLE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:distribution_double:v1', type='beam:metrics:distribution_double:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_LATEST_INT64 = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:latest_int64:v1', type='beam:metrics:latest_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_LATEST_DOUBLE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:latest_double:v1', type='beam:metrics:latest_double:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_TOP_N_INT64 = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:top_n_int64:v1', type='beam:metrics:top_n_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_TOP_N_DOUBLE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:top_n_double:v1', type='beam:metrics:top_n_double:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_BOTTOM_N_INT64 = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:bottom_n_int64:v1', type='beam:metrics:bottom_n_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_BOTTOM_N_DOUBLE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:bottom_n_double:v1', type='beam:metrics:bottom_n_double:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_SET_STRING = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:set_string:v1', type='beam:metrics:set_string:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_BOUNDED_TRIE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:bounded_trie:v1', type='beam:metrics:bounded_trie:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report user metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + ELEMENT_COUNT = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:element_count:v1', type='beam:metrics:sum_int64:v1', required_labels=['PCOLLECTION'], annotations=[metrics_pb2.Annotation(key='description', value='The total elements output to a Pcollection by a PTransform.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + SAMPLED_BYTE_SIZE = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:sampled_byte_size:v1', type='beam:metrics:distribution_int64:v1', required_labels=['PCOLLECTION'], annotations=[metrics_pb2.Annotation(key='description', value='The total byte size and count of a sampled set (or all) of elements in the pcollection. Sampling is used because calculating the byte count involves serializing the elements which is CPU intensive.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + START_BUNDLE_MSECS = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:pardo_execution_time:start_bundle_msecs:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The total estimated execution time of the start bundlefunction in a pardo')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + PROCESS_BUNDLE_MSECS = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:pardo_execution_time:process_bundle_msecs:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The total estimated execution time of the process bundlefunction in a pardo')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + FINISH_BUNDLE_MSECS = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:pardo_execution_time:finish_bundle_msecs:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The total estimated execution time of the finish bundle function in a pardo')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + TOTAL_MSECS = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:ptransform_execution_time:total_msecs:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The total estimated execution time of the ptransform')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + WORK_REMAINING = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:ptransform_progress:remaining:v1', type='beam:metrics:progress:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + WORK_COMPLETED = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:ptransform_progress:completed:v1', type='beam:metrics:progress:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The remaining amount of work for each active element. Each active element represents an independent amount of work not shared with any other active element.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + DATA_CHANNEL_READ_INDEX = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:data_channel:read_index:v1', type='beam:metrics:sum_int64:v1', required_labels=['PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='The read index of the data channel.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + API_REQUEST_COUNT = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:io:api_request_count:v1', type='beam:metrics:sum_int64:v1', required_labels=['SERVICE', 'METHOD', 'RESOURCE', 'PTRANSFORM', 'STATUS'], annotations=[metrics_pb2.Annotation(key='description', value='Request counts with status made to IO service APIs to batch read or write elements.'), metrics_pb2.Annotation(key='process_metric', value='true')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + API_REQUEST_LATENCIES = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:io:api_request_latencies:v1', type='beam:metrics:histogram_int64:v1', required_labels=['SERVICE', 'METHOD', 'RESOURCE', 'PTRANSFORM'], annotations=[metrics_pb2.Annotation(key='description', value='Histogram counts for request latencies made to IO service APIs to batch read or write elements.'), metrics_pb2.Annotation(key='units', value='Milliseconds'), metrics_pb2.Annotation(key='process_metric', value='true')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + USER_HISTOGRAM = PropertiesFromEnumValue('', '', metrics_pb2.MonitoringInfoSpec(urn='beam:metric:user:histogram_int64:v1', type='beam:metrics:histogram_int64:v1', required_labels=['PTRANSFORM', 'NAMESPACE', 'NAME'], annotations=[metrics_pb2.Annotation(key='description', value='URN utilized to report histogram metric.')]), EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class MonitoringInfoTypeUrns(object): + + class Enum(object): + SUM_INT64_TYPE = PropertiesFromEnumValue('beam:metrics:sum_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SUM_DOUBLE_TYPE = PropertiesFromEnumValue('beam:metrics:sum_double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DISTRIBUTION_INT64_TYPE = PropertiesFromEnumValue('beam:metrics:distribution_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DISTRIBUTION_DOUBLE_TYPE = PropertiesFromEnumValue('beam:metrics:distribution_double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + LATEST_INT64_TYPE = PropertiesFromEnumValue('beam:metrics:latest_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + LATEST_DOUBLE_TYPE = PropertiesFromEnumValue('beam:metrics:latest_double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TOP_N_INT64_TYPE = PropertiesFromEnumValue('beam:metrics:top_n_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + TOP_N_DOUBLE_TYPE = PropertiesFromEnumValue('beam:metrics:top_n_double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BOTTOM_N_INT64_TYPE = PropertiesFromEnumValue('beam:metrics:bottom_n_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BOTTOM_N_DOUBLE_TYPE = PropertiesFromEnumValue('beam:metrics:bottom_n_double:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + PROGRESS_TYPE = PropertiesFromEnumValue('beam:metrics:progress:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + SET_STRING_TYPE = PropertiesFromEnumValue('beam:metrics:set_string:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + BOUNDED_TRIE_TYPE = PropertiesFromEnumValue('beam:metrics:bounded_trie:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + HISTOGRAM = PropertiesFromEnumValue('beam:metrics:histogram_int64:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.py new file mode 100644 index 000000000000..31e97bc3bdcc --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/schema.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/schema.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.org/apache/beam/model/pipeline/v1/schema.proto\x12!org.apache.beam.model.pipeline.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\"\xaa\x01\n\x06Schema\x12\x38\n\x06\x66ields\x18\x01 \x03(\x0b\x32(.org.apache.beam.model.pipeline.v1.Field\x12\n\n\x02id\x18\x02 \x01(\t\x12:\n\x07options\x18\x03 \x03(\x0b\x32).org.apache.beam.model.pipeline.v1.Option\x12\x1e\n\x16\x65ncoding_positions_set\x18\x04 \x01(\x08\"\xc9\x01\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12:\n\x04type\x18\x03 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\x12\n\n\x02id\x18\x04 \x01(\x05\x12\x19\n\x11\x65ncoding_position\x18\x05 \x01(\x05\x12:\n\x07options\x18\x06 \x03(\x0b\x32).org.apache.beam.model.pipeline.v1.Option\"\xc6\x03\n\tFieldType\x12\x10\n\x08nullable\x18\x01 \x01(\x08\x12\x44\n\x0b\x61tomic_type\x18\x02 \x01(\x0e\x32-.org.apache.beam.model.pipeline.v1.AtomicTypeH\x00\x12\x42\n\narray_type\x18\x03 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.ArrayTypeH\x00\x12H\n\riterable_type\x18\x04 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.IterableTypeH\x00\x12>\n\x08map_type\x18\x05 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.MapTypeH\x00\x12>\n\x08row_type\x18\x06 \x01(\x0b\x32*.org.apache.beam.model.pipeline.v1.RowTypeH\x00\x12\x46\n\x0clogical_type\x18\x07 \x01(\x0b\x32..org.apache.beam.model.pipeline.v1.LogicalTypeH\x00\x42\x0b\n\ttype_info\"O\n\tArrayType\x12\x42\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\"R\n\x0cIterableType\x12\x42\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\"\x8b\x01\n\x07MapType\x12>\n\x08key_type\x18\x01 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\x12@\n\nvalue_type\x18\x02 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\"D\n\x07RowType\x12\x39\n\x06schema\x18\x01 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\"\xf7\x01\n\x0bLogicalType\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x44\n\x0erepresentation\x18\x03 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\x12\x43\n\rargument_type\x18\x04 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\x12?\n\x08\x61rgument\x18\x05 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"\xdf\x03\n\x0cLogicalTypes\"\xce\x03\n\x04\x45num\x12?\n\x0fPYTHON_CALLABLE\x10\x00\x1a*\xa2\xb4\xfa\xc2\x05$beam:logical_type:python_callable:v1\x12=\n\x0eMICROS_INSTANT\x10\x01\x1a)\xa2\xb4\xfa\xc2\x05#beam:logical_type:micros_instant:v1\x12=\n\x0eMILLIS_INSTANT\x10\x02\x1a)\xa2\xb4\xfa\xc2\x05#beam:logical_type:millis_instant:v1\x12/\n\x07\x44\x45\x43IMAL\x10\x03\x1a\"\xa2\xb4\xfa\xc2\x05\x1c\x62\x65\x61m:logical_type:decimal:v1\x12\x37\n\x0b\x46IXED_BYTES\x10\x04\x1a&\xa2\xb4\xfa\xc2\x05 beam:logical_type:fixed_bytes:v1\x12\x33\n\tVAR_BYTES\x10\x05\x1a$\xa2\xb4\xfa\xc2\x05\x1e\x62\x65\x61m:logical_type:var_bytes:v1\x12\x35\n\nFIXED_CHAR\x10\x06\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:logical_type:fixed_char:v1\x12\x31\n\x08VAR_CHAR\x10\x07\x1a#\xa2\xb4\xfa\xc2\x05\x1d\x62\x65\x61m:logical_type:var_char:v1\"\x90\x01\n\x06Option\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x04type\x18\x02 \x01(\x0b\x32,.org.apache.beam.model.pipeline.v1.FieldType\x12<\n\x05value\x18\x03 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"D\n\x03Row\x12=\n\x06values\x18\x01 \x03(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"\xd7\x03\n\nFieldValue\x12J\n\x0c\x61tomic_value\x18\x01 \x01(\x0b\x32\x32.org.apache.beam.model.pipeline.v1.AtomicTypeValueH\x00\x12H\n\x0b\x61rray_value\x18\x02 \x01(\x0b\x32\x31.org.apache.beam.model.pipeline.v1.ArrayTypeValueH\x00\x12N\n\x0eiterable_value\x18\x03 \x01(\x0b\x32\x34.org.apache.beam.model.pipeline.v1.IterableTypeValueH\x00\x12\x44\n\tmap_value\x18\x04 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.MapTypeValueH\x00\x12;\n\trow_value\x18\x05 \x01(\x0b\x32&.org.apache.beam.model.pipeline.v1.RowH\x00\x12Q\n\x12logical_type_value\x18\x06 \x01(\x0b\x32\x33.org.apache.beam.model.pipeline.v1.LogicalTypeValueH\x00\x42\r\n\x0b\x66ield_value\"\xb6\x01\n\x0f\x41tomicTypeValue\x12\x0e\n\x04\x62yte\x18\x01 \x01(\x05H\x00\x12\x0f\n\x05int16\x18\x02 \x01(\x05H\x00\x12\x0f\n\x05int32\x18\x03 \x01(\x05H\x00\x12\x0f\n\x05int64\x18\x04 \x01(\x03H\x00\x12\x0f\n\x05\x66loat\x18\x05 \x01(\x02H\x00\x12\x10\n\x06\x64ouble\x18\x06 \x01(\x01H\x00\x12\x10\n\x06string\x18\x07 \x01(\tH\x00\x12\x11\n\x07\x62oolean\x18\x08 \x01(\x08H\x00\x12\x0f\n\x05\x62ytes\x18\t \x01(\x0cH\x00\x42\x07\n\x05value\"P\n\x0e\x41rrayTypeValue\x12>\n\x07\x65lement\x18\x01 \x03(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"S\n\x11IterableTypeValue\x12>\n\x07\x65lement\x18\x01 \x03(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"P\n\x0cMapTypeValue\x12@\n\x07\x65ntries\x18\x01 \x03(\x0b\x32/.org.apache.beam.model.pipeline.v1.MapTypeEntry\"\x88\x01\n\x0cMapTypeEntry\x12:\n\x03key\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"P\n\x10LogicalTypeValue\x12<\n\x05value\x18\x01 \x01(\x0b\x32-.org.apache.beam.model.pipeline.v1.FieldValue\"\xf9\x02\n\x12SchemaCoderPayload\x12\x39\n\x06schema\x18\x01 \x01(\x0b\x32).org.apache.beam.model.pipeline.v1.Schema\x12\x42\n\tto_row_fn\x18\x02 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12\x44\n\x0b\x66rom_row_fn\x18\x03 \x01(\x0b\x32/.org.apache.beam.model.pipeline.v1.FunctionSpec\x12i\n\x16\x61\x64\x64itional_coder_infos\x18\x04 \x03(\x0b\x32I.org.apache.beam.model.pipeline.v1.SchemaCoderPayload.AdditionalCoderInfo\x1a\x33\n\x13\x41\x64\x64itionalCoderInfo\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\x0c*\x83\x01\n\nAtomicType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04\x42YTE\x10\x01\x12\t\n\x05INT16\x10\x02\x12\t\n\x05INT32\x10\x03\x12\t\n\x05INT64\x10\x04\x12\t\n\x05\x46LOAT\x10\x05\x12\n\n\x06\x44OUBLE\x10\x06\x12\n\n\x06STRING\x10\x07\x12\x0b\n\x07\x42OOLEAN\x10\x08\x12\t\n\x05\x42YTES\x10\tBx\n!org.apache.beam.model.pipeline.v1B\tSchemaApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.schema_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\tSchemaApiZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["PYTHON_CALLABLE"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["PYTHON_CALLABLE"]._serialized_options = b'\242\264\372\302\005$beam:logical_type:python_callable:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["MICROS_INSTANT"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["MICROS_INSTANT"]._serialized_options = b'\242\264\372\302\005#beam:logical_type:micros_instant:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["MILLIS_INSTANT"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["MILLIS_INSTANT"]._serialized_options = b'\242\264\372\302\005#beam:logical_type:millis_instant:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["DECIMAL"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["DECIMAL"]._serialized_options = b'\242\264\372\302\005\034beam:logical_type:decimal:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["FIXED_BYTES"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["FIXED_BYTES"]._serialized_options = b'\242\264\372\302\005 beam:logical_type:fixed_bytes:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["VAR_BYTES"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["VAR_BYTES"]._serialized_options = b'\242\264\372\302\005\036beam:logical_type:var_bytes:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["FIXED_CHAR"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["FIXED_CHAR"]._serialized_options = b'\242\264\372\302\005\037beam:logical_type:fixed_char:v1' + _globals['_LOGICALTYPES_ENUM'].values_by_name["VAR_CHAR"]._loaded_options = None + _globals['_LOGICALTYPES_ENUM'].values_by_name["VAR_CHAR"]._serialized_options = b'\242\264\372\302\005\035beam:logical_type:var_char:v1' + _globals['_ATOMICTYPE']._serialized_start=3812 + _globals['_ATOMICTYPE']._serialized_end=3943 + _globals['_SCHEMA']._serialized_start=143 + _globals['_SCHEMA']._serialized_end=313 + _globals['_FIELD']._serialized_start=316 + _globals['_FIELD']._serialized_end=517 + _globals['_FIELDTYPE']._serialized_start=520 + _globals['_FIELDTYPE']._serialized_end=974 + _globals['_ARRAYTYPE']._serialized_start=976 + _globals['_ARRAYTYPE']._serialized_end=1055 + _globals['_ITERABLETYPE']._serialized_start=1057 + _globals['_ITERABLETYPE']._serialized_end=1139 + _globals['_MAPTYPE']._serialized_start=1142 + _globals['_MAPTYPE']._serialized_end=1281 + _globals['_ROWTYPE']._serialized_start=1283 + _globals['_ROWTYPE']._serialized_end=1351 + _globals['_LOGICALTYPE']._serialized_start=1354 + _globals['_LOGICALTYPE']._serialized_end=1601 + _globals['_LOGICALTYPES']._serialized_start=1604 + _globals['_LOGICALTYPES']._serialized_end=2083 + _globals['_LOGICALTYPES_ENUM']._serialized_start=1621 + _globals['_LOGICALTYPES_ENUM']._serialized_end=2083 + _globals['_OPTION']._serialized_start=2086 + _globals['_OPTION']._serialized_end=2230 + _globals['_ROW']._serialized_start=2232 + _globals['_ROW']._serialized_end=2300 + _globals['_FIELDVALUE']._serialized_start=2303 + _globals['_FIELDVALUE']._serialized_end=2774 + _globals['_ATOMICTYPEVALUE']._serialized_start=2777 + _globals['_ATOMICTYPEVALUE']._serialized_end=2959 + _globals['_ARRAYTYPEVALUE']._serialized_start=2961 + _globals['_ARRAYTYPEVALUE']._serialized_end=3041 + _globals['_ITERABLETYPEVALUE']._serialized_start=3043 + _globals['_ITERABLETYPEVALUE']._serialized_end=3126 + _globals['_MAPTYPEVALUE']._serialized_start=3128 + _globals['_MAPTYPEVALUE']._serialized_end=3208 + _globals['_MAPTYPEENTRY']._serialized_start=3211 + _globals['_MAPTYPEENTRY']._serialized_end=3347 + _globals['_LOGICALTYPEVALUE']._serialized_start=3349 + _globals['_LOGICALTYPEVALUE']._serialized_end=3429 + _globals['_SCHEMACODERPAYLOAD']._serialized_start=3432 + _globals['_SCHEMACODERPAYLOAD']._serialized_end=3809 + _globals['_SCHEMACODERPAYLOAD_ADDITIONALCODERINFO']._serialized_start=3758 + _globals['_SCHEMACODERPAYLOAD_ADDITIONALCODERINFO']._serialized_end=3809 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.pyi new file mode 100644 index 000000000000..2e2c79016dcc --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2.pyi @@ -0,0 +1,704 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Protocol Buffers describing Beam Schemas, a portable representation for +complex types. + +The primary application of Schema is as the payload for the standard coder +"beam:coder:row:v1", defined in beam_runner_api.proto +""" + +from collections import abc as _abc +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from . import beam_runner_api_pb2 as _beam_runner_api_pb2 +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +class _AtomicType: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + +class _AtomicTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_AtomicType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + UNSPECIFIED: _AtomicType.ValueType # 0 + BYTE: _AtomicType.ValueType # 1 + INT16: _AtomicType.ValueType # 2 + INT32: _AtomicType.ValueType # 3 + INT64: _AtomicType.ValueType # 4 + FLOAT: _AtomicType.ValueType # 5 + DOUBLE: _AtomicType.ValueType # 6 + STRING: _AtomicType.ValueType # 7 + BOOLEAN: _AtomicType.ValueType # 8 + BYTES: _AtomicType.ValueType # 9 + +class AtomicType(_AtomicType, metaclass=_AtomicTypeEnumTypeWrapper): ... + +UNSPECIFIED: AtomicType.ValueType # 0 +BYTE: AtomicType.ValueType # 1 +INT16: AtomicType.ValueType # 2 +INT32: AtomicType.ValueType # 3 +INT64: AtomicType.ValueType # 4 +FLOAT: AtomicType.ValueType # 5 +DOUBLE: AtomicType.ValueType # 6 +STRING: AtomicType.ValueType # 7 +BOOLEAN: AtomicType.ValueType # 8 +BYTES: AtomicType.ValueType # 9 +Global___AtomicType: _TypeAlias = AtomicType # noqa: Y015 + +@_typing.final +class Schema(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + FIELDS_FIELD_NUMBER: _builtins.int + ID_FIELD_NUMBER: _builtins.int + OPTIONS_FIELD_NUMBER: _builtins.int + ENCODING_POSITIONS_SET_FIELD_NUMBER: _builtins.int + id: _builtins.str + """REQUIRED. An RFC 4122 UUID.""" + encoding_positions_set: _builtins.bool + """Indicates that encoding positions have been overridden.""" + @_builtins.property + def fields(self) -> _containers.RepeatedCompositeFieldContainer[Global___Field]: + """List of fields for this schema. Two fields may not share a name.""" + + @_builtins.property + def options(self) -> _containers.RepeatedCompositeFieldContainer[Global___Option]: ... + def __init__( + self, + *, + fields: _abc.Iterable[Global___Field] | None = ..., + id: _builtins.str | None = ..., + options: _abc.Iterable[Global___Option] | None = ..., + encoding_positions_set: _builtins.bool | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["encoding_positions_set", b"encoding_positions_set", "fields", b"fields", "id", b"id", "options", b"options"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Schema: _TypeAlias = Schema # noqa: Y015 + +@_typing.final +class Field(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + DESCRIPTION_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + ID_FIELD_NUMBER: _builtins.int + ENCODING_POSITION_FIELD_NUMBER: _builtins.int + OPTIONS_FIELD_NUMBER: _builtins.int + name: _builtins.str + """REQUIRED. Name of this field within the schema.""" + description: _builtins.str + """OPTIONAL. Human readable description of this field, such as the query that generated it.""" + id: _builtins.int + encoding_position: _builtins.int + """OPTIONAL. The position of this field's data when encoded, e.g. with beam:coder:row:v1. + Either no fields in a given row are have encoding position populated, + or all of them are. Used to support backwards compatibility with schema + changes. + If no fields have encoding position populated the order of encoding is the same as the order in the Schema. + If this Field is part of a Schema where encoding_positions_set is True then encoding_position must be + defined, otherwise this field is ignored. + """ + @_builtins.property + def type(self) -> Global___FieldType: ... + @_builtins.property + def options(self) -> _containers.RepeatedCompositeFieldContainer[Global___Option]: ... + def __init__( + self, + *, + name: _builtins.str | None = ..., + description: _builtins.str | None = ..., + type: Global___FieldType | None = ..., + id: _builtins.int | None = ..., + encoding_position: _builtins.int | None = ..., + options: _abc.Iterable[Global___Option] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["type", b"type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["description", b"description", "encoding_position", b"encoding_position", "id", b"id", "name", b"name", "options", b"options", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Field: _TypeAlias = Field # noqa: Y015 + +@_typing.final +class FieldType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + NULLABLE_FIELD_NUMBER: _builtins.int + ATOMIC_TYPE_FIELD_NUMBER: _builtins.int + ARRAY_TYPE_FIELD_NUMBER: _builtins.int + ITERABLE_TYPE_FIELD_NUMBER: _builtins.int + MAP_TYPE_FIELD_NUMBER: _builtins.int + ROW_TYPE_FIELD_NUMBER: _builtins.int + LOGICAL_TYPE_FIELD_NUMBER: _builtins.int + nullable: _builtins.bool + atomic_type: Global___AtomicType.ValueType + @_builtins.property + def array_type(self) -> Global___ArrayType: ... + @_builtins.property + def iterable_type(self) -> Global___IterableType: ... + @_builtins.property + def map_type(self) -> Global___MapType: ... + @_builtins.property + def row_type(self) -> Global___RowType: ... + @_builtins.property + def logical_type(self) -> Global___LogicalType: ... + def __init__( + self, + *, + nullable: _builtins.bool | None = ..., + atomic_type: Global___AtomicType.ValueType | None = ..., + array_type: Global___ArrayType | None = ..., + iterable_type: Global___IterableType | None = ..., + map_type: Global___MapType | None = ..., + row_type: Global___RowType | None = ..., + logical_type: Global___LogicalType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["array_type", b"array_type", "atomic_type", b"atomic_type", "iterable_type", b"iterable_type", "logical_type", b"logical_type", "map_type", b"map_type", "row_type", b"row_type", "type_info", b"type_info"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["array_type", b"array_type", "atomic_type", b"atomic_type", "iterable_type", b"iterable_type", "logical_type", b"logical_type", "map_type", b"map_type", "nullable", b"nullable", "row_type", b"row_type", "type_info", b"type_info"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_type_info: _TypeAlias = _typing.Literal["atomic_type", "array_type", "iterable_type", "map_type", "row_type", "logical_type"] # noqa: Y015 + _WhichOneofArgType_type_info: _TypeAlias = _typing.Literal["type_info", b"type_info"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_type_info) -> _WhichOneofReturnType_type_info | None: ... + +Global___FieldType: _TypeAlias = FieldType # noqa: Y015 + +@_typing.final +class ArrayType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_TYPE_FIELD_NUMBER: _builtins.int + @_builtins.property + def element_type(self) -> Global___FieldType: ... + def __init__( + self, + *, + element_type: Global___FieldType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["element_type", b"element_type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_type", b"element_type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArrayType: _TypeAlias = ArrayType # noqa: Y015 + +@_typing.final +class IterableType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_TYPE_FIELD_NUMBER: _builtins.int + @_builtins.property + def element_type(self) -> Global___FieldType: ... + def __init__( + self, + *, + element_type: Global___FieldType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["element_type", b"element_type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element_type", b"element_type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___IterableType: _TypeAlias = IterableType # noqa: Y015 + +@_typing.final +class MapType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_TYPE_FIELD_NUMBER: _builtins.int + VALUE_TYPE_FIELD_NUMBER: _builtins.int + @_builtins.property + def key_type(self) -> Global___FieldType: ... + @_builtins.property + def value_type(self) -> Global___FieldType: ... + def __init__( + self, + *, + key_type: Global___FieldType | None = ..., + value_type: Global___FieldType | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["key_type", b"key_type", "value_type", b"value_type"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key_type", b"key_type", "value_type", b"value_type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MapType: _TypeAlias = MapType # noqa: Y015 + +@_typing.final +class RowType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + SCHEMA_FIELD_NUMBER: _builtins.int + @_builtins.property + def schema(self) -> Global___Schema: ... + def __init__( + self, + *, + schema: Global___Schema | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["schema", b"schema"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["schema", b"schema"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___RowType: _TypeAlias = RowType # noqa: Y015 + +@_typing.final +class LogicalType(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + REPRESENTATION_FIELD_NUMBER: _builtins.int + ARGUMENT_TYPE_FIELD_NUMBER: _builtins.int + ARGUMENT_FIELD_NUMBER: _builtins.int + urn: _builtins.str + payload: _builtins.bytes + @_builtins.property + def representation(self) -> Global___FieldType: ... + @_builtins.property + def argument_type(self) -> Global___FieldType: ... + @_builtins.property + def argument(self) -> Global___FieldValue: ... + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + representation: Global___FieldType | None = ..., + argument_type: Global___FieldType | None = ..., + argument: Global___FieldValue | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["argument", b"argument", "argument_type", b"argument_type", "representation", b"representation"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["argument", b"argument", "argument_type", b"argument_type", "payload", b"payload", "representation", b"representation", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___LogicalType: _TypeAlias = LogicalType # noqa: Y015 + +@_typing.final +class LogicalTypes(_message.Message): + """Universally defined Logical types for Row schemas. + These logical types are supposed to be understood by all SDKs. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[LogicalTypes._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PYTHON_CALLABLE: LogicalTypes._Enum.ValueType # 0 + """A URN for Python Callable logical type + - Representation type: STRING + - Language type: In Python SDK, PythonCallableWithSource. + In any other SDKs, a wrapper object for a string which + can be evaluated to a Python Callable object. + """ + MICROS_INSTANT: LogicalTypes._Enum.ValueType # 1 + """A URN for MicrosInstant type + - Representation type: ROW + - A timestamp without a timezone where seconds + micros represents the + amount of time since the epoch. + """ + MILLIS_INSTANT: LogicalTypes._Enum.ValueType # 2 + """A URN for MillisInstant type + - Representation type: INT64 + - A timestamp without a timezone represented by the number of + milliseconds since the epoch. The INT64 value is encoded with + big-endian shifted such that lexicographic ordering of the bytes + corresponds to chronological order. + """ + DECIMAL: LogicalTypes._Enum.ValueType # 3 + """A URN for Decimal type + - Representation type: BYTES + - A decimal number with variable scale. Its BYTES + representation consists of an integer (INT32) scale followed by a + two's complement encoded big integer. + """ + FIXED_BYTES: LogicalTypes._Enum.ValueType # 4 + """A URN for FixedLengthBytes type + - Representation type: BYTES + - Argument type: INT32. + A fixed-length bytes with its length as the argument. + """ + VAR_BYTES: LogicalTypes._Enum.ValueType # 5 + """A URN for VariableLengthBytes type + - Representation type: BYTES + - Argument type: INT32. + A variable-length bytes with its maximum length as the argument. + """ + FIXED_CHAR: LogicalTypes._Enum.ValueType # 6 + """A URN for FixedLengthString type + - Representation type: STRING + - Argument type: INT32. + A fixed-length string with its length as the argument. + """ + VAR_CHAR: LogicalTypes._Enum.ValueType # 7 + """A URN for VariableLengthString type + - Representation type: STRING + - Argument type: INT32. + A variable-length string with its maximum length as the argument. + """ + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + PYTHON_CALLABLE: LogicalTypes.Enum.ValueType # 0 + """A URN for Python Callable logical type + - Representation type: STRING + - Language type: In Python SDK, PythonCallableWithSource. + In any other SDKs, a wrapper object for a string which + can be evaluated to a Python Callable object. + """ + MICROS_INSTANT: LogicalTypes.Enum.ValueType # 1 + """A URN for MicrosInstant type + - Representation type: ROW + - A timestamp without a timezone where seconds + micros represents the + amount of time since the epoch. + """ + MILLIS_INSTANT: LogicalTypes.Enum.ValueType # 2 + """A URN for MillisInstant type + - Representation type: INT64 + - A timestamp without a timezone represented by the number of + milliseconds since the epoch. The INT64 value is encoded with + big-endian shifted such that lexicographic ordering of the bytes + corresponds to chronological order. + """ + DECIMAL: LogicalTypes.Enum.ValueType # 3 + """A URN for Decimal type + - Representation type: BYTES + - A decimal number with variable scale. Its BYTES + representation consists of an integer (INT32) scale followed by a + two's complement encoded big integer. + """ + FIXED_BYTES: LogicalTypes.Enum.ValueType # 4 + """A URN for FixedLengthBytes type + - Representation type: BYTES + - Argument type: INT32. + A fixed-length bytes with its length as the argument. + """ + VAR_BYTES: LogicalTypes.Enum.ValueType # 5 + """A URN for VariableLengthBytes type + - Representation type: BYTES + - Argument type: INT32. + A variable-length bytes with its maximum length as the argument. + """ + FIXED_CHAR: LogicalTypes.Enum.ValueType # 6 + """A URN for FixedLengthString type + - Representation type: STRING + - Argument type: INT32. + A fixed-length string with its length as the argument. + """ + VAR_CHAR: LogicalTypes.Enum.ValueType # 7 + """A URN for VariableLengthString type + - Representation type: STRING + - Argument type: INT32. + A variable-length string with its maximum length as the argument. + """ + + def __init__( + self, + ) -> None: ... + +Global___LogicalTypes: _TypeAlias = LogicalTypes # noqa: Y015 + +@_typing.final +class Option(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + NAME_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + name: _builtins.str + """REQUIRED. Identifier for the option.""" + @_builtins.property + def type(self) -> Global___FieldType: + """REQUIRED. Type specifier for the structure of value. + Conventionally, options that don't require additional configuration should + use a boolean type, with the value set to true. + """ + + @_builtins.property + def value(self) -> Global___FieldValue: ... + def __init__( + self, + *, + name: _builtins.str | None = ..., + type: Global___FieldType | None = ..., + value: Global___FieldValue | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["type", b"type", "value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["name", b"name", "type", b"type", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Option: _TypeAlias = Option # noqa: Y015 + +@_typing.final +class Row(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + VALUES_FIELD_NUMBER: _builtins.int + @_builtins.property + def values(self) -> _containers.RepeatedCompositeFieldContainer[Global___FieldValue]: ... + def __init__( + self, + *, + values: _abc.Iterable[Global___FieldValue] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["values", b"values"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___Row: _TypeAlias = Row # noqa: Y015 + +@_typing.final +class FieldValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ATOMIC_VALUE_FIELD_NUMBER: _builtins.int + ARRAY_VALUE_FIELD_NUMBER: _builtins.int + ITERABLE_VALUE_FIELD_NUMBER: _builtins.int + MAP_VALUE_FIELD_NUMBER: _builtins.int + ROW_VALUE_FIELD_NUMBER: _builtins.int + LOGICAL_TYPE_VALUE_FIELD_NUMBER: _builtins.int + @_builtins.property + def atomic_value(self) -> Global___AtomicTypeValue: ... + @_builtins.property + def array_value(self) -> Global___ArrayTypeValue: ... + @_builtins.property + def iterable_value(self) -> Global___IterableTypeValue: ... + @_builtins.property + def map_value(self) -> Global___MapTypeValue: ... + @_builtins.property + def row_value(self) -> Global___Row: ... + @_builtins.property + def logical_type_value(self) -> Global___LogicalTypeValue: ... + def __init__( + self, + *, + atomic_value: Global___AtomicTypeValue | None = ..., + array_value: Global___ArrayTypeValue | None = ..., + iterable_value: Global___IterableTypeValue | None = ..., + map_value: Global___MapTypeValue | None = ..., + row_value: Global___Row | None = ..., + logical_type_value: Global___LogicalTypeValue | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["array_value", b"array_value", "atomic_value", b"atomic_value", "field_value", b"field_value", "iterable_value", b"iterable_value", "logical_type_value", b"logical_type_value", "map_value", b"map_value", "row_value", b"row_value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["array_value", b"array_value", "atomic_value", b"atomic_value", "field_value", b"field_value", "iterable_value", b"iterable_value", "logical_type_value", b"logical_type_value", "map_value", b"map_value", "row_value", b"row_value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_field_value: _TypeAlias = _typing.Literal["atomic_value", "array_value", "iterable_value", "map_value", "row_value", "logical_type_value"] # noqa: Y015 + _WhichOneofArgType_field_value: _TypeAlias = _typing.Literal["field_value", b"field_value"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_field_value) -> _WhichOneofReturnType_field_value | None: ... + +Global___FieldValue: _TypeAlias = FieldValue # noqa: Y015 + +@_typing.final +class AtomicTypeValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + BYTE_FIELD_NUMBER: _builtins.int + INT16_FIELD_NUMBER: _builtins.int + INT32_FIELD_NUMBER: _builtins.int + INT64_FIELD_NUMBER: _builtins.int + FLOAT_FIELD_NUMBER: _builtins.int + DOUBLE_FIELD_NUMBER: _builtins.int + STRING_FIELD_NUMBER: _builtins.int + BOOLEAN_FIELD_NUMBER: _builtins.int + BYTES_FIELD_NUMBER: _builtins.int + byte: _builtins.int + int16: _builtins.int + int32: _builtins.int + int64: _builtins.int + float: _builtins.float + double: _builtins.float + string: _builtins.str + boolean: _builtins.bool + bytes: _builtins.bytes + def __init__( + self, + *, + byte: _builtins.int | None = ..., + int16: _builtins.int | None = ..., + int32: _builtins.int | None = ..., + int64: _builtins.int | None = ..., + float: _builtins.float | None = ..., + double: _builtins.float | None = ..., + string: _builtins.str | None = ..., + boolean: _builtins.bool | None = ..., + bytes: _builtins.bytes | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["boolean", b"boolean", "byte", b"byte", "bytes", b"bytes", "double", b"double", "float", b"float", "int16", b"int16", "int32", b"int32", "int64", b"int64", "string", b"string", "value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["boolean", b"boolean", "byte", b"byte", "bytes", b"bytes", "double", b"double", "float", b"float", "int16", b"int16", "int32", b"int32", "int64", b"int64", "string", b"string", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_value: _TypeAlias = _typing.Literal["byte", "int16", "int32", "int64", "float", "double", "string", "boolean", "bytes"] # noqa: Y015 + _WhichOneofArgType_value: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_value) -> _WhichOneofReturnType_value | None: ... + +Global___AtomicTypeValue: _TypeAlias = AtomicTypeValue # noqa: Y015 + +@_typing.final +class ArrayTypeValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_FIELD_NUMBER: _builtins.int + @_builtins.property + def element(self) -> _containers.RepeatedCompositeFieldContainer[Global___FieldValue]: ... + def __init__( + self, + *, + element: _abc.Iterable[Global___FieldValue] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element", b"element"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___ArrayTypeValue: _TypeAlias = ArrayTypeValue # noqa: Y015 + +@_typing.final +class IterableTypeValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ELEMENT_FIELD_NUMBER: _builtins.int + @_builtins.property + def element(self) -> _containers.RepeatedCompositeFieldContainer[Global___FieldValue]: ... + def __init__( + self, + *, + element: _abc.Iterable[Global___FieldValue] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["element", b"element"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___IterableTypeValue: _TypeAlias = IterableTypeValue # noqa: Y015 + +@_typing.final +class MapTypeValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + ENTRIES_FIELD_NUMBER: _builtins.int + @_builtins.property + def entries(self) -> _containers.RepeatedCompositeFieldContainer[Global___MapTypeEntry]: ... + def __init__( + self, + *, + entries: _abc.Iterable[Global___MapTypeEntry] | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["entries", b"entries"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MapTypeValue: _TypeAlias = MapTypeValue # noqa: Y015 + +@_typing.final +class MapTypeEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + @_builtins.property + def key(self) -> Global___FieldValue: ... + @_builtins.property + def value(self) -> Global___FieldValue: ... + def __init__( + self, + *, + key: Global___FieldValue | None = ..., + value: Global___FieldValue | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___MapTypeEntry: _TypeAlias = MapTypeEntry # noqa: Y015 + +@_typing.final +class LogicalTypeValue(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + VALUE_FIELD_NUMBER: _builtins.int + @_builtins.property + def value(self) -> Global___FieldValue: ... + def __init__( + self, + *, + value: Global___FieldValue | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___LogicalTypeValue: _TypeAlias = LogicalTypeValue # noqa: Y015 + +@_typing.final +class SchemaCoderPayload(_message.Message): + """Information needed to represent a Coder of type SCHEMA.""" + + DESCRIPTOR: _descriptor.Descriptor + + @_typing.final + class AdditionalCoderInfo(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + URN_FIELD_NUMBER: _builtins.int + PAYLOAD_FIELD_NUMBER: _builtins.int + urn: _builtins.str + payload: _builtins.bytes + def __init__( + self, + *, + urn: _builtins.str | None = ..., + payload: _builtins.bytes | None = ..., + ) -> None: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["payload", b"payload", "urn", b"urn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + + SCHEMA_FIELD_NUMBER: _builtins.int + TO_ROW_FN_FIELD_NUMBER: _builtins.int + FROM_ROW_FN_FIELD_NUMBER: _builtins.int + ADDITIONAL_CODER_INFOS_FIELD_NUMBER: _builtins.int + @_builtins.property + def schema(self) -> Global___Schema: + """The schema to use for encoding corresponding Row types.""" + + @_builtins.property + def to_row_fn(self) -> _beam_runner_api_pb2.FunctionSpec: + """Function mapping from underlying object to Row type.""" + + @_builtins.property + def from_row_fn(self) -> _beam_runner_api_pb2.FunctionSpec: + """Function mapping from Row type to underlying object.""" + + @_builtins.property + def additional_coder_infos(self) -> _containers.RepeatedCompositeFieldContainer[Global___SchemaCoderPayload.AdditionalCoderInfo]: + """Any additional information SDKs need to encode/decode elements.""" + + def __init__( + self, + *, + schema: Global___Schema | None = ..., + to_row_fn: _beam_runner_api_pb2.FunctionSpec | None = ..., + from_row_fn: _beam_runner_api_pb2.FunctionSpec | None = ..., + additional_coder_infos: _abc.Iterable[Global___SchemaCoderPayload.AdditionalCoderInfo] | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["from_row_fn", b"from_row_fn", "schema", b"schema", "to_row_fn", b"to_row_fn"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["additional_coder_infos", b"additional_coder_infos", "from_row_fn", b"from_row_fn", "schema", b"schema", "to_row_fn", b"to_row_fn"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SchemaCoderPayload: _TypeAlias = SchemaCoderPayload # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_grpc.py new file mode 100644 index 000000000000..5ac3e7816639 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/schema_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_urns.py new file mode 100644 index 000000000000..72e2e3c86f68 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/schema_pb2_urns.py @@ -0,0 +1,17 @@ +from ........utils import PropertiesFromEnumValue +from . import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class LogicalTypes(object): + + class Enum(object): + PYTHON_CALLABLE = PropertiesFromEnumValue('beam:logical_type:python_callable:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MICROS_INSTANT = PropertiesFromEnumValue('beam:logical_type:micros_instant:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + MILLIS_INSTANT = PropertiesFromEnumValue('beam:logical_type:millis_instant:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + DECIMAL = PropertiesFromEnumValue('beam:logical_type:decimal:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + FIXED_BYTES = PropertiesFromEnumValue('beam:logical_type:fixed_bytes:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + VAR_BYTES = PropertiesFromEnumValue('beam:logical_type:var_bytes:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + FIXED_CHAR = PropertiesFromEnumValue('beam:logical_type:fixed_char:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + VAR_CHAR = PropertiesFromEnumValue('beam:logical_type:var_char:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.py new file mode 100644 index 000000000000..b360a254b24d --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: org/apache/beam/model/pipeline/v1/standard_window_fns.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'org/apache/beam/model/pipeline/v1/standard_window_fns.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import beam_runner_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_pipeline_dot_v1_dot_beam__runner__api__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;org/apache/beam/model/pipeline/v1/standard_window_fns.proto\x12!org.apache.beam.model.pipeline.v1\x1a\x37org/apache/beam/model/pipeline/v1/beam_runner_api.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"V\n\x14GlobalWindowsPayload\">\n\x04\x45num\x12\x36\n\nPROPERTIES\x10\x00\x1a&\xa2\xb4\xfa\xc2\x05 beam:window_fn:global_windows:v1\"\xa9\x01\n\x13\x46ixedWindowsPayload\x12\'\n\x04size\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x06offset\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"=\n\x04\x45num\x12\x35\n\nPROPERTIES\x10\x00\x1a%\xa2\xb4\xfa\xc2\x05\x1f\x62\x65\x61m:window_fn:fixed_windows:v1\"\xd8\x01\n\x15SlidingWindowsPayload\x12\'\n\x04size\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x06offset\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x06period\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x04\x45num\x12\x37\n\nPROPERTIES\x10\x00\x1a\'\xa2\xb4\xfa\xc2\x05!beam:window_fn:sliding_windows:v1\"\x85\x01\n\x15SessionWindowsPayload\x12+\n\x08gap_size\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x04\x45num\x12\x37\n\nPROPERTIES\x10\x00\x1a\'\xa2\xb4\xfa\xc2\x05!beam:window_fn:session_windows:v1B\x80\x01\n!org.apache.beam.model.pipeline.v1B\x11StandardWindowFnsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'org.apache.beam.model.pipeline.v1.standard_window_fns_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!org.apache.beam.model.pipeline.v1B\021StandardWindowFnsZHgithub.com/apache/beam/sdks/v2/go/pkg/beam/model/pipeline_v1;pipeline_v1' + _globals['_GLOBALWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._loaded_options = None + _globals['_GLOBALWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._serialized_options = b'\242\264\372\302\005 beam:window_fn:global_windows:v1' + _globals['_FIXEDWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._loaded_options = None + _globals['_FIXEDWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._serialized_options = b'\242\264\372\302\005\037beam:window_fn:fixed_windows:v1' + _globals['_SLIDINGWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._loaded_options = None + _globals['_SLIDINGWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._serialized_options = b'\242\264\372\302\005!beam:window_fn:sliding_windows:v1' + _globals['_SESSIONWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._loaded_options = None + _globals['_SESSIONWINDOWSPAYLOAD_ENUM'].values_by_name["PROPERTIES"]._serialized_options = b'\242\264\372\302\005!beam:window_fn:session_windows:v1' + _globals['_GLOBALWINDOWSPAYLOAD']._serialized_start=220 + _globals['_GLOBALWINDOWSPAYLOAD']._serialized_end=306 + _globals['_GLOBALWINDOWSPAYLOAD_ENUM']._serialized_start=244 + _globals['_GLOBALWINDOWSPAYLOAD_ENUM']._serialized_end=306 + _globals['_FIXEDWINDOWSPAYLOAD']._serialized_start=309 + _globals['_FIXEDWINDOWSPAYLOAD']._serialized_end=478 + _globals['_FIXEDWINDOWSPAYLOAD_ENUM']._serialized_start=417 + _globals['_FIXEDWINDOWSPAYLOAD_ENUM']._serialized_end=478 + _globals['_SLIDINGWINDOWSPAYLOAD']._serialized_start=481 + _globals['_SLIDINGWINDOWSPAYLOAD']._serialized_end=697 + _globals['_SLIDINGWINDOWSPAYLOAD_ENUM']._serialized_start=634 + _globals['_SLIDINGWINDOWSPAYLOAD_ENUM']._serialized_end=697 + _globals['_SESSIONWINDOWSPAYLOAD']._serialized_start=700 + _globals['_SESSIONWINDOWSPAYLOAD']._serialized_end=833 + _globals['_SESSIONWINDOWSPAYLOAD_ENUM']._serialized_start=770 + _globals['_SESSIONWINDOWSPAYLOAD_ENUM']._serialized_end=833 +# @@protoc_insertion_point(module_scope) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.pyi b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.pyi new file mode 100644 index 000000000000..dc3177086664 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2.pyi @@ -0,0 +1,204 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file + +Protocol Buffers describing the Runner API, which is the runner-independent, +SDK-independent definition of the Beam model. +""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins +import sys +import typing as _typing + +if sys.version_info >= (3, 10): + from typing import TypeAlias as _TypeAlias +else: + from typing_extensions import TypeAlias as _TypeAlias + +DESCRIPTOR: _descriptor.FileDescriptor + +@_typing.final +class GlobalWindowsPayload(_message.Message): + """By default, all data in a PCollection is assigned to the single global + window. See BeamConstants for the time span this window encompasses. + + See https://beam.apache.org/documentation/programming-guide/#single-global-window + for additional details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[GlobalWindowsPayload._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PROPERTIES: GlobalWindowsPayload._Enum.ValueType # 0 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + PROPERTIES: GlobalWindowsPayload.Enum.ValueType # 0 + + def __init__( + self, + ) -> None: ... + +Global___GlobalWindowsPayload: _TypeAlias = GlobalWindowsPayload # noqa: Y015 + +@_typing.final +class FixedWindowsPayload(_message.Message): + """A fixed time window represents a consistent duration size, non overlapping + time interval in the data stream. + + See https://beam.apache.org/documentation/programming-guide/#fixed-time-windows + for additional details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[FixedWindowsPayload._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PROPERTIES: FixedWindowsPayload._Enum.ValueType # 0 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + PROPERTIES: FixedWindowsPayload.Enum.ValueType # 0 + + SIZE_FIELD_NUMBER: _builtins.int + OFFSET_FIELD_NUMBER: _builtins.int + @_builtins.property + def size(self) -> _duration_pb2.Duration: + """(Required) Represents the size of the window.""" + + @_builtins.property + def offset(self) -> _timestamp_pb2.Timestamp: + """(Required) Represents the timestamp of when the first window begins. + Window N will start at offset + N * size. + """ + + def __init__( + self, + *, + size: _duration_pb2.Duration | None = ..., + offset: _timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["offset", b"offset", "size", b"size"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["offset", b"offset", "size", b"size"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___FixedWindowsPayload: _TypeAlias = FixedWindowsPayload # noqa: Y015 + +@_typing.final +class SlidingWindowsPayload(_message.Message): + """A sliding time window represents time intervals in the data stream that can + overlap. For example, each window might capture 60 seconds worth of data, but + a new window starts every 30 seconds. The frequency with which sliding + windows begin is called the period. Therefore, our example would have a + window size of 60 seconds and a period of 30 seconds. + + Because multiple windows overlap, most elements in a data set will belong to + more than one window. This kind of windowing is useful for taking running + averages of data; using sliding time windows, you can compute a running + average of the past 60 seconds’ worth of data, updated every 30 seconds, in + our example. + + See https://beam.apache.org/documentation/programming-guide/#sliding-time-windows + for additional details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[SlidingWindowsPayload._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PROPERTIES: SlidingWindowsPayload._Enum.ValueType # 0 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + PROPERTIES: SlidingWindowsPayload.Enum.ValueType # 0 + + SIZE_FIELD_NUMBER: _builtins.int + OFFSET_FIELD_NUMBER: _builtins.int + PERIOD_FIELD_NUMBER: _builtins.int + @_builtins.property + def size(self) -> _duration_pb2.Duration: + """(Required) Represents the size of the window.""" + + @_builtins.property + def offset(self) -> _timestamp_pb2.Timestamp: + """(Required) Represents the timestamp of when the first window begins. + Window N will start at offset + N * period. + """ + + @_builtins.property + def period(self) -> _duration_pb2.Duration: + """(Required) Represents the amount of time between each start of a window.""" + + def __init__( + self, + *, + size: _duration_pb2.Duration | None = ..., + offset: _timestamp_pb2.Timestamp | None = ..., + period: _duration_pb2.Duration | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["offset", b"offset", "period", b"period", "size", b"size"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["offset", b"offset", "period", b"period", "size", b"size"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SlidingWindowsPayload: _TypeAlias = SlidingWindowsPayload # noqa: Y015 + +@_typing.final +class SessionWindowsPayload(_message.Message): + """A session window function defines windows that contain elements that are + within a certain gap size of another element. Session windowing applies + on a per-key basis and is useful for data that is irregularly distributed + with respect to time. For example, a data stream representing user mouse + activity may have long periods of idle time interspersed with high + concentrations of clicks. If data arrives after the minimum specified gap + size duration, this initiates the start of a new window. + + See https://beam.apache.org/documentation/programming-guide/#session-windows + for additional details. + """ + + DESCRIPTOR: _descriptor.Descriptor + + class _Enum: + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 + + class _EnumEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[SessionWindowsPayload._Enum.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor + PROPERTIES: SessionWindowsPayload._Enum.ValueType # 0 + + class Enum(_Enum, metaclass=_EnumEnumTypeWrapper): ... + PROPERTIES: SessionWindowsPayload.Enum.ValueType # 0 + + GAP_SIZE_FIELD_NUMBER: _builtins.int + @_builtins.property + def gap_size(self) -> _duration_pb2.Duration: + """(Required) Minimum duration of gaps between sessions.""" + + def __init__( + self, + *, + gap_size: _duration_pb2.Duration | None = ..., + ) -> None: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["gap_size", b"gap_size"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["gap_size", b"gap_size"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + +Global___SessionWindowsPayload: _TypeAlias = SessionWindowsPayload # noqa: Y015 diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_grpc.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_grpc.py new file mode 100644 index 000000000000..e843bc2fe6a9 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_urns.py b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_urns.py new file mode 100644 index 000000000000..b282744c93c7 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/org/apache/beam/model/pipeline/v1/standard_window_fns_pb2_urns.py @@ -0,0 +1,28 @@ +from ........utils import PropertiesFromEnumValue +from . import metrics_pb2 +EMPTY_MONITORING_INFO_LABEL_PROPS = metrics_pb2.MonitoringInfoLabelProps() +EMPTY_MONITORING_INFO_SPEC = metrics_pb2.MonitoringInfoSpec() + +class FixedWindowsPayload(object): + + class Enum(object): + PROPERTIES = PropertiesFromEnumValue('beam:window_fn:fixed_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class GlobalWindowsPayload(object): + + class Enum(object): + PROPERTIES = PropertiesFromEnumValue('beam:window_fn:global_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class SessionWindowsPayload(object): + + class Enum(object): + PROPERTIES = PropertiesFromEnumValue('beam:window_fn:session_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + + +class SlidingWindowsPayload(object): + + class Enum(object): + PROPERTIES = PropertiesFromEnumValue('beam:window_fn:sliding_windows:v1', '', EMPTY_MONITORING_INFO_SPEC, EMPTY_MONITORING_INFO_LABEL_PROPS) + diff --git a/sdks/python/apache_beam/portability/api/standard_coders.yaml b/sdks/python/apache_beam/portability/api/standard_coders.yaml new file mode 100644 index 000000000000..8ce9d2751545 --- /dev/null +++ b/sdks/python/apache_beam/portability/api/standard_coders.yaml @@ -0,0 +1,628 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This file is broken into multiple sections delimited by ---. Each section specifies a set of +# reference encodings for a single standardized coder used in a specific context. +# +# Each section contains up to 3 properties: +# +# coder: a common coder spec. Currently, a URN and URNs for component coders as necessary. +# nested: a boolean meaning whether the coder was used in the nested context. Missing means to +# test both contexts, a shorthand for when the coder is invariant across context. +# examples: a map of {encoded bytes: original JSON object} encoded with the coder in the context. +# The LHS (key) is a byte array encoded as a JSON-escaped string. The RHS (value) is +# one of a few standard JSON types such as numbers, strings, dicts that map naturally +# to the type encoded by the coder. +# +# Java code snippet to generate example bytes: +# Coder> coder = Timer.Coder.of(StringUtf8Coder.of(), GlobalWindow.Coder.INSTANCE); +# Instant now = new Instant(1000L); +# Timer timer = Timer.of( +# "key", +# "tag", +# Collections.singletonList(GlobalWindow.INSTANCE), +# now, +# now, +# PaneInfo.NO_FIRING); +# byte[] bytes = CoderUtils.encodeToByteArray(coder, timer); +# String str = new String(bytes, java.nio.charset.StandardCharsets.ISO_8859_1); +# String example = ""; +# for(int i = 0; i < str.length(); i++){ +# example += CharUtils.unicodeEscaped(str.charAt(i)); +# } +# +# These choices were made to strike a balance between portability, ease of use, and simple +# legibility of this file itself. +# +# It is expected that future work will move the `coder` field into a format that it would be +# represented by the Runner API, so that it can be understood by all SDKs and harnesses. +# +# If a coder is marked non-deterministic in the coder spec, then only the decoding should be validated. + + +coder: + urn: "beam:coder:bytes:v1" +nested: false +examples: + "abc": abc + "ab\0c": "ab\0c" + +--- + +coder: + urn: "beam:coder:bytes:v1" +nested: true +examples: + "\u0003abc": abc + "\u0004ab\0c": "ab\0c" + "\u00c8\u0001 10| 20| 30| 40| 50| 60| 70| 80| 90| 100| 110| 120| 130| 140| 150| 160| 170| 180| 190| 200|": + " 10| 20| 30| 40| 50| 60| 70| 80| 90| 100| 110| 120| 130| 140| 150| 160| 170| 180| 190| 200|" + +--- + +coder: + urn: "beam:coder:bool:v1" +examples: + "\0": false + "\u0001": true + +--- + +coder: + urn: "beam:coder:string_utf8:v1" +nested: false +examples: + "abc": abc + "ab\0c": "ab\0c" + "\u00c3\u00bf": "\u00ff" + "\u00e5\u0085\u0089\u00e7\u00ba\u00bf": "光线" + +--- + +coder: + urn: "beam:coder:string_utf8:v1" +nested: true +examples: + "\u0003abc": abc + "\u0004ab\0c": "ab\0c" + "\u0002\u00c3\u00bf": "\u00ff" + "\u0006\u00e5\u0085\u0089\u00e7\u00ba\u00bf": "光线" + "\u00c8\u0001 10| 20| 30| 40| 50| 60| 70| 80| 90| 100| 110| 120| 130| 140| 150| 160| 170| 180| 190| 200|": + " 10| 20| 30| 40| 50| 60| 70| 80| 90| 100| 110| 120| 130| 140| 150| 160| 170| 180| 190| 200|" + +--- + +coder: + urn: "beam:coder:varint:v1" +examples: + "\0": 0 + "\u0001": 1 + "\u000A": 10 + "\u00c8\u0001": 200 + "\u00e8\u0007": 1000 + "\u00a9\u0046": 9001 + "\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u0001": -1 + +--- + +coder: + urn: "beam:coder:kv:v1" + components: [{urn: "beam:coder:bytes:v1"}, + {urn: "beam:coder:varint:v1"}] +examples: + "\u0003abc\0": {key: abc, value: 0} + "\u0004ab\0c\u000A": {key: "ab\0c", value: 10} + +--- + +coder: + urn: "beam:coder:kv:v1" + components: [{urn: "beam:coder:bytes:v1"}, + {urn: "beam:coder:bytes:v1"}] +nested: false +examples: + "\u0003abcdef": {key: abc, value: def} + "\u0004ab\0cde\0f": {key: "ab\0c", value: "de\0f"} + +--- + +coder: + urn: "beam:coder:kv:v1" + components: [{urn: "beam:coder:bytes:v1"}, + {urn: "beam:coder:bytes:v1"}] +nested: true +examples: + "\u0003abc\u0003def": {key: abc, value: def} + "\u0004ab\0c\u0004de\0f": {key: "ab\0c", value: "de\0f"} + +--- + +coder: + urn: "beam:coder:kv:v1" + components: [{urn: "beam:coder:bytes:v1"}, + {urn: "beam:coder:bool:v1"}] +examples: + "\u0003abc\u0001": {key: abc, value: true} + "\u0004ab\0c\0": {key: "ab\0c", value: false} + +--- + +coder: + urn: "beam:coder:interval_window:v1" +examples: + "\u0080\u0000\u0001\u0052\u009a\u00a4\u009b\u0068\u0080\u00dd\u00db\u0001" : {end: 1454293425000, span: 3600000} + "\u0080\u0000\u0001\u0053\u0034\u00ec\u0074\u00e8\u0080\u0090\u00fb\u00d3\u0009" : {end: 1456881825000, span: 2592000000} + "\u007f\u00df\u003b\u0064\u005a\u001c\u00ad\u0076\u00ed\u0002" : {end: -9223372036854410, span: 365} + "\u0080\u0020\u00c4\u009b\u00a5\u00e3\u0053\u00f7\u0000" : {end: 9223372036854775, span: 0} + +--- + +coder: + urn: "beam:coder:iterable:v1" + components: [{urn: "beam:coder:varint:v1"}] +examples: + "\0\0\0\u0001\0": [0] + "\0\0\0\u0004\u0001\n\u00c8\u0001\u00e8\u0007": [1, 10, 200, 1000] + # 130 items. + "\0\0\0\u0082A-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-A": [65, 45, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 45, 65] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:iterable:v1" + components: [{urn: "beam:coder:bytes:v1"}] +examples: + "\0\0\0\u0001\u0003abc": ["abc"] + "\0\0\0\u0002\u0004ab\0c\u0004de\0f": ["ab\0c", "de\0f"] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:iterable:v1" + components: [{urn: "beam:coder:bool:v1"}] +examples: + "\0\0\0\u0001\u0001": [true] + "\0\0\0\u0002\u0001\0": [true, false] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:iterable:v1" + components: [{urn: "beam:coder:bytes:v1"}] + # This is for iterables of unknown length, where the encoding is not + # deterministic. + non_deterministic: true +examples: + "\u00ff\u00ff\u00ff\u00ff\u0000": [] + "\u00ff\u00ff\u00ff\u00ff\u0001\u0003abc\u0000": ["abc"] + "\u00ff\u00ff\u00ff\u00ff\u0002\u0004ab\u0000c\u0004de\u0000f\u0000": ["ab\0c", "de\0f"] + +--- + +coder: + urn: "beam:coder:iterable:v1" + components: [{urn: "beam:coder:global_window:v1"}] +examples: + "\0\0\0\u0001": [""] + +--- + +coder: + urn: "beam:coder:timer:v1" + components: [{urn: "beam:coder:string_utf8:v1"}, + {urn: "beam:coder:global_window:v1"}] +examples: + "\u0003\u006b\u0065\u0079\u0003\u0074\u0061\u0067\u0000\u0000\u0000\u0001\u0000\u0080\u0000\u0000\u0000\u0000\u0000\u0004\u00d2\u0080\u0000\u0000\u0000\u0000\u0000\u0016\u002e\u000f": { + userKey: key, + dynamicTimerTag: tag, + windows: ["global"], + clearBit: false, + fireTimestamp: 1234, + holdTimestamp: 5678, + pane: {is_first: true, is_last: true, timing: UNKNOWN, index: 0, on_time_index: 0}, + } + "\u0003\u006b\u0065\u0079\u0003\u0074\u0061\u0067\u0000\u0000\u0000\u0001\u0001": { + userKey: key, + dynamicTimerTag: tag, + windows: ["global"], + clearBit: true, + } + +--- + +coder: + urn: "beam:coder:global_window:v1" +examples: + "": "" + +--- + +# All windowed values consist of pane infos that represent NO_FIRING until full support is added +# in the Python SDK (BEAM-1522). +coder: + urn: "beam:coder:windowed_value:v1" + components: [{urn: "beam:coder:varint:v1"}, + {urn: "beam:coder:global_window:v1"}] +examples: + "\u0080\0\u0001R\u009a\u00a4\u009bh\0\0\0\u0001\u000f\u0002": { + value: 2, + timestamp: 1454293425000, + pane: {is_first: true, is_last: true, timing: UNKNOWN, index: 0, on_time_index: 0}, + windows: ["global"] + } + +--- + +coder: + urn: "beam:coder:windowed_value:v1" + components: [{urn: "beam:coder:varint:v1"}, + {urn: "beam:coder:interval_window:v1"}] +examples: + "\u007f\u00ff\u00ff\u00ff\u00ff\u00f9\u00e5\u0080\0\0\0\u0001\u0080\0\u0001R\u009a\u00a4\u009bh\u00c0\u008b\u0011\u000f\u0004": { + value: 4, + timestamp: -400000, + pane: {is_first: true, is_last: true, timing: UNKNOWN, index: 0, on_time_index: 0}, + windows: [{end: 1454293425000, span: 280000}] + } + + "\u007f\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff\u009c\0\0\0\u0002\u0080\0\u0001R\u009a\u00a4\u009bh\u0080\u00dd\u00db\u0001\u007f\u00df;dZ\u001c\u00adv\u00ed\u0002\u000f\u0002": { + value: 2, + timestamp: -100, + pane: {is_first: true, is_last: true, timing: UNKNOWN, index: 0, on_time_index: 0}, + windows: [{end: 1454293425000, span: 3600000}, {end: -9223372036854410, span: 365}] + } + +--- + +# ParamWindowedValueCoder with constant value of: +# timestamp: Instant.ofEpochMilli(1000) +# windows: [IntervalWindow(10, 20)] +# pane info: PaneInfo(false, true, PaneInfo.Timing.ON_TIME, 30, 40) +coder: + urn: "beam:coder:param_windowed_value:v1" + payload: "\x80\x00\x00\x00\x00\x00\x03è\x00\x00\x00\x01\x80\x00\x00\x00\x00\x00\x00\x14\n&\x1E(\x00" + components: [{urn: "beam:coder:varint:v1"}, + {urn: "beam:coder:interval_window:v1"}] +examples: + "\u0002": { + value: 2, + timestamp: 1000, + pane: {is_first: false, is_last: true, timing: ON_TIME, index: 30, on_time_index: 40}, + windows: [{end: 20, span: 10}] + } + +--- + +# ParamWindowedValueCoder with constant value of: +# timestamp: BoundedWindow.TIMESTAMP_MIN_VALUE +# windows: [GlobalWindow.INSTANCE] +# pane info: PaneInfo.NO_FIRING +coder: + urn: "beam:coder:param_windowed_value:v1" + payload: "\x7Fß;dZ\x1C¬\t\x00\x00\x00\x01\x0F\x00" + components: [{urn: "beam:coder:varint:v1"}, + {urn: "beam:coder:global_window:v1"}] +examples: + "\u0002": { + value: 2, + timestamp: -9223372036854775, + pane: {is_first: true, is_last: true, timing: UNKNOWN, index: 0, on_time_index: 0}, + windows: ["global"] + } + +--- + +coder: + urn: "beam:coder:double:v1" +examples: + "\0\0\0\0\0\0\0\0": "0" + "\u0080\0\0\0\0\0\0\0": "-0" + "\u003f\u00b9\u0099\u0099\u0099\u0099\u0099\u009a": "0.1" + "\u00bf\u00b9\u0099\u0099\u0099\u0099\u0099\u009a": "-0.1" + "\0\0\0\0\0\0\0\u0001": "4.9e-324" + "\0\u0001\0\0\0\0\0\0": "1.390671161567e-309" + "\u007f\u00ef\u00ff\u00ff\u00ff\u00ff\u00ff\u00ff": "1.7976931348623157e308" + "\u007f\u00f0\0\0\0\0\0\0": "Infinity" + "\u00ff\u00f0\0\0\0\0\0\0": "-Infinity" + "\u007f\u00f8\0\0\0\0\0\0": "NaN" + +--- + +coder: + urn: "beam:coder:row:v1" + # str: string, i32: int32, f64: float64, arr: array[string] + payload: "\n\t\n\x03str\x1a\x02\x10\x07\n\t\n\x03i32\x1a\x02\x10\x03\n\t\n\x03f64\x1a\x02\x10\x06\n\r\n\x03arr\x1a\x06\x1a\x04\n\x02\x10\x07\x12$4e5e554c-d4c1-4a5d-b5e1-f3293a6b9f05" +examples: + "\u0004\u0000\u0003foo\u00a9\u0046\u003f\u00b9\u0099\u0099\u0099\u0099\u0099\u009a\0\0\0\u0003\u0003foo\u0003bar\u0003baz": {str: "foo", i32: 9001, f64: "0.1", arr: ["foo", "bar", "baz"]} + +--- + +coder: + urn: "beam:coder:row:v1" + # str: nullable string, i32: nullable int32, f64: nullable float64 + payload: "\n\x0b\n\x03str\x1a\x04\x08\x01\x10\x07\n\x0b\n\x03i32\x1a\x04\x08\x01\x10\x03\n\x0b\n\x03f64\x1a\x04\x08\x01\x10\x06\x12$b20c6545-57af-4bc8-b2a9-51ace21c7393" +examples: + "\u0003\u0001\u0007": {str: null, i32: null, f64: null} + "\u0003\u0001\u0004\u0003foo\u00a9\u0046": {str: "foo", i32: 9001, f64: null} + "\u0003\u0000\u0003foo\u00a9\u0046\u003f\u00b9\u0099\u0099\u0099\u0099\u0099\u009a": {str: "foo", i32: 9001, f64: "0.1"} + +--- + +# Binary data generated with the python SDK: +# +# import typing +# import apache_beam as beam +# class Test(typing.NamedTuple): +# f_bool: bool +# f_byte: typing.Optional[bytes] +# schema = beam.typehints.schemas.named_tuple_to_schema(Test) +# coder = beam.coders.row_coder.RowCoder(schema) +# print("payload = %s" % schema.SerializeToString()) +# print("example = %s" % coder.encode(Test(f_bool=True, f_nullable=None))) +coder: + urn: "beam:coder:row:v1" + # f_bool: boolean, f_bytes: nullable bytes + payload: "\n\x0c\n\x06f_bool\x1a\x02\x10\x08\n\x0f\n\x07f_bytes\x1a\x04\x08\x01\x10\t\x12$eea1b747-7571-43d3-aafa-9255afdceafb" +examples: + "\x02\x01\x02\x01": {f_bool: true, f_bytes: null} + "\x02\x00\x00\x04ab\x00c": {f_bool: false, f_bytes: "ab\0c"} + +--- + +# Binary data generated with the python SDK: +# +# import typing +# import apache_beam as beam +# class Test(typing.NamedTuple): +# f_map: typing.Mapping[str,typing.Optional[int]] +# schema = beam.typehints.schemas.named_tuple_to_schema(Test) +# coder = beam.coders.row_coder.RowCoder(schema) +# print("payload = %s" % schema.SerializeToString()) +# examples = (Test(f_map={}), +# Test(f_map={"foo": 9001, "bar": 9223372036854775807}), +# Test(f_map={"everything": None, "is": None, "null!": None, "¯\_(ツ)_/¯": None})) +# for example in examples: +# print("example = %s" % coder.encode(example)) +coder: + urn: "beam:coder:row:v1" + # f_map: map + payload: "\n\x15\n\x05f_map\x1a\x0c*\n\n\x02\x10\x07\x12\x04\x08\x01\x10\x04\x12$d8c8f969-14e6-457f-a8b5-62a1aec7f1cd" + # map ordering is non-deterministic + non_deterministic: true +examples: + "\x01\x00\x00\x00\x00\x00": {f_map: {}} + "\x01\x00\x00\x00\x00\x02\x03foo\x01\xa9F\x03bar\x01\xff\xff\xff\xff\xff\xff\xff\xff\x7f": {f_map: {"foo": 9001, "bar": 9223372036854775807}} + "\x01\x00\x00\x00\x00\x04\neverything\x00\x02is\x00\x05null!\x00\r\xc2\xaf\\_(\xe3\x83\x84)_/\xc2\xaf\x00": {f_map: {"everything": null, "is": null, "null!": null, "¯\\_(ツ)_/¯": null}} + +--- +# Binary data generated with the python SDK: +# schema1 = schema_pb2.Schema( +# id="30ea5a25-dcd8-4cdb-abeb-5332d15ab4b9", +# fields=[ +# schema_pb2.Field( +# name="str", +# type=schema_pb2.FieldType(atomic_type=schema_pb2.STRING), +# encoding_position=1), +# schema_pb2.Field( +# name="f_bool", +# type=schema_pb2.FieldType(atomic_type=schema_pb2.BOOLEAN), +# encoding_position=2), +# schema_pb2.Field( +# name="i32", +# type=schema_pb2.FieldType( +# atomic_type=schema_pb2.INT32, nullable=True), +# encoding_position=0) +# ], +# encoding_positions_set=True) +# +# coder = RowCoder(schema1) +# c = coder.schema.SerializeToString() +# print("payload = %s" % c) +# test = typing.NamedTuple("test", [ ("f_bool", bool), ("i32", np.int32), ("str", str) ]) +# example = coder.encode(test(False,21,"str2")) +# print("example = %s" % example) +coder: + urn: "beam:coder:row:v1" + payload: "\n\x0b\n\x03str\x1a\x02\x10\x07(\x01\n\x0e\n\x06f_bool\x1a\x02\x10\x08(\x02\n\x0b\n\x03i32\x1a\x04\x08\x01\x10\x03\x12$30ea5a25-dcd8-4cdb-abeb-5332d15ab4b9 \x01" +examples: + "\x03\x00\x15\x04str2\x00": {f_bool: false, i32: 21, str: "str2"} + +--- + +coder: + urn: "beam:coder:row:v1" + # f_timestamp: logical(micros_instant), f_string: string, f_int: int64 + payload: "\n\x7f\n\x0bf_timestamp\x1ap:n\n#beam:logical_type:micros_instant:v1\x1aG2E\nC\n\r\n\x07seconds\x1a\x02\x10\x04\n\x0c\n\x06micros\x1a\x02\x10\x04\x12$4d3f6e8f-7412-4ad7-bfd9-b424a1664aef\n\x0e\n\x08f_string\x1a\x02\x10\x07\n\x0b\n\x05f_int\x1a\x02\x10\x04\x12$33dafd37-397c-4083-a84e-42177d122221" +examples: + "\x03\x00\x02\x00\xb6\x95\xd5\xf9\x05\xc0\xc4\x07\x1b2020-08-13T14:14:14.123456Z\xc0\xf7\x85\xda\xae\x98\xeb\x02": {f_timestamp: {seconds: 1597328054, micros: 123456}, f_string: "2020-08-13T14:14:14.123456Z", f_int: 1597328054123456} + +--- + +coder: + urn: "beam:coder:row:v1" + # f_timestamp: logical(millis_instant), f_string: string, f_int: int64 + payload: "\n:\n\x0bf_timestamp\x1a+:)\n#beam:logical_type:millis_instant:v1\x1a\x02\x10\x04\n\x0e\n\x08f_string\x1a\x02\x10\x07\n\x0b\n\x05f_int\x1a\x02\x10\x04\x12$80be749a-5700-4ede-89d8-dd9a4433a3f8" +examples: + "\x03\x00\x80\x00\x01s\xe8+\xd7k\x182020-08-13T14:14:14.123Z\xeb\xae\xaf\xc1\xbe.": {f_timestamp: -9223370439526721685, f_string: "2020-08-13T14:14:14.123Z", f_int: 1597328054123} + +--- + +coder: + urn: "beam:coder:row:v1" + # f_float: float32 + payload: "\n\r\n\x07f_float\x1a\x02\x10\x05\x12$8c97b6c5-69e5-4733-907b-26cd8edae612" +examples: + "\x01\x00\x00\x00\x00\x00": {f_float: "0.0"} + "\x01\x00?\x80\x00\x00": {f_float: "1.0"} + "\x01\x00@I\x0eV": {f_float: "3.1415"} + +--- + +coder: + urn: "beam:coder:row:v1" + # f_float: float32, f_decimal: logical(decimal) + payload: "\n\r\n\x07f_float\x1a\x02\x10\x05\n1\n\tf_decimal\x1a$:\"\n\x1cbeam:logical_type:decimal:v1\x1a\x02\x10\t\x12$800c44ae-a1b7-4def-bbf6-6217cca89ec4" +examples: + "\x02\x00\x00\x00\x00\x00\x01\x01\x00": {f_float: "0.0", f_decimal: "0.0"} + "\x02\x00?\x80\x00\x00\x01\x01\n": {f_float: "1.0", f_decimal: "1.0"} + "\x02\x00@I\x0eV\x04\x02z\xb7": {f_float: "3.1415", f_decimal: "3.1415"} + "\x02\x00\xc2\xc8>\xfa\x03\x03\xfex\xe5": {f_float: "-100.123", f_decimal: "-100.123"} + +--- + +coder: + urn: "beam:coder:row:v1" + # f_char: logical(fixed_char(5)), f_varchar: logical(var_char(5)), f_bytes: logical(fixed_bytes(5)), f_varbytes: logical(var_bytes(5)) + payload: "\n=\n\x06f_char\x1a3\x08\x01:/\n\x1fbeam:logical_type:fixed_char:v1\x1a\x02\x10\x07\"\x02\x10\x03*\x04\n\x02\x18\x05\nB\n\tf_varchar\x1a1\x08\x01:-\n\x1dbeam:logical_type:var_char:v1\x1a\x02\x10\x07\"\x02\x10\x03*\x04\n\x02\x18\n \x01(\x01\nC\n\x07f_bytes\x1a4\x08\x01:0\n beam:logical_type:fixed_bytes:v1\x1a\x02\x10\t\"\x02\x10\x03*\x04\n\x02\x18\x05 \x02(\x02\nD\n\nf_varbytes\x1a2\x08\x01:.\n\x1ebeam:logical_type:var_bytes:v1\x1a\x02\x10\t\"\x02\x10\x03*\x04\n\x02\x18\n \x03(\x03\x12$f0ffb3a4-f46f-41ca-a942-85e3e939452a" +examples: + "\x04\x00\x05ABCDE\x05ABCDE\x05ABCDE\x05ABCDE": {f_char: "ABCDE", f_varchar: "ABCDE", f_bytes: "ABCDE", f_varbytes: "ABCDE"} + "\x04\x00\x05A\n \x02A\n\x05A\n\x00\x00\x00\x02A\n": {f_char: "A\n ", f_varchar: "A\n", f_bytes: "A\n\x00\x00\x00", f_varbytes: "A\n"} + "\x04\x01\x06\x05null?\x04null": {f_char: "null?", f_varchar: null, f_bytes: null, f_varbytes: "null"} + +--- + +coder: + urn: "beam:coder:sharded_key:v1" + components: [{urn: "beam:coder:string_utf8:v1"}] + +examples: + "\u0000\u0000": { + shardId: "", + key: "" + } + "\u0008\u0073\u0068\u0061\u0072\u0064\u005f\u0069\u0064\u0000": { + shardId: shard_id, + key: "" + } + "\u0008\u0073\u0068\u0061\u0072\u0064\u005f\u0069\u0064\u0003\u006b\u0065\u0079": { + shardId: shard_id, + key: "key" + } + "\u0000\u0003\u006b\u0065\u0079": { + shardId: "", + key: "key" + } + +--- + + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:varint:v1"}] +examples: + "\0\0\0\u0001\0": [0] + "\0\0\0\u0004\u0001\n\u00c8\u0001\u00e8\u0007": [1, 10, 200, 1000] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:bytes:v1"}] +examples: + "\0\0\0\u0001\u0003abc": ["abc"] + "\0\0\0\u0002\u0004ab\0c\u0004de\0f": ["ab\0c", "de\0f"] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:bool:v1"}] +examples: + "\0\0\0\u0001\u0001": [true] + "\0\0\0\u0002\u0001\0": [true, false] + "\0\0\0\0": [] + +--- + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:bytes:v1"}] + # This is for iterables of unknown length, where the encoding is not + # deterministic. + non_deterministic: true +examples: + "\u00ff\u00ff\u00ff\u00ff\u0000": [] + "\u00ff\u00ff\u00ff\u00ff\u0001\u0003abc\u0000": ["abc"] + "\u00ff\u00ff\u00ff\u00ff\u0002\u0004ab\u0000c\u0004de\u0000f\u0000": ["ab\0c", "de\0f"] + +--- + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:global_window:v1"}] +examples: + "\0\0\0\u0001": [""] + +--- + +coder: + urn: "beam:coder:state_backed_iterable:v1" + components: [{urn: "beam:coder:varint:v1"}] + state: { + emptySuffix: "", + nonEmptySuffix: "\u0001\n" # Represents the values [1, 10] + } + # This is for iterables of unknown length, where the encoding is not + # deterministic. + non_deterministic: true + +examples: + "\u00FF\u00FF\u00FF\u00FF\0": [] # Unknown length with empty prefix and no token + "\u00FF\u00FF\u00FF\u00FF\u0002\u00C8\u0001\u00E8\u0007\0": [200, 1000] # Unknown length with non-empty prefix and no token + "\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u0001\u000BemptySuffix": [] # Unknown length with empty prefix and token with empty suffix + "\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u0001\u000EnonEmptySuffix": [1, 10] # Unknown length with empty prefix and token with non-empty suffix + "\u00FF\u00FF\u00FF\u00FF\u0002\u00C8\u0001\u00E8\u0007\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u0001\u000BemptySuffix": [200, 1000] # Unknown length with non-empty prefix and token with empty suffix + "\u00FF\u00FF\u00FF\u00FF\u0002\u00C8\u0001\u00E8\u0007\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u0001\u000EnonEmptySuffix": [200, 1000, 1, 10] # Unknown length with non-empty prefix and token with non-empty suffix + +--- + +# Java code snippet to generate example bytes: +# TimestampPrefixingWindowCoder coder = TimestampPrefixingWindowCoder.of(IntervalWindowCoder.of()); +# Instant end = new Instant(-9223372036854410L); +# Duration span = Duration.millis(365L); +# IntervalWindow window = new IntervalWindow(end.minus(span), span); +# byte[] bytes = CoderUtils.encodeToByteArray(coder, window); +# String str = new String(bytes, java.nio.charset.StandardCharsets.ISO_8859_1); +# String example = ""; +# for(int i = 0; i < str.length(); i++){ +# example += CharUtils.unicodeEscaped(str.charAt(i)); +# } +# System.out.println(example); +coder: + urn: "beam:coder:custom_window:v1" + components: [{urn: "beam:coder:interval_window:v1"}] + +examples: + "\u0080\u0000\u0001\u0052\u009a\u00a4\u009b\u0067\u0080\u0000\u0001\u0052\u009a\u00a4\u009b\u0068\u0080\u00dd\u00db\u0001" : {window: {end: 1454293425000, span: 3600000}} + "\u007f\u00df\u003b\u0064\u005a\u001c\u00ad\u0075\u007f\u00df\u003b\u0064\u005a\u001c\u00ad\u0076\u00ed\u0002" : {window: {end: -9223372036854410, span: 365}} + + +--- +coder: + urn: "beam:coder:nullable:v1" + components: [{urn: "beam:coder:bytes:v1"}] +nested: true + +examples: + "\u0001\u0003\u0061\u0062\u0063" : "abc" + "\u0001\u000a\u006d\u006f\u0072\u0065\u0020\u0062\u0079\u0074\u0065\u0073" : "more bytes" + "\u0000" : null diff --git a/sdks/python/apache_beam/runners/common.c b/sdks/python/apache_beam/runners/common.c new file mode 100644 index 000000000000..2bc2d26bdb52 --- /dev/null +++ b/sdks/python/apache_beam/runners/common.c @@ -0,0 +1,70398 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.runners.common", + "sources": [ + "apache_beam/runners/common.py" + ] + }, + "module_name": "apache_beam.runners.common" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__runners__common +#define __PYX_HAVE_API__apache_beam__runners__common +/* Early includes */ +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/runners/common.py", + "", + "apache_beam/runners/common.pxd", + "apache_beam/utils/windowed_value.pxd", + "apache_beam/transforms/cy_dataflow_distribution_counter.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase; +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; +struct __pyx_obj_11apache_beam_7runners_6common_Receiver; +struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner; +struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler; +struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext; +struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter; +struct __pyx_defaults; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr; +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split; +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create; + +/* "apache_beam/utils/windowed_value.pxd":55 + * + * @cython.locals(wv=WindowedValue) + * cpdef WindowedValue create( # <<<<<<<<<<<<<< + * object value, int64_t timestamp_micros, object windows, object pane_info=*) + * +*/ +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create { + int __pyx_n; + PyObject *pane_info; +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":25 + * + * # 3 buckets for every power of ten -> 1, 2, 5 + * cdef enum: # <<<<<<<<<<<<<< + * BUCKET_PER_TEN = 3 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_BUCKET_PER_TEN = 3 +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":29 + * + * # Assume the max input is max(int64_t), then the possible max bucket size is 59 + * cdef enum: # <<<<<<<<<<<<<< + * MAX_BUCKET_SIZE = 59 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE = 59 +}; +struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process; +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process; +struct __pyx_opt_args_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process; + +/* "apache_beam/runners/common.pxd":80 + * cdef object _bundle_context_values + * + * cpdef invoke_process(self, WindowedValue windowed_value, # <<<<<<<<<<<<<< + * restriction=*, watermark_estimator_state=*, + * additional_args=*, additional_kwargs=*) +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process { + int __pyx_n; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *additional_args; + PyObject *additional_kwargs; +}; + +/* "apache_beam/runners/common.pxd":136 + * @cython.locals(windowed_value=WindowedValue, + * output_element_count=int64_t) + * cpdef handle_process_outputs(self, WindowedValue element, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":141 + * @cython.locals(windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_batch_outputs(self, WindowedBatch input_batch, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":157 + * windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_outputs(self, WindowedValue element, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":163 + * windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_batch_outputs(self, WindowedBatch input_batch, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process { + int __pyx_n; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *additional_args; + PyObject *additional_kwargs; +}; + +/* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process { + int __pyx_n; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *additional_args; + PyObject *additional_kwargs; +}; + +/* "apache_beam/utils/windowed_value.pxd":27 + * cdef list _BYTE_TO_PANE_INFO + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class PaneInfo(object): + * cdef readonly bint _is_first +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo { + PyObject_HEAD + int _is_first; + int _is_last; + int _timing; + int _index; + int _nonspeculative_index; + unsigned char _encoded_byte; +}; + + +/* "apache_beam/utils/windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab; + PyObject *value; + PyObject *windows; + PyObject *pane_info; + int64_t timestamp_micros; + PyObject *timestamp_object; +}; + + +/* "apache_beam/utils/windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab; +}; + + +/* "apache_beam/utils/windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv; +}; + + +/* "apache_beam/utils/windowed_value.pxd":59 + * + * + * cdef class _IntervalWindowBase(object): # <<<<<<<<<<<<<< + * cdef object _start_object + * cdef readonly int64_t _start_micros +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase { + PyObject_HEAD + PyObject *_start_object; + int64_t _start_micros; + PyObject *_end_object; + int64_t _end_micros; +}; + + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":32 + * MAX_BUCKET_SIZE = 59 + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * cdef public int64_t min + * cdef public int64_t max +*/ +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtab; + int64_t min; + int64_t max; + int64_t count; + int64_t sum; + int64_t *buckets; + int is_cythonized; +}; + + +/* "apache_beam/runners/common.pxd":30 + * + * + * cdef class Receiver(object): # <<<<<<<<<<<<<< + * cpdef receive(self, WindowedValue windowed_value) + * cpdef receive_batch(self, WindowedBatch windowed_batch) +*/ +struct __pyx_obj_11apache_beam_7runners_6common_Receiver { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtab; +}; + + +/* "apache_beam/runners/common.pxd":36 + * + * + * cdef class MethodWrapper(object): # <<<<<<<<<<<<<< + * cdef public object args + * cdef public object defaults +*/ +struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper { + PyObject_HEAD + PyObject *args; + PyObject *defaults; + PyObject *method_value; + PyObject *method_name; + int has_userstate_arguments; + PyObject *state_args_to_replace; + PyObject *timer_args_to_replace; + PyObject *timestamp_arg_name; + PyObject *window_arg_name; + PyObject *key_arg_name; + PyObject *restriction_provider; + PyObject *restriction_provider_arg_name; + PyObject *watermark_estimator_provider; + PyObject *watermark_estimator_provider_arg_name; + PyObject *dynamic_timer_tag_arg_name; + int unbounded_per_element; +}; + + +/* "apache_beam/runners/common.pxd":55 + * + * + * cdef class DoFnSignature(object): # <<<<<<<<<<<<<< + * cdef public MethodWrapper process_method + * cdef public MethodWrapper process_batch_method +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *process_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *process_batch_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *start_bundle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *finish_bundle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *setup_lifecycle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *teardown_lifecycle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *create_watermark_estimator_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *initial_restriction_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *create_tracker_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *split_method; + PyObject *batching_configuration; + PyObject *do_fn; + PyObject *timer_methods; + int _is_stateful_dofn; +}; + + +/* "apache_beam/runners/common.pxd":72 + * + * + * cdef class DoFnInvoker(object): # <<<<<<<<<<<<<< + * cdef public DoFnSignature signature + * cdef OutputHandler output_handler +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *signature; + struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *output_handler; + PyObject *user_state_context; + PyObject *bundle_finalizer_param; + PyObject *_setup_context_values; + PyObject *_bundle_context_values; +}; + + +/* "apache_beam/runners/common.pxd":90 + * + * + * cdef class SimpleInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef object process_method + * cdef object process_batch_method +*/ +struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; + PyObject *process_method; + PyObject *process_batch_method; +}; + + +/* "apache_beam/runners/common.pxd":95 + * + * + * cdef class PerWindowInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef list side_inputs + * cdef DoFnContext context +*/ +struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; + PyObject *side_inputs; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *context; + PyObject *args_for_process; + PyObject *kwargs_for_process; + PyObject *placeholders_for_process; + PyObject *args_for_process_batch; + PyObject *kwargs_for_process_batch; + PyObject *placeholders_for_process_batch; + int has_windowed_inputs; + int recalculate_window_args; + int has_cached_window_args; + int has_cached_window_batch_args; + PyObject *process_method; + PyObject *process_batch_method; + int is_splittable; + PyObject *threadsafe_restriction_tracker; + PyObject *threadsafe_watermark_estimator; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *current_windowed_value; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *current_window_index; + PyObject *stop_window_index; + int is_key_param_required; + PyObject *splitting_lock; +}; + + +/* "apache_beam/runners/common.pxd":122 + * + * + * cdef class DoFnRunner: # <<<<<<<<<<<<<< + * cdef DoFnContext context + * cdef object step_name +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *context; + PyObject *step_name; + PyObject *side_inputs; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *do_fn_invoker; + PyObject *bundle_finalizer_param; + PyObject *transform_id; + PyObject *execution_context; +}; + + +/* "apache_beam/runners/common.pxd":133 + * + * + * cdef class OutputHandler(object): # <<<<<<<<<<<<<< + * @cython.locals(windowed_value=WindowedValue, + * output_element_count=int64_t) +*/ +struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *__pyx_vtab; +}; + + +/* "apache_beam/runners/common.pxd":145 + * + * + * cdef class _OutputHandler(OutputHandler): # <<<<<<<<<<<<<< + * cdef object window_fn + * cdef Receiver main_receivers +*/ +struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler { + struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler __pyx_base; + PyObject *window_fn; + struct __pyx_obj_11apache_beam_7runners_6common_Receiver *main_receivers; + PyObject *tagged_receivers; + struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *per_element_output_counter; + PyObject *output_batch_converter; + int _process_batch_yields_elements; + int _process_yields_batches; +}; + + +/* "apache_beam/runners/common.pxd":175 + * cdef inline _verify_batch_output(self, result) + * + * cdef class DoFnContext(object): # <<<<<<<<<<<<<< + * cdef object label + * cdef object state +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *__pyx_vtab; + PyObject *label; + PyObject *state; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *windowed_value; +}; + + +/* "apache_beam/runners/common.pxd":182 + * + * + * cdef class _ReceiverAdapter(Receiver): # <<<<<<<<<<<<<< + * cdef object underlying +*/ +struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter { + struct __pyx_obj_11apache_beam_7runners_6common_Receiver __pyx_base; + PyObject *underlying; +}; + + +/* "apache_beam/runners/common.py":1856 + * NO_VALUE = object() + * + * def __init__(self, value, timestamp=NO_VALUE): # <<<<<<<<<<<<<< + * self.value = value + * self._timestamp = timestamp +*/ +struct __pyx_defaults { + PyObject_HEAD + PyObject *arg0; +}; + + +/* "apache_beam/runners/common.py":427 + * return False + * + * def get_bundle_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts { + PyObject_HEAD + PyObject *__pyx_v_d; + PyObject *__pyx_v_seen; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_sig; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5; + PyObject *__pyx_t_6; + PyObject *__pyx_t_7; +}; + + +/* "apache_beam/runners/common.py":445 + * pass + * + * def get_setup_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts { + PyObject_HEAD + PyObject *__pyx_v_d; + PyObject *__pyx_v_seen; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_sig; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5; + PyObject *__pyx_t_6; + PyObject *__pyx_t_7; +}; + + +/* "apache_beam/runners/common.py":717 + * self.placeholder = placeholder + * + * if all(core.DoFn.ElementParam != arg for arg in default_arg_values): # <<<<<<<<<<<<<< + * # TODO(https://github.com/apache/beam/issues/19631): Handle cases in which + * # len(arg_names) == len(default_arg_values). +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_arg; +}; + + +/* "apache_beam/runners/common.py":796 + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_si; +}; + + +/* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_arg; +}; + + +/* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_arg; +}; + + +/* "apache_beam/runners/common.py":805 + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_arg; +}; + + +/* "apache_beam/runners/common.py":1153 + * self.threadsafe_watermark_estimator) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _try_split( + * fraction, +*/ +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split { + PyObject_HEAD + PyObject *__pyx_v_restriction; + PyObject *__pyx_v_restriction_provider; + PyObject *__pyx_v_stop_window_index; + PyObject *__pyx_v_watermark_estimator_state; + PyObject *__pyx_v_windowed_value; +}; + + + +/* "apache_beam/utils/windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; + + +/* "apache_beam/utils/windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + + +/* "apache_beam/utils/windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":32 + * MAX_BUCKET_SIZE = 59 + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * cdef public int64_t min + * cdef public int64_t max +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + int (*add_input)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + int (*add_input_n)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int64_t, int __pyx_skip_dispatch); + int64_t (*_fast_calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t); + void (*translate_to_histogram)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int (*add_inputs_for_test)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int64_t (*calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + PyObject *(*extract_output)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + + +/* "apache_beam/runners/common.py":115 + * + * + * class Receiver(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver { + PyObject *(*receive)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); + PyObject *(*receive_batch)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch); + PyObject *(*flush)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver; + + +/* "apache_beam/runners/common.py":464 + * + * + * class DoFnInvoker(object): # <<<<<<<<<<<<<< + * """An abstraction that can be used to execute DoFn methods. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker { + PyObject *(*invoke_process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args); + PyObject *(*invoke_start_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch); + PyObject *(*invoke_finish_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch); + PyObject *(*invoke_split)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*invoke_initial_restriction)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*invoke_create_tracker)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker; + + +/* "apache_beam/runners/common.py":664 + * + * + * class SimpleInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * """An invoker that processes elements ignoring windowing information.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker; + + +/* "apache_beam/runners/common.py":777 + * + * + * class PerWindowInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * """An invoker that processes elements considering windowing information.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker; + + +/* "apache_beam/runners/common.py":1399 + * + * + * class DoFnRunner: # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner { + PyObject *(*process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner; + + +/* "apache_beam/runners/common.py":1612 + * + * + * class OutputHandler(object): # <<<<<<<<<<<<<< + * def handle_process_outputs( + * self, windowed_input_element, results, watermark_estimator=None): +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler { + PyObject *(*handle_process_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args); + PyObject *(*handle_process_batch_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler; + + +/* "apache_beam/runners/common.py":1624 + * + * + * class _OutputHandler(OutputHandler): # <<<<<<<<<<<<<< + * """Processes output produced by DoFn method invocations.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*_maybe_propagate_windowing_info)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); + PyObject *(*_handle_tagged_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); + PyObject *(*_write_value_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); + PyObject *(*_write_batch_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *); + PyObject *(*_verify_batch_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler; +static CYTHON_INLINE struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *); +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); + + +/* "apache_beam/runners/common.py":1888 + * + * # TODO(robertwb): Replace core.DoFnContext with this. + * class DoFnContext(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, label, element=None, state=None): +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext { + PyObject *(*set_element)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext; + + +/* "apache_beam/runners/common.pxd":182 + * + * + * cdef class _ReceiverAdapter(Receiver): # <<<<<<<<<<<<<< + * cdef object underlying +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter *__pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* pyfrozenset_new.proto (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* PySetContains.proto */ +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); + +/* GetException.proto (used by pep479) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* SliceTupleAndList.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* IterNextPlain.proto (used by IterNext) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* IterNext.proto */ +#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); + +/* PyStopIteration_Check.proto */ +#define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration) + +/* PyDictContains.proto */ +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* ListExtend.proto */ +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00a2 + return PyList_Extend(L, v); +#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* pyint_simplify.proto */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* PyRuntimeError_Check.proto */ +#define __Pyx_PyExc_RuntimeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeError) + +/* PyAttributeError_Check.proto */ +#define __Pyx_PyExc_AttributeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AttributeError) + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallNextTpTraverse.proto */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/* CallNextTpClear.proto */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_receive(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_start_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_finish_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_restriction, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_initial_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_create_tracker(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_restriction, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_10DoFnRunner_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, CYTHON_UNUSED PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_element, CYTHON_UNUSED PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_batch, PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs *__pyx_optional_args); /* proto*/ +static CYTHON_INLINE struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_result); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_result); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_tag, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_watermark_estimator); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_tag, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, PyObject *__pyx_v_watermark_estimator); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_result); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnContext_set_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "apache_beam.utils.windowed_value" */ +static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp) +static PyObject **__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO (*__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO) + +/* Module declarations from "apache_beam.transforms.cy_dataflow_distribution_counter" */ + +/* Module declarations from "apache_beam.runners.common" */ +static PyTypeObject *__pyx_v_11apache_beam_7runners_6common_TaggedOutput = 0; +static PyTypeObject *__pyx_v_11apache_beam_7runners_6common_TimestampedValue = 0; +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_Receiver__set_state(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_MethodWrapper__set_state(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnSignature__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_SimpleInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_PerWindowInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnRunner__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_OutputHandler__set_state(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle__OutputHandler__set_state(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnContext__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.runners.common" +extern int __pyx_module_is_main_apache_beam__runners__common; +int __pyx_module_is_main_apache_beam__runners__common = 0; + +/* Implementation of "apache_beam.runners.common" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_property; +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_round; +/* #### Code section: string_decls ### */ +static const char __pyx_k__3[] = ""; +static const char __pyx_k_label_state_windowed_value[] = "label, state, windowed_value"; +static const char __pyx_k_args_defaults_dynamic_timer_tag[] = "args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name"; +static const char __pyx_k_bundle_context_values__setup_co[] = "_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context"; +static const char __pyx_k_is_stateful_dofn_batching_confi[] = "_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods"; +static const char __pyx_k_process_batch_yields_elements_2[] = "_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn"; +static const char __pyx_k_Worker_operations_executor_For_i[] = "Worker operations executor.\n\nFor internal use only; no backwards-compatibility guarantees.\n"; +static const char __pyx_k_bundle_finalizer_param_context_d[] = "bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id"; +static const char __pyx_k_bundle_context_values__setup_co_2[] = "_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context"; +static const char __pyx_k_bundle_context_values__setup_co_3[] = "_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_8metrics_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_10logging_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_receive(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_2receive_batch(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_4flush(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper___init__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_obj_to_invoke, PyObject *__pyx_v_method_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_2invoke_timer_callback(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_supports_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_2supports_elements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_4requires_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_do_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_2get_restriction_provider(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_4get_watermark_estimator_provider(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_6is_unbounded_per_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_8_validate(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_10_check_duplicate_dofn_params(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14_validate_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_method_wrapper); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_18_validate_stateful_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20is_splittable_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_24is_stateful_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26has_timers(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_28has_bundle_finalization(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_30get_bundle_contexts(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33get_setup_contexts(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_36__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_38__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker(PyObject *__pyx_v_signature, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_context, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs, PyObject *__pyx_v_process_invocation, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_bundle_finalizer_param); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_4invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_windowed_batch, CYTHON_UNUSED PyObject *__pyx_v_additional_args, CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_10invoke_start_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_12invoke_finish_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_16invoke_user_timer(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_timer_spec, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_18invoke_create_watermark_estimator(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_estimator_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_20invoke_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_restriction); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22invoke_initial_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_24invoke_create_tracker(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_restriction); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_26__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_28__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_2invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_4invoke_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_batch, CYTHON_UNUSED PyObject *__pyx_v_restriction, CYTHON_UNUSED PyObject *__pyx_v_watermark_estimator_state, CYTHON_UNUSED PyObject *__pyx_v_additional_args, CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_placeholder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common__get_arg_placeholders(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___6genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___9genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature, PyObject *__pyx_v_context, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_bundle_finalizer_param); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_2invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_4invoke_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_batch, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_6_should_process_window_for_sdf(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_additional_kwargs, PyObject *__pyx_v_window_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8_invoke_process_per_window(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_invoke_process_batch_per_window(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(PyObject *__pyx_self, PyObject *__pyx_v_to_index, PyObject *__pyx_v_from_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split(PyObject *__pyx_v_fraction, PyObject *__pyx_v_window_index, PyObject *__pyx_v_stop_window_index, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_restriction_provider, PyObject *__pyx_v_restriction_tracker, PyObject *__pyx_v_watermark_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_14try_split(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_fraction); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_16_scale_progress(PyObject *__pyx_v_progress, PyObject *__pyx_v_window_index, PyObject *__pyx_v_stop_window_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_18current_element_progress(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_20__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_22__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_windowing, PyObject *__pyx_v_tagged_receivers, PyObject *__pyx_v_step_name, CYTHON_UNUSED PyObject *__pyx_v_logging_context, PyObject *__pyx_v_state, CYTHON_UNUSED PyObject *__pyx_v_scoped_metrics_container, PyObject *__pyx_v_operation_name, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_user_state_context); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_2process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_4_maybe_sample_exception(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_exc_info, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_6process_batch(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_8process_with_sized_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_10try_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_fraction); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_12current_element_progress(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_14process_user_timer(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_timer_spec, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_16_invoke_bundle_method(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_bundle_method); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_18_invoke_lifecycle_method(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_lifecycle_method); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_20setup(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22start(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_24finish(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_26teardown(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_28finalize(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_30_reraise_augmented(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_exn, PyObject *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_32__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_34__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_2handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler___init__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_window_fn, PyObject *__pyx_v_main_receivers, PyObject *__pyx_v_tagged_receivers, PyObject *__pyx_v_per_element_output_counter, PyObject *__pyx_v_output_batch_converter, PyObject *__pyx_v_process_yields_batches, PyObject *__pyx_v_process_batch_yields_elements); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_2handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_4handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_batch, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_results); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_results); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext_2timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext_4existing_windows(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_9DoFnState___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_9DoFnState_2counter_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aggregator); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnContext___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_element, PyObject *__pyx_v_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_2set_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7element___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_9timestamp___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7windows___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_2__pyx_unpickle_Receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_4__pyx_unpickle_MethodWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_6__pyx_unpickle_DoFnSignature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8__pyx_unpickle_DoFnInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10__pyx_unpickle_SimpleInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_12__pyx_unpickle_PerWindowInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14__pyx_unpickle_DoFnRunner(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16__pyx_unpickle_OutputHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18__pyx_unpickle__OutputHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6common_20__pyx_unpickle_DoFnContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_Receiver(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_MethodWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnSignature(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_SimpleInvoker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_PerWindowInvoker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnRunner(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_OutputHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common__OutputHandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common__ReceiverAdapter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + PyObject *__pyx_type_11apache_beam_7runners_6common_Receiver; + PyObject *__pyx_type_11apache_beam_7runners_6common_MethodWrapper; + PyObject *__pyx_type_11apache_beam_7runners_6common_DoFnSignature; + PyObject *__pyx_type_11apache_beam_7runners_6common_DoFnInvoker; + PyObject *__pyx_type_11apache_beam_7runners_6common_SimpleInvoker; + PyObject *__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker; + PyObject *__pyx_type_11apache_beam_7runners_6common_DoFnRunner; + PyObject *__pyx_type_11apache_beam_7runners_6common_OutputHandler; + PyObject *__pyx_type_11apache_beam_7runners_6common__OutputHandler; + PyObject *__pyx_type_11apache_beam_7runners_6common_DoFnContext; + PyObject *__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_defaults; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr; + PyObject *__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_Receiver; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_OutputHandler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__OutputHandler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnContext; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_slice[1]; + PyObject *__pyx_tuple[11]; + PyObject *__pyx_codeobj_tab[117]; + PyObject *__pyx_string_tab[701]; + PyObject *__pyx_number_tab[13]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split[8]; +int __pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_An_uninspectable_WindowFn_Assign __pyx_string_tab[1] +#define __pyx_kp_u_DoFn_2 __pyx_string_tab[2] +#define __pyx_kp_u_DoFn_is_splittable_but_DoFn_does __pyx_string_tab[3] +#define __pyx_kp_u_DoFn_process_method_only_paramet __pyx_string_tab[4] +#define __pyx_kp_u_Expected_size_0_but_received_s __pyx_string_tab[5] +#define __pyx_kp_u_Finish_Bundle_should_only_output __pyx_string_tab[6] +#define __pyx_kp_u_For_internal_use_only_no_backwar __pyx_string_tab[7] +#define __pyx_kp_u_Holds_the_name_information_for_a __pyx_string_tab[8] +#define __pyx_kp_u_In __pyx_string_tab[9] +#define __pyx_kp_u_Input_value_to_a_stateful_DoFn_o __pyx_string_tab[10] +#define __pyx_kp_u_Must_provide_context_when_not_us __pyx_string_tab[11] +#define __pyx_kp_u_NameContext_s __pyx_string_tab[12] +#define __pyx_kp_u_No_existing_windows_in_this_cont __pyx_string_tab[13] +#define __pyx_kp_u_No_timestamp_in_this_context __pyx_string_tab[14] +#define __pyx_kp_u_None __pyx_string_tab[15] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[16] +#define __pyx_kp_u_Optional_Dict_str_any __pyx_string_tab[17] +#define __pyx_kp_u_Optional_List_Any __pyx_string_tab[18] +#define __pyx_kp_u_Optional_WindowedValue __pyx_string_tab[19] +#define __pyx_kp_u_Per_key_DoFn_params_are_not_yet __pyx_string_tab[20] +#define __pyx_kp_u_Received __pyx_string_tab[21] +#define __pyx_kp_u_Requested_execution_of_a_statefu __pyx_string_tab[22] +#define __pyx_kp_u_Start_Bundle_should_not_output_a __pyx_string_tab[23] +#define __pyx_kp_u_Value_for_sideinput_s_not_provid __pyx_string_tab[24] +#define __pyx_kp_u__2 __pyx_string_tab[25] +#define __pyx_kp_u__3 __pyx_string_tab[26] +#define __pyx_kp_u__4 __pyx_string_tab[27] +#define __pyx_kp_u_add_note __pyx_string_tab[28] +#define __pyx_kp_u_apache_beam_runners_common_py __pyx_string_tab[29] +#define __pyx_kp_u_cannot_be_used_in __pyx_string_tab[30] +#define __pyx_kp_u_disable __pyx_string_tab[31] +#define __pyx_kp_u_element_not_accessible_in_this_c __pyx_string_tab[32] +#define __pyx_kp_u_enable __pyx_string_tab[33] +#define __pyx_kp_u_from_DoFn_that_was_expected_to __pyx_string_tab[34] +#define __pyx_kp_u_gc __pyx_string_tab[35] +#define __pyx_kp_u_has_duplicate __pyx_string_tab[36] +#define __pyx_kp_u_has_unsupported_per_key_DoFn_pa __pyx_string_tab[37] +#define __pyx_kp_u_has_unsupported_process_batch_m __pyx_string_tab[38] +#define __pyx_kp_u_https_github_com_apache_beam_iss __pyx_string_tab[39] +#define __pyx_kp_u_is_not_a_string __pyx_string_tab[40] +#define __pyx_kp_u_isenabled __pyx_string_tab[41] +#define __pyx_kp_u_method_parameters __pyx_string_tab[42] +#define __pyx_kp_u_obj_to_invoke_has_to_be_either __pyx_string_tab[43] +#define __pyx_kp_u_per_element_output_count __pyx_string_tab[44] +#define __pyx_kp_u_stringsource __pyx_string_tab[45] +#define __pyx_kp_u_tag_2 __pyx_string_tab[46] +#define __pyx_kp_u_timestamp_not_accessible_in_this __pyx_string_tab[47] +#define __pyx_kp_u_type_but_got_s __pyx_string_tab[48] +#define __pyx_kp_u_uses_unsupported_DoFn_param_Ele __pyx_string_tab[49] +#define __pyx_kp_u_while_running_s __pyx_string_tab[50] +#define __pyx_kp_u_windows_not_accessible_in_this_c __pyx_string_tab[51] +#define __pyx_n_u_Any __pyx_string_tab[52] +#define __pyx_n_u_ArgPlaceholder __pyx_string_tab[53] +#define __pyx_n_u_AssignContext __pyx_string_tab[54] +#define __pyx_n_u_BATCH_FORBIDDEN __pyx_string_tab[55] +#define __pyx_n_u_BATCH_REQUIRED __pyx_string_tab[56] +#define __pyx_n_u_BatchConverter __pyx_string_tab[57] +#define __pyx_n_u_BatchingPreference __pyx_string_tab[58] +#define __pyx_n_u_BatchingPreference_requires_batc __pyx_string_tab[59] +#define __pyx_n_u_BatchingPreference_supports_batc __pyx_string_tab[60] +#define __pyx_n_u_BatchingPreference_supports_elem __pyx_string_tab[61] +#define __pyx_n_u_BundleContextParam __pyx_string_tab[62] +#define __pyx_n_u_BundleFinalizerParam __pyx_string_tab[63] +#define __pyx_n_u_BytesCoder __pyx_string_tab[64] +#define __pyx_n_u_Counter __pyx_string_tab[65] +#define __pyx_n_u_CounterName __pyx_string_tab[66] +#define __pyx_n_u_DATAFLOW_DISTRIBUTION __pyx_string_tab[67] +#define __pyx_n_u_DO_NOT_CARE __pyx_string_tab[68] +#define __pyx_n_u_Dict __pyx_string_tab[69] +#define __pyx_n_u_DoFn __pyx_string_tab[70] +#define __pyx_n_u_DoFnContext __pyx_string_tab[71] +#define __pyx_n_u_DoFnContext___reduce_cython __pyx_string_tab[72] +#define __pyx_n_u_DoFnContext___setstate_cython __pyx_string_tab[73] +#define __pyx_n_u_DoFnContext_set_element __pyx_string_tab[74] +#define __pyx_n_u_DoFnInvoker __pyx_string_tab[75] +#define __pyx_n_u_DoFnInvoker___reduce_cython __pyx_string_tab[76] +#define __pyx_n_u_DoFnInvoker___setstate_cython __pyx_string_tab[77] +#define __pyx_n_u_DoFnInvoker_create_invoker __pyx_string_tab[78] +#define __pyx_n_u_DoFnInvoker_invoke_create_tracke __pyx_string_tab[79] +#define __pyx_n_u_DoFnInvoker_invoke_create_waterm __pyx_string_tab[80] +#define __pyx_n_u_DoFnInvoker_invoke_finish_bundle __pyx_string_tab[81] +#define __pyx_n_u_DoFnInvoker_invoke_initial_restr __pyx_string_tab[82] +#define __pyx_n_u_DoFnInvoker_invoke_process __pyx_string_tab[83] +#define __pyx_n_u_DoFnInvoker_invoke_process_batch __pyx_string_tab[84] +#define __pyx_n_u_DoFnInvoker_invoke_setup __pyx_string_tab[85] +#define __pyx_n_u_DoFnInvoker_invoke_split __pyx_string_tab[86] +#define __pyx_n_u_DoFnInvoker_invoke_start_bundle __pyx_string_tab[87] +#define __pyx_n_u_DoFnInvoker_invoke_teardown __pyx_string_tab[88] +#define __pyx_n_u_DoFnInvoker_invoke_user_timer __pyx_string_tab[89] +#define __pyx_n_u_DoFnParam __pyx_string_tab[90] +#define __pyx_n_u_DoFnProcessParams __pyx_string_tab[91] +#define __pyx_n_u_DoFnRunner __pyx_string_tab[92] +#define __pyx_n_u_DoFnRunner___reduce_cython __pyx_string_tab[93] +#define __pyx_n_u_DoFnRunner___setstate_cython __pyx_string_tab[94] +#define __pyx_n_u_DoFnRunner__invoke_bundle_method __pyx_string_tab[95] +#define __pyx_n_u_DoFnRunner__invoke_lifecycle_met __pyx_string_tab[96] +#define __pyx_n_u_DoFnRunner__maybe_sample_excepti __pyx_string_tab[97] +#define __pyx_n_u_DoFnRunner__reraise_augmented __pyx_string_tab[98] +#define __pyx_n_u_DoFnRunner_current_element_progr __pyx_string_tab[99] +#define __pyx_n_u_DoFnRunner_finalize __pyx_string_tab[100] +#define __pyx_n_u_DoFnRunner_finish __pyx_string_tab[101] +#define __pyx_n_u_DoFnRunner_process __pyx_string_tab[102] +#define __pyx_n_u_DoFnRunner_process_batch __pyx_string_tab[103] +#define __pyx_n_u_DoFnRunner_process_user_timer __pyx_string_tab[104] +#define __pyx_n_u_DoFnRunner_process_with_sized_re __pyx_string_tab[105] +#define __pyx_n_u_DoFnRunner_setup __pyx_string_tab[106] +#define __pyx_n_u_DoFnRunner_start __pyx_string_tab[107] +#define __pyx_n_u_DoFnRunner_teardown __pyx_string_tab[108] +#define __pyx_n_u_DoFnRunner_try_split __pyx_string_tab[109] +#define __pyx_n_u_DoFnSignature __pyx_string_tab[110] +#define __pyx_n_u_DoFnSignature___reduce_cython __pyx_string_tab[111] +#define __pyx_n_u_DoFnSignature___setstate_cython __pyx_string_tab[112] +#define __pyx_n_u_DoFnSignature__check_duplicate_d __pyx_string_tab[113] +#define __pyx_n_u_DoFnSignature__validate __pyx_string_tab[114] +#define __pyx_n_u_DoFnSignature__validate_bundle_m __pyx_string_tab[115] +#define __pyx_n_u_DoFnSignature__validate_process __pyx_string_tab[116] +#define __pyx_n_u_DoFnSignature__validate_process_2 __pyx_string_tab[117] +#define __pyx_n_u_DoFnSignature__validate_stateful __pyx_string_tab[118] +#define __pyx_n_u_DoFnSignature_get_bundle_context __pyx_string_tab[119] +#define __pyx_n_u_DoFnSignature_get_restriction_co __pyx_string_tab[120] +#define __pyx_n_u_DoFnSignature_get_restriction_pr __pyx_string_tab[121] +#define __pyx_n_u_DoFnSignature_get_setup_contexts __pyx_string_tab[122] +#define __pyx_n_u_DoFnSignature_get_watermark_esti __pyx_string_tab[123] +#define __pyx_n_u_DoFnSignature_has_bundle_finaliz __pyx_string_tab[124] +#define __pyx_n_u_DoFnSignature_has_timers __pyx_string_tab[125] +#define __pyx_n_u_DoFnSignature_is_splittable_dofn __pyx_string_tab[126] +#define __pyx_n_u_DoFnSignature_is_stateful_dofn __pyx_string_tab[127] +#define __pyx_n_u_DoFnSignature_is_unbounded_per_e __pyx_string_tab[128] +#define __pyx_n_u_DoFnState __pyx_string_tab[129] +#define __pyx_n_u_DoFnState___init __pyx_string_tab[130] +#define __pyx_n_u_DoFnState_counter_for __pyx_string_tab[131] +#define __pyx_n_u_DynamicTimerTagParam __pyx_string_tab[132] +#define __pyx_n_u_ENCODED_IMPULSE_VALUE __pyx_string_tab[133] +#define __pyx_n_u_ElementParam __pyx_string_tab[134] +#define __pyx_n_u_Enum __pyx_string_tab[135] +#define __pyx_n_u_ExecutionContext __pyx_string_tab[136] +#define __pyx_n_u_GlobalWindow __pyx_string_tab[137] +#define __pyx_n_u_GlobalWindowCoder __pyx_string_tab[138] +#define __pyx_n_u_GlobalWindows __pyx_string_tab[139] +#define __pyx_n_u_HomogeneousWindowedBatch __pyx_string_tab[140] +#define __pyx_n_u_IMPULSE_VALUE_CODER_IMPL __pyx_string_tab[141] +#define __pyx_n_u_Iterable __pyx_string_tab[142] +#define __pyx_n_u_KeyParam __pyx_string_tab[143] +#define __pyx_n_u_LOGGER __pyx_string_tab[144] +#define __pyx_n_u_List __pyx_string_tab[145] +#define __pyx_n_u_Lock __pyx_string_tab[146] +#define __pyx_n_u_Mapping __pyx_string_tab[147] +#define __pyx_n_u_MethodWrapper __pyx_string_tab[148] +#define __pyx_n_u_MethodWrapper___reduce_cython __pyx_string_tab[149] +#define __pyx_n_u_MethodWrapper___setstate_cython __pyx_string_tab[150] +#define __pyx_n_u_MethodWrapper_invoke_timer_callb __pyx_string_tab[151] +#define __pyx_n_u_NO_VALUE __pyx_string_tab[152] +#define __pyx_n_u_NameContext __pyx_string_tab[153] +#define __pyx_n_u_NameContext___eq __pyx_string_tab[154] +#define __pyx_n_u_NameContext___hash __pyx_string_tab[155] +#define __pyx_n_u_NameContext___init __pyx_string_tab[156] +#define __pyx_n_u_NameContext___repr __pyx_string_tab[157] +#define __pyx_n_u_NameContext_logging_name __pyx_string_tab[158] +#define __pyx_n_u_NameContext_metrics_name __pyx_string_tab[159] +#define __pyx_n_u_NoContext __pyx_string_tab[160] +#define __pyx_n_u_NoContext___init __pyx_string_tab[161] +#define __pyx_n_u_NoContext_existing_windows __pyx_string_tab[162] +#define __pyx_n_u_NoContext_timestamp __pyx_string_tab[163] +#define __pyx_n_u_NoOpWatermarkEstimatorProvider __pyx_string_tab[164] +#define __pyx_n_u_None __pyx_string_tab[165] +#define __pyx_n_u_Optional __pyx_string_tab[166] +#define __pyx_n_u_OutputHandler __pyx_string_tab[167] +#define __pyx_n_u_OutputHandler_2 __pyx_string_tab[168] +#define __pyx_n_u_OutputHandler___reduce_cython __pyx_string_tab[169] +#define __pyx_n_u_OutputHandler___reduce_cython_2 __pyx_string_tab[170] +#define __pyx_n_u_OutputHandler___setstate_cython __pyx_string_tab[171] +#define __pyx_n_u_OutputHandler___setstate_cython_2 __pyx_string_tab[172] +#define __pyx_n_u_OutputHandler_finish_bundle_out __pyx_string_tab[173] +#define __pyx_n_u_OutputHandler_handle_process_ba __pyx_string_tab[174] +#define __pyx_n_u_OutputHandler_handle_process_bat __pyx_string_tab[175] +#define __pyx_n_u_OutputHandler_handle_process_ou __pyx_string_tab[176] +#define __pyx_n_u_OutputHandler_handle_process_out __pyx_string_tab[177] +#define __pyx_n_u_OutputHandler_start_bundle_outp __pyx_string_tab[178] +#define __pyx_n_u_PaneInfoParam __pyx_string_tab[179] +#define __pyx_n_u_PerWindowInvoker __pyx_string_tab[180] +#define __pyx_n_u_PerWindowInvoker___reduce_cython __pyx_string_tab[181] +#define __pyx_n_u_PerWindowInvoker___setstate_cyth __pyx_string_tab[182] +#define __pyx_n_u_PerWindowInvoker__invoke_process __pyx_string_tab[183] +#define __pyx_n_u_PerWindowInvoker__invoke_process_2 __pyx_string_tab[184] +#define __pyx_n_u_PerWindowInvoker__scale_progress __pyx_string_tab[185] +#define __pyx_n_u_PerWindowInvoker__should_process __pyx_string_tab[186] +#define __pyx_n_u_PerWindowInvoker__try_split __pyx_string_tab[187] +#define __pyx_n_u_PerWindowInvoker_current_element __pyx_string_tab[188] +#define __pyx_n_u_PerWindowInvoker_invoke_process __pyx_string_tab[189] +#define __pyx_n_u_PerWindowInvoker_invoke_process_2 __pyx_string_tab[190] +#define __pyx_n_u_PerWindowInvoker_try_split __pyx_string_tab[191] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[192] +#define __pyx_n_u_Receiver __pyx_string_tab[193] +#define __pyx_n_u_ReceiverAdapter __pyx_string_tab[194] +#define __pyx_n_u_Receiver___reduce_cython __pyx_string_tab[195] +#define __pyx_n_u_Receiver___setstate_cython __pyx_string_tab[196] +#define __pyx_n_u_Receiver_flush __pyx_string_tab[197] +#define __pyx_n_u_Receiver_receive __pyx_string_tab[198] +#define __pyx_n_u_Receiver_receive_batch __pyx_string_tab[199] +#define __pyx_n_u_RestrictionParam __pyx_string_tab[200] +#define __pyx_n_u_RestrictionProgress __pyx_string_tab[201] +#define __pyx_n_u_RestrictionProvider __pyx_string_tab[202] +#define __pyx_n_u_RestrictionTracker __pyx_string_tab[203] +#define __pyx_n_u_RestrictionTrackerView __pyx_string_tab[204] +#define __pyx_n_u_RuntimeValueProvider __pyx_string_tab[205] +#define __pyx_n_u_SetupContextParam __pyx_string_tab[206] +#define __pyx_n_u_SideInputParam __pyx_string_tab[207] +#define __pyx_n_u_SimpleInvoker __pyx_string_tab[208] +#define __pyx_n_u_SimpleInvoker___reduce_cython __pyx_string_tab[209] +#define __pyx_n_u_SimpleInvoker___setstate_cython __pyx_string_tab[210] +#define __pyx_n_u_SimpleInvoker_invoke_process __pyx_string_tab[211] +#define __pyx_n_u_SimpleInvoker_invoke_process_bat __pyx_string_tab[212] +#define __pyx_n_u_SplitResultPrimary __pyx_string_tab[213] +#define __pyx_n_u_SplitResultResidual __pyx_string_tab[214] +#define __pyx_n_u_StateParam __pyx_string_tab[215] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[216] +#define __pyx_n_u_TaggedOutput __pyx_string_tab[217] +#define __pyx_n_u_ThreadsafeRestrictionTracker __pyx_string_tab[218] +#define __pyx_n_u_ThreadsafeWatermarkEstimator __pyx_string_tab[219] +#define __pyx_n_u_TimerParam __pyx_string_tab[220] +#define __pyx_n_u_TimerSpec __pyx_string_tab[221] +#define __pyx_n_u_Timestamp __pyx_string_tab[222] +#define __pyx_n_u_TimestampParam __pyx_string_tab[223] +#define __pyx_n_u_TimestampedValue __pyx_string_tab[224] +#define __pyx_n_u_Tuple __pyx_string_tab[225] +#define __pyx_n_u_TupleCoder __pyx_string_tab[226] +#define __pyx_n_u_WatermarkEstimator __pyx_string_tab[227] +#define __pyx_n_u_WatermarkEstimatorParam __pyx_string_tab[228] +#define __pyx_n_u_WatermarkEstimatorProvider __pyx_string_tab[229] +#define __pyx_n_u_WindowFn __pyx_string_tab[230] +#define __pyx_n_u_WindowParam __pyx_string_tab[231] +#define __pyx_n_u_WindowedBatch __pyx_string_tab[232] +#define __pyx_n_u_WindowedValue __pyx_string_tab[233] +#define __pyx_n_u_WindowedValueCoder __pyx_string_tab[234] +#define __pyx_n_u_WindowedValueParam __pyx_string_tab[235] +#define __pyx_n_u__10 __pyx_string_tab[236] +#define __pyx_n_u_a_2 __pyx_string_tab[237] +#define __pyx_n_u_accumulator __pyx_string_tab[238] +#define __pyx_n_u_additional_args __pyx_string_tab[239] +#define __pyx_n_u_additional_kwargs __pyx_string_tab[240] +#define __pyx_n_u_aggregator __pyx_string_tab[241] +#define __pyx_n_u_all_timer_specs __pyx_string_tab[242] +#define __pyx_n_u_apache_beam_coders __pyx_string_tab[243] +#define __pyx_n_u_apache_beam_internal __pyx_string_tab[244] +#define __pyx_n_u_apache_beam_io_iobase __pyx_string_tab[245] +#define __pyx_n_u_apache_beam_iobase __pyx_string_tab[246] +#define __pyx_n_u_apache_beam_options_value_provid __pyx_string_tab[247] +#define __pyx_n_u_apache_beam_pvalue __pyx_string_tab[248] +#define __pyx_n_u_apache_beam_runners_common __pyx_string_tab[249] +#define __pyx_n_u_apache_beam_runners_sdf_utils __pyx_string_tab[250] +#define __pyx_n_u_apache_beam_runners_worker_bundl __pyx_string_tab[251] +#define __pyx_n_u_apache_beam_transforms __pyx_string_tab[252] +#define __pyx_n_u_apache_beam_transforms_core __pyx_string_tab[253] +#define __pyx_n_u_apache_beam_transforms_window __pyx_string_tab[254] +#define __pyx_n_u_apache_beam_typehints_batch __pyx_string_tab[255] +#define __pyx_n_u_apache_beam_utils_counters __pyx_string_tab[256] +#define __pyx_n_u_apache_beam_utils_timestamp __pyx_string_tab[257] +#define __pyx_n_u_apache_beam_utils_windowed_value __pyx_string_tab[258] +#define __pyx_n_u_arg __pyx_string_tab[259] +#define __pyx_n_u_arg_names __pyx_string_tab[260] +#define __pyx_n_u_args __pyx_string_tab[261] +#define __pyx_n_u_args_for_process __pyx_string_tab[262] +#define __pyx_n_u_args_for_process_batch __pyx_string_tab[263] +#define __pyx_n_u_args_to_pick __pyx_string_tab[264] +#define __pyx_n_u_args_with_placeholders __pyx_string_tab[265] +#define __pyx_n_u_as_empty_windowed_value __pyx_string_tab[266] +#define __pyx_n_u_assign __pyx_string_tab[267] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[268] +#define __pyx_n_u_attached_callback __pyx_string_tab[269] +#define __pyx_n_u_batch __pyx_string_tab[270] +#define __pyx_n_u_beam_yields_batches __pyx_string_tab[271] +#define __pyx_n_u_beam_yields_elements __pyx_string_tab[272] +#define __pyx_n_u_bool __pyx_string_tab[273] +#define __pyx_n_u_bundle_finalizer_param __pyx_string_tab[274] +#define __pyx_n_u_bundle_method __pyx_string_tab[275] +#define __pyx_n_u_c __pyx_string_tab[276] +#define __pyx_n_u_check_done __pyx_string_tab[277] +#define __pyx_n_u_check_duplicate_dofn_params __pyx_string_tab[278] +#define __pyx_n_u_class_getitem __pyx_string_tab[279] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[280] +#define __pyx_n_u_close __pyx_string_tab[281] +#define __pyx_n_u_coders __pyx_string_tab[282] +#define __pyx_n_u_completed __pyx_string_tab[283] +#define __pyx_n_u_completed_work __pyx_string_tab[284] +#define __pyx_n_u_compute_whole_window_split __pyx_string_tab[285] +#define __pyx_n_u_context __pyx_string_tab[286] +#define __pyx_n_u_core __pyx_string_tab[287] +#define __pyx_n_u_counter_factory __pyx_string_tab[288] +#define __pyx_n_u_counter_factory_2 __pyx_string_tab[289] +#define __pyx_n_u_counter_for __pyx_string_tab[290] +#define __pyx_n_u_create_and_enter __pyx_string_tab[291] +#define __pyx_n_u_create_invoker __pyx_string_tab[292] +#define __pyx_n_u_create_tracker __pyx_string_tab[293] +#define __pyx_n_u_create_watermark_estimator __pyx_string_tab[294] +#define __pyx_n_u_current_element_progress __pyx_string_tab[295] +#define __pyx_n_u_current_estimator_state __pyx_string_tab[296] +#define __pyx_n_u_current_progress __pyx_string_tab[297] +#define __pyx_n_u_current_watermark __pyx_string_tab[298] +#define __pyx_n_u_current_window_index __pyx_string_tab[299] +#define __pyx_n_u_d __pyx_string_tab[300] +#define __pyx_n_u_default_arg_values __pyx_string_tab[301] +#define __pyx_n_u_defaults __pyx_string_tab[302] +#define __pyx_n_u_deferred_restriction __pyx_string_tab[303] +#define __pyx_n_u_deferred_status __pyx_string_tab[304] +#define __pyx_n_u_deferred_timestamp __pyx_string_tab[305] +#define __pyx_n_u_dict __pyx_string_tab[306] +#define __pyx_n_u_dict_2 __pyx_string_tab[307] +#define __pyx_n_u_disable_global_windowed_args_cac __pyx_string_tab[308] +#define __pyx_n_u_do_fn __pyx_string_tab[309] +#define __pyx_n_u_doc __pyx_string_tab[310] +#define __pyx_n_u_dynamic_timer_tag __pyx_string_tab[311] +#define __pyx_n_u_element __pyx_string_tab[312] +#define __pyx_n_u_encode_nested __pyx_string_tab[313] +#define __pyx_n_u_enter __pyx_string_tab[314] +#define __pyx_n_u_enum __pyx_string_tab[315] +#define __pyx_n_u_enumerate __pyx_string_tab[316] +#define __pyx_n_u_eq __pyx_string_tab[317] +#define __pyx_n_u_estimator_state __pyx_string_tab[318] +#define __pyx_n_u_estimator_state_coder __pyx_string_tab[319] +#define __pyx_n_u_exc_info __pyx_string_tab[320] +#define __pyx_n_u_exception __pyx_string_tab[321] +#define __pyx_n_u_existing_windows __pyx_string_tab[322] +#define __pyx_n_u_exit __pyx_string_tab[323] +#define __pyx_n_u_exn __pyx_string_tab[324] +#define __pyx_n_u_experiments __pyx_string_tab[325] +#define __pyx_n_u_finalize __pyx_string_tab[326] +#define __pyx_n_u_finalize_bundle __pyx_string_tab[327] +#define __pyx_n_u_finish __pyx_string_tab[328] +#define __pyx_n_u_finish_bundle __pyx_string_tab[329] +#define __pyx_n_u_finish_bundle_outputs __pyx_string_tab[330] +#define __pyx_n_u_flush __pyx_string_tab[331] +#define __pyx_n_u_fn __pyx_string_tab[332] +#define __pyx_n_u_format_exception_only __pyx_string_tab[333] +#define __pyx_n_u_fraction __pyx_string_tab[334] +#define __pyx_n_u_fraction_of_remainder __pyx_string_tab[335] +#define __pyx_n_u_from_batch_and_windowed_value __pyx_string_tab[336] +#define __pyx_n_u_from_index __pyx_string_tab[337] +#define __pyx_n_u_func __pyx_string_tab[338] +#define __pyx_n_u_genexpr __pyx_string_tab[339] +#define __pyx_n_u_getLogger __pyx_string_tab[340] +#define __pyx_n_u_get_aggregator_counter __pyx_string_tab[341] +#define __pyx_n_u_get_arg_placeholders __pyx_string_tab[342] +#define __pyx_n_u_get_arg_placeholders_locals_Arg __pyx_string_tab[343] +#define __pyx_n_u_get_arg_placeholders_locals_Arg_2 __pyx_string_tab[344] +#define __pyx_n_u_get_arg_placeholders_locals_gen __pyx_string_tab[345] +#define __pyx_n_u_get_bundle_contexts __pyx_string_tab[346] +#define __pyx_n_u_get_counter __pyx_string_tab[347] +#define __pyx_n_u_get_dofn_specs __pyx_string_tab[348] +#define __pyx_n_u_get_estimator_state __pyx_string_tab[349] +#define __pyx_n_u_get_function_arguments __pyx_string_tab[350] +#define __pyx_n_u_get_impl __pyx_string_tab[351] +#define __pyx_n_u_get_length __pyx_string_tab[352] +#define __pyx_n_u_get_restriction_coder __pyx_string_tab[353] +#define __pyx_n_u_get_restriction_provider __pyx_string_tab[354] +#define __pyx_n_u_get_setup_contexts __pyx_string_tab[355] +#define __pyx_n_u_get_state __pyx_string_tab[356] +#define __pyx_n_u_get_timer __pyx_string_tab[357] +#define __pyx_n_u_get_watermark_estimator_provider __pyx_string_tab[358] +#define __pyx_n_u_getstate __pyx_string_tab[359] +#define __pyx_n_u_handle_process_batch_outputs __pyx_string_tab[360] +#define __pyx_n_u_handle_process_outputs __pyx_string_tab[361] +#define __pyx_n_u_has_bundle_finalization __pyx_string_tab[362] +#define __pyx_n_u_has_timers __pyx_string_tab[363] +#define __pyx_n_u_hash __pyx_string_tab[364] +#define __pyx_n_u_i __pyx_string_tab[365] +#define __pyx_n_u_init __pyx_string_tab[366] +#define __pyx_n_u_init___locals_genexpr __pyx_string_tab[367] +#define __pyx_n_u_initial_restriction __pyx_string_tab[368] +#define __pyx_n_u_input_args __pyx_string_tab[369] +#define __pyx_n_u_input_kwargs __pyx_string_tab[370] +#define __pyx_n_u_insert_values_in_args __pyx_string_tab[371] +#define __pyx_n_u_instruction_id __pyx_string_tab[372] +#define __pyx_n_u_invoke_bundle_method __pyx_string_tab[373] +#define __pyx_n_u_invoke_create_tracker __pyx_string_tab[374] +#define __pyx_n_u_invoke_create_watermark_estimato __pyx_string_tab[375] +#define __pyx_n_u_invoke_finish_bundle __pyx_string_tab[376] +#define __pyx_n_u_invoke_initial_restriction __pyx_string_tab[377] +#define __pyx_n_u_invoke_lifecycle_method __pyx_string_tab[378] +#define __pyx_n_u_invoke_process __pyx_string_tab[379] +#define __pyx_n_u_invoke_process_batch __pyx_string_tab[380] +#define __pyx_n_u_invoke_process_batch_per_window __pyx_string_tab[381] +#define __pyx_n_u_invoke_process_per_window __pyx_string_tab[382] +#define __pyx_n_u_invoke_setup __pyx_string_tab[383] +#define __pyx_n_u_invoke_split __pyx_string_tab[384] +#define __pyx_n_u_invoke_start_bundle __pyx_string_tab[385] +#define __pyx_n_u_invoke_teardown __pyx_string_tab[386] +#define __pyx_n_u_invoke_timer_callback __pyx_string_tab[387] +#define __pyx_n_u_invoke_user_timer __pyx_string_tab[388] +#define __pyx_n_u_is_coroutine __pyx_string_tab[389] +#define __pyx_n_u_is_cythonized __pyx_string_tab[390] +#define __pyx_n_u_is_globally_windowed __pyx_string_tab[391] +#define __pyx_n_u_is_splittable_dofn __pyx_string_tab[392] +#define __pyx_n_u_is_stateful_dofn __pyx_string_tab[393] +#define __pyx_n_u_is_unbounded_per_element __pyx_string_tab[394] +#define __pyx_n_u_items __pyx_string_tab[395] +#define __pyx_n_u_key __pyx_string_tab[396] +#define __pyx_n_u_kw __pyx_string_tab[397] +#define __pyx_n_u_kwargs __pyx_string_tab[398] +#define __pyx_n_u_kwargs_for_process __pyx_string_tab[399] +#define __pyx_n_u_kwargs_for_process_batch __pyx_string_tab[400] +#define __pyx_n_u_label __pyx_string_tab[401] +#define __pyx_n_u_lifecycle_method __pyx_string_tab[402] +#define __pyx_n_u_logging __pyx_string_tab[403] +#define __pyx_n_u_logging_context __pyx_string_tab[404] +#define __pyx_n_u_logging_name __pyx_string_tab[405] +#define __pyx_n_u_main __pyx_string_tab[406] +#define __pyx_n_u_main_receivers __pyx_string_tab[407] +#define __pyx_n_u_maybe_sample_exception __pyx_string_tab[408] +#define __pyx_n_u_metaclass __pyx_string_tab[409] +#define __pyx_n_u_method __pyx_string_tab[410] +#define __pyx_n_u_method_name __pyx_string_tab[411] +#define __pyx_n_u_method_value __pyx_string_tab[412] +#define __pyx_n_u_method_wrapper __pyx_string_tab[413] +#define __pyx_n_u_metrics_name __pyx_string_tab[414] +#define __pyx_n_u_module __pyx_string_tab[415] +#define __pyx_n_u_mro_entries __pyx_string_tab[416] +#define __pyx_n_u_name __pyx_string_tab[417] +#define __pyx_n_u_new __pyx_string_tab[418] +#define __pyx_n_u_new_exn __pyx_string_tab[419] +#define __pyx_n_u_new_stop_window_index __pyx_string_tab[420] +#define __pyx_n_u_next __pyx_string_tab[421] +#define __pyx_n_u_obj_to_invoke __pyx_string_tab[422] +#define __pyx_n_u_object __pyx_string_tab[423] +#define __pyx_n_u_observe_timestamp __pyx_string_tab[424] +#define __pyx_n_u_of __pyx_string_tab[425] +#define __pyx_n_u_operation_name __pyx_string_tab[426] +#define __pyx_n_u_other __pyx_string_tab[427] +#define __pyx_n_u_output_batch_converter __pyx_string_tab[428] +#define __pyx_n_u_output_handler __pyx_string_tab[429] +#define __pyx_n_u_output_sampler __pyx_string_tab[430] +#define __pyx_n_u_outputs_per_element_counter __pyx_string_tab[431] +#define __pyx_n_u_p __pyx_string_tab[432] +#define __pyx_n_u_pane_info __pyx_string_tab[433] +#define __pyx_n_u_param __pyx_string_tab[434] +#define __pyx_n_u_param_id __pyx_string_tab[435] +#define __pyx_n_u_param_ids __pyx_string_tab[436] +#define __pyx_n_u_per_element_output_counter __pyx_string_tab[437] +#define __pyx_n_u_placeholder __pyx_string_tab[438] +#define __pyx_n_u_placeholders __pyx_string_tab[439] +#define __pyx_n_u_pop __pyx_string_tab[440] +#define __pyx_n_u_prepare __pyx_string_tab[441] +#define __pyx_n_u_primaries __pyx_string_tab[442] +#define __pyx_n_u_primary __pyx_string_tab[443] +#define __pyx_n_u_primary_restriction __pyx_string_tab[444] +#define __pyx_n_u_primary_restrictions __pyx_string_tab[445] +#define __pyx_n_u_primary_size __pyx_string_tab[446] +#define __pyx_n_u_primary_split_value __pyx_string_tab[447] +#define __pyx_n_u_primary_value __pyx_string_tab[448] +#define __pyx_n_u_process __pyx_string_tab[449] +#define __pyx_n_u_process_batch __pyx_string_tab[450] +#define __pyx_n_u_process_batch_method __pyx_string_tab[451] +#define __pyx_n_u_process_batch_yields_elements __pyx_string_tab[452] +#define __pyx_n_u_process_invocation __pyx_string_tab[453] +#define __pyx_n_u_process_method __pyx_string_tab[454] +#define __pyx_n_u_process_user_timer __pyx_string_tab[455] +#define __pyx_n_u_process_with_sized_restriction __pyx_string_tab[456] +#define __pyx_n_u_process_yields_batches __pyx_string_tab[457] +#define __pyx_n_u_progress __pyx_string_tab[458] +#define __pyx_n_u_property __pyx_string_tab[459] +#define __pyx_n_u_pyx_capi __pyx_string_tab[460] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[461] +#define __pyx_n_u_pyx_result __pyx_string_tab[462] +#define __pyx_n_u_pyx_state __pyx_string_tab[463] +#define __pyx_n_u_pyx_type __pyx_string_tab[464] +#define __pyx_n_u_pyx_unpickle_DoFnContext __pyx_string_tab[465] +#define __pyx_n_u_pyx_unpickle_DoFnInvoker __pyx_string_tab[466] +#define __pyx_n_u_pyx_unpickle_DoFnRunner __pyx_string_tab[467] +#define __pyx_n_u_pyx_unpickle_DoFnSignature __pyx_string_tab[468] +#define __pyx_n_u_pyx_unpickle_MethodWrapper __pyx_string_tab[469] +#define __pyx_n_u_pyx_unpickle_OutputHandler __pyx_string_tab[470] +#define __pyx_n_u_pyx_unpickle_PerWindowInvoker __pyx_string_tab[471] +#define __pyx_n_u_pyx_unpickle_Receiver __pyx_string_tab[472] +#define __pyx_n_u_pyx_unpickle_SimpleInvoker __pyx_string_tab[473] +#define __pyx_n_u_pyx_unpickle__OutputHandler __pyx_string_tab[474] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[475] +#define __pyx_n_u_qualname __pyx_string_tab[476] +#define __pyx_n_u_receive __pyx_string_tab[477] +#define __pyx_n_u_receive_batch __pyx_string_tab[478] +#define __pyx_n_u_reduce __pyx_string_tab[479] +#define __pyx_n_u_reduce_cython __pyx_string_tab[480] +#define __pyx_n_u_reduce_ex __pyx_string_tab[481] +#define __pyx_n_u_remaining __pyx_string_tab[482] +#define __pyx_n_u_remaining_args_iter __pyx_string_tab[483] +#define __pyx_n_u_remaining_work __pyx_string_tab[484] +#define __pyx_n_u_repr __pyx_string_tab[485] +#define __pyx_n_u_requires_batches __pyx_string_tab[486] +#define __pyx_n_u_reraise_augmented __pyx_string_tab[487] +#define __pyx_n_u_residual __pyx_string_tab[488] +#define __pyx_n_u_residual_restriction __pyx_string_tab[489] +#define __pyx_n_u_residual_restrictions __pyx_string_tab[490] +#define __pyx_n_u_residual_size __pyx_string_tab[491] +#define __pyx_n_u_residual_split_value __pyx_string_tab[492] +#define __pyx_n_u_residual_value __pyx_string_tab[493] +#define __pyx_n_u_residuals __pyx_string_tab[494] +#define __pyx_n_u_restriction __pyx_string_tab[495] +#define __pyx_n_u_restriction_coder __pyx_string_tab[496] +#define __pyx_n_u_restriction_provider __pyx_string_tab[497] +#define __pyx_n_u_restriction_size __pyx_string_tab[498] +#define __pyx_n_u_restriction_tracker __pyx_string_tab[499] +#define __pyx_n_u_restriction_tracker_param __pyx_string_tab[500] +#define __pyx_n_u_result __pyx_string_tab[501] +#define __pyx_n_u_results __pyx_string_tab[502] +#define __pyx_n_u_return __pyx_string_tab[503] +#define __pyx_n_u_round __pyx_string_tab[504] +#define __pyx_n_u_sample_exception __pyx_string_tab[505] +#define __pyx_n_u_scale_progress __pyx_string_tab[506] +#define __pyx_n_u_scaled_progress __pyx_string_tab[507] +#define __pyx_n_u_scoped_metrics_container __pyx_string_tab[508] +#define __pyx_n_u_seen __pyx_string_tab[509] +#define __pyx_n_u_self __pyx_string_tab[510] +#define __pyx_n_u_send __pyx_string_tab[511] +#define __pyx_n_u_set_element __pyx_string_tab[512] +#define __pyx_n_u_set_name __pyx_string_tab[513] +#define __pyx_n_u_setdefault __pyx_string_tab[514] +#define __pyx_n_u_setstate __pyx_string_tab[515] +#define __pyx_n_u_setstate_cython __pyx_string_tab[516] +#define __pyx_n_u_setup __pyx_string_tab[517] +#define __pyx_n_u_should_process_window_for_sdf __pyx_string_tab[518] +#define __pyx_n_u_si __pyx_string_tab[519] +#define __pyx_n_u_side_inputs __pyx_string_tab[520] +#define __pyx_n_u_sideinputs __pyx_string_tab[521] +#define __pyx_n_u_sig __pyx_string_tab[522] +#define __pyx_n_u_signature __pyx_string_tab[523] +#define __pyx_n_u_size __pyx_string_tab[524] +#define __pyx_n_u_split __pyx_string_tab[525] +#define __pyx_n_u_start __pyx_string_tab[526] +#define __pyx_n_u_start_bundle __pyx_string_tab[527] +#define __pyx_n_u_start_bundle_outputs __pyx_string_tab[528] +#define __pyx_n_u_state __pyx_string_tab[529] +#define __pyx_n_u_state_spec __pyx_string_tab[530] +#define __pyx_n_u_staticmethod __pyx_string_tab[531] +#define __pyx_n_u_step_annotation __pyx_string_tab[532] +#define __pyx_n_u_step_name __pyx_string_tab[533] +#define __pyx_n_u_stop_window_index __pyx_string_tab[534] +#define __pyx_n_u_strip __pyx_string_tab[535] +#define __pyx_n_u_super __pyx_string_tab[536] +#define __pyx_n_u_supports_batches __pyx_string_tab[537] +#define __pyx_n_u_supports_elements __pyx_string_tab[538] +#define __pyx_n_u_sys __pyx_string_tab[539] +#define __pyx_n_u_tag __pyx_string_tab[540] +#define __pyx_n_u_tagged_receivers __pyx_string_tab[541] +#define __pyx_n_u_tagged_with_step __pyx_string_tab[542] +#define __pyx_n_u_tb __pyx_string_tab[543] +#define __pyx_n_u_teardown __pyx_string_tab[544] +#define __pyx_n_u_test __pyx_string_tab[545] +#define __pyx_n_u_threading __pyx_string_tab[546] +#define __pyx_n_u_threadsafe_restriction_tracker __pyx_string_tab[547] +#define __pyx_n_u_throw __pyx_string_tab[548] +#define __pyx_n_u_timer_spec __pyx_string_tab[549] +#define __pyx_n_u_timestamp __pyx_string_tab[550] +#define __pyx_n_u_timestamp_2 __pyx_string_tab[551] +#define __pyx_n_u_timestamps __pyx_string_tab[552] +#define __pyx_n_u_to_index __pyx_string_tab[553] +#define __pyx_n_u_total_work __pyx_string_tab[554] +#define __pyx_n_u_traceback __pyx_string_tab[555] +#define __pyx_n_u_transform_id __pyx_string_tab[556] +#define __pyx_n_u_try_split __pyx_string_tab[557] +#define __pyx_n_u_try_split_2 __pyx_string_tab[558] +#define __pyx_n_u_try_split_locals_compute_whole __pyx_string_tab[559] +#define __pyx_n_u_typing __pyx_string_tab[560] +#define __pyx_n_u_unbounded_per_element __pyx_string_tab[561] +#define __pyx_n_u_unused_value __pyx_string_tab[562] +#define __pyx_n_u_update __pyx_string_tab[563] +#define __pyx_n_u_use_per_window_invoker __pyx_string_tab[564] +#define __pyx_n_u_use_setstate __pyx_string_tab[565] +#define __pyx_n_u_user_state_context __pyx_string_tab[566] +#define __pyx_n_u_userstate __pyx_string_tab[567] +#define __pyx_n_u_util __pyx_string_tab[568] +#define __pyx_n_u_validate __pyx_string_tab[569] +#define __pyx_n_u_validate_bundle_method __pyx_string_tab[570] +#define __pyx_n_u_validate_process __pyx_string_tab[571] +#define __pyx_n_u_validate_process_batch __pyx_string_tab[572] +#define __pyx_n_u_validate_stateful_dofn __pyx_string_tab[573] +#define __pyx_n_u_validate_stateful_dofn_2 __pyx_string_tab[574] +#define __pyx_n_u_value __pyx_string_tab[575] +#define __pyx_n_u_values __pyx_string_tab[576] +#define __pyx_n_u_w __pyx_string_tab[577] +#define __pyx_n_u_watermark_estimator __pyx_string_tab[578] +#define __pyx_n_u_watermark_estimator_provider __pyx_string_tab[579] +#define __pyx_n_u_watermark_estimator_state __pyx_string_tab[580] +#define __pyx_n_u_watermark_param __pyx_string_tab[581] +#define __pyx_n_u_window __pyx_string_tab[582] +#define __pyx_n_u_window_fn __pyx_string_tab[583] +#define __pyx_n_u_window_index __pyx_string_tab[584] +#define __pyx_n_u_window_observing __pyx_string_tab[585] +#define __pyx_n_u_windowed_batch __pyx_string_tab[586] +#define __pyx_n_u_windowed_input_batch __pyx_string_tab[587] +#define __pyx_n_u_windowed_input_element __pyx_string_tab[588] +#define __pyx_n_u_windowed_value __pyx_string_tab[589] +#define __pyx_n_u_windowfn __pyx_string_tab[590] +#define __pyx_n_u_windowing __pyx_string_tab[591] +#define __pyx_n_u_windows __pyx_string_tab[592] +#define __pyx_n_u_with_traceback __pyx_string_tab[593] +#define __pyx_n_u_with_value __pyx_string_tab[594] +#define __pyx_n_u_x __pyx_string_tab[595] +#define __pyx_n_u_zip __pyx_string_tab[596] +#define __pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P __pyx_string_tab[597] +#define __pyx_kp_b_PyTypeObject_TaggedOutput_Timest __pyx_string_tab[598] +#define __pyx_kp_b__3 __pyx_string_tab[599] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[600] +#define __pyx_kp_b_iso88591_1F __pyx_string_tab[601] +#define __pyx_kp_b_iso88591_1_4uF_Cz_T_s_c_AS_Ja_xv_1 __pyx_string_tab[602] +#define __pyx_kp_b_iso88591_1_Q_E_Z_2_a __pyx_string_tab[603] +#define __pyx_kp_b_iso88591_1_Q_E_Z_31_A_J_q __pyx_string_tab[604] +#define __pyx_kp_b_iso88591_31_wau_4t1_A_b_A_AT_U_3b_U_1_A __pyx_string_tab[605] +#define __pyx_kp_b_iso88591_4AT_A_Q_A_1_3a_Q_4q_H_aq_JoQ_t1 __pyx_string_tab[606] +#define __pyx_kp_b_iso88591_4A_1 __pyx_string_tab[607] +#define __pyx_kp_b_iso88591_4_1_A_G1_M_b_5Q_Q_az_Ja_8_N_o_R __pyx_string_tab[608] +#define __pyx_kp_b_iso88591_4_7 __pyx_string_tab[609] +#define __pyx_kp_b_iso88591_4_7q_L __pyx_string_tab[610] +#define __pyx_kp_b_iso88591_4_U __pyx_string_tab[611] +#define __pyx_kp_b_iso88591_4_a __pyx_string_tab[612] +#define __pyx_kp_b_iso88591_4_a_2 __pyx_string_tab[613] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[614] +#define __pyx_kp_b_iso88591_4q_A __pyx_string_tab[615] +#define __pyx_kp_b_iso88591_4z __pyx_string_tab[616] +#define __pyx_kp_b_iso88591_4z_4M __pyx_string_tab[617] +#define __pyx_kp_b_iso88591_4z_AQ __pyx_string_tab[618] +#define __pyx_kp_b_iso88591_4z_m1IQ __pyx_string_tab[619] +#define __pyx_kp_b_iso88591_5_4q __pyx_string_tab[620] +#define __pyx_kp_b_iso88591_5_D_Q __pyx_string_tab[621] +#define __pyx_kp_b_iso88591_5_D_a __pyx_string_tab[622] +#define __pyx_kp_b_iso88591_8_c_0_C_j_9_MQ_t1_1_A_iq_Q __pyx_string_tab[623] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[624] +#define __pyx_kp_b_iso88591_AB __pyx_string_tab[625] +#define __pyx_kp_b_iso88591_AB_xs_1_9D_aq_T_Q_A_6a_Qha_1HA __pyx_string_tab[626] +#define __pyx_kp_b_iso88591_AQ __pyx_string_tab[627] +#define __pyx_kp_b_iso88591_AT __pyx_string_tab[628] +#define __pyx_kp_b_iso88591_AV1 __pyx_string_tab[629] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_Qg_q_Qg __pyx_string_tab[630] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7 __pyx_string_tab[631] +#define __pyx_kp_b_iso88591_A_a_A_j_2_A_q_i_A_a_Q_A_HBoYb_q __pyx_string_tab[632] +#define __pyx_kp_b_iso88591_I_t_c_T_1_c_1_A_a __pyx_string_tab[633] +#define __pyx_kp_b_iso88591_M_T_wa_q_1F __pyx_string_tab[634] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[635] +#define __pyx_kp_b_iso88591_Q_31_fA_vQ_q_3a_Cq_Ba_a_Qd_7Gq __pyx_string_tab[636] +#define __pyx_kp_b_iso88591_Q_A __pyx_string_tab[637] +#define __pyx_kp_b_iso88591_Q_J_T_q_q_1F __pyx_string_tab[638] +#define __pyx_kp_b_iso88591_Q_Q __pyx_string_tab[639] +#define __pyx_kp_b_iso88591_Q_t1_nD_6fA_av_z_e1_nD_6fA_av_z __pyx_string_tab[640] +#define __pyx_kp_b_iso88591_Qa_A_Qa __pyx_string_tab[641] +#define __pyx_kp_b_iso88591_Qd __pyx_string_tab[642] +#define __pyx_kp_b_iso88591_Qd_4_6a __pyx_string_tab[643] +#define __pyx_kp_b_iso88591_Qd_4_Zq __pyx_string_tab[644] +#define __pyx_kp_b_iso88591_Qd_T_a_Zq_4q_4t5_1D_4t5_4uM_U_1 __pyx_string_tab[645] +#define __pyx_kp_b_iso88591_Rt1 __pyx_string_tab[646] +#define __pyx_kp_b_iso88591_Rx_2XQ_b_Bhl_HA_a_az_Ja __pyx_string_tab[647] +#define __pyx_kp_b_iso88591_T_2_6PPTTeei_j_C_C_G_G_d_d_h_h __pyx_string_tab[648] +#define __pyx_kp_b_iso88591_T_FdJ_aazz_X_X_f_f_j_j_A_A_E_E __pyx_string_tab[649] +#define __pyx_kp_b_iso88591_T_FdJccggxx_I_I_M_M_N_G1F_a_vWE __pyx_string_tab[650] +#define __pyx_kp_b_iso88591_T_FdJccggxx_T_T_X_X_i_i_m_m_y_y __pyx_string_tab[651] +#define __pyx_kp_b_iso88591_T_Kt_H_Lffjjyy_L_L_P_P_____c_c __pyx_string_tab[652] +#define __pyx_kp_b_iso88591_T_T_B_F_b_c_G_G_K_K_S_S_W_W_n_n __pyx_string_tab[653] +#define __pyx_kp_b_iso88591_T_XT_G1F_a_vWE_Q_q_t7_c_WG5_4O __pyx_string_tab[654] +#define __pyx_kp_b_iso88591_T_aq_A_Qe1_Q __pyx_string_tab[655] +#define __pyx_kp_b_iso88591_T_j_LDPddhhvvz_G_G_K_K_L_G1F_a __pyx_string_tab[656] +#define __pyx_kp_b_iso88591_U_s_j_A __pyx_string_tab[657] +#define __pyx_kp_b_iso88591_Z_t_4__A_k __pyx_string_tab[658] +#define __pyx_kp_b_iso88591__11 __pyx_string_tab[659] +#define __pyx_kp_b_iso88591__12 __pyx_string_tab[660] +#define __pyx_kp_b_iso88591__13 __pyx_string_tab[661] +#define __pyx_kp_b_iso88591__14 __pyx_string_tab[662] +#define __pyx_kp_b_iso88591__5 __pyx_string_tab[663] +#define __pyx_kp_b_iso88591__6 __pyx_string_tab[664] +#define __pyx_kp_b_iso88591__7 __pyx_string_tab[665] +#define __pyx_kp_b_iso88591__8 __pyx_string_tab[666] +#define __pyx_kp_b_iso88591__9 __pyx_string_tab[667] +#define __pyx_kp_b_iso88591_a __pyx_string_tab[668] +#define __pyx_kp_b_iso88591_a_4q __pyx_string_tab[669] +#define __pyx_kp_b_iso88591_a_O1N_1 __pyx_string_tab[670] +#define __pyx_kp_b_iso88591_a_QfL_JnA_0Fa __pyx_string_tab[671] +#define __pyx_kp_b_iso88591_a_a __pyx_string_tab[672] +#define __pyx_kp_b_iso88591_aq_1_A_Qa __pyx_string_tab[673] +#define __pyx_kp_b_iso88591_aq_a_A_Qa __pyx_string_tab[674] +#define __pyx_kp_b_iso88591_at __pyx_string_tab[675] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[676] +#define __pyx_kp_b_iso88591_avQ_2 __pyx_string_tab[677] +#define __pyx_kp_b_iso88591_e8_k_A_Qa __pyx_string_tab[678] +#define __pyx_kp_b_iso88591_nA __pyx_string_tab[679] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[680] +#define __pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1 __pyx_string_tab[681] +#define __pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1 __pyx_string_tab[682] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1 __pyx_string_tab[683] +#define __pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1 __pyx_string_tab[684] +#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_1 __pyx_string_tab[685] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1 __pyx_string_tab[686] +#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[687] +#define __pyx_kp_b_iso88591_q_3 __pyx_string_tab[688] +#define __pyx_kp_b_iso88591_q_A_A_A_s_Rs_a_1_1 __pyx_string_tab[689] +#define __pyx_kp_b_iso88591_t1_Q_Q_s_3a_Q_ARq_F_a_T1Gq_T_t1 __pyx_string_tab[690] +#define __pyx_kp_b_iso88591_t1_a_t1_Q_z_s_3a_Q_ARq_F_a_a_A __pyx_string_tab[691] +#define __pyx_kp_b_iso88591_t1_t1_AQ_t1_S_d_A_q_a_O1_4_D_1N __pyx_string_tab[692] +#define __pyx_kp_b_iso88591_t1_t1_Q_a_t_Cq_j_1_Q_Q_Cq_a_m1 __pyx_string_tab[693] +#define __pyx_kp_b_iso88591_t4q_Q_Q_T_a_t1_t1_Q_a_t_4q_Q_1 __pyx_string_tab[694] +#define __pyx_kp_b_iso88591_t4q_Q_Q_T_q_a_a_a_a_a_j_1_a_a_Q __pyx_string_tab[695] +#define __pyx_kp_b_iso88591_t_a_Zq_A_0_2H_Q __pyx_string_tab[696] +#define __pyx_kp_b_iso88591_t_s_a_Jaq_T __pyx_string_tab[697] +#define __pyx_kp_b_iso88591_xs_1_9D_aq_T_t_7_Qha_1HA_1_7_q __pyx_string_tab[698] +#define __pyx_kp_b_iso88591_xs_A_1HA_fA_4z_q_V1_q_1HA_l_MQ __pyx_string_tab[699] +#define __pyx_kp_b_iso88591_xs_a_A_1 __pyx_string_tab[700] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_1 __pyx_number_tab[1] +#define __pyx_int_2 __pyx_number_tab[2] +#define __pyx_int_3 __pyx_number_tab[3] +#define __pyx_int_24629412 __pyx_number_tab[4] +#define __pyx_int_33257841 __pyx_number_tab[5] +#define __pyx_int_61400015 __pyx_number_tab[6] +#define __pyx_int_77316345 __pyx_number_tab[7] +#define __pyx_int_122683391 __pyx_number_tab[8] +#define __pyx_int_129653113 __pyx_number_tab[9] +#define __pyx_int_146279351 __pyx_number_tab[10] +#define __pyx_int_173793943 __pyx_number_tab[11] +#define __pyx_int_238750788 __pyx_number_tab[12] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_Receiver); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_MethodWrapper); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnSignature); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_SimpleInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnRunner); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_OutputHandler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common__OutputHandler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnContext); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_defaults); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } + for (int i=0; i<11; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<117; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<701; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<13; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_Receiver); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_MethodWrapper); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnSignature); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_SimpleInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnRunner); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_OutputHandler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common__OutputHandler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common_DoFnContext); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_defaults); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } + for (int i=0; i<11; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<117; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<701; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<13; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/runners/common.py":86 + * class NameContext(object): + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): # <<<<<<<<<<<<<< + * # type: (str, Optional[str]) -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11NameContext___init__, "Creates a new step NameContext.\n\n Args:\n step_name: The name of the step.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11NameContext___init__}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 86, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 86, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 86, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 86, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 86, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 86, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 86, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 86, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 86, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_transform_id = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 86, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext___init__(__pyx_self, __pyx_v_self, __pyx_v_step_name, __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":94 + * step_name: The name of the step. + * """ + * self.step_name = step_name # <<<<<<<<<<<<<< + * self.transform_id = transform_id + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name, __pyx_v_step_name) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + + /* "apache_beam/runners/common.py":95 + * """ + * self.step_name = step_name + * self.transform_id = transform_id # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_transform_id, __pyx_v_transform_id) < (0)) __PYX_ERR(0, 95, __pyx_L1_error) + + /* "apache_beam/runners/common.py":86 + * class NameContext(object): + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): # <<<<<<<<<<<<<< + * # type: (str, Optional[str]) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":97 + * self.transform_id = transform_id + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.step_name == other.step_name + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_3__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_3__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_3__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 97, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 97, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 97, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/runners/common.py":98 + * + * def __eq__(self, other): + * return self.step_name == other.step_name # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":97 + * self.transform_id = transform_id + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.step_name == other.step_name + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":100 + * return self.step_name == other.step_name + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'NameContext(%s)' % self.__dict__ + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_5__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_5__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_5__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_5__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 100, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 100, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 100, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 100, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 100, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_4__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/runners/common.py":101 + * + * def __repr__(self): + * return 'NameContext(%s)' % self.__dict__ # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_NameContext_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":100 + * return self.step_name == other.step_name + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'NameContext(%s)' % self.__dict__ + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":103 + * return 'NameContext(%s)' % self.__dict__ + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.step_name) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_7__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_7__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_7__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_7__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 103, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 103, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 103, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 103, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 103, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 103, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_6__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/runners/common.py":104 + * + * def __hash__(self): + * return hash(self.step_name) # <<<<<<<<<<<<<< + * + * def metrics_name(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":103 + * return 'NameContext(%s)' % self.__dict__ + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.step_name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":106 + * return hash(self.step_name) + * + * def metrics_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for metrics reporting.""" + * return self.step_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_9metrics_name(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11NameContext_8metrics_name, "Returns the step name used for metrics reporting."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_9metrics_name = {"metrics_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_9metrics_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11NameContext_8metrics_name}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_9metrics_name(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("metrics_name (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 106, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 106, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "metrics_name", 0) < (0)) __PYX_ERR(0, 106, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("metrics_name", 1, 1, 1, i); __PYX_ERR(0, 106, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 106, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("metrics_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 106, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.metrics_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_8metrics_name(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_8metrics_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("metrics_name", 0); + + /* "apache_beam/runners/common.py":108 + * def metrics_name(self): + * """Returns the step name used for metrics reporting.""" + * return self.step_name # <<<<<<<<<<<<<< + * + * def logging_name(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":106 + * return hash(self.step_name) + * + * def metrics_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for metrics reporting.""" + * return self.step_name +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.metrics_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":110 + * return self.step_name + * + * def logging_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for logging.""" + * return self.step_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_11logging_name(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11NameContext_10logging_name, "Returns the step name used for logging."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11NameContext_11logging_name = {"logging_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11NameContext_11logging_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11NameContext_10logging_name}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11NameContext_11logging_name(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("logging_name (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 110, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 110, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "logging_name", 0) < (0)) __PYX_ERR(0, 110, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("logging_name", 1, 1, 1, i); __PYX_ERR(0, 110, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 110, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("logging_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 110, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.logging_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11NameContext_10logging_name(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11NameContext_10logging_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("logging_name", 0); + + /* "apache_beam/runners/common.py":112 + * def logging_name(self): + * """Returns the step name used for logging.""" + * return self.step_name # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":110 + * return self.step_name + * + * def logging_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for logging.""" + * return self.step_name +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.NameContext.logging_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":123 + * sdk and worker harnesses. + * """ + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * raise NotImplementedError +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_receive(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":125 + * def receive(self, windowed_value): + * # type: (WindowedValue) -> None + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def receive_batch(self, windowed_batch): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 125, __pyx_L1_error) + + /* "apache_beam/runners/common.py":123 + * sdk and worker harnesses. + * """ + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * raise NotImplementedError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_1receive = {"receive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_1receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 123, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 123, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive", 0) < (0)) __PYX_ERR(0, 123, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, i); __PYX_ERR(0, 123, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 123, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 123, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8Receiver_receive(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_receive(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_8Receiver_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":127 + * raise NotImplementedError + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * raise NotImplementedError +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":129 + * def receive_batch(self, windowed_batch): + * # type: (WindowedBatch) -> None + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def flush(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 129, __pyx_L1_error) + + /* "apache_beam/runners/common.py":127 + * raise NotImplementedError + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * raise NotImplementedError +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_3receive_batch = {"receive_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_3receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 127, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_batch", 0) < (0)) __PYX_ERR(0, 127, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, i); __PYX_ERR(0, 127, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8Receiver_2receive_batch(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_2receive_batch(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_8Receiver_receive_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":131 + * raise NotImplementedError + * + * def flush(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_8Receiver_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":132 + * + * def flush(self): + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 132, __pyx_L1_error) + + /* "apache_beam/runners/common.py":131 + * raise NotImplementedError + * + * def flush(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_5flush = {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_5flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flush (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flush", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flush", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8Receiver_4flush(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_4flush(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_8Receiver_flush(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8Receiver_6__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Receiver); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Receiver__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Receiver); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Receiver__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8Receiver_8__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8Receiver_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Receiver__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_Receiver__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Receiver__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.Receiver.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":139 + * + * Represents a method that can be invoked by `DoFnInvoker`.""" + * def __init__(self, obj_to_invoke, method_name): # <<<<<<<<<<<<<< + * """ + * Initiates a ``MethodWrapper``. +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_13MethodWrapper___init__, "\n Initiates a ``MethodWrapper``.\n\n Args:\n obj_to_invoke: the object that contains the method. Has to either be a\n `DoFn` object or a `RestrictionProvider` object.\n method_name: name of the method as a string.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6common_13MethodWrapper___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_obj_to_invoke = 0; + PyObject *__pyx_v_method_name = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj_to_invoke,&__pyx_mstate_global->__pyx_n_u_method_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 139, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 139, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 139, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 139, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 139, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 139, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 139, __pyx_L3_error) + } + __pyx_v_obj_to_invoke = values[0]; + __pyx_v_method_name = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 139, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper___init__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), __pyx_v_obj_to_invoke, __pyx_v_method_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper___init__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_obj_to_invoke, PyObject *__pyx_v_method_name) { + PyObject *__pyx_v_kw = NULL; + PyObject *__pyx_v_v = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":150 + * + * if not isinstance(obj_to_invoke, + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): # <<<<<<<<<<<<<< + * raise ValueError( + * '\'obj_to_invoke\' has to be either a \'DoFn\' or ' +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RestrictionProvider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WatermarkEstimatorProvider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":149 + * """ + * + * if not isinstance(obj_to_invoke, # <<<<<<<<<<<<<< + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): + * raise ValueError( +*/ + __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_1); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/runners/common.py":150 + * + * if not isinstance(obj_to_invoke, + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): # <<<<<<<<<<<<<< + * raise ValueError( + * '\'obj_to_invoke\' has to be either a \'DoFn\' or ' +*/ + __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/runners/common.py":149 + * """ + * + * if not isinstance(obj_to_invoke, # <<<<<<<<<<<<<< + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): + * raise ValueError( +*/ + __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj_to_invoke, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "apache_beam/runners/common.py":151 + * if not isinstance(obj_to_invoke, + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): + * raise ValueError( # <<<<<<<<<<<<<< + * '\'obj_to_invoke\' has to be either a \'DoFn\' or ' + * 'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke) +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/common.py":153 + * raise ValueError( + * '\'obj_to_invoke\' has to be either a \'DoFn\' or ' + * 'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke) # <<<<<<<<<<<<<< + * + * self.args, self.defaults = core.get_function_arguments(obj_to_invoke, +*/ + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_obj_to_invoke_has_to_be_either, __pyx_v_obj_to_invoke); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 151, __pyx_L1_error) + + /* "apache_beam/runners/common.py":149 + * """ + * + * if not isinstance(obj_to_invoke, # <<<<<<<<<<<<<< + * (DoFn, RestrictionProvider, WatermarkEstimatorProvider)): + * raise ValueError( +*/ + } + + /* "apache_beam/runners/common.py":155 + * 'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke) + * + * self.args, self.defaults = core.get_function_arguments(obj_to_invoke, # <<<<<<<<<<<<<< + * method_name) + * # TODO(BEAM-5878) support kwonlyargs on Python 3. +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_function_arguments); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":156 + * + * self.args, self.defaults = core.get_function_arguments(obj_to_invoke, + * method_name) # <<<<<<<<<<<<<< + * # TODO(BEAM-5878) support kwonlyargs on Python 3. + * self.method_value = getattr(obj_to_invoke, method_name) +*/ + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_obj_to_invoke, __pyx_v_method_name}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 155, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + } + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); + index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + + /* "apache_beam/runners/common.py":155 + * 'a \'RestrictionProvider\'. Received %r instead.' % obj_to_invoke) + * + * self.args, self.defaults = core.get_function_arguments(obj_to_invoke, # <<<<<<<<<<<<<< + * method_name) + * # TODO(BEAM-5878) support kwonlyargs on Python 3. +*/ + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_self->args); + __Pyx_DECREF(__pyx_v_self->args); + __pyx_v_self->args = __pyx_t_7; + __pyx_t_7 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->defaults); + __Pyx_DECREF(__pyx_v_self->defaults); + __pyx_v_self->defaults = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":158 + * method_name) + * # TODO(BEAM-5878) support kwonlyargs on Python 3. + * self.method_value = getattr(obj_to_invoke, method_name) # <<<<<<<<<<<<<< + * self.method_name = method_name + * +*/ + __pyx_t_1 = __Pyx_GetAttr(__pyx_v_obj_to_invoke, __pyx_v_method_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->method_value); + __Pyx_DECREF(__pyx_v_self->method_value); + __pyx_v_self->method_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":159 + * # TODO(BEAM-5878) support kwonlyargs on Python 3. + * self.method_value = getattr(obj_to_invoke, method_name) + * self.method_name = method_name # <<<<<<<<<<<<<< + * + * self.has_userstate_arguments = False +*/ + __pyx_t_1 = __pyx_v_method_name; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->method_name); + __Pyx_DECREF(__pyx_v_self->method_name); + __pyx_v_self->method_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":161 + * self.method_name = method_name + * + * self.has_userstate_arguments = False # <<<<<<<<<<<<<< + * self.state_args_to_replace = {} # type: Dict[str, core.StateSpec] + * self.timer_args_to_replace = {} # type: Dict[str, core.TimerSpec] +*/ + __pyx_v_self->has_userstate_arguments = 0; + + /* "apache_beam/runners/common.py":162 + * + * self.has_userstate_arguments = False + * self.state_args_to_replace = {} # type: Dict[str, core.StateSpec] # <<<<<<<<<<<<<< + * self.timer_args_to_replace = {} # type: Dict[str, core.TimerSpec] + * self.timestamp_arg_name = None # type: Optional[str] +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->state_args_to_replace); + __Pyx_DECREF(__pyx_v_self->state_args_to_replace); + __pyx_v_self->state_args_to_replace = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":163 + * self.has_userstate_arguments = False + * self.state_args_to_replace = {} # type: Dict[str, core.StateSpec] + * self.timer_args_to_replace = {} # type: Dict[str, core.TimerSpec] # <<<<<<<<<<<<<< + * self.timestamp_arg_name = None # type: Optional[str] + * self.window_arg_name = None # type: Optional[str] +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->timer_args_to_replace); + __Pyx_DECREF(__pyx_v_self->timer_args_to_replace); + __pyx_v_self->timer_args_to_replace = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":164 + * self.state_args_to_replace = {} # type: Dict[str, core.StateSpec] + * self.timer_args_to_replace = {} # type: Dict[str, core.TimerSpec] + * self.timestamp_arg_name = None # type: Optional[str] # <<<<<<<<<<<<<< + * self.window_arg_name = None # type: Optional[str] + * self.key_arg_name = None # type: Optional[str] +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timestamp_arg_name); + __Pyx_DECREF(__pyx_v_self->timestamp_arg_name); + __pyx_v_self->timestamp_arg_name = Py_None; + + /* "apache_beam/runners/common.py":165 + * self.timer_args_to_replace = {} # type: Dict[str, core.TimerSpec] + * self.timestamp_arg_name = None # type: Optional[str] + * self.window_arg_name = None # type: Optional[str] # <<<<<<<<<<<<<< + * self.key_arg_name = None # type: Optional[str] + * self.restriction_provider = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->window_arg_name); + __Pyx_DECREF(__pyx_v_self->window_arg_name); + __pyx_v_self->window_arg_name = Py_None; + + /* "apache_beam/runners/common.py":166 + * self.timestamp_arg_name = None # type: Optional[str] + * self.window_arg_name = None # type: Optional[str] + * self.key_arg_name = None # type: Optional[str] # <<<<<<<<<<<<<< + * self.restriction_provider = None + * self.restriction_provider_arg_name = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->key_arg_name); + __Pyx_DECREF(__pyx_v_self->key_arg_name); + __pyx_v_self->key_arg_name = Py_None; + + /* "apache_beam/runners/common.py":167 + * self.window_arg_name = None # type: Optional[str] + * self.key_arg_name = None # type: Optional[str] + * self.restriction_provider = None # <<<<<<<<<<<<<< + * self.restriction_provider_arg_name = None + * self.watermark_estimator_provider = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->restriction_provider); + __Pyx_DECREF(__pyx_v_self->restriction_provider); + __pyx_v_self->restriction_provider = Py_None; + + /* "apache_beam/runners/common.py":168 + * self.key_arg_name = None # type: Optional[str] + * self.restriction_provider = None + * self.restriction_provider_arg_name = None # <<<<<<<<<<<<<< + * self.watermark_estimator_provider = None + * self.watermark_estimator_provider_arg_name = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->restriction_provider_arg_name); + __Pyx_DECREF(__pyx_v_self->restriction_provider_arg_name); + __pyx_v_self->restriction_provider_arg_name = Py_None; + + /* "apache_beam/runners/common.py":169 + * self.restriction_provider = None + * self.restriction_provider_arg_name = None + * self.watermark_estimator_provider = None # <<<<<<<<<<<<<< + * self.watermark_estimator_provider_arg_name = None + * self.dynamic_timer_tag_arg_name = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider); + __pyx_v_self->watermark_estimator_provider = Py_None; + + /* "apache_beam/runners/common.py":170 + * self.restriction_provider_arg_name = None + * self.watermark_estimator_provider = None + * self.watermark_estimator_provider_arg_name = None # <<<<<<<<<<<<<< + * self.dynamic_timer_tag_arg_name = None + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider_arg_name); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider_arg_name); + __pyx_v_self->watermark_estimator_provider_arg_name = Py_None; + + /* "apache_beam/runners/common.py":171 + * self.watermark_estimator_provider = None + * self.watermark_estimator_provider_arg_name = None + * self.dynamic_timer_tag_arg_name = None # <<<<<<<<<<<<<< + * + * if hasattr(self.method_value, 'unbounded_per_element'): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->dynamic_timer_tag_arg_name); + __Pyx_DECREF(__pyx_v_self->dynamic_timer_tag_arg_name); + __pyx_v_self->dynamic_timer_tag_arg_name = Py_None; + + /* "apache_beam/runners/common.py":173 + * self.dynamic_timer_tag_arg_name = None + * + * if hasattr(self.method_value, 'unbounded_per_element'): # <<<<<<<<<<<<<< + * self.unbounded_per_element = True + * else: +*/ + __pyx_t_1 = __pyx_v_self->method_value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __Pyx_HasAttr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_unbounded_per_element); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":174 + * + * if hasattr(self.method_value, 'unbounded_per_element'): + * self.unbounded_per_element = True # <<<<<<<<<<<<<< + * else: + * self.unbounded_per_element = False +*/ + __pyx_v_self->unbounded_per_element = 1; + + /* "apache_beam/runners/common.py":173 + * self.dynamic_timer_tag_arg_name = None + * + * if hasattr(self.method_value, 'unbounded_per_element'): # <<<<<<<<<<<<<< + * self.unbounded_per_element = True + * else: +*/ + goto __pyx_L9; + } + + /* "apache_beam/runners/common.py":176 + * self.unbounded_per_element = True + * else: + * self.unbounded_per_element = False # <<<<<<<<<<<<<< + * + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): +*/ + /*else*/ { + __pyx_v_self->unbounded_per_element = 0; + } + __pyx_L9:; + + /* "apache_beam/runners/common.py":178 + * self.unbounded_per_element = False + * + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): # <<<<<<<<<<<<<< + * if isinstance(v, core.DoFn.StateParam): + * self.state_args_to_replace[kw] = v.state_spec +*/ + __pyx_t_3 = NULL; + __pyx_t_7 = __pyx_v_self->defaults; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_self->args, (-__pyx_t_9), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_v_self->defaults}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); + __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_7))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 178, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 178, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_10(__pyx_t_7); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 178, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 178, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_L13_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":179 + * + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): + * if isinstance(v, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * self.state_args_to_replace[kw] = v.state_spec + * self.has_userstate_arguments = True +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_StateParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":180 + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): + * if isinstance(v, core.DoFn.StateParam): + * self.state_args_to_replace[kw] = v.state_spec # <<<<<<<<<<<<<< + * self.has_userstate_arguments = True + * elif isinstance(v, core.DoFn.TimerParam): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_mstate_global->__pyx_n_u_state_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_self->state_args_to_replace, __pyx_v_kw, __pyx_t_1) < 0))) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":181 + * if isinstance(v, core.DoFn.StateParam): + * self.state_args_to_replace[kw] = v.state_spec + * self.has_userstate_arguments = True # <<<<<<<<<<<<<< + * elif isinstance(v, core.DoFn.TimerParam): + * self.timer_args_to_replace[kw] = v.timer_spec +*/ + __pyx_v_self->has_userstate_arguments = 1; + + /* "apache_beam/runners/common.py":179 + * + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): + * if isinstance(v, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * self.state_args_to_replace[kw] = v.state_spec + * self.has_userstate_arguments = True +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":182 + * self.state_args_to_replace[kw] = v.state_spec + * self.has_userstate_arguments = True + * elif isinstance(v, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * self.timer_args_to_replace[kw] = v.timer_spec + * self.has_userstate_arguments = True +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TimerParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":183 + * self.has_userstate_arguments = True + * elif isinstance(v, core.DoFn.TimerParam): + * self.timer_args_to_replace[kw] = v.timer_spec # <<<<<<<<<<<<<< + * self.has_userstate_arguments = True + * elif core.DoFn.TimestampParam == v: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_mstate_global->__pyx_n_u_timer_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_self->timer_args_to_replace, __pyx_v_kw, __pyx_t_1) < 0))) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":184 + * elif isinstance(v, core.DoFn.TimerParam): + * self.timer_args_to_replace[kw] = v.timer_spec + * self.has_userstate_arguments = True # <<<<<<<<<<<<<< + * elif core.DoFn.TimestampParam == v: + * self.timestamp_arg_name = kw +*/ + __pyx_v_self->has_userstate_arguments = 1; + + /* "apache_beam/runners/common.py":182 + * self.state_args_to_replace[kw] = v.state_spec + * self.has_userstate_arguments = True + * elif isinstance(v, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * self.timer_args_to_replace[kw] = v.timer_spec + * self.has_userstate_arguments = True +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":185 + * self.timer_args_to_replace[kw] = v.timer_spec + * self.has_userstate_arguments = True + * elif core.DoFn.TimestampParam == v: # <<<<<<<<<<<<<< + * self.timestamp_arg_name = kw + * elif core.DoFn.WindowParam == v: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TimestampParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":186 + * self.has_userstate_arguments = True + * elif core.DoFn.TimestampParam == v: + * self.timestamp_arg_name = kw # <<<<<<<<<<<<<< + * elif core.DoFn.WindowParam == v: + * self.window_arg_name = kw +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->timestamp_arg_name); + __Pyx_DECREF(__pyx_v_self->timestamp_arg_name); + __pyx_v_self->timestamp_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":185 + * self.timer_args_to_replace[kw] = v.timer_spec + * self.has_userstate_arguments = True + * elif core.DoFn.TimestampParam == v: # <<<<<<<<<<<<<< + * self.timestamp_arg_name = kw + * elif core.DoFn.WindowParam == v: +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":187 + * elif core.DoFn.TimestampParam == v: + * self.timestamp_arg_name = kw + * elif core.DoFn.WindowParam == v: # <<<<<<<<<<<<<< + * self.window_arg_name = kw + * elif core.DoFn.WindowedValueParam == v: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":188 + * self.timestamp_arg_name = kw + * elif core.DoFn.WindowParam == v: + * self.window_arg_name = kw # <<<<<<<<<<<<<< + * elif core.DoFn.WindowedValueParam == v: + * self.window_arg_name = kw +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->window_arg_name); + __Pyx_DECREF(__pyx_v_self->window_arg_name); + __pyx_v_self->window_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":187 + * elif core.DoFn.TimestampParam == v: + * self.timestamp_arg_name = kw + * elif core.DoFn.WindowParam == v: # <<<<<<<<<<<<<< + * self.window_arg_name = kw + * elif core.DoFn.WindowedValueParam == v: +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":189 + * elif core.DoFn.WindowParam == v: + * self.window_arg_name = kw + * elif core.DoFn.WindowedValueParam == v: # <<<<<<<<<<<<<< + * self.window_arg_name = kw + * elif core.DoFn.KeyParam == v: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WindowedValueParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":190 + * self.window_arg_name = kw + * elif core.DoFn.WindowedValueParam == v: + * self.window_arg_name = kw # <<<<<<<<<<<<<< + * elif core.DoFn.KeyParam == v: + * self.key_arg_name = kw +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->window_arg_name); + __Pyx_DECREF(__pyx_v_self->window_arg_name); + __pyx_v_self->window_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":189 + * elif core.DoFn.WindowParam == v: + * self.window_arg_name = kw + * elif core.DoFn.WindowedValueParam == v: # <<<<<<<<<<<<<< + * self.window_arg_name = kw + * elif core.DoFn.KeyParam == v: +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":191 + * elif core.DoFn.WindowedValueParam == v: + * self.window_arg_name = kw + * elif core.DoFn.KeyParam == v: # <<<<<<<<<<<<<< + * self.key_arg_name = kw + * elif isinstance(v, core.DoFn.RestrictionParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":192 + * self.window_arg_name = kw + * elif core.DoFn.KeyParam == v: + * self.key_arg_name = kw # <<<<<<<<<<<<<< + * elif isinstance(v, core.DoFn.RestrictionParam): + * self.restriction_provider = v.restriction_provider or obj_to_invoke +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->key_arg_name); + __Pyx_DECREF(__pyx_v_self->key_arg_name); + __pyx_v_self->key_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":191 + * elif core.DoFn.WindowedValueParam == v: + * self.window_arg_name = kw + * elif core.DoFn.KeyParam == v: # <<<<<<<<<<<<<< + * self.key_arg_name = kw + * elif isinstance(v, core.DoFn.RestrictionParam): +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":193 + * elif core.DoFn.KeyParam == v: + * self.key_arg_name = kw + * elif isinstance(v, core.DoFn.RestrictionParam): # <<<<<<<<<<<<<< + * self.restriction_provider = v.restriction_provider or obj_to_invoke + * self.restriction_provider_arg_name = kw +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RestrictionParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":194 + * self.key_arg_name = kw + * elif isinstance(v, core.DoFn.RestrictionParam): + * self.restriction_provider = v.restriction_provider or obj_to_invoke # <<<<<<<<<<<<<< + * self.restriction_provider_arg_name = kw + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_mstate_global->__pyx_n_u_restriction_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) + if (!__pyx_t_5) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L15_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_obj_to_invoke); + __pyx_t_1 = __pyx_v_obj_to_invoke; + __pyx_L15_bool_binop_done:; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->restriction_provider); + __Pyx_DECREF(__pyx_v_self->restriction_provider); + __pyx_v_self->restriction_provider = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":195 + * elif isinstance(v, core.DoFn.RestrictionParam): + * self.restriction_provider = v.restriction_provider or obj_to_invoke + * self.restriction_provider_arg_name = kw # <<<<<<<<<<<<<< + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): + * self.watermark_estimator_provider = ( +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->restriction_provider_arg_name); + __Pyx_DECREF(__pyx_v_self->restriction_provider_arg_name); + __pyx_v_self->restriction_provider_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":193 + * elif core.DoFn.KeyParam == v: + * self.key_arg_name = kw + * elif isinstance(v, core.DoFn.RestrictionParam): # <<<<<<<<<<<<<< + * self.restriction_provider = v.restriction_provider or obj_to_invoke + * self.restriction_provider_arg_name = kw +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":196 + * self.restriction_provider = v.restriction_provider or obj_to_invoke + * self.restriction_provider_arg_name = kw + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): # <<<<<<<<<<<<<< + * self.watermark_estimator_provider = ( + * v.watermark_estimator_provider or obj_to_invoke) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WatermarkEstimatorParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":198 + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): + * self.watermark_estimator_provider = ( + * v.watermark_estimator_provider or obj_to_invoke) # <<<<<<<<<<<<<< + * self.watermark_estimator_provider_arg_name = kw + * elif core.DoFn.DynamicTimerTagParam == v: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_mstate_global->__pyx_n_u_watermark_estimator_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 198, __pyx_L1_error) + if (!__pyx_t_5) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L17_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_obj_to_invoke); + __pyx_t_1 = __pyx_v_obj_to_invoke; + __pyx_L17_bool_binop_done:; + + /* "apache_beam/runners/common.py":197 + * self.restriction_provider_arg_name = kw + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): + * self.watermark_estimator_provider = ( # <<<<<<<<<<<<<< + * v.watermark_estimator_provider or obj_to_invoke) + * self.watermark_estimator_provider_arg_name = kw +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider); + __pyx_v_self->watermark_estimator_provider = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":199 + * self.watermark_estimator_provider = ( + * v.watermark_estimator_provider or obj_to_invoke) + * self.watermark_estimator_provider_arg_name = kw # <<<<<<<<<<<<<< + * elif core.DoFn.DynamicTimerTagParam == v: + * self.dynamic_timer_tag_arg_name = kw +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider_arg_name); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider_arg_name); + __pyx_v_self->watermark_estimator_provider_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":196 + * self.restriction_provider = v.restriction_provider or obj_to_invoke + * self.restriction_provider_arg_name = kw + * elif isinstance(v, core.DoFn.WatermarkEstimatorParam): # <<<<<<<<<<<<<< + * self.watermark_estimator_provider = ( + * v.watermark_estimator_provider or obj_to_invoke) +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/common.py":200 + * v.watermark_estimator_provider or obj_to_invoke) + * self.watermark_estimator_provider_arg_name = kw + * elif core.DoFn.DynamicTimerTagParam == v: # <<<<<<<<<<<<<< + * self.dynamic_timer_tag_arg_name = kw + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DynamicTimerTagParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":201 + * self.watermark_estimator_provider_arg_name = kw + * elif core.DoFn.DynamicTimerTagParam == v: + * self.dynamic_timer_tag_arg_name = kw # <<<<<<<<<<<<<< + * + * # Create NoOpWatermarkEstimatorProvider if there is no +*/ + __Pyx_INCREF(__pyx_v_kw); + __Pyx_GIVEREF(__pyx_v_kw); + __Pyx_GOTREF(__pyx_v_self->dynamic_timer_tag_arg_name); + __Pyx_DECREF(__pyx_v_self->dynamic_timer_tag_arg_name); + __pyx_v_self->dynamic_timer_tag_arg_name = __pyx_v_kw; + + /* "apache_beam/runners/common.py":200 + * v.watermark_estimator_provider or obj_to_invoke) + * self.watermark_estimator_provider_arg_name = kw + * elif core.DoFn.DynamicTimerTagParam == v: # <<<<<<<<<<<<<< + * self.dynamic_timer_tag_arg_name = kw + * +*/ + } + __pyx_L14:; + + /* "apache_beam/runners/common.py":178 + * self.unbounded_per_element = False + * + * for kw, v in zip(self.args[-len(self.defaults):], self.defaults): # <<<<<<<<<<<<<< + * if isinstance(v, core.DoFn.StateParam): + * self.state_args_to_replace[kw] = v.state_spec +*/ + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/common.py":205 + * # Create NoOpWatermarkEstimatorProvider if there is no + * # WatermarkEstimatorParam provided. + * if self.watermark_estimator_provider is None: # <<<<<<<<<<<<<< + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() + * +*/ + __pyx_t_5 = (__pyx_v_self->watermark_estimator_provider == Py_None); + if (__pyx_t_5) { + + /* "apache_beam/runners/common.py":206 + * # WatermarkEstimatorParam provided. + * if self.watermark_estimator_provider is None: + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() # <<<<<<<<<<<<<< + * + * def invoke_timer_callback( +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NoOpWatermarkEstimatorProvider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider); + __pyx_v_self->watermark_estimator_provider = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/runners/common.py":205 + * # Create NoOpWatermarkEstimatorProvider if there is no + * # WatermarkEstimatorParam provided. + * if self.watermark_estimator_provider is None: # <<<<<<<<<<<<<< + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() + * +*/ + } + + /* "apache_beam/runners/common.py":139 + * + * Represents a method that can be invoked by `DoFnInvoker`.""" + * def __init__(self, obj_to_invoke, method_name): # <<<<<<<<<<<<<< + * """ + * Initiates a ``MethodWrapper``. +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_v); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":208 + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() + * + * def invoke_timer_callback( # <<<<<<<<<<<<<< + * self, + * user_state_context, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback = {"invoke_timer_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_user_state_context = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_window = 0; + PyObject *__pyx_v_timestamp = 0; + PyObject *__pyx_v_pane_info = 0; + PyObject *__pyx_v_dynamic_timer_tag = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_timer_callback (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_user_state_context,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_window,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_pane_info,&__pyx_mstate_global->__pyx_n_u_dynamic_timer_tag,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 208, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_timer_callback", 0) < (0)) __PYX_ERR(0, 208, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, i); __PYX_ERR(0, 208, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 208, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 208, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 208, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 208, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 208, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 208, __pyx_L3_error) + } + __pyx_v_user_state_context = values[0]; + __pyx_v_key = values[1]; + __pyx_v_window = values[2]; + __pyx_v_timestamp = values[3]; + __pyx_v_pane_info = values[4]; + __pyx_v_dynamic_timer_tag = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_timer_callback", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 208, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.invoke_timer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_2invoke_timer_callback(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), __pyx_v_user_state_context, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info, __pyx_v_dynamic_timer_tag); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_2invoke_timer_callback(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag) { + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_kw = NULL; + PyObject *__pyx_v_state_spec = NULL; + PyObject *__pyx_v_timer_spec = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + size_t __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_timer_callback", 0); + + /* "apache_beam/runners/common.py":217 + * dynamic_timer_tag): + * # TODO(ccy): support side inputs. + * kwargs = {} # <<<<<<<<<<<<<< + * if self.has_userstate_arguments: + * for kw, state_spec in self.state_args_to_replace.items(): +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":218 + * # TODO(ccy): support side inputs. + * kwargs = {} + * if self.has_userstate_arguments: # <<<<<<<<<<<<<< + * for kw, state_spec in self.state_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) +*/ + if (__pyx_v_self->has_userstate_arguments) { + + /* "apache_beam/runners/common.py":219 + * kwargs = {} + * if self.has_userstate_arguments: + * for kw, state_spec in self.state_args_to_replace.items(): # <<<<<<<<<<<<<< + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) + * for kw, timer_spec in self.timer_args_to_replace.items(): +*/ + __pyx_t_2 = 0; + if (unlikely(__pyx_v_self->state_args_to_replace == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 219, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->state_args_to_replace, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); + if (unlikely(__pyx_t_7 == 0)) break; + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_state_spec, __pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":220 + * if self.has_userstate_arguments: + * for kw, state_spec in self.state_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) # <<<<<<<<<<<<<< + * for kw, timer_spec in self.timer_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_timer( +*/ + __pyx_t_5 = __pyx_v_user_state_context; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_state_spec, __pyx_v_key, __pyx_v_window}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_state, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kw, __pyx_t_6) < 0))) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":221 + * for kw, state_spec in self.state_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) + * for kw, timer_spec in self.timer_args_to_replace.items(): # <<<<<<<<<<<<<< + * kwargs[kw] = user_state_context.get_timer( + * timer_spec, key, window, timestamp, pane_info) +*/ + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->timer_args_to_replace == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 221, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self->timer_args_to_replace, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_2), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4); + if (unlikely(__pyx_t_7 == 0)) break; + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_timer_spec, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":222 + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) + * for kw, timer_spec in self.timer_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_timer( # <<<<<<<<<<<<<< + * timer_spec, key, window, timestamp, pane_info) + * +*/ + __pyx_t_6 = __pyx_v_user_state_context; + __Pyx_INCREF(__pyx_t_6); + + /* "apache_beam/runners/common.py":223 + * for kw, timer_spec in self.timer_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_timer( + * timer_spec, key, window, timestamp, pane_info) # <<<<<<<<<<<<<< + * + * if self.timestamp_arg_name: +*/ + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[6] = {__pyx_t_6, __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_timer, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/runners/common.py":222 + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) + * for kw, timer_spec in self.timer_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_timer( # <<<<<<<<<<<<<< + * timer_spec, key, window, timestamp, pane_info) + * +*/ + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kw, __pyx_t_5) < 0))) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":218 + * # TODO(ccy): support side inputs. + * kwargs = {} + * if self.has_userstate_arguments: # <<<<<<<<<<<<<< + * for kw, state_spec in self.state_args_to_replace.items(): + * kwargs[kw] = user_state_context.get_state(state_spec, key, window) +*/ + } + + /* "apache_beam/runners/common.py":225 + * timer_spec, key, window, timestamp, pane_info) + * + * if self.timestamp_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) + * if self.window_arg_name: +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->timestamp_arg_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 225, __pyx_L1_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":226 + * + * if self.timestamp_arg_name: + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) # <<<<<<<<<<<<<< + * if self.window_arg_name: + * kwargs[self.window_arg_name] = window +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_of); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_timestamp}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_self->timestamp_arg_name, __pyx_t_1) < 0))) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":225 + * timer_spec, key, window, timestamp, pane_info) + * + * if self.timestamp_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) + * if self.window_arg_name: +*/ + } + + /* "apache_beam/runners/common.py":227 + * if self.timestamp_arg_name: + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) + * if self.window_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.window_arg_name] = window + * if self.key_arg_name: +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->window_arg_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 227, __pyx_L1_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":228 + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) + * if self.window_arg_name: + * kwargs[self.window_arg_name] = window # <<<<<<<<<<<<<< + * if self.key_arg_name: + * kwargs[self.key_arg_name] = key +*/ + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_self->window_arg_name, __pyx_v_window) < 0))) __PYX_ERR(0, 228, __pyx_L1_error) + + /* "apache_beam/runners/common.py":227 + * if self.timestamp_arg_name: + * kwargs[self.timestamp_arg_name] = Timestamp.of(timestamp) + * if self.window_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.window_arg_name] = window + * if self.key_arg_name: +*/ + } + + /* "apache_beam/runners/common.py":229 + * if self.window_arg_name: + * kwargs[self.window_arg_name] = window + * if self.key_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.key_arg_name] = key + * if self.dynamic_timer_tag_arg_name: +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->key_arg_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 229, __pyx_L1_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":230 + * kwargs[self.window_arg_name] = window + * if self.key_arg_name: + * kwargs[self.key_arg_name] = key # <<<<<<<<<<<<<< + * if self.dynamic_timer_tag_arg_name: + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag +*/ + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_self->key_arg_name, __pyx_v_key) < 0))) __PYX_ERR(0, 230, __pyx_L1_error) + + /* "apache_beam/runners/common.py":229 + * if self.window_arg_name: + * kwargs[self.window_arg_name] = window + * if self.key_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.key_arg_name] = key + * if self.dynamic_timer_tag_arg_name: +*/ + } + + /* "apache_beam/runners/common.py":231 + * if self.key_arg_name: + * kwargs[self.key_arg_name] = key + * if self.dynamic_timer_tag_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag + * +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->dynamic_timer_tag_arg_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":232 + * kwargs[self.key_arg_name] = key + * if self.dynamic_timer_tag_arg_name: + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag # <<<<<<<<<<<<<< + * + * if kwargs: +*/ + if (unlikely((PyDict_SetItem(__pyx_v_kwargs, __pyx_v_self->dynamic_timer_tag_arg_name, __pyx_v_dynamic_timer_tag) < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + + /* "apache_beam/runners/common.py":231 + * if self.key_arg_name: + * kwargs[self.key_arg_name] = key + * if self.dynamic_timer_tag_arg_name: # <<<<<<<<<<<<<< + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag + * +*/ + } + + /* "apache_beam/runners/common.py":234 + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag + * + * if kwargs: # <<<<<<<<<<<<<< + * return self.method_value(**kwargs) + * else: +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 234, __pyx_L1_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":235 + * + * if kwargs: + * return self.method_value(**kwargs) # <<<<<<<<<<<<<< + * else: + * return self.method_value() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_v_self->method_value, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":234 + * kwargs[self.dynamic_timer_tag_arg_name] = dynamic_timer_tag + * + * if kwargs: # <<<<<<<<<<<<<< + * return self.method_value(**kwargs) + * else: +*/ + } + + /* "apache_beam/runners/common.py":237 + * return self.method_value(**kwargs) + * else: + * return self.method_value() # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_self->method_value); + __pyx_t_5 = __pyx_v_self->method_value; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":208 + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() + * + * def invoke_timer_callback( # <<<<<<<<<<<<<< + * self, + * user_state_context, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.invoke_timer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_state_spec); + __Pyx_XDECREF(__pyx_v_timer_spec); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":37 + * + * cdef class MethodWrapper(object): + * cdef public object args # <<<<<<<<<<<<<< + * cdef public object defaults + * cdef public object method_value +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args___get__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->args); + __pyx_r = __pyx_v_self->args; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->args); + __Pyx_DECREF(__pyx_v_self->args); + __pyx_v_self->args = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4args_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->args); + __Pyx_DECREF(__pyx_v_self->args); + __pyx_v_self->args = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":38 + * cdef class MethodWrapper(object): + * cdef public object args + * cdef public object defaults # <<<<<<<<<<<<<< + * cdef public object method_value + * cdef str method_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults___get__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->defaults); + __pyx_r = __pyx_v_self->defaults; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->defaults); + __Pyx_DECREF(__pyx_v_self->defaults); + __pyx_v_self->defaults = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_8defaults_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->defaults); + __Pyx_DECREF(__pyx_v_self->defaults); + __pyx_v_self->defaults = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":39 + * cdef public object args + * cdef public object defaults + * cdef public object method_value # <<<<<<<<<<<<<< + * cdef str method_name + * cdef bint has_userstate_arguments +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value___get__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->method_value); + __pyx_r = __pyx_v_self->method_value; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->method_value); + __Pyx_DECREF(__pyx_v_self->method_value); + __pyx_v_self->method_value = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_12method_value_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->method_value); + __Pyx_DECREF(__pyx_v_self->method_value); + __pyx_v_self->method_value = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":49 + * cdef object restriction_provider + * cdef object restriction_provider_arg_name + * cdef public object watermark_estimator_provider # <<<<<<<<<<<<<< + * cdef object watermark_estimator_provider_arg_name + * cdef object dynamic_timer_tag_arg_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider___get__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider___get__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->watermark_estimator_provider); + __pyx_r = __pyx_v_self->watermark_estimator_provider; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider); + __pyx_v_self->watermark_estimator_provider = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_provider); + __pyx_v_self->watermark_estimator_provider = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.args, self.defaults, self.dynamic_timer_tag_arg_name, self.has_userstate_arguments, self.key_arg_name, self.method_name, self.method_value, self.restriction_provider, self.restriction_provider_arg_name, self.state_args_to_replace, self.timer_args_to_replace, self.timestamp_arg_name, self.unbounded_per_element, self.watermark_estimator_provider, self.watermark_estimator_provider_arg_name, self.window_arg_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_userstate_arguments); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->unbounded_per_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->args); + __Pyx_GIVEREF(__pyx_v_self->args); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->args) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->defaults); + __Pyx_GIVEREF(__pyx_v_self->defaults); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->defaults) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->dynamic_timer_tag_arg_name); + __Pyx_GIVEREF(__pyx_v_self->dynamic_timer_tag_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->dynamic_timer_tag_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->key_arg_name); + __Pyx_GIVEREF(__pyx_v_self->key_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->key_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->method_name); + __Pyx_GIVEREF(__pyx_v_self->method_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->method_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->method_value); + __Pyx_GIVEREF(__pyx_v_self->method_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->method_value) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->restriction_provider); + __Pyx_GIVEREF(__pyx_v_self->restriction_provider); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->restriction_provider) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->restriction_provider_arg_name); + __Pyx_GIVEREF(__pyx_v_self->restriction_provider_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->restriction_provider_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->state_args_to_replace); + __Pyx_GIVEREF(__pyx_v_self->state_args_to_replace); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->state_args_to_replace) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timer_args_to_replace); + __Pyx_GIVEREF(__pyx_v_self->timer_args_to_replace); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->timer_args_to_replace) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timestamp_arg_name); + __Pyx_GIVEREF(__pyx_v_self->timestamp_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->timestamp_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->watermark_estimator_provider); + __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_provider); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->watermark_estimator_provider) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->watermark_estimator_provider_arg_name); + __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_provider_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->watermark_estimator_provider_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->window_arg_name); + __Pyx_GIVEREF(__pyx_v_self->window_arg_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->window_arg_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.args, self.defaults, self.dynamic_timer_tag_arg_name, self.has_userstate_arguments, self.key_arg_name, self.method_name, self.method_value, self.restriction_provider, self.restriction_provider_arg_name, self.state_args_to_replace, self.timer_args_to_replace, self.timestamp_arg_name, self.unbounded_per_element, self.watermark_estimator_provider, self.watermark_estimator_provider_arg_name, self.window_arg_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.args, self.defaults, self.dynamic_timer_tag_arg_name, self.has_userstate_arguments, self.key_arg_name, self.method_name, self.method_value, self.restriction_provider, self.restriction_provider_arg_name, self.state_args_to_replace, self.timer_args_to_replace, self.timestamp_arg_name, self.unbounded_per_element, self.watermark_estimator_provider, self.watermark_estimator_provider_arg_name, self.window_arg_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.args is not None or self.defaults is not None or self.dynamic_timer_tag_arg_name is not None or self.key_arg_name is not None or self.method_name is not None or self.method_value is not None or self.restriction_provider is not None or self.restriction_provider_arg_name is not None or self.state_args_to_replace is not None or self.timer_args_to_replace is not None or self.timestamp_arg_name is not None or self.watermark_estimator_provider is not None or self.watermark_estimator_provider_arg_name is not None or self.window_arg_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.args, self.defaults, self.dynamic_timer_tag_arg_name, self.has_userstate_arguments, self.key_arg_name, self.method_name, self.method_value, self.restriction_provider, self.restriction_provider_arg_name, self.state_args_to_replace, self.timer_args_to_replace, self.timestamp_arg_name, self.unbounded_per_element, self.watermark_estimator_provider, self.watermark_estimator_provider_arg_name, self.window_arg_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.args is not None or self.defaults is not None or self.dynamic_timer_tag_arg_name is not None or self.key_arg_name is not None or self.method_name is not None or self.method_value is not None or self.restriction_provider is not None or self.restriction_provider_arg_name is not None or self.state_args_to_replace is not None or self.timer_args_to_replace is not None or self.timestamp_arg_name is not None or self.watermark_estimator_provider is not None or self.watermark_estimator_provider_arg_name is not None or self.window_arg_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->args != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->defaults != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->dynamic_timer_tag_arg_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->key_arg_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->method_name != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->method_value != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->restriction_provider != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->restriction_provider_arg_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->state_args_to_replace != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->timer_args_to_replace != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->timestamp_arg_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->watermark_estimator_provider != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->watermark_estimator_provider_arg_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->window_arg_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.args is not None or self.defaults is not None or self.dynamic_timer_tag_arg_name is not None or self.key_arg_name is not None or self.method_name is not None or self.method_value is not None or self.restriction_provider is not None or self.restriction_provider_arg_name is not None or self.state_args_to_replace is not None or self.timer_args_to_replace is not None or self.timestamp_arg_name is not None or self.watermark_estimator_provider is not None or self.watermark_estimator_provider_arg_name is not None or self.window_arg_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.args is not None or self.defaults is not None or self.dynamic_timer_tag_arg_name is not None or self.key_arg_name is not None or self.method_name is not None or self.method_value is not None or self.restriction_provider is not None or self.restriction_provider_arg_name is not None or self.state_args_to_replace is not None or self.timer_args_to_replace is not None or self.timestamp_arg_name is not None or self.watermark_estimator_provider is not None or self.watermark_estimator_provider_arg_name is not None or self.window_arg_name is not None + * if use_setstate: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MethodWrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_77316345); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_77316345); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_77316345) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.args is not None or self.defaults is not None or self.dynamic_timer_tag_arg_name is not None or self.key_arg_name is not None or self.method_name is not None or self.method_value is not None or self.restriction_provider is not None or self.restriction_provider_arg_name is not None or self.state_args_to_replace is not None or self.timer_args_to_replace is not None or self.timestamp_arg_name is not None or self.watermark_estimator_provider is not None or self.watermark_estimator_provider_arg_name is not None or self.window_arg_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, None), state + * else: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MethodWrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_77316345); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_77316345); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_77316345) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13MethodWrapper_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_MethodWrapper__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.MethodWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":247 + * # Other possibilities: BATCH_PREFERRED (with min batch size specified) + * + * @property # <<<<<<<<<<<<<< + * def supports_batches(self) -> bool: + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches = {"supports_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supports_batches (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 247, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 247, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "supports_batches", 0) < (0)) __PYX_ERR(0, 247, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("supports_batches", 1, 1, 1, i); __PYX_ERR(0, 247, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 247, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("supports_batches", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 247, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.supports_batches", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_supports_batches(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_supports_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("supports_batches", 0); + + /* "apache_beam/runners/common.py":249 + * @property + * def supports_batches(self) -> bool: + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_t_1 = __pyx_v_self; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_BATCH_REQUIRED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_DO_NOT_CARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_5; + __pyx_L3_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":247 + * # Other possibilities: BATCH_PREFERRED (with min batch size specified) + * + * @property # <<<<<<<<<<<<<< + * def supports_batches(self) -> bool: + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.supports_batches", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":251 + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def supports_elements(self) -> bool: + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements = {"supports_elements", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supports_elements (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 251, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 251, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "supports_elements", 0) < (0)) __PYX_ERR(0, 251, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("supports_elements", 1, 1, 1, i); __PYX_ERR(0, 251, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 251, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("supports_elements", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 251, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.supports_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_2supports_elements(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_2supports_elements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("supports_elements", 0); + + /* "apache_beam/runners/common.py":253 + * @property + * def supports_elements(self) -> bool: + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_t_1 = __pyx_v_self; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_DO_NOT_CARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_5; + __pyx_L3_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":251 + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def supports_elements(self) -> bool: + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.supports_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":255 + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def requires_batches(self) -> bool: + * return self == self.BATCH_REQUIRED +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches = {"requires_batches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("requires_batches (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 255, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 255, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "requires_batches", 0) < (0)) __PYX_ERR(0, 255, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("requires_batches", 1, 1, 1, i); __PYX_ERR(0, 255, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 255, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("requires_batches", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 255, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.requires_batches", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_4requires_batches(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18BatchingPreference_4requires_batches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("requires_batches", 0); + + /* "apache_beam/runners/common.py":257 + * @property + * def requires_batches(self) -> bool: + * return self == self.BATCH_REQUIRED # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_BATCH_REQUIRED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_self, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":255 + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def requires_batches(self) -> bool: + * return self == self.BATCH_REQUIRED +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.BatchingPreference.requires_batches", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":271 + * feature set offered by it. + * """ + * def __init__(self, do_fn): # <<<<<<<<<<<<<< + * # type: (core.DoFn) -> None + * # We add a property here for all methods defined by Beam DoFn features. +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_do_fn = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_do_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 271, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 271, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 271, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 271, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 271, __pyx_L3_error) + } + __pyx_v_do_fn = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 271, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature___init__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), __pyx_v_do_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_do_fn) { + PyObject *__pyx_v_restriction_provider = NULL; + PyObject *__pyx_v_watermark_estimator_provider = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_all_timer_specs = NULL; + PyObject *__pyx_v_timer_spec = NULL; + PyObject *__pyx_v_method = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + Py_ssize_t __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":275 + * # We add a property here for all methods defined by Beam DoFn features. + * + * assert isinstance(do_fn, core.DoFn) # <<<<<<<<<<<<<< + * self.do_fn = do_fn + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_do_fn, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 275, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 275, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":276 + * + * assert isinstance(do_fn, core.DoFn) + * self.do_fn = do_fn # <<<<<<<<<<<<<< + * + * self.process_method = MethodWrapper(do_fn, 'process') +*/ + __Pyx_INCREF(__pyx_v_do_fn); + __Pyx_GIVEREF(__pyx_v_do_fn); + __Pyx_GOTREF(__pyx_v_self->do_fn); + __Pyx_DECREF(__pyx_v_self->do_fn); + __pyx_v_self->do_fn = __pyx_v_do_fn; + + /* "apache_beam/runners/common.py":278 + * self.do_fn = do_fn + * + * self.process_method = MethodWrapper(do_fn, 'process') # <<<<<<<<<<<<<< + * self.process_batch_method = MethodWrapper(do_fn, 'process_batch') + * self.start_bundle_method = MethodWrapper(do_fn, 'start_bundle') +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_process}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_method); + __pyx_v_self->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":279 + * + * self.process_method = MethodWrapper(do_fn, 'process') + * self.process_batch_method = MethodWrapper(do_fn, 'process_batch') # <<<<<<<<<<<<<< + * self.start_bundle_method = MethodWrapper(do_fn, 'start_bundle') + * self.finish_bundle_method = MethodWrapper(do_fn, 'finish_bundle') +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_process_batch}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_batch_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_batch_method); + __pyx_v_self->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":280 + * self.process_method = MethodWrapper(do_fn, 'process') + * self.process_batch_method = MethodWrapper(do_fn, 'process_batch') + * self.start_bundle_method = MethodWrapper(do_fn, 'start_bundle') # <<<<<<<<<<<<<< + * self.finish_bundle_method = MethodWrapper(do_fn, 'finish_bundle') + * self.setup_lifecycle_method = MethodWrapper(do_fn, 'setup') +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_start_bundle}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->start_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->start_bundle_method); + __pyx_v_self->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":281 + * self.process_batch_method = MethodWrapper(do_fn, 'process_batch') + * self.start_bundle_method = MethodWrapper(do_fn, 'start_bundle') + * self.finish_bundle_method = MethodWrapper(do_fn, 'finish_bundle') # <<<<<<<<<<<<<< + * self.setup_lifecycle_method = MethodWrapper(do_fn, 'setup') + * self.teardown_lifecycle_method = MethodWrapper(do_fn, 'teardown') +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_finish_bundle}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->finish_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->finish_bundle_method); + __pyx_v_self->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":282 + * self.start_bundle_method = MethodWrapper(do_fn, 'start_bundle') + * self.finish_bundle_method = MethodWrapper(do_fn, 'finish_bundle') + * self.setup_lifecycle_method = MethodWrapper(do_fn, 'setup') # <<<<<<<<<<<<<< + * self.teardown_lifecycle_method = MethodWrapper(do_fn, 'teardown') + * +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_setup}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __pyx_v_self->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":283 + * self.finish_bundle_method = MethodWrapper(do_fn, 'finish_bundle') + * self.setup_lifecycle_method = MethodWrapper(do_fn, 'setup') + * self.teardown_lifecycle_method = MethodWrapper(do_fn, 'teardown') # <<<<<<<<<<<<<< + * + * restriction_provider = self.get_restriction_provider() +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_do_fn, __pyx_mstate_global->__pyx_n_u_teardown}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __pyx_v_self->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":285 + * self.teardown_lifecycle_method = MethodWrapper(do_fn, 'teardown') + * + * restriction_provider = self.get_restriction_provider() # <<<<<<<<<<<<<< + * watermark_estimator_provider = self.get_watermark_estimator_provider() + * self.create_watermark_estimator_method = ( +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_restriction_provider = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":286 + * + * restriction_provider = self.get_restriction_provider() + * watermark_estimator_provider = self.get_watermark_estimator_provider() # <<<<<<<<<<<<<< + * self.create_watermark_estimator_method = ( + * MethodWrapper( +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_watermark_estimator_provider, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_watermark_estimator_provider = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":288 + * watermark_estimator_provider = self.get_watermark_estimator_provider() + * self.create_watermark_estimator_method = ( + * MethodWrapper( # <<<<<<<<<<<<<< + * watermark_estimator_provider, 'create_watermark_estimator')) + * self.initial_restriction_method = ( +*/ + __pyx_t_1 = NULL; + + /* "apache_beam/runners/common.py":289 + * self.create_watermark_estimator_method = ( + * MethodWrapper( + * watermark_estimator_provider, 'create_watermark_estimator')) # <<<<<<<<<<<<<< + * self.initial_restriction_method = ( + * MethodWrapper(restriction_provider, 'initial_restriction') +*/ + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_watermark_estimator_provider, __pyx_mstate_global->__pyx_n_u_create_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + + /* "apache_beam/runners/common.py":287 + * restriction_provider = self.get_restriction_provider() + * watermark_estimator_provider = self.get_watermark_estimator_provider() + * self.create_watermark_estimator_method = ( # <<<<<<<<<<<<<< + * MethodWrapper( + * watermark_estimator_provider, 'create_watermark_estimator')) +*/ + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __pyx_v_self->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":292 + * self.initial_restriction_method = ( + * MethodWrapper(restriction_provider, 'initial_restriction') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_restriction_provider); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 292, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":291 + * watermark_estimator_provider, 'create_watermark_estimator')) + * self.initial_restriction_method = ( + * MethodWrapper(restriction_provider, 'initial_restriction') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * self.create_tracker_method = ( +*/ + __pyx_t_5 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_restriction_provider, __pyx_mstate_global->__pyx_n_u_initial_restriction}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_2 = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + } else { + + /* "apache_beam/runners/common.py":292 + * self.initial_restriction_method = ( + * MethodWrapper(restriction_provider, 'initial_restriction') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') +*/ + __Pyx_INCREF(Py_None); + __pyx_t_2 = Py_None; + } + + /* "apache_beam/runners/common.py":291 + * watermark_estimator_provider, 'create_watermark_estimator')) + * self.initial_restriction_method = ( + * MethodWrapper(restriction_provider, 'initial_restriction') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * self.create_tracker_method = ( +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(0, 291, __pyx_L1_error) + + /* "apache_beam/runners/common.py":290 + * MethodWrapper( + * watermark_estimator_provider, 'create_watermark_estimator')) + * self.initial_restriction_method = ( # <<<<<<<<<<<<<< + * MethodWrapper(restriction_provider, 'initial_restriction') + * if restriction_provider else None) +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->initial_restriction_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->initial_restriction_method); + __pyx_v_self->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":295 + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_restriction_provider); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 295, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":294 + * if restriction_provider else None) + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * self.split_method = ( +*/ + __pyx_t_5 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_restriction_provider, __pyx_mstate_global->__pyx_n_u_create_tracker}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_2 = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + } else { + + /* "apache_beam/runners/common.py":295 + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') +*/ + __Pyx_INCREF(Py_None); + __pyx_t_2 = Py_None; + } + + /* "apache_beam/runners/common.py":294 + * if restriction_provider else None) + * self.create_tracker_method = ( + * MethodWrapper(restriction_provider, 'create_tracker') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * self.split_method = ( +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(0, 294, __pyx_L1_error) + + /* "apache_beam/runners/common.py":293 + * MethodWrapper(restriction_provider, 'initial_restriction') + * if restriction_provider else None) + * self.create_tracker_method = ( # <<<<<<<<<<<<<< + * MethodWrapper(restriction_provider, 'create_tracker') + * if restriction_provider else None) +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_tracker_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_tracker_method); + __pyx_v_self->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":298 + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * + * self._validate() +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_restriction_provider); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 298, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":297 + * if restriction_provider else None) + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * +*/ + __pyx_t_5 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_restriction_provider, __pyx_mstate_global->__pyx_n_u_split}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_2 = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + } else { + + /* "apache_beam/runners/common.py":298 + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') + * if restriction_provider else None) # <<<<<<<<<<<<<< + * + * self._validate() +*/ + __Pyx_INCREF(Py_None); + __pyx_t_2 = Py_None; + } + + /* "apache_beam/runners/common.py":297 + * if restriction_provider else None) + * self.split_method = ( + * MethodWrapper(restriction_provider, 'split') # <<<<<<<<<<<<<< + * if restriction_provider else None) + * +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(0, 297, __pyx_L1_error) + + /* "apache_beam/runners/common.py":296 + * MethodWrapper(restriction_provider, 'create_tracker') + * if restriction_provider else None) + * self.split_method = ( # <<<<<<<<<<<<<< + * MethodWrapper(restriction_provider, 'split') + * if restriction_provider else None) +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->split_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->split_method); + __pyx_v_self->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":300 + * if restriction_provider else None) + * + * self._validate() # <<<<<<<<<<<<<< + * + * # Handle stateful DoFns. +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":303 + * + * # Handle stateful DoFns. + * self._is_stateful_dofn = userstate.is_stateful_dofn(do_fn) # <<<<<<<<<<<<<< + * self.timer_methods = {} # type: Dict[TimerSpec, MethodWrapper] + * if self._is_stateful_dofn: +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_userstate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_stateful_dofn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_do_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_is_stateful_dofn = __pyx_t_3; + + /* "apache_beam/runners/common.py":304 + * # Handle stateful DoFns. + * self._is_stateful_dofn = userstate.is_stateful_dofn(do_fn) + * self.timer_methods = {} # type: Dict[TimerSpec, MethodWrapper] # <<<<<<<<<<<<<< + * if self._is_stateful_dofn: + * # Populate timer firing methods, keyed by TimerSpec. +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->timer_methods); + __Pyx_DECREF(__pyx_v_self->timer_methods); + __pyx_v_self->timer_methods = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":305 + * self._is_stateful_dofn = userstate.is_stateful_dofn(do_fn) + * self.timer_methods = {} # type: Dict[TimerSpec, MethodWrapper] + * if self._is_stateful_dofn: # <<<<<<<<<<<<<< + * # Populate timer firing methods, keyed by TimerSpec. + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) +*/ + if (__pyx_v_self->_is_stateful_dofn) { + + /* "apache_beam/runners/common.py":307 + * if self._is_stateful_dofn: + * # Populate timer firing methods, keyed by TimerSpec. + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) # <<<<<<<<<<<<<< + * for timer_spec in all_timer_specs: + * method = timer_spec._attached_callback +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_userstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dofn_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_do_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 307, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_6); + } else { + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_6); + } + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + __pyx_v__ = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_all_timer_specs = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":308 + * # Populate timer firing methods, keyed by TimerSpec. + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) + * for timer_spec in all_timer_specs: # <<<<<<<<<<<<<< + * method = timer_spec._attached_callback + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) +*/ + if (likely(PyList_CheckExact(__pyx_v_all_timer_specs)) || PyTuple_CheckExact(__pyx_v_all_timer_specs)) { + __pyx_t_2 = __pyx_v_all_timer_specs; __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_all_timer_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 308, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 308, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_8; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 308, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); + #endif + ++__pyx_t_8; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 308, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_9(__pyx_t_2); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 308, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_timer_spec, __pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":309 + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) + * for timer_spec in all_timer_specs: + * method = timer_spec._attached_callback # <<<<<<<<<<<<<< + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) + * +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_spec, __pyx_mstate_global->__pyx_n_u_attached_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_method, __pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":310 + * for timer_spec in all_timer_specs: + * method = timer_spec._attached_callback + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) # <<<<<<<<<<<<<< + * + * def get_restriction_provider(self): +*/ + __pyx_t_5 = NULL; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_do_fn, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_6); + } + if (unlikely((PyObject_SetItem(__pyx_v_self->timer_methods, __pyx_v_timer_spec, ((PyObject *)__pyx_t_6)) < 0))) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":308 + * # Populate timer firing methods, keyed by TimerSpec. + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) + * for timer_spec in all_timer_specs: # <<<<<<<<<<<<<< + * method = timer_spec._attached_callback + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":305 + * self._is_stateful_dofn = userstate.is_stateful_dofn(do_fn) + * self.timer_methods = {} # type: Dict[TimerSpec, MethodWrapper] + * if self._is_stateful_dofn: # <<<<<<<<<<<<<< + * # Populate timer firing methods, keyed by TimerSpec. + * _, all_timer_specs = userstate.get_dofn_specs(do_fn) +*/ + } + + /* "apache_beam/runners/common.py":271 + * feature set offered by it. + * """ + * def __init__(self, do_fn): # <<<<<<<<<<<<<< + * # type: (core.DoFn) -> None + * # We add a property here for all methods defined by Beam DoFn features. +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_restriction_provider); + __Pyx_XDECREF(__pyx_v_watermark_estimator_provider); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_all_timer_specs); + __Pyx_XDECREF(__pyx_v_timer_spec); + __Pyx_XDECREF(__pyx_v_method); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":312 + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) + * + * def get_restriction_provider(self): # <<<<<<<<<<<<<< + * # type: () -> RestrictionProvider + * return self.process_method.restriction_provider +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider = {"get_restriction_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_restriction_provider (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_restriction_provider", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_restriction_provider", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_2get_restriction_provider(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_2get_restriction_provider(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_restriction_provider", 0); + + /* "apache_beam/runners/common.py":314 + * def get_restriction_provider(self): + * # type: () -> RestrictionProvider + * return self.process_method.restriction_provider # <<<<<<<<<<<<<< + * + * def get_watermark_estimator_provider(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->process_method->restriction_provider); + __pyx_r = __pyx_v_self->process_method->restriction_provider; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":312 + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) + * + * def get_restriction_provider(self): # <<<<<<<<<<<<<< + * # type: () -> RestrictionProvider + * return self.process_method.restriction_provider +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":316 + * return self.process_method.restriction_provider + * + * def get_watermark_estimator_provider(self): # <<<<<<<<<<<<<< + * # type: () -> WatermarkEstimatorProvider + * return self.process_method.watermark_estimator_provider +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider = {"get_watermark_estimator_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_watermark_estimator_provider (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_watermark_estimator_provider", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_watermark_estimator_provider", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_4get_watermark_estimator_provider(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_4get_watermark_estimator_provider(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_watermark_estimator_provider", 0); + + /* "apache_beam/runners/common.py":318 + * def get_watermark_estimator_provider(self): + * # type: () -> WatermarkEstimatorProvider + * return self.process_method.watermark_estimator_provider # <<<<<<<<<<<<<< + * + * def is_unbounded_per_element(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->process_method->watermark_estimator_provider); + __pyx_r = __pyx_v_self->process_method->watermark_estimator_provider; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":316 + * return self.process_method.restriction_provider + * + * def get_watermark_estimator_provider(self): # <<<<<<<<<<<<<< + * # type: () -> WatermarkEstimatorProvider + * return self.process_method.watermark_estimator_provider +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":320 + * return self.process_method.watermark_estimator_provider + * + * def is_unbounded_per_element(self): # <<<<<<<<<<<<<< + * return self.process_method.unbounded_per_element + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element = {"is_unbounded_per_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_unbounded_per_element (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_unbounded_per_element", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_unbounded_per_element", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_6is_unbounded_per_element(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_6is_unbounded_per_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_unbounded_per_element", 0); + + /* "apache_beam/runners/common.py":321 + * + * def is_unbounded_per_element(self): + * return self.process_method.unbounded_per_element # <<<<<<<<<<<<<< + * + * def _validate(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->process_method->unbounded_per_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":320 + * return self.process_method.watermark_estimator_provider + * + * def is_unbounded_per_element(self): # <<<<<<<<<<<<<< + * return self.process_method.unbounded_per_element + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.is_unbounded_per_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":323 + * return self.process_method.unbounded_per_element + * + * def _validate(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._validate_process() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_9_validate = {"_validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_validate (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_validate", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_validate", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_8_validate(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_8_validate(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_validate", 0); + + /* "apache_beam/runners/common.py":325 + * def _validate(self): + * # type: () -> None + * self._validate_process() # <<<<<<<<<<<<<< + * self._validate_process_batch() + * self._validate_bundle_method(self.start_bundle_method) +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_process, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":326 + * # type: () -> None + * self._validate_process() + * self._validate_process_batch() # <<<<<<<<<<<<<< + * self._validate_bundle_method(self.start_bundle_method) + * self._validate_bundle_method(self.finish_bundle_method) +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_process_batch, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":327 + * self._validate_process() + * self._validate_process_batch() + * self._validate_bundle_method(self.start_bundle_method) # <<<<<<<<<<<<<< + * self._validate_bundle_method(self.finish_bundle_method) + * self._validate_stateful_dofn() +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self->start_bundle_method)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_bundle_method, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":328 + * self._validate_process_batch() + * self._validate_bundle_method(self.start_bundle_method) + * self._validate_bundle_method(self.finish_bundle_method) # <<<<<<<<<<<<<< + * self._validate_stateful_dofn() + * +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self->finish_bundle_method)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_bundle_method, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":329 + * self._validate_bundle_method(self.start_bundle_method) + * self._validate_bundle_method(self.finish_bundle_method) + * self._validate_stateful_dofn() # <<<<<<<<<<<<<< + * + * def _check_duplicate_dofn_params(self, method: MethodWrapper): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_stateful_dofn, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":323 + * return self.process_method.unbounded_per_element + * + * def _validate(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._validate_process() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":331 + * self._validate_stateful_dofn() + * + * def _check_duplicate_dofn_params(self, method: MethodWrapper): # <<<<<<<<<<<<<< + * param_ids = [ + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params = {"_check_duplicate_dofn_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_check_duplicate_dofn_params (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 331, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_check_duplicate_dofn_params", 0) < (0)) __PYX_ERR(0, 331, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_check_duplicate_dofn_params", 1, 1, 1, i); __PYX_ERR(0, 331, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error) + } + __pyx_v_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_check_duplicate_dofn_params", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 331, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._check_duplicate_dofn_params", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, 0, "method", 0))) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_10_check_duplicate_dofn_params(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), __pyx_v_method); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_10_check_duplicate_dofn_params(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method) { + PyObject *__pyx_v_param_ids = NULL; + PyObject *__pyx_7genexpr__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10[7]; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_duplicate_dofn_params", 0); + + /* "apache_beam/runners/common.py":332 + * + * def _check_duplicate_dofn_params(self, method: MethodWrapper): + * param_ids = [ # <<<<<<<<<<<<<< + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) + * ] +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":333 + * def _check_duplicate_dofn_params(self, method: MethodWrapper): + * param_ids = [ + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) # <<<<<<<<<<<<<< + * ] + * if len(param_ids) != len(set(param_ids)): +*/ + if (likely(PyList_CheckExact(__pyx_v_method->defaults)) || PyTuple_CheckExact(__pyx_v_method->defaults)) { + __pyx_t_2 = __pyx_v_method->defaults; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_method->defaults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L5_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 333, __pyx_L5_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 333, __pyx_L5_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __pyx_L5_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 333, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_d, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DoFnParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_7genexpr__pyx_v_d, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 333, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_d, __pyx_mstate_global->__pyx_n_u_param_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 332, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_d); __pyx_7genexpr__pyx_v_d = 0; + goto __pyx_L10_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_d); __pyx_7genexpr__pyx_v_d = 0; + goto __pyx_L1_error; + __pyx_L10_exit_scope:; + } /* exit inner scope */ + __pyx_v_param_ids = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":335 + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) + * ] + * if len(param_ids) != len(set(param_ids)): # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn %r has duplicate %s method parameters: %s.' % +*/ + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_param_ids); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_v_param_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_t_3 != __pyx_t_8); + if (unlikely(__pyx_t_7)) { + + /* "apache_beam/runners/common.py":336 + * ] + * if len(param_ids) != len(set(param_ids)): + * raise ValueError( # <<<<<<<<<<<<<< + * 'DoFn %r has duplicate %s method parameters: %s.' % + * (self.do_fn, method.method_name, param_ids)) +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/common.py":338 + * raise ValueError( + * 'DoFn %r has duplicate %s method parameters: %s.' % + * (self.do_fn, method.method_name, param_ids)) # <<<<<<<<<<<<<< + * + * def _validate_process(self): +*/ + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_method->method_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_param_ids), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_DoFn_2; + __pyx_t_10[1] = __pyx_t_6; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_has_duplicate; + __pyx_t_10[3] = __pyx_t_5; + __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_method_parameters; + __pyx_t_10[5] = __pyx_t_9; + __pyx_t_10[6] = __pyx_mstate_global->__pyx_kp_u_; + + /* "apache_beam/runners/common.py":337 + * if len(param_ids) != len(set(param_ids)): + * raise ValueError( + * 'DoFn %r has duplicate %s method parameters: %s.' % # <<<<<<<<<<<<<< + * (self.do_fn, method.method_name, param_ids)) + * +*/ + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 7, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 336, __pyx_L1_error) + + /* "apache_beam/runners/common.py":335 + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) + * ] + * if len(param_ids) != len(set(param_ids)): # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn %r has duplicate %s method parameters: %s.' % +*/ + } + + /* "apache_beam/runners/common.py":331 + * self._validate_stateful_dofn() + * + * def _check_duplicate_dofn_params(self, method: MethodWrapper): # <<<<<<<<<<<<<< + * param_ids = [ + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._check_duplicate_dofn_params", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_param_ids); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":340 + * (self.do_fn, method.method_name, param_ids)) + * + * def _validate_process(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process, "Validate that none of the DoFnParameters are repeated in the function\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process = {"_validate_process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_validate_process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_validate_process", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_validate_process", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_validate_process", 0); + + /* "apache_beam/runners/common.py":345 + * """Validate that none of the DoFnParameters are repeated in the function + * """ + * self._check_duplicate_dofn_params(self.process_method) # <<<<<<<<<<<<<< + * + * def _validate_process_batch(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self->process_method)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_duplicate_dofn_params, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":340 + * (self.do_fn, method.method_name, param_ids)) + * + * def _validate_process(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":347 + * self._check_duplicate_dofn_params(self.process_method) + * + * def _validate_process_batch(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._check_duplicate_dofn_params(self.process_batch_method) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch = {"_validate_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_validate_process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_validate_process_batch", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_validate_process_batch", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14_validate_process_batch(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14_validate_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10[3]; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12[5]; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_validate_process_batch", 0); + + /* "apache_beam/runners/common.py":349 + * def _validate_process_batch(self): + * # type: () -> None + * self._check_duplicate_dofn_params(self.process_batch_method) # <<<<<<<<<<<<<< + * + * for d in self.process_batch_method.defaults: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self->process_batch_method)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_duplicate_dofn_params, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":351 + * self._check_duplicate_dofn_params(self.process_batch_method) + * + * for d in self.process_batch_method.defaults: # <<<<<<<<<<<<<< + * if not isinstance(d, core._DoFnParam): + * continue +*/ + if (likely(PyList_CheckExact(__pyx_v_self->process_batch_method->defaults)) || PyTuple_CheckExact(__pyx_v_self->process_batch_method->defaults)) { + __pyx_t_1 = __pyx_v_self->process_batch_method->defaults; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->process_batch_method->defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 351, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 351, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 351, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 351, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":352 + * + * for d in self.process_batch_method.defaults: + * if not isinstance(d, core._DoFnParam): # <<<<<<<<<<<<<< + * continue + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFnParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = PyObject_IsInstance(__pyx_v_d, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + + /* "apache_beam/runners/common.py":353 + * for d in self.process_batch_method.defaults: + * if not isinstance(d, core._DoFnParam): + * continue # <<<<<<<<<<<<<< + * + * # Helpful errors for params which will be supported in the future +*/ + goto __pyx_L3_continue; + + /* "apache_beam/runners/common.py":352 + * + * for d in self.process_batch_method.defaults: + * if not isinstance(d, core._DoFnParam): # <<<<<<<<<<<<<< + * continue + * +*/ + } + + /* "apache_beam/runners/common.py":356 + * + * # Helpful errors for params which will be supported in the future + * if d == (core.DoFn.ElementParam): # <<<<<<<<<<<<<< + * # We currently assume we can just get the typehint from the first + * # parameter. ElementParam breaks this assumption +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_d, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/runners/common.py":359 + * # We currently assume we can just get the typehint from the first + * # parameter. ElementParam breaks this assumption + * raise NotImplementedError( # <<<<<<<<<<<<<< + * f"DoFn {self.do_fn!r} uses unsupported DoFn param ElementParam.") + * +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/common.py":360 + * # parameter. ElementParam breaks this assumption + * raise NotImplementedError( + * f"DoFn {self.do_fn!r} uses unsupported DoFn param ElementParam.") # <<<<<<<<<<<<<< + * + * if d in (core.DoFn.KeyParam, core.DoFn.StateParam, core.DoFn.TimerParam): +*/ + __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_DoFn_2; + __pyx_t_10[1] = __pyx_t_9; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_uses_unsupported_DoFn_param_Ele; + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 42, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 359, __pyx_L1_error) + + /* "apache_beam/runners/common.py":356 + * + * # Helpful errors for params which will be supported in the future + * if d == (core.DoFn.ElementParam): # <<<<<<<<<<<<<< + * # We currently assume we can just get the typehint from the first + * # parameter. ElementParam breaks this assumption +*/ + } + + /* "apache_beam/runners/common.py":362 + * f"DoFn {self.do_fn!r} uses unsupported DoFn param ElementParam.") + * + * if d in (core.DoFn.KeyParam, core.DoFn.StateParam, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * f"DoFn {self.do_fn!r} has unsupported per-key DoFn param {d}. " +*/ + __Pyx_INCREF(__pyx_v_d); + __pyx_t_2 = __pyx_v_d; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_8 = __pyx_t_7; + goto __pyx_L8_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_StateParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (!__pyx_t_7) { + } else { + __pyx_t_8 = __pyx_t_7; + goto __pyx_L8_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TimerParam); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __pyx_t_7; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __pyx_t_8; + if (unlikely(__pyx_t_7)) { + + /* "apache_beam/runners/common.py":363 + * + * if d in (core.DoFn.KeyParam, core.DoFn.StateParam, core.DoFn.TimerParam): + * raise NotImplementedError( # <<<<<<<<<<<<<< + * f"DoFn {self.do_fn!r} has unsupported per-key DoFn param {d}. " + * "Per-key DoFn params are not yet supported for process_batch " +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/common.py":364 + * if d in (core.DoFn.KeyParam, core.DoFn.StateParam, core.DoFn.TimerParam): + * raise NotImplementedError( + * f"DoFn {self.do_fn!r} has unsupported per-key DoFn param {d}. " # <<<<<<<<<<<<<< + * "Per-key DoFn params are not yet supported for process_batch " + * "(https://github.com/apache/beam/issues/21653).") +*/ + __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_DoFn_2; + __pyx_t_12[1] = __pyx_t_11; + __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_has_unsupported_per_key_DoFn_pa; + __pyx_t_12[3] = __pyx_t_9; + __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_Per_key_DoFn_params_are_not_yet; + __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 36 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 108, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_13}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 363, __pyx_L1_error) + + /* "apache_beam/runners/common.py":362 + * f"DoFn {self.do_fn!r} uses unsupported DoFn param ElementParam.") + * + * if d in (core.DoFn.KeyParam, core.DoFn.StateParam, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * f"DoFn {self.do_fn!r} has unsupported per-key DoFn param {d}. " +*/ + } + + /* "apache_beam/runners/common.py":369 + * + * # Fallback to catch anything not explicitly supported + * if not d in (core.DoFn.WindowParam, # <<<<<<<<<<<<<< + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): +*/ + __Pyx_INCREF(__pyx_v_d); + __pyx_t_2 = __pyx_v_d; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_13, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L12_bool_binop_done; + } + + /* "apache_beam/runners/common.py":370 + * # Fallback to catch anything not explicitly supported + * if not d in (core.DoFn.WindowParam, + * core.DoFn.TimestampParam, # <<<<<<<<<<<<<< + * core.DoFn.PaneInfoParam): + * raise ValueError( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_TimestampParam); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":369 + * + * # Fallback to catch anything not explicitly supported + * if not d in (core.DoFn.WindowParam, # <<<<<<<<<<<<<< + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L12_bool_binop_done; + } + + /* "apache_beam/runners/common.py":371 + * if not d in (core.DoFn.WindowParam, + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): # <<<<<<<<<<<<<< + * raise ValueError( + * f"DoFn {self.do_fn!r} has unsupported process_batch " +*/ + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PaneInfoParam); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_13, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/common.py":369 + * + * # Fallback to catch anything not explicitly supported + * if not d in (core.DoFn.WindowParam, # <<<<<<<<<<<<<< + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __pyx_t_7; + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/runners/common.py":372 + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): + * raise ValueError( # <<<<<<<<<<<<<< + * f"DoFn {self.do_fn!r} has unsupported process_batch " + * f"method parameter {d}") +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/common.py":373 + * core.DoFn.PaneInfoParam): + * raise ValueError( + * f"DoFn {self.do_fn!r} has unsupported process_batch " # <<<<<<<<<<<<<< + * f"method parameter {d}") + * +*/ + __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->do_fn), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + + /* "apache_beam/runners/common.py":374 + * raise ValueError( + * f"DoFn {self.do_fn!r} has unsupported process_batch " + * f"method parameter {d}") # <<<<<<<<<<<<<< + * + * def _validate_bundle_method(self, method_wrapper): +*/ + __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_DoFn_2; + __pyx_t_14[1] = __pyx_t_13; + __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_has_unsupported_process_batch_m; + __pyx_t_14[3] = __pyx_t_9; + + /* "apache_beam/runners/common.py":373 + * core.DoFn.PaneInfoParam): + * raise ValueError( + * f"DoFn {self.do_fn!r} has unsupported process_batch " # <<<<<<<<<<<<<< + * f"method parameter {d}") + * +*/ + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_14, 4, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 48 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 372, __pyx_L1_error) + + /* "apache_beam/runners/common.py":369 + * + * # Fallback to catch anything not explicitly supported + * if not d in (core.DoFn.WindowParam, # <<<<<<<<<<<<<< + * core.DoFn.TimestampParam, + * core.DoFn.PaneInfoParam): +*/ + } + + /* "apache_beam/runners/common.py":351 + * self._check_duplicate_dofn_params(self.process_batch_method) + * + * for d in self.process_batch_method.defaults: # <<<<<<<<<<<<<< + * if not isinstance(d, core._DoFnParam): + * continue +*/ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":347 + * self._check_duplicate_dofn_params(self.process_method) + * + * def _validate_process_batch(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._check_duplicate_dofn_params(self.process_batch_method) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":376 + * f"method parameter {d}") + * + * def _validate_bundle_method(self, method_wrapper): # <<<<<<<<<<<<<< + * """Validate that none of the DoFnParameters are used in the function + * """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method, "Validate that none of the DoFnParameters are used in the function\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method = {"_validate_bundle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_method_wrapper = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_validate_bundle_method (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method_wrapper,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 376, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 376, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_validate_bundle_method", 0) < (0)) __PYX_ERR(0, 376, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_validate_bundle_method", 1, 1, 1, i); __PYX_ERR(0, 376, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 376, __pyx_L3_error) + } + __pyx_v_method_wrapper = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_validate_bundle_method", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 376, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), __pyx_v_method_wrapper); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_method_wrapper) { + PyObject *__pyx_v_param = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9[5]; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_validate_bundle_method", 0); + + /* "apache_beam/runners/common.py":379 + * """Validate that none of the DoFnParameters are used in the function + * """ + * for param in core.DoFn.DoFnProcessParams: # <<<<<<<<<<<<<< + * if param in method_wrapper.defaults: + * raise ValueError( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFnProcessParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 379, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 379, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 379, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":380 + * """ + * for param in core.DoFn.DoFnProcessParams: + * if param in method_wrapper.defaults: # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn.process() method-only parameter %s cannot be used in %s.' % +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_method_wrapper, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_param, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "apache_beam/runners/common.py":381 + * for param in core.DoFn.DoFnProcessParams: + * if param in method_wrapper.defaults: + * raise ValueError( # <<<<<<<<<<<<<< + * 'DoFn.process() method-only parameter %s cannot be used in %s.' % + * (param, method_wrapper)) +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/common.py":383 + * raise ValueError( + * 'DoFn.process() method-only parameter %s cannot be used in %s.' % + * (param, method_wrapper)) # <<<<<<<<<<<<<< + * + * def _validate_stateful_dofn(self): +*/ + __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_param), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_method_wrapper), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_DoFn_process_method_only_paramet; + __pyx_t_9[1] = __pyx_t_7; + __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_cannot_be_used_in; + __pyx_t_9[3] = __pyx_t_8; + __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_; + + /* "apache_beam/runners/common.py":382 + * if param in method_wrapper.defaults: + * raise ValueError( + * 'DoFn.process() method-only parameter %s cannot be used in %s.' % # <<<<<<<<<<<<<< + * (param, method_wrapper)) + * +*/ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 381, __pyx_L1_error) + + /* "apache_beam/runners/common.py":380 + * """ + * for param in core.DoFn.DoFnProcessParams: + * if param in method_wrapper.defaults: # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn.process() method-only parameter %s cannot be used in %s.' % +*/ + } + + /* "apache_beam/runners/common.py":379 + * """Validate that none of the DoFnParameters are used in the function + * """ + * for param in core.DoFn.DoFnProcessParams: # <<<<<<<<<<<<<< + * if param in method_wrapper.defaults: + * raise ValueError( +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":376 + * f"method parameter {d}") + * + * def _validate_bundle_method(self, method_wrapper): # <<<<<<<<<<<<<< + * """Validate that none of the DoFnParameters are used in the function + * """ +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_param); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":385 + * (param, method_wrapper)) + * + * def _validate_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> None + * userstate.validate_stateful_dofn(self.do_fn) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn = {"_validate_stateful_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_validate_stateful_dofn (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_validate_stateful_dofn", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_validate_stateful_dofn", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_18_validate_stateful_dofn(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_18_validate_stateful_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_validate_stateful_dofn", 0); + + /* "apache_beam/runners/common.py":387 + * def _validate_stateful_dofn(self): + * # type: () -> None + * userstate.validate_stateful_dofn(self.do_fn) # <<<<<<<<<<<<<< + * + * def is_splittable_dofn(self): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_userstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_validate_stateful_dofn_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->do_fn}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":385 + * (param, method_wrapper)) + * + * def _validate_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> None + * userstate.validate_stateful_dofn(self.do_fn) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature._validate_stateful_dofn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":389 + * userstate.validate_stateful_dofn(self.do_fn) + * + * def is_splittable_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.get_restriction_provider() is not None +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn = {"is_splittable_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_splittable_dofn (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_splittable_dofn", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_splittable_dofn", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20is_splittable_dofn(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20is_splittable_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_splittable_dofn", 0); + + /* "apache_beam/runners/common.py":391 + * def is_splittable_dofn(self): + * # type: () -> bool + * return self.get_restriction_provider() is not None # <<<<<<<<<<<<<< + * + * def get_restriction_coder(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = (__pyx_t_1 != Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":389 + * userstate.validate_stateful_dofn(self.do_fn) + * + * def is_splittable_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.get_restriction_provider() is not None +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.is_splittable_dofn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":393 + * return self.get_restriction_provider() is not None + * + * def get_restriction_coder(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[TupleCoder] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder, "Get coder for a restriction when processing an SDF. "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder = {"get_restriction_coder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_restriction_coder (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_restriction_coder", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_restriction_coder", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_restriction_coder", 0); + + /* "apache_beam/runners/common.py":397 + * + * """Get coder for a restriction when processing an SDF. """ + * if self.is_splittable_dofn(): # <<<<<<<<<<<<<< + * return TupleCoder([ + * (self.get_restriction_provider().restriction_coder()), +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_splittable_dofn, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":398 + * """Get coder for a restriction when processing an SDF. """ + * if self.is_splittable_dofn(): + * return TupleCoder([ # <<<<<<<<<<<<<< + * (self.get_restriction_provider().restriction_coder()), + * (self.get_watermark_estimator_provider().estimator_state_coder()) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TupleCoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":399 + * if self.is_splittable_dofn(): + * return TupleCoder([ + * (self.get_restriction_provider().restriction_coder()), # <<<<<<<<<<<<<< + * (self.get_watermark_estimator_provider().estimator_state_coder()) + * ]) +*/ + __pyx_t_9 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_7 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restriction_coder, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + + /* "apache_beam/runners/common.py":400 + * return TupleCoder([ + * (self.get_restriction_provider().restriction_coder()), + * (self.get_watermark_estimator_provider().estimator_state_coder()) # <<<<<<<<<<<<<< + * ]) + * else: +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_watermark_estimator_provider, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_7 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_estimator_state_coder, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + + /* "apache_beam/runners/common.py":398 + * """Get coder for a restriction when processing an SDF. """ + * if self.is_splittable_dofn(): + * return TupleCoder([ # <<<<<<<<<<<<<< + * (self.get_restriction_provider().restriction_coder()), + * (self.get_watermark_estimator_provider().estimator_state_coder()) +*/ + __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 398, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 398, __pyx_L1_error); + __pyx_t_6 = 0; + __pyx_t_8 = 0; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":397 + * + * """Get coder for a restriction when processing an SDF. """ + * if self.is_splittable_dofn(): # <<<<<<<<<<<<<< + * return TupleCoder([ + * (self.get_restriction_provider().restriction_coder()), +*/ + } + + /* "apache_beam/runners/common.py":403 + * ]) + * else: + * return None # <<<<<<<<<<<<<< + * + * def is_stateful_dofn(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":393 + * return self.get_restriction_provider() is not None + * + * def get_restriction_coder(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[TupleCoder] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.get_restriction_coder", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":405 + * return None + * + * def is_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self._is_stateful_dofn +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn = {"is_stateful_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_stateful_dofn (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_stateful_dofn", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_stateful_dofn", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_24is_stateful_dofn(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_24is_stateful_dofn(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_stateful_dofn", 0); + + /* "apache_beam/runners/common.py":407 + * def is_stateful_dofn(self): + * # type: () -> bool + * return self._is_stateful_dofn # <<<<<<<<<<<<<< + * + * def has_timers(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_stateful_dofn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":405 + * return None + * + * def is_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self._is_stateful_dofn +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.is_stateful_dofn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":409 + * return self._is_stateful_dofn + * + * def has_timers(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * _, all_timer_specs = userstate.get_dofn_specs(self.do_fn) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_27has_timers = {"has_timers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("has_timers (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("has_timers", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("has_timers", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26has_timers(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26has_timers(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_all_timer_specs = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("has_timers", 0); + + /* "apache_beam/runners/common.py":411 + * def has_timers(self): + * # type: () -> bool + * _, all_timer_specs = userstate.get_dofn_specs(self.do_fn) # <<<<<<<<<<<<<< + * return bool(all_timer_specs) + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_userstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_dofn_specs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->do_fn}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 411, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v__ = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_all_timer_specs = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":412 + * # type: () -> bool + * _, all_timer_specs = userstate.get_dofn_specs(self.do_fn) + * return bool(all_timer_specs) # <<<<<<<<<<<<<< + * + * def has_bundle_finalization(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_all_timer_specs); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":409 + * return self._is_stateful_dofn + * + * def has_timers(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * _, all_timer_specs = userstate.get_dofn_specs(self.do_fn) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.has_timers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_all_timer_specs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":414 + * return bool(all_timer_specs) + * + * def has_bundle_finalization(self): # <<<<<<<<<<<<<< + * for sig in (self.start_bundle_method, + * self.process_method, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization = {"has_bundle_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("has_bundle_finalization (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("has_bundle_finalization", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("has_bundle_finalization", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_28has_bundle_finalization(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_28has_bundle_finalization(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_sig = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("has_bundle_finalization", 0); + + /* "apache_beam/runners/common.py":415 + * + * def has_bundle_finalization(self): + * for sig in (self.start_bundle_method, # <<<<<<<<<<<<<< + * self.process_method, + * self.finish_bundle_method): +*/ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self->start_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->start_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->start_bundle_method)) != (0)) __PYX_ERR(0, 415, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->process_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->process_method)) != (0)) __PYX_ERR(0, 415, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->finish_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->finish_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->finish_bundle_method)) != (0)) __PYX_ERR(0, 415, __pyx_L1_error); + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_3 >= 3) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_sig, ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":418 + * self.process_method, + * self.finish_bundle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if d == DoFn.BundleFinalizerParam: +*/ + if (likely(PyList_CheckExact(__pyx_v_sig->defaults)) || PyTuple_CheckExact(__pyx_v_sig->defaults)) { + __pyx_t_1 = __pyx_v_sig->defaults; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sig->defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 418, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 418, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 418, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":419 + * self.finish_bundle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if d == DoFn.BundleFinalizerParam: + * return True +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/common.py":420 + * for d in sig.defaults: + * try: + * if d == DoFn.BundleFinalizerParam: # <<<<<<<<<<<<<< + * return True + * except Exception: # pylint: disable=broad-except +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BundleFinalizerParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 420, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_v_d, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 420, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_11) { + + /* "apache_beam/runners/common.py":421 + * try: + * if d == DoFn.BundleFinalizerParam: + * return True # <<<<<<<<<<<<<< + * except Exception: # pylint: disable=broad-except + * # Default value might be incomparable. +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/runners/common.py":420 + * for d in sig.defaults: + * try: + * if d == DoFn.BundleFinalizerParam: # <<<<<<<<<<<<<< + * return True + * except Exception: # pylint: disable=broad-except +*/ + } + + /* "apache_beam/runners/common.py":419 + * self.finish_bundle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if d == DoFn.BundleFinalizerParam: + * return True +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L14_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":422 + * if d == DoFn.BundleFinalizerParam: + * return True + * except Exception: # pylint: disable=broad-except # <<<<<<<<<<<<<< + * # Default value might be incomparable. + * pass +*/ + __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_12) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + + /* "apache_beam/runners/common.py":419 + * self.finish_bundle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if d == DoFn.BundleFinalizerParam: + * return True +*/ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L0; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L14_try_end:; + } + + /* "apache_beam/runners/common.py":418 + * self.process_method, + * self.finish_bundle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if d == DoFn.BundleFinalizerParam: +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":415 + * + * def has_bundle_finalization(self): + * for sig in (self.start_bundle_method, # <<<<<<<<<<<<<< + * self.process_method, + * self.finish_bundle_method): +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":425 + * # Default value might be incomparable. + * pass + * return False # <<<<<<<<<<<<<< + * + * def get_bundle_contexts(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":414 + * return bool(all_timer_specs) + * + * def has_bundle_finalization(self): # <<<<<<<<<<<<<< + * for sig in (self.start_bundle_method, + * self.process_method, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.has_bundle_finalization", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_sig); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_32generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":427 + * return False + * + * def get_bundle_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts = {"get_bundle_contexts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_bundle_contexts (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_bundle_contexts", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_bundle_contexts", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_30get_bundle_contexts(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_30get_bundle_contexts(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_bundle_contexts", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 427, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_32generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_get_bundle_contexts, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_bundle_context, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.get_bundle_contexts", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_32generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_bundle_contexts", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L18_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 427, __pyx_L1_error) + } + + /* "apache_beam/runners/common.py":428 + * + * def get_bundle_contexts(self): + * seen = set() # <<<<<<<<<<<<<< + * for sig in (self.setup_lifecycle_method, + * self.start_bundle_method, +*/ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_seen = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":429 + * def get_bundle_contexts(self): + * seen = set() + * for sig in (self.setup_lifecycle_method, # <<<<<<<<<<<<<< + * self.start_bundle_method, + * self.process_method, +*/ + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_3 >= 6) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF((PyObject *)__pyx_cur_scope->__pyx_v_sig); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sig, ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1)); + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":435 + * self.finish_bundle_method, + * self.teardown_lifecycle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if isinstance(d, DoFn.BundleContextParam): +*/ + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_sig->defaults)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_sig->defaults)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_v_sig->defaults; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_sig->defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 435, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 435, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 435, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_d, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":436 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: +*/ + { + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/common.py":437 + * for d in sig.defaults: + * try: + * if isinstance(d, DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * if d not in seen: + * seen.add(d) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BundleContextParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 437, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_d, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 437, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11) { + + /* "apache_beam/runners/common.py":438 + * try: + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: # <<<<<<<<<<<<<< + * seen.add(d) + * yield d +*/ + __pyx_t_11 = (__Pyx_PySet_ContainsTF(__pyx_cur_scope->__pyx_v_d, __pyx_cur_scope->__pyx_v_seen, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 438, __pyx_L8_error) + if (__pyx_t_11) { + + /* "apache_beam/runners/common.py":439 + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: + * seen.add(d) # <<<<<<<<<<<<<< + * yield d + * except Exception: # pylint: disable=broad-except +*/ + __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen, __pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 439, __pyx_L8_error) + + /* "apache_beam/runners/common.py":440 + * if d not in seen: + * seen.add(d) + * yield d # <<<<<<<<<<<<<< + * except Exception: # pylint: disable=broad-except + * # Default value might be incomparable. +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d); + __pyx_r = __pyx_cur_scope->__pyx_v_d; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __Pyx_XGIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_5; + __Pyx_XGIVEREF(__pyx_t_7); + __pyx_cur_scope->__pyx_t_5 = __pyx_t_7; + __Pyx_XGIVEREF(__pyx_t_8); + __pyx_cur_scope->__pyx_t_6 = __pyx_t_8; + __Pyx_XGIVEREF(__pyx_t_9); + __pyx_cur_scope->__pyx_t_7 = __pyx_t_9; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L18_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; + __pyx_t_5 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_7 = __pyx_cur_scope->__pyx_t_5; + __pyx_cur_scope->__pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_cur_scope->__pyx_t_6; + __pyx_cur_scope->__pyx_t_6 = 0; + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_9 = __pyx_cur_scope->__pyx_t_7; + __pyx_cur_scope->__pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_t_9); + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 440, __pyx_L8_error) + + /* "apache_beam/runners/common.py":438 + * try: + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: # <<<<<<<<<<<<<< + * seen.add(d) + * yield d +*/ + } + + /* "apache_beam/runners/common.py":437 + * for d in sig.defaults: + * try: + * if isinstance(d, DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * if d not in seen: + * seen.add(d) +*/ + } + + /* "apache_beam/runners/common.py":436 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L15_try_end; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":441 + * seen.add(d) + * yield d + * except Exception: # pylint: disable=broad-except # <<<<<<<<<<<<<< + * # Default value might be incomparable. + * pass +*/ + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_13) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L9_exception_handled; + } + goto __pyx_L10_except_error; + + /* "apache_beam/runners/common.py":436 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.BundleContextParam): + * if d not in seen: +*/ + __pyx_L10_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L9_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L15_try_end:; + } + + /* "apache_beam/runners/common.py":435 + * self.finish_bundle_method, + * self.teardown_lifecycle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if isinstance(d, DoFn.BundleContextParam): +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":429 + * def get_bundle_contexts(self): + * seen = set() + * for sig in (self.setup_lifecycle_method, # <<<<<<<<<<<<<< + * self.start_bundle_method, + * self.process_method, +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/runners/common.py":427 + * return False + * + * def get_bundle_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("get_bundle_contexts", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_35generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":445 + * pass + * + * def get_setup_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts = {"get_setup_contexts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_setup_contexts (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_setup_contexts", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_setup_contexts", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33get_setup_contexts(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33get_setup_contexts(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_setup_contexts", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 445, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_35generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_get_setup_contexts, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_setup_contexts, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.get_setup_contexts", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_13DoFnSignature_35generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_setup_contexts", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L18_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 445, __pyx_L1_error) + } + + /* "apache_beam/runners/common.py":446 + * + * def get_setup_contexts(self): + * seen = set() # <<<<<<<<<<<<<< + * for sig in (self.setup_lifecycle_method, + * self.start_bundle_method, +*/ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_seen = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":447 + * def get_setup_contexts(self): + * seen = set() + * for sig in (self.setup_lifecycle_method, # <<<<<<<<<<<<<< + * self.start_bundle_method, + * self.process_method, +*/ + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self->setup_lifecycle_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self->start_bundle_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_cur_scope->__pyx_v_self->process_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_cur_scope->__pyx_v_self->process_batch_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_cur_scope->__pyx_v_self->finish_bundle_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_cur_scope->__pyx_v_self->teardown_lifecycle_method)) != (0)) __PYX_ERR(0, 447, __pyx_L1_error); + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_3 >= 6) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF((PyObject *)__pyx_cur_scope->__pyx_v_sig); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sig, ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1)); + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":453 + * self.finish_bundle_method, + * self.teardown_lifecycle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if isinstance(d, DoFn.SetupContextParam): +*/ + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_sig->defaults)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_sig->defaults)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_v_sig->defaults; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_sig->defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 453, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 453, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 453, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_d, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":454 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: +*/ + { + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/common.py":455 + * for d in sig.defaults: + * try: + * if isinstance(d, DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * if d not in seen: + * seen.add(d) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SetupContextParam); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 455, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_d, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 455, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11) { + + /* "apache_beam/runners/common.py":456 + * try: + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: # <<<<<<<<<<<<<< + * seen.add(d) + * yield d +*/ + __pyx_t_11 = (__Pyx_PySet_ContainsTF(__pyx_cur_scope->__pyx_v_d, __pyx_cur_scope->__pyx_v_seen, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 456, __pyx_L8_error) + if (__pyx_t_11) { + + /* "apache_beam/runners/common.py":457 + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: + * seen.add(d) # <<<<<<<<<<<<<< + * yield d + * except Exception: # pylint: disable=broad-except +*/ + __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen, __pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 457, __pyx_L8_error) + + /* "apache_beam/runners/common.py":458 + * if d not in seen: + * seen.add(d) + * yield d # <<<<<<<<<<<<<< + * except Exception: # pylint: disable=broad-except + * # Default value might be incomparable. +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d); + __pyx_r = __pyx_cur_scope->__pyx_v_d; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __Pyx_XGIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; + __pyx_cur_scope->__pyx_t_4 = __pyx_t_5; + __Pyx_XGIVEREF(__pyx_t_7); + __pyx_cur_scope->__pyx_t_5 = __pyx_t_7; + __Pyx_XGIVEREF(__pyx_t_8); + __pyx_cur_scope->__pyx_t_6 = __pyx_t_8; + __Pyx_XGIVEREF(__pyx_t_9); + __pyx_cur_scope->__pyx_t_7 = __pyx_t_9; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L18_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; + __pyx_t_5 = __pyx_cur_scope->__pyx_t_4; + __pyx_t_7 = __pyx_cur_scope->__pyx_t_5; + __pyx_cur_scope->__pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_cur_scope->__pyx_t_6; + __pyx_cur_scope->__pyx_t_6 = 0; + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_9 = __pyx_cur_scope->__pyx_t_7; + __pyx_cur_scope->__pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_t_9); + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 458, __pyx_L8_error) + + /* "apache_beam/runners/common.py":456 + * try: + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: # <<<<<<<<<<<<<< + * seen.add(d) + * yield d +*/ + } + + /* "apache_beam/runners/common.py":455 + * for d in sig.defaults: + * try: + * if isinstance(d, DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * if d not in seen: + * seen.add(d) +*/ + } + + /* "apache_beam/runners/common.py":454 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L15_try_end; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":459 + * seen.add(d) + * yield d + * except Exception: # pylint: disable=broad-except # <<<<<<<<<<<<<< + * # Default value might be incomparable. + * pass +*/ + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_13) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L9_exception_handled; + } + goto __pyx_L10_except_error; + + /* "apache_beam/runners/common.py":454 + * self.teardown_lifecycle_method): + * for d in sig.defaults: + * try: # <<<<<<<<<<<<<< + * if isinstance(d, DoFn.SetupContextParam): + * if d not in seen: +*/ + __pyx_L10_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L9_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L15_try_end:; + } + + /* "apache_beam/runners/common.py":453 + * self.finish_bundle_method, + * self.teardown_lifecycle_method): + * for d in sig.defaults: # <<<<<<<<<<<<<< + * try: + * if isinstance(d, DoFn.SetupContextParam): +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":447 + * def get_setup_contexts(self): + * seen = set() + * for sig in (self.setup_lifecycle_method, # <<<<<<<<<<<<<< + * self.start_bundle_method, + * self.process_method, +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/runners/common.py":445 + * pass + * + * def get_setup_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("get_setup_contexts", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":56 + * + * cdef class DoFnSignature(object): + * cdef public MethodWrapper process_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper process_batch_method + * cdef public MethodWrapper start_bundle_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->process_method); + __pyx_r = ((PyObject *)__pyx_v_self->process_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 56, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_method); + __pyx_v_self->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_14process_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_method); + __pyx_v_self->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":57 + * cdef class DoFnSignature(object): + * cdef public MethodWrapper process_method + * cdef public MethodWrapper process_batch_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper start_bundle_method + * cdef public MethodWrapper finish_bundle_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->process_batch_method); + __pyx_r = ((PyObject *)__pyx_v_self->process_batch_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 57, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_batch_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_batch_method); + __pyx_v_self->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.process_batch_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->process_batch_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->process_batch_method); + __pyx_v_self->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":58 + * cdef public MethodWrapper process_method + * cdef public MethodWrapper process_batch_method + * cdef public MethodWrapper start_bundle_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper finish_bundle_method + * cdef public MethodWrapper setup_lifecycle_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->start_bundle_method); + __pyx_r = ((PyObject *)__pyx_v_self->start_bundle_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 58, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->start_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->start_bundle_method); + __pyx_v_self->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.start_bundle_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->start_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->start_bundle_method); + __pyx_v_self->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":59 + * cdef public MethodWrapper process_batch_method + * cdef public MethodWrapper start_bundle_method + * cdef public MethodWrapper finish_bundle_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper setup_lifecycle_method + * cdef public MethodWrapper teardown_lifecycle_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->finish_bundle_method); + __pyx_r = ((PyObject *)__pyx_v_self->finish_bundle_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 59, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->finish_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->finish_bundle_method); + __pyx_v_self->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.finish_bundle_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->finish_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->finish_bundle_method); + __pyx_v_self->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":60 + * cdef public MethodWrapper start_bundle_method + * cdef public MethodWrapper finish_bundle_method + * cdef public MethodWrapper setup_lifecycle_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper teardown_lifecycle_method + * cdef public MethodWrapper create_watermark_estimator_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __pyx_r = ((PyObject *)__pyx_v_self->setup_lifecycle_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 60, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __pyx_v_self->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.setup_lifecycle_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __pyx_v_self->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":61 + * cdef public MethodWrapper finish_bundle_method + * cdef public MethodWrapper setup_lifecycle_method + * cdef public MethodWrapper teardown_lifecycle_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper create_watermark_estimator_method + * cdef public MethodWrapper initial_restriction_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __pyx_r = ((PyObject *)__pyx_v_self->teardown_lifecycle_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 61, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __pyx_v_self->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.teardown_lifecycle_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __pyx_v_self->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":62 + * cdef public MethodWrapper setup_lifecycle_method + * cdef public MethodWrapper teardown_lifecycle_method + * cdef public MethodWrapper create_watermark_estimator_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper initial_restriction_method + * cdef public MethodWrapper create_tracker_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __pyx_r = ((PyObject *)__pyx_v_self->create_watermark_estimator_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 62, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __pyx_v_self->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_watermark_estimator_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __pyx_v_self->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":63 + * cdef public MethodWrapper teardown_lifecycle_method + * cdef public MethodWrapper create_watermark_estimator_method + * cdef public MethodWrapper initial_restriction_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper create_tracker_method + * cdef public MethodWrapper split_method +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->initial_restriction_method); + __pyx_r = ((PyObject *)__pyx_v_self->initial_restriction_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 63, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->initial_restriction_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->initial_restriction_method); + __pyx_v_self->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.initial_restriction_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->initial_restriction_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->initial_restriction_method); + __pyx_v_self->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":64 + * cdef public MethodWrapper create_watermark_estimator_method + * cdef public MethodWrapper initial_restriction_method + * cdef public MethodWrapper create_tracker_method # <<<<<<<<<<<<<< + * cdef public MethodWrapper split_method + * cdef public object batching_configuration +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->create_tracker_method); + __pyx_r = ((PyObject *)__pyx_v_self->create_tracker_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 64, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_tracker_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_tracker_method); + __pyx_v_self->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.create_tracker_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->create_tracker_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->create_tracker_method); + __pyx_v_self->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":65 + * cdef public MethodWrapper initial_restriction_method + * cdef public MethodWrapper create_tracker_method + * cdef public MethodWrapper split_method # <<<<<<<<<<<<<< + * cdef public object batching_configuration + * cdef public object do_fn +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->split_method); + __pyx_r = ((PyObject *)__pyx_v_self->split_method); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->split_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->split_method); + __pyx_v_self->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.split_method.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_12split_method_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->split_method); + __Pyx_DECREF((PyObject *)__pyx_v_self->split_method); + __pyx_v_self->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":66 + * cdef public MethodWrapper create_tracker_method + * cdef public MethodWrapper split_method + * cdef public object batching_configuration # <<<<<<<<<<<<<< + * cdef public object do_fn + * cdef public object timer_methods +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->batching_configuration); + __pyx_r = __pyx_v_self->batching_configuration; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->batching_configuration); + __Pyx_DECREF(__pyx_v_self->batching_configuration); + __pyx_v_self->batching_configuration = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->batching_configuration); + __Pyx_DECREF(__pyx_v_self->batching_configuration); + __pyx_v_self->batching_configuration = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":67 + * cdef public MethodWrapper split_method + * cdef public object batching_configuration + * cdef public object do_fn # <<<<<<<<<<<<<< + * cdef public object timer_methods + * cdef bint _is_stateful_dofn +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->do_fn); + __pyx_r = __pyx_v_self->do_fn; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->do_fn); + __Pyx_DECREF(__pyx_v_self->do_fn); + __pyx_v_self->do_fn = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->do_fn); + __Pyx_DECREF(__pyx_v_self->do_fn); + __pyx_v_self->do_fn = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":68 + * cdef public object batching_configuration + * cdef public object do_fn + * cdef public object timer_methods # <<<<<<<<<<<<<< + * cdef bint _is_stateful_dofn + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->timer_methods); + __pyx_r = __pyx_v_self->timer_methods; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->timer_methods); + __Pyx_DECREF(__pyx_v_self->timer_methods); + __pyx_v_self->timer_methods = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timer_methods); + __Pyx_DECREF(__pyx_v_self->timer_methods); + __pyx_v_self->timer_methods = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_36__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_36__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._is_stateful_dofn, self.batching_configuration, self.create_tracker_method, self.create_watermark_estimator_method, self.do_fn, self.finish_bundle_method, self.initial_restriction_method, self.process_batch_method, self.process_method, self.setup_lifecycle_method, self.split_method, self.start_bundle_method, self.teardown_lifecycle_method, self.timer_methods) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_stateful_dofn); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->batching_configuration); + __Pyx_GIVEREF(__pyx_v_self->batching_configuration); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->batching_configuration) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->create_tracker_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->create_tracker_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->create_tracker_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->create_watermark_estimator_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->create_watermark_estimator_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->do_fn); + __Pyx_GIVEREF(__pyx_v_self->do_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->do_fn) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->finish_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->finish_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_v_self->finish_bundle_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->initial_restriction_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->initial_restriction_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_v_self->initial_restriction_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->process_batch_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->process_batch_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_v_self->process_batch_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->process_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_v_self->process_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->setup_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_v_self->setup_lifecycle_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->split_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->split_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_v_self->split_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->start_bundle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->start_bundle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_v_self->start_bundle_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->teardown_lifecycle_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 12, ((PyObject *)__pyx_v_self->teardown_lifecycle_method)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timer_methods); + __Pyx_GIVEREF(__pyx_v_self->timer_methods); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_v_self->timer_methods) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._is_stateful_dofn, self.batching_configuration, self.create_tracker_method, self.create_watermark_estimator_method, self.do_fn, self.finish_bundle_method, self.initial_restriction_method, self.process_batch_method, self.process_method, self.setup_lifecycle_method, self.split_method, self.start_bundle_method, self.teardown_lifecycle_method, self.timer_methods) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._is_stateful_dofn, self.batching_configuration, self.create_tracker_method, self.create_watermark_estimator_method, self.do_fn, self.finish_bundle_method, self.initial_restriction_method, self.process_batch_method, self.process_method, self.setup_lifecycle_method, self.split_method, self.start_bundle_method, self.teardown_lifecycle_method, self.timer_methods) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.batching_configuration is not None or self.create_tracker_method is not None or self.create_watermark_estimator_method is not None or self.do_fn is not None or self.finish_bundle_method is not None or self.initial_restriction_method is not None or self.process_batch_method is not None or self.process_method is not None or self.setup_lifecycle_method is not None or self.split_method is not None or self.start_bundle_method is not None or self.teardown_lifecycle_method is not None or self.timer_methods is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._is_stateful_dofn, self.batching_configuration, self.create_tracker_method, self.create_watermark_estimator_method, self.do_fn, self.finish_bundle_method, self.initial_restriction_method, self.process_batch_method, self.process_method, self.setup_lifecycle_method, self.split_method, self.start_bundle_method, self.teardown_lifecycle_method, self.timer_methods) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.batching_configuration is not None or self.create_tracker_method is not None or self.create_watermark_estimator_method is not None or self.do_fn is not None or self.finish_bundle_method is not None or self.initial_restriction_method is not None or self.process_batch_method is not None or self.process_method is not None or self.setup_lifecycle_method is not None or self.split_method is not None or self.start_bundle_method is not None or self.teardown_lifecycle_method is not None or self.timer_methods is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->batching_configuration != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->create_tracker_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->create_watermark_estimator_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->do_fn != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->finish_bundle_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->initial_restriction_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->process_batch_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->process_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->setup_lifecycle_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->split_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->start_bundle_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->teardown_lifecycle_method) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->timer_methods != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.batching_configuration is not None or self.create_tracker_method is not None or self.create_watermark_estimator_method is not None or self.do_fn is not None or self.finish_bundle_method is not None or self.initial_restriction_method is not None or self.process_batch_method is not None or self.process_method is not None or self.setup_lifecycle_method is not None or self.split_method is not None or self.start_bundle_method is not None or self.teardown_lifecycle_method is not None or self.timer_methods is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.batching_configuration is not None or self.create_tracker_method is not None or self.create_watermark_estimator_method is not None or self.do_fn is not None or self.finish_bundle_method is not None or self.initial_restriction_method is not None or self.process_batch_method is not None or self.process_method is not None or self.setup_lifecycle_method is not None or self.split_method is not None or self.start_bundle_method is not None or self.teardown_lifecycle_method is not None or self.timer_methods is not None + * if use_setstate: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnSignature); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_146279351); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_146279351); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_146279351) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.batching_configuration is not None or self.create_tracker_method is not None or self.create_watermark_estimator_method is not None or self.do_fn is not None or self.finish_bundle_method is not None or self.initial_restriction_method is not None or self.process_batch_method is not None or self.process_method is not None or self.setup_lifecycle_method is not None or self.split_method is not None or self.start_bundle_method is not None or self.teardown_lifecycle_method is not None or self.timer_methods is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, None), state + * else: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnSignature); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_146279351); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_146279351); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_146279351) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_38__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13DoFnSignature_38__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnSignature__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnSignature.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":469 + * A DoFnInvoker describes a particular way for invoking methods of a DoFn + * represented by a given DoFnSignature.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: _OutputHandler +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker___init__, "\n Initializes `DoFnInvoker`\n\n :param output_handler: an OutputHandler for receiving elements produced\n by invoking functions of the DoFn.\n :param signature: a DoFnSignature for the DoFn being invoked\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6common_11DoFnInvoker___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_output_handler = 0; + PyObject *__pyx_v_signature = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_output_handler,&__pyx_mstate_global->__pyx_n_u_signature,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 469, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 469, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 469, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 469, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 469, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 469, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 469, __pyx_L3_error) + } + __pyx_v_output_handler = values[0]; + __pyx_v_signature = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 469, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker___init__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_output_handler, __pyx_v_signature); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":483 + * :param signature: a DoFnSignature for the DoFn being invoked + * """ + * self.output_handler = output_handler # <<<<<<<<<<<<<< + * self.signature = signature + * self.user_state_context = None # type: Optional[userstate.UserStateContext] +*/ + __pyx_t_1 = __pyx_v_output_handler; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(0, 483, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->output_handler); + __Pyx_DECREF((PyObject *)__pyx_v_self->output_handler); + __pyx_v_self->output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":484 + * """ + * self.output_handler = output_handler + * self.signature = signature # <<<<<<<<<<<<<< + * self.user_state_context = None # type: Optional[userstate.UserStateContext] + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] +*/ + __pyx_t_1 = __pyx_v_signature; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->signature); + __Pyx_DECREF((PyObject *)__pyx_v_self->signature); + __pyx_v_self->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":485 + * self.output_handler = output_handler + * self.signature = signature + * self.user_state_context = None # type: Optional[userstate.UserStateContext] # <<<<<<<<<<<<<< + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->user_state_context); + __Pyx_DECREF(__pyx_v_self->user_state_context); + __pyx_v_self->user_state_context = Py_None; + + /* "apache_beam/runners/common.py":486 + * self.signature = signature + * self.user_state_context = None # type: Optional[userstate.UserStateContext] + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = Py_None; + + /* "apache_beam/runners/common.py":469 + * A DoFnInvoker describes a particular way for invoking methods of a DoFn + * represented by a given DoFnSignature.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: _OutputHandler +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":488 + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * + * @staticmethod # <<<<<<<<<<<<<< + * def create_invoker( + * signature, # type: DoFnSignature +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker, " Creates a new DoFnInvoker based on given arguments.\n\n Args:\n output_handler: an OutputHandler for receiving elements produced by\n invoking functions of the DoFn.\n signature: a DoFnSignature for the DoFn being invoked.\n context: Context to be used when invoking the DoFn (deprecated).\n side_inputs: side inputs to be used when invoking th process method.\n input_args: arguments to be used when invoking the process method. Some\n of the arguments given here might be placeholders (for\n example for side inputs) that get filled before invoking the\n process method.\n input_kwargs: keyword arguments to be used when invoking the process\n method. Some of the keyword arguments given here might be\n placeholders (for example for side inputs) that get filled\n before invoking the process method.\n process_invocation: If True, this function may return an invoker that\n performs extra optimizations for invoking process()\n method efficiently.\n user_state_context: The UserStateContext instance for the current\n Stateful DoFn.\n bundle_finalizer_param: The param that passed to a process method, which\n allows a callback to be registered.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker = {"create_invoker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_signature = 0; + PyObject *__pyx_v_output_handler = 0; + PyObject *__pyx_v_context = 0; + PyObject *__pyx_v_side_inputs = 0; + PyObject *__pyx_v_input_args = 0; + PyObject *__pyx_v_input_kwargs = 0; + PyObject *__pyx_v_process_invocation = 0; + PyObject *__pyx_v_user_state_context = 0; + PyObject *__pyx_v_bundle_finalizer_param = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_invoker (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signature,&__pyx_mstate_global->__pyx_n_u_output_handler,&__pyx_mstate_global->__pyx_n_u_context,&__pyx_mstate_global->__pyx_n_u_side_inputs,&__pyx_mstate_global->__pyx_n_u_input_args,&__pyx_mstate_global->__pyx_n_u_input_kwargs,&__pyx_mstate_global->__pyx_n_u_process_invocation,&__pyx_mstate_global->__pyx_n_u_user_state_context,&__pyx_mstate_global->__pyx_n_u_bundle_finalizer_param,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 488, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 9: + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_invoker", 0) < (0)) __PYX_ERR(0, 488, __pyx_L3_error) + + /* "apache_beam/runners/common.py":492 + * signature, # type: DoFnSignature + * output_handler, # type: OutputHandler + * context=None, # type: Optional[DoFnContext] # <<<<<<<<<<<<<< + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":493 + * output_handler, # type: OutputHandler + * context=None, # type: Optional[DoFnContext] + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] # <<<<<<<<<<<<<< + * input_args=None, + * input_kwargs=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":494 + * context=None, # type: Optional[DoFnContext] + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, # <<<<<<<<<<<<<< + * input_kwargs=None, + * process_invocation=True, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":495 + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, + * input_kwargs=None, # <<<<<<<<<<<<<< + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":496 + * input_args=None, + * input_kwargs=None, + * process_invocation=True, # <<<<<<<<<<<<<< + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_True)); + + /* "apache_beam/runners/common.py":497 + * input_kwargs=None, + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] # <<<<<<<<<<<<<< + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] + * ): +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":498 + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] # <<<<<<<<<<<<<< + * ): + * # type: (...) -> DoFnInvoker +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_invoker", 0, 2, 9, i); __PYX_ERR(0, 488, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 9: + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 488, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 488, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 488, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":492 + * signature, # type: DoFnSignature + * output_handler, # type: OutputHandler + * context=None, # type: Optional[DoFnContext] # <<<<<<<<<<<<<< + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":493 + * output_handler, # type: OutputHandler + * context=None, # type: Optional[DoFnContext] + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] # <<<<<<<<<<<<<< + * input_args=None, + * input_kwargs=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":494 + * context=None, # type: Optional[DoFnContext] + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, # <<<<<<<<<<<<<< + * input_kwargs=None, + * process_invocation=True, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":495 + * side_inputs=None, # type: Optional[List[sideinputs.SideInputMap]] + * input_args=None, + * input_kwargs=None, # <<<<<<<<<<<<<< + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":496 + * input_args=None, + * input_kwargs=None, + * process_invocation=True, # <<<<<<<<<<<<<< + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_True)); + + /* "apache_beam/runners/common.py":497 + * input_kwargs=None, + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] # <<<<<<<<<<<<<< + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] + * ): +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":498 + * process_invocation=True, + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * bundle_finalizer_param=None # type: Optional[core._BundleFinalizerParam] # <<<<<<<<<<<<<< + * ): + * # type: (...) -> DoFnInvoker +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_signature = values[0]; + __pyx_v_output_handler = values[1]; + __pyx_v_context = values[2]; + __pyx_v_side_inputs = values[3]; + __pyx_v_input_args = values[4]; + __pyx_v_input_kwargs = values[5]; + __pyx_v_process_invocation = values[6]; + __pyx_v_user_state_context = values[7]; + __pyx_v_bundle_finalizer_param = values[8]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_invoker", 0, 2, 9, __pyx_nargs); __PYX_ERR(0, 488, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.create_invoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker(__pyx_v_signature, __pyx_v_output_handler, __pyx_v_context, __pyx_v_side_inputs, __pyx_v_input_args, __pyx_v_input_kwargs, __pyx_v_process_invocation, __pyx_v_user_state_context, __pyx_v_bundle_finalizer_param); + + /* "apache_beam/runners/common.py":488 + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * + * @staticmethod # <<<<<<<<<<<<<< + * def create_invoker( + * signature, # type: DoFnSignature +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker(PyObject *__pyx_v_signature, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_context, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs, PyObject *__pyx_v_process_invocation, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_bundle_finalizer_param) { + PyObject *__pyx_v_use_per_window_invoker = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_invoker", 0); + __Pyx_INCREF(__pyx_v_side_inputs); + + /* "apache_beam/runners/common.py":526 + * allows a callback to be registered. + * """ + * side_inputs = side_inputs or [] # <<<<<<<<<<<<<< + * use_per_window_invoker = process_invocation and ( + * side_inputs or input_args or input_kwargs or +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_side_inputs); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 526, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_side_inputs); + __pyx_t_1 = __pyx_v_side_inputs; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_DECREF_SET(__pyx_v_side_inputs, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":527 + * """ + * side_inputs = side_inputs or [] + * use_per_window_invoker = process_invocation and ( # <<<<<<<<<<<<<< + * side_inputs or input_args or input_kwargs or + * signature.process_method.defaults or +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_process_invocation); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 527, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_process_invocation); + __pyx_t_1 = __pyx_v_process_invocation; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/common.py":528 + * side_inputs = side_inputs or [] + * use_per_window_invoker = process_invocation and ( + * side_inputs or input_args or input_kwargs or # <<<<<<<<<<<<<< + * signature.process_method.defaults or + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_side_inputs); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_side_inputs); + __pyx_t_1 = __pyx_v_side_inputs; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_input_args); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_input_args); + __pyx_t_1 = __pyx_v_input_args; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_input_kwargs); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_input_kwargs); + __pyx_t_1 = __pyx_v_input_kwargs; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/common.py":529 + * use_per_window_invoker = process_invocation and ( + * side_inputs or input_args or input_kwargs or + * signature.process_method.defaults or # <<<<<<<<<<<<<< + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) + * if not use_per_window_invoker: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 529, __pyx_L1_error) + if (!__pyx_t_2) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/common.py":530 + * side_inputs or input_args or input_kwargs or + * signature.process_method.defaults or + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) # <<<<<<<<<<<<<< + * if not use_per_window_invoker: + * return SimpleInvoker(output_handler, signature) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_batch_method); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 530, __pyx_L1_error) + if (!__pyx_t_2) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = __pyx_v_signature; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_stateful_dofn, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L5_bool_binop_done:; + __pyx_v_use_per_window_invoker = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":531 + * signature.process_method.defaults or + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) + * if not use_per_window_invoker: # <<<<<<<<<<<<<< + * return SimpleInvoker(output_handler, signature) + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_per_window_invoker); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_t_6 = (!__pyx_t_2); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":532 + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) + * if not use_per_window_invoker: + * return SimpleInvoker(output_handler, signature) # <<<<<<<<<<<<<< + * else: + * if context is None: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_output_handler, __pyx_v_signature}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":531 + * signature.process_method.defaults or + * signature.process_batch_method.defaults or signature.is_stateful_dofn()) + * if not use_per_window_invoker: # <<<<<<<<<<<<<< + * return SimpleInvoker(output_handler, signature) + * else: +*/ + } + + /* "apache_beam/runners/common.py":534 + * return SimpleInvoker(output_handler, signature) + * else: + * if context is None: # <<<<<<<<<<<<<< + * raise TypeError("Must provide context when not using SimpleInvoker") + * return PerWindowInvoker( +*/ + /*else*/ { + __pyx_t_6 = (__pyx_v_context == Py_None); + if (unlikely(__pyx_t_6)) { + + /* "apache_beam/runners/common.py":535 + * else: + * if context is None: + * raise TypeError("Must provide context when not using SimpleInvoker") # <<<<<<<<<<<<<< + * return PerWindowInvoker( + * output_handler, +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Must_provide_context_when_not_us}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 535, __pyx_L1_error) + + /* "apache_beam/runners/common.py":534 + * return SimpleInvoker(output_handler, signature) + * else: + * if context is None: # <<<<<<<<<<<<<< + * raise TypeError("Must provide context when not using SimpleInvoker") + * return PerWindowInvoker( +*/ + } + + /* "apache_beam/runners/common.py":536 + * if context is None: + * raise TypeError("Must provide context when not using SimpleInvoker") + * return PerWindowInvoker( # <<<<<<<<<<<<<< + * output_handler, + * signature, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + + /* "apache_beam/runners/common.py":544 + * input_kwargs, + * user_state_context, + * bundle_finalizer_param) # <<<<<<<<<<<<<< + * + * def invoke_process( +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_output_handler, __pyx_v_signature, __pyx_v_context, __pyx_v_side_inputs, __pyx_v_input_args, __pyx_v_input_kwargs, __pyx_v_user_state_context, __pyx_v_bundle_finalizer_param}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":488 + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * + * @staticmethod # <<<<<<<<<<<<<< + * def create_invoker( + * signature, # type: DoFnSignature +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.create_invoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_use_per_window_invoker); + __Pyx_XDECREF(__pyx_v_side_inputs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":549 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + PyObject *__pyx_v_restriction = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":550 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + PyObject *__pyx_v_watermark_estimator_state = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":551 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + PyObject *__pyx_v_additional_args = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":552 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * +*/ + PyObject *__pyx_v_additional_kwargs = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_restriction = __pyx_optional_args->restriction; + if (__pyx_optional_args->__pyx_n > 1) { + __pyx_v_watermark_estimator_state = __pyx_optional_args->watermark_estimator_state; + if (__pyx_optional_args->__pyx_n > 2) { + __pyx_v_additional_args = __pyx_optional_args->additional_args; + if (__pyx_optional_args->__pyx_n > 3) { + __pyx_v_additional_kwargs = __pyx_optional_args->additional_kwargs; + } + } + } + } + } + + /* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":571 + * current `DoFn.process()` invocation. + * """ + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def invoke_process_batch( +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 571, __pyx_L1_error) + + /* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_4invoke_process, "Invokes the DoFn.process() function.\n\n Args:\n windowed_value: a WindowedValue object that gives the element for which\n process() method should be invoked along with the window\n the element belongs to.\n restriction: The restriction to use when executing this splittable DoFn.\n Should only be specified for splittable DoFns.\n watermark_estimator_state: The watermark estimator state to use when\n executing this splittable DoFn. Should only\n be specified for splittable DoFns.\n additional_args: additional arguments to be passed to the current\n `DoFn.process()` invocation, usually as side inputs.\n additional_kwargs: additional keyword arguments to be passed to the\n current `DoFn.process()` invocation.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process = {"invoke_process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_4invoke_process}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_restriction = 0; + PyObject *__pyx_v_watermark_estimator_state = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_watermark_estimator_state,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 546, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process", 0) < (0)) __PYX_ERR(0, 546, __pyx_L3_error) + + /* "apache_beam/runners/common.py":549 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":550 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":551 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":552 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, i); __PYX_ERR(0, 546, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 546, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 546, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":549 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":550 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":551 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":552 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + __pyx_v_restriction = values[1]; + __pyx_v_watermark_estimator_state = values[2]; + __pyx_v_additional_args = values[3]; + __pyx_v_additional_kwargs = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 546, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_4invoke_process(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_4invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 4; + __pyx_t_2.restriction = __pyx_v_restriction; + __pyx_t_2.watermark_estimator_state = __pyx_v_watermark_estimator_state; + __pyx_t_2.additional_args = __pyx_v_additional_args; + __pyx_t_2.additional_kwargs = __pyx_v_additional_kwargs; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker->invoke_process(__pyx_v_self, __pyx_v_windowed_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":573 + * raise NotImplementedError + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch, "Invokes the DoFn.process() function.\n\n Args:\n windowed_batch: a WindowedBatch object that gives a batch of elements for\n which process_batch() method should be invoked, along with\n the window each element belongs to.\n additional_args: additional arguments to be passed to the current\n `DoFn.process()` invocation, usually as side inputs.\n additional_kwargs: additional keyword arguments to be passed to the\n current `DoFn.process()` invocation.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch = {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_windowed_batch = 0; + CYTHON_UNUSED PyObject *__pyx_v_additional_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 573, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 573, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 573, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 573, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process_batch", 0) < (0)) __PYX_ERR(0, 573, __pyx_L3_error) + + /* "apache_beam/runners/common.py":576 + * self, + * windowed_batch, # type: WindowedBatch + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":577 + * windowed_batch, # type: WindowedBatch + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, i); __PYX_ERR(0, 573, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 573, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 573, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 573, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":576 + * self, + * windowed_batch, # type: WindowedBatch + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":577 + * windowed_batch, # type: WindowedBatch + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_batch = values[0]; + __pyx_v_additional_args = values[1]; + __pyx_v_additional_kwargs = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 573, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":573 + * raise NotImplementedError + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_windowed_batch, CYTHON_UNUSED PyObject *__pyx_v_additional_args, CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process_batch", 0); + + /* "apache_beam/runners/common.py":591 + * current `DoFn.process()` invocation. + * """ + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def invoke_setup(self): +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 591, __pyx_L1_error) + + /* "apache_beam/runners/common.py":573 + * raise NotImplementedError + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":593 + * raise NotImplementedError + * + * def invoke_setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup, "Invokes the DoFn.setup() method\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup = {"invoke_setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("invoke_setup", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("invoke_setup", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_8genexpr1__pyx_v_c = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_setup", 0); + + /* "apache_beam/runners/common.py":598 + * """Invokes the DoFn.setup() method + * """ + * self._setup_context_values = { # <<<<<<<<<<<<<< + * c: c.create_and_enter() + * for c in self.signature.get_setup_contexts() +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":600 + * self._setup_context_values = { + * c: c.create_and_enter() + * for c in self.signature.get_setup_contexts() # <<<<<<<<<<<<<< + * } + * self.signature.setup_lifecycle_method.method_value() +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_self->signature); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_setup_contexts, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 600, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 600, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L5_error) + } else { + __pyx_t_2 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 600, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_c, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":599 + * """ + * self._setup_context_values = { + * c: c.create_and_enter() # <<<<<<<<<<<<<< + * for c in self.signature.get_setup_contexts() + * } +*/ + __pyx_t_7 = __pyx_8genexpr1__pyx_v_c; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_and_enter, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_c, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 599, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":600 + * self._setup_context_values = { + * c: c.create_and_enter() + * for c in self.signature.get_setup_contexts() # <<<<<<<<<<<<<< + * } + * self.signature.setup_lifecycle_method.method_value() +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_c); __pyx_8genexpr1__pyx_v_c = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_c); __pyx_8genexpr1__pyx_v_c = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/runners/common.py":598 + * """Invokes the DoFn.setup() method + * """ + * self._setup_context_values = { # <<<<<<<<<<<<<< + * c: c.create_and_enter() + * for c in self.signature.get_setup_contexts() +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_setup_context_values); + __Pyx_DECREF(__pyx_v_self->_setup_context_values); + __pyx_v_self->_setup_context_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":602 + * for c in self.signature.get_setup_contexts() + * } + * self.signature.setup_lifecycle_method.method_value() # <<<<<<<<<<<<<< + * + * def invoke_start_bundle(self): +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->setup_lifecycle_method->method_value); + __pyx_t_2 = __pyx_v_self->signature->setup_lifecycle_method->method_value; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":593 + * raise NotImplementedError + * + * def invoke_setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":604 + * self.signature.setup_lifecycle_method.method_value() + * + * def invoke_start_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_start_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_8genexpr2__pyx_v_c = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_start_bundle", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_start_bundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":609 + * """Invokes the DoFn.start_bundle() method. + * """ + * self._bundle_context_values = { # <<<<<<<<<<<<<< + * c: c.create_and_enter() + * for c in self.signature.get_bundle_contexts() +*/ + { /* enter inner scope */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":611 + * self._bundle_context_values = { + * c: c.create_and_enter() + * for c in self.signature.get_bundle_contexts() # <<<<<<<<<<<<<< + * } + * self.output_handler.start_bundle_outputs( +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->signature); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_bundle_contexts, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 611, __pyx_L5_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 611, __pyx_L5_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L5_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_4); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 611, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_c, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":610 + * """ + * self._bundle_context_values = { + * c: c.create_and_enter() # <<<<<<<<<<<<<< + * for c in self.signature.get_bundle_contexts() + * } +*/ + __pyx_t_3 = __pyx_8genexpr2__pyx_v_c; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_and_enter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr2__pyx_v_c, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 610, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":611 + * self._bundle_context_values = { + * c: c.create_and_enter() + * for c in self.signature.get_bundle_contexts() # <<<<<<<<<<<<<< + * } + * self.output_handler.start_bundle_outputs( +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); __pyx_8genexpr2__pyx_v_c = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); __pyx_8genexpr2__pyx_v_c = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/runners/common.py":609 + * """Invokes the DoFn.start_bundle() method. + * """ + * self._bundle_context_values = { # <<<<<<<<<<<<<< + * c: c.create_and_enter() + * for c in self.signature.get_bundle_contexts() +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_bundle_context_values); + __Pyx_DECREF(__pyx_v_self->_bundle_context_values); + __pyx_v_self->_bundle_context_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":613 + * for c in self.signature.get_bundle_contexts() + * } + * self.output_handler.start_bundle_outputs( # <<<<<<<<<<<<<< + * self.signature.start_bundle_method.method_value()) + * +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->output_handler); + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":614 + * } + * self.output_handler.start_bundle_outputs( + * self.signature.start_bundle_method.method_value()) # <<<<<<<<<<<<<< + * + * def invoke_finish_bundle(self): +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->start_bundle_method->method_value); + __pyx_t_8 = __pyx_v_self->signature->start_bundle_method->method_value; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_bundle_outputs, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":604 + * self.signature.setup_lifecycle_method.method_value() + * + * def invoke_start_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_start_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_10invoke_start_bundle, "Invokes the DoFn.start_bundle() method.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle = {"invoke_start_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_10invoke_start_bundle}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_start_bundle (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("invoke_start_bundle", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("invoke_start_bundle", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_10invoke_start_bundle(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_10invoke_start_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_start_bundle", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_start_bundle(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_start_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":616 + * self.signature.start_bundle_method.method_value()) + * + * def invoke_finish_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_finish_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_c = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_finish_bundle", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_finish_bundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":621 + * """Invokes the DoFn.finish_bundle() method. + * """ + * self.output_handler.finish_bundle_outputs( # <<<<<<<<<<<<<< + * self.signature.finish_bundle_method.method_value()) + * for c in self._bundle_context_values.values(): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->output_handler); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":622 + * """ + * self.output_handler.finish_bundle_outputs( + * self.signature.finish_bundle_method.method_value()) # <<<<<<<<<<<<<< + * for c in self._bundle_context_values.values(): + * c[0].__exit__(None, None, None) +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->finish_bundle_method->method_value); + __pyx_t_6 = __pyx_v_self->signature->finish_bundle_method->method_value; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish_bundle_outputs, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":623 + * self.output_handler.finish_bundle_outputs( + * self.signature.finish_bundle_method.method_value()) + * for c in self._bundle_context_values.values(): # <<<<<<<<<<<<<< + * c[0].__exit__(None, None, None) + * self._bundle_context_values = None +*/ + __pyx_t_7 = 0; + if (unlikely(__pyx_v_self->_bundle_context_values == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 623, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_self->_bundle_context_values, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, NULL, &__pyx_t_4, NULL, __pyx_t_9); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":624 + * self.signature.finish_bundle_method.method_value()) + * for c in self._bundle_context_values.values(): + * c[0].__exit__(None, None, None) # <<<<<<<<<<<<<< + * self._bundle_context_values = None + * +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":625 + * for c in self._bundle_context_values.values(): + * c[0].__exit__(None, None, None) + * self._bundle_context_values = None # <<<<<<<<<<<<<< + * + * def invoke_teardown(self): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_bundle_context_values); + __Pyx_DECREF(__pyx_v_self->_bundle_context_values); + __pyx_v_self->_bundle_context_values = Py_None; + + /* "apache_beam/runners/common.py":616 + * self.signature.start_bundle_method.method_value()) + * + * def invoke_finish_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_finish_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_12invoke_finish_bundle, "Invokes the DoFn.finish_bundle() method.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle = {"invoke_finish_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_12invoke_finish_bundle}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_finish_bundle (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("invoke_finish_bundle", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("invoke_finish_bundle", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_12invoke_finish_bundle(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_12invoke_finish_bundle(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_finish_bundle", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_finish_bundle(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_finish_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":627 + * self._bundle_context_values = None + * + * def invoke_teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown, "Invokes the DoFn.teardown() method\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown = {"invoke_teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("invoke_teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("invoke_teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_v_c = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_teardown", 0); + + /* "apache_beam/runners/common.py":632 + * """Invokes the DoFn.teardown() method + * """ + * self.signature.teardown_lifecycle_method.method_value() # <<<<<<<<<<<<<< + * for c in self._setup_context_values.values(): + * c[0].__exit__(None, None, None) +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->teardown_lifecycle_method->method_value); + __pyx_t_3 = __pyx_v_self->signature->teardown_lifecycle_method->method_value; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":633 + * """ + * self.signature.teardown_lifecycle_method.method_value() + * for c in self._setup_context_values.values(): # <<<<<<<<<<<<<< + * c[0].__exit__(None, None, None) + * self._setup_context_values = None +*/ + __pyx_t_5 = 0; + if (unlikely(__pyx_v_self->_setup_context_values == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 633, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->_setup_context_values, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_5, NULL, &__pyx_t_3, NULL, __pyx_t_7); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":634 + * self.signature.teardown_lifecycle_method.method_value() + * for c in self._setup_context_values.values(): + * c[0].__exit__(None, None, None) # <<<<<<<<<<<<<< + * self._setup_context_values = None + * +*/ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":635 + * for c in self._setup_context_values.values(): + * c[0].__exit__(None, None, None) + * self._setup_context_values = None # <<<<<<<<<<<<<< + * + * def invoke_user_timer( +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_setup_context_values); + __Pyx_DECREF(__pyx_v_self->_setup_context_values); + __pyx_v_self->_setup_context_values = Py_None; + + /* "apache_beam/runners/common.py":627 + * self._bundle_context_values = None + * + * def invoke_teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_c); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":637 + * self._setup_context_values = None + * + * def invoke_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * # self.output_handler is Optional, but in practice it won't be None here +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer = {"invoke_user_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_timer_spec = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_window = 0; + PyObject *__pyx_v_timestamp = 0; + PyObject *__pyx_v_pane_info = 0; + PyObject *__pyx_v_dynamic_timer_tag = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_user_timer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timer_spec,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_window,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_pane_info,&__pyx_mstate_global->__pyx_n_u_dynamic_timer_tag,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 637, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 637, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_user_timer", 0) < (0)) __PYX_ERR(0, 637, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, i); __PYX_ERR(0, 637, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 637, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 637, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 637, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 637, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 637, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 637, __pyx_L3_error) + } + __pyx_v_timer_spec = values[0]; + __pyx_v_key = values[1]; + __pyx_v_window = values[2]; + __pyx_v_timestamp = values[3]; + __pyx_v_pane_info = values[4]; + __pyx_v_dynamic_timer_tag = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_user_timer", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 637, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_user_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_16invoke_user_timer(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info, __pyx_v_dynamic_timer_tag); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_16invoke_user_timer(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_timer_spec, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_user_timer", 0); + + /* "apache_beam/runners/common.py":641 + * # self.output_handler is Optional, but in practice it won't be None here + * self.output_handler.handle_process_outputs( + * WindowedValue(None, timestamp, (window, )), # <<<<<<<<<<<<<< + * self.signature.timer_methods[timer_spec].invoke_timer_callback( + * self.user_state_context, +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_window); + __Pyx_GIVEREF(__pyx_v_window); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_window) != (0)) __PYX_ERR(0, 641, __pyx_L1_error); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, Py_None, __pyx_v_timestamp, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + + /* "apache_beam/runners/common.py":642 + * self.output_handler.handle_process_outputs( + * WindowedValue(None, timestamp, (window, )), + * self.signature.timer_methods[timer_spec].invoke_timer_callback( # <<<<<<<<<<<<<< + * self.user_state_context, + * key, +*/ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_self->signature->timer_methods, __pyx_v_timer_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":648 + * timestamp, + * pane_info, + * dynamic_timer_tag)) # <<<<<<<<<<<<<< + * + * def invoke_create_watermark_estimator(self, estimator_state): +*/ + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_self->user_state_context, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info, __pyx_v_dynamic_timer_tag}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_timer_callback, __pyx_callargs+__pyx_t_4, (7-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/runners/common.py":640 + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * # self.output_handler is Optional, but in practice it won't be None here + * self.output_handler.handle_process_outputs( # <<<<<<<<<<<<<< + * WindowedValue(None, timestamp, (window, )), + * self.signature.timer_methods[timer_spec].invoke_timer_callback( +*/ + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self->output_handler->__pyx_vtab)->handle_process_outputs(__pyx_v_self->output_handler, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1), __pyx_t_3, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":637 + * self._setup_context_values = None + * + * def invoke_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * # self.output_handler is Optional, but in practice it won't be None here +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_user_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":650 + * dynamic_timer_tag)) + * + * def invoke_create_watermark_estimator(self, estimator_state): # <<<<<<<<<<<<<< + * return self.signature.create_watermark_estimator_method.method_value( + * estimator_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator = {"invoke_create_watermark_estimator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_estimator_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_create_watermark_estimator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_estimator_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 650, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 650, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_create_watermark_estimator", 0) < (0)) __PYX_ERR(0, 650, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_create_watermark_estimator", 1, 1, 1, i); __PYX_ERR(0, 650, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 650, __pyx_L3_error) + } + __pyx_v_estimator_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_create_watermark_estimator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 650, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_create_watermark_estimator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_18invoke_create_watermark_estimator(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_estimator_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_18invoke_create_watermark_estimator(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_estimator_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_create_watermark_estimator", 0); + + /* "apache_beam/runners/common.py":651 + * + * def invoke_create_watermark_estimator(self, estimator_state): + * return self.signature.create_watermark_estimator_method.method_value( # <<<<<<<<<<<<<< + * estimator_state) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->create_watermark_estimator_method->method_value); + __pyx_t_3 = __pyx_v_self->signature->create_watermark_estimator_method->method_value; + + /* "apache_beam/runners/common.py":652 + * def invoke_create_watermark_estimator(self, estimator_state): + * return self.signature.create_watermark_estimator_method.method_value( + * estimator_state) # <<<<<<<<<<<<<< + * + * def invoke_split(self, element, restriction): +*/ + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_estimator_state}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":650 + * dynamic_timer_tag)) + * + * def invoke_create_watermark_estimator(self, estimator_state): # <<<<<<<<<<<<<< + * return self.signature.create_watermark_estimator_method.method_value( + * estimator_state) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_create_watermark_estimator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":654 + * estimator_state) + * + * def invoke_split(self, element, restriction): # <<<<<<<<<<<<<< + * return self.signature.split_method.method_value(element, restriction) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_restriction, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_split", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_element, __pyx_v_restriction}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":655 + * + * def invoke_split(self, element, restriction): + * return self.signature.split_method.method_value(element, restriction) # <<<<<<<<<<<<<< + * + * def invoke_initial_restriction(self, element): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->split_method->method_value); + __pyx_t_4 = __pyx_v_self->signature->split_method->method_value; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_element, __pyx_v_restriction}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":654 + * estimator_state) + * + * def invoke_split(self, element, restriction): # <<<<<<<<<<<<<< + * return self.signature.split_method.method_value(element, restriction) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split = {"invoke_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + PyObject *__pyx_v_restriction = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_restriction,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 654, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 654, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 654, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_split", 0) < (0)) __PYX_ERR(0, 654, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_split", 1, 2, 2, i); __PYX_ERR(0, 654, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 654, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 654, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_restriction = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_split", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 654, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_20invoke_split(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_element, __pyx_v_restriction); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_20invoke_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_restriction) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_split", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_split(__pyx_v_self, __pyx_v_element, __pyx_v_restriction, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":657 + * return self.signature.split_method.method_value(element, restriction) + * + * def invoke_initial_restriction(self, element): # <<<<<<<<<<<<<< + * return self.signature.initial_restriction_method.method_value(element) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_initial_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_initial_restriction", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_initial_restriction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_element}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":658 + * + * def invoke_initial_restriction(self, element): + * return self.signature.initial_restriction_method.method_value(element) # <<<<<<<<<<<<<< + * + * def invoke_create_tracker(self, restriction): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->initial_restriction_method->method_value); + __pyx_t_4 = __pyx_v_self->signature->initial_restriction_method->method_value; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_element}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":657 + * return self.signature.split_method.method_value(element, restriction) + * + * def invoke_initial_restriction(self, element): # <<<<<<<<<<<<<< + * return self.signature.initial_restriction_method.method_value(element) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_initial_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction = {"invoke_initial_restriction", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_initial_restriction (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 657, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 657, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_initial_restriction", 0) < (0)) __PYX_ERR(0, 657, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_initial_restriction", 1, 1, 1, i); __PYX_ERR(0, 657, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 657, __pyx_L3_error) + } + __pyx_v_element = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_initial_restriction", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 657, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_initial_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22invoke_initial_restriction(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22invoke_initial_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_initial_restriction", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_initial_restriction(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_initial_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":660 + * return self.signature.initial_restriction_method.method_value(element) + * + * def invoke_create_tracker(self, restriction): # <<<<<<<<<<<<<< + * return self.signature.create_tracker_method.method_value(restriction) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_create_tracker(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_restriction, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_create_tracker", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_create_tracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_restriction}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":661 + * + * def invoke_create_tracker(self, restriction): + * return self.signature.create_tracker_method.method_value(restriction) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->signature->create_tracker_method->method_value); + __pyx_t_4 = __pyx_v_self->signature->create_tracker_method->method_value; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_restriction}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":660 + * return self.signature.initial_restriction_method.method_value(element) + * + * def invoke_create_tracker(self, restriction): # <<<<<<<<<<<<<< + * return self.signature.create_tracker_method.method_value(restriction) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_create_tracker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker = {"invoke_create_tracker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_restriction = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_create_tracker (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_restriction,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 660, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_create_tracker", 0) < (0)) __PYX_ERR(0, 660, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_create_tracker", 1, 1, 1, i); __PYX_ERR(0, 660, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + } + __pyx_v_restriction = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_create_tracker", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 660, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_create_tracker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_24invoke_create_tracker(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_restriction); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_24invoke_create_tracker(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_restriction) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_create_tracker", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_create_tracker(__pyx_v_self, __pyx_v_restriction, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.invoke_create_tracker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":73 + * + * cdef class DoFnInvoker(object): + * cdef public DoFnSignature signature # <<<<<<<<<<<<<< + * cdef OutputHandler output_handler + * cdef object user_state_context +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->signature); + __pyx_r = ((PyObject *)__pyx_v_self->signature); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(2, 73, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->signature); + __Pyx_DECREF((PyObject *)__pyx_v_self->signature); + __pyx_v_self->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.signature.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_9signature_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->signature); + __Pyx_DECREF((PyObject *)__pyx_v_self->signature); + __pyx_v_self->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":76 + * cdef OutputHandler output_handler + * cdef object user_state_context + * cdef public object bundle_finalizer_param # <<<<<<<<<<<<<< + * cdef object _setup_context_values + * cdef object _bundle_context_values +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->bundle_finalizer_param); + __pyx_r = __pyx_v_self->bundle_finalizer_param; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_26__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_26__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_bundle_context_values); + __Pyx_GIVEREF(__pyx_v_self->_bundle_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_bundle_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_setup_context_values); + __Pyx_GIVEREF(__pyx_v_self->_setup_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_setup_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_GIVEREF(__pyx_v_self->bundle_finalizer_param); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->bundle_finalizer_param) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->output_handler); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->output_handler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->output_handler)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->signature); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->signature); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->signature)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->user_state_context); + __Pyx_GIVEREF(__pyx_v_self->user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->user_state_context) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.signature is not None or self.user_state_context is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.signature is not None or self.user_state_context is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->_bundle_context_values != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_setup_context_values != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->bundle_finalizer_param != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->output_handler) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->signature) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->user_state_context != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnInvoker); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_33257841); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_33257841); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_33257841) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, None), state + * else: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnInvoker); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_33257841); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_33257841); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_33257841) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_28__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnInvoker_28__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":666 + * class SimpleInvoker(DoFnInvoker): + * """An invoker that processes elements ignoring windowing information.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: OutputHandler +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_output_handler = 0; + PyObject *__pyx_v_signature = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_output_handler,&__pyx_mstate_global->__pyx_n_u_signature,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 666, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 666, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 666, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 666, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 666, __pyx_L3_error) + } + __pyx_v_output_handler = values[0]; + __pyx_v_signature = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 666, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker___init__(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v_self), __pyx_v_output_handler, __pyx_v_signature); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":672 + * ): + * # type: (...) -> None + * super().__init__(output_handler, signature) # <<<<<<<<<<<<<< + * self.process_method = signature.process_method.method_value + * self.process_batch_method = signature.process_batch_method.method_value +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_output_handler, __pyx_v_signature}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":673 + * # type: (...) -> None + * super().__init__(output_handler, signature) + * self.process_method = signature.process_method.method_value # <<<<<<<<<<<<<< + * self.process_batch_method = signature.process_batch_method.method_value + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_method_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->process_method); + __Pyx_DECREF(__pyx_v_self->process_method); + __pyx_v_self->process_method = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":674 + * super().__init__(output_handler, signature) + * self.process_method = signature.process_method.method_value + * self.process_batch_method = signature.process_batch_method.method_value # <<<<<<<<<<<<<< + * + * def invoke_process( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_batch_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_method_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->process_batch_method); + __Pyx_DECREF(__pyx_v_self->process_batch_method); + __pyx_v_self->process_batch_method = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":666 + * class SimpleInvoker(DoFnInvoker): + * """An invoker that processes elements ignoring windowing information.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: OutputHandler +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":679 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + PyObject *__pyx_v_restriction = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":680 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + PyObject *__pyx_v_watermark_estimator_state = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":681 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + PyObject *__pyx_v_additional_args = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":682 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * self.output_handler.handle_process_outputs( +*/ + PyObject *__pyx_v_additional_kwargs = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_restriction = __pyx_optional_args->restriction; + if (__pyx_optional_args->__pyx_n > 1) { + __pyx_v_watermark_estimator_state = __pyx_optional_args->watermark_estimator_state; + if (__pyx_optional_args->__pyx_n > 2) { + __pyx_v_additional_args = __pyx_optional_args->additional_args; + if (__pyx_optional_args->__pyx_n > 3) { + __pyx_v_additional_kwargs = __pyx_optional_args->additional_kwargs; + } + } + } + } + } + + /* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":685 + * # type: (...) -> Iterable[SplitResultResidual] + * self.output_handler.handle_process_outputs( + * windowed_value, self.process_method(windowed_value.value)) # <<<<<<<<<<<<<< + * return [] + * +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->process_method); + __pyx_t_4 = __pyx_v_self->process_method; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_windowed_value->value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/common.py":684 + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] + * self.output_handler.handle_process_outputs( # <<<<<<<<<<<<<< + * windowed_value, self.process_method(windowed_value.value)) + * return [] +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self->__pyx_base.output_handler->__pyx_vtab)->handle_process_outputs(__pyx_v_self->__pyx_base.output_handler, __pyx_v_windowed_value, __pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":686 + * self.output_handler.handle_process_outputs( + * windowed_value, self.process_method(windowed_value.value)) + * return [] # <<<<<<<<<<<<<< + * + * def invoke_process_batch( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process = {"invoke_process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_restriction = 0; + PyObject *__pyx_v_watermark_estimator_state = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_watermark_estimator_state,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 676, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process", 0) < (0)) __PYX_ERR(0, 676, __pyx_L3_error) + + /* "apache_beam/runners/common.py":679 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":680 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":681 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":682 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * self.output_handler.handle_process_outputs( +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, i); __PYX_ERR(0, 676, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 676, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 676, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":679 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":680 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":681 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":682 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * self.output_handler.handle_process_outputs( +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + __pyx_v_restriction = values[1]; + __pyx_v_watermark_estimator_state = values[2]; + __pyx_v_additional_args = values[3]; + __pyx_v_additional_kwargs = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 676, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_2invoke_process(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_2invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 4; + __pyx_t_2.restriction = __pyx_v_restriction; + __pyx_t_2.watermark_estimator_state = __pyx_v_watermark_estimator_state; + __pyx_t_2.additional_args = __pyx_v_additional_args; + __pyx_t_2.additional_kwargs = __pyx_v_additional_kwargs; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker->__pyx_base.invoke_process(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_windowed_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":688 + * return [] + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch = {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_batch = 0; + CYTHON_UNUSED PyObject *__pyx_v_restriction = 0; + CYTHON_UNUSED PyObject *__pyx_v_watermark_estimator_state = 0; + CYTHON_UNUSED PyObject *__pyx_v_additional_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_watermark_estimator_state,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 688, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process_batch", 0) < (0)) __PYX_ERR(0, 688, __pyx_L3_error) + + /* "apache_beam/runners/common.py":691 + * self, + * windowed_batch, # type: WindowedBatch + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":692 + * windowed_batch, # type: WindowedBatch + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":693 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":694 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * self.output_handler.handle_process_batch_outputs( +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 5, i); __PYX_ERR(0, 688, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 688, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 688, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":691 + * self, + * windowed_batch, # type: WindowedBatch + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":692 + * windowed_batch, # type: WindowedBatch + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":693 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":694 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * self.output_handler.handle_process_batch_outputs( +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_batch = values[0]; + __pyx_v_restriction = values[1]; + __pyx_v_watermark_estimator_state = values[2]; + __pyx_v_additional_args = values[3]; + __pyx_v_additional_kwargs = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 688, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_4invoke_process_batch(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v_self), __pyx_v_windowed_batch, __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":688 + * return [] + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_4invoke_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_batch, CYTHON_UNUSED PyObject *__pyx_v_restriction, CYTHON_UNUSED PyObject *__pyx_v_watermark_estimator_state, CYTHON_UNUSED PyObject *__pyx_v_additional_args, CYTHON_UNUSED PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process_batch", 0); + + /* "apache_beam/runners/common.py":697 + * # type: (...) -> None + * self.output_handler.handle_process_batch_outputs( + * windowed_batch, self.process_batch_method(windowed_batch.values)) # <<<<<<<<<<<<<< + * + * +*/ + if (!(likely(((__pyx_v_windowed_batch) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->process_batch_method); + __pyx_t_3 = __pyx_v_self->process_batch_method; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/common.py":696 + * additional_kwargs=None): + * # type: (...) -> None + * self.output_handler.handle_process_batch_outputs( # <<<<<<<<<<<<<< + * windowed_batch, self.process_batch_method(windowed_batch.values)) + * +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self->__pyx_base.output_handler->__pyx_vtab)->handle_process_batch_outputs(__pyx_v_self->__pyx_base.output_handler, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_windowed_batch), __pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":688 + * return [] + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_6__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.process_batch_method, self.process_method, self.signature, self.user_state_context) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base._bundle_context_values); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bundle_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._bundle_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._setup_context_values); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._setup_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base._setup_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.bundle_finalizer_param) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.output_handler); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.output_handler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->__pyx_base.output_handler)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->process_batch_method); + __Pyx_GIVEREF(__pyx_v_self->process_batch_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->process_batch_method) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->process_method); + __Pyx_GIVEREF(__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->process_method) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.signature); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.signature); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_v_self->__pyx_base.signature)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->__pyx_base.user_state_context) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.process_batch_method, self.process_method, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.process_batch_method, self.process_method, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.process_batch_method is not None or self.process_method is not None or self.signature is not None or self.user_state_context is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.bundle_finalizer_param, self.output_handler, self.process_batch_method, self.process_method, self.signature, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.process_batch_method is not None or self.process_method is not None or self.signature is not None or self.user_state_context is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->__pyx_base._bundle_context_values != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base._setup_context_values != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.bundle_finalizer_param != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.output_handler) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->process_batch_method != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->process_method != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.signature) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.process_batch_method is not None or self.process_method is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.process_batch_method is not None or self.process_method is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleInvoker); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_129653113); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_129653113); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_129653113) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.bundle_finalizer_param is not None or self.output_handler is not None or self.process_batch_method is not None or self.process_method is not None or self.signature is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, None), state + * else: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleInvoker); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_129653113); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_129653113); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_129653113) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_8__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13SimpleInvoker_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_SimpleInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.SimpleInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":700 + * + * + * def _get_arg_placeholders( # <<<<<<<<<<<<<< + * method: MethodWrapper, + * input_args: Optional[List[Any]], +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_1_get_arg_placeholders(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_1_get_arg_placeholders = {"_get_arg_placeholders", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_1_get_arg_placeholders, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_1_get_arg_placeholders(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method = 0; + PyObject *__pyx_v_input_args = 0; + PyObject *__pyx_v_input_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_arg_placeholders (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method,&__pyx_mstate_global->__pyx_n_u_input_args,&__pyx_mstate_global->__pyx_n_u_input_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 700, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 700, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 700, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_arg_placeholders", 0) < (0)) __PYX_ERR(0, 700, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_arg_placeholders", 1, 3, 3, i); __PYX_ERR(0, 700, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 700, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 700, __pyx_L3_error) + } + __pyx_v_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)values[0]); + __pyx_v_input_args = ((PyObject*)values[1]); + __pyx_v_input_kwargs = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_get_arg_placeholders", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, 0, "method", 0))) __PYX_ERR(0, 701, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_args), (&PyList_Type), 1, "input_args", 2))) __PYX_ERR(0, 702, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_kwargs), (&PyDict_Type), 1, "input_kwargs", 2))) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common__get_arg_placeholders(__pyx_self, __pyx_v_method, __pyx_v_input_args, __pyx_v_input_kwargs); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":714 + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): + * def __init__(self, placeholder): # <<<<<<<<<<<<<< + * self.placeholder = placeholder + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_placeholder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_placeholder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 714, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 714, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 714, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 714, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 714, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 714, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 714, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_placeholder = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 714, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders.ArgPlaceholder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder___init__(__pyx_self, __pyx_v_self, __pyx_v_placeholder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_placeholder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":715 + * class ArgPlaceholder(object): + * def __init__(self, placeholder): + * self.placeholder = placeholder # <<<<<<<<<<<<<< + * + * if all(core.DoFn.ElementParam != arg for arg in default_arg_values): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_placeholder, __pyx_v_placeholder) < (0)) __PYX_ERR(0, 715, __pyx_L1_error) + + /* "apache_beam/runners/common.py":714 + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): + * def __init__(self, placeholder): # <<<<<<<<<<<<<< + * self.placeholder = placeholder + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders.ArgPlaceholder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":717 + * self.placeholder = placeholder + * + * if all(core.DoFn.ElementParam != arg for arg in default_arg_values): # <<<<<<<<<<<<<< + * # TODO(https://github.com/apache/beam/issues/19631): Handle cases in which + * # len(arg_names) == len(default_arg_values). +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 717, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders_locals_gen, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 717, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 717, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 717, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 717, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 717, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_v_arg, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":700 + * + * + * def _get_arg_placeholders( # <<<<<<<<<<<<<< + * method: MethodWrapper, + * input_args: Optional[List[Any]], +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common__get_arg_placeholders(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v_method, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs) { + PyObject *__pyx_v_arg_names = NULL; + PyObject *__pyx_v_default_arg_values = NULL; + PyObject *__pyx_v_ArgPlaceholder = NULL; + Py_ssize_t __pyx_v_args_to_pick; + PyObject *__pyx_v_args_with_placeholders = NULL; + PyObject *__pyx_v_remaining_args_iter = NULL; + PyObject *__pyx_v_a = NULL; + PyObject *__pyx_v_d = NULL; + PyObject *__pyx_v_placeholders = NULL; + PyObject *__pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator2 = 0; + PyObject *__pyx_8genexpr4__pyx_v_i = NULL; + PyObject *__pyx_8genexpr4__pyx_v_x = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + size_t __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_10 = NULL; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_arg_placeholders", 0); + __Pyx_INCREF(__pyx_v_input_args); + __Pyx_INCREF(__pyx_v_input_kwargs); + + /* "apache_beam/runners/common.py":704 + * input_args: Optional[List[Any]], + * input_kwargs: Optional[Dict[str, any]]): + * input_args = input_args if input_args else [] # <<<<<<<<<<<<<< + * input_kwargs = input_kwargs if input_kwargs else {} + * +*/ + if (__pyx_v_input_args == Py_None) __pyx_t_2 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_input_args); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_2 = (__pyx_temp != 0); + } + + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_v_input_args); + __pyx_t_1 = __pyx_v_input_args; + } else { + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __Pyx_DECREF_SET(__pyx_v_input_args, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":705 + * input_kwargs: Optional[Dict[str, any]]): + * input_args = input_args if input_args else [] + * input_kwargs = input_kwargs if input_kwargs else {} # <<<<<<<<<<<<<< + * + * arg_names = method.args +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_input_kwargs); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 705, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_v_input_kwargs); + __pyx_t_1 = __pyx_v_input_kwargs; + } else { + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __Pyx_DECREF_SET(__pyx_v_input_kwargs, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":707 + * input_kwargs = input_kwargs if input_kwargs else {} + * + * arg_names = method.args # <<<<<<<<<<<<<< + * default_arg_values = method.defaults + * +*/ + __pyx_t_1 = __pyx_v_method->args; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_arg_names = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":708 + * + * arg_names = method.args + * default_arg_values = method.defaults # <<<<<<<<<<<<<< + * + * # Create placeholder for element parameter of DoFn.process() method. +*/ + __pyx_t_1 = __pyx_v_method->defaults; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_default_arg_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":713 + * # Not to be confused with ArgumentPlaceHolder, which may be passed in + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): # <<<<<<<<<<<<<< + * def __init__(self, placeholder): + * self.placeholder = placeholder +*/ + __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[2]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_ArgPlaceholder, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders_locals_Arg, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_1 != __pyx_mstate_global->__pyx_tuple[2]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[2]) < 0))) __PYX_ERR(0, 713, __pyx_L1_error) + } + + /* "apache_beam/runners/common.py":714 + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): + * def __init__(self, placeholder): # <<<<<<<<<<<<<< + * self.placeholder = placeholder + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_21_get_arg_placeholders_14ArgPlaceholder_1__init__, 0, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders_locals_Arg_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 714, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":713 + * # Not to be confused with ArgumentPlaceHolder, which may be passed in + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): # <<<<<<<<<<<<<< + * def __init__(self, placeholder): + * self.placeholder = placeholder +*/ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ArgPlaceholder, __pyx_t_1, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_ArgPlaceholder = __pyx_t_5; + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":717 + * self.placeholder = placeholder + * + * if all(core.DoFn.ElementParam != arg for arg in default_arg_values): # <<<<<<<<<<<<<< + * # TODO(https://github.com/apache/beam/issues/19631): Handle cases in which + * # len(arg_names) == len(default_arg_values). +*/ + __pyx_t_1 = __pyx_pf_11apache_beam_7runners_6common_21_get_arg_placeholders_genexpr(NULL, __pyx_v_default_arg_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":720 + * # TODO(https://github.com/apache/beam/issues/19631): Handle cases in which + * # len(arg_names) == len(default_arg_values). + * args_to_pick = len(arg_names) - len(default_arg_values) - 1 # <<<<<<<<<<<<<< + * # Positional argument values for process(), with placeholders for special + * # values such as the element, timestamp, etc. +*/ + __pyx_t_6 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_v_default_arg_values); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_v_args_to_pick = ((__pyx_t_6 - __pyx_t_7) - 1); + + /* "apache_beam/runners/common.py":723 + * # Positional argument values for process(), with placeholders for special + * # values such as the element, timestamp, etc. + * args_with_placeholders = ([ArgPlaceholder(core.DoFn.ElementParam)] + # <<<<<<<<<<<<<< + * input_args[:args_to_pick]) + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 723, __pyx_L1_error); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":724 + * # values such as the element, timestamp, etc. + * args_with_placeholders = ([ArgPlaceholder(core.DoFn.ElementParam)] + + * input_args[:args_to_pick]) # <<<<<<<<<<<<<< + * else: + * args_to_pick = len(arg_names) - len(default_arg_values) +*/ + if (unlikely(__pyx_v_input_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 724, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_input_args, 0, __pyx_v_args_to_pick); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":723 + * # Positional argument values for process(), with placeholders for special + * # values such as the element, timestamp, etc. + * args_with_placeholders = ([ArgPlaceholder(core.DoFn.ElementParam)] + # <<<<<<<<<<<<<< + * input_args[:args_to_pick]) + * else: +*/ + __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_args_with_placeholders = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":717 + * self.placeholder = placeholder + * + * if all(core.DoFn.ElementParam != arg for arg in default_arg_values): # <<<<<<<<<<<<<< + * # TODO(https://github.com/apache/beam/issues/19631): Handle cases in which + * # len(arg_names) == len(default_arg_values). +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":726 + * input_args[:args_to_pick]) + * else: + * args_to_pick = len(arg_names) - len(default_arg_values) # <<<<<<<<<<<<<< + * args_with_placeholders = input_args[:args_to_pick] + * +*/ + /*else*/ { + __pyx_t_7 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_v_default_arg_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_v_args_to_pick = (__pyx_t_7 - __pyx_t_6); + + /* "apache_beam/runners/common.py":727 + * else: + * args_to_pick = len(arg_names) - len(default_arg_values) + * args_with_placeholders = input_args[:args_to_pick] # <<<<<<<<<<<<<< + * + * # Fill the OtherPlaceholders for context, key, window or timestamp +*/ + if (unlikely(__pyx_v_input_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 727, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_v_input_args, 0, __pyx_v_args_to_pick); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_args_with_placeholders = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":730 + * + * # Fill the OtherPlaceholders for context, key, window or timestamp + * remaining_args_iter = iter(input_args[args_to_pick:]) # <<<<<<<<<<<<<< + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): + * if core.DoFn.ElementParam == d: +*/ + if (unlikely(__pyx_v_input_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 730, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_v_input_args, __pyx_v_args_to_pick, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_remaining_args_iter = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":731 + * # Fill the OtherPlaceholders for context, key, window or timestamp + * remaining_args_iter = iter(input_args[args_to_pick:]) + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_4 = NULL; + __pyx_t_6 = PyObject_Length(__pyx_v_default_arg_values); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_arg_names, (-__pyx_t_6), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_default_arg_values}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); + __pyx_t_6 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 731, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 731, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 731, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_9(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 731, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 731, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); + index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":732 + * remaining_args_iter = iter(input_args[args_to_pick:]) + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): + * if core.DoFn.ElementParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.KeyParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":733 + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): + * if core.DoFn.ElementParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.KeyParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 733, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":732 + * remaining_args_iter = iter(input_args[args_to_pick:]) + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): + * if core.DoFn.ElementParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.KeyParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":734 + * if core.DoFn.ElementParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.KeyParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":735 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.KeyParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.WindowParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":734 + * if core.DoFn.ElementParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.KeyParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":736 + * elif core.DoFn.KeyParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowedValueParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":737 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.WindowedValueParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 737, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":736 + * elif core.DoFn.KeyParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowedValueParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":738 + * elif core.DoFn.WindowParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowedValueParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.TimestampParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_WindowedValueParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":739 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowedValueParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.TimestampParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":738 + * elif core.DoFn.WindowParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.WindowedValueParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.TimestampParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":740 + * elif core.DoFn.WindowedValueParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.TimestampParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.PaneInfoParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TimestampParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":741 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.TimestampParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.PaneInfoParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":740 + * elif core.DoFn.WindowedValueParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.TimestampParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.PaneInfoParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":742 + * elif core.DoFn.TimestampParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.PaneInfoParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.SideInputParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":743 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.PaneInfoParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif core.DoFn.SideInputParam == d: + * # If no more args are present then the value must be passed via kwarg +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":742 + * elif core.DoFn.TimestampParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.PaneInfoParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.SideInputParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":744 + * elif core.DoFn.PaneInfoParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.SideInputParam == d: # <<<<<<<<<<<<<< + * # If no more args are present then the value must be passed via kwarg + * try: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SideInputParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":746 + * elif core.DoFn.SideInputParam == d: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "apache_beam/runners/common.py":747 + * # If no more args are present then the value must be passed via kwarg + * try: + * args_with_placeholders.append(next(remaining_args_iter)) # <<<<<<<<<<<<<< + * except StopIteration: + * if a not in input_kwargs: +*/ + __pyx_t_5 = __Pyx_PyIter_Next(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 747, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":746 + * elif core.DoFn.SideInputParam == d: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + } + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L16_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":748 + * try: + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: # <<<<<<<<<<<<<< + * if a not in input_kwargs: + * raise ValueError("Value for sideinput %s not provided" % a) +*/ + __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration)))); + if (__pyx_t_16) { + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 748, __pyx_L11_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":749 + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: + * if a not in input_kwargs: # <<<<<<<<<<<<<< + * raise ValueError("Value for sideinput %s not provided" % a) + * elif isinstance(d, core.DoFn.StateParam): +*/ + if (unlikely(__pyx_v_input_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 749, __pyx_L11_except_error) + } + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_a, __pyx_v_input_kwargs, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 749, __pyx_L11_except_error) + if (unlikely(__pyx_t_2)) { + + /* "apache_beam/runners/common.py":750 + * except StopIteration: + * if a not in input_kwargs: + * raise ValueError("Value for sideinput %s not provided" % a) # <<<<<<<<<<<<<< + * elif isinstance(d, core.DoFn.StateParam): + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_17 = NULL; + __pyx_t_18 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Value_for_sideinput_s_not_provid, __pyx_v_a); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 750, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_18}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 750, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_10); + } + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(0, 750, __pyx_L11_except_error) + + /* "apache_beam/runners/common.py":749 + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: + * if a not in input_kwargs: # <<<<<<<<<<<<<< + * raise ValueError("Value for sideinput %s not provided" % a) + * elif isinstance(d, core.DoFn.StateParam): +*/ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L10_exception_handled; + } + goto __pyx_L11_except_error; + + /* "apache_beam/runners/common.py":746 + * elif core.DoFn.SideInputParam == d: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_L16_try_end:; + } + + /* "apache_beam/runners/common.py":744 + * elif core.DoFn.PaneInfoParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif core.DoFn.SideInputParam == d: # <<<<<<<<<<<<<< + * # If no more args are present then the value must be passed via kwarg + * try: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":751 + * if a not in input_kwargs: + * raise ValueError("Value for sideinput %s not provided" % a) + * elif isinstance(d, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.TimerParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_StateParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":752 + * raise ValueError("Value for sideinput %s not provided" % a) + * elif isinstance(d, core.DoFn.StateParam): + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif isinstance(d, core.DoFn.TimerParam): + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 752, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":751 + * if a not in input_kwargs: + * raise ValueError("Value for sideinput %s not provided" % a) + * elif isinstance(d, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.TimerParam): +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":753 + * elif isinstance(d, core.DoFn.StateParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_TimerParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":754 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.TimerParam): + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 754, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":753 + * elif isinstance(d, core.DoFn.StateParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":755 + * elif isinstance(d, core.DoFn.TimerParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.BundleContextParam): +*/ + __pyx_t_19 = PyType_Check(__pyx_v_d); + if (__pyx_t_19) { + } else { + __pyx_t_2 = __pyx_t_19; + goto __pyx_L20_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_BundleFinalizerParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_t_19; + __pyx_L20_bool_binop_done:; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":756 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif isinstance(d, core.DoFn.BundleContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 756, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":755 + * elif isinstance(d, core.DoFn.TimerParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.BundleContextParam): +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":757 + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.SetupContextParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BundleContextParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":758 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.BundleContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * elif isinstance(d, core.DoFn.SetupContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":757 + * elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.SetupContextParam): +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":759 + * elif isinstance(d, core.DoFn.BundleContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SetupContextParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":760 + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.SetupContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) # <<<<<<<<<<<<<< + * else: + * # If no more args are present then the value must be passed via kwarg +*/ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_v_ArgPlaceholder, __pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 760, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":759 + * elif isinstance(d, core.DoFn.BundleContextParam): + * args_with_placeholders.append(ArgPlaceholder(d)) + * elif isinstance(d, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_with_placeholders.append(ArgPlaceholder(d)) + * else: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":763 + * else: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + /*else*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "apache_beam/runners/common.py":764 + * # If no more args are present then the value must be passed via kwarg + * try: + * args_with_placeholders.append(next(remaining_args_iter)) # <<<<<<<<<<<<<< + * except StopIteration: + * pass +*/ + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args_with_placeholders, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":763 + * else: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L29_try_end; + __pyx_L22_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":765 + * try: + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: # <<<<<<<<<<<<<< + * pass + * args_with_placeholders.extend(list(remaining_args_iter)) +*/ + __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration)))); + if (__pyx_t_16) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L23_exception_handled; + } + goto __pyx_L24_except_error; + + /* "apache_beam/runners/common.py":763 + * else: + * # If no more args are present then the value must be passed via kwarg + * try: # <<<<<<<<<<<<<< + * args_with_placeholders.append(next(remaining_args_iter)) + * except StopIteration: +*/ + __pyx_L24_except_error:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L23_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); + __pyx_L29_try_end:; + } + } + __pyx_L8:; + + /* "apache_beam/runners/common.py":731 + * # Fill the OtherPlaceholders for context, key, window or timestamp + * remaining_args_iter = iter(input_args[args_to_pick:]) + * for a, d in zip(arg_names[-len(default_arg_values):], default_arg_values): # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == d: + * args_with_placeholders.append(ArgPlaceholder(d)) +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":767 + * except StopIteration: + * pass + * args_with_placeholders.extend(list(remaining_args_iter)) # <<<<<<<<<<<<<< + * + * # Stash the list of placeholder positions for performance +*/ + __pyx_t_3 = PySequence_List(__pyx_v_remaining_args_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyList_Extend(__pyx_v_args_with_placeholders, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":770 + * + * # Stash the list of placeholder positions for performance + * placeholders = [(i, x.placeholder) # <<<<<<<<<<<<<< + * for (i, x) in enumerate(args_with_placeholders) + * if isinstance(x, ArgPlaceholder)] +*/ + { /* enter inner scope */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_1 = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/runners/common.py":771 + * # Stash the list of placeholder positions for performance + * placeholders = [(i, x.placeholder) + * for (i, x) in enumerate(args_with_placeholders) # <<<<<<<<<<<<<< + * if isinstance(x, ArgPlaceholder)] + * +*/ + __pyx_t_4 = __pyx_v_args_with_placeholders; __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 771, __pyx_L35_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_x, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_i, __pyx_t_1); + __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":772 + * placeholders = [(i, x.placeholder) + * for (i, x) in enumerate(args_with_placeholders) + * if isinstance(x, ArgPlaceholder)] # <<<<<<<<<<<<<< + * + * return placeholders, args_with_placeholders, input_kwargs +*/ + __pyx_t_2 = PyObject_IsInstance(__pyx_8genexpr4__pyx_v_x, __pyx_v_ArgPlaceholder); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 772, __pyx_L35_error) + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":770 + * + * # Stash the list of placeholder positions for performance + * placeholders = [(i, x.placeholder) # <<<<<<<<<<<<<< + * for (i, x) in enumerate(args_with_placeholders) + * if isinstance(x, ArgPlaceholder)] +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_x, __pyx_mstate_global->__pyx_n_u_placeholder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 770, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_8genexpr4__pyx_v_i); + __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_i); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_8genexpr4__pyx_v_i) != (0)) __PYX_ERR(0, 770, __pyx_L35_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 770, __pyx_L35_error); + __pyx_t_5 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 770, __pyx_L35_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":772 + * placeholders = [(i, x.placeholder) + * for (i, x) in enumerate(args_with_placeholders) + * if isinstance(x, ArgPlaceholder)] # <<<<<<<<<<<<<< + * + * return placeholders, args_with_placeholders, input_kwargs +*/ + } + + /* "apache_beam/runners/common.py":771 + * # Stash the list of placeholder positions for performance + * placeholders = [(i, x.placeholder) + * for (i, x) in enumerate(args_with_placeholders) # <<<<<<<<<<<<<< + * if isinstance(x, ArgPlaceholder)] + * +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i); __pyx_8genexpr4__pyx_v_i = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0; + goto __pyx_L40_exit_scope; + __pyx_L35_error:; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i); __pyx_8genexpr4__pyx_v_i = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0; + goto __pyx_L1_error; + __pyx_L40_exit_scope:; + } /* exit inner scope */ + __pyx_v_placeholders = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":774 + * if isinstance(x, ArgPlaceholder)] + * + * return placeholders, args_with_placeholders, input_kwargs # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_placeholders); + __Pyx_GIVEREF(__pyx_v_placeholders); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_placeholders) != (0)) __PYX_ERR(0, 774, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_args_with_placeholders); + __Pyx_GIVEREF(__pyx_v_args_with_placeholders); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args_with_placeholders) != (0)) __PYX_ERR(0, 774, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_input_kwargs); + __Pyx_GIVEREF(__pyx_v_input_kwargs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_input_kwargs) != (0)) __PYX_ERR(0, 774, __pyx_L1_error); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":700 + * + * + * def _get_arg_placeholders( # <<<<<<<<<<<<<< + * method: MethodWrapper, + * input_args: Optional[List[Any]], +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_AddTraceback("apache_beam.runners.common._get_arg_placeholders", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arg_names); + __Pyx_XDECREF(__pyx_v_default_arg_values); + __Pyx_XDECREF(__pyx_v_ArgPlaceholder); + __Pyx_XDECREF(__pyx_v_args_with_placeholders); + __Pyx_XDECREF(__pyx_v_remaining_args_iter); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_placeholders); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_21_get_arg_placeholders_2generator2); + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i); + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); + __Pyx_XDECREF(__pyx_v_input_args); + __Pyx_XDECREF(__pyx_v_input_kwargs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":779 + * class PerWindowInvoker(DoFnInvoker): + * """An invoker that processes elements considering windowing information.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: OutputHandler +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_output_handler = 0; + PyObject *__pyx_v_signature = 0; + PyObject *__pyx_v_context = 0; + PyObject *__pyx_v_side_inputs = 0; + PyObject *__pyx_v_input_args = 0; + PyObject *__pyx_v_input_kwargs = 0; + PyObject *__pyx_v_user_state_context = 0; + PyObject *__pyx_v_bundle_finalizer_param = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_output_handler,&__pyx_mstate_global->__pyx_n_u_signature,&__pyx_mstate_global->__pyx_n_u_context,&__pyx_mstate_global->__pyx_n_u_side_inputs,&__pyx_mstate_global->__pyx_n_u_input_args,&__pyx_mstate_global->__pyx_n_u_input_kwargs,&__pyx_mstate_global->__pyx_n_u_user_state_context,&__pyx_mstate_global->__pyx_n_u_bundle_finalizer_param,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 779, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 779, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 8; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, i); __PYX_ERR(0, 779, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 8)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 779, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 779, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 779, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 779, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 779, __pyx_L3_error) + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 779, __pyx_L3_error) + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 779, __pyx_L3_error) + } + __pyx_v_output_handler = values[0]; + __pyx_v_signature = values[1]; + __pyx_v_context = values[2]; + __pyx_v_side_inputs = values[3]; + __pyx_v_input_args = values[4]; + __pyx_v_input_kwargs = values[5]; + __pyx_v_user_state_context = values[6]; + __pyx_v_bundle_finalizer_param = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker___init__(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_output_handler, __pyx_v_signature, __pyx_v_context, __pyx_v_side_inputs, __pyx_v_input_args, __pyx_v_input_kwargs, __pyx_v_user_state_context, __pyx_v_bundle_finalizer_param); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":796 + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 796, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 796, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 796, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 796, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 796, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_5 = __pyx_cur_scope->__pyx_v_si; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_globally_windowed, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 797, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 797, __pyx_L1_error) + + /* "apache_beam/runners/common.py":798 + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or +*/ + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 798, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 798, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 798, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 798, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_v_arg, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":796 + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":798 + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + + /* "apache_beam/runners/common.py":796 + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___6genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 799, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 799, __pyx_L1_error) + + /* "apache_beam/runners/common.py":800 + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or # <<<<<<<<<<<<<< + * signature.is_stateful_dofn()) + * self.user_state_context = user_state_context +*/ + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 800, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 800, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 800, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 800, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_v_arg, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":798 + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":800 + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or # <<<<<<<<<<<<<< + * signature.is_stateful_dofn()) + * self.user_state_context = user_state_context +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + + /* "apache_beam/runners/common.py":798 + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/common.py":805 + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___9genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 805, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common); if (unlikely(!gen)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 805, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 805, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 805, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_v_arg, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":804 + * self.user_state_context = user_state_context + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( # <<<<<<<<<<<<<< + * core.DoFn.KeyParam == arg for arg in default_arg_values) + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":805 + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] +*/ + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + + /* "apache_beam/runners/common.py":804 + * self.user_state_context = user_state_context + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( # <<<<<<<<<<<<<< + * core.DoFn.KeyParam == arg for arg in default_arg_values) + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":805 + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] +*/ + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":779 + * class PerWindowInvoker(DoFnInvoker): + * """An invoker that processes elements considering windowing information.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: OutputHandler +*/ + +static int __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker___init__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_output_handler, PyObject *__pyx_v_signature, PyObject *__pyx_v_context, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_input_args, PyObject *__pyx_v_input_kwargs, PyObject *__pyx_v_user_state_context, PyObject *__pyx_v_bundle_finalizer_param) { + PyObject *__pyx_v_default_arg_values = NULL; + PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator3 = 0; + PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator4 = 0; + PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator5 = 0; + PyObject *__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator6 = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_INCREF(__pyx_v_input_args); + + /* "apache_beam/runners/common.py":790 + * bundle_finalizer_param # type: Optional[core._BundleFinalizerParam] + * ): + * super().__init__(output_handler, signature) # <<<<<<<<<<<<<< + * self.side_inputs = side_inputs + * self.context = context +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_output_handler, __pyx_v_signature}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":791 + * ): + * super().__init__(output_handler, signature) + * self.side_inputs = side_inputs # <<<<<<<<<<<<<< + * self.context = context + * self.process_method = signature.process_method.method_value +*/ + __pyx_t_1 = __pyx_v_side_inputs; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->side_inputs); + __Pyx_DECREF(__pyx_v_self->side_inputs); + __pyx_v_self->side_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":792 + * super().__init__(output_handler, signature) + * self.side_inputs = side_inputs + * self.context = context # <<<<<<<<<<<<<< + * self.process_method = signature.process_method.method_value + * default_arg_values = signature.process_method.defaults +*/ + __pyx_t_1 = __pyx_v_context; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(0, 792, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->context); + __Pyx_DECREF((PyObject *)__pyx_v_self->context); + __pyx_v_self->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":793 + * self.side_inputs = side_inputs + * self.context = context + * self.process_method = signature.process_method.method_value # <<<<<<<<<<<<<< + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_method_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->process_method); + __Pyx_DECREF(__pyx_v_self->process_method); + __pyx_v_self->process_method = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":794 + * self.context = context + * self.process_method = signature.process_method.method_value + * default_arg_values = signature.process_method.defaults # <<<<<<<<<<<<<< + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_default_arg_values = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":796 + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( +*/ + __pyx_t_1 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___genexpr(NULL, __pyx_v_side_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 796, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (!__pyx_t_8) { + } else { + __pyx_t_6 = __pyx_t_8; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/runners/common.py":798 + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( # <<<<<<<<<<<<<< + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":797 + * self.has_windowed_inputs = ( + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg +*/ + __pyx_t_3 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___3genexpr(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_8) { + } else { + __pyx_t_6 = __pyx_t_8; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/runners/common.py":800 + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or # <<<<<<<<<<<<<< + * signature.is_stateful_dofn()) + * self.user_state_context = user_state_context +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_batch_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":799 + * core.DoFn.WindowParam == arg + * for arg in signature.process_method.defaults) or any( + * core.DoFn.WindowParam == arg # <<<<<<<<<<<<<< + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) +*/ + __pyx_t_1 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___6genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_8) { + } else { + __pyx_t_6 = __pyx_t_8; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/runners/common.py":801 + * core.DoFn.WindowParam == arg + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) # <<<<<<<<<<<<<< + * self.user_state_context = user_state_context + * self.is_splittable = signature.is_splittable_dofn() +*/ + __pyx_t_1 = __pyx_v_signature; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_stateful_dofn, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 801, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __pyx_t_8; + __pyx_L3_bool_binop_done:; + + /* "apache_beam/runners/common.py":795 + * self.process_method = signature.process_method.method_value + * default_arg_values = signature.process_method.defaults + * self.has_windowed_inputs = ( # <<<<<<<<<<<<<< + * not all(si.is_globally_windowed() for si in side_inputs) or any( + * core.DoFn.WindowParam == arg +*/ + __pyx_v_self->has_windowed_inputs = __pyx_t_6; + + /* "apache_beam/runners/common.py":802 + * for arg in signature.process_batch_method.defaults) or + * signature.is_stateful_dofn()) + * self.user_state_context = user_state_context # <<<<<<<<<<<<<< + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( +*/ + __Pyx_INCREF(__pyx_v_user_state_context); + __Pyx_GIVEREF(__pyx_v_user_state_context); + __Pyx_GOTREF(__pyx_v_self->__pyx_base.user_state_context); + __Pyx_DECREF(__pyx_v_self->__pyx_base.user_state_context); + __pyx_v_self->__pyx_base.user_state_context = __pyx_v_user_state_context; + + /* "apache_beam/runners/common.py":803 + * signature.is_stateful_dofn()) + * self.user_state_context = user_state_context + * self.is_splittable = signature.is_splittable_dofn() # <<<<<<<<<<<<<< + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) +*/ + __pyx_t_1 = __pyx_v_signature; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_splittable_dofn, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->is_splittable = __pyx_t_6; + + /* "apache_beam/runners/common.py":805 + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] +*/ + __pyx_t_3 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___9genexpr(NULL, __pyx_v_default_arg_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":804 + * self.user_state_context = user_state_context + * self.is_splittable = signature.is_splittable_dofn() + * self.is_key_param_required = any( # <<<<<<<<<<<<<< + * core.DoFn.KeyParam == arg for arg in default_arg_values) + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] +*/ + __pyx_v_self->is_key_param_required = __pyx_t_6; + + /* "apache_beam/runners/common.py":806 + * self.is_key_param_required = any( + * core.DoFn.KeyParam == arg for arg in default_arg_values) + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] + * self.current_windowed_value = None # type: Optional[WindowedValue] +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_restriction_tracker); + __Pyx_DECREF(__pyx_v_self->threadsafe_restriction_tracker); + __pyx_v_self->threadsafe_restriction_tracker = Py_None; + + /* "apache_beam/runners/common.py":807 + * core.DoFn.KeyParam == arg for arg in default_arg_values) + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] # <<<<<<<<<<<<<< + * self.current_windowed_value = None # type: Optional[WindowedValue] + * self.bundle_finalizer_param = bundle_finalizer_param +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_watermark_estimator); + __Pyx_DECREF(__pyx_v_self->threadsafe_watermark_estimator); + __pyx_v_self->threadsafe_watermark_estimator = Py_None; + + /* "apache_beam/runners/common.py":808 + * self.threadsafe_restriction_tracker = None # type: Optional[ThreadsafeRestrictionTracker] + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] + * self.current_windowed_value = None # type: Optional[WindowedValue] # <<<<<<<<<<<<<< + * self.bundle_finalizer_param = bundle_finalizer_param + * if self.is_splittable: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->current_windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v_self->current_windowed_value); + __pyx_v_self->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); + + /* "apache_beam/runners/common.py":809 + * self.threadsafe_watermark_estimator = None # type: Optional[ThreadsafeWatermarkEstimator] + * self.current_windowed_value = None # type: Optional[WindowedValue] + * self.bundle_finalizer_param = bundle_finalizer_param # <<<<<<<<<<<<<< + * if self.is_splittable: + * self.splitting_lock = threading.Lock() +*/ + __Pyx_INCREF(__pyx_v_bundle_finalizer_param); + __Pyx_GIVEREF(__pyx_v_bundle_finalizer_param); + __Pyx_GOTREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + __pyx_v_self->__pyx_base.bundle_finalizer_param = __pyx_v_bundle_finalizer_param; + + /* "apache_beam/runners/common.py":810 + * self.current_windowed_value = None # type: Optional[WindowedValue] + * self.bundle_finalizer_param = bundle_finalizer_param + * if self.is_splittable: # <<<<<<<<<<<<<< + * self.splitting_lock = threading.Lock() + * self.current_window_index = None +*/ + if (__pyx_v_self->is_splittable) { + + /* "apache_beam/runners/common.py":811 + * self.bundle_finalizer_param = bundle_finalizer_param + * if self.is_splittable: + * self.splitting_lock = threading.Lock() # <<<<<<<<<<<<<< + * self.current_window_index = None + * self.stop_window_index = None +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->splitting_lock); + __Pyx_DECREF(__pyx_v_self->splitting_lock); + __pyx_v_self->splitting_lock = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":812 + * if self.is_splittable: + * self.splitting_lock = threading.Lock() + * self.current_window_index = None # <<<<<<<<<<<<<< + * self.stop_window_index = None + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_window_index); + __Pyx_DECREF(__pyx_v_self->current_window_index); + __pyx_v_self->current_window_index = Py_None; + + /* "apache_beam/runners/common.py":813 + * self.splitting_lock = threading.Lock() + * self.current_window_index = None + * self.stop_window_index = None # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/28776): Remove caching after +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->stop_window_index); + __Pyx_DECREF(__pyx_v_self->stop_window_index); + __pyx_v_self->stop_window_index = Py_None; + + /* "apache_beam/runners/common.py":810 + * self.current_windowed_value = None # type: Optional[WindowedValue] + * self.bundle_finalizer_param = bundle_finalizer_param + * if self.is_splittable: # <<<<<<<<<<<<<< + * self.splitting_lock = threading.Lock() + * self.current_window_index = None +*/ + } + + /* "apache_beam/runners/common.py":821 + * # self.args_for_process,have been updated and should be reused directly. + * self.recalculate_window_args = ( + * self.has_windowed_inputs or 'disable_global_windowed_args_caching' # <<<<<<<<<<<<<< + * in RuntimeValueProvider.experiments) + * self.has_cached_window_args = False +*/ + if (!__pyx_v_self->has_windowed_inputs) { + } else { + __pyx_t_6 = __pyx_v_self->has_windowed_inputs; + goto __pyx_L8_bool_binop_done; + } + + /* "apache_beam/runners/common.py":822 + * self.recalculate_window_args = ( + * self.has_windowed_inputs or 'disable_global_windowed_args_caching' + * in RuntimeValueProvider.experiments) # <<<<<<<<<<<<<< + * self.has_cached_window_args = False + * self.has_cached_window_batch_args = False +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RuntimeValueProvider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_experiments); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_n_u_disable_global_windowed_args_cac, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_t_8; + __pyx_L8_bool_binop_done:; + + /* "apache_beam/runners/common.py":820 + * # and has_cached_window_batch_args will be set to true if the corresponding + * # self.args_for_process,have been updated and should be reused directly. + * self.recalculate_window_args = ( # <<<<<<<<<<<<<< + * self.has_windowed_inputs or 'disable_global_windowed_args_caching' + * in RuntimeValueProvider.experiments) +*/ + __pyx_v_self->recalculate_window_args = __pyx_t_6; + + /* "apache_beam/runners/common.py":823 + * self.has_windowed_inputs or 'disable_global_windowed_args_caching' + * in RuntimeValueProvider.experiments) + * self.has_cached_window_args = False # <<<<<<<<<<<<<< + * self.has_cached_window_batch_args = False + * +*/ + __pyx_v_self->has_cached_window_args = 0; + + /* "apache_beam/runners/common.py":824 + * in RuntimeValueProvider.experiments) + * self.has_cached_window_args = False + * self.has_cached_window_batch_args = False # <<<<<<<<<<<<<< + * + * # Try to prepare all the arguments that can just be filled in +*/ + __pyx_v_self->has_cached_window_batch_args = 0; + + /* "apache_beam/runners/common.py":829 + * # without any additional work. in the process function. + * # Also cache all the placeholders needed in the process function. + * input_args = list(input_args) # <<<<<<<<<<<<<< + * ( + * self.placeholders_for_process, +*/ + __pyx_t_4 = PySequence_List(__pyx_v_input_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_input_args, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":833 + * self.placeholders_for_process, + * self.args_for_process, + * self.kwargs_for_process) = _get_arg_placeholders( # <<<<<<<<<<<<<< + * signature.process_method, input_args, input_kwargs) + * +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":834 + * self.args_for_process, + * self.kwargs_for_process) = _get_arg_placeholders( + * signature.process_method, input_args, input_kwargs) # <<<<<<<<<<<<<< + * + * self.process_batch_method = signature.process_batch_method.method_value +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_t_2, __pyx_v_input_args, __pyx_v_input_kwargs}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 831, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 2; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < (0)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_unpacking_done; + __pyx_L10_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_L11_unpacking_done:; + } + + /* "apache_beam/runners/common.py":831 + * input_args = list(input_args) + * ( + * self.placeholders_for_process, # <<<<<<<<<<<<<< + * self.args_for_process, + * self.kwargs_for_process) = _get_arg_placeholders( +*/ + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 831, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 831, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->placeholders_for_process); + __Pyx_DECREF(__pyx_v_self->placeholders_for_process); + __pyx_v_self->placeholders_for_process = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":832 + * ( + * self.placeholders_for_process, + * self.args_for_process, # <<<<<<<<<<<<<< + * self.kwargs_for_process) = _get_arg_placeholders( + * signature.process_method, input_args, input_kwargs) +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->args_for_process); + __Pyx_DECREF(__pyx_v_self->args_for_process); + __pyx_v_self->args_for_process = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":833 + * self.placeholders_for_process, + * self.args_for_process, + * self.kwargs_for_process) = _get_arg_placeholders( # <<<<<<<<<<<<<< + * signature.process_method, input_args, input_kwargs) + * +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->kwargs_for_process); + __Pyx_DECREF(__pyx_v_self->kwargs_for_process); + __pyx_v_self->kwargs_for_process = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":836 + * signature.process_method, input_args, input_kwargs) + * + * self.process_batch_method = signature.process_batch_method.method_value # <<<<<<<<<<<<<< + * + * ( +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_batch_method); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_method_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->process_batch_method); + __Pyx_DECREF(__pyx_v_self->process_batch_method); + __pyx_v_self->process_batch_method = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":841 + * self.placeholders_for_process_batch, + * self.args_for_process_batch, + * self.kwargs_for_process_batch) = _get_arg_placeholders( # <<<<<<<<<<<<<< + * signature.process_batch_method, input_args, input_kwargs) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":842 + * self.args_for_process_batch, + * self.kwargs_for_process_batch) = _get_arg_placeholders( + * signature.process_batch_method, input_args, input_kwargs) # <<<<<<<<<<<<<< + * + * def invoke_process( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_signature, __pyx_mstate_global->__pyx_n_u_process_batch_method); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_input_args, __pyx_v_input_kwargs}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 839, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 2; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < (0)) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_L13_unpacking_done:; + } + + /* "apache_beam/runners/common.py":839 + * + * ( + * self.placeholders_for_process_batch, # <<<<<<<<<<<<<< + * self.args_for_process_batch, + * self.kwargs_for_process_batch) = _get_arg_placeholders( +*/ + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 839, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 839, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_4))) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->placeholders_for_process_batch); + __Pyx_DECREF(__pyx_v_self->placeholders_for_process_batch); + __pyx_v_self->placeholders_for_process_batch = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":840 + * ( + * self.placeholders_for_process_batch, + * self.args_for_process_batch, # <<<<<<<<<<<<<< + * self.kwargs_for_process_batch) = _get_arg_placeholders( + * signature.process_batch_method, input_args, input_kwargs) +*/ + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->args_for_process_batch); + __Pyx_DECREF(__pyx_v_self->args_for_process_batch); + __pyx_v_self->args_for_process_batch = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":841 + * self.placeholders_for_process_batch, + * self.args_for_process_batch, + * self.kwargs_for_process_batch) = _get_arg_placeholders( # <<<<<<<<<<<<<< + * signature.process_batch_method, input_args, input_kwargs) + * +*/ + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->kwargs_for_process_batch); + __Pyx_DECREF(__pyx_v_self->kwargs_for_process_batch); + __pyx_v_self->kwargs_for_process_batch = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":779 + * class PerWindowInvoker(DoFnInvoker): + * """An invoker that processes elements considering windowing information.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * output_handler, # type: OutputHandler +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_default_arg_values); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___2generator3); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___5generator4); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___8generator5); + __Pyx_XDECREF(__pyx_gb_11apache_beam_7runners_6common_16PerWindowInvoker_8__init___11generator6); + __Pyx_XDECREF(__pyx_v_input_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":847 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + PyObject *__pyx_v_restriction = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":848 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + PyObject *__pyx_v_watermark_estimator_state = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":849 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + PyObject *__pyx_v_additional_args = ((PyObject *)Py_None); + + /* "apache_beam/runners/common.py":850 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: +*/ + PyObject *__pyx_v_additional_kwargs = ((PyObject *)Py_None); + PyObject *__pyx_v_residuals = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_v_residual = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + int __pyx_t_19; + int __pyx_t_20; + char const *__pyx_t_21; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_restriction = __pyx_optional_args->restriction; + if (__pyx_optional_args->__pyx_n > 1) { + __pyx_v_watermark_estimator_state = __pyx_optional_args->watermark_estimator_state; + if (__pyx_optional_args->__pyx_n > 2) { + __pyx_v_additional_args = __pyx_optional_args->additional_args; + if (__pyx_optional_args->__pyx_n > 3) { + __pyx_v_additional_kwargs = __pyx_optional_args->additional_kwargs; + } + } + } + } + } + __Pyx_INCREF(__pyx_v_restriction); + __Pyx_INCREF(__pyx_v_additional_args); + __Pyx_INCREF(__pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_invoke_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":852 + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: # <<<<<<<<<<<<<< + * additional_args = [] + * if not additional_kwargs: +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_additional_args); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":853 + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: + * additional_args = [] # <<<<<<<<<<<<<< + * if not additional_kwargs: + * additional_kwargs = {} +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_additional_args, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":852 + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: # <<<<<<<<<<<<<< + * additional_args = [] + * if not additional_kwargs: +*/ + } + + /* "apache_beam/runners/common.py":854 + * if not additional_args: + * additional_args = [] + * if not additional_kwargs: # <<<<<<<<<<<<<< + * additional_kwargs = {} + * +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_6 = (!__pyx_t_7); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":855 + * additional_args = [] + * if not additional_kwargs: + * additional_kwargs = {} # <<<<<<<<<<<<<< + * + * self.context.set_element(windowed_value) +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_additional_kwargs, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":854 + * if not additional_args: + * additional_args = [] + * if not additional_kwargs: # <<<<<<<<<<<<<< + * additional_kwargs = {} + * +*/ + } + + /* "apache_beam/runners/common.py":857 + * additional_kwargs = {} + * + * self.context.set_element(windowed_value) # <<<<<<<<<<<<<< + * # Call for the process function for each window if has windowed side inputs + * # or if the process accesses the window parameter. We can just call it once +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self->context->__pyx_vtab)->set_element(__pyx_v_self->context, __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":862 + * # otherwise as none of the arguments are changing + * + * residuals = [] # <<<<<<<<<<<<<< + * if self.is_splittable: + * if restriction is None: +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_residuals = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":863 + * + * residuals = [] + * if self.is_splittable: # <<<<<<<<<<<<<< + * if restriction is None: + * # This may be a SDF invoked as an ordinary DoFn on runners that don't +*/ + if (__pyx_v_self->is_splittable) { + + /* "apache_beam/runners/common.py":864 + * residuals = [] + * if self.is_splittable: + * if restriction is None: # <<<<<<<<<<<<<< + * # This may be a SDF invoked as an ordinary DoFn on runners that don't + * # understand SDF. See, e.g. BEAM-11472. +*/ + __pyx_t_6 = (__pyx_v_restriction == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":869 + * # In this case, processing the element is simply processing it against + * # the entire initial restriction. + * restriction = self.signature.initial_restriction_method.method_value( # <<<<<<<<<<<<<< + * windowed_value.value) + * +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->__pyx_base.signature->initial_restriction_method->method_value); + __pyx_t_4 = __pyx_v_self->__pyx_base.signature->initial_restriction_method->method_value; + + /* "apache_beam/runners/common.py":870 + * # the entire initial restriction. + * restriction = self.signature.initial_restriction_method.method_value( + * windowed_value.value) # <<<<<<<<<<<<<< + * + * with self.splitting_lock: +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_windowed_value->value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF_SET(__pyx_v_restriction, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":864 + * residuals = [] + * if self.is_splittable: + * if restriction is None: # <<<<<<<<<<<<<< + * # This may be a SDF invoked as an ordinary DoFn on runners that don't + * # understand SDF. See, e.g. BEAM-11472. +*/ + } + + /* "apache_beam/runners/common.py":872 + * windowed_value.value) + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * self.current_windowed_value = windowed_value + * self.restriction = restriction +*/ + /*with:*/ { + __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + (void)__pyx_t_9; (void)__pyx_t_10; (void)__pyx_t_11; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/common.py":873 + * + * with self.splitting_lock: + * self.current_windowed_value = windowed_value # <<<<<<<<<<<<<< + * self.restriction = restriction + * self.watermark_estimator_state = watermark_estimator_state +*/ + __Pyx_INCREF((PyObject *)__pyx_v_windowed_value); + __Pyx_GIVEREF((PyObject *)__pyx_v_windowed_value); + __Pyx_GOTREF((PyObject *)__pyx_v_self->current_windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v_self->current_windowed_value); + __pyx_v_self->current_windowed_value = __pyx_v_windowed_value; + + /* "apache_beam/runners/common.py":874 + * with self.splitting_lock: + * self.current_windowed_value = windowed_value + * self.restriction = restriction # <<<<<<<<<<<<<< + * self.watermark_estimator_state = watermark_estimator_state + * try: +*/ + __Pyx_INCREF(__pyx_v_restriction); + __Pyx_GIVEREF(__pyx_v_restriction); + __Pyx_GOTREF(__pyx_v_self->restriction); + __Pyx_DECREF(__pyx_v_self->restriction); + __pyx_v_self->restriction = __pyx_v_restriction; + + /* "apache_beam/runners/common.py":875 + * self.current_windowed_value = windowed_value + * self.restriction = restriction + * self.watermark_estimator_state = watermark_estimator_state # <<<<<<<<<<<<<< + * try: + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: +*/ + __Pyx_INCREF(__pyx_v_watermark_estimator_state); + __Pyx_GIVEREF(__pyx_v_watermark_estimator_state); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_state); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_state); + __pyx_v_self->watermark_estimator_state = __pyx_v_watermark_estimator_state; + + /* "apache_beam/runners/common.py":872 + * windowed_value.value) + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * self.current_windowed_value = windowed_value + * self.restriction = restriction +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_8) { + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + goto __pyx_L10; + } + __pyx_L10:; + } + goto __pyx_L17; + __pyx_L7_error:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/runners/common.py":876 + * self.restriction = restriction + * self.watermark_estimator_state = watermark_estimator_state + * try: # <<<<<<<<<<<<<< + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): +*/ + /*try:*/ { + + /* "apache_beam/runners/common.py":877 + * self.watermark_estimator_state = watermark_estimator_state + * try: + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: # <<<<<<<<<<<<<< + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( +*/ + if (__pyx_v_self->has_windowed_inputs) { + } else { + __pyx_t_6 = __pyx_v_self->has_windowed_inputs; + goto __pyx_L22_bool_binop_done; + } + __pyx_t_1 = __pyx_v_windowed_value->windows; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 877, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_t_12 > 1); + __pyx_t_6 = __pyx_t_7; + __pyx_L22_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":878 + * try: + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): # <<<<<<<<<<<<<< + * if not self._should_process_window_for_sdf( + * windowed_value, additional_kwargs, i): +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_1 = __pyx_mstate_global->__pyx_int_0; + if (likely(PyList_CheckExact(__pyx_v_windowed_value->windows)) || PyTuple_CheckExact(__pyx_v_windowed_value->windows)) { + __pyx_t_2 = __pyx_v_windowed_value->windows; __Pyx_INCREF(__pyx_t_2); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_windowed_value->windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 878, __pyx_L19_error) + } + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 878, __pyx_L19_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 878, __pyx_L19_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_12); + #endif + ++__pyx_t_12; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L19_error) + } else { + __pyx_t_4 = __pyx_t_13(__pyx_t_2); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 878, __pyx_L19_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":879 + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( # <<<<<<<<<<<<<< + * windowed_value, additional_kwargs, i): + * break +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":880 + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( + * windowed_value, additional_kwargs, i): # <<<<<<<<<<<<<< + * break + * residual = self._invoke_process_per_window( +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs, __pyx_v_i}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_should_process_window_for_sdf, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/common.py":879 + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( # <<<<<<<<<<<<<< + * windowed_value, additional_kwargs, i): + * break +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 879, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":881 + * if not self._should_process_window_for_sdf( + * windowed_value, additional_kwargs, i): + * break # <<<<<<<<<<<<<< + * residual = self._invoke_process_per_window( + * WindowedValue( +*/ + goto __pyx_L25_break; + + /* "apache_beam/runners/common.py":879 + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( # <<<<<<<<<<<<<< + * windowed_value, additional_kwargs, i): + * break +*/ + } + + /* "apache_beam/runners/common.py":882 + * windowed_value, additional_kwargs, i): + * break + * residual = self._invoke_process_per_window( # <<<<<<<<<<<<<< + * WindowedValue( + * windowed_value.value, windowed_value.timestamp, (w, )), +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":883 + * break + * residual = self._invoke_process_per_window( + * WindowedValue( # <<<<<<<<<<<<<< + * windowed_value.value, windowed_value.timestamp, (w, )), + * additional_args, +*/ + __pyx_t_15 = NULL; + + /* "apache_beam/runners/common.py":884 + * residual = self._invoke_process_per_window( + * WindowedValue( + * windowed_value.value, windowed_value.timestamp, (w, )), # <<<<<<<<<<<<<< + * additional_args, + * additional_kwargs) +*/ + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 884, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 884, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_INCREF(__pyx_v_w); + __Pyx_GIVEREF(__pyx_v_w); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_w) != (0)) __PYX_ERR(0, 884, __pyx_L19_error); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_15, __pyx_v_windowed_value->value, __pyx_t_16, __pyx_t_17}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 883, __pyx_L19_error) + __Pyx_GOTREF((PyObject *)__pyx_t_14); + } + + /* "apache_beam/runners/common.py":886 + * windowed_value.value, windowed_value.timestamp, (w, )), + * additional_args, + * additional_kwargs) # <<<<<<<<<<<<<< + * if residual: + * residuals.append(residual) +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_t_14), __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_per_window, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_residual, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":887 + * additional_args, + * additional_kwargs) + * if residual: # <<<<<<<<<<<<<< + * residuals.append(residual) + * else: +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_residual); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 887, __pyx_L19_error) + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":888 + * additional_kwargs) + * if residual: + * residuals.append(residual) # <<<<<<<<<<<<<< + * else: + * if self._should_process_window_for_sdf(windowed_value, +*/ + __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_residuals, __pyx_v_residual); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 888, __pyx_L19_error) + + /* "apache_beam/runners/common.py":887 + * additional_args, + * additional_kwargs) + * if residual: # <<<<<<<<<<<<<< + * residuals.append(residual) + * else: +*/ + } + + /* "apache_beam/runners/common.py":878 + * try: + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: + * for i, w in enumerate(windowed_value.windows): # <<<<<<<<<<<<<< + * if not self._should_process_window_for_sdf( + * windowed_value, additional_kwargs, i): +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L28_for_end; + __pyx_L25_break:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L28_for_end; + __pyx_L28_for_end:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":877 + * self.watermark_estimator_state = watermark_estimator_state + * try: + * if self.has_windowed_inputs and len(windowed_value.windows) > 1: # <<<<<<<<<<<<<< + * for i, w in enumerate(windowed_value.windows): + * if not self._should_process_window_for_sdf( +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":890 + * residuals.append(residual) + * else: + * if self._should_process_window_for_sdf(windowed_value, # <<<<<<<<<<<<<< + * additional_kwargs): + * residual = self._invoke_process_per_window( +*/ + /*else*/ { + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":891 + * else: + * if self._should_process_window_for_sdf(windowed_value, + * additional_kwargs): # <<<<<<<<<<<<<< + * residual = self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_kwargs}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_should_process_window_for_sdf, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/common.py":890 + * residuals.append(residual) + * else: + * if self._should_process_window_for_sdf(windowed_value, # <<<<<<<<<<<<<< + * additional_kwargs): + * residual = self._invoke_process_per_window( +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 890, __pyx_L19_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":892 + * if self._should_process_window_for_sdf(windowed_value, + * additional_kwargs): + * residual = self._invoke_process_per_window( # <<<<<<<<<<<<<< + * windowed_value, additional_args, additional_kwargs) + * if residual: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":893 + * additional_kwargs): + * residual = self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) # <<<<<<<<<<<<<< + * if residual: + * residuals.append(residual) +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_per_window, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_residual = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":894 + * residual = self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) + * if residual: # <<<<<<<<<<<<<< + * residuals.append(residual) + * finally: +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_residual); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 894, __pyx_L19_error) + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":895 + * windowed_value, additional_args, additional_kwargs) + * if residual: + * residuals.append(residual) # <<<<<<<<<<<<<< + * finally: + * with self.splitting_lock: +*/ + __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_residuals, __pyx_v_residual); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L19_error) + + /* "apache_beam/runners/common.py":894 + * residual = self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) + * if residual: # <<<<<<<<<<<<<< + * residuals.append(residual) + * finally: +*/ + } + + /* "apache_beam/runners/common.py":890 + * residuals.append(residual) + * else: + * if self._should_process_window_for_sdf(windowed_value, # <<<<<<<<<<<<<< + * additional_kwargs): + * residual = self._invoke_process_per_window( +*/ + } + } + __pyx_L21:; + } + + /* "apache_beam/runners/common.py":897 + * residuals.append(residual) + * finally: + * with self.splitting_lock: # <<<<<<<<<<<<<< + * self.current_windowed_value = None + * self.restriction = None +*/ + /*finally:*/ { + /*normal exit:*/{ + /*with:*/ { + __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + (void)__pyx_t_11; (void)__pyx_t_10; (void)__pyx_t_9; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/common.py":898 + * finally: + * with self.splitting_lock: + * self.current_windowed_value = None # <<<<<<<<<<<<<< + * self.restriction = None + * self.watermark_estimator_state = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->current_windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v_self->current_windowed_value); + __pyx_v_self->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); + + /* "apache_beam/runners/common.py":899 + * with self.splitting_lock: + * self.current_windowed_value = None + * self.restriction = None # <<<<<<<<<<<<<< + * self.watermark_estimator_state = None + * self.current_window_index = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->restriction); + __Pyx_DECREF(__pyx_v_self->restriction); + __pyx_v_self->restriction = Py_None; + + /* "apache_beam/runners/common.py":900 + * self.current_windowed_value = None + * self.restriction = None + * self.watermark_estimator_state = None # <<<<<<<<<<<<<< + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_state); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_state); + __pyx_v_self->watermark_estimator_state = Py_None; + + /* "apache_beam/runners/common.py":901 + * self.restriction = None + * self.watermark_estimator_state = None + * self.current_window_index = None # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_window_index); + __Pyx_DECREF(__pyx_v_self->current_window_index); + __pyx_v_self->current_window_index = Py_None; + + /* "apache_beam/runners/common.py":902 + * self.watermark_estimator_state = None + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_restriction_tracker); + __Pyx_DECREF(__pyx_v_self->threadsafe_restriction_tracker); + __pyx_v_self->threadsafe_restriction_tracker = Py_None; + + /* "apache_beam/runners/common.py":903 + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None # <<<<<<<<<<<<<< + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: + * for w in windowed_value.windows: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_watermark_estimator); + __Pyx_DECREF(__pyx_v_self->threadsafe_watermark_estimator); + __pyx_v_self->threadsafe_watermark_estimator = Py_None; + + /* "apache_beam/runners/common.py":897 + * residuals.append(residual) + * finally: + * with self.splitting_lock: # <<<<<<<<<<<<<< + * self.current_windowed_value = None + * self.restriction = None +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_8) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L34; + } + __pyx_L34:; + } + goto __pyx_L41; + __pyx_L31_error:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L1_error; + __pyx_L41:; + } + goto __pyx_L20; + } + __pyx_L19_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_22, &__pyx_t_23); + if ( unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __pyx_t_19 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; + { + /*with:*/ { + __pyx_t_24 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 897, __pyx_L43_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_4 = NULL; + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L44_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L44_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + (void)__pyx_t_25; (void)__pyx_t_26; (void)__pyx_t_27; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/common.py":898 + * finally: + * with self.splitting_lock: + * self.current_windowed_value = None # <<<<<<<<<<<<<< + * self.restriction = None + * self.watermark_estimator_state = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->current_windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v_self->current_windowed_value); + __pyx_v_self->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); + + /* "apache_beam/runners/common.py":899 + * with self.splitting_lock: + * self.current_windowed_value = None + * self.restriction = None # <<<<<<<<<<<<<< + * self.watermark_estimator_state = None + * self.current_window_index = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->restriction); + __Pyx_DECREF(__pyx_v_self->restriction); + __pyx_v_self->restriction = Py_None; + + /* "apache_beam/runners/common.py":900 + * self.current_windowed_value = None + * self.restriction = None + * self.watermark_estimator_state = None # <<<<<<<<<<<<<< + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->watermark_estimator_state); + __Pyx_DECREF(__pyx_v_self->watermark_estimator_state); + __pyx_v_self->watermark_estimator_state = Py_None; + + /* "apache_beam/runners/common.py":901 + * self.restriction = None + * self.watermark_estimator_state = None + * self.current_window_index = None # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_window_index); + __Pyx_DECREF(__pyx_v_self->current_window_index); + __pyx_v_self->current_window_index = Py_None; + + /* "apache_beam/runners/common.py":902 + * self.watermark_estimator_state = None + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_restriction_tracker); + __Pyx_DECREF(__pyx_v_self->threadsafe_restriction_tracker); + __pyx_v_self->threadsafe_restriction_tracker = Py_None; + + /* "apache_beam/runners/common.py":903 + * self.current_window_index = None + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None # <<<<<<<<<<<<<< + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: + * for w in windowed_value.windows: +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->threadsafe_watermark_estimator); + __Pyx_DECREF(__pyx_v_self->threadsafe_watermark_estimator); + __pyx_v_self->threadsafe_watermark_estimator = Py_None; + + /* "apache_beam/runners/common.py":897 + * residuals.append(residual) + * finally: + * with self.splitting_lock: # <<<<<<<<<<<<<< + * self.current_windowed_value = None + * self.restriction = None +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_24) { + __pyx_t_27 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 897, __pyx_L43_error) + __Pyx_GOTREF(__pyx_t_27); + __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; + } + goto __pyx_L47; + } + __pyx_L47:; + } + goto __pyx_L54; + __pyx_L44_error:; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + goto __pyx_L43_error; + __pyx_L54:; + } + } + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_22, __pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; + goto __pyx_L1_error; + __pyx_L43_error:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_22, __pyx_t_23); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; + goto __pyx_L1_error; + } + __pyx_L20:; + } + + /* "apache_beam/runners/common.py":863 + * + * residuals = [] + * if self.is_splittable: # <<<<<<<<<<<<<< + * if restriction is None: + * # This may be a SDF invoked as an ordinary DoFn on runners that don't +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/common.py":904 + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: # <<<<<<<<<<<<<< + * for w in windowed_value.windows: + * self._invoke_process_per_window( +*/ + if (__pyx_v_self->has_windowed_inputs) { + } else { + __pyx_t_7 = __pyx_v_self->has_windowed_inputs; + goto __pyx_L55_bool_binop_done; + } + __pyx_t_1 = __pyx_v_windowed_value->windows; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (__pyx_t_12 != 1); + __pyx_t_7 = __pyx_t_6; + __pyx_L55_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/runners/common.py":905 + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: + * for w in windowed_value.windows: # <<<<<<<<<<<<<< + * self._invoke_process_per_window( + * WindowedValue( +*/ + if (likely(PyList_CheckExact(__pyx_v_windowed_value->windows)) || PyTuple_CheckExact(__pyx_v_windowed_value->windows)) { + __pyx_t_1 = __pyx_v_windowed_value->windows; __Pyx_INCREF(__pyx_t_1); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_windowed_value->windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 905, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 905, __pyx_L1_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 905, __pyx_L1_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); + #endif + ++__pyx_t_12; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_13(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 905, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":906 + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: + * for w in windowed_value.windows: + * self._invoke_process_per_window( # <<<<<<<<<<<<<< + * WindowedValue( + * windowed_value.value, windowed_value.timestamp, (w, )), +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":907 + * for w in windowed_value.windows: + * self._invoke_process_per_window( + * WindowedValue( # <<<<<<<<<<<<<< + * windowed_value.value, windowed_value.timestamp, (w, )), + * additional_args, +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/runners/common.py":908 + * self._invoke_process_per_window( + * WindowedValue( + * windowed_value.value, windowed_value.timestamp, (w, )), # <<<<<<<<<<<<<< + * additional_args, + * additional_kwargs) +*/ + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_v_w); + __Pyx_GIVEREF(__pyx_v_w); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_w) != (0)) __PYX_ERR(0, 908, __pyx_L1_error); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_windowed_value->value, __pyx_t_17, __pyx_t_16}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 907, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_14); + } + + /* "apache_beam/runners/common.py":910 + * windowed_value.value, windowed_value.timestamp, (w, )), + * additional_args, + * additional_kwargs) # <<<<<<<<<<<<<< + * else: + * self._invoke_process_per_window( +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, ((PyObject *)__pyx_t_14), __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_per_window, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":905 + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: + * for w in windowed_value.windows: # <<<<<<<<<<<<<< + * self._invoke_process_per_window( + * WindowedValue( +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":904 + * self.threadsafe_restriction_tracker = None + * self.threadsafe_watermark_estimator = None + * elif self.has_windowed_inputs and len(windowed_value.windows) != 1: # <<<<<<<<<<<<<< + * for w in windowed_value.windows: + * self._invoke_process_per_window( +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/common.py":912 + * additional_kwargs) + * else: + * self._invoke_process_per_window( # <<<<<<<<<<<<<< + * windowed_value, additional_args, additional_kwargs) + * return residuals +*/ + /*else*/ { + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":913 + * else: + * self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) # <<<<<<<<<<<<<< + * return residuals + * +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_value), __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_per_window, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/common.py":914 + * self._invoke_process_per_window( + * windowed_value, additional_args, additional_kwargs) + * return residuals # <<<<<<<<<<<<<< + * + * def invoke_process_batch( +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_residuals); + __pyx_r = __pyx_v_residuals; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_residuals); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_residual); + __Pyx_XDECREF(__pyx_v_restriction); + __Pyx_XDECREF(__pyx_v_additional_args); + __Pyx_XDECREF(__pyx_v_additional_kwargs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process = {"invoke_process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_restriction = 0; + PyObject *__pyx_v_watermark_estimator_state = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_watermark_estimator_state,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 844, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process", 0) < (0)) __PYX_ERR(0, 844, __pyx_L3_error) + + /* "apache_beam/runners/common.py":847 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":848 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":849 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":850 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, i); __PYX_ERR(0, 844, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 844, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":847 + * self, + * windowed_value, # type: WindowedValue + * restriction=None, # <<<<<<<<<<<<<< + * watermark_estimator_state=None, + * additional_args=None, +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":848 + * windowed_value, # type: WindowedValue + * restriction=None, + * watermark_estimator_state=None, # <<<<<<<<<<<<<< + * additional_args=None, + * additional_kwargs=None): +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":849 + * restriction=None, + * watermark_estimator_state=None, + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> Iterable[SplitResultResidual] +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":850 + * watermark_estimator_state=None, + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> Iterable[SplitResultResidual] + * if not additional_args: +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + __pyx_v_restriction = values[1]; + __pyx_v_watermark_estimator_state = values[2]; + __pyx_v_additional_args = values[3]; + __pyx_v_additional_kwargs = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 844, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_2invoke_process(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_2invoke_process(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 4; + __pyx_t_2.restriction = __pyx_v_restriction; + __pyx_t_2.watermark_estimator_state = __pyx_v_watermark_estimator_state; + __pyx_t_2.additional_args = __pyx_v_additional_args; + __pyx_t_2.additional_kwargs = __pyx_v_additional_kwargs; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker->__pyx_base.invoke_process(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_v_windowed_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.invoke_process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":916 + * return residuals + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch = {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_batch = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("invoke_process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 916, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 916, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 916, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 916, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "invoke_process_batch", 0) < (0)) __PYX_ERR(0, 916, __pyx_L3_error) + + /* "apache_beam/runners/common.py":919 + * self, + * windowed_batch, # type: WindowedBatch + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":920 + * windowed_batch, # type: WindowedBatch + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, i); __PYX_ERR(0, 916, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 916, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 916, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 916, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":919 + * self, + * windowed_batch, # type: WindowedBatch + * additional_args=None, # <<<<<<<<<<<<<< + * additional_kwargs=None): + * # type: (...) -> None +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":920 + * windowed_batch, # type: WindowedBatch + * additional_args=None, + * additional_kwargs=None): # <<<<<<<<<<<<<< + * # type: (...) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_batch = values[0]; + __pyx_v_additional_args = values[1]; + __pyx_v_additional_kwargs = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("invoke_process_batch", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 916, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_4invoke_process_batch(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":916 + * return residuals + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_4invoke_process_batch(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_batch, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_v_w = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + size_t __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("invoke_process_batch", 0); + __Pyx_INCREF(__pyx_v_additional_args); + __Pyx_INCREF(__pyx_v_additional_kwargs); + + /* "apache_beam/runners/common.py":923 + * # type: (...) -> None + * + * if not additional_args: # <<<<<<<<<<<<<< + * additional_args = [] + * if not additional_kwargs: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_additional_args); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 923, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":924 + * + * if not additional_args: + * additional_args = [] # <<<<<<<<<<<<<< + * if not additional_kwargs: + * additional_kwargs = {} +*/ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_additional_args, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":923 + * # type: (...) -> None + * + * if not additional_args: # <<<<<<<<<<<<<< + * additional_args = [] + * if not additional_kwargs: +*/ + } + + /* "apache_beam/runners/common.py":925 + * if not additional_args: + * additional_args = [] + * if not additional_kwargs: # <<<<<<<<<<<<<< + * additional_kwargs = {} + * +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_1 = (!__pyx_t_2); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":926 + * additional_args = [] + * if not additional_kwargs: + * additional_kwargs = {} # <<<<<<<<<<<<<< + * + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_additional_kwargs, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":925 + * if not additional_args: + * additional_args = [] + * if not additional_kwargs: # <<<<<<<<<<<<<< + * additional_kwargs = {} + * +*/ + } + + /* "apache_beam/runners/common.py":928 + * additional_kwargs = {} + * + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_IsInstance(__pyx_v_windowed_batch, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 928, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 928, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":930 + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: # <<<<<<<<<<<<<< + * for w in windowed_batch.windows: + * self._invoke_process_batch_per_window( +*/ + if (__pyx_v_self->has_windowed_inputs) { + } else { + __pyx_t_1 = __pyx_v_self->has_windowed_inputs; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (__pyx_t_4 != 1); + __pyx_t_1 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":931 + * + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: + * for w in windowed_batch.windows: # <<<<<<<<<<<<<< + * self._invoke_process_batch_per_window( + * HomogeneousWindowedBatch.of( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 931, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error) + } else { + __pyx_t_3 = __pyx_t_6(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 931, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":932 + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: + * for w in windowed_batch.windows: + * self._invoke_process_batch_per_window( # <<<<<<<<<<<<<< + * HomogeneousWindowedBatch.of( + * windowed_batch.values, +*/ + __pyx_t_7 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_7); + + /* "apache_beam/runners/common.py":933 + * for w in windowed_batch.windows: + * self._invoke_process_batch_per_window( + * HomogeneousWindowedBatch.of( # <<<<<<<<<<<<<< + * windowed_batch.values, + * windowed_batch.timestamp, (w, ), +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_of); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":934 + * self._invoke_process_batch_per_window( + * HomogeneousWindowedBatch.of( + * windowed_batch.values, # <<<<<<<<<<<<<< + * windowed_batch.timestamp, (w, ), + * windowed_batch.pane_info), +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/runners/common.py":935 + * HomogeneousWindowedBatch.of( + * windowed_batch.values, + * windowed_batch.timestamp, (w, ), # <<<<<<<<<<<<<< + * windowed_batch.pane_info), + * additional_args, +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_INCREF(__pyx_v_w); + __Pyx_GIVEREF(__pyx_v_w); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_w) != (0)) __PYX_ERR(0, 935, __pyx_L1_error); + + /* "apache_beam/runners/common.py":936 + * windowed_batch.values, + * windowed_batch.timestamp, (w, ), + * windowed_batch.pane_info), # <<<<<<<<<<<<<< + * additional_args, + * additional_kwargs) +*/ + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_15 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_t_10, __pyx_t_12, __pyx_t_13, __pyx_t_14}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (5-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + + /* "apache_beam/runners/common.py":938 + * windowed_batch.pane_info), + * additional_args, + * additional_kwargs) # <<<<<<<<<<<<<< + * else: + * self._invoke_process_batch_per_window( +*/ + __pyx_t_15 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_batch_per_window, __pyx_callargs+__pyx_t_15, (4-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":931 + * + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: + * for w in windowed_batch.windows: # <<<<<<<<<<<<<< + * self._invoke_process_batch_per_window( + * HomogeneousWindowedBatch.of( +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":930 + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * + * if self.has_windowed_inputs and len(windowed_batch.windows) != 1: # <<<<<<<<<<<<<< + * for w in windowed_batch.windows: + * self._invoke_process_batch_per_window( +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/common.py":940 + * additional_kwargs) + * else: + * self._invoke_process_batch_per_window( # <<<<<<<<<<<<<< + * windowed_batch, additional_args, additional_kwargs) + * +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":941 + * else: + * self._invoke_process_batch_per_window( + * windowed_batch, additional_args, additional_kwargs) # <<<<<<<<<<<<<< + * + * def _should_process_window_for_sdf( +*/ + __pyx_t_15 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_batch_per_window, __pyx_callargs+__pyx_t_15, (4-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/common.py":916 + * return residuals + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.invoke_process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_w); + __Pyx_XDECREF(__pyx_v_additional_args); + __Pyx_XDECREF(__pyx_v_additional_kwargs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":943 + * windowed_batch, additional_args, additional_kwargs) + * + * def _should_process_window_for_sdf( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf = {"_should_process_window_for_sdf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_additional_kwargs = 0; + PyObject *__pyx_v_window_index = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_should_process_window_for_sdf (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,&__pyx_mstate_global->__pyx_n_u_window_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 943, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_should_process_window_for_sdf", 0) < (0)) __PYX_ERR(0, 943, __pyx_L3_error) + + /* "apache_beam/runners/common.py":947 + * windowed_value, # type: WindowedValue + * additional_kwargs, + * window_index=None, # type: Optional[int] # <<<<<<<<<<<<<< + * ): + * restriction_tracker = self.invoke_create_tracker(self.restriction) +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_should_process_window_for_sdf", 0, 2, 3, i); __PYX_ERR(0, 943, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 943, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 943, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_value = values[0]; + __pyx_v_additional_kwargs = values[1]; + __pyx_v_window_index = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_should_process_window_for_sdf", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 943, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._should_process_window_for_sdf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_6_should_process_window_for_sdf(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_additional_kwargs, __pyx_v_window_index); + + /* "apache_beam/runners/common.py":943 + * windowed_batch, additional_args, additional_kwargs) + * + * def _should_process_window_for_sdf( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_6_should_process_window_for_sdf(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_additional_kwargs, PyObject *__pyx_v_window_index) { + PyObject *__pyx_v_restriction_tracker = NULL; + PyObject *__pyx_v_watermark_estimator = NULL; + PyObject *__pyx_v_restriction_tracker_param = NULL; + PyObject *__pyx_v_watermark_param = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_should_process_window_for_sdf", 0); + + /* "apache_beam/runners/common.py":949 + * window_index=None, # type: Optional[int] + * ): + * restriction_tracker = self.invoke_create_tracker(self.restriction) # <<<<<<<<<<<<<< + * watermark_estimator = self.invoke_create_watermark_estimator( + * self.watermark_estimator_state) +*/ + __pyx_t_1 = __pyx_v_self->restriction; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.invoke_create_tracker(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_restriction_tracker = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":950 + * ): + * restriction_tracker = self.invoke_create_tracker(self.restriction) + * watermark_estimator = self.invoke_create_watermark_estimator( # <<<<<<<<<<<<<< + * self.watermark_estimator_state) + * with self.splitting_lock: +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":951 + * restriction_tracker = self.invoke_create_tracker(self.restriction) + * watermark_estimator = self.invoke_create_watermark_estimator( + * self.watermark_estimator_state) # <<<<<<<<<<<<<< + * with self.splitting_lock: + * if window_index: +*/ + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_self->watermark_estimator_state}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_create_watermark_estimato, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_watermark_estimator = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":952 + * watermark_estimator = self.invoke_create_watermark_estimator( + * self.watermark_estimator_state) + * with self.splitting_lock: # <<<<<<<<<<<<<< + * if window_index: + * self.current_window_index = window_index +*/ + /*with:*/ { + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/common.py":953 + * self.watermark_estimator_state) + * with self.splitting_lock: + * if window_index: # <<<<<<<<<<<<<< + * self.current_window_index = window_index + * if window_index == 0: +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_window_index); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 953, __pyx_L7_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":954 + * with self.splitting_lock: + * if window_index: + * self.current_window_index = window_index # <<<<<<<<<<<<<< + * if window_index == 0: + * self.stop_window_index = len(windowed_value.windows) +*/ + __Pyx_INCREF(__pyx_v_window_index); + __Pyx_GIVEREF(__pyx_v_window_index); + __Pyx_GOTREF(__pyx_v_self->current_window_index); + __Pyx_DECREF(__pyx_v_self->current_window_index); + __pyx_v_self->current_window_index = __pyx_v_window_index; + + /* "apache_beam/runners/common.py":955 + * if window_index: + * self.current_window_index = window_index + * if window_index == 0: # <<<<<<<<<<<<<< + * self.stop_window_index = len(windowed_value.windows) + * if window_index == self.stop_window_index: +*/ + __pyx_t_9 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_window_index, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 955, __pyx_L7_error) + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":956 + * self.current_window_index = window_index + * if window_index == 0: + * self.stop_window_index = len(windowed_value.windows) # <<<<<<<<<<<<<< + * if window_index == self.stop_window_index: + * return False +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 956, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->stop_window_index); + __Pyx_DECREF(__pyx_v_self->stop_window_index); + __pyx_v_self->stop_window_index = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":955 + * if window_index: + * self.current_window_index = window_index + * if window_index == 0: # <<<<<<<<<<<<<< + * self.stop_window_index = len(windowed_value.windows) + * if window_index == self.stop_window_index: +*/ + } + + /* "apache_beam/runners/common.py":957 + * if window_index == 0: + * self.stop_window_index = len(windowed_value.windows) + * if window_index == self.stop_window_index: # <<<<<<<<<<<<<< + * return False + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_window_index, __pyx_v_self->stop_window_index, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 957, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":958 + * self.stop_window_index = len(windowed_value.windows) + * if window_index == self.stop_window_index: + * return False # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( + * restriction_tracker) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L11_try_return; + + /* "apache_beam/runners/common.py":957 + * if window_index == 0: + * self.stop_window_index = len(windowed_value.windows) + * if window_index == self.stop_window_index: # <<<<<<<<<<<<<< + * return False + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( +*/ + } + + /* "apache_beam/runners/common.py":953 + * self.watermark_estimator_state) + * with self.splitting_lock: + * if window_index: # <<<<<<<<<<<<<< + * self.current_window_index = window_index + * if window_index == 0: +*/ + } + + /* "apache_beam/runners/common.py":959 + * if window_index == self.stop_window_index: + * return False + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( # <<<<<<<<<<<<<< + * restriction_tracker) + * self.threadsafe_watermark_estimator = ( +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ThreadsafeRestrictionTracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":960 + * return False + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( + * restriction_tracker) # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator = ( + * ThreadsafeWatermarkEstimator(watermark_estimator)) +*/ + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_restriction_tracker}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/common.py":959 + * if window_index == self.stop_window_index: + * return False + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( # <<<<<<<<<<<<<< + * restriction_tracker) + * self.threadsafe_watermark_estimator = ( +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->threadsafe_restriction_tracker); + __Pyx_DECREF(__pyx_v_self->threadsafe_restriction_tracker); + __pyx_v_self->threadsafe_restriction_tracker = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":962 + * restriction_tracker) + * self.threadsafe_watermark_estimator = ( + * ThreadsafeWatermarkEstimator(watermark_estimator)) # <<<<<<<<<<<<<< + * + * restriction_tracker_param = ( +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ThreadsafeWatermarkEstimator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/common.py":961 + * self.threadsafe_restriction_tracker = ThreadsafeRestrictionTracker( + * restriction_tracker) + * self.threadsafe_watermark_estimator = ( # <<<<<<<<<<<<<< + * ThreadsafeWatermarkEstimator(watermark_estimator)) + * +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->threadsafe_watermark_estimator); + __Pyx_DECREF(__pyx_v_self->threadsafe_watermark_estimator); + __pyx_v_self->threadsafe_watermark_estimator = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":952 + * watermark_estimator = self.invoke_create_watermark_estimator( + * self.watermark_estimator_state) + * with self.splitting_lock: # <<<<<<<<<<<<<< + * if window_index: + * self.current_window_index = window_index +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._should_process_window_for_sdf", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 952, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 952, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 952, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 952, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_9); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_5, __pyx_t_1); + __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_1 = 0; + __PYX_ERR(0, 952, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_4) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_8 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_4) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L19; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L1_error; + __pyx_L19:; + } + + /* "apache_beam/runners/common.py":965 + * + * restriction_tracker_param = ( + * self.signature.process_method.restriction_provider_arg_name) # <<<<<<<<<<<<<< + * if not restriction_tracker_param: + * raise ValueError( +*/ + __pyx_t_1 = __pyx_v_self->__pyx_base.signature->process_method->restriction_provider_arg_name; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_restriction_tracker_param = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":966 + * restriction_tracker_param = ( + * self.signature.process_method.restriction_provider_arg_name) + * if not restriction_tracker_param: # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn is splittable but DoFn does not have a ' +*/ + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_restriction_tracker_param); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_9 = (!__pyx_t_13); + if (unlikely(__pyx_t_9)) { + + /* "apache_beam/runners/common.py":967 + * self.signature.process_method.restriction_provider_arg_name) + * if not restriction_tracker_param: + * raise ValueError( # <<<<<<<<<<<<<< + * 'DoFn is splittable but DoFn does not have a ' + * 'RestrictionTrackerParam defined') +*/ + __pyx_t_5 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_DoFn_is_splittable_but_DoFn_does}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 967, __pyx_L1_error) + + /* "apache_beam/runners/common.py":966 + * restriction_tracker_param = ( + * self.signature.process_method.restriction_provider_arg_name) + * if not restriction_tracker_param: # <<<<<<<<<<<<<< + * raise ValueError( + * 'DoFn is splittable but DoFn does not have a ' +*/ + } + + /* "apache_beam/runners/common.py":971 + * 'RestrictionTrackerParam defined') + * additional_kwargs[restriction_tracker_param] = ( + * RestrictionTrackerView(self.threadsafe_restriction_tracker)) # <<<<<<<<<<<<<< + * watermark_param = ( + * self.signature.process_method.watermark_estimator_provider_arg_name) +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RestrictionTrackerView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->threadsafe_restriction_tracker}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/common.py":970 + * 'DoFn is splittable but DoFn does not have a ' + * 'RestrictionTrackerParam defined') + * additional_kwargs[restriction_tracker_param] = ( # <<<<<<<<<<<<<< + * RestrictionTrackerView(self.threadsafe_restriction_tracker)) + * watermark_param = ( +*/ + if (unlikely((PyObject_SetItem(__pyx_v_additional_kwargs, __pyx_v_restriction_tracker_param, __pyx_t_1) < 0))) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":973 + * RestrictionTrackerView(self.threadsafe_restriction_tracker)) + * watermark_param = ( + * self.signature.process_method.watermark_estimator_provider_arg_name) # <<<<<<<<<<<<<< + * # When the watermark_estimator is a NoOpWatermarkEstimator, the system + * # will not add watermark_param into the DoFn param list. +*/ + __pyx_t_1 = __pyx_v_self->__pyx_base.signature->process_method->watermark_estimator_provider_arg_name; + __Pyx_INCREF(__pyx_t_1); + __pyx_v_watermark_param = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":976 + * # When the watermark_estimator is a NoOpWatermarkEstimator, the system + * # will not add watermark_param into the DoFn param list. + * if watermark_param is not None: # <<<<<<<<<<<<<< + * additional_kwargs[watermark_param] = self.threadsafe_watermark_estimator + * return True +*/ + __pyx_t_9 = (__pyx_v_watermark_param != Py_None); + if (__pyx_t_9) { + + /* "apache_beam/runners/common.py":977 + * # will not add watermark_param into the DoFn param list. + * if watermark_param is not None: + * additional_kwargs[watermark_param] = self.threadsafe_watermark_estimator # <<<<<<<<<<<<<< + * return True + * +*/ + __pyx_t_1 = __pyx_v_self->threadsafe_watermark_estimator; + __Pyx_INCREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_additional_kwargs, __pyx_v_watermark_param, __pyx_t_1) < 0))) __PYX_ERR(0, 977, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":976 + * # When the watermark_estimator is a NoOpWatermarkEstimator, the system + * # will not add watermark_param into the DoFn param list. + * if watermark_param is not None: # <<<<<<<<<<<<<< + * additional_kwargs[watermark_param] = self.threadsafe_watermark_estimator + * return True +*/ + } + + /* "apache_beam/runners/common.py":978 + * if watermark_param is not None: + * additional_kwargs[watermark_param] = self.threadsafe_watermark_estimator + * return True # <<<<<<<<<<<<<< + * + * def _invoke_process_per_window( +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":943 + * windowed_batch, additional_args, additional_kwargs) + * + * def _should_process_window_for_sdf( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._should_process_window_for_sdf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_restriction_tracker); + __Pyx_XDECREF(__pyx_v_watermark_estimator); + __Pyx_XDECREF(__pyx_v_restriction_tracker_param); + __Pyx_XDECREF(__pyx_v_watermark_param); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":980 + * return True + * + * def _invoke_process_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window = {"_invoke_process_per_window", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_invoke_process_per_window (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 980, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 980, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 980, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 980, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_invoke_process_per_window", 0) < (0)) __PYX_ERR(0, 980, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_invoke_process_per_window", 1, 3, 3, i); __PYX_ERR(0, 980, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 980, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 980, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 980, __pyx_L3_error) + } + __pyx_v_windowed_value = values[0]; + __pyx_v_additional_args = values[1]; + __pyx_v_additional_kwargs = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_invoke_process_per_window", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 980, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8_invoke_process_per_window(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_8_invoke_process_per_window(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_v_args_for_process = NULL; + PyObject *__pyx_v_kwargs_for_process = NULL; + PyObject *__pyx_v_window = NULL; + PyObject *__pyx_v_side_inputs = NULL; + PyObject *__pyx_v_key = NULL; + CYTHON_UNUSED PyObject *__pyx_v_unused_value = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_v_deferred_status = NULL; + PyObject *__pyx_v_deferred_restriction = NULL; + PyObject *__pyx_v_deferred_timestamp = NULL; + PyObject *__pyx_v_element = NULL; + PyObject *__pyx_v_size = NULL; + PyObject *__pyx_v_current_watermark = NULL; + PyObject *__pyx_v_estimator_state = NULL; + PyObject *__pyx_v_residual_value = NULL; + PyObject *__pyx_8genexpr9__pyx_v_si = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + size_t __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18[3]; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_invoke_process_per_window", 0); + + /* "apache_beam/runners/common.py":987 + * ): + * # type: (...) -> Optional[SplitResultResidual] + * if self.has_cached_window_args: # <<<<<<<<<<<<<< + * args_for_process, kwargs_for_process = ( + * self.args_for_process, self.kwargs_for_process) +*/ + if (__pyx_v_self->has_cached_window_args) { + + /* "apache_beam/runners/common.py":989 + * if self.has_cached_window_args: + * args_for_process, kwargs_for_process = ( + * self.args_for_process, self.kwargs_for_process) # <<<<<<<<<<<<<< + * else: + * if self.has_windowed_inputs: +*/ + __pyx_t_1 = __pyx_v_self->args_for_process; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_self->kwargs_for_process; + __Pyx_INCREF(__pyx_t_2); + __pyx_v_args_for_process = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_kwargs_for_process = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":987 + * ): + * # type: (...) -> Optional[SplitResultResidual] + * if self.has_cached_window_args: # <<<<<<<<<<<<<< + * args_for_process, kwargs_for_process = ( + * self.args_for_process, self.kwargs_for_process) +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":991 + * self.args_for_process, self.kwargs_for_process) + * else: + * if self.has_windowed_inputs: # <<<<<<<<<<<<<< + * assert len(windowed_value.windows) <= 1 + * window, = windowed_value.windows +*/ + /*else*/ { + if (__pyx_v_self->has_windowed_inputs) { + + /* "apache_beam/runners/common.py":992 + * else: + * if self.has_windowed_inputs: + * assert len(windowed_value.windows) <= 1 # <<<<<<<<<<<<<< + * window, = windowed_value.windows + * else: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 <= 1); + if (unlikely(!__pyx_t_4)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 992, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 992, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":993 + * if self.has_windowed_inputs: + * assert len(windowed_value.windows) <= 1 + * window, = windowed_value.windows # <<<<<<<<<<<<<< + * else: + * window = GlobalWindow() +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 1)) { + if (size > 1) __Pyx_RaiseTooManyValuesError(1); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 993, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 1) < (0)) __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __pyx_v_window = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":991 + * self.args_for_process, self.kwargs_for_process) + * else: + * if self.has_windowed_inputs: # <<<<<<<<<<<<<< + * assert len(windowed_value.windows) <= 1 + * window, = windowed_value.windows +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/common.py":995 + * window, = windowed_value.windows + * else: + * window = GlobalWindow() # <<<<<<<<<<<<<< + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) +*/ + /*else*/ { + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GlobalWindow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_window = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "apache_beam/runners/common.py":996 + * else: + * window = GlobalWindow() + * side_inputs = [si[window] for si in self.side_inputs] # <<<<<<<<<<<<<< + * side_inputs.extend(additional_args) + * args_for_process, kwargs_for_process = util.insert_values_in_args( +*/ + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_self->side_inputs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 996, __pyx_L9_error) + } + __pyx_t_5 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_5); + __pyx_t_3 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 996, __pyx_L9_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_si, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_8genexpr9__pyx_v_si, __pyx_v_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 996, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si); __pyx_8genexpr9__pyx_v_si = 0; + goto __pyx_L13_exit_scope; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si); __pyx_8genexpr9__pyx_v_si = 0; + goto __pyx_L1_error; + __pyx_L13_exit_scope:; + } /* exit inner scope */ + __pyx_v_side_inputs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":997 + * window = GlobalWindow() + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) # <<<<<<<<<<<<<< + * args_for_process, kwargs_for_process = util.insert_values_in_args( + * self.args_for_process, self.kwargs_for_process, side_inputs) +*/ + __pyx_t_8 = __Pyx_PyList_Extend(__pyx_v_side_inputs, __pyx_v_additional_args); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 997, __pyx_L1_error) + + /* "apache_beam/runners/common.py":998 + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) + * args_for_process, kwargs_for_process = util.insert_values_in_args( # <<<<<<<<<<<<<< + * self.args_for_process, self.kwargs_for_process, side_inputs) + * if not self.recalculate_window_args: +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_util); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_insert_values_in_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":999 + * side_inputs.extend(additional_args) + * args_for_process, kwargs_for_process = util.insert_values_in_args( + * self.args_for_process, self.kwargs_for_process, side_inputs) # <<<<<<<<<<<<<< + * if not self.recalculate_window_args: + * self.args_for_process, self.kwargs_for_process = ( +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_self->args_for_process, __pyx_v_self->kwargs_for_process, __pyx_v_side_inputs}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 998, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_9 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L15_unpacking_done; + __pyx_L14_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_L15_unpacking_done:; + } + + /* "apache_beam/runners/common.py":998 + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) + * args_for_process, kwargs_for_process = util.insert_values_in_args( # <<<<<<<<<<<<<< + * self.args_for_process, self.kwargs_for_process, side_inputs) + * if not self.recalculate_window_args: +*/ + __pyx_v_args_for_process = __pyx_t_9; + __pyx_t_9 = 0; + __pyx_v_kwargs_for_process = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1000 + * args_for_process, kwargs_for_process = util.insert_values_in_args( + * self.args_for_process, self.kwargs_for_process, side_inputs) + * if not self.recalculate_window_args: # <<<<<<<<<<<<<< + * self.args_for_process, self.kwargs_for_process = ( + * args_for_process, kwargs_for_process) +*/ + __pyx_t_4 = (!__pyx_v_self->recalculate_window_args); + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1002 + * if not self.recalculate_window_args: + * self.args_for_process, self.kwargs_for_process = ( + * args_for_process, kwargs_for_process) # <<<<<<<<<<<<<< + * self.has_cached_window_args = True + * +*/ + __pyx_t_2 = __pyx_v_args_for_process; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_5 = __pyx_v_kwargs_for_process; + __Pyx_INCREF(__pyx_t_5); + if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_5))) __PYX_ERR(0, 1002, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1001 + * self.args_for_process, self.kwargs_for_process, side_inputs) + * if not self.recalculate_window_args: + * self.args_for_process, self.kwargs_for_process = ( # <<<<<<<<<<<<<< + * args_for_process, kwargs_for_process) + * self.has_cached_window_args = True +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->args_for_process); + __Pyx_DECREF(__pyx_v_self->args_for_process); + __pyx_v_self->args_for_process = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->kwargs_for_process); + __Pyx_DECREF(__pyx_v_self->kwargs_for_process); + __pyx_v_self->kwargs_for_process = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1003 + * self.args_for_process, self.kwargs_for_process = ( + * args_for_process, kwargs_for_process) + * self.has_cached_window_args = True # <<<<<<<<<<<<<< + * + * # Extract key in the case of a stateful DoFn. Note that in the case of a +*/ + __pyx_v_self->has_cached_window_args = 1; + + /* "apache_beam/runners/common.py":1000 + * args_for_process, kwargs_for_process = util.insert_values_in_args( + * self.args_for_process, self.kwargs_for_process, side_inputs) + * if not self.recalculate_window_args: # <<<<<<<<<<<<<< + * self.args_for_process, self.kwargs_for_process = ( + * args_for_process, kwargs_for_process) +*/ + } + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":1009 + * # True. Therefore, windows will be exploded coming into this method, and + * # we can rely on the window variable being set above. + * if self.user_state_context or self.is_key_param_required: # <<<<<<<<<<<<<< + * try: + * key, unused_value = windowed_value.value +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.user_state_context); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1009, __pyx_L1_error) + if (!__pyx_t_10) { + } else { + __pyx_t_4 = __pyx_t_10; + goto __pyx_L18_bool_binop_done; + } + __pyx_t_4 = __pyx_v_self->is_key_param_required; + __pyx_L18_bool_binop_done:; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1010 + * # we can rely on the window variable being set above. + * if self.user_state_context or self.is_key_param_required: + * try: # <<<<<<<<<<<<<< + * key, unused_value = windowed_value.value + * except (TypeError, ValueError): +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "apache_beam/runners/common.py":1011 + * if self.user_state_context or self.is_key_param_required: + * try: + * key, unused_value = windowed_value.value # <<<<<<<<<<<<<< + * except (TypeError, ValueError): + * raise ValueError(( +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_5); + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1011, __pyx_L20_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_9); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_XGOTREF(__pyx_t_9); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_9 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L26_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 1011, __pyx_L20_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L27_unpacking_done; + __pyx_L26_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1011, __pyx_L20_error) + __pyx_L27_unpacking_done:; + } + __pyx_v_key = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_unused_value = __pyx_t_9; + __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1010 + * # we can rely on the window variable being set above. + * if self.user_state_context or self.is_key_param_required: + * try: # <<<<<<<<<<<<<< + * key, unused_value = windowed_value.value + * except (TypeError, ValueError): +*/ + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L25_try_end; + __pyx_L20_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1012 + * try: + * key, unused_value = windowed_value.value + * except (TypeError, ValueError): # <<<<<<<<<<<<<< + * raise ValueError(( + * 'Input value to a stateful DoFn or KeyParam must be a KV tuple; ' +*/ + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches2(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), ((PyObject *)(((PyTypeObject*)PyExc_ValueError)))); + if (__pyx_t_14) { + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_2) < 0) __PYX_ERR(0, 1012, __pyx_L22_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1013 + * key, unused_value = windowed_value.value + * except (TypeError, ValueError): + * raise ValueError(( # <<<<<<<<<<<<<< + * 'Input value to a stateful DoFn or KeyParam must be a KV tuple; ' + * 'instead, got \'%s\'.') % (windowed_value.value, )) +*/ + __pyx_t_15 = NULL; + + /* "apache_beam/runners/common.py":1015 + * raise ValueError(( + * 'Input value to a stateful DoFn or KeyParam must be a KV tuple; ' + * 'instead, got \'%s\'.') % (windowed_value.value, )) # <<<<<<<<<<<<<< + * + * for i, p in self.placeholders_for_process: +*/ + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1015, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_17 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_16), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1015, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_18[0] = __pyx_mstate_global->__pyx_kp_u_Input_value_to_a_stateful_DoFn_o; + __pyx_t_18[1] = __pyx_t_17; + __pyx_t_18[2] = __pyx_mstate_global->__pyx_kp_u__2; + + /* "apache_beam/runners/common.py":1014 + * except (TypeError, ValueError): + * raise ValueError(( + * 'Input value to a stateful DoFn or KeyParam must be a KV tuple; ' # <<<<<<<<<<<<<< + * 'instead, got \'%s\'.') % (windowed_value.value, )) + * +*/ + __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_18, 3, 77 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17)); + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1014, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1013, __pyx_L22_except_error) + } + goto __pyx_L22_except_error; + + /* "apache_beam/runners/common.py":1010 + * # we can rely on the window variable being set above. + * if self.user_state_context or self.is_key_param_required: + * try: # <<<<<<<<<<<<<< + * key, unused_value = windowed_value.value + * except (TypeError, ValueError): +*/ + __pyx_L22_except_error:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L25_try_end:; + } + + /* "apache_beam/runners/common.py":1009 + * # True. Therefore, windows will be exploded coming into this method, and + * # we can rely on the window variable being set above. + * if self.user_state_context or self.is_key_param_required: # <<<<<<<<<<<<<< + * try: + * key, unused_value = windowed_value.value +*/ + } + + /* "apache_beam/runners/common.py":1017 + * 'instead, got \'%s\'.') % (windowed_value.value, )) + * + * for i, p in self.placeholders_for_process: # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == p: + * args_for_process[i] = windowed_value.value +*/ + if (unlikely(__pyx_v_self->placeholders_for_process == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1017, __pyx_L1_error) + } + __pyx_t_2 = __pyx_v_self->placeholders_for_process; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { + PyObject* sequence = __pyx_t_9; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1017, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_16 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_16); + index = 0; __pyx_t_5 = __pyx_t_6(__pyx_t_16); if (unlikely(!__pyx_t_5)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_16); if (unlikely(!__pyx_t_1)) goto __pyx_L32_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_16), 2) < (0)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + goto __pyx_L33_unpacking_done; + __pyx_L32_unpacking_failed:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_L33_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1018 + * + * for i, p in self.placeholders_for_process: + * if core.DoFn.ElementParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.value + * elif core.DoFn.KeyParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1018, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1019 + * for i, p in self.placeholders_for_process: + * if core.DoFn.ElementParam == p: + * args_for_process[i] = windowed_value.value # <<<<<<<<<<<<<< + * elif core.DoFn.KeyParam == p: + * args_for_process[i] = key +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 1019, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1018 + * + * for i, p in self.placeholders_for_process: + * if core.DoFn.ElementParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.value + * elif core.DoFn.KeyParam == p: +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1020 + * if core.DoFn.ElementParam == p: + * args_for_process[i] = windowed_value.value + * elif core.DoFn.KeyParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = key + * elif core.DoFn.WindowParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1021 + * args_for_process[i] = windowed_value.value + * elif core.DoFn.KeyParam == p: + * args_for_process[i] = key # <<<<<<<<<<<<<< + * elif core.DoFn.WindowParam == p: + * args_for_process[i] = window +*/ + if (unlikely(!__pyx_v_key)) { __Pyx_RaiseUnboundLocalError("key"); __PYX_ERR(0, 1021, __pyx_L1_error) } + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_v_key) < 0))) __PYX_ERR(0, 1021, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1020 + * if core.DoFn.ElementParam == p: + * args_for_process[i] = windowed_value.value + * elif core.DoFn.KeyParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = key + * elif core.DoFn.WindowParam == p: +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1022 + * elif core.DoFn.KeyParam == p: + * args_for_process[i] = key + * elif core.DoFn.WindowParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = window + * elif core.DoFn.WindowedValueParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1023 + * args_for_process[i] = key + * elif core.DoFn.WindowParam == p: + * args_for_process[i] = window # <<<<<<<<<<<<<< + * elif core.DoFn.WindowedValueParam == p: + * args_for_process[i] = windowed_value +*/ + if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 1023, __pyx_L1_error) } + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_v_window) < 0))) __PYX_ERR(0, 1023, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1022 + * elif core.DoFn.KeyParam == p: + * args_for_process[i] = key + * elif core.DoFn.WindowParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = window + * elif core.DoFn.WindowedValueParam == p: +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1024 + * elif core.DoFn.WindowParam == p: + * args_for_process[i] = window + * elif core.DoFn.WindowedValueParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value + * elif core.DoFn.TimestampParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_WindowedValueParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1025 + * args_for_process[i] = window + * elif core.DoFn.WindowedValueParam == p: + * args_for_process[i] = windowed_value # <<<<<<<<<<<<<< + * elif core.DoFn.TimestampParam == p: + * args_for_process[i] = windowed_value.timestamp +*/ + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_v_windowed_value) < 0))) __PYX_ERR(0, 1025, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1024 + * elif core.DoFn.WindowParam == p: + * args_for_process[i] = window + * elif core.DoFn.WindowedValueParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value + * elif core.DoFn.TimestampParam == p: +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1026 + * elif core.DoFn.WindowedValueParam == p: + * args_for_process[i] = windowed_value + * elif core.DoFn.TimestampParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.timestamp + * elif core.DoFn.PaneInfoParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_TimestampParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1027 + * args_for_process[i] = windowed_value + * elif core.DoFn.TimestampParam == p: + * args_for_process[i] = windowed_value.timestamp # <<<<<<<<<<<<<< + * elif core.DoFn.PaneInfoParam == p: + * args_for_process[i] = windowed_value.pane_info +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1026 + * elif core.DoFn.WindowedValueParam == p: + * args_for_process[i] = windowed_value + * elif core.DoFn.TimestampParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.timestamp + * elif core.DoFn.PaneInfoParam == p: +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1028 + * elif core.DoFn.TimestampParam == p: + * args_for_process[i] = windowed_value.timestamp + * elif core.DoFn.PaneInfoParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.pane_info + * elif isinstance(p, core.DoFn.StateParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PaneInfoParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1029 + * args_for_process[i] = windowed_value.timestamp + * elif core.DoFn.PaneInfoParam == p: + * args_for_process[i] = windowed_value.pane_info # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.StateParam): + * assert self.user_state_context is not None +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_9) < 0))) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1028 + * elif core.DoFn.TimestampParam == p: + * args_for_process[i] = windowed_value.timestamp + * elif core.DoFn.PaneInfoParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = windowed_value.pane_info + * elif isinstance(p, core.DoFn.StateParam): +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1030 + * elif core.DoFn.PaneInfoParam == p: + * args_for_process[i] = windowed_value.pane_info + * elif isinstance(p, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * assert self.user_state_context is not None + * args_for_process[i] = ( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_StateParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1031 + * args_for_process[i] = windowed_value.pane_info + * elif isinstance(p, core.DoFn.StateParam): + * assert self.user_state_context is not None # <<<<<<<<<<<<<< + * args_for_process[i] = ( + * self.user_state_context.get_state(p.state_spec, key, window)) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + if (unlikely(!__pyx_t_4)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1031, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1031, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1033 + * assert self.user_state_context is not None + * args_for_process[i] = ( + * self.user_state_context.get_state(p.state_spec, key, window)) # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.TimerParam): + * assert self.user_state_context is not None +*/ + __pyx_t_1 = __pyx_v_self->__pyx_base.user_state_context; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_state_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(!__pyx_v_key)) { __Pyx_RaiseUnboundLocalError("key"); __PYX_ERR(0, 1033, __pyx_L1_error) } + if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 1033, __pyx_L1_error) } + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_t_5, __pyx_v_key, __pyx_v_window}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_state, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + + /* "apache_beam/runners/common.py":1032 + * elif isinstance(p, core.DoFn.StateParam): + * assert self.user_state_context is not None + * args_for_process[i] = ( # <<<<<<<<<<<<<< + * self.user_state_context.get_state(p.state_spec, key, window)) + * elif isinstance(p, core.DoFn.TimerParam): +*/ + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_9) < 0))) __PYX_ERR(0, 1032, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1030 + * elif core.DoFn.PaneInfoParam == p: + * args_for_process[i] = windowed_value.pane_info + * elif isinstance(p, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * assert self.user_state_context is not None + * args_for_process[i] = ( +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1034 + * args_for_process[i] = ( + * self.user_state_context.get_state(p.state_spec, key, window)) + * elif isinstance(p, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * assert self.user_state_context is not None + * args_for_process[i] = ( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TimerParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1035 + * self.user_state_context.get_state(p.state_spec, key, window)) + * elif isinstance(p, core.DoFn.TimerParam): + * assert self.user_state_context is not None # <<<<<<<<<<<<<< + * args_for_process[i] = ( + * self.user_state_context.get_timer( +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + if (unlikely(!__pyx_t_4)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1035, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1035, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1037 + * assert self.user_state_context is not None + * args_for_process[i] = ( + * self.user_state_context.get_timer( # <<<<<<<<<<<<<< + * p.timer_spec, + * key, +*/ + __pyx_t_5 = __pyx_v_self->__pyx_base.user_state_context; + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":1038 + * args_for_process[i] = ( + * self.user_state_context.get_timer( + * p.timer_spec, # <<<<<<<<<<<<<< + * key, + * window, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_timer_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":1039 + * self.user_state_context.get_timer( + * p.timer_spec, + * key, # <<<<<<<<<<<<<< + * window, + * windowed_value.timestamp, +*/ + if (unlikely(!__pyx_v_key)) { __Pyx_RaiseUnboundLocalError("key"); __PYX_ERR(0, 1039, __pyx_L1_error) } + + /* "apache_beam/runners/common.py":1040 + * p.timer_spec, + * key, + * window, # <<<<<<<<<<<<<< + * windowed_value.timestamp, + * windowed_value.pane_info)) +*/ + if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 1040, __pyx_L1_error) } + + /* "apache_beam/runners/common.py":1041 + * key, + * window, + * windowed_value.timestamp, # <<<<<<<<<<<<<< + * windowed_value.pane_info)) + * elif core.DoFn.BundleFinalizerParam == p: +*/ + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + + /* "apache_beam/runners/common.py":1042 + * window, + * windowed_value.timestamp, + * windowed_value.pane_info)) # <<<<<<<<<<<<<< + * elif core.DoFn.BundleFinalizerParam == p: + * args_for_process[i] = self.bundle_finalizer_param +*/ + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_t_1, __pyx_v_key, __pyx_v_window, __pyx_t_16, __pyx_t_15}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_timer, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + + /* "apache_beam/runners/common.py":1036 + * elif isinstance(p, core.DoFn.TimerParam): + * assert self.user_state_context is not None + * args_for_process[i] = ( # <<<<<<<<<<<<<< + * self.user_state_context.get_timer( + * p.timer_spec, +*/ + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_9) < 0))) __PYX_ERR(0, 1036, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1034 + * args_for_process[i] = ( + * self.user_state_context.get_state(p.state_spec, key, window)) + * elif isinstance(p, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * assert self.user_state_context is not None + * args_for_process[i] = ( +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1043 + * windowed_value.timestamp, + * windowed_value.pane_info)) + * elif core.DoFn.BundleFinalizerParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = self.bundle_finalizer_param + * elif isinstance(p, core.DoFn.BundleContextParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_BundleFinalizerParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = PyObject_RichCompare(__pyx_t_9, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1044 + * windowed_value.pane_info)) + * elif core.DoFn.BundleFinalizerParam == p: + * args_for_process[i] = self.bundle_finalizer_param # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process[i] = self._bundle_context_values[p][1] +*/ + __pyx_t_15 = __pyx_v_self->__pyx_base.bundle_finalizer_param; + __Pyx_INCREF(__pyx_t_15); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_15) < 0))) __PYX_ERR(0, 1044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1043 + * windowed_value.timestamp, + * windowed_value.pane_info)) + * elif core.DoFn.BundleFinalizerParam == p: # <<<<<<<<<<<<<< + * args_for_process[i] = self.bundle_finalizer_param + * elif isinstance(p, core.DoFn.BundleContextParam): +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1045 + * elif core.DoFn.BundleFinalizerParam == p: + * args_for_process[i] = self.bundle_finalizer_param + * elif isinstance(p, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_for_process[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_BundleContextParam); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_p, __pyx_t_15); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1045, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1046 + * args_for_process[i] = self.bundle_finalizer_param + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process[i] = self._bundle_context_values[p][1] # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.SetupContextParam): + * args_for_process[i] = self._setup_context_values[p][1] +*/ + __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base._bundle_context_values, __pyx_v_p); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_15, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_9) < 0))) __PYX_ERR(0, 1046, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1045 + * elif core.DoFn.BundleFinalizerParam == p: + * args_for_process[i] = self.bundle_finalizer_param + * elif isinstance(p, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_for_process[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): +*/ + goto __pyx_L34; + } + + /* "apache_beam/runners/common.py":1047 + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_for_process[i] = self._setup_context_values[p][1] + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_SetupContextParam); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_p, __pyx_t_9); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1047, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1048 + * args_for_process[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): + * args_for_process[i] = self._setup_context_values[p][1] # <<<<<<<<<<<<<< + * + * kwargs_for_process = kwargs_for_process or {} +*/ + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base._setup_context_values, __pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process, __pyx_v_i, __pyx_t_15) < 0))) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1047 + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_for_process[i] = self._setup_context_values[p][1] + * +*/ + } + __pyx_L34:; + + /* "apache_beam/runners/common.py":1017 + * 'instead, got \'%s\'.') % (windowed_value.value, )) + * + * for i, p in self.placeholders_for_process: # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == p: + * args_for_process[i] = windowed_value.value +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1050 + * args_for_process[i] = self._setup_context_values[p][1] + * + * kwargs_for_process = kwargs_for_process or {} # <<<<<<<<<<<<<< + * + * if additional_kwargs: +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs_for_process); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1050, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __Pyx_INCREF(__pyx_v_kwargs_for_process); + __pyx_t_2 = __pyx_v_kwargs_for_process; + goto __pyx_L36_bool_binop_done; + } + __pyx_t_15 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_15); + __pyx_t_2 = __pyx_t_15; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_L36_bool_binop_done:; + __Pyx_DECREF_SET(__pyx_v_kwargs_for_process, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1052 + * kwargs_for_process = kwargs_for_process or {} + * + * if additional_kwargs: # <<<<<<<<<<<<<< + * kwargs_for_process.update(additional_kwargs) + * +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1052, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1053 + * + * if additional_kwargs: + * kwargs_for_process.update(additional_kwargs) # <<<<<<<<<<<<<< + * + * self.output_handler.handle_process_outputs( +*/ + __pyx_t_15 = __pyx_v_kwargs_for_process; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_additional_kwargs}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1052 + * kwargs_for_process = kwargs_for_process or {} + * + * if additional_kwargs: # <<<<<<<<<<<<<< + * kwargs_for_process.update(additional_kwargs) + * +*/ + } + + /* "apache_beam/runners/common.py":1056 + * + * self.output_handler.handle_process_outputs( + * windowed_value, # <<<<<<<<<<<<<< + * self.process_method(*args_for_process, **kwargs_for_process), + * self.threadsafe_watermark_estimator) +*/ + if (!(likely(((__pyx_v_windowed_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1056, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1057 + * self.output_handler.handle_process_outputs( + * windowed_value, + * self.process_method(*args_for_process, **kwargs_for_process), # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator) + * +*/ + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_args_for_process); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_kwargs_for_process == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 1057, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs_for_process))) { + __pyx_t_15 = PyDict_Copy(__pyx_v_kwargs_for_process); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } else { + __pyx_t_15 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs_for_process); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_self->process_method, __pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1058 + * windowed_value, + * self.process_method(*args_for_process, **kwargs_for_process), + * self.threadsafe_watermark_estimator) # <<<<<<<<<<<<<< + * + * if self.is_splittable: +*/ + __pyx_t_15 = __pyx_v_self->threadsafe_watermark_estimator; + __Pyx_INCREF(__pyx_t_15); + + /* "apache_beam/runners/common.py":1055 + * kwargs_for_process.update(additional_kwargs) + * + * self.output_handler.handle_process_outputs( # <<<<<<<<<<<<<< + * windowed_value, + * self.process_method(*args_for_process, **kwargs_for_process), +*/ + __pyx_t_19.__pyx_n = 1; + __pyx_t_19.watermark_estimator = __pyx_t_15; + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self->__pyx_base.output_handler->__pyx_vtab)->handle_process_outputs(__pyx_v_self->__pyx_base.output_handler, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_windowed_value), __pyx_t_9, 0, &__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1060 + * self.threadsafe_watermark_estimator) + * + * if self.is_splittable: # <<<<<<<<<<<<<< + * assert self.threadsafe_restriction_tracker is not None + * self.threadsafe_restriction_tracker.check_done() +*/ + if (__pyx_v_self->is_splittable) { + + /* "apache_beam/runners/common.py":1061 + * + * if self.is_splittable: + * assert self.threadsafe_restriction_tracker is not None # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker.check_done() + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_4 = (__pyx_v_self->threadsafe_restriction_tracker != Py_None); + if (unlikely(!__pyx_t_4)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1061, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1061, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1062 + * if self.is_splittable: + * assert self.threadsafe_restriction_tracker is not None + * self.threadsafe_restriction_tracker.check_done() # <<<<<<<<<<<<<< + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() + * if deferred_status: +*/ + __pyx_t_15 = __pyx_v_self->threadsafe_restriction_tracker; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_done, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1063 + * assert self.threadsafe_restriction_tracker is not None + * self.threadsafe_restriction_tracker.check_done() + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() # <<<<<<<<<<<<<< + * if deferred_status: + * deferred_restriction, deferred_timestamp = deferred_status +*/ + __pyx_t_15 = __pyx_v_self->threadsafe_restriction_tracker; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_deferred_status, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_deferred_status = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1064 + * self.threadsafe_restriction_tracker.check_done() + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() + * if deferred_status: # <<<<<<<<<<<<<< + * deferred_restriction, deferred_timestamp = deferred_status + * element = windowed_value.value +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_deferred_status); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1064, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1065 + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() + * if deferred_status: + * deferred_restriction, deferred_timestamp = deferred_status # <<<<<<<<<<<<<< + * element = windowed_value.value + * size = self.signature.get_restriction_provider().restriction_size( +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_deferred_status))) || (PyList_CheckExact(__pyx_v_deferred_status))) { + PyObject* sequence = __pyx_v_deferred_status; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1065, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_15); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_15 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_15); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_15 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_v_deferred_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L41_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_15 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_15)) goto __pyx_L41_unpacking_failed; + __Pyx_GOTREF(__pyx_t_15); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L42_unpacking_done; + __pyx_L41_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_L42_unpacking_done:; + } + __pyx_v_deferred_restriction = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_deferred_timestamp = __pyx_t_15; + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1066 + * if deferred_status: + * deferred_restriction, deferred_timestamp = deferred_status + * element = windowed_value.value # <<<<<<<<<<<<<< + * size = self.signature.get_restriction_provider().restriction_size( + * element, deferred_restriction) +*/ + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_v_element = __pyx_t_15; + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1067 + * deferred_restriction, deferred_timestamp = deferred_status + * element = windowed_value.value + * size = self.signature.get_restriction_provider().restriction_size( # <<<<<<<<<<<<<< + * element, deferred_restriction) + * if size < 0: +*/ + __pyx_t_16 = ((PyObject *)__pyx_v_self->__pyx_base.signature); + __Pyx_INCREF(__pyx_t_16); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_2 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1068 + * element = windowed_value.value + * size = self.signature.get_restriction_provider().restriction_size( + * element, deferred_restriction) # <<<<<<<<<<<<<< + * if size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % size) +*/ + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_element, __pyx_v_deferred_restriction}; + __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restriction_size, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_v_size = __pyx_t_15; + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1069 + * size = self.signature.get_restriction_provider().restriction_size( + * element, deferred_restriction) + * if size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % size) + * current_watermark = ( +*/ + __pyx_t_15 = PyObject_RichCompare(__pyx_v_size, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1069, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/runners/common.py":1070 + * element, deferred_restriction) + * if size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % size) # <<<<<<<<<<<<<< + * current_watermark = ( + * self.threadsafe_watermark_estimator.current_watermark()) +*/ + __pyx_t_9 = NULL; + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2}; + __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __Pyx_Raise(__pyx_t_15, 0, 0, 0); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __PYX_ERR(0, 1070, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1069 + * size = self.signature.get_restriction_provider().restriction_size( + * element, deferred_restriction) + * if size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % size) + * current_watermark = ( +*/ + } + + /* "apache_beam/runners/common.py":1072 + * raise ValueError('Expected size >= 0 but received %s.' % size) + * current_watermark = ( + * self.threadsafe_watermark_estimator.current_watermark()) # <<<<<<<<<<<<<< + * estimator_state = ( + * self.threadsafe_watermark_estimator.get_estimator_state()) +*/ + __pyx_t_2 = __pyx_v_self->threadsafe_watermark_estimator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_watermark, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_v_current_watermark = __pyx_t_15; + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1074 + * self.threadsafe_watermark_estimator.current_watermark()) + * estimator_state = ( + * self.threadsafe_watermark_estimator.get_estimator_state()) # <<<<<<<<<<<<<< + * residual_value = ((element, (deferred_restriction, estimator_state)), + * size) +*/ + __pyx_t_2 = __pyx_v_self->threadsafe_watermark_estimator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_estimator_state, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_v_estimator_state = __pyx_t_15; + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1075 + * estimator_state = ( + * self.threadsafe_watermark_estimator.get_estimator_state()) + * residual_value = ((element, (deferred_restriction, estimator_state)), # <<<<<<<<<<<<<< + * size) + * return SplitResultResidual( +*/ + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(__pyx_v_deferred_restriction); + __Pyx_GIVEREF(__pyx_v_deferred_restriction); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_deferred_restriction) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_estimator_state); + __Pyx_GIVEREF(__pyx_v_estimator_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_estimator_state) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_element); + __Pyx_GIVEREF(__pyx_v_element); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_element) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_15); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1076 + * self.threadsafe_watermark_estimator.get_estimator_state()) + * residual_value = ((element, (deferred_restriction, estimator_state)), + * size) # <<<<<<<<<<<<<< + * return SplitResultResidual( + * residual_value=windowed_value.with_value(residual_value), +*/ + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_size); + __Pyx_GIVEREF(__pyx_v_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_size) != (0)) __PYX_ERR(0, 1075, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_v_residual_value = ((PyObject*)__pyx_t_15); + __pyx_t_15 = 0; + + /* "apache_beam/runners/common.py":1077 + * residual_value = ((element, (deferred_restriction, estimator_state)), + * size) + * return SplitResultResidual( # <<<<<<<<<<<<<< + * residual_value=windowed_value.with_value(residual_value), + * current_watermark=current_watermark, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SplitResultResidual); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1078 + * size) + * return SplitResultResidual( + * residual_value=windowed_value.with_value(residual_value), # <<<<<<<<<<<<<< + * current_watermark=current_watermark, + * deferred_timestamp=deferred_timestamp) +*/ + __pyx_t_1 = __pyx_v_windowed_value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_residual_value}; + __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_value, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + } + + /* "apache_beam/runners/common.py":1080 + * residual_value=windowed_value.with_value(residual_value), + * current_watermark=current_watermark, + * deferred_timestamp=deferred_timestamp) # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_residual_value, __pyx_t_16, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_current_watermark, __pyx_v_current_watermark, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deferred_timestamp, __pyx_v_deferred_timestamp, __pyx_t_1, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1077, __pyx_L1_error) + __pyx_t_15 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_r = __pyx_t_15; + __pyx_t_15 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1064 + * self.threadsafe_restriction_tracker.check_done() + * deferred_status = self.threadsafe_restriction_tracker.deferred_status() + * if deferred_status: # <<<<<<<<<<<<<< + * deferred_restriction, deferred_timestamp = deferred_status + * element = windowed_value.value +*/ + } + + /* "apache_beam/runners/common.py":1060 + * self.threadsafe_watermark_estimator) + * + * if self.is_splittable: # <<<<<<<<<<<<<< + * assert self.threadsafe_restriction_tracker is not None + * self.threadsafe_restriction_tracker.check_done() +*/ + } + + /* "apache_beam/runners/common.py":1081 + * current_watermark=current_watermark, + * deferred_timestamp=deferred_timestamp) + * return None # <<<<<<<<<<<<<< + * + * def _invoke_process_batch_per_window( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":980 + * return True + * + * def _invoke_process_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_args_for_process); + __Pyx_XDECREF(__pyx_v_kwargs_for_process); + __Pyx_XDECREF(__pyx_v_window); + __Pyx_XDECREF(__pyx_v_side_inputs); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_unused_value); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_v_deferred_status); + __Pyx_XDECREF(__pyx_v_deferred_restriction); + __Pyx_XDECREF(__pyx_v_deferred_timestamp); + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XDECREF(__pyx_v_current_watermark); + __Pyx_XDECREF(__pyx_v_estimator_state); + __Pyx_XDECREF(__pyx_v_residual_value); + __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_si); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1083 + * return None + * + * def _invoke_process_batch_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_batch: WindowedBatch, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window = {"_invoke_process_batch_per_window", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + PyObject *__pyx_v_additional_args = 0; + PyObject *__pyx_v_additional_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_invoke_process_batch_per_window (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,&__pyx_mstate_global->__pyx_n_u_additional_args,&__pyx_mstate_global->__pyx_n_u_additional_kwargs,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1083, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1083, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1083, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1083, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_invoke_process_batch_per_window", 0) < (0)) __PYX_ERR(0, 1083, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_invoke_process_batch_per_window", 1, 3, 3, i); __PYX_ERR(0, 1083, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1083, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1083, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1083, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + __pyx_v_additional_args = values[1]; + __pyx_v_additional_kwargs = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_invoke_process_batch_per_window", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1083, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_batch_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 0, "windowed_batch", 0))) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_invoke_process_batch_per_window(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_windowed_batch, __pyx_v_additional_args, __pyx_v_additional_kwargs); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_invoke_process_batch_per_window(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, PyObject *__pyx_v_additional_args, PyObject *__pyx_v_additional_kwargs) { + PyObject *__pyx_v_args_for_process_batch = NULL; + PyObject *__pyx_v_kwargs_for_process_batch = NULL; + PyObject *__pyx_v_window = NULL; + PyObject *__pyx_v_side_inputs = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_9genexpr10__pyx_v_si = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + size_t __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_invoke_process_batch_per_window", 0); + + /* "apache_beam/runners/common.py":1091 + * # type: (...) -> Optional[SplitResultResidual] + * + * if self.has_cached_window_batch_args: # <<<<<<<<<<<<<< + * args_for_process_batch, kwargs_for_process_batch = ( + * self.args_for_process_batch, self.kwargs_for_process_batch) +*/ + if (__pyx_v_self->has_cached_window_batch_args) { + + /* "apache_beam/runners/common.py":1093 + * if self.has_cached_window_batch_args: + * args_for_process_batch, kwargs_for_process_batch = ( + * self.args_for_process_batch, self.kwargs_for_process_batch) # <<<<<<<<<<<<<< + * else: + * if self.has_windowed_inputs: +*/ + __pyx_t_1 = __pyx_v_self->args_for_process_batch; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_self->kwargs_for_process_batch; + __Pyx_INCREF(__pyx_t_2); + __pyx_v_args_for_process_batch = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_kwargs_for_process_batch = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1091 + * # type: (...) -> Optional[SplitResultResidual] + * + * if self.has_cached_window_batch_args: # <<<<<<<<<<<<<< + * args_for_process_batch, kwargs_for_process_batch = ( + * self.args_for_process_batch, self.kwargs_for_process_batch) +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":1095 + * self.args_for_process_batch, self.kwargs_for_process_batch) + * else: + * if self.has_windowed_inputs: # <<<<<<<<<<<<<< + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * assert len(windowed_batch.windows) <= 1 +*/ + /*else*/ { + if (__pyx_v_self->has_windowed_inputs) { + + /* "apache_beam/runners/common.py":1096 + * else: + * if self.has_windowed_inputs: + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * assert len(windowed_batch.windows) <= 1 + * window, = windowed_batch.windows +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_batch), __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1096, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1096, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1096, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1097 + * if self.has_windowed_inputs: + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * assert len(windowed_batch.windows) <= 1 # <<<<<<<<<<<<<< + * window, = windowed_batch.windows + * else: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 <= 1); + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1097, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1097, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1098 + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * assert len(windowed_batch.windows) <= 1 + * window, = windowed_batch.windows # <<<<<<<<<<<<<< + * else: + * window = GlobalWindow() +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 1)) { + if (size > 1) __Pyx_RaiseTooManyValuesError(1); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1098, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 1) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __pyx_v_window = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1095 + * self.args_for_process_batch, self.kwargs_for_process_batch) + * else: + * if self.has_windowed_inputs: # <<<<<<<<<<<<<< + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * assert len(windowed_batch.windows) <= 1 +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/common.py":1100 + * window, = windowed_batch.windows + * else: + * window = GlobalWindow() # <<<<<<<<<<<<<< + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) +*/ + /*else*/ { + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GlobalWindow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_window = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "apache_beam/runners/common.py":1101 + * else: + * window = GlobalWindow() + * side_inputs = [si[window] for si in self.side_inputs] # <<<<<<<<<<<<<< + * side_inputs.extend(additional_args) + * args_for_process_batch, kwargs_for_process_batch = ( +*/ + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_self->side_inputs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1101, __pyx_L9_error) + } + __pyx_t_5 = __pyx_v_self->side_inputs; __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1101, __pyx_L9_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_si, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_9genexpr10__pyx_v_si, __pyx_v_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1101, __pyx_L9_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si); __pyx_9genexpr10__pyx_v_si = 0; + goto __pyx_L13_exit_scope; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si); __pyx_9genexpr10__pyx_v_si = 0; + goto __pyx_L1_error; + __pyx_L13_exit_scope:; + } /* exit inner scope */ + __pyx_v_side_inputs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1102 + * window = GlobalWindow() + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) # <<<<<<<<<<<<<< + * args_for_process_batch, kwargs_for_process_batch = ( + * util.insert_values_in_args( +*/ + __pyx_t_8 = __Pyx_PyList_Extend(__pyx_v_side_inputs, __pyx_v_additional_args); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1102, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1104 + * side_inputs.extend(additional_args) + * args_for_process_batch, kwargs_for_process_batch = ( + * util.insert_values_in_args( # <<<<<<<<<<<<<< + * self.args_for_process_batch, + * self.kwargs_for_process_batch, +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_util); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_insert_values_in_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1107 + * self.args_for_process_batch, + * self.kwargs_for_process_batch, + * side_inputs, # <<<<<<<<<<<<<< + * ) + * ) +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_self->args_for_process_batch, __pyx_v_self->kwargs_for_process_batch, __pyx_v_side_inputs}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1103, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_9 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L15_unpacking_done; + __pyx_L14_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_L15_unpacking_done:; + } + + /* "apache_beam/runners/common.py":1103 + * side_inputs = [si[window] for si in self.side_inputs] + * side_inputs.extend(additional_args) + * args_for_process_batch, kwargs_for_process_batch = ( # <<<<<<<<<<<<<< + * util.insert_values_in_args( + * self.args_for_process_batch, +*/ + __pyx_v_args_for_process_batch = __pyx_t_9; + __pyx_t_9 = 0; + __pyx_v_kwargs_for_process_batch = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1110 + * ) + * ) + * if not self.recalculate_window_args: # <<<<<<<<<<<<<< + * self.args_for_process_batch, self.kwargs_for_process_batch = ( + * args_for_process_batch, kwargs_for_process_batch) +*/ + __pyx_t_3 = (!__pyx_v_self->recalculate_window_args); + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1112 + * if not self.recalculate_window_args: + * self.args_for_process_batch, self.kwargs_for_process_batch = ( + * args_for_process_batch, kwargs_for_process_batch) # <<<<<<<<<<<<<< + * self.has_cached_window_batch_args = True + * +*/ + __pyx_t_2 = __pyx_v_args_for_process_batch; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_5 = __pyx_v_kwargs_for_process_batch; + __Pyx_INCREF(__pyx_t_5); + if (!(likely(PyDict_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_5))) __PYX_ERR(0, 1112, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1111 + * ) + * if not self.recalculate_window_args: + * self.args_for_process_batch, self.kwargs_for_process_batch = ( # <<<<<<<<<<<<<< + * args_for_process_batch, kwargs_for_process_batch) + * self.has_cached_window_batch_args = True +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->args_for_process_batch); + __Pyx_DECREF(__pyx_v_self->args_for_process_batch); + __pyx_v_self->args_for_process_batch = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->kwargs_for_process_batch); + __Pyx_DECREF(__pyx_v_self->kwargs_for_process_batch); + __pyx_v_self->kwargs_for_process_batch = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1113 + * self.args_for_process_batch, self.kwargs_for_process_batch = ( + * args_for_process_batch, kwargs_for_process_batch) + * self.has_cached_window_batch_args = True # <<<<<<<<<<<<<< + * + * for i, p in self.placeholders_for_process_batch: +*/ + __pyx_v_self->has_cached_window_batch_args = 1; + + /* "apache_beam/runners/common.py":1110 + * ) + * ) + * if not self.recalculate_window_args: # <<<<<<<<<<<<<< + * self.args_for_process_batch, self.kwargs_for_process_batch = ( + * args_for_process_batch, kwargs_for_process_batch) +*/ + } + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":1115 + * self.has_cached_window_batch_args = True + * + * for i, p in self.placeholders_for_process_batch: # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == p: + * args_for_process_batch[i] = windowed_batch.values +*/ + if (unlikely(__pyx_v_self->placeholders_for_process_batch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1115, __pyx_L1_error) + } + __pyx_t_5 = __pyx_v_self->placeholders_for_process_batch; __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1115, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1115, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); + index = 0; __pyx_t_9 = __pyx_t_6(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L19_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L19_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L20_unpacking_done; + __pyx_L19_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_L20_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1116 + * + * for i, p in self.placeholders_for_process_batch: + * if core.DoFn.ElementParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = windowed_batch.values + * elif core.DoFn.KeyParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ElementParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1117 + * for i, p in self.placeholders_for_process_batch: + * if core.DoFn.ElementParam == p: + * args_for_process_batch[i] = windowed_batch.values # <<<<<<<<<<<<<< + * elif core.DoFn.KeyParam == p: + * raise NotImplementedError( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1116 + * + * for i, p in self.placeholders_for_process_batch: + * if core.DoFn.ElementParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = windowed_batch.values + * elif core.DoFn.KeyParam == p: +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":1118 + * if core.DoFn.ElementParam == p: + * args_for_process_batch[i] = windowed_batch.values + * elif core.DoFn.KeyParam == p: # <<<<<<<<<<<<<< + * raise NotImplementedError( + * 'https://github.com/apache/beam/issues/21653: Per-key process_batch' +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KeyParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1119 + * args_for_process_batch[i] = windowed_batch.values + * elif core.DoFn.KeyParam == p: + * raise NotImplementedError( # <<<<<<<<<<<<<< + * 'https://github.com/apache/beam/issues/21653: Per-key process_batch' + * ) +*/ + __pyx_t_1 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_https_github_com_apache_beam_iss}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1119, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1118 + * if core.DoFn.ElementParam == p: + * args_for_process_batch[i] = windowed_batch.values + * elif core.DoFn.KeyParam == p: # <<<<<<<<<<<<<< + * raise NotImplementedError( + * 'https://github.com/apache/beam/issues/21653: Per-key process_batch' +*/ + } + + /* "apache_beam/runners/common.py":1122 + * 'https://github.com/apache/beam/issues/21653: Per-key process_batch' + * ) + * elif core.DoFn.WindowParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = window + * elif core.DoFn.TimestampParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_WindowParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1123 + * ) + * elif core.DoFn.WindowParam == p: + * args_for_process_batch[i] = window # <<<<<<<<<<<<<< + * elif core.DoFn.TimestampParam == p: + * args_for_process_batch[i] = windowed_batch.timestamp +*/ + if (unlikely(!__pyx_v_window)) { __Pyx_RaiseUnboundLocalError("window"); __PYX_ERR(0, 1123, __pyx_L1_error) } + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_v_window) < 0))) __PYX_ERR(0, 1123, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1122 + * 'https://github.com/apache/beam/issues/21653: Per-key process_batch' + * ) + * elif core.DoFn.WindowParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = window + * elif core.DoFn.TimestampParam == p: +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":1124 + * elif core.DoFn.WindowParam == p: + * args_for_process_batch[i] = window + * elif core.DoFn.TimestampParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = windowed_batch.timestamp + * elif core.DoFn.PaneInfoParam == p: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TimestampParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1125 + * args_for_process_batch[i] = window + * elif core.DoFn.TimestampParam == p: + * args_for_process_batch[i] = windowed_batch.timestamp # <<<<<<<<<<<<<< + * elif core.DoFn.PaneInfoParam == p: + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_2) < 0))) __PYX_ERR(0, 1125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1124 + * elif core.DoFn.WindowParam == p: + * args_for_process_batch[i] = window + * elif core.DoFn.TimestampParam == p: # <<<<<<<<<<<<<< + * args_for_process_batch[i] = windowed_batch.timestamp + * elif core.DoFn.PaneInfoParam == p: +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":1126 + * elif core.DoFn.TimestampParam == p: + * args_for_process_batch[i] = windowed_batch.timestamp + * elif core.DoFn.PaneInfoParam == p: # <<<<<<<<<<<<<< + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * args_for_process_batch[i] = windowed_batch.pane_info +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_p, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1127 + * args_for_process_batch[i] = windowed_batch.timestamp + * elif core.DoFn.PaneInfoParam == p: + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * args_for_process_batch[i] = windowed_batch.pane_info + * elif isinstance(p, core.DoFn.StateParam): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_batch), __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1127, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1127, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1128 + * elif core.DoFn.PaneInfoParam == p: + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * args_for_process_batch[i] = windowed_batch.pane_info # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.StateParam): + * raise NotImplementedError( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 1128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1126 + * elif core.DoFn.TimestampParam == p: + * args_for_process_batch[i] = windowed_batch.timestamp + * elif core.DoFn.PaneInfoParam == p: # <<<<<<<<<<<<<< + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * args_for_process_batch[i] = windowed_batch.pane_info +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":1129 + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * args_for_process_batch[i] = windowed_batch.pane_info + * elif isinstance(p, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * "https://github.com/apache/beam/issues/21653: " +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_StateParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1130 + * args_for_process_batch[i] = windowed_batch.pane_info + * elif isinstance(p, core.DoFn.StateParam): + * raise NotImplementedError( # <<<<<<<<<<<<<< + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") +*/ + __pyx_t_2 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_https_github_com_apache_beam_iss}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1130, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1129 + * assert isinstance(windowed_batch, HomogeneousWindowedBatch) + * args_for_process_batch[i] = windowed_batch.pane_info + * elif isinstance(p, core.DoFn.StateParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * "https://github.com/apache/beam/issues/21653: " +*/ + } + + /* "apache_beam/runners/common.py":1133 + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * "https://github.com/apache/beam/issues/21653: " +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TimerParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1134 + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.TimerParam): + * raise NotImplementedError( # <<<<<<<<<<<<<< + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") +*/ + __pyx_t_2 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_https_github_com_apache_beam_iss}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1134, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1133 + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.TimerParam): # <<<<<<<<<<<<<< + * raise NotImplementedError( + * "https://github.com/apache/beam/issues/21653: " +*/ + } + + /* "apache_beam/runners/common.py":1137 + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_for_process_batch[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BundleContextParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1138 + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process_batch[i] = self._bundle_context_values[p][1] # <<<<<<<<<<<<<< + * elif isinstance(p, core.DoFn.SetupContextParam): + * args_for_process_batch[i] = self._setup_context_values[p][1] +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base._bundle_context_values, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_2) < 0))) __PYX_ERR(0, 1138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1137 + * "https://github.com/apache/beam/issues/21653: " + * "Per-key process_batch") + * elif isinstance(p, core.DoFn.BundleContextParam): # <<<<<<<<<<<<<< + * args_for_process_batch[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): +*/ + goto __pyx_L21; + } + + /* "apache_beam/runners/common.py":1139 + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process_batch[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_for_process_batch[i] = self._setup_context_values[p][1] + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_SetupContextParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_p, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1140 + * args_for_process_batch[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): + * args_for_process_batch[i] = self._setup_context_values[p][1] # <<<<<<<<<<<<<< + * + * kwargs_for_process_batch = kwargs_for_process_batch or {} +*/ + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base._setup_context_values, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_args_for_process_batch, __pyx_v_i, __pyx_t_1) < 0))) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1139 + * elif isinstance(p, core.DoFn.BundleContextParam): + * args_for_process_batch[i] = self._bundle_context_values[p][1] + * elif isinstance(p, core.DoFn.SetupContextParam): # <<<<<<<<<<<<<< + * args_for_process_batch[i] = self._setup_context_values[p][1] + * +*/ + } + __pyx_L21:; + + /* "apache_beam/runners/common.py":1115 + * self.has_cached_window_batch_args = True + * + * for i, p in self.placeholders_for_process_batch: # <<<<<<<<<<<<<< + * if core.DoFn.ElementParam == p: + * args_for_process_batch[i] = windowed_batch.values +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1142 + * args_for_process_batch[i] = self._setup_context_values[p][1] + * + * kwargs_for_process_batch = kwargs_for_process_batch or {} # <<<<<<<<<<<<<< + * + * if additional_kwargs: +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs_for_process_batch); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __Pyx_INCREF(__pyx_v_kwargs_for_process_batch); + __pyx_t_5 = __pyx_v_kwargs_for_process_batch; + goto __pyx_L23_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_L23_bool_binop_done:; + __Pyx_DECREF_SET(__pyx_v_kwargs_for_process_batch, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1144 + * kwargs_for_process_batch = kwargs_for_process_batch or {} + * + * if additional_kwargs: # <<<<<<<<<<<<<< + * kwargs_for_process_batch.update(additional_kwargs) + * +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_additional_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1144, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1145 + * + * if additional_kwargs: + * kwargs_for_process_batch.update(additional_kwargs) # <<<<<<<<<<<<<< + * + * self.output_handler.handle_process_batch_outputs( +*/ + __pyx_t_1 = __pyx_v_kwargs_for_process_batch; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_additional_kwargs}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1144 + * kwargs_for_process_batch = kwargs_for_process_batch or {} + * + * if additional_kwargs: # <<<<<<<<<<<<<< + * kwargs_for_process_batch.update(additional_kwargs) + * +*/ + } + + /* "apache_beam/runners/common.py":1149 + * self.output_handler.handle_process_batch_outputs( + * windowed_batch, + * self.process_batch_method( # <<<<<<<<<<<<<< + * *args_for_process_batch, **kwargs_for_process_batch), + * self.threadsafe_watermark_estimator) +*/ + __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_args_for_process_batch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":1150 + * windowed_batch, + * self.process_batch_method( + * *args_for_process_batch, **kwargs_for_process_batch), # <<<<<<<<<<<<<< + * self.threadsafe_watermark_estimator) + * +*/ + if (unlikely(__pyx_v_kwargs_for_process_batch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 1150, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs_for_process_batch))) { + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs_for_process_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_1 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs_for_process_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/common.py":1149 + * self.output_handler.handle_process_batch_outputs( + * windowed_batch, + * self.process_batch_method( # <<<<<<<<<<<<<< + * *args_for_process_batch, **kwargs_for_process_batch), + * self.threadsafe_watermark_estimator) +*/ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->process_batch_method, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1151 + * self.process_batch_method( + * *args_for_process_batch, **kwargs_for_process_batch), + * self.threadsafe_watermark_estimator) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_1 = __pyx_v_self->threadsafe_watermark_estimator; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":1147 + * kwargs_for_process_batch.update(additional_kwargs) + * + * self.output_handler.handle_process_batch_outputs( # <<<<<<<<<<<<<< + * windowed_batch, + * self.process_batch_method( +*/ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.watermark_estimator = __pyx_t_1; + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self->__pyx_base.output_handler->__pyx_vtab)->handle_process_batch_outputs(__pyx_v_self->__pyx_base.output_handler, __pyx_v_windowed_batch, __pyx_t_2, 0, &__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1083 + * return None + * + * def _invoke_process_batch_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_batch: WindowedBatch, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._invoke_process_batch_per_window", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_args_for_process_batch); + __Pyx_XDECREF(__pyx_v_kwargs_for_process_batch); + __Pyx_XDECREF(__pyx_v_window); + __Pyx_XDECREF(__pyx_v_side_inputs); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_si); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1153 + * self.threadsafe_watermark_estimator) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _try_split( + * fraction, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split, "Try to split returning a primaries, residuals and a new stop index.\n\n For non-window observing splittable DoFns we split the current restriction\n and assign the primary and residual to all the windows.\n\n For window observing splittable DoFns, we:\n 1) return a split at a window boundary if the fraction lies outside of the\n current window.\n 2) attempt to split the current restriction, if successful then return\n the primary and residual for the current window and an additional\n primary and residual for any fully processed and fully unprocessed\n windows.\n 3) fall back to returning a split at the window boundary if possible\n\n Args:\n window_index: the current index of the window being processed or None\n if the splittable DoFn is not window observing.\n stop_window_index: the current index to stop processing at or None\n if the splittable DoFn is not window observing.\n windowed_value: the current windowed value\n restriction: the initial restriction when processing was started.\n watermark_estimator_state: the initial watermark estimator state when\n processing was started.\n restriction_provider: the DoFn's restriction provider\n restriction_tracker: the current restriction tracker\n watermark_estimator: the current watermark estimator\n\n Returns:\n A tuple containing (primaries, residuals, new_stop_index) or None if\n splitting was not possible. new_stop_index will only be set if the\n splittable DoFn is window observing otherwise it will be None.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split = {"_try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction = 0; + PyObject *__pyx_v_window_index = 0; + PyObject *__pyx_v_stop_window_index = 0; + PyObject *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_restriction = 0; + PyObject *__pyx_v_watermark_estimator_state = 0; + PyObject *__pyx_v_restriction_provider = 0; + PyObject *__pyx_v_restriction_tracker = 0; + PyObject *__pyx_v_watermark_estimator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction,&__pyx_mstate_global->__pyx_n_u_window_index,&__pyx_mstate_global->__pyx_n_u_stop_window_index,&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_watermark_estimator_state,&__pyx_mstate_global->__pyx_n_u_restriction_provider,&__pyx_mstate_global->__pyx_n_u_restriction_tracker,&__pyx_mstate_global->__pyx_n_u_watermark_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1153, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 9: + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_try_split", 0) < (0)) __PYX_ERR(0, 1153, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 9; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, i); __PYX_ERR(0, 1153, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 9)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1153, __pyx_L3_error) + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1153, __pyx_L3_error) + } + __pyx_v_fraction = values[0]; + __pyx_v_window_index = values[1]; + __pyx_v_stop_window_index = values[2]; + __pyx_v_windowed_value = values[3]; + __pyx_v_restriction = values[4]; + __pyx_v_watermark_estimator_state = values[5]; + __pyx_v_restriction_provider = values[6]; + __pyx_v_restriction_tracker = values[7]; + __pyx_v_watermark_estimator = values[8]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_try_split", 1, 9, 9, __pyx_nargs); __PYX_ERR(0, 1153, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split(__pyx_v_fraction, __pyx_v_window_index, __pyx_v_stop_window_index, __pyx_v_windowed_value, __pyx_v_restriction, __pyx_v_watermark_estimator_state, __pyx_v_restriction_provider, __pyx_v_restriction_tracker, __pyx_v_watermark_estimator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1199 + * splittable DoFn is window observing otherwise it will be None. + * """ + * def compute_whole_window_split(to_index, from_index): # <<<<<<<<<<<<<< + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split = {"compute_whole_window_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_to_index = 0; + PyObject *__pyx_v_from_index = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("compute_whole_window_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_to_index,&__pyx_mstate_global->__pyx_n_u_from_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1199, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1199, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1199, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "compute_whole_window_split", 0) < (0)) __PYX_ERR(0, 1199, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compute_whole_window_split", 1, 2, 2, i); __PYX_ERR(0, 1199, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1199, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1199, __pyx_L3_error) + } + __pyx_v_to_index = values[0]; + __pyx_v_from_index = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("compute_whole_window_split", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1199, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._try_split.compute_whole_window_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(__pyx_self, __pyx_v_to_index, __pyx_v_from_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(PyObject *__pyx_self, PyObject *__pyx_v_to_index, PyObject *__pyx_v_from_index) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *__pyx_outer_scope; + PyObject *__pyx_v_restriction_size = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_primary_restriction = NULL; + PyObject *__pyx_v_residual_restriction = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("compute_whole_window_split", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "apache_beam/runners/common.py":1200 + * """ + * def compute_whole_window_split(to_index, from_index): + * restriction_size = restriction_provider.restriction_size( # <<<<<<<<<<<<<< + * windowed_value, restriction) + * if restriction_size < 0: +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_restriction_provider)) { __Pyx_RaiseClosureNameError("restriction_provider"); __PYX_ERR(0, 1200, __pyx_L1_error) } + __pyx_t_2 = __pyx_cur_scope->__pyx_v_restriction_provider; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1201 + * def compute_whole_window_split(to_index, from_index): + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) # <<<<<<<<<<<<<< + * if restriction_size < 0: + * raise ValueError( +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1201, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_restriction)) { __Pyx_RaiseClosureNameError("restriction"); __PYX_ERR(0, 1201, __pyx_L1_error) } + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_windowed_value, __pyx_cur_scope->__pyx_v_restriction}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restriction_size, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_restriction_size = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1202 + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) + * if restriction_size < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Expected size >= 0 but received %s.' % restriction_size) +*/ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_restriction_size, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/runners/common.py":1203 + * windowed_value, restriction) + * if restriction_size < 0: + * raise ValueError( # <<<<<<<<<<<<<< + * 'Expected size >= 0 but received %s.' % restriction_size) + * # The primary and residual both share the same value only differing +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/common.py":1204 + * if restriction_size < 0: + * raise ValueError( + * 'Expected size >= 0 but received %s.' % restriction_size) # <<<<<<<<<<<<<< + * # The primary and residual both share the same value only differing + * # by the set of windows they are in. +*/ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_restriction_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1203, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1202 + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) + * if restriction_size < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * 'Expected size >= 0 but received %s.' % restriction_size) +*/ + } + + /* "apache_beam/runners/common.py":1207 + * # The primary and residual both share the same value only differing + * # by the set of windows they are in. + * value = ((windowed_value.value, (restriction, watermark_estimator_state)), # <<<<<<<<<<<<<< + * restriction_size) + * primary_restriction = SplitResultPrimary( +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1207, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(!__pyx_cur_scope->__pyx_v_restriction)) { __Pyx_RaiseClosureNameError("restriction"); __PYX_ERR(0, 1207, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_watermark_estimator_state)) { __Pyx_RaiseClosureNameError("watermark_estimator_state"); __PYX_ERR(0, 1207, __pyx_L1_error) } + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restriction); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restriction); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_restriction) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_watermark_estimator_state) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1208 + * # by the set of windows they are in. + * value = ((windowed_value.value, (restriction, watermark_estimator_state)), + * restriction_size) # <<<<<<<<<<<<<< + * primary_restriction = SplitResultPrimary( + * primary_value=WindowedValue( +*/ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_restriction_size); + __Pyx_GIVEREF(__pyx_v_restriction_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_restriction_size) != (0)) __PYX_ERR(0, 1207, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_v_value = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1213 + * value, + * windowed_value.timestamp, + * windowed_value.windows[:to_index])) if to_index > 0 else None # <<<<<<<<<<<<<< + * # Don't report any updated watermarks for the residual since they have + * # not processed any part of the restriction. +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_to_index, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1209 + * value = ((windowed_value.value, (restriction, watermark_estimator_state)), + * restriction_size) + * primary_restriction = SplitResultPrimary( # <<<<<<<<<<<<<< + * primary_value=WindowedValue( + * value, +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SplitResultPrimary); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/runners/common.py":1210 + * restriction_size) + * primary_restriction = SplitResultPrimary( + * primary_value=WindowedValue( # <<<<<<<<<<<<<< + * value, + * windowed_value.timestamp, +*/ + __pyx_t_8 = NULL; + + /* "apache_beam/runners/common.py":1212 + * primary_value=WindowedValue( + * value, + * windowed_value.timestamp, # <<<<<<<<<<<<<< + * windowed_value.windows[:to_index])) if to_index > 0 else None + * # Don't report any updated watermarks for the residual since they have +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1212, __pyx_L1_error) } + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1213 + * value, + * windowed_value.timestamp, + * windowed_value.windows[:to_index])) if to_index > 0 else None # <<<<<<<<<<<<<< + * # Don't report any updated watermarks for the residual since they have + * # not processed any part of the restriction. +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1213, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_t_10, 0, 0, NULL, &__pyx_v_to_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_value, __pyx_t_9, __pyx_t_11}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL}; + __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_primary_value, ((PyObject *)__pyx_t_7), __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1209, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_5 = Py_None; + } + __pyx_v_primary_restriction = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1222 + * windowed_value.windows[from_index:stop_window_index]), + * current_watermark=None, + * deferred_timestamp=None) if from_index < stop_window_index else None # <<<<<<<<<<<<<< + * return (primary_restriction, residual_restriction) + * +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_stop_window_index)) { __Pyx_RaiseClosureNameError("stop_window_index"); __PYX_ERR(0, 1222, __pyx_L1_error) } + __pyx_t_2 = PyObject_RichCompare(__pyx_v_from_index, __pyx_cur_scope->__pyx_v_stop_window_index, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/common.py":1216 + * # Don't report any updated watermarks for the residual since they have + * # not processed any part of the restriction. + * residual_restriction = SplitResultResidual( # <<<<<<<<<<<<<< + * residual_value=WindowedValue( + * value, +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_SplitResultResidual); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/runners/common.py":1217 + * # not processed any part of the restriction. + * residual_restriction = SplitResultResidual( + * residual_value=WindowedValue( # <<<<<<<<<<<<<< + * value, + * windowed_value.timestamp, +*/ + __pyx_t_1 = NULL; + + /* "apache_beam/runners/common.py":1219 + * residual_value=WindowedValue( + * value, + * windowed_value.timestamp, # <<<<<<<<<<<<<< + * windowed_value.windows[from_index:stop_window_index]), + * current_watermark=None, +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1219, __pyx_L1_error) } + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1220 + * value, + * windowed_value.timestamp, + * windowed_value.windows[from_index:stop_window_index]), # <<<<<<<<<<<<<< + * current_watermark=None, + * deferred_timestamp=None) if from_index < stop_window_index else None +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_windowed_value)) { __Pyx_RaiseClosureNameError("windowed_value"); __PYX_ERR(0, 1220, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(!__pyx_cur_scope->__pyx_v_stop_window_index)) { __Pyx_RaiseClosureNameError("stop_window_index"); __PYX_ERR(0, 1220, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 0, &__pyx_v_from_index, &__pyx_cur_scope->__pyx_v_stop_window_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_value, __pyx_t_9, __pyx_t_10}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1217, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + + /* "apache_beam/runners/common.py":1222 + * windowed_value.windows[from_index:stop_window_index]), + * current_watermark=None, + * deferred_timestamp=None) if from_index < stop_window_index else None # <<<<<<<<<<<<<< + * return (primary_restriction, residual_restriction) + * +*/ + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_6, NULL}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_residual_value, ((PyObject *)__pyx_t_7), __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1216, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_current_watermark, Py_None, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1216, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deferred_timestamp, Py_None, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_5 = Py_None; + } + __pyx_v_residual_restriction = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1223 + * current_watermark=None, + * deferred_timestamp=None) if from_index < stop_window_index else None + * return (primary_restriction, residual_restriction) # <<<<<<<<<<<<<< + * + * primary_restrictions = [] +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_primary_restriction); + __Pyx_GIVEREF(__pyx_v_primary_restriction); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_primary_restriction) != (0)) __PYX_ERR(0, 1223, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_residual_restriction); + __Pyx_GIVEREF(__pyx_v_residual_restriction); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_residual_restriction) != (0)) __PYX_ERR(0, 1223, __pyx_L1_error); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1199 + * splittable DoFn is window observing otherwise it will be None. + * """ + * def compute_whole_window_split(to_index, from_index): # <<<<<<<<<<<<<< + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._try_split.compute_whole_window_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_restriction_size); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_primary_restriction); + __Pyx_XDECREF(__pyx_v_residual_restriction); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1153 + * self.threadsafe_watermark_estimator) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _try_split( + * fraction, +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split(PyObject *__pyx_v_fraction, PyObject *__pyx_v_window_index, PyObject *__pyx_v_stop_window_index, PyObject *__pyx_v_windowed_value, PyObject *__pyx_v_restriction, PyObject *__pyx_v_watermark_estimator_state, PyObject *__pyx_v_restriction_provider, PyObject *__pyx_v_restriction_tracker, PyObject *__pyx_v_watermark_estimator) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *__pyx_cur_scope; + PyObject *__pyx_v_compute_whole_window_split = 0; + PyObject *__pyx_v_primary_restrictions = NULL; + PyObject *__pyx_v_residual_restrictions = NULL; + PyObject *__pyx_v_window_observing = NULL; + PyObject *__pyx_v_progress = NULL; + PyObject *__pyx_v_RestrictionProgress = NULL; + PyObject *__pyx_v_scaled_progress = NULL; + PyObject *__pyx_v_fraction_of_remainder = NULL; + PyObject *__pyx_v_new_stop_window_index = NULL; + PyObject *__pyx_v_primary = NULL; + PyObject *__pyx_v_residual = NULL; + PyObject *__pyx_v_current_watermark = NULL; + PyObject *__pyx_v_current_estimator_state = NULL; + PyObject *__pyx_v_split = NULL; + PyObject *__pyx_v_element = NULL; + PyObject *__pyx_v_primary_size = NULL; + PyObject *__pyx_v_residual_size = NULL; + PyObject *__pyx_v_primary_split_value = NULL; + PyObject *__pyx_v_residual_split_value = NULL; + PyObject *__pyx_v_windows = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + long __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_try_split", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1153, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_stop_window_index = __pyx_v_stop_window_index; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop_window_index); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop_window_index); + __pyx_cur_scope->__pyx_v_windowed_value = __pyx_v_windowed_value; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_windowed_value); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_windowed_value); + __pyx_cur_scope->__pyx_v_restriction = __pyx_v_restriction; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restriction); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restriction); + __pyx_cur_scope->__pyx_v_watermark_estimator_state = __pyx_v_watermark_estimator_state; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + __pyx_cur_scope->__pyx_v_restriction_provider = __pyx_v_restriction_provider; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restriction_provider); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restriction_provider); + __Pyx_INCREF(__pyx_v_fraction); + + /* "apache_beam/runners/common.py":1199 + * splittable DoFn is window observing otherwise it will be None. + * """ + * def compute_whole_window_split(to_index, from_index): # <<<<<<<<<<<<<< + * restriction_size = restriction_provider.restriction_size( + * windowed_value, restriction) +*/ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_1compute_whole_window_split, 0, __pyx_mstate_global->__pyx_n_u_try_split_locals_compute_whole, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_compute_whole_window_split = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1225 + * return (primary_restriction, residual_restriction) + * + * primary_restrictions = [] # <<<<<<<<<<<<<< + * residual_restrictions = [] + * +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_primary_restrictions = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1226 + * + * primary_restrictions = [] + * residual_restrictions = [] # <<<<<<<<<<<<<< + * + * window_observing = window_index is not None +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_residual_restrictions = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1228 + * residual_restrictions = [] + * + * window_observing = window_index is not None # <<<<<<<<<<<<<< + * # If we are processing each window separately and we aren't on the last + * # window then compute whether the split lies within the current window +*/ + __pyx_t_2 = (__pyx_v_window_index != Py_None); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_window_observing = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1232 + * # window then compute whether the split lies within the current window + * # or a future window. + * if window_observing and window_index != stop_window_index - 1: # <<<<<<<<<<<<<< + * progress = restriction_tracker.current_progress() + * if not progress: +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_window_observing); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1232, __pyx_L1_error) + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_cur_scope->__pyx_v_stop_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_window_index, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":1233 + * # or a future window. + * if window_observing and window_index != stop_window_index - 1: + * progress = restriction_tracker.current_progress() # <<<<<<<<<<<<<< + * if not progress: + * # Assume no work has been completed for the current window if progress +*/ + __pyx_t_1 = __pyx_v_restriction_tracker; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_progress, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_progress = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1234 + * if window_observing and window_index != stop_window_index - 1: + * progress = restriction_tracker.current_progress() + * if not progress: # <<<<<<<<<<<<<< + * # Assume no work has been completed for the current window if progress + * # is unavailable. +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_progress); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_3 = (!__pyx_t_2); + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1237 + * # Assume no work has been completed for the current window if progress + * # is unavailable. + * from apache_beam.io.iobase import RestrictionProgress # <<<<<<<<<<<<<< + * progress = RestrictionProgress(completed=0, remaining=1) + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_io_iobase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1237, __pyx_L1_error) + } + __pyx_t_4 = __pyx_t_6; + __Pyx_GOTREF(__pyx_t_4); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_7 = 0; { + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + switch (__pyx_t_7) { + case 0: + __Pyx_INCREF(__pyx_t_1); + __pyx_v_RestrictionProgress = __pyx_t_1; + break; + default:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1238 + * # is unavailable. + * from apache_beam.io.iobase import RestrictionProgress + * progress = RestrictionProgress(completed=0, remaining=1) # <<<<<<<<<<<<<< + * + * scaled_progress = PerWindowInvoker._scale_progress( +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_RestrictionProgress); + __pyx_t_8 = __pyx_v_RestrictionProgress; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_completed, __pyx_mstate_global->__pyx_int_0, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1238, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_remaining, __pyx_mstate_global->__pyx_int_1, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_progress, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1234 + * if window_observing and window_index != stop_window_index - 1: + * progress = restriction_tracker.current_progress() + * if not progress: # <<<<<<<<<<<<<< + * # Assume no work has been completed for the current window if progress + * # is unavailable. +*/ + } + + /* "apache_beam/runners/common.py":1240 + * progress = RestrictionProgress(completed=0, remaining=1) + * + * scaled_progress = PerWindowInvoker._scale_progress( # <<<<<<<<<<<<<< + * progress, window_index, stop_window_index) + * # Compute the fraction of the remainder relative to the scaled progress. +*/ + __pyx_t_8 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_INCREF(__pyx_t_8); + + /* "apache_beam/runners/common.py":1241 + * + * scaled_progress = PerWindowInvoker._scale_progress( + * progress, window_index, stop_window_index) # <<<<<<<<<<<<<< + * # Compute the fraction of the remainder relative to the scaled progress. + * # If the value is greater than or equal to progress.remaining_work then we +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_progress, __pyx_v_window_index, __pyx_cur_scope->__pyx_v_stop_window_index}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scale_progress, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_scaled_progress = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1245 + * # If the value is greater than or equal to progress.remaining_work then we + * # should split at the closest window boundary. + * fraction_of_remainder = scaled_progress.remaining_work * fraction # <<<<<<<<<<<<<< + * if fraction_of_remainder >= progress.remaining_work: + * # The fraction is outside of the current window and hence we will +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_scaled_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_4, __pyx_v_fraction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_fraction_of_remainder = __pyx_t_8; + __pyx_t_8 = 0; + + /* "apache_beam/runners/common.py":1246 + * # should split at the closest window boundary. + * fraction_of_remainder = scaled_progress.remaining_work * fraction + * if fraction_of_remainder >= progress.remaining_work: # <<<<<<<<<<<<<< + * # The fraction is outside of the current window and hence we will + * # split at the closest window boundary. Favor a split and return the +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_fraction_of_remainder, __pyx_t_8, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1256 + * 1, + * int( + * round(( # <<<<<<<<<<<<<< + * progress.completed_work + + * scaled_progress.remaining_work * fraction) / +*/ + __pyx_t_8 = NULL; + + /* "apache_beam/runners/common.py":1257 + * int( + * round(( + * progress.completed_work + # <<<<<<<<<<<<<< + * scaled_progress.remaining_work * fraction) / + * progress.total_work)))) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_completed_work); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1258 + * round(( + * progress.completed_work + + * scaled_progress.remaining_work * fraction) / # <<<<<<<<<<<<<< + * progress.total_work)))) + * primary, residual = compute_whole_window_split( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scaled_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = PyNumber_Multiply(__pyx_t_1, __pyx_v_fraction); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1257 + * int( + * round(( + * progress.completed_work + # <<<<<<<<<<<<<< + * scaled_progress.remaining_work * fraction) / + * progress.total_work)))) +*/ + __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1259 + * progress.completed_work + + * scaled_progress.remaining_work * fraction) / + * progress.total_work)))) # <<<<<<<<<<<<<< + * primary, residual = compute_whole_window_split( + * new_stop_window_index, new_stop_window_index) +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_total_work); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/runners/common.py":1258 + * round(( + * progress.completed_work + + * scaled_progress.remaining_work * fraction) / # <<<<<<<<<<<<<< + * progress.total_work)))) + * primary, residual = compute_whole_window_split( +*/ + __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/common.py":1255 + * window_index + max( + * 1, + * int( # <<<<<<<<<<<<<< + * round(( + * progress.completed_work + +*/ + __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = 1; + + /* "apache_beam/runners/common.py":1254 + * stop_window_index - 1, + * window_index + max( + * 1, # <<<<<<<<<<<<<< + * int( + * round(( +*/ + __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/common.py":1255 + * window_index + max( + * 1, + * int( # <<<<<<<<<<<<<< + * round(( + * progress.completed_work + +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_3) { + __Pyx_INCREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + } else { + + /* "apache_beam/runners/common.py":1254 + * stop_window_index - 1, + * window_index + max( + * 1, # <<<<<<<<<<<<<< + * int( + * round(( +*/ + __pyx_t_10 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_PyInt_FromNumber(&__pyx_t_10, NULL, 0) < (0)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_4 = __pyx_t_10; + __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1253 + * new_stop_window_index = min( + * stop_window_index - 1, + * window_index + max( # <<<<<<<<<<<<<< + * 1, + * int( +*/ + __pyx_t_9 = PyNumber_Add(__pyx_v_window_index, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1252 + * # based upon the fraction. + * new_stop_window_index = min( + * stop_window_index - 1, # <<<<<<<<<<<<<< + * window_index + max( + * 1, +*/ + __pyx_t_4 = __Pyx_PyLong_SubtractObjC(__pyx_cur_scope->__pyx_v_stop_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":1253 + * new_stop_window_index = min( + * stop_window_index - 1, + * window_index + max( # <<<<<<<<<<<<<< + * 1, + * int( +*/ + __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_3) { + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __pyx_t_9; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_10 = __pyx_t_4; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_new_stop_window_index = __pyx_t_9; + __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1260 + * scaled_progress.remaining_work * fraction) / + * progress.total_work)))) + * primary, residual = compute_whole_window_split( # <<<<<<<<<<<<<< + * new_stop_window_index, new_stop_window_index) + * assert primary is not None +*/ + __pyx_t_9 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(__pyx_v_compute_whole_window_split, __pyx_v_new_stop_window_index, __pyx_v_new_stop_window_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { + PyObject* sequence = __pyx_t_9; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1260, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __pyx_v_primary = __pyx_t_10; + __pyx_t_10 = 0; + __pyx_v_residual = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1262 + * primary, residual = compute_whole_window_split( + * new_stop_window_index, new_stop_window_index) + * assert primary is not None # <<<<<<<<<<<<<< + * assert residual is not None + * return ([primary], [residual], new_stop_window_index) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_3 = (__pyx_v_primary != Py_None); + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1262, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1262, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1263 + * new_stop_window_index, new_stop_window_index) + * assert primary is not None + * assert residual is not None # <<<<<<<<<<<<<< + * return ([primary], [residual], new_stop_window_index) + * else: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_3 = (__pyx_v_residual != Py_None); + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1263, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1263, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1264 + * assert primary is not None + * assert residual is not None + * return ([primary], [residual], new_stop_window_index) # <<<<<<<<<<<<<< + * else: + * # The fraction is within the current window being processed so compute +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_primary); + __Pyx_GIVEREF(__pyx_v_primary); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_primary) != (0)) __PYX_ERR(0, 1264, __pyx_L1_error); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_residual); + __Pyx_GIVEREF(__pyx_v_residual); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_residual) != (0)) __PYX_ERR(0, 1264, __pyx_L1_error); + __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 1264, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 1264, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_new_stop_window_index); + __Pyx_GIVEREF(__pyx_v_new_stop_window_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_new_stop_window_index) != (0)) __PYX_ERR(0, 1264, __pyx_L1_error); + __pyx_t_9 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1246 + * # should split at the closest window boundary. + * fraction_of_remainder = scaled_progress.remaining_work * fraction + * if fraction_of_remainder >= progress.remaining_work: # <<<<<<<<<<<<<< + * # The fraction is outside of the current window and hence we will + * # split at the closest window boundary. Favor a split and return the +*/ + } + + /* "apache_beam/runners/common.py":1268 + * # The fraction is within the current window being processed so compute + * # the updated fraction based upon the number of windows being processed. + * new_stop_window_index = window_index + 1 # <<<<<<<<<<<<<< + * fraction = fraction_of_remainder / progress.remaining_work + * # Attempt to split below, if we can't then we'll compute a split +*/ + /*else*/ { + __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_v_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_v_new_stop_window_index = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1269 + * # the updated fraction based upon the number of windows being processed. + * new_stop_window_index = window_index + 1 + * fraction = fraction_of_remainder / progress.remaining_work # <<<<<<<<<<<<<< + * # Attempt to split below, if we can't then we'll compute a split + * # using only window boundaries +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_fraction_of_remainder, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF_SET(__pyx_v_fraction, __pyx_t_4); + __pyx_t_4 = 0; + } + + /* "apache_beam/runners/common.py":1232 + * # window then compute whether the split lies within the current window + * # or a future window. + * if window_observing and window_index != stop_window_index - 1: # <<<<<<<<<<<<<< + * progress = restriction_tracker.current_progress() + * if not progress: +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":1275 + * # We aren't splitting within multiple windows so we don't change our + * # stop index. + * new_stop_window_index = stop_window_index # <<<<<<<<<<<<<< + * + * # Temporary workaround for [BEAM-7473]: get current_watermark before +*/ + /*else*/ { + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop_window_index); + __pyx_v_new_stop_window_index = __pyx_cur_scope->__pyx_v_stop_window_index; + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":1280 + * # split, in case watermark gets advanced before getting split results. + * # In worst case, current_watermark is always stale, which is ok. + * current_watermark = (watermark_estimator.current_watermark()) # <<<<<<<<<<<<<< + * current_estimator_state = (watermark_estimator.get_estimator_state()) + * split = restriction_tracker.try_split(fraction) +*/ + __pyx_t_10 = __pyx_v_watermark_estimator; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_watermark, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_current_watermark = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1281 + * # In worst case, current_watermark is always stale, which is ok. + * current_watermark = (watermark_estimator.current_watermark()) + * current_estimator_state = (watermark_estimator.get_estimator_state()) # <<<<<<<<<<<<<< + * split = restriction_tracker.try_split(fraction) + * if split: +*/ + __pyx_t_10 = __pyx_v_watermark_estimator; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_estimator_state, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_current_estimator_state = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1282 + * current_watermark = (watermark_estimator.current_watermark()) + * current_estimator_state = (watermark_estimator.get_estimator_state()) + * split = restriction_tracker.try_split(fraction) # <<<<<<<<<<<<<< + * if split: + * primary, residual = split +*/ + __pyx_t_10 = __pyx_v_restriction_tracker; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_fraction}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_split = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1283 + * current_estimator_state = (watermark_estimator.get_estimator_state()) + * split = restriction_tracker.try_split(fraction) + * if split: # <<<<<<<<<<<<<< + * primary, residual = split + * element = windowed_value.value +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_split); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1283, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1284 + * split = restriction_tracker.try_split(fraction) + * if split: + * primary, residual = split # <<<<<<<<<<<<<< + * element = windowed_value.value + * primary_size = restriction_provider.restriction_size( +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_split))) || (PyList_CheckExact(__pyx_v_split))) { + PyObject* sequence = __pyx_v_split; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1284, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_10); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_10); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_v_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_unpacking_done; + __pyx_L11_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_L12_unpacking_done:; + } + __pyx_v_primary = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_residual = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1285 + * if split: + * primary, residual = split + * element = windowed_value.value # <<<<<<<<<<<<<< + * primary_size = restriction_provider.restriction_size( + * windowed_value.value, primary) +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_v_element = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1286 + * primary, residual = split + * element = windowed_value.value + * primary_size = restriction_provider.restriction_size( # <<<<<<<<<<<<<< + * windowed_value.value, primary) + * if primary_size < 0: +*/ + __pyx_t_4 = __pyx_cur_scope->__pyx_v_restriction_provider; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":1287 + * element = windowed_value.value + * primary_size = restriction_provider.restriction_size( + * windowed_value.value, primary) # <<<<<<<<<<<<<< + * if primary_size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_9, __pyx_v_primary}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restriction_size, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_v_primary_size = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1288 + * primary_size = restriction_provider.restriction_size( + * windowed_value.value, primary) + * if primary_size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) + * residual_size = restriction_provider.restriction_size( +*/ + __pyx_t_10 = PyObject_RichCompare(__pyx_v_primary_size, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1289 + * windowed_value.value, primary) + * if primary_size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) # <<<<<<<<<<<<<< + * residual_size = restriction_provider.restriction_size( + * windowed_value.value, residual) +*/ + __pyx_t_9 = NULL; + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_primary_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(0, 1289, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1288 + * primary_size = restriction_provider.restriction_size( + * windowed_value.value, primary) + * if primary_size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) + * residual_size = restriction_provider.restriction_size( +*/ + } + + /* "apache_beam/runners/common.py":1290 + * if primary_size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) + * residual_size = restriction_provider.restriction_size( # <<<<<<<<<<<<<< + * windowed_value.value, residual) + * if residual_size < 0: +*/ + __pyx_t_4 = __pyx_cur_scope->__pyx_v_restriction_provider; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":1291 + * raise ValueError('Expected size >= 0 but received %s.' % primary_size) + * residual_size = restriction_provider.restriction_size( + * windowed_value.value, residual) # <<<<<<<<<<<<<< + * if residual_size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % residual_size) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_9, __pyx_v_residual}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restriction_size, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_v_residual_size = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1292 + * residual_size = restriction_provider.restriction_size( + * windowed_value.value, residual) + * if residual_size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % residual_size) + * # We use the watermark estimator state for the original process call +*/ + __pyx_t_10 = PyObject_RichCompare(__pyx_v_residual_size, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1293 + * windowed_value.value, residual) + * if residual_size < 0: + * raise ValueError('Expected size >= 0 but received %s.' % residual_size) # <<<<<<<<<<<<<< + * # We use the watermark estimator state for the original process call + * # for the primary and the updated watermark estimator state for the +*/ + __pyx_t_9 = NULL; + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_size_0_but_received_s, __pyx_v_residual_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(0, 1293, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1292 + * residual_size = restriction_provider.restriction_size( + * windowed_value.value, residual) + * if residual_size < 0: # <<<<<<<<<<<<<< + * raise ValueError('Expected size >= 0 but received %s.' % residual_size) + * # We use the watermark estimator state for the original process call +*/ + } + + /* "apache_beam/runners/common.py":1297 + * # for the primary and the updated watermark estimator state for the + * # residual for the split. + * primary_split_value = ((element, (primary, watermark_estimator_state)), # <<<<<<<<<<<<<< + * primary_size) + * residual_split_value = ((element, (residual, current_estimator_state)), +*/ + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_primary); + __Pyx_GIVEREF(__pyx_v_primary); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_primary) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_watermark_estimator_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_cur_scope->__pyx_v_watermark_estimator_state) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_element); + __Pyx_GIVEREF(__pyx_v_element); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_element) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_10); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1298 + * # residual for the split. + * primary_split_value = ((element, (primary, watermark_estimator_state)), + * primary_size) # <<<<<<<<<<<<<< + * residual_split_value = ((element, (residual, current_estimator_state)), + * residual_size) +*/ + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_primary_size); + __Pyx_GIVEREF(__pyx_v_primary_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_primary_size) != (0)) __PYX_ERR(0, 1297, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_v_primary_split_value = ((PyObject*)__pyx_t_10); + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1299 + * primary_split_value = ((element, (primary, watermark_estimator_state)), + * primary_size) + * residual_split_value = ((element, (residual, current_estimator_state)), # <<<<<<<<<<<<<< + * residual_size) + * windows = ( +*/ + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_residual); + __Pyx_GIVEREF(__pyx_v_residual); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_residual) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_current_estimator_state); + __Pyx_GIVEREF(__pyx_v_current_estimator_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_current_estimator_state) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_element); + __Pyx_GIVEREF(__pyx_v_element); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_element) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_10); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1300 + * primary_size) + * residual_split_value = ((element, (residual, current_estimator_state)), + * residual_size) # <<<<<<<<<<<<<< + * windows = ( + * windowed_value.windows[window_index], +*/ + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_residual_size); + __Pyx_GIVEREF(__pyx_v_residual_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_residual_size) != (0)) __PYX_ERR(0, 1299, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_v_residual_split_value = ((PyObject*)__pyx_t_10); + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1303 + * windows = ( + * windowed_value.windows[window_index], + * ) if window_observing else windowed_value.windows # <<<<<<<<<<<<<< + * primary_restrictions.append( + * SplitResultPrimary( +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_window_observing); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1303, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1302 + * residual_size) + * windows = ( + * windowed_value.windows[window_index], # <<<<<<<<<<<<<< + * ) if window_observing else windowed_value.windows + * primary_restrictions.append( +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_window_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 1302, __pyx_L1_error); + __pyx_t_9 = 0; + __pyx_t_10 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + + /* "apache_beam/runners/common.py":1303 + * windows = ( + * windowed_value.windows[window_index], + * ) if window_observing else windowed_value.windows # <<<<<<<<<<<<<< + * primary_restrictions.append( + * SplitResultPrimary( +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_windows = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1305 + * ) if window_observing else windowed_value.windows + * primary_restrictions.append( + * SplitResultPrimary( # <<<<<<<<<<<<<< + * primary_value=WindowedValue( + * primary_split_value, windowed_value.timestamp, windows))) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SplitResultPrimary); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1306 + * primary_restrictions.append( + * SplitResultPrimary( + * primary_value=WindowedValue( # <<<<<<<<<<<<<< + * primary_split_value, windowed_value.timestamp, windows))) + * residual_restrictions.append( +*/ + __pyx_t_1 = NULL; + + /* "apache_beam/runners/common.py":1307 + * SplitResultPrimary( + * primary_value=WindowedValue( + * primary_split_value, windowed_value.timestamp, windows))) # <<<<<<<<<<<<<< + * residual_restrictions.append( + * SplitResultResidual( +*/ + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_primary_split_value, __pyx_t_13, __pyx_v_windows}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_8); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_primary_value, ((PyObject *)__pyx_t_8), __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1305, __pyx_L1_error) + __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + + /* "apache_beam/runners/common.py":1304 + * windowed_value.windows[window_index], + * ) if window_observing else windowed_value.windows + * primary_restrictions.append( # <<<<<<<<<<<<<< + * SplitResultPrimary( + * primary_value=WindowedValue( +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_primary_restrictions, __pyx_t_10); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1309 + * primary_split_value, windowed_value.timestamp, windows))) + * residual_restrictions.append( + * SplitResultResidual( # <<<<<<<<<<<<<< + * residual_value=WindowedValue( + * residual_split_value, windowed_value.timestamp, windows), +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_SplitResultResidual); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + + /* "apache_beam/runners/common.py":1310 + * residual_restrictions.append( + * SplitResultResidual( + * residual_value=WindowedValue( # <<<<<<<<<<<<<< + * residual_split_value, windowed_value.timestamp, windows), + * current_watermark=current_watermark, +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/runners/common.py":1311 + * SplitResultResidual( + * residual_value=WindowedValue( + * residual_split_value, windowed_value.timestamp, windows), # <<<<<<<<<<<<<< + * current_watermark=current_watermark, + * deferred_timestamp=None)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_residual_split_value, __pyx_t_1, __pyx_v_windows}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1310, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_8); + } + + /* "apache_beam/runners/common.py":1313 + * residual_split_value, windowed_value.timestamp, windows), + * current_watermark=current_watermark, + * deferred_timestamp=None)) # <<<<<<<<<<<<<< + * + * if window_observing: +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_9, NULL}; + __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_residual_value, ((PyObject *)__pyx_t_8), __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1309, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_current_watermark, __pyx_v_current_watermark, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1309, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_deferred_timestamp, Py_None, __pyx_t_1, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + + /* "apache_beam/runners/common.py":1308 + * primary_value=WindowedValue( + * primary_split_value, windowed_value.timestamp, windows))) + * residual_restrictions.append( # <<<<<<<<<<<<<< + * SplitResultResidual( + * residual_value=WindowedValue( +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_residual_restrictions, __pyx_t_10); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1315 + * deferred_timestamp=None)) + * + * if window_observing: # <<<<<<<<<<<<<< + * assert new_stop_window_index == window_index + 1 + * primary, residual = compute_whole_window_split( +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_window_observing); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1315, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1316 + * + * if window_observing: + * assert new_stop_window_index == window_index + 1 # <<<<<<<<<<<<<< + * primary, residual = compute_whole_window_split( + * window_index, window_index + 1) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_v_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_13 = PyObject_RichCompare(__pyx_v_new_stop_window_index, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1316, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1316, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1318 + * assert new_stop_window_index == window_index + 1 + * primary, residual = compute_whole_window_split( + * window_index, window_index + 1) # <<<<<<<<<<<<<< + * if primary: + * primary_restrictions.append(primary) +*/ + __pyx_t_13 = __Pyx_PyLong_AddObjC(__pyx_v_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + + /* "apache_beam/runners/common.py":1317 + * if window_observing: + * assert new_stop_window_index == window_index + 1 + * primary, residual = compute_whole_window_split( # <<<<<<<<<<<<<< + * window_index, window_index + 1) + * if primary: +*/ + __pyx_t_10 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(__pyx_v_compute_whole_window_split, __pyx_v_window_index, __pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) { + PyObject* sequence = __pyx_t_10; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1317, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_13); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_13 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_13)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L17_unpacking_done; + __pyx_L16_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_L17_unpacking_done:; + } + __Pyx_DECREF_SET(__pyx_v_primary, __pyx_t_13); + __pyx_t_13 = 0; + __Pyx_DECREF_SET(__pyx_v_residual, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1319 + * primary, residual = compute_whole_window_split( + * window_index, window_index + 1) + * if primary: # <<<<<<<<<<<<<< + * primary_restrictions.append(primary) + * if residual: +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_primary); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1319, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1320 + * window_index, window_index + 1) + * if primary: + * primary_restrictions.append(primary) # <<<<<<<<<<<<<< + * if residual: + * residual_restrictions.append(residual) +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_primary_restrictions, __pyx_v_primary); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1320, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1319 + * primary, residual = compute_whole_window_split( + * window_index, window_index + 1) + * if primary: # <<<<<<<<<<<<<< + * primary_restrictions.append(primary) + * if residual: +*/ + } + + /* "apache_beam/runners/common.py":1321 + * if primary: + * primary_restrictions.append(primary) + * if residual: # <<<<<<<<<<<<<< + * residual_restrictions.append(residual) + * return ( +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_residual); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1321, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1322 + * primary_restrictions.append(primary) + * if residual: + * residual_restrictions.append(residual) # <<<<<<<<<<<<<< + * return ( + * primary_restrictions, residual_restrictions, new_stop_window_index) +*/ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_residual_restrictions, __pyx_v_residual); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1322, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1321 + * if primary: + * primary_restrictions.append(primary) + * if residual: # <<<<<<<<<<<<<< + * residual_restrictions.append(residual) + * return ( +*/ + } + + /* "apache_beam/runners/common.py":1315 + * deferred_timestamp=None)) + * + * if window_observing: # <<<<<<<<<<<<<< + * assert new_stop_window_index == window_index + 1 + * primary, residual = compute_whole_window_split( +*/ + } + + /* "apache_beam/runners/common.py":1323 + * if residual: + * residual_restrictions.append(residual) + * return ( # <<<<<<<<<<<<<< + * primary_restrictions, residual_restrictions, new_stop_window_index) + * elif new_stop_window_index and new_stop_window_index != stop_window_index: +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":1324 + * residual_restrictions.append(residual) + * return ( + * primary_restrictions, residual_restrictions, new_stop_window_index) # <<<<<<<<<<<<<< + * elif new_stop_window_index and new_stop_window_index != stop_window_index: + * # If we failed to split but have a new stop index then return a split +*/ + __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_primary_restrictions); + __Pyx_GIVEREF(__pyx_v_primary_restrictions); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_primary_restrictions) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_residual_restrictions); + __Pyx_GIVEREF(__pyx_v_residual_restrictions); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_residual_restrictions) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_new_stop_window_index); + __Pyx_GIVEREF(__pyx_v_new_stop_window_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_new_stop_window_index) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1283 + * current_estimator_state = (watermark_estimator.get_estimator_state()) + * split = restriction_tracker.try_split(fraction) + * if split: # <<<<<<<<<<<<<< + * primary, residual = split + * element = windowed_value.value +*/ + } + + /* "apache_beam/runners/common.py":1325 + * return ( + * primary_restrictions, residual_restrictions, new_stop_window_index) + * elif new_stop_window_index and new_stop_window_index != stop_window_index: # <<<<<<<<<<<<<< + * # If we failed to split but have a new stop index then return a split + * # at the window boundary. +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_new_stop_window_index); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1325, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_10 = PyObject_RichCompare(__pyx_v_new_stop_window_index, __pyx_cur_scope->__pyx_v_stop_window_index, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = __pyx_t_2; + __pyx_L20_bool_binop_done:; + if (__pyx_t_3) { + + /* "apache_beam/runners/common.py":1328 + * # If we failed to split but have a new stop index then return a split + * # at the window boundary. + * primary, residual = compute_whole_window_split( # <<<<<<<<<<<<<< + * new_stop_window_index, new_stop_window_index) + * assert primary is not None +*/ + __pyx_t_10 = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_10_try_split_compute_whole_window_split(__pyx_v_compute_whole_window_split, __pyx_v_new_stop_window_index, __pyx_v_new_stop_window_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) { + PyObject* sequence = __pyx_t_10; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1328, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_13); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #endif + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L22_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_13 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_13)) goto __pyx_L22_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L23_unpacking_done; + __pyx_L22_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_L23_unpacking_done:; + } + __pyx_v_primary = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_residual = __pyx_t_13; + __pyx_t_13 = 0; + + /* "apache_beam/runners/common.py":1330 + * primary, residual = compute_whole_window_split( + * new_stop_window_index, new_stop_window_index) + * assert primary is not None # <<<<<<<<<<<<<< + * assert residual is not None + * return ([primary], [residual], new_stop_window_index) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_3 = (__pyx_v_primary != Py_None); + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1330, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1330, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1331 + * new_stop_window_index, new_stop_window_index) + * assert primary is not None + * assert residual is not None # <<<<<<<<<<<<<< + * return ([primary], [residual], new_stop_window_index) + * else: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_3 = (__pyx_v_residual != Py_None); + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1331, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1331, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1332 + * assert primary is not None + * assert residual is not None + * return ([primary], [residual], new_stop_window_index) # <<<<<<<<<<<<<< + * else: + * return None +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_primary); + __Pyx_GIVEREF(__pyx_v_primary); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v_primary) != (0)) __PYX_ERR(0, 1332, __pyx_L1_error); + __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_INCREF(__pyx_v_residual); + __Pyx_GIVEREF(__pyx_v_residual); + if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v_residual) != (0)) __PYX_ERR(0, 1332, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_10); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 1332, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_13); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1332, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_new_stop_window_index); + __Pyx_GIVEREF(__pyx_v_new_stop_window_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_new_stop_window_index) != (0)) __PYX_ERR(0, 1332, __pyx_L1_error); + __pyx_t_10 = 0; + __pyx_t_13 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1325 + * return ( + * primary_restrictions, residual_restrictions, new_stop_window_index) + * elif new_stop_window_index and new_stop_window_index != stop_window_index: # <<<<<<<<<<<<<< + * # If we failed to split but have a new stop index then return a split + * # at the window boundary. +*/ + } + + /* "apache_beam/runners/common.py":1334 + * return ([primary], [residual], new_stop_window_index) + * else: + * return None # <<<<<<<<<<<<<< + * + * def try_split(self, fraction): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1153 + * self.threadsafe_watermark_estimator) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _try_split( + * fraction, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_compute_whole_window_split); + __Pyx_XDECREF(__pyx_v_primary_restrictions); + __Pyx_XDECREF(__pyx_v_residual_restrictions); + __Pyx_XDECREF(__pyx_v_window_observing); + __Pyx_XDECREF(__pyx_v_progress); + __Pyx_XDECREF(__pyx_v_RestrictionProgress); + __Pyx_XDECREF(__pyx_v_scaled_progress); + __Pyx_XDECREF(__pyx_v_fraction_of_remainder); + __Pyx_XDECREF(__pyx_v_new_stop_window_index); + __Pyx_XDECREF(__pyx_v_primary); + __Pyx_XDECREF(__pyx_v_residual); + __Pyx_XDECREF(__pyx_v_current_watermark); + __Pyx_XDECREF(__pyx_v_current_estimator_state); + __Pyx_XDECREF(__pyx_v_split); + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XDECREF(__pyx_v_primary_size); + __Pyx_XDECREF(__pyx_v_residual_size); + __Pyx_XDECREF(__pyx_v_primary_split_value); + __Pyx_XDECREF(__pyx_v_residual_split_value); + __Pyx_XDECREF(__pyx_v_windows); + __Pyx_XDECREF(__pyx_v_fraction); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1336 + * return None + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1336, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1336, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 1336, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 1336, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1336, __pyx_L3_error) + } + __pyx_v_fraction = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1336, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_14try_split(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v_fraction); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_14try_split(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v_fraction) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_residuals = NULL; + PyObject *__pyx_v_primaries = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/common.py":1338 + * def try_split(self, fraction): + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = (!__pyx_v_self->is_splittable); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1339 + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: + * return None # <<<<<<<<<<<<<< + * + * with self.splitting_lock: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1338 + * def try_split(self, fraction): + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "apache_beam/runners/common.py":1341 + * return None + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * if not self.threadsafe_restriction_tracker: + * return None +*/ + /*with:*/ { + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/common.py":1342 + * + * with self.splitting_lock: + * if not self.threadsafe_restriction_tracker: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->threadsafe_restriction_tracker); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1342, __pyx_L8_error) + __pyx_t_10 = (!__pyx_t_1); + if (__pyx_t_10) { + + /* "apache_beam/runners/common.py":1343 + * with self.splitting_lock: + * if not self.threadsafe_restriction_tracker: + * return None # <<<<<<<<<<<<<< + * + * # Make a local reference to member variables that change references during +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L12_try_return; + + /* "apache_beam/runners/common.py":1342 + * + * with self.splitting_lock: + * if not self.threadsafe_restriction_tracker: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "apache_beam/runners/common.py":1348 + * # processing under lock before attempting to split so we have a consistent + * # view of all the references. + * result = PerWindowInvoker._try_split( # <<<<<<<<<<<<<< + * fraction, + * self.current_window_index, +*/ + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":1355 + * self.restriction, + * self.watermark_estimator_state, + * self.signature.get_restriction_provider(), # <<<<<<<<<<<<<< + * self.threadsafe_restriction_tracker, + * self.threadsafe_watermark_estimator) +*/ + __pyx_t_11 = ((PyObject *)__pyx_v_self->__pyx_base.signature); + __Pyx_INCREF(__pyx_t_11); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1355, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/common.py":1357 + * self.signature.get_restriction_provider(), + * self.threadsafe_restriction_tracker, + * self.threadsafe_watermark_estimator) # <<<<<<<<<<<<<< + * if not result: + * return None +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[10] = {__pyx_t_5, __pyx_v_fraction, __pyx_v_self->current_window_index, __pyx_v_self->stop_window_index, ((PyObject *)__pyx_v_self->current_windowed_value), __pyx_v_self->restriction, __pyx_v_self->watermark_estimator_state, __pyx_t_4, __pyx_v_self->threadsafe_restriction_tracker, __pyx_v_self->threadsafe_watermark_estimator}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split_2, __pyx_callargs+__pyx_t_6, (10-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1348, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1358 + * self.threadsafe_restriction_tracker, + * self.threadsafe_watermark_estimator) + * if not result: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1358, __pyx_L8_error) + __pyx_t_1 = (!__pyx_t_10); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1359 + * self.threadsafe_watermark_estimator) + * if not result: + * return None # <<<<<<<<<<<<<< + * + * residuals, primaries, self.stop_window_index = result +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L12_try_return; + + /* "apache_beam/runners/common.py":1358 + * self.threadsafe_restriction_tracker, + * self.threadsafe_watermark_estimator) + * if not result: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "apache_beam/runners/common.py":1361 + * return None + * + * residuals, primaries, self.stop_window_index = result # <<<<<<<<<<<<<< + * return (residuals, primaries) + * +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) { + PyObject* sequence = __pyx_v_result; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1361, __pyx_L8_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1361, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < (0)) __PYX_ERR(0, 1361, __pyx_L8_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L17_unpacking_done; + __pyx_L16_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1361, __pyx_L8_error) + __pyx_L17_unpacking_done:; + } + __pyx_v_residuals = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_primaries = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->stop_window_index); + __Pyx_DECREF(__pyx_v_self->stop_window_index); + __pyx_v_self->stop_window_index = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1362 + * + * residuals, primaries, self.stop_window_index = result + * return (residuals, primaries) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_residuals); + __Pyx_GIVEREF(__pyx_v_residuals); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_residuals) != (0)) __PYX_ERR(0, 1362, __pyx_L8_error); + __Pyx_INCREF(__pyx_v_primaries); + __Pyx_GIVEREF(__pyx_v_primaries); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_primaries) != (0)) __PYX_ERR(0, 1362, __pyx_L8_error); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L12_try_return; + + /* "apache_beam/runners/common.py":1341 + * return None + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * if not self.threadsafe_restriction_tracker: + * return None +*/ + } + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1341, __pyx_L10_except_error) + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1341, __pyx_L10_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1341, __pyx_L10_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_1 < (0)) __PYX_ERR(0, 1341, __pyx_L10_except_error) + __pyx_t_10 = (!__pyx_t_1); + if (unlikely(__pyx_t_10)) { + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_3); + __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 1341, __pyx_L10_except_error) + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L9_exception_handled; + } + __pyx_L10_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L12_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L5_return; + __pyx_L9_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L7; + } + __pyx_L5_return: { + __pyx_t_9 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_2) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L7:; + } + goto __pyx_L21; + __pyx_L4_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L21:; + } + + /* "apache_beam/runners/common.py":1336 + * return None + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_residuals); + __Pyx_XDECREF(__pyx_v_primaries); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1364 + * return (residuals, primaries) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _scale_progress(progress, window_index, stop_window_index): + * # We scale progress based upon the amount of work we will do for one +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress = {"_scale_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_progress = 0; + PyObject *__pyx_v_window_index = 0; + PyObject *__pyx_v_stop_window_index = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_scale_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_progress,&__pyx_mstate_global->__pyx_n_u_window_index,&__pyx_mstate_global->__pyx_n_u_stop_window_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1364, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1364, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1364, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1364, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_scale_progress", 0) < (0)) __PYX_ERR(0, 1364, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_scale_progress", 1, 3, 3, i); __PYX_ERR(0, 1364, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1364, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1364, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1364, __pyx_L3_error) + } + __pyx_v_progress = values[0]; + __pyx_v_window_index = values[1]; + __pyx_v_stop_window_index = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_scale_progress", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1364, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._scale_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_16_scale_progress(__pyx_v_progress, __pyx_v_window_index, __pyx_v_stop_window_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_16_scale_progress(PyObject *__pyx_v_progress, PyObject *__pyx_v_window_index, PyObject *__pyx_v_stop_window_index) { + PyObject *__pyx_v_completed = NULL; + PyObject *__pyx_v_remaining = NULL; + PyObject *__pyx_v_RestrictionProgress = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_scale_progress", 0); + + /* "apache_beam/runners/common.py":1368 + * # We scale progress based upon the amount of work we will do for one + * # window and have it apply for all windows. + * completed = window_index * progress.total_work + progress.completed_work # <<<<<<<<<<<<<< + * remaining = ( + * stop_window_index - +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_total_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Multiply(__pyx_v_window_index, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_completed = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1371 + * remaining = ( + * stop_window_index - + * (window_index + 1)) * progress.total_work + progress.remaining_work # <<<<<<<<<<<<<< + * from apache_beam.io.iobase import RestrictionProgress + * return RestrictionProgress(completed=completed, remaining=remaining) +*/ + __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_window_index, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":1370 + * completed = window_index * progress.total_work + progress.completed_work + * remaining = ( + * stop_window_index - # <<<<<<<<<<<<<< + * (window_index + 1)) * progress.total_work + progress.remaining_work + * from apache_beam.io.iobase import RestrictionProgress +*/ + __pyx_t_1 = PyNumber_Subtract(__pyx_v_stop_window_index, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1371 + * remaining = ( + * stop_window_index - + * (window_index + 1)) * progress.total_work + progress.remaining_work # <<<<<<<<<<<<<< + * from apache_beam.io.iobase import RestrictionProgress + * return RestrictionProgress(completed=completed, remaining=remaining) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_total_work); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_remaining = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1372 + * stop_window_index - + * (window_index + 1)) * progress.total_work + progress.remaining_work + * from apache_beam.io.iobase import RestrictionProgress # <<<<<<<<<<<<<< + * return RestrictionProgress(completed=completed, remaining=remaining) + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_4 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_io_iobase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error) + } + __pyx_t_1 = __pyx_t_4; + __Pyx_GOTREF(__pyx_t_1); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_5 = 0; { + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_5]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + switch (__pyx_t_5) { + case 0: + __Pyx_INCREF(__pyx_t_3); + __pyx_v_RestrictionProgress = __pyx_t_3; + break; + default:; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1373 + * (window_index + 1)) * progress.total_work + progress.remaining_work + * from apache_beam.io.iobase import RestrictionProgress + * return RestrictionProgress(completed=completed, remaining=remaining) # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_RestrictionProgress); + __pyx_t_2 = __pyx_v_RestrictionProgress; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, NULL}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_completed, __pyx_v_completed, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1373, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_remaining, __pyx_v_remaining, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1364 + * return (residuals, primaries) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _scale_progress(progress, window_index, stop_window_index): + * # We scale progress based upon the amount of work we will do for one +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker._scale_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_completed); + __Pyx_XDECREF(__pyx_v_remaining); + __Pyx_XDECREF(__pyx_v_RestrictionProgress); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1375 + * return RestrictionProgress(completed=completed, remaining=remaining) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_18current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_18current_element_progress(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self) { + PyObject *__pyx_v_current_window_index = NULL; + PyObject *__pyx_v_stop_window_index = NULL; + PyObject *__pyx_v_threadsafe_restriction_tracker = NULL; + PyObject *__pyx_v_progress = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/common.py":1377 + * def current_element_progress(self): + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = (!__pyx_v_self->is_splittable); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1378 + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: + * return None # <<<<<<<<<<<<<< + * + * with self.splitting_lock: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1377 + * def current_element_progress(self): + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "apache_beam/runners/common.py":1380 + * return None + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * current_window_index = self.current_window_index + * stop_window_index = self.stop_window_index +*/ + /*with:*/ { + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->splitting_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + (void)__pyx_t_7; (void)__pyx_t_8; (void)__pyx_t_9; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/common.py":1381 + * + * with self.splitting_lock: + * current_window_index = self.current_window_index # <<<<<<<<<<<<<< + * stop_window_index = self.stop_window_index + * threadsafe_restriction_tracker = self.threadsafe_restriction_tracker +*/ + __pyx_t_3 = __pyx_v_self->current_window_index; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_current_window_index = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1382 + * with self.splitting_lock: + * current_window_index = self.current_window_index + * stop_window_index = self.stop_window_index # <<<<<<<<<<<<<< + * threadsafe_restriction_tracker = self.threadsafe_restriction_tracker + * +*/ + __pyx_t_3 = __pyx_v_self->stop_window_index; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_stop_window_index = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1383 + * current_window_index = self.current_window_index + * stop_window_index = self.stop_window_index + * threadsafe_restriction_tracker = self.threadsafe_restriction_tracker # <<<<<<<<<<<<<< + * + * if not threadsafe_restriction_tracker: +*/ + __pyx_t_3 = __pyx_v_self->threadsafe_restriction_tracker; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_threadsafe_restriction_tracker = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1380 + * return None + * + * with self.splitting_lock: # <<<<<<<<<<<<<< + * current_window_index = self.current_window_index + * stop_window_index = self.stop_window_index +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L7; + } + __pyx_L7:; + } + goto __pyx_L14; + __pyx_L4_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L14:; + } + + /* "apache_beam/runners/common.py":1385 + * threadsafe_restriction_tracker = self.threadsafe_restriction_tracker + * + * if not threadsafe_restriction_tracker: # <<<<<<<<<<<<<< + * return None + * +*/ + if (unlikely(!__pyx_v_threadsafe_restriction_tracker)) { __Pyx_RaiseUnboundLocalError("threadsafe_restriction_tracker"); __PYX_ERR(0, 1385, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_threadsafe_restriction_tracker); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_10 = (!__pyx_t_1); + if (__pyx_t_10) { + + /* "apache_beam/runners/common.py":1386 + * + * if not threadsafe_restriction_tracker: + * return None # <<<<<<<<<<<<<< + * + * progress = threadsafe_restriction_tracker.current_progress() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1385 + * threadsafe_restriction_tracker = self.threadsafe_restriction_tracker + * + * if not threadsafe_restriction_tracker: # <<<<<<<<<<<<<< + * return None + * +*/ + } + + /* "apache_beam/runners/common.py":1388 + * return None + * + * progress = threadsafe_restriction_tracker.current_progress() # <<<<<<<<<<<<<< + * if not current_window_index or not progress: + * return progress +*/ + if (unlikely(!__pyx_v_threadsafe_restriction_tracker)) { __Pyx_RaiseUnboundLocalError("threadsafe_restriction_tracker"); __PYX_ERR(0, 1388, __pyx_L1_error) } + __pyx_t_5 = __pyx_v_threadsafe_restriction_tracker; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_progress, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_progress = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1389 + * + * progress = threadsafe_restriction_tracker.current_progress() + * if not current_window_index or not progress: # <<<<<<<<<<<<<< + * return progress + * +*/ + if (unlikely(!__pyx_v_current_window_index)) { __Pyx_RaiseUnboundLocalError("current_window_index"); __PYX_ERR(0, 1389, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_window_index); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_11 = (!__pyx_t_1); + if (!__pyx_t_11) { + } else { + __pyx_t_10 = __pyx_t_11; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_progress); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_1 = (!__pyx_t_11); + __pyx_t_10 = __pyx_t_1; + __pyx_L17_bool_binop_done:; + if (__pyx_t_10) { + + /* "apache_beam/runners/common.py":1390 + * progress = threadsafe_restriction_tracker.current_progress() + * if not current_window_index or not progress: + * return progress # <<<<<<<<<<<<<< + * + * # stop_window_index should always be set if current_window_index is set, +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_progress); + __pyx_r = __pyx_v_progress; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1389 + * + * progress = threadsafe_restriction_tracker.current_progress() + * if not current_window_index or not progress: # <<<<<<<<<<<<<< + * return progress + * +*/ + } + + /* "apache_beam/runners/common.py":1394 + * # stop_window_index should always be set if current_window_index is set, + * # it is an error otherwise. + * assert stop_window_index # <<<<<<<<<<<<<< + * return PerWindowInvoker._scale_progress( + * progress, current_window_index, stop_window_index) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + if (unlikely(!__pyx_v_stop_window_index)) { __Pyx_RaiseUnboundLocalError("stop_window_index"); __PYX_ERR(0, 1394, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_stop_window_index); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1394, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1394, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1394, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1395 + * # it is an error otherwise. + * assert stop_window_index + * return PerWindowInvoker._scale_progress( # <<<<<<<<<<<<<< + * progress, current_window_index, stop_window_index) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":1396 + * assert stop_window_index + * return PerWindowInvoker._scale_progress( + * progress, current_window_index, stop_window_index) # <<<<<<<<<<<<<< + * + * +*/ + if (unlikely(!__pyx_v_current_window_index)) { __Pyx_RaiseUnboundLocalError("current_window_index"); __PYX_ERR(0, 1396, __pyx_L1_error) } + if (unlikely(!__pyx_v_stop_window_index)) { __Pyx_RaiseUnboundLocalError("stop_window_index"); __PYX_ERR(0, 1396, __pyx_L1_error) } + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_progress, __pyx_v_current_window_index, __pyx_v_stop_window_index}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scale_progress, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1375 + * return RestrictionProgress(completed=completed, remaining=remaining) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_current_window_index); + __Pyx_XDECREF(__pyx_v_stop_window_index); + __Pyx_XDECREF(__pyx_v_threadsafe_restriction_tracker); + __Pyx_XDECREF(__pyx_v_progress); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_20__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_20__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.context, self.current_window_index, self.current_windowed_value, self.has_cached_window_args, self.has_cached_window_batch_args, self.has_windowed_inputs, self.is_key_param_required, self.is_splittable, self.kwargs_for_process, self.kwargs_for_process_batch, self.output_handler, self.placeholders_for_process, self.placeholders_for_process_batch, self.process_batch_method, self.process_method, self.recalculate_window_args, self.restriction, self.side_inputs, self.signature, self.splitting_lock, self.stop_window_index, self.threadsafe_restriction_tracker, self.threadsafe_watermark_estimator, self.user_state_context, self.watermark_estimator_state) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_cached_window_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->has_cached_window_batch_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->has_windowed_inputs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->is_key_param_required); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->is_splittable); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->recalculate_window_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(30); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_self->__pyx_base._bundle_context_values); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._bundle_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self->__pyx_base._bundle_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._setup_context_values); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._setup_context_values); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_self->__pyx_base._setup_context_values) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->args_for_process); + __Pyx_GIVEREF(__pyx_v_self->args_for_process); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->args_for_process) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->args_for_process_batch); + __Pyx_GIVEREF(__pyx_v_self->args_for_process_batch); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_self->args_for_process_batch) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.bundle_finalizer_param); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_self->__pyx_base.bundle_finalizer_param) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->context); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_v_self->context)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->current_window_index); + __Pyx_GIVEREF(__pyx_v_self->current_window_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_v_self->current_window_index) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->current_windowed_value); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->current_windowed_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 7, ((PyObject *)__pyx_v_self->current_windowed_value)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 9, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 10, __pyx_t_3) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 11, __pyx_t_4) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 12, __pyx_t_5) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->kwargs_for_process); + __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 13, __pyx_v_self->kwargs_for_process) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->kwargs_for_process_batch); + __Pyx_GIVEREF(__pyx_v_self->kwargs_for_process_batch); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 14, __pyx_v_self->kwargs_for_process_batch) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.output_handler); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.output_handler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 15, ((PyObject *)__pyx_v_self->__pyx_base.output_handler)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->placeholders_for_process); + __Pyx_GIVEREF(__pyx_v_self->placeholders_for_process); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 16, __pyx_v_self->placeholders_for_process) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->placeholders_for_process_batch); + __Pyx_GIVEREF(__pyx_v_self->placeholders_for_process_batch); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 17, __pyx_v_self->placeholders_for_process_batch) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->process_batch_method); + __Pyx_GIVEREF(__pyx_v_self->process_batch_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 18, __pyx_v_self->process_batch_method) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->process_method); + __Pyx_GIVEREF(__pyx_v_self->process_method); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 19, __pyx_v_self->process_method) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 20, __pyx_t_6) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->restriction); + __Pyx_GIVEREF(__pyx_v_self->restriction); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 21, __pyx_v_self->restriction) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->side_inputs); + __Pyx_GIVEREF(__pyx_v_self->side_inputs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 22, __pyx_v_self->side_inputs) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.signature); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.signature); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 23, ((PyObject *)__pyx_v_self->__pyx_base.signature)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->splitting_lock); + __Pyx_GIVEREF(__pyx_v_self->splitting_lock); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 24, __pyx_v_self->splitting_lock) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->stop_window_index); + __Pyx_GIVEREF(__pyx_v_self->stop_window_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 25, __pyx_v_self->stop_window_index) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->threadsafe_restriction_tracker); + __Pyx_GIVEREF(__pyx_v_self->threadsafe_restriction_tracker); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 26, __pyx_v_self->threadsafe_restriction_tracker) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->threadsafe_watermark_estimator); + __Pyx_GIVEREF(__pyx_v_self->threadsafe_watermark_estimator); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 27, __pyx_v_self->threadsafe_watermark_estimator) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 28, __pyx_v_self->__pyx_base.user_state_context) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->watermark_estimator_state); + __Pyx_GIVEREF(__pyx_v_self->watermark_estimator_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 29, __pyx_v_self->watermark_estimator_state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._bundle_context_values, self._setup_context_values, self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.context, self.current_window_index, self.current_windowed_value, self.has_cached_window_args, self.has_cached_window_batch_args, self.has_windowed_inputs, self.is_key_param_required, self.is_splittable, self.kwargs_for_process, self.kwargs_for_process_batch, self.output_handler, self.placeholders_for_process, self.placeholders_for_process_batch, self.process_batch_method, self.process_method, self.recalculate_window_args, self.restriction, self.side_inputs, self.signature, self.splitting_lock, self.stop_window_index, self.threadsafe_restriction_tracker, self.threadsafe_watermark_estimator, self.user_state_context, self.watermark_estimator_state) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_7 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v__dict = __pyx_t_7; + __pyx_t_7 = 0; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.context, self.current_window_index, self.current_windowed_value, self.has_cached_window_args, self.has_cached_window_batch_args, self.has_windowed_inputs, self.is_key_param_required, self.is_splittable, self.kwargs_for_process, self.kwargs_for_process_batch, self.output_handler, self.placeholders_for_process, self.placeholders_for_process_batch, self.process_batch_method, self.process_method, self.recalculate_window_args, self.restriction, self.side_inputs, self.signature, self.splitting_lock, self.stop_window_index, self.threadsafe_restriction_tracker, self.threadsafe_watermark_estimator, self.user_state_context, self.watermark_estimator_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_9 = (__pyx_v__dict != Py_None); + if (__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_8 = __pyx_t_9; + __pyx_L4_bool_binop_done:; + if (__pyx_t_8) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.args_for_process is not None or self.args_for_process_batch is not None or self.bundle_finalizer_param is not None or self.context is not None or self.current_window_index is not None or self.current_windowed_value is not None or self.kwargs_for_process is not None or self.kwargs_for_process_batch is not None or self.output_handler is not None or self.placeholders_for_process is not None or self.placeholders_for_process_batch is not None or self.process_batch_method is not None or self.process_method is not None or self.restriction is not None or self.side_inputs is not None or self.signature is not None or self.splitting_lock is not None or self.stop_window_index is not None or self.threadsafe_restriction_tracker is not None or self.threadsafe_watermark_estimator is not None or self.user_state_context is not None or self.watermark_estimator_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._bundle_context_values, self._setup_context_values, self.args_for_process, self.args_for_process_batch, self.bundle_finalizer_param, self.context, self.current_window_index, self.current_windowed_value, self.has_cached_window_args, self.has_cached_window_batch_args, self.has_windowed_inputs, self.is_key_param_required, self.is_splittable, self.kwargs_for_process, self.kwargs_for_process_batch, self.output_handler, self.placeholders_for_process, self.placeholders_for_process_batch, self.process_batch_method, self.process_method, self.recalculate_window_args, self.restriction, self.side_inputs, self.signature, self.splitting_lock, self.stop_window_index, self.threadsafe_restriction_tracker, self.threadsafe_watermark_estimator, self.user_state_context, self.watermark_estimator_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.args_for_process is not None or self.args_for_process_batch is not None or self.bundle_finalizer_param is not None or self.context is not None or self.current_window_index is not None or self.current_windowed_value is not None or self.kwargs_for_process is not None or self.kwargs_for_process_batch is not None or self.output_handler is not None or self.placeholders_for_process is not None or self.placeholders_for_process_batch is not None or self.process_batch_method is not None or self.process_method is not None or self.restriction is not None or self.side_inputs is not None or self.signature is not None or self.splitting_lock is not None or self.stop_window_index is not None or self.threadsafe_restriction_tracker is not None or self.threadsafe_watermark_estimator is not None or self.user_state_context is not None or self.watermark_estimator_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, None), state +*/ + /*else*/ { + __pyx_t_9 = (__pyx_v_self->__pyx_base._bundle_context_values != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->__pyx_base._setup_context_values != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->args_for_process != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->args_for_process_batch != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->__pyx_base.bundle_finalizer_param != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (((PyObject *)__pyx_v_self->context) != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->current_window_index != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (((PyObject *)__pyx_v_self->current_windowed_value) != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->kwargs_for_process != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->kwargs_for_process_batch != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (((PyObject *)__pyx_v_self->__pyx_base.output_handler) != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->placeholders_for_process != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->placeholders_for_process_batch != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->process_batch_method != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->process_method != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->restriction != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->side_inputs != ((PyObject*)Py_None)); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (((PyObject *)__pyx_v_self->__pyx_base.signature) != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->splitting_lock != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->stop_window_index != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->threadsafe_restriction_tracker != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->threadsafe_watermark_estimator != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + if (!__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_9 = (__pyx_v_self->watermark_estimator_state != Py_None); + __pyx_t_8 = __pyx_t_9; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_8; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.args_for_process is not None or self.args_for_process_batch is not None or self.bundle_finalizer_param is not None or self.context is not None or self.current_window_index is not None or self.current_windowed_value is not None or self.kwargs_for_process is not None or self.kwargs_for_process_batch is not None or self.output_handler is not None or self.placeholders_for_process is not None or self.placeholders_for_process_batch is not None or self.process_batch_method is not None or self.process_method is not None or self.restriction is not None or self.side_inputs is not None or self.signature is not None or self.splitting_lock is not None or self.stop_window_index is not None or self.threadsafe_restriction_tracker is not None or self.threadsafe_watermark_estimator is not None or self.user_state_context is not None or self.watermark_estimator_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.args_for_process is not None or self.args_for_process_batch is not None or self.bundle_finalizer_param is not None or self.context is not None or self.current_window_index is not None or self.current_windowed_value is not None or self.kwargs_for_process is not None or self.kwargs_for_process_batch is not None or self.output_handler is not None or self.placeholders_for_process is not None or self.placeholders_for_process_batch is not None or self.process_batch_method is not None or self.process_method is not None or self.restriction is not None or self.side_inputs is not None or self.signature is not None or self.splitting_lock is not None or self.stop_window_index is not None or self.threadsafe_restriction_tracker is not None or self.threadsafe_watermark_estimator is not None or self.user_state_context is not None or self.watermark_estimator_state is not None + * if use_setstate: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PerWindowInvoker); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_122683391); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_122683391); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_mstate_global->__pyx_int_122683391) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._bundle_context_values is not None or self._setup_context_values is not None or self.args_for_process is not None or self.args_for_process_batch is not None or self.bundle_finalizer_param is not None or self.context is not None or self.current_window_index is not None or self.current_windowed_value is not None or self.kwargs_for_process is not None or self.kwargs_for_process_batch is not None or self.output_handler is not None or self.placeholders_for_process is not None or self.placeholders_for_process_batch is not None or self.process_batch_method is not None or self.process_method is not None or self.restriction is not None or self.side_inputs is not None or self.signature is not None or self.splitting_lock is not None or self.stop_window_index is not None or self.threadsafe_restriction_tracker is not None or self.threadsafe_watermark_estimator is not None or self.user_state_context is not None or self.watermark_estimator_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, None), state + * else: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PerWindowInvoker); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_122683391); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_122683391); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_mstate_global->__pyx_int_122683391) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_22__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16PerWindowInvoker_22__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_PerWindowInvoker__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.PerWindowInvoker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1404 + * A helper class for executing ParDo operations. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * fn, # type: core.DoFn +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_10DoFnRunner___init__, "Initializes a DoFnRunner.\n\n Args:\n fn: user DoFn to invoke\n args: positional side input arguments (static and placeholder), if any\n kwargs: keyword side input arguments (static and placeholder), if any\n side_inputs: list of sideinput.SideInputMaps for deferred side inputs\n windowing: windowing properties of the output PCollection(s)\n tagged_receivers: a dict of tag name to Receiver objects\n step_name: the name of this step\n logging_context: DEPRECATED [BEAM-4728]\n state: handle for accessing DoFn state\n scoped_metrics_container: DEPRECATED\n operation_name: The system name assigned by the runner for this operation.\n transform_id: The PTransform Id in the pipeline proto for this DoFn.\n user_state_context: The UserStateContext instance for the current\n Stateful DoFn.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6common_10DoFnRunner___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_fn = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_v_side_inputs = 0; + PyObject *__pyx_v_windowing = 0; + PyObject *__pyx_v_tagged_receivers = 0; + PyObject *__pyx_v_step_name = 0; + CYTHON_UNUSED PyObject *__pyx_v_logging_context = 0; + PyObject *__pyx_v_state = 0; + CYTHON_UNUSED PyObject *__pyx_v_scoped_metrics_container = 0; + PyObject *__pyx_v_operation_name = 0; + PyObject *__pyx_v_transform_id = 0; + PyObject *__pyx_v_user_state_context = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fn,&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_kwargs,&__pyx_mstate_global->__pyx_n_u_side_inputs,&__pyx_mstate_global->__pyx_n_u_windowing,&__pyx_mstate_global->__pyx_n_u_tagged_receivers,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_logging_context,&__pyx_mstate_global->__pyx_n_u_state,&__pyx_mstate_global->__pyx_n_u_scoped_metrics_container,&__pyx_mstate_global->__pyx_n_u_operation_name,&__pyx_mstate_global->__pyx_n_u_transform_id,&__pyx_mstate_global->__pyx_n_u_user_state_context,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1404, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 13: + values[12] = __Pyx_ArgRef_VARARGS(__pyx_args, 12); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 12: + values[11] = __Pyx_ArgRef_VARARGS(__pyx_args, 11); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 11: + values[10] = __Pyx_ArgRef_VARARGS(__pyx_args, 10); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 10: + values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 9: + values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1404, __pyx_L3_error) + + /* "apache_beam/runners/common.py":1412 + * windowing, + * tagged_receivers, # type: Mapping[Optional[str], Receiver] + * step_name=None, # type: Optional[str] # <<<<<<<<<<<<<< + * logging_context=None, + * state=None, +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1413 + * tagged_receivers, # type: Mapping[Optional[str], Receiver] + * step_name=None, # type: Optional[str] + * logging_context=None, # <<<<<<<<<<<<<< + * state=None, + * scoped_metrics_container=None, +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1414 + * step_name=None, # type: Optional[str] + * logging_context=None, + * state=None, # <<<<<<<<<<<<<< + * scoped_metrics_container=None, + * operation_name=None, +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1415 + * logging_context=None, + * state=None, + * scoped_metrics_container=None, # <<<<<<<<<<<<<< + * operation_name=None, + * transform_id=None, +*/ + if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1416 + * state=None, + * scoped_metrics_container=None, + * operation_name=None, # <<<<<<<<<<<<<< + * transform_id=None, + * user_state_context=None, # type: Optional[userstate.UserStateContext] +*/ + if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1417 + * scoped_metrics_container=None, + * operation_name=None, + * transform_id=None, # <<<<<<<<<<<<<< + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * ): +*/ + if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1418 + * operation_name=None, + * transform_id=None, + * user_state_context=None, # type: Optional[userstate.UserStateContext] # <<<<<<<<<<<<<< + * ): + * """Initializes a DoFnRunner. +*/ + if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, i); __PYX_ERR(0, 1404, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 13: + values[12] = __Pyx_ArgRef_VARARGS(__pyx_args, 12); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 12: + values[11] = __Pyx_ArgRef_VARARGS(__pyx_args, 11); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 11: + values[10] = __Pyx_ArgRef_VARARGS(__pyx_args, 10); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 10: + values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 9: + values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1404, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1404, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1404, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1404, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1404, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1404, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1404, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/common.py":1412 + * windowing, + * tagged_receivers, # type: Mapping[Optional[str], Receiver] + * step_name=None, # type: Optional[str] # <<<<<<<<<<<<<< + * logging_context=None, + * state=None, +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1413 + * tagged_receivers, # type: Mapping[Optional[str], Receiver] + * step_name=None, # type: Optional[str] + * logging_context=None, # <<<<<<<<<<<<<< + * state=None, + * scoped_metrics_container=None, +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1414 + * step_name=None, # type: Optional[str] + * logging_context=None, + * state=None, # <<<<<<<<<<<<<< + * scoped_metrics_container=None, + * operation_name=None, +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1415 + * logging_context=None, + * state=None, + * scoped_metrics_container=None, # <<<<<<<<<<<<<< + * operation_name=None, + * transform_id=None, +*/ + if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1416 + * state=None, + * scoped_metrics_container=None, + * operation_name=None, # <<<<<<<<<<<<<< + * transform_id=None, + * user_state_context=None, # type: Optional[userstate.UserStateContext] +*/ + if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1417 + * scoped_metrics_container=None, + * operation_name=None, + * transform_id=None, # <<<<<<<<<<<<<< + * user_state_context=None, # type: Optional[userstate.UserStateContext] + * ): +*/ + if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/common.py":1418 + * operation_name=None, + * transform_id=None, + * user_state_context=None, # type: Optional[userstate.UserStateContext] # <<<<<<<<<<<<<< + * ): + * """Initializes a DoFnRunner. +*/ + if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_fn = values[0]; + __pyx_v_args = values[1]; + __pyx_v_kwargs = values[2]; + __pyx_v_side_inputs = values[3]; + __pyx_v_windowing = values[4]; + __pyx_v_tagged_receivers = values[5]; + __pyx_v_step_name = values[6]; + __pyx_v_logging_context = values[7]; + __pyx_v_state = values[8]; + __pyx_v_scoped_metrics_container = values[9]; + __pyx_v_operation_name = values[10]; + __pyx_v_transform_id = values[11]; + __pyx_v_user_state_context = values[12]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 13, __pyx_nargs); __PYX_ERR(0, 1404, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner___init__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs, __pyx_v_side_inputs, __pyx_v_windowing, __pyx_v_tagged_receivers, __pyx_v_step_name, __pyx_v_logging_context, __pyx_v_state, __pyx_v_scoped_metrics_container, __pyx_v_operation_name, __pyx_v_transform_id, __pyx_v_user_state_context); + + /* "apache_beam/runners/common.py":1404 + * A helper class for executing ParDo operations. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * fn, # type: core.DoFn +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_side_inputs, PyObject *__pyx_v_windowing, PyObject *__pyx_v_tagged_receivers, PyObject *__pyx_v_step_name, CYTHON_UNUSED PyObject *__pyx_v_logging_context, PyObject *__pyx_v_state, CYTHON_UNUSED PyObject *__pyx_v_scoped_metrics_container, PyObject *__pyx_v_operation_name, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_user_state_context) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v_do_fn_signature = NULL; + PyObject *__pyx_v_main_receivers = NULL; + PyObject *__pyx_v_output_counter_name = NULL; + PyObject *__pyx_v_per_element_output_counter = NULL; + struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_output_handler = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_INCREF(__pyx_v_side_inputs); + + /* "apache_beam/runners/common.py":1439 + * """ + * # Need to support multiple iterations. + * side_inputs = list(side_inputs) # <<<<<<<<<<<<<< + * + * self.step_name = step_name +*/ + __pyx_t_1 = PySequence_List(__pyx_v_side_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_side_inputs, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1441 + * side_inputs = list(side_inputs) + * + * self.step_name = step_name # <<<<<<<<<<<<<< + * self.transform_id = transform_id + * self.context = DoFnContext(step_name, state=state) +*/ + __Pyx_INCREF(__pyx_v_step_name); + __Pyx_GIVEREF(__pyx_v_step_name); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = __pyx_v_step_name; + + /* "apache_beam/runners/common.py":1442 + * + * self.step_name = step_name + * self.transform_id = transform_id # <<<<<<<<<<<<<< + * self.context = DoFnContext(step_name, state=state) + * self.bundle_finalizer_param = DoFn.BundleFinalizerParam() +*/ + __pyx_t_1 = __pyx_v_transform_id; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1442, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->transform_id); + __Pyx_DECREF(__pyx_v_self->transform_id); + __pyx_v_self->transform_id = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1443 + * self.step_name = step_name + * self.transform_id = transform_id + * self.context = DoFnContext(step_name, state=state) # <<<<<<<<<<<<<< + * self.bundle_finalizer_param = DoFn.BundleFinalizerParam() + * self.execution_context = None # type: Optional[ExecutionContext] +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_step_name}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_state, __pyx_v_state, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->context); + __Pyx_DECREF((PyObject *)__pyx_v_self->context); + __pyx_v_self->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1444 + * self.transform_id = transform_id + * self.context = DoFnContext(step_name, state=state) + * self.bundle_finalizer_param = DoFn.BundleFinalizerParam() # <<<<<<<<<<<<<< + * self.execution_context = None # type: Optional[ExecutionContext] + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BundleFinalizerParam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1445 + * self.context = DoFnContext(step_name, state=state) + * self.bundle_finalizer_param = DoFn.BundleFinalizerParam() + * self.execution_context = None # type: Optional[ExecutionContext] # <<<<<<<<<<<<<< + * + * do_fn_signature = DoFnSignature(fn) +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = Py_None; + + /* "apache_beam/runners/common.py":1447 + * self.execution_context = None # type: Optional[ExecutionContext] + * + * do_fn_signature = DoFnSignature(fn) # <<<<<<<<<<<<<< + * + * # Optimize for the common case. +*/ + __pyx_t_5 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_fn}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_do_fn_signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1450 + * + * # Optimize for the common case. + * main_receivers = tagged_receivers[None] # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/18886): Remove if block after +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_tagged_receivers, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_main_receivers = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1454 + * # TODO(https://github.com/apache/beam/issues/18886): Remove if block after + * # output counter released. + * if 'outputs_per_element_counter' in RuntimeValueProvider.experiments: # <<<<<<<<<<<<<< + * # TODO(BEAM-3955): Make step_name and operation_name less confused. + * output_counter_name = ( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RuntimeValueProvider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_experiments); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_n_u_outputs_per_element_counter, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1457 + * # TODO(BEAM-3955): Make step_name and operation_name less confused. + * output_counter_name = ( + * CounterName('per-element-output-count', step_name=operation_name)) # <<<<<<<<<<<<<< + * per_element_output_counter = state._counter_factory.get_counter( + * output_counter_name, Counter.DATAFLOW_DISTRIBUTION).accumulator +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_per_element_output_count}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_step_name, __pyx_v_operation_name, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_output_counter_name = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1458 + * output_counter_name = ( + * CounterName('per-element-output-count', step_name=operation_name)) + * per_element_output_counter = state._counter_factory.get_counter( # <<<<<<<<<<<<<< + * output_counter_name, Counter.DATAFLOW_DISTRIBUTION).accumulator + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_mstate_global->__pyx_n_u_counter_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":1459 + * CounterName('per-element-output-count', step_name=operation_name)) + * per_element_output_counter = state._counter_factory.get_counter( + * output_counter_name, Counter.DATAFLOW_DISTRIBUTION).accumulator # <<<<<<<<<<<<<< + * else: + * per_element_output_counter = None +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DATAFLOW_DISTRIBUTION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_output_counter_name, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_counter, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_accumulator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_per_element_output_counter = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1454 + * # TODO(https://github.com/apache/beam/issues/18886): Remove if block after + * # output counter released. + * if 'outputs_per_element_counter' in RuntimeValueProvider.experiments: # <<<<<<<<<<<<<< + * # TODO(BEAM-3955): Make step_name and operation_name less confused. + * output_counter_name = ( +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":1461 + * output_counter_name, Counter.DATAFLOW_DISTRIBUTION).accumulator + * else: + * per_element_output_counter = None # <<<<<<<<<<<<<< + * + * output_handler = _OutputHandler( +*/ + /*else*/ { + __Pyx_INCREF(Py_None); + __pyx_v_per_element_output_counter = Py_None; + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":1463 + * per_element_output_counter = None + * + * output_handler = _OutputHandler( # <<<<<<<<<<<<<< + * windowing.windowfn, + * main_receivers, +*/ + __pyx_t_5 = NULL; + + /* "apache_beam/runners/common.py":1464 + * + * output_handler = _OutputHandler( + * windowing.windowfn, # <<<<<<<<<<<<<< + * main_receivers, + * tagged_receivers, +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_mstate_global->__pyx_n_u_windowfn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/runners/common.py":1468 + * tagged_receivers, + * per_element_output_counter, + * getattr(fn, 'output_batch_converter', None), # <<<<<<<<<<<<<< + * getattr( + * do_fn_signature.process_method.method_value, +*/ + __pyx_t_4 = __Pyx_GetAttr3(__pyx_v_fn, __pyx_mstate_global->__pyx_n_u_output_batch_converter, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/common.py":1470 + * getattr(fn, 'output_batch_converter', None), + * getattr( + * do_fn_signature.process_method.method_value, # <<<<<<<<<<<<<< + * '_beam_yields_batches', + * False), +*/ + __pyx_t_1 = __pyx_v_do_fn_signature->process_method->method_value; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":1469 + * per_element_output_counter, + * getattr(fn, 'output_batch_converter', None), + * getattr( # <<<<<<<<<<<<<< + * do_fn_signature.process_method.method_value, + * '_beam_yields_batches', +*/ + __pyx_t_8 = __Pyx_GetAttr3(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_beam_yields_batches, Py_False); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1474 + * False), + * getattr( + * do_fn_signature.process_batch_method.method_value, # <<<<<<<<<<<<<< + * '_beam_yields_elements', + * False), +*/ + __pyx_t_1 = __pyx_v_do_fn_signature->process_batch_method->method_value; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/common.py":1473 + * '_beam_yields_batches', + * False), + * getattr( # <<<<<<<<<<<<<< + * do_fn_signature.process_batch_method.method_value, + * '_beam_yields_elements', +*/ + __pyx_t_9 = __Pyx_GetAttr3(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_beam_yields_elements, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[8] = {__pyx_t_5, __pyx_t_7, __pyx_v_main_receivers, __pyx_v_tagged_receivers, __pyx_v_per_element_output_counter, __pyx_t_4, __pyx_t_8, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_callargs+__pyx_t_3, (8-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1463, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_v_output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1479 + * ) + * + * if do_fn_signature.is_stateful_dofn() and not user_state_context: # <<<<<<<<<<<<<< + * raise Exception( + * 'Requested execution of a stateful DoFn, but no user state context ' +*/ + __pyx_t_9 = ((PyObject *)__pyx_v_do_fn_signature); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_stateful_dofn, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1479, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_10) { + } else { + __pyx_t_6 = __pyx_t_10; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_user_state_context); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_t_11 = (!__pyx_t_10); + __pyx_t_6 = __pyx_t_11; + __pyx_L5_bool_binop_done:; + if (unlikely(__pyx_t_6)) { + + /* "apache_beam/runners/common.py":1480 + * + * if do_fn_signature.is_stateful_dofn() and not user_state_context: + * raise Exception( # <<<<<<<<<<<<<< + * 'Requested execution of a stateful DoFn, but no user state context ' + * 'is available. This likely means that the current runner does not ' +*/ + __pyx_t_9 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Requested_execution_of_a_statefu}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1480, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1479 + * ) + * + * if do_fn_signature.is_stateful_dofn() and not user_state_context: # <<<<<<<<<<<<<< + * raise Exception( + * 'Requested execution of a stateful DoFn, but no user state context ' +*/ + } + + /* "apache_beam/runners/common.py":1485 + * 'support the execution of stateful DoFns.') + * + * self.do_fn_invoker = DoFnInvoker.create_invoker( # <<<<<<<<<<<<<< + * do_fn_signature, + * output_handler, +*/ + __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + __Pyx_INCREF(__pyx_t_9); + + /* "apache_beam/runners/common.py":1493 + * kwargs, + * user_state_context=user_state_context, + * bundle_finalizer_param=self.bundle_finalizer_param) # <<<<<<<<<<<<<< + * + * def process(self, windowed_value): +*/ + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[7 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, ((PyObject *)__pyx_v_do_fn_signature), ((PyObject *)__pyx_v_output_handler), ((PyObject *)__pyx_v_self->context), __pyx_v_side_inputs, __pyx_v_args, __pyx_v_kwargs}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_user_state_context, __pyx_v_user_state_context, __pyx_t_8, __pyx_callargs+7, 0) < (0)) __PYX_ERR(0, 1485, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_bundle_finalizer_param, __pyx_v_self->bundle_finalizer_param, __pyx_t_8, __pyx_callargs+7, 1) < (0)) __PYX_ERR(0, 1485, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_create_invoker, __pyx_callargs+__pyx_t_3, (7-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/common.py":1485 + * 'support the execution of stateful DoFns.') + * + * self.do_fn_invoker = DoFnInvoker.create_invoker( # <<<<<<<<<<<<<< + * do_fn_signature, + * output_handler, +*/ + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker))))) __PYX_ERR(0, 1485, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_DECREF((PyObject *)__pyx_v_self->do_fn_invoker); + __pyx_v_self->do_fn_invoker = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1404 + * A helper class for executing ParDo operations. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * fn, # type: core.DoFn +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_do_fn_signature); + __Pyx_XDECREF(__pyx_v_main_receivers); + __Pyx_XDECREF(__pyx_v_output_counter_name); + __Pyx_XDECREF(__pyx_v_per_element_output_counter); + __Pyx_XDECREF((PyObject *)__pyx_v_output_handler); + __Pyx_XDECREF(__pyx_v_side_inputs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1495 + * bundle_finalizer_param=self.bundle_finalizer_param) + * + * def process(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_10DoFnRunner_process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + char const *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1497 + * def process(self, windowed_value): + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: # <<<<<<<<<<<<<< + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/common.py":1498 + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: + * return self.do_fn_invoker.invoke_process(windowed_value) # <<<<<<<<<<<<<< + * except BaseException as exn: + * self._reraise_augmented(exn, windowed_value) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self->do_fn_invoker->__pyx_vtab)->invoke_process(__pyx_v_self->do_fn_invoker, __pyx_v_windowed_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L7_try_return; + + /* "apache_beam/runners/common.py":1497 + * def process(self, windowed_value): + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: # <<<<<<<<<<<<<< + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: +*/ + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1499 + * try: + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn, windowed_value) + * return [] +*/ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); + if (__pyx_t_9) { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 1499, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_exn = __pyx_t_2; + /*try:*/ { + + /* "apache_beam/runners/common.py":1500 + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: + * self._reraise_augmented(exn, windowed_value) # <<<<<<<<<<<<<< + * return [] + * +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_exn, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1501 + * except BaseException as exn: + * self._reraise_augmented(exn, windowed_value) + * return [] # <<<<<<<<<<<<<< + * + * def _maybe_sample_exception( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L13_return; + } + + /* "apache_beam/runners/common.py":1499 + * try: + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn, windowed_value) + * return [] +*/ + /*finally:*/ { + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; + goto __pyx_L5_except_error; + } + __pyx_L13_return: { + __pyx_t_18 = __pyx_r; + __pyx_r = 0; + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + __pyx_r = __pyx_t_18; + __pyx_t_18 = 0; + goto __pyx_L6_except_return; + } + } + } + goto __pyx_L5_except_error; + + /* "apache_beam/runners/common.py":1497 + * def process(self, windowed_value): + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: # <<<<<<<<<<<<<< + * return self.do_fn_invoker.invoke_process(windowed_value) + * except BaseException as exn: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L7_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L0; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1495 + * bundle_finalizer_param=self.bundle_finalizer_param) + * + * def process(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_3process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1495, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1495, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1495, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 1495, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1495, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1495, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_2process(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_2process(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_10DoFnRunner_process(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1503 + * return [] + * + * def _maybe_sample_exception( # <<<<<<<<<<<<<< + * self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None: + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception = {"_maybe_sample_exception", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_exc_info = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_maybe_sample_exception (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exc_info,&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1503, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1503, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1503, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_maybe_sample_exception", 0) < (0)) __PYX_ERR(0, 1503, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_maybe_sample_exception", 1, 2, 2, i); __PYX_ERR(0, 1503, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1503, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1503, __pyx_L3_error) + } + __pyx_v_exc_info = ((PyObject*)values[0]); + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_maybe_sample_exception", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1503, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._maybe_sample_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exc_info), (&PyTuple_Type), 0, "exc_info", 2))) __PYX_ERR(0, 1504, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_4_maybe_sample_exception(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_exc_info, __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_4_maybe_sample_exception(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_exc_info, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_v_output_sampler = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_maybe_sample_exception", 0); + + /* "apache_beam/runners/common.py":1506 + * self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None: + * + * if self.execution_context is None: # <<<<<<<<<<<<<< + * return + * +*/ + __pyx_t_1 = (__pyx_v_self->execution_context == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1507 + * + * if self.execution_context is None: + * return # <<<<<<<<<<<<<< + * + * output_sampler = self.execution_context.output_sampler +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1506 + * self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None: + * + * if self.execution_context is None: # <<<<<<<<<<<<<< + * return + * +*/ + } + + /* "apache_beam/runners/common.py":1509 + * return + * + * output_sampler = self.execution_context.output_sampler # <<<<<<<<<<<<<< + * if output_sampler is None: + * return +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->execution_context, __pyx_mstate_global->__pyx_n_u_output_sampler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_output_sampler = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1510 + * + * output_sampler = self.execution_context.output_sampler + * if output_sampler is None: # <<<<<<<<<<<<<< + * return + * +*/ + __pyx_t_1 = (__pyx_v_output_sampler == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1511 + * output_sampler = self.execution_context.output_sampler + * if output_sampler is None: + * return # <<<<<<<<<<<<<< + * + * output_sampler.sample_exception( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1510 + * + * output_sampler = self.execution_context.output_sampler + * if output_sampler is None: # <<<<<<<<<<<<<< + * return + * +*/ + } + + /* "apache_beam/runners/common.py":1513 + * return + * + * output_sampler.sample_exception( # <<<<<<<<<<<<<< + * windowed_value, + * exc_info, +*/ + __pyx_t_3 = __pyx_v_output_sampler; + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/common.py":1517 + * exc_info, + * self.transform_id, + * self.execution_context.instruction_id) # <<<<<<<<<<<<<< + * + * def process_batch(self, windowed_batch): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->execution_context, __pyx_mstate_global->__pyx_n_u_instruction_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_v_exc_info, __pyx_v_self->transform_id, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sample_exception, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1503 + * return [] + * + * def _maybe_sample_exception( # <<<<<<<<<<<<<< + * self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None: + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._maybe_sample_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_output_sampler); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1519 + * self.execution_context.instruction_id) + * + * def process_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * try: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_7process_batch = {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1519, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1519, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_batch", 0) < (0)) __PYX_ERR(0, 1519, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, i); __PYX_ERR(0, 1519, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1519, __pyx_L3_error) + } + __pyx_v_windowed_batch = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1519, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_6process_batch(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_6process_batch(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_windowed_batch) { + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + char const *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_batch", 0); + + /* "apache_beam/runners/common.py":1521 + * def process_batch(self, windowed_batch): + * # type: (WindowedBatch) -> None + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/runners/common.py":1522 + * # type: (WindowedBatch) -> None + * try: + * self.do_fn_invoker.invoke_process_batch(windowed_batch) # <<<<<<<<<<<<<< + * except BaseException as exn: + * self._reraise_augmented(exn) +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_windowed_batch}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_process_batch, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1522, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1521 + * def process_batch(self, windowed_batch): + * # type: (WindowedBatch) -> None + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1523 + * try: + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); + if (__pyx_t_7) { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1523, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exn = __pyx_t_5; + /*try:*/ { + + /* "apache_beam/runners/common.py":1524 + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: + * self._reraise_augmented(exn) # <<<<<<<<<<<<<< + * + * def process_with_sized_restriction(self, windowed_value): +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exn}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1524, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "apache_beam/runners/common.py":1523 + * try: + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + goto __pyx_L15; + } + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; + goto __pyx_L5_except_error; + } + __pyx_L15:; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + + /* "apache_beam/runners/common.py":1521 + * def process_batch(self, windowed_batch): + * # type: (WindowedBatch) -> None + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_process_batch(windowed_batch) + * except BaseException as exn: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "apache_beam/runners/common.py":1519 + * self.execution_context.instruction_id) + * + * def process_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * try: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1526 + * self._reraise_augmented(exn) + * + * def process_with_sized_restriction(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction = {"process_with_sized_restriction", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_with_sized_restriction (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1526, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1526, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_with_sized_restriction", 0) < (0)) __PYX_ERR(0, 1526, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_with_sized_restriction", 1, 1, 1, i); __PYX_ERR(0, 1526, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1526, __pyx_L3_error) + } + __pyx_v_windowed_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_with_sized_restriction", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1526, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_with_sized_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_8process_with_sized_restriction(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_8process_with_sized_restriction(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_windowed_value) { + PyObject *__pyx_v_element = NULL; + PyObject *__pyx_v_restriction = NULL; + PyObject *__pyx_v_estimator_state = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_with_sized_restriction", 0); + + /* "apache_beam/runners/common.py":1528 + * def process_with_sized_restriction(self, windowed_value): + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value # <<<<<<<<<<<<<< + * return self.do_fn_invoker.invoke_process( + * windowed_value.with_value(element), +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1528, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + } + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); + index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1528, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_6); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_6); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); + index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_6 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __pyx_v_element = __pyx_t_4; + __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1528, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_8); + } else { + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + } + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); + index = 0; __pyx_t_7 = __pyx_t_5(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_8 = __pyx_t_5(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + __pyx_v_restriction = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_v_estimator_state = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v__ = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1529 + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value + * return self.do_fn_invoker.invoke_process( # <<<<<<<<<<<<<< + * windowed_value.with_value(element), + * restriction=restriction, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/common.py":1530 + * (element, (restriction, estimator_state)), _ = windowed_value.value + * return self.do_fn_invoker.invoke_process( + * windowed_value.with_value(element), # <<<<<<<<<<<<<< + * restriction=restriction, + * watermark_estimator_state=estimator_state) +*/ + __pyx_t_3 = __pyx_v_windowed_value; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_element}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_value, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1530, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1529 + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value + * return self.do_fn_invoker.invoke_process( # <<<<<<<<<<<<<< + * windowed_value.with_value(element), + * restriction=restriction, +*/ + __pyx_t_11.__pyx_n = 2; + __pyx_t_11.restriction = __pyx_v_restriction; + __pyx_t_11.watermark_estimator_state = __pyx_v_estimator_state; + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v_self->do_fn_invoker->__pyx_vtab)->invoke_process(__pyx_v_self->do_fn_invoker, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1), 0, &__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1526 + * self._reraise_augmented(exn) + * + * def process_with_sized_restriction(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_with_sized_restriction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XDECREF(__pyx_v_restriction); + __Pyx_XDECREF(__pyx_v_estimator_state); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1534 + * watermark_estimator_state=estimator_state) + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_11try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1534, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1534, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 1534, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 1534, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1534, __pyx_L3_error) + } + __pyx_v_fraction = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1534, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_10try_split(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_fraction); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_10try_split(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_fraction) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/common.py":1536 + * def try_split(self, fraction): + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) # <<<<<<<<<<<<<< + * return self.do_fn_invoker.try_split(fraction) + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1536, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1536, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1537 + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) + * return self.do_fn_invoker.try_split(fraction) # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fraction}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1534 + * watermark_estimator_state=estimator_state) + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1539 + * return self.do_fn_invoker.try_split(fraction) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_12current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_12current_element_progress(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/common.py":1541 + * def current_element_progress(self): + * # type: () -> Optional[RestrictionProgress] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) # <<<<<<<<<<<<<< + * return self.do_fn_invoker.current_element_progress() + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1541, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1541, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1542 + * # type: () -> Optional[RestrictionProgress] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) + * return self.do_fn_invoker.current_element_progress() # <<<<<<<<<<<<<< + * + * def process_user_timer( +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1539 + * return self.do_fn_invoker.try_split(fraction) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1544 + * return self.do_fn_invoker.current_element_progress() + * + * def process_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer = {"process_user_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_timer_spec = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_window = 0; + PyObject *__pyx_v_timestamp = 0; + PyObject *__pyx_v_pane_info = 0; + PyObject *__pyx_v_dynamic_timer_tag = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_user_timer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timer_spec,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_window,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_pane_info,&__pyx_mstate_global->__pyx_n_u_dynamic_timer_tag,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1544, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1544, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_user_timer", 0) < (0)) __PYX_ERR(0, 1544, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, i); __PYX_ERR(0, 1544, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1544, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1544, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1544, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1544, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1544, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1544, __pyx_L3_error) + } + __pyx_v_timer_spec = values[0]; + __pyx_v_key = values[1]; + __pyx_v_window = values[2]; + __pyx_v_timestamp = values[3]; + __pyx_v_pane_info = values[4]; + __pyx_v_dynamic_timer_tag = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_user_timer", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 1544, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_user_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_14process_user_timer(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info, __pyx_v_dynamic_timer_tag); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_14process_user_timer(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_timer_spec, PyObject *__pyx_v_key, PyObject *__pyx_v_window, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_pane_info, PyObject *__pyx_v_dynamic_timer_tag) { + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + char const *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_user_timer", 0); + + /* "apache_beam/runners/common.py":1546 + * def process_user_timer( + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/runners/common.py":1547 + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: + * self.do_fn_invoker.invoke_user_timer( # <<<<<<<<<<<<<< + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) + * except BaseException as exn: +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/common.py":1548 + * try: + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) # <<<<<<<<<<<<<< + * except BaseException as exn: + * self._reraise_augmented(exn) +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_timer_spec, __pyx_v_key, __pyx_v_window, __pyx_v_timestamp, __pyx_v_pane_info, __pyx_v_dynamic_timer_tag}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_user_timer, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1546 + * def process_user_timer( + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1549 + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); + if (__pyx_t_7) { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_user_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1549, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exn = __pyx_t_5; + /*try:*/ { + + /* "apache_beam/runners/common.py":1550 + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) + * except BaseException as exn: + * self._reraise_augmented(exn) # <<<<<<<<<<<<<< + * + * def _invoke_bundle_method(self, bundle_method): +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exn}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1550, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "apache_beam/runners/common.py":1549 + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + goto __pyx_L15; + } + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; + goto __pyx_L5_except_error; + } + __pyx_L15:; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + + /* "apache_beam/runners/common.py":1546 + * def process_user_timer( + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: # <<<<<<<<<<<<<< + * self.do_fn_invoker.invoke_user_timer( + * timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag) +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "apache_beam/runners/common.py":1544 + * return self.do_fn_invoker.current_element_progress() + * + * def process_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.process_user_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1552 + * self._reraise_augmented(exn) + * + * def _invoke_bundle_method(self, bundle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method = {"_invoke_bundle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_bundle_method = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_invoke_bundle_method (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bundle_method,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1552, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1552, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_invoke_bundle_method", 0) < (0)) __PYX_ERR(0, 1552, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_invoke_bundle_method", 1, 1, 1, i); __PYX_ERR(0, 1552, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1552, __pyx_L3_error) + } + __pyx_v_bundle_method = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_invoke_bundle_method", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1552, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_16_invoke_bundle_method(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_bundle_method); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_16_invoke_bundle_method(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_bundle_method) { + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + char const *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_invoke_bundle_method", 0); + + /* "apache_beam/runners/common.py":1553 + * + * def _invoke_bundle_method(self, bundle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * bundle_method() +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/runners/common.py":1554 + * def _invoke_bundle_method(self, bundle_method): + * try: + * self.context.set_element(None) # <<<<<<<<<<<<<< + * bundle_method() + * except BaseException as exn: +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self->context->__pyx_vtab)->set_element(__pyx_v_self->context, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1554, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1555 + * try: + * self.context.set_element(None) + * bundle_method() # <<<<<<<<<<<<<< + * except BaseException as exn: + * self._reraise_augmented(exn) +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_bundle_method); + __pyx_t_6 = __pyx_v_bundle_method; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1555, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1553 + * + * def _invoke_bundle_method(self, bundle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * bundle_method() +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":1556 + * self.context.set_element(None) + * bundle_method() + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); + if (__pyx_t_8) { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1556, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_exn = __pyx_t_6; + /*try:*/ { + + /* "apache_beam/runners/common.py":1557 + * bundle_method() + * except BaseException as exn: + * self._reraise_augmented(exn) # <<<<<<<<<<<<<< + * + * def _invoke_lifecycle_method(self, lifecycle_method): +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exn}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1557, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "apache_beam/runners/common.py":1556 + * self.context.set_element(None) + * bundle_method() + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + goto __pyx_L15; + } + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; + goto __pyx_L5_except_error; + } + __pyx_L15:; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + + /* "apache_beam/runners/common.py":1553 + * + * def _invoke_bundle_method(self, bundle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * bundle_method() +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "apache_beam/runners/common.py":1552 + * self._reraise_augmented(exn) + * + * def _invoke_bundle_method(self, bundle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_bundle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1559 + * self._reraise_augmented(exn) + * + * def _invoke_lifecycle_method(self, lifecycle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method = {"_invoke_lifecycle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_lifecycle_method = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_invoke_lifecycle_method (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lifecycle_method,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1559, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1559, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_invoke_lifecycle_method", 0) < (0)) __PYX_ERR(0, 1559, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_invoke_lifecycle_method", 1, 1, 1, i); __PYX_ERR(0, 1559, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1559, __pyx_L3_error) + } + __pyx_v_lifecycle_method = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_invoke_lifecycle_method", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1559, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_18_invoke_lifecycle_method(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_lifecycle_method); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_18_invoke_lifecycle_method(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_lifecycle_method) { + PyObject *__pyx_v_exn = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + char const *__pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_invoke_lifecycle_method", 0); + + /* "apache_beam/runners/common.py":1560 + * + * def _invoke_lifecycle_method(self, lifecycle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * lifecycle_method() +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/runners/common.py":1561 + * def _invoke_lifecycle_method(self, lifecycle_method): + * try: + * self.context.set_element(None) # <<<<<<<<<<<<<< + * lifecycle_method() + * except BaseException as exn: +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self->context->__pyx_vtab)->set_element(__pyx_v_self->context, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1562 + * try: + * self.context.set_element(None) + * lifecycle_method() # <<<<<<<<<<<<<< + * except BaseException as exn: + * self._reraise_augmented(exn) +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_lifecycle_method); + __pyx_t_6 = __pyx_v_lifecycle_method; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1560 + * + * def _invoke_lifecycle_method(self, lifecycle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * lifecycle_method() +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/common.py":1563 + * self.context.set_element(None) + * lifecycle_method() + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); + if (__pyx_t_8) { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1563, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_exn = __pyx_t_6; + /*try:*/ { + + /* "apache_beam/runners/common.py":1564 + * lifecycle_method() + * except BaseException as exn: + * self._reraise_augmented(exn) # <<<<<<<<<<<<<< + * + * def setup(self): +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exn}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1564, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "apache_beam/runners/common.py":1563 + * self.context.set_element(None) + * lifecycle_method() + * except BaseException as exn: # <<<<<<<<<<<<<< + * self._reraise_augmented(exn) + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + goto __pyx_L15; + } + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_exn); __pyx_v_exn = 0; + } + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; + __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; + goto __pyx_L5_except_error; + } + __pyx_L15:; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + + /* "apache_beam/runners/common.py":1560 + * + * def _invoke_lifecycle_method(self, lifecycle_method): + * try: # <<<<<<<<<<<<<< + * self.context.set_element(None) + * lifecycle_method() +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "apache_beam/runners/common.py":1559 + * self._reraise_augmented(exn) + * + * def _invoke_lifecycle_method(self, lifecycle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_exn); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1566 + * self._reraise_augmented(exn) + * + * def setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_21setup = {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("setup", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("setup", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_20setup(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_20setup(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setup", 0); + + /* "apache_beam/runners/common.py":1568 + * def setup(self): + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) # <<<<<<<<<<<<<< + * + * def start(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_mstate_global->__pyx_n_u_invoke_setup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_lifecycle_method, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1566 + * self._reraise_augmented(exn) + * + * def setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1570 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_23start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22start(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22start(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + + /* "apache_beam/runners/common.py":1572 + * def start(self): + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_mstate_global->__pyx_n_u_invoke_start_bundle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_bundle_method, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1570 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1574 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_25finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_24finish(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_24finish(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + + /* "apache_beam/runners/common.py":1576 + * def finish(self): + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) # <<<<<<<<<<<<<< + * + * def teardown(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_mstate_global->__pyx_n_u_invoke_finish_bundle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_bundle_method, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1574 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1578 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_27teardown = {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_26teardown(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_26teardown(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + + /* "apache_beam/runners/common.py":1580 + * def teardown(self): + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) # <<<<<<<<<<<<<< + * + * def finalize(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->do_fn_invoker), __pyx_mstate_global->__pyx_n_u_invoke_teardown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_invoke_lifecycle_method, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1578 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1582 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.bundle_finalizer_param.finalize_bundle() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_29finalize = {"finalize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_28finalize(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_28finalize(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize", 0); + + /* "apache_beam/runners/common.py":1584 + * def finalize(self): + * # type: () -> None + * self.bundle_finalizer_param.finalize_bundle() # <<<<<<<<<<<<<< + * + * def _reraise_augmented(self, exn, windowed_value=None): +*/ + __pyx_t_2 = __pyx_v_self->bundle_finalizer_param; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize_bundle, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1582 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.bundle_finalizer_param.finalize_bundle() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1586 + * self.bundle_finalizer_param.finalize_bundle() + * + * def _reraise_augmented(self, exn, windowed_value=None): # <<<<<<<<<<<<<< + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: + * raise exn +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented = {"_reraise_augmented", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_exn = 0; + PyObject *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_reraise_augmented (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exn,&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1586, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1586, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1586, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reraise_augmented", 0) < (0)) __PYX_ERR(0, 1586, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reraise_augmented", 0, 1, 2, i); __PYX_ERR(0, 1586, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1586, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1586, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_exn = values[0]; + __pyx_v_windowed_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_reraise_augmented", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1586, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._reraise_augmented", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_30_reraise_augmented(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v_exn, __pyx_v_windowed_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_30_reraise_augmented(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_exn, PyObject *__pyx_v_windowed_value) { + PyObject *__pyx_v_step_annotation = NULL; + PyObject *__pyx_v_new_exn = NULL; + PyObject *__pyx_v_exc_info = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_tb = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + size_t __pyx_t_18; + PyObject *(*__pyx_t_19)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_reraise_augmented", 0); + + /* "apache_beam/runners/common.py":1587 + * + * def _reraise_augmented(self, exn, windowed_value=None): + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: # <<<<<<<<<<<<<< + * raise exn + * step_annotation = " [while running '%s']" % self.step_name +*/ + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_exn, __pyx_mstate_global->__pyx_n_u_tagged_with_step, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1587, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->step_name); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_4 = (!__pyx_t_3); + __pyx_t_1 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/runners/common.py":1588 + * def _reraise_augmented(self, exn, windowed_value=None): + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: + * raise exn # <<<<<<<<<<<<<< + * step_annotation = " [while running '%s']" % self.step_name + * # To emulate exception chaining (not available in Python 2). +*/ + __Pyx_Raise(__pyx_v_exn, 0, 0, 0); + __PYX_ERR(0, 1588, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1587 + * + * def _reraise_augmented(self, exn, windowed_value=None): + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: # <<<<<<<<<<<<<< + * raise exn + * step_annotation = " [while running '%s']" % self.step_name +*/ + } + + /* "apache_beam/runners/common.py":1589 + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: + * raise exn + * step_annotation = " [while running '%s']" % self.step_name # <<<<<<<<<<<<<< + * # To emulate exception chaining (not available in Python 2). + * try: +*/ + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_while_running_s, __pyx_v_self->step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_step_annotation = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1591 + * step_annotation = " [while running '%s']" % self.step_name + * # To emulate exception chaining (not available in Python 2). + * try: # <<<<<<<<<<<<<< + * # Attempt to construct the same kind of exception + * # with an augmented message. +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "apache_beam/runners/common.py":1594 + * # Attempt to construct the same kind of exception + * # with an augmented message. + * new_exn = type(exn)(exn.args[0] + step_annotation, *exn.args[1:]) # <<<<<<<<<<<<<< + * new_exn._tagged_with_step = True # Could raise attribute error. + * except: # pylint: disable=bare-except +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exn, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_v_step_annotation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1594, __pyx_L6_error); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exn, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)Py_TYPE(__pyx_v_exn)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_new_exn = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1595 + * # with an augmented message. + * new_exn = type(exn)(exn.args[0] + step_annotation, *exn.args[1:]) + * new_exn._tagged_with_step = True # Could raise attribute error. # <<<<<<<<<<<<<< + * except: # pylint: disable=bare-except + * # If anything goes wrong, construct a RuntimeError whose message +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_new_exn, __pyx_mstate_global->__pyx_n_u_tagged_with_step, Py_True) < (0)) __PYX_ERR(0, 1595, __pyx_L6_error) + + /* "apache_beam/runners/common.py":1591 + * step_annotation = " [while running '%s']" % self.step_name + * # To emulate exception chaining (not available in Python 2). + * try: # <<<<<<<<<<<<<< + * # Attempt to construct the same kind of exception + * # with an augmented message. +*/ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L11_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1596 + * new_exn = type(exn)(exn.args[0] + step_annotation, *exn.args[1:]) + * new_exn._tagged_with_step = True # Could raise attribute error. + * except: # pylint: disable=bare-except # <<<<<<<<<<<<<< + * # If anything goes wrong, construct a RuntimeError whose message + * # records the original exception's type and message. +*/ + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._reraise_augmented", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 1596, __pyx_L8_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + + /* "apache_beam/runners/common.py":1599 + * # If anything goes wrong, construct a RuntimeError whose message + * # records the original exception's type and message. + * new_exn = RuntimeError( # <<<<<<<<<<<<<< + * traceback.format_exception_only(type(exn), exn)[-1].strip() + + * step_annotation) +*/ + __pyx_t_11 = NULL; + + /* "apache_beam/runners/common.py":1600 + * # records the original exception's type and message. + * new_exn = RuntimeError( + * traceback.format_exception_only(type(exn), exn)[-1].strip() + # <<<<<<<<<<<<<< + * step_annotation) + * new_exn._tagged_with_step = True +*/ + __pyx_t_15 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_traceback); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_format_exception_only); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_18 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_17))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17); + assert(__pyx_t_15); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_17, __pyx__function); + __pyx_t_18 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_15, ((PyObject *)Py_TYPE(__pyx_v_exn)), __pyx_v_exn}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_18, (3-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_14, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_13 = __pyx_t_17; + __Pyx_INCREF(__pyx_t_13); + __pyx_t_18 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; + __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_18, (1-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_12); + } + + /* "apache_beam/runners/common.py":1601 + * new_exn = RuntimeError( + * traceback.format_exception_only(type(exn), exn)[-1].strip() + + * step_annotation) # <<<<<<<<<<<<<< + * new_exn._tagged_with_step = True + * exc_info = sys.exc_info() +*/ + __pyx_t_17 = PyNumber_Add(__pyx_t_12, __pyx_v_step_annotation); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1600, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_18 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_17}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L8_except_error) + __Pyx_GOTREF(__pyx_t_10); + } + __Pyx_XDECREF_SET(__pyx_v_new_exn, __pyx_t_10); + __pyx_t_10 = 0; + + /* "apache_beam/runners/common.py":1602 + * traceback.format_exception_only(type(exn), exn)[-1].strip() + + * step_annotation) + * new_exn._tagged_with_step = True # <<<<<<<<<<<<<< + * exc_info = sys.exc_info() + * _, _, tb = exc_info +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_new_exn, __pyx_mstate_global->__pyx_n_u_tagged_with_step, Py_True) < (0)) __PYX_ERR(0, 1602, __pyx_L8_except_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_exception_handled; + } + + /* "apache_beam/runners/common.py":1591 + * step_annotation = " [while running '%s']" % self.step_name + * # To emulate exception chaining (not available in Python 2). + * try: # <<<<<<<<<<<<<< + * # Attempt to construct the same kind of exception + * # with an augmented message. +*/ + __pyx_L8_except_error:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + __pyx_L11_try_end:; + } + + /* "apache_beam/runners/common.py":1603 + * step_annotation) + * new_exn._tagged_with_step = True + * exc_info = sys.exc_info() # <<<<<<<<<<<<<< + * _, _, tb = exc_info + * +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_18 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_18 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_18, (1-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_v_exc_info = __pyx_t_8; + __pyx_t_8 = 0; + + /* "apache_beam/runners/common.py":1604 + * new_exn._tagged_with_step = True + * exc_info = sys.exc_info() + * _, _, tb = exc_info # <<<<<<<<<<<<<< + * + * new_exn = new_exn.with_traceback(tb) +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_exc_info))) || (PyList_CheckExact(__pyx_v_exc_info))) { + PyObject* sequence = __pyx_v_exc_info; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1604, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_9); + } else { + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + } + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_v_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_19 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); + index = 0; __pyx_t_8 = __pyx_t_19(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_10 = __pyx_t_19(__pyx_t_2); if (unlikely(!__pyx_t_10)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + index = 2; __pyx_t_9 = __pyx_t_19(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_2), 3) < (0)) __PYX_ERR(0, 1604, __pyx_L1_error) + __pyx_t_19 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L15_unpacking_done; + __pyx_L14_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_19 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1604, __pyx_L1_error) + __pyx_L15_unpacking_done:; + } + __pyx_v__ = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v__, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_v_tb = __pyx_t_9; + __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1606 + * _, _, tb = exc_info + * + * new_exn = new_exn.with_traceback(tb) # <<<<<<<<<<<<<< + * self._maybe_sample_exception(exc_info, windowed_value) + * _LOGGER.exception(new_exn) +*/ + __pyx_t_10 = __pyx_v_new_exn; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_18 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_tb}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_traceback, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF_SET(__pyx_v_new_exn, __pyx_t_9); + __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1607 + * + * new_exn = new_exn.with_traceback(tb) + * self._maybe_sample_exception(exc_info, windowed_value) # <<<<<<<<<<<<<< + * _LOGGER.exception(new_exn) + * raise new_exn +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_18 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_exc_info, __pyx_v_windowed_value}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_maybe_sample_exception, __pyx_callargs+__pyx_t_18, (3-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1608 + * new_exn = new_exn.with_traceback(tb) + * self._maybe_sample_exception(exc_info, windowed_value) + * _LOGGER.exception(new_exn) # <<<<<<<<<<<<<< + * raise new_exn + * +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_18 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_10); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_18 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_new_exn}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1609 + * self._maybe_sample_exception(exc_info, windowed_value) + * _LOGGER.exception(new_exn) + * raise new_exn # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(__pyx_v_new_exn, 0, 0, 0); + __PYX_ERR(0, 1609, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1586 + * self.bundle_finalizer_param.finalize_bundle() + * + * def _reraise_augmented(self, exn, windowed_value=None): # <<<<<<<<<<<<<< + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: + * raise exn +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner._reraise_augmented", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XDECREF(__pyx_v_step_annotation); + __Pyx_XDECREF(__pyx_v_new_exn); + __Pyx_XDECREF(__pyx_v_exc_info); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_tb); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.pxd":127 + * cdef list side_inputs + * cdef DoFnInvoker do_fn_invoker + * cdef public object bundle_finalizer_param # <<<<<<<<<<<<<< + * cdef str transform_id + * cdef object execution_context +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->bundle_finalizer_param); + __pyx_r = __pyx_v_self->bundle_finalizer_param; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_2__set__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_2__set__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_4__del__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_4__del__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v_self->bundle_finalizer_param); + __pyx_v_self->bundle_finalizer_param = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_32__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_32__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.bundle_finalizer_param, self.context, self.do_fn_invoker, self.execution_context, self.side_inputs, self.step_name, self.transform_id) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->bundle_finalizer_param); + __Pyx_GIVEREF(__pyx_v_self->bundle_finalizer_param); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->bundle_finalizer_param) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->context); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->context)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->do_fn_invoker); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->do_fn_invoker); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->do_fn_invoker)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->execution_context); + __Pyx_GIVEREF(__pyx_v_self->execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->execution_context) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->side_inputs); + __Pyx_GIVEREF(__pyx_v_self->side_inputs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->side_inputs) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->step_name); + __Pyx_GIVEREF(__pyx_v_self->step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->step_name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->transform_id); + __Pyx_GIVEREF(__pyx_v_self->transform_id); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->transform_id) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.bundle_finalizer_param, self.context, self.do_fn_invoker, self.execution_context, self.side_inputs, self.step_name, self.transform_id) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.bundle_finalizer_param, self.context, self.do_fn_invoker, self.execution_context, self.side_inputs, self.step_name, self.transform_id) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.bundle_finalizer_param is not None or self.context is not None or self.do_fn_invoker is not None or self.execution_context is not None or self.side_inputs is not None or self.step_name is not None or self.transform_id is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.bundle_finalizer_param, self.context, self.do_fn_invoker, self.execution_context, self.side_inputs, self.step_name, self.transform_id) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.bundle_finalizer_param is not None or self.context is not None or self.do_fn_invoker is not None or self.execution_context is not None or self.side_inputs is not None or self.step_name is not None or self.transform_id is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->bundle_finalizer_param != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->context) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->do_fn_invoker) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->execution_context != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->side_inputs != ((PyObject*)Py_None)); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->step_name != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->transform_id != ((PyObject*)Py_None)); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.bundle_finalizer_param is not None or self.context is not None or self.do_fn_invoker is not None or self.execution_context is not None or self.side_inputs is not None or self.step_name is not None or self.transform_id is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.bundle_finalizer_param is not None or self.context is not None or self.do_fn_invoker is not None or self.execution_context is not None or self.side_inputs is not None or self.step_name is not None or self.transform_id is not None + * if use_setstate: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnRunner); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24629412); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24629412); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_24629412) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.bundle_finalizer_param is not None or self.context is not None or self.do_fn_invoker is not None or self.execution_context is not None or self.side_inputs is not None or self.step_name is not None or self.transform_id is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, None), state + * else: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnRunner); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24629412); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24629412); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_24629412) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_34__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10DoFnRunner_34__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnRunner__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnRunner.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1613 + * + * class OutputHandler(object): + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, CYTHON_UNUSED PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":1614 + * class OutputHandler(object): + * def handle_process_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError +*/ + PyObject *__pyx_v_watermark_estimator = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_outputs", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_watermark_estimator = __pyx_optional_args->watermark_estimator; + } + } + + /* "apache_beam/runners/common.py":1613 + * + * class OutputHandler(object): + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_process_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1616 + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def handle_process_batch_outputs( +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1616, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1613 + * + * class OutputHandler(object): + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs = {"handle_process_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element = 0; + PyObject *__pyx_v_results = 0; + PyObject *__pyx_v_watermark_estimator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_process_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_input_element,&__pyx_mstate_global->__pyx_n_u_results,&__pyx_mstate_global->__pyx_n_u_watermark_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1613, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_process_outputs", 0) < (0)) __PYX_ERR(0, 1613, __pyx_L3_error) + + /* "apache_beam/runners/common.py":1614 + * class OutputHandler(object): + * def handle_process_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, i); __PYX_ERR(0, 1613, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1613, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1613, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_input_element = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + __pyx_v_results = values[1]; + __pyx_v_watermark_estimator = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1613, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_input_element), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1614, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_element, __pyx_v_results, __pyx_v_watermark_estimator); + + /* "apache_beam/runners/common.py":1613 + * + * class OutputHandler(object): + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_outputs", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.watermark_estimator = __pyx_v_watermark_estimator; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler->handle_process_outputs(__pyx_v_self, __pyx_v_windowed_input_element, __pyx_v_results, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1618 + * raise NotImplementedError + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_element, CYTHON_UNUSED PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":1619 + * + * def handle_process_batch_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError +*/ + PyObject *__pyx_v_watermark_estimator = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_watermark_estimator = __pyx_optional_args->watermark_estimator; + } + } + + /* "apache_beam/runners/common.py":1618 + * raise NotImplementedError + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_process_batch_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1621 + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 1621, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1618 + * raise NotImplementedError + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs = {"handle_process_batch_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_element = 0; + PyObject *__pyx_v_results = 0; + PyObject *__pyx_v_watermark_estimator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_process_batch_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_input_element,&__pyx_mstate_global->__pyx_n_u_results,&__pyx_mstate_global->__pyx_n_u_watermark_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1618, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1618, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1618, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1618, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_process_batch_outputs", 0) < (0)) __PYX_ERR(0, 1618, __pyx_L3_error) + + /* "apache_beam/runners/common.py":1619 + * + * def handle_process_batch_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None + * raise NotImplementedError +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, i); __PYX_ERR(0, 1618, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1618, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1618, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1618, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_input_element = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + __pyx_v_results = values[1]; + __pyx_v_watermark_estimator = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1618, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_input_element), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13OutputHandler_2handle_process_batch_outputs(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_element, __pyx_v_results, __pyx_v_watermark_estimator); + + /* "apache_beam/runners/common.py":1618 + * raise NotImplementedError + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_2handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.watermark_estimator = __pyx_v_watermark_estimator; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler->handle_process_batch_outputs(__pyx_v_self, __pyx_v_windowed_input_element, __pyx_v_results, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13OutputHandler_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OutputHandler); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_OutputHandler__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OutputHandler); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OutputHandler__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_13OutputHandler_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_13OutputHandler_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_OutputHandler__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_OutputHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OutputHandler__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1626 + * class _OutputHandler(OutputHandler): + * """Processes output produced by DoFn method invocations.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * window_fn, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_14_OutputHandler___init__, "Initializes ``_OutputHandler``.\n\n Args:\n window_fn: a windowing function (WindowFn).\n main_receivers: a dict of tag name to Receiver objects.\n tagged_receivers: main receiver object.\n per_element_output_counter: per_element_output_counter of one work_item.\n could be none if experimental flag turn off\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6common_14_OutputHandler___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_window_fn = 0; + PyObject *__pyx_v_main_receivers = 0; + PyObject *__pyx_v_tagged_receivers = 0; + PyObject *__pyx_v_per_element_output_counter = 0; + PyObject *__pyx_v_output_batch_converter = 0; + PyObject *__pyx_v_process_yields_batches = 0; + PyObject *__pyx_v_process_batch_yields_elements = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_window_fn,&__pyx_mstate_global->__pyx_n_u_main_receivers,&__pyx_mstate_global->__pyx_n_u_tagged_receivers,&__pyx_mstate_global->__pyx_n_u_per_element_output_counter,&__pyx_mstate_global->__pyx_n_u_output_batch_converter,&__pyx_mstate_global->__pyx_n_u_process_yields_batches,&__pyx_mstate_global->__pyx_n_u_process_batch_yields_elements,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1626, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1626, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1626, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 7; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, i); __PYX_ERR(0, 1626, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 7)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1626, __pyx_L3_error) + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1626, __pyx_L3_error) + } + __pyx_v_window_fn = values[0]; + __pyx_v_main_receivers = values[1]; + __pyx_v_tagged_receivers = values[2]; + __pyx_v_per_element_output_counter = values[3]; + __pyx_v_output_batch_converter = values[4]; + __pyx_v_process_yields_batches = values[5]; + __pyx_v_process_batch_yields_elements = values[6]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 1626, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler___init__(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v_window_fn, __pyx_v_main_receivers, __pyx_v_tagged_receivers, __pyx_v_per_element_output_counter, __pyx_v_output_batch_converter, __pyx_v_process_yields_batches, __pyx_v_process_batch_yields_elements); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler___init__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_window_fn, PyObject *__pyx_v_main_receivers, PyObject *__pyx_v_tagged_receivers, PyObject *__pyx_v_per_element_output_counter, PyObject *__pyx_v_output_batch_converter, PyObject *__pyx_v_process_yields_batches, PyObject *__pyx_v_process_batch_yields_elements) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":1645 + * could be none if experimental flag turn off + * """ + * self.window_fn = window_fn # <<<<<<<<<<<<<< + * self.main_receivers = main_receivers + * self.tagged_receivers = tagged_receivers +*/ + __Pyx_INCREF(__pyx_v_window_fn); + __Pyx_GIVEREF(__pyx_v_window_fn); + __Pyx_GOTREF(__pyx_v_self->window_fn); + __Pyx_DECREF(__pyx_v_self->window_fn); + __pyx_v_self->window_fn = __pyx_v_window_fn; + + /* "apache_beam/runners/common.py":1646 + * """ + * self.window_fn = window_fn + * self.main_receivers = main_receivers # <<<<<<<<<<<<<< + * self.tagged_receivers = tagged_receivers + * if (per_element_output_counter is not None and +*/ + __pyx_t_1 = __pyx_v_main_receivers; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(0, 1646, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->main_receivers); + __Pyx_DECREF((PyObject *)__pyx_v_self->main_receivers); + __pyx_v_self->main_receivers = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1647 + * self.window_fn = window_fn + * self.main_receivers = main_receivers + * self.tagged_receivers = tagged_receivers # <<<<<<<<<<<<<< + * if (per_element_output_counter is not None and + * per_element_output_counter.is_cythonized): +*/ + __Pyx_INCREF(__pyx_v_tagged_receivers); + __Pyx_GIVEREF(__pyx_v_tagged_receivers); + __Pyx_GOTREF(__pyx_v_self->tagged_receivers); + __Pyx_DECREF(__pyx_v_self->tagged_receivers); + __pyx_v_self->tagged_receivers = __pyx_v_tagged_receivers; + + /* "apache_beam/runners/common.py":1648 + * self.main_receivers = main_receivers + * self.tagged_receivers = tagged_receivers + * if (per_element_output_counter is not None and # <<<<<<<<<<<<<< + * per_element_output_counter.is_cythonized): + * self.per_element_output_counter = per_element_output_counter +*/ + __pyx_t_3 = (__pyx_v_per_element_output_counter != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/runners/common.py":1649 + * self.tagged_receivers = tagged_receivers + * if (per_element_output_counter is not None and + * per_element_output_counter.is_cythonized): # <<<<<<<<<<<<<< + * self.per_element_output_counter = per_element_output_counter + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_per_element_output_counter, __pyx_mstate_global->__pyx_n_u_is_cythonized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1649, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + + /* "apache_beam/runners/common.py":1648 + * self.main_receivers = main_receivers + * self.tagged_receivers = tagged_receivers + * if (per_element_output_counter is not None and # <<<<<<<<<<<<<< + * per_element_output_counter.is_cythonized): + * self.per_element_output_counter = per_element_output_counter +*/ + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":1650 + * if (per_element_output_counter is not None and + * per_element_output_counter.is_cythonized): + * self.per_element_output_counter = per_element_output_counter # <<<<<<<<<<<<<< + * else: + * self.per_element_output_counter = None +*/ + __pyx_t_1 = __pyx_v_per_element_output_counter; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter))))) __PYX_ERR(0, 1650, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->per_element_output_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->per_element_output_counter); + __pyx_v_self->per_element_output_counter = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1648 + * self.main_receivers = main_receivers + * self.tagged_receivers = tagged_receivers + * if (per_element_output_counter is not None and # <<<<<<<<<<<<<< + * per_element_output_counter.is_cythonized): + * self.per_element_output_counter = per_element_output_counter +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/common.py":1652 + * self.per_element_output_counter = per_element_output_counter + * else: + * self.per_element_output_counter = None # <<<<<<<<<<<<<< + * self.output_batch_converter = output_batch_converter + * self._process_yields_batches = process_yields_batches +*/ + /*else*/ { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->per_element_output_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->per_element_output_counter); + __pyx_v_self->per_element_output_counter = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)Py_None); + } + __pyx_L3:; + + /* "apache_beam/runners/common.py":1653 + * else: + * self.per_element_output_counter = None + * self.output_batch_converter = output_batch_converter # <<<<<<<<<<<<<< + * self._process_yields_batches = process_yields_batches + * self._process_batch_yields_elements = process_batch_yields_elements +*/ + __Pyx_INCREF(__pyx_v_output_batch_converter); + __Pyx_GIVEREF(__pyx_v_output_batch_converter); + __Pyx_GOTREF(__pyx_v_self->output_batch_converter); + __Pyx_DECREF(__pyx_v_self->output_batch_converter); + __pyx_v_self->output_batch_converter = __pyx_v_output_batch_converter; + + /* "apache_beam/runners/common.py":1654 + * self.per_element_output_counter = None + * self.output_batch_converter = output_batch_converter + * self._process_yields_batches = process_yields_batches # <<<<<<<<<<<<<< + * self._process_batch_yields_elements = process_batch_yields_elements + * +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_process_yields_batches); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L1_error) + __pyx_v_self->_process_yields_batches = __pyx_t_2; + + /* "apache_beam/runners/common.py":1655 + * self.output_batch_converter = output_batch_converter + * self._process_yields_batches = process_yields_batches + * self._process_batch_yields_elements = process_batch_yields_elements # <<<<<<<<<<<<<< + * + * def handle_process_outputs( +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_process_batch_yields_elements); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L1_error) + __pyx_v_self->_process_batch_yields_elements = __pyx_t_2; + + /* "apache_beam/runners/common.py":1626 + * class _OutputHandler(OutputHandler): + * """Processes output produced by DoFn method invocations.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * window_fn, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1657 + * self._process_batch_yields_elements = process_batch_yields_elements + * + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":1658 + * + * def handle_process_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None + * +*/ + PyObject *__pyx_v_watermark_estimator = ((PyObject *)Py_None); + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + int64_t __pyx_v_output_element_count; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int64_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_outputs", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_watermark_estimator = __pyx_optional_args->watermark_estimator; + } + } + __Pyx_INCREF(__pyx_v_results); + + /* "apache_beam/runners/common.py":1657 + * self._process_batch_yields_elements = process_batch_yields_elements + * + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_process_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_input_element), __pyx_v_results, __pyx_v_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1666 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * results = [] + * +*/ + __pyx_t_6 = (__pyx_v_results == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1667 + * """ + * if results is None: + * results = [] # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/20404): Verify that the +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_results, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1666 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * results = [] + * +*/ + } + + /* "apache_beam/runners/common.py":1672 + * # results object is a valid iterable type if + * # performance_runtime_type_check is active, without harming performance + * output_element_count = 0 # <<<<<<<<<<<<<< + * for result in results: + * tag, result = self._handle_tagged_output(result) +*/ + __pyx_v_output_element_count = 0; + + /* "apache_beam/runners/common.py":1673 + * # performance_runtime_type_check is active, without harming performance + * output_element_count = 0 + * for result in results: # <<<<<<<<<<<<<< + * tag, result = self._handle_tagged_output(result) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_results)) || PyTuple_CheckExact(__pyx_v_results)) { + __pyx_t_1 = __pyx_v_results; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1673, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1673, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1673, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1673, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1674 + * output_element_count = 0 + * for result in results: + * tag, result = self._handle_tagged_output(result) # <<<<<<<<<<<<<< + * + * if not self._process_yields_batches: +*/ + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1674, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1674, __pyx_L1_error) + } + __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1676 + * tag, result = self._handle_tagged_output(result) + * + * if not self._process_yields_batches: # <<<<<<<<<<<<<< + * # process yields elements + * windowed_value = self._maybe_propagate_windowing_info( +*/ + __pyx_t_6 = (!__pyx_v_self->_process_yields_batches); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1678 + * if not self._process_yields_batches: + * # process yields elements + * windowed_value = self._maybe_propagate_windowing_info( # <<<<<<<<<<<<<< + * windowed_input_element, result) + * +*/ + __pyx_t_2 = ((PyObject *)__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info(__pyx_v_self, __pyx_v_windowed_input_element, __pyx_v_result)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1681 + * windowed_input_element, result) + * + * output_element_count += 1 # <<<<<<<<<<<<<< + * + * self._write_value_to_tag(tag, windowed_value, watermark_estimator) +*/ + __pyx_v_output_element_count = (__pyx_v_output_element_count + 1); + + /* "apache_beam/runners/common.py":1683 + * output_element_count += 1 + * + * self._write_value_to_tag(tag, windowed_value, watermark_estimator) # <<<<<<<<<<<<<< + * else: # process yields batches + * self._verify_batch_output(result) +*/ + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag(__pyx_v_self, __pyx_v_tag, __pyx_v_windowed_value, __pyx_v_watermark_estimator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1676 + * tag, result = self._handle_tagged_output(result) + * + * if not self._process_yields_batches: # <<<<<<<<<<<<<< + * # process yields elements + * windowed_value = self._maybe_propagate_windowing_info( +*/ + goto __pyx_L6; + } + + /* "apache_beam/runners/common.py":1685 + * self._write_value_to_tag(tag, windowed_value, watermark_estimator) + * else: # process yields batches + * self._verify_batch_output(result) # <<<<<<<<<<<<<< + * + * if isinstance(result, WindowedBatch): +*/ + /*else*/ { + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1687 + * self._verify_batch_output(result) + * + * if isinstance(result, WindowedBatch): # <<<<<<<<<<<<<< + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result +*/ + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1688 + * + * if isinstance(result, WindowedBatch): + * assert isinstance(result, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * windowed_batch = result + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyObject_IsInstance(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1688, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1688, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1689 + * if isinstance(result, WindowedBatch): + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result # <<<<<<<<<<<<<< + * + * if (windowed_input_element is not None and +*/ + __pyx_t_2 = __pyx_v_result; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1689, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1691 + * windowed_batch = result + * + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_batch.windows *= len(windowed_input_element.windows) +*/ + __pyx_t_9 = (((PyObject *)__pyx_v_windowed_input_element) != Py_None); + if (__pyx_t_9) { + } else { + __pyx_t_6 = __pyx_t_9; + goto __pyx_L9_bool_binop_done; + } + + /* "apache_beam/runners/common.py":1692 + * + * if (windowed_input_element is not None and + * len(windowed_input_element.windows) != 1): # <<<<<<<<<<<<<< + * windowed_batch.windows *= len(windowed_input_element.windows) + * else: +*/ + __pyx_t_2 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = (__pyx_t_10 != 1); + __pyx_t_6 = __pyx_t_9; + __pyx_L9_bool_binop_done:; + + /* "apache_beam/runners/common.py":1691 + * windowed_batch = result + * + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_batch.windows *= len(windowed_input_element.windows) +*/ + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1693 + * if (windowed_input_element is not None and + * len(windowed_input_element.windows) != 1): + * windowed_batch.windows *= len(windowed_input_element.windows) # <<<<<<<<<<<<<< + * else: + * windowed_batch = ( +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_10 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows, __pyx_t_4) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1691 + * windowed_batch = result + * + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_batch.windows *= len(windowed_input_element.windows) +*/ + } + + /* "apache_beam/runners/common.py":1687 + * self._verify_batch_output(result) + * + * if isinstance(result, WindowedBatch): # <<<<<<<<<<<<<< + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result +*/ + goto __pyx_L7; + } + + /* "apache_beam/runners/common.py":1696 + * else: + * windowed_batch = ( + * HomogeneousWindowedBatch.from_batch_and_windowed_value( # <<<<<<<<<<<<<< + * batch=result, windowed_value=windowed_input_element)) + * +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_from_batch_and_windowed_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1697 + * windowed_batch = ( + * HomogeneousWindowedBatch.from_batch_and_windowed_value( + * batch=result, windowed_value=windowed_input_element)) # <<<<<<<<<<<<<< + * + * output_element_count += self.output_batch_converter.get_length( +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_batch, __pyx_v_result, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1696, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_windowed_value, ((PyObject *)__pyx_v_windowed_input_element), __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/common.py":1696 + * else: + * windowed_batch = ( + * HomogeneousWindowedBatch.from_batch_and_windowed_value( # <<<<<<<<<<<<<< + * batch=result, windowed_value=windowed_input_element)) + * +*/ + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1696, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_4)); + __pyx_t_4 = 0; + } + __pyx_L7:; + + /* "apache_beam/runners/common.py":1699 + * batch=result, windowed_value=windowed_input_element)) + * + * output_element_count += self.output_batch_converter.get_length( # <<<<<<<<<<<<<< + * windowed_batch.values) + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_output_element_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_v_self->output_batch_converter; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1700 + * + * output_element_count += self.output_batch_converter.get_length( + * windowed_batch.values) # <<<<<<<<<<<<<< + * + * self._write_batch_to_tag(tag, windowed_batch, watermark_estimator) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_length, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + + /* "apache_beam/runners/common.py":1699 + * batch=result, windowed_value=windowed_input_element)) + * + * output_element_count += self.output_batch_converter.get_length( # <<<<<<<<<<<<<< + * windowed_batch.values) + * +*/ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1699, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_output_element_count = __pyx_t_12; + + /* "apache_beam/runners/common.py":1702 + * windowed_batch.values) + * + * self._write_batch_to_tag(tag, windowed_batch, watermark_estimator) # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/18886): Remove if block after +*/ + __pyx_t_3 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag(__pyx_v_self, __pyx_v_tag, __pyx_v_windowed_batch, __pyx_v_watermark_estimator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L6:; + + /* "apache_beam/runners/common.py":1673 + * # performance_runtime_type_check is active, without harming performance + * output_element_count = 0 + * for result in results: # <<<<<<<<<<<<<< + * tag, result = self._handle_tagged_output(result) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1707 + * # output counter released. Only enable per_element_output_counter when + * # counter cythonized + * if self.per_element_output_counter is not None: # <<<<<<<<<<<<<< + * self.per_element_output_counter.add_input(output_element_count) + * +*/ + __pyx_t_6 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1708 + * # counter cythonized + * if self.per_element_output_counter is not None: + * self.per_element_output_counter.add_input(output_element_count) # <<<<<<<<<<<<<< + * + * def handle_process_batch_outputs( +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->per_element_output_counter->__pyx_vtab)->add_input(__pyx_v_self->per_element_output_counter, __pyx_v_output_element_count, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1708, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1707 + * # output counter released. Only enable per_element_output_counter when + * # counter cythonized + * if self.per_element_output_counter is not None: # <<<<<<<<<<<<<< + * self.per_element_output_counter.add_input(output_element_count) + * +*/ + } + + /* "apache_beam/runners/common.py":1657 + * self._process_batch_yields_elements = process_batch_yields_elements + * + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_batch); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XDECREF(__pyx_v_results); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_2handle_process_outputs, "Dispatch the result of process computation to the appropriate receivers.\n\n A value wrapped in a TaggedOutput object will be unwrapped and\n then dispatched to the appropriate indexed output.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs = {"handle_process_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_2handle_process_outputs}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element = 0; + PyObject *__pyx_v_results = 0; + PyObject *__pyx_v_watermark_estimator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_process_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_input_element,&__pyx_mstate_global->__pyx_n_u_results,&__pyx_mstate_global->__pyx_n_u_watermark_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1657, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1657, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1657, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1657, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_process_outputs", 0) < (0)) __PYX_ERR(0, 1657, __pyx_L3_error) + + /* "apache_beam/runners/common.py":1658 + * + * def handle_process_outputs( + * self, windowed_input_element, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, i); __PYX_ERR(0, 1657, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1657, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1657, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1657, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_input_element = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + __pyx_v_results = values[1]; + __pyx_v_watermark_estimator = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_process_outputs", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1657, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_input_element), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_input_element", 0))) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_2handle_process_outputs(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_element, __pyx_v_results, __pyx_v_watermark_estimator); + + /* "apache_beam/runners/common.py":1657 + * self._process_batch_yields_elements = process_batch_yields_elements + * + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_2handle_process_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_outputs", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.watermark_estimator = __pyx_v_watermark_estimator; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler->__pyx_base.handle_process_outputs(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_element, __pyx_v_results, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1710 + * self.per_element_output_counter.add_input(output_element_count) + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_batch, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_batch, PyObject *__pyx_v_results, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs *__pyx_optional_args) { + + /* "apache_beam/runners/common.py":1711 + * + * def handle_process_batch_outputs( + * self, windowed_input_batch, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None + * +*/ + PyObject *__pyx_v_watermark_estimator = ((PyObject *)Py_None); + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + int64_t __pyx_v_output_element_count; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int64_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_watermark_estimator = __pyx_optional_args->watermark_estimator; + } + } + __Pyx_INCREF(__pyx_v_results); + + /* "apache_beam/runners/common.py":1710 + * self.per_element_output_counter.add_input(output_element_count) + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_batch, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_process_batch_outputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_input_batch), __pyx_v_results, __pyx_v_watermark_estimator}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1720 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * results = [] + * +*/ + __pyx_t_6 = (__pyx_v_results == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1721 + * """ + * if results is None: + * results = [] # <<<<<<<<<<<<<< + * + * output_element_count = 0 +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_results, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1720 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * results = [] + * +*/ + } + + /* "apache_beam/runners/common.py":1723 + * results = [] + * + * output_element_count = 0 # <<<<<<<<<<<<<< + * for result in results: + * tag, result = self._handle_tagged_output(result) +*/ + __pyx_v_output_element_count = 0; + + /* "apache_beam/runners/common.py":1724 + * + * output_element_count = 0 + * for result in results: # <<<<<<<<<<<<<< + * tag, result = self._handle_tagged_output(result) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_results)) || PyTuple_CheckExact(__pyx_v_results)) { + __pyx_t_1 = __pyx_v_results; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1724, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1724, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1724, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1724, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1725 + * output_element_count = 0 + * for result in results: + * tag, result = self._handle_tagged_output(result) # <<<<<<<<<<<<<< + * + * if not self._process_batch_yields_elements: +*/ + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1725, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1725, __pyx_L1_error) + } + __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1727 + * tag, result = self._handle_tagged_output(result) + * + * if not self._process_batch_yields_elements: # <<<<<<<<<<<<<< + * # process_batch yields batches + * assert self.output_batch_converter is not None +*/ + __pyx_t_6 = (!__pyx_v_self->_process_batch_yields_elements); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1729 + * if not self._process_batch_yields_elements: + * # process_batch yields batches + * assert self.output_batch_converter is not None # <<<<<<<<<<<<<< + * + * self._verify_batch_output(result) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_6 = (__pyx_v_self->output_batch_converter != Py_None); + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1729, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1729, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1731 + * assert self.output_batch_converter is not None + * + * self._verify_batch_output(result) # <<<<<<<<<<<<<< + * + * if isinstance(result, WindowedBatch): +*/ + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1733 + * self._verify_batch_output(result) + * + * if isinstance(result, WindowedBatch): # <<<<<<<<<<<<<< + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result +*/ + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1734 + * + * if isinstance(result, WindowedBatch): + * assert isinstance(result, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * windowed_batch = result + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyObject_IsInstance(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1734, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1734, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1734, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1735 + * if isinstance(result, WindowedBatch): + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result # <<<<<<<<<<<<<< + * + * if (windowed_input_batch is not None and +*/ + __pyx_t_2 = __pyx_v_result; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 1735, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1737 + * windowed_batch = result + * + * if (windowed_input_batch is not None and # <<<<<<<<<<<<<< + * len(windowed_input_batch.windows) != 1): + * windowed_batch.windows *= len(windowed_input_batch.windows) +*/ + __pyx_t_9 = (((PyObject *)__pyx_v_windowed_input_batch) != Py_None); + if (__pyx_t_9) { + } else { + __pyx_t_6 = __pyx_t_9; + goto __pyx_L9_bool_binop_done; + } + + /* "apache_beam/runners/common.py":1738 + * + * if (windowed_input_batch is not None and + * len(windowed_input_batch.windows) != 1): # <<<<<<<<<<<<<< + * windowed_batch.windows *= len(windowed_input_batch.windows) + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_input_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1738, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = (__pyx_t_10 != 1); + __pyx_t_6 = __pyx_t_9; + __pyx_L9_bool_binop_done:; + + /* "apache_beam/runners/common.py":1737 + * windowed_batch = result + * + * if (windowed_input_batch is not None and # <<<<<<<<<<<<<< + * len(windowed_input_batch.windows) != 1): + * windowed_batch.windows *= len(windowed_input_batch.windows) +*/ + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1739 + * if (windowed_input_batch is not None and + * len(windowed_input_batch.windows) != 1): + * windowed_batch.windows *= len(windowed_input_batch.windows) # <<<<<<<<<<<<<< + * else: + * windowed_batch = windowed_input_batch.with_values(result) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_input_batch), __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_windows, __pyx_t_4) < (0)) __PYX_ERR(0, 1739, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1737 + * windowed_batch = result + * + * if (windowed_input_batch is not None and # <<<<<<<<<<<<<< + * len(windowed_input_batch.windows) != 1): + * windowed_batch.windows *= len(windowed_input_batch.windows) +*/ + } + + /* "apache_beam/runners/common.py":1733 + * self._verify_batch_output(result) + * + * if isinstance(result, WindowedBatch): # <<<<<<<<<<<<<< + * assert isinstance(result, HomogeneousWindowedBatch) + * windowed_batch = result +*/ + goto __pyx_L7; + } + + /* "apache_beam/runners/common.py":1741 + * windowed_batch.windows *= len(windowed_input_batch.windows) + * else: + * windowed_batch = windowed_input_batch.with_values(result) # <<<<<<<<<<<<<< + * + * output_element_count += self.output_batch_converter.get_length( +*/ + /*else*/ { + __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_windowed_input_batch->__pyx_vtab)->with_values(__pyx_v_windowed_input_batch, __pyx_v_result, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_4)); + __pyx_t_4 = 0; + } + __pyx_L7:; + + /* "apache_beam/runners/common.py":1743 + * windowed_batch = windowed_input_batch.with_values(result) + * + * output_element_count += self.output_batch_converter.get_length( # <<<<<<<<<<<<<< + * windowed_batch.values) + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_output_element_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_v_self->output_batch_converter; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1744 + * + * output_element_count += self.output_batch_converter.get_length( + * windowed_batch.values) # <<<<<<<<<<<<<< + * + * self._write_batch_to_tag(tag, windowed_batch, watermark_estimator) +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_length, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/runners/common.py":1743 + * windowed_batch = windowed_input_batch.with_values(result) + * + * output_element_count += self.output_batch_converter.get_length( # <<<<<<<<<<<<<< + * windowed_batch.values) + * +*/ + __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_t_11); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_output_element_count = __pyx_t_12; + + /* "apache_beam/runners/common.py":1746 + * windowed_batch.values) + * + * self._write_batch_to_tag(tag, windowed_batch, watermark_estimator) # <<<<<<<<<<<<<< + * else: # process_batch yields elements + * assert isinstance(windowed_input_batch, HomogeneousWindowedBatch) +*/ + __pyx_t_11 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag(__pyx_v_self, __pyx_v_tag, __pyx_v_windowed_batch, __pyx_v_watermark_estimator); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/runners/common.py":1727 + * tag, result = self._handle_tagged_output(result) + * + * if not self._process_batch_yields_elements: # <<<<<<<<<<<<<< + * # process_batch yields batches + * assert self.output_batch_converter is not None +*/ + goto __pyx_L6; + } + + /* "apache_beam/runners/common.py":1748 + * self._write_batch_to_tag(tag, windowed_batch, watermark_estimator) + * else: # process_batch yields elements + * assert isinstance(windowed_input_batch, HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * + * windowed_value = self._maybe_propagate_windowing_info( +*/ + /*else*/ { + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyObject_IsInstance(((PyObject *)__pyx_v_windowed_input_batch), __pyx_t_11); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1748, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1748, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1748, __pyx_L1_error) + #endif + + /* "apache_beam/runners/common.py":1751 + * + * windowed_value = self._maybe_propagate_windowing_info( + * windowed_input_batch.as_empty_windowed_value(), result) # <<<<<<<<<<<<<< + * + * output_element_count += 1 +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_windowed_input_batch); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_empty_windowed_value, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1751, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1750 + * assert isinstance(windowed_input_batch, HomogeneousWindowedBatch) + * + * windowed_value = self._maybe_propagate_windowing_info( # <<<<<<<<<<<<<< + * windowed_input_batch.as_empty_windowed_value(), result) + * +*/ + __pyx_t_3 = ((PyObject *)__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info(__pyx_v_self, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_11), __pyx_v_result)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1753 + * windowed_input_batch.as_empty_windowed_value(), result) + * + * output_element_count += 1 # <<<<<<<<<<<<<< + * + * self._write_value_to_tag(tag, windowed_value, watermark_estimator) +*/ + __pyx_v_output_element_count = (__pyx_v_output_element_count + 1); + + /* "apache_beam/runners/common.py":1755 + * output_element_count += 1 + * + * self._write_value_to_tag(tag, windowed_value, watermark_estimator) # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/18886): Remove if block after +*/ + __pyx_t_3 = __pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag(__pyx_v_self, __pyx_v_tag, __pyx_v_windowed_value, __pyx_v_watermark_estimator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L6:; + + /* "apache_beam/runners/common.py":1724 + * + * output_element_count = 0 + * for result in results: # <<<<<<<<<<<<<< + * tag, result = self._handle_tagged_output(result) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1760 + * # output counter released. Only enable per_element_output_counter when + * # counter cythonized + * if self.per_element_output_counter is not None: # <<<<<<<<<<<<<< + * self.per_element_output_counter.add_input(output_element_count) + * +*/ + __pyx_t_6 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1761 + * # counter cythonized + * if self.per_element_output_counter is not None: + * self.per_element_output_counter.add_input(output_element_count) # <<<<<<<<<<<<<< + * + * def _maybe_propagate_windowing_info(self, windowed_input_element, result): +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->per_element_output_counter->__pyx_vtab)->add_input(__pyx_v_self->per_element_output_counter, __pyx_v_output_element_count, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1761, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1760 + * # output counter released. Only enable per_element_output_counter when + * # counter cythonized + * if self.per_element_output_counter is not None: # <<<<<<<<<<<<<< + * self.per_element_output_counter.add_input(output_element_count) + * +*/ + } + + /* "apache_beam/runners/common.py":1710 + * self.per_element_output_counter.add_input(output_element_count) + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_batch, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_batch); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XDECREF(__pyx_v_results); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_4handle_process_batch_outputs, "Dispatch the result of process_batch computation to the appropriate\n receivers.\n\n A value wrapped in a TaggedOutput object will be unwrapped and\n then dispatched to the appropriate indexed output.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs = {"handle_process_batch_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_4handle_process_batch_outputs}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_batch = 0; + PyObject *__pyx_v_results = 0; + PyObject *__pyx_v_watermark_estimator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_process_batch_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_input_batch,&__pyx_mstate_global->__pyx_n_u_results,&__pyx_mstate_global->__pyx_n_u_watermark_estimator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1710, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1710, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1710, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1710, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_process_batch_outputs", 0) < (0)) __PYX_ERR(0, 1710, __pyx_L3_error) + + /* "apache_beam/runners/common.py":1711 + * + * def handle_process_batch_outputs( + * self, windowed_input_batch, results, watermark_estimator=None): # <<<<<<<<<<<<<< + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None + * +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, i); __PYX_ERR(0, 1710, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1710, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1710, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1710, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_windowed_input_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + __pyx_v_results = values[1]; + __pyx_v_watermark_estimator = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_process_batch_outputs", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1710, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_input_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_input_batch", 0))) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_4handle_process_batch_outputs(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_batch, __pyx_v_results, __pyx_v_watermark_estimator); + + /* "apache_beam/runners/common.py":1710 + * self.per_element_output_counter.add_input(output_element_count) + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_batch, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_4handle_process_batch_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_input_batch, PyObject *__pyx_v_results, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_process_batch_outputs", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.watermark_estimator = __pyx_v_watermark_estimator; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler->__pyx_base.handle_process_batch_outputs(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v_self), __pyx_v_windowed_input_batch, __pyx_v_results, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.handle_process_batch_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1763 + * self.per_element_output_counter.add_input(output_element_count) + * + * def _maybe_propagate_windowing_info(self, windowed_input_element, result): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Any) -> WindowedValue + * if isinstance(result, WindowedValue): +*/ + +static CYTHON_INLINE struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_input_element, PyObject *__pyx_v_result) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_assign_context = NULL; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_maybe_propagate_windowing_info", 0); + + /* "apache_beam/runners/common.py":1765 + * def _maybe_propagate_windowing_info(self, windowed_input_element, result): + * # type: (WindowedValue, Any) -> WindowedValue + * if isinstance(result, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = result + * if (windowed_input_element is not None and +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1766 + * # type: (WindowedValue, Any) -> WindowedValue + * if isinstance(result, WindowedValue): + * windowed_value = result # <<<<<<<<<<<<<< + * if (windowed_input_element is not None and + * len(windowed_input_element.windows) != 1): +*/ + __pyx_t_2 = __pyx_v_result; + __Pyx_INCREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1766, __pyx_L1_error) + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1767 + * if isinstance(result, WindowedValue): + * windowed_value = result + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_value.windows *= len(windowed_input_element.windows) +*/ + __pyx_t_3 = (((PyObject *)__pyx_v_windowed_input_element) != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/common.py":1768 + * windowed_value = result + * if (windowed_input_element is not None and + * len(windowed_input_element.windows) != 1): # <<<<<<<<<<<<<< + * windowed_value.windows *= len(windowed_input_element.windows) + * return windowed_value +*/ + __pyx_t_2 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1768, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 1); + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + + /* "apache_beam/runners/common.py":1767 + * if isinstance(result, WindowedValue): + * windowed_value = result + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_value.windows *= len(windowed_input_element.windows) +*/ + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1769 + * if (windowed_input_element is not None and + * len(windowed_input_element.windows) != 1): + * windowed_value.windows *= len(windowed_input_element.windows) # <<<<<<<<<<<<<< + * return windowed_value + * +*/ + __pyx_t_2 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1769, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_windowed_value->windows, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_windowed_value->windows); + __Pyx_DECREF(__pyx_v_windowed_value->windows); + __pyx_v_windowed_value->windows = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1767 + * if isinstance(result, WindowedValue): + * windowed_value = result + * if (windowed_input_element is not None and # <<<<<<<<<<<<<< + * len(windowed_input_element.windows) != 1): + * windowed_value.windows *= len(windowed_input_element.windows) +*/ + } + + /* "apache_beam/runners/common.py":1770 + * len(windowed_input_element.windows) != 1): + * windowed_value.windows *= len(windowed_input_element.windows) + * return windowed_value # <<<<<<<<<<<<<< + * + * elif isinstance(result, TimestampedValue): +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_windowed_value); + __pyx_r = __pyx_v_windowed_value; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1765 + * def _maybe_propagate_windowing_info(self, windowed_input_element, result): + * # type: (WindowedValue, Any) -> WindowedValue + * if isinstance(result, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = result + * if (windowed_input_element is not None and +*/ + } + + /* "apache_beam/runners/common.py":1772 + * return windowed_value + * + * elif isinstance(result, TimestampedValue): # <<<<<<<<<<<<<< + * assign_context = WindowFn.AssignContext(result.timestamp, result.value) + * windowed_value = WindowedValue( +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_11apache_beam_7runners_6common_TimestampedValue); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1773 + * + * elif isinstance(result, TimestampedValue): + * assign_context = WindowFn.AssignContext(result.timestamp, result.value) # <<<<<<<<<<<<<< + * windowed_value = WindowedValue( + * result.value, result.timestamp, self.window_fn.assign(assign_context)) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WindowFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AssignContext); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_6, __pyx_t_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_assign_context = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1774 + * elif isinstance(result, TimestampedValue): + * assign_context = WindowFn.AssignContext(result.timestamp, result.value) + * windowed_value = WindowedValue( # <<<<<<<<<<<<<< + * result.value, result.timestamp, self.window_fn.assign(assign_context)) + * if len(windowed_input_element.windows) != 1: +*/ + __pyx_t_7 = NULL; + + /* "apache_beam/runners/common.py":1775 + * assign_context = WindowFn.AssignContext(result.timestamp, result.value) + * windowed_value = WindowedValue( + * result.value, result.timestamp, self.window_fn.assign(assign_context)) # <<<<<<<<<<<<<< + * if len(windowed_input_element.windows) != 1: + * windowed_value.windows *= len(windowed_input_element.windows) +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __pyx_v_self->window_fn; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_assign_context}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_assign, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_t_6, __pyx_t_2}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1774, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1776 + * windowed_value = WindowedValue( + * result.value, result.timestamp, self.window_fn.assign(assign_context)) + * if len(windowed_input_element.windows) != 1: # <<<<<<<<<<<<<< + * windowed_value.windows *= len(windowed_input_element.windows) + * return windowed_value +*/ + __pyx_t_5 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1776, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_4 != 1); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1777 + * result.value, result.timestamp, self.window_fn.assign(assign_context)) + * if len(windowed_input_element.windows) != 1: + * windowed_value.windows *= len(windowed_input_element.windows) # <<<<<<<<<<<<<< + * return windowed_value + * +*/ + __pyx_t_5 = __pyx_v_windowed_input_element->windows; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1777, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_windowed_value->windows, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_windowed_value->windows); + __Pyx_DECREF(__pyx_v_windowed_value->windows); + __pyx_v_windowed_value->windows = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1776 + * windowed_value = WindowedValue( + * result.value, result.timestamp, self.window_fn.assign(assign_context)) + * if len(windowed_input_element.windows) != 1: # <<<<<<<<<<<<<< + * windowed_value.windows *= len(windowed_input_element.windows) + * return windowed_value +*/ + } + + /* "apache_beam/runners/common.py":1778 + * if len(windowed_input_element.windows) != 1: + * windowed_value.windows *= len(windowed_input_element.windows) + * return windowed_value # <<<<<<<<<<<<<< + * + * else: +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_windowed_value); + __pyx_r = __pyx_v_windowed_value; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1772 + * return windowed_value + * + * elif isinstance(result, TimestampedValue): # <<<<<<<<<<<<<< + * assign_context = WindowFn.AssignContext(result.timestamp, result.value) + * windowed_value = WindowedValue( +*/ + } + + /* "apache_beam/runners/common.py":1781 + * + * else: + * return windowed_input_element.with_value(result) # <<<<<<<<<<<<<< + * + * def _handle_tagged_output(self, result): +*/ + /*else*/ { + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_windowed_input_element->__pyx_vtab)->with_value(__pyx_v_windowed_input_element, __pyx_v_result, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1763 + * self.per_element_output_counter.add_input(output_element_count) + * + * def _maybe_propagate_windowing_info(self, windowed_input_element, result): # <<<<<<<<<<<<<< + * # type: (WindowedValue, Any) -> WindowedValue + * if isinstance(result, WindowedValue): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler._maybe_propagate_windowing_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF(__pyx_v_assign_context); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1783 + * return windowed_input_element.with_value(result) + * + * def _handle_tagged_output(self, result): # <<<<<<<<<<<<<< + * if isinstance(result, TaggedOutput): + * tag = result.tag +*/ + +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_result) { + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7[5]; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_handle_tagged_output", 0); + + /* "apache_beam/runners/common.py":1784 + * + * def _handle_tagged_output(self, result): + * if isinstance(result, TaggedOutput): # <<<<<<<<<<<<<< + * tag = result.tag + * if not isinstance(tag, str): +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_11apache_beam_7runners_6common_TaggedOutput); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/common.py":1785 + * def _handle_tagged_output(self, result): + * if isinstance(result, TaggedOutput): + * tag = result.tag # <<<<<<<<<<<<<< + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_tag = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/common.py":1786 + * if isinstance(result, TaggedOutput): + * tag = result.tag + * if not isinstance(tag, str): # <<<<<<<<<<<<<< + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * return tag, result.value +*/ + __pyx_t_2 = PyUnicode_Check(__pyx_v_tag); + __pyx_t_3 = (!__pyx_t_2); + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1787 + * tag = result.tag + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) # <<<<<<<<<<<<<< + * return tag, result.value + * return None, result +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_self)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tag), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_In; + __pyx_t_7[1] = __pyx_t_5; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_tag_2; + __pyx_t_7[3] = __pyx_t_6; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_is_not_a_string; + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 16, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1787, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1786 + * if isinstance(result, TaggedOutput): + * tag = result.tag + * if not isinstance(tag, str): # <<<<<<<<<<<<<< + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * return tag, result.value +*/ + } + + /* "apache_beam/runners/common.py":1788 + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * return tag, result.value # <<<<<<<<<<<<<< + * return None, result + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_tag); + __Pyx_GIVEREF(__pyx_v_tag); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tag) != (0)) __PYX_ERR(0, 1788, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1788, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1784 + * + * def _handle_tagged_output(self, result): + * if isinstance(result, TaggedOutput): # <<<<<<<<<<<<<< + * tag = result.tag + * if not isinstance(tag, str): +*/ + } + + /* "apache_beam/runners/common.py":1789 + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * return tag, result.value + * return None, result # <<<<<<<<<<<<<< + * + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, Py_None) != (0)) __PYX_ERR(0, 1789, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_result) != (0)) __PYX_ERR(0, 1789, __pyx_L1_error); + __pyx_r = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1783 + * return windowed_input_element.with_value(result) + * + * def _handle_tagged_output(self, result): # <<<<<<<<<<<<<< + * if isinstance(result, TaggedOutput): + * tag = result.tag +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler._handle_tagged_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1791 + * return None, result + * + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): # <<<<<<<<<<<<<< + * if watermark_estimator is not None: + * watermark_estimator.observe_timestamp(windowed_value.timestamp) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_tag, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_write_value_to_tag", 0); + + /* "apache_beam/runners/common.py":1792 + * + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): + * if watermark_estimator is not None: # <<<<<<<<<<<<<< + * watermark_estimator.observe_timestamp(windowed_value.timestamp) + * +*/ + __pyx_t_1 = (__pyx_v_watermark_estimator != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1793 + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): + * if watermark_estimator is not None: + * watermark_estimator.observe_timestamp(windowed_value.timestamp) # <<<<<<<<<<<<<< + * + * if tag is None: +*/ + __pyx_t_3 = __pyx_v_watermark_estimator; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_observe_timestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1792 + * + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): + * if watermark_estimator is not None: # <<<<<<<<<<<<<< + * watermark_estimator.observe_timestamp(windowed_value.timestamp) + * +*/ + } + + /* "apache_beam/runners/common.py":1795 + * watermark_estimator.observe_timestamp(windowed_value.timestamp) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive(windowed_value) + * else: +*/ + __pyx_t_1 = (__pyx_v_tag == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1796 + * + * if tag is None: + * self.main_receivers.receive(windowed_value) # <<<<<<<<<<<<<< + * else: + * self.tagged_receivers[tag].receive(windowed_value) +*/ + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *)__pyx_v_self->main_receivers->__pyx_vtab)->receive(__pyx_v_self->main_receivers, __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1795 + * watermark_estimator.observe_timestamp(windowed_value.timestamp) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive(windowed_value) + * else: +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/common.py":1798 + * self.main_receivers.receive(windowed_value) + * else: + * self.tagged_receivers[tag].receive(windowed_value) # <<<<<<<<<<<<<< + * + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): +*/ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_receive, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "apache_beam/runners/common.py":1791 + * return None, result + * + * def _write_value_to_tag(self, tag, windowed_value, watermark_estimator): # <<<<<<<<<<<<<< + * if watermark_estimator is not None: + * watermark_estimator.observe_timestamp(windowed_value.timestamp) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler._write_value_to_tag", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1800 + * self.tagged_receivers[tag].receive(windowed_value) + * + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): # <<<<<<<<<<<<<< + * if watermark_estimator is not None: + * for timestamp in windowed_batch.timestamps: +*/ + +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_tag, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, PyObject *__pyx_v_watermark_estimator) { + PyObject *__pyx_v_timestamp = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_write_batch_to_tag", 0); + + /* "apache_beam/runners/common.py":1801 + * + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): + * if watermark_estimator is not None: # <<<<<<<<<<<<<< + * for timestamp in windowed_batch.timestamps: + * watermark_estimator.observe_timestamp(timestamp) +*/ + __pyx_t_1 = (__pyx_v_watermark_estimator != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1802 + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): + * if watermark_estimator is not None: + * for timestamp in windowed_batch.timestamps: # <<<<<<<<<<<<<< + * watermark_estimator.observe_timestamp(timestamp) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_timestamps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1802, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1802, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_5(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1802, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_timestamp, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1803 + * if watermark_estimator is not None: + * for timestamp in windowed_batch.timestamps: + * watermark_estimator.observe_timestamp(timestamp) # <<<<<<<<<<<<<< + * + * if tag is None: +*/ + __pyx_t_6 = __pyx_v_watermark_estimator; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_timestamp}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_observe_timestamp, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1802 + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): + * if watermark_estimator is not None: + * for timestamp in windowed_batch.timestamps: # <<<<<<<<<<<<<< + * watermark_estimator.observe_timestamp(timestamp) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1801 + * + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): + * if watermark_estimator is not None: # <<<<<<<<<<<<<< + * for timestamp in windowed_batch.timestamps: + * watermark_estimator.observe_timestamp(timestamp) +*/ + } + + /* "apache_beam/runners/common.py":1805 + * watermark_estimator.observe_timestamp(timestamp) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive_batch(windowed_batch) + * else: +*/ + __pyx_t_1 = (__pyx_v_tag == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1806 + * + * if tag is None: + * self.main_receivers.receive_batch(windowed_batch) # <<<<<<<<<<<<<< + * else: + * self.tagged_receivers[tag].receive_batch(windowed_batch) +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *)__pyx_v_self->main_receivers->__pyx_vtab)->receive_batch(__pyx_v_self->main_receivers, __pyx_v_windowed_batch, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/common.py":1805 + * watermark_estimator.observe_timestamp(timestamp) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive_batch(windowed_batch) + * else: +*/ + goto __pyx_L7; + } + + /* "apache_beam/runners/common.py":1808 + * self.main_receivers.receive_batch(windowed_batch) + * else: + * self.tagged_receivers[tag].receive_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * def _verify_batch_output(self, result): +*/ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_receive_batch, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L7:; + + /* "apache_beam/runners/common.py":1800 + * self.tagged_receivers[tag].receive(windowed_value) + * + * def _write_batch_to_tag(self, tag, windowed_batch, watermark_estimator): # <<<<<<<<<<<<<< + * if watermark_estimator is not None: + * for timestamp in windowed_batch.timestamps: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler._write_batch_to_tag", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_timestamp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1810 + * self.tagged_receivers[tag].receive_batch(windowed_batch) + * + * def _verify_batch_output(self, result): # <<<<<<<<<<<<<< + * if isinstance(result, (WindowedValue, TimestampedValue)): + * raise TypeError( +*/ + +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_result) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7[3]; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_verify_batch_output", 0); + + /* "apache_beam/runners/common.py":1811 + * + * def _verify_batch_output(self, result): + * if isinstance(result, (WindowedValue, TimestampedValue)): # <<<<<<<<<<<<<< + * raise TypeError( + * f"Received {type(result).__name__} from DoFn that was " +*/ + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_result, __pyx_v_11apache_beam_7runners_6common_TimestampedValue); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/runners/common.py":1812 + * def _verify_batch_output(self, result): + * if isinstance(result, (WindowedValue, TimestampedValue)): + * raise TypeError( # <<<<<<<<<<<<<< + * f"Received {type(result).__name__} from DoFn that was " + * "expected to produce a batch.") +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/runners/common.py":1813 + * if isinstance(result, (WindowedValue, TimestampedValue)): + * raise TypeError( + * f"Received {type(result).__name__} from DoFn that was " # <<<<<<<<<<<<<< + * "expected to produce a batch.") + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_result)), __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Received; + __pyx_t_7[1] = __pyx_t_6; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_from_DoFn_that_was_expected_to; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 48, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 1812, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1811 + * + * def _verify_batch_output(self, result): + * if isinstance(result, (WindowedValue, TimestampedValue)): # <<<<<<<<<<<<<< + * raise TypeError( + * f"Received {type(result).__name__} from DoFn that was " +*/ + } + + /* "apache_beam/runners/common.py":1810 + * self.tagged_receivers[tag].receive_batch(windowed_batch) + * + * def _verify_batch_output(self, result): # <<<<<<<<<<<<<< + * if isinstance(result, (WindowedValue, TimestampedValue)): + * raise TypeError( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler._verify_batch_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1816 + * "expected to produce a batch.") + * + * def start_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Validate that start_bundle does not output any elements""" + * if results is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs, "Validate that start_bundle does not output any elements"); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs = {"start_bundle_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_results = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start_bundle_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_results,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1816, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1816, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "start_bundle_outputs", 0) < (0)) __PYX_ERR(0, 1816, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start_bundle_outputs", 1, 1, 1, i); __PYX_ERR(0, 1816, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1816, __pyx_L3_error) + } + __pyx_v_results = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("start_bundle_outputs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1816, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.start_bundle_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v_results); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_results) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start_bundle_outputs", 0); + + /* "apache_beam/runners/common.py":1818 + * def start_bundle_outputs(self, results): + * """Validate that start_bundle does not output any elements""" + * if results is None: # <<<<<<<<<<<<<< + * return + * raise RuntimeError( +*/ + __pyx_t_1 = (__pyx_v_results == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1819 + * """Validate that start_bundle does not output any elements""" + * if results is None: + * return # <<<<<<<<<<<<<< + * raise RuntimeError( + * 'Start Bundle should not output any elements but got %s' % results) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1818 + * def start_bundle_outputs(self, results): + * """Validate that start_bundle does not output any elements""" + * if results is None: # <<<<<<<<<<<<<< + * return + * raise RuntimeError( +*/ + } + + /* "apache_beam/runners/common.py":1820 + * if results is None: + * return + * raise RuntimeError( # <<<<<<<<<<<<<< + * 'Start Bundle should not output any elements but got %s' % results) + * +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/runners/common.py":1821 + * return + * raise RuntimeError( + * 'Start Bundle should not output any elements but got %s' % results) # <<<<<<<<<<<<<< + * + * def finish_bundle_outputs(self, results): +*/ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Start_Bundle_should_not_output_a, __pyx_v_results); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1820, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1816 + * "expected to produce a batch.") + * + * def start_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Validate that start_bundle does not output any elements""" + * if results is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.start_bundle_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1823 + * 'Start Bundle should not output any elements but got %s' % results) + * + * def finish_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Dispatch the result of finish_bundle to the appropriate receivers. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs, "Dispatch the result of finish_bundle to the appropriate receivers.\n\n A value wrapped in a TaggedOutput object will be unwrapped and\n then dispatched to the appropriate indexed output.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs = {"finish_bundle_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_results = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish_bundle_outputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_results,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1823, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1823, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "finish_bundle_outputs", 0) < (0)) __PYX_ERR(0, 1823, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("finish_bundle_outputs", 1, 1, 1, i); __PYX_ERR(0, 1823, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1823, __pyx_L3_error) + } + __pyx_v_results = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("finish_bundle_outputs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1823, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.finish_bundle_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v_results); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v_results) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_v_windowed_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10[5]; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish_bundle_outputs", 0); + + /* "apache_beam/runners/common.py":1829 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * return + * +*/ + __pyx_t_1 = (__pyx_v_results == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1830 + * """ + * if results is None: + * return # <<<<<<<<<<<<<< + * + * for result in results: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1829 + * then dispatched to the appropriate indexed output. + * """ + * if results is None: # <<<<<<<<<<<<<< + * return + * +*/ + } + + /* "apache_beam/runners/common.py":1832 + * return + * + * for result in results: # <<<<<<<<<<<<<< + * tag = None + * if isinstance(result, TaggedOutput): +*/ + if (likely(PyList_CheckExact(__pyx_v_results)) || PyTuple_CheckExact(__pyx_v_results)) { + __pyx_t_2 = __pyx_v_results; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1832, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1832, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1832, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1832, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1832, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1833 + * + * for result in results: + * tag = None # <<<<<<<<<<<<<< + * if isinstance(result, TaggedOutput): + * tag = result.tag +*/ + __Pyx_INCREF(Py_None); + __Pyx_XDECREF_SET(__pyx_v_tag, Py_None); + + /* "apache_beam/runners/common.py":1834 + * for result in results: + * tag = None + * if isinstance(result, TaggedOutput): # <<<<<<<<<<<<<< + * tag = result.tag + * if not isinstance(tag, str): +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_11apache_beam_7runners_6common_TaggedOutput); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1835 + * tag = None + * if isinstance(result, TaggedOutput): + * tag = result.tag # <<<<<<<<<<<<<< + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1836 + * if isinstance(result, TaggedOutput): + * tag = result.tag + * if not isinstance(tag, str): # <<<<<<<<<<<<<< + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * result = result.value +*/ + __pyx_t_1 = PyUnicode_Check(__pyx_v_tag); + __pyx_t_6 = (!__pyx_t_1); + if (unlikely(__pyx_t_6)) { + + /* "apache_beam/runners/common.py":1837 + * tag = result.tag + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) # <<<<<<<<<<<<<< + * result = result.value + * +*/ + __pyx_t_7 = NULL; + __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_self)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tag), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_In; + __pyx_t_10[1] = __pyx_t_8; + __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_tag_2; + __pyx_t_10[3] = __pyx_t_9; + __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_is_not_a_string; + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 16, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_11}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1837, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1836 + * if isinstance(result, TaggedOutput): + * tag = result.tag + * if not isinstance(tag, str): # <<<<<<<<<<<<<< + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * result = result.value +*/ + } + + /* "apache_beam/runners/common.py":1838 + * if not isinstance(tag, str): + * raise TypeError('In %s, tag %s is not a string' % (self, tag)) + * result = result.value # <<<<<<<<<<<<<< + * + * if isinstance(result, WindowedValue): +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1834 + * for result in results: + * tag = None + * if isinstance(result, TaggedOutput): # <<<<<<<<<<<<<< + * tag = result.tag + * if not isinstance(tag, str): +*/ + } + + /* "apache_beam/runners/common.py":1840 + * result = result.value + * + * if isinstance(result, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = result + * else: +*/ + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_result, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (likely(__pyx_t_6)) { + + /* "apache_beam/runners/common.py":1841 + * + * if isinstance(result, WindowedValue): + * windowed_value = result # <<<<<<<<<<<<<< + * else: + * raise RuntimeError('Finish Bundle should only output WindowedValue ' +\ +*/ + __Pyx_INCREF(__pyx_v_result); + __Pyx_XDECREF_SET(__pyx_v_windowed_value, __pyx_v_result); + + /* "apache_beam/runners/common.py":1840 + * result = result.value + * + * if isinstance(result, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = result + * else: +*/ + goto __pyx_L8; + } + + /* "apache_beam/runners/common.py":1843 + * windowed_value = result + * else: + * raise RuntimeError('Finish Bundle should only output WindowedValue ' +\ # <<<<<<<<<<<<<< + * 'type but got %s' % type(result)) + * +*/ + /*else*/ { + __pyx_t_11 = NULL; + + /* "apache_beam/runners/common.py":1844 + * else: + * raise RuntimeError('Finish Bundle should only output WindowedValue ' +\ + * 'type but got %s' % type(result)) # <<<<<<<<<<<<<< + * + * if tag is None: +*/ + __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_type_but_got_s, ((PyObject *)Py_TYPE(__pyx_v_result))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/runners/common.py":1843 + * windowed_value = result + * else: + * raise RuntimeError('Finish Bundle should only output WindowedValue ' +\ # <<<<<<<<<<<<<< + * 'type but got %s' % type(result)) + * +*/ + __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Finish_Bundle_should_only_output, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1843, __pyx_L1_error) + } + __pyx_L8:; + + /* "apache_beam/runners/common.py":1846 + * 'type but got %s' % type(result)) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive(windowed_value) + * else: +*/ + __pyx_t_6 = (__pyx_v_tag == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":1847 + * + * if tag is None: + * self.main_receivers.receive(windowed_value) # <<<<<<<<<<<<<< + * else: + * self.tagged_receivers[tag].receive(windowed_value) +*/ + if (!(likely(((__pyx_v_windowed_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1847, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *)__pyx_v_self->main_receivers->__pyx_vtab)->receive(__pyx_v_self->main_receivers, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_windowed_value), 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":1846 + * 'type but got %s' % type(result)) + * + * if tag is None: # <<<<<<<<<<<<<< + * self.main_receivers.receive(windowed_value) + * else: +*/ + goto __pyx_L9; + } + + /* "apache_beam/runners/common.py":1849 + * self.main_receivers.receive(windowed_value) + * else: + * self.tagged_receivers[tag].receive(windowed_value) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __pyx_t_11; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_windowed_value}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_receive, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L9:; + + /* "apache_beam/runners/common.py":1832 + * return + * + * for result in results: # <<<<<<<<<<<<<< + * tag = None + * if isinstance(result, TaggedOutput): +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1823 + * 'Start Bundle should not output any elements but got %s' % results) + * + * def finish_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Dispatch the result of finish_bundle to the appropriate receivers. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.finish_bundle_outputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XDECREF(__pyx_v_windowed_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._process_batch_yields_elements, self._process_yields_batches, self.main_receivers, self.output_batch_converter, self.per_element_output_counter, self.tagged_receivers, self.window_fn) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_process_batch_yields_elements); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_process_yields_batches); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->main_receivers); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->main_receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->main_receivers)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->output_batch_converter); + __Pyx_GIVEREF(__pyx_v_self->output_batch_converter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->output_batch_converter) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->per_element_output_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->per_element_output_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->per_element_output_counter)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->tagged_receivers); + __Pyx_GIVEREF(__pyx_v_self->tagged_receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->tagged_receivers) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->window_fn); + __Pyx_GIVEREF(__pyx_v_self->window_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->window_fn) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._process_batch_yields_elements, self._process_yields_batches, self.main_receivers, self.output_batch_converter, self.per_element_output_counter, self.tagged_receivers, self.window_fn) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._process_batch_yields_elements, self._process_yields_batches, self.main_receivers, self.output_batch_converter, self.per_element_output_counter, self.tagged_receivers, self.window_fn) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.main_receivers is not None or self.output_batch_converter is not None or self.per_element_output_counter is not None or self.tagged_receivers is not None or self.window_fn is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._process_batch_yields_elements, self._process_yields_batches, self.main_receivers, self.output_batch_converter, self.per_element_output_counter, self.tagged_receivers, self.window_fn) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.main_receivers is not None or self.output_batch_converter is not None or self.per_element_output_counter is not None or self.tagged_receivers is not None or self.window_fn is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, None), state +*/ + /*else*/ { + __pyx_t_5 = (((PyObject *)__pyx_v_self->main_receivers) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->output_batch_converter != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->per_element_output_counter) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->tagged_receivers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->window_fn != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.main_receivers is not None or self.output_batch_converter is not None or self.per_element_output_counter is not None or self.tagged_receivers is not None or self.window_fn is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.main_receivers is not None or self.output_batch_converter is not None or self.per_element_output_counter is not None or self.tagged_receivers is not None or self.window_fn is not None + * if use_setstate: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OutputHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_173793943); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_173793943); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_173793943) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.main_receivers is not None or self.output_batch_converter is not None or self.per_element_output_counter is not None or self.tagged_receivers is not None or self.window_fn is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, None), state + * else: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__OutputHandler__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OutputHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_173793943); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_173793943); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_173793943) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OutputHandler__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14_OutputHandler_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__OutputHandler__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle__OutputHandler__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OutputHandler__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common._OutputHandler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1856 + * NO_VALUE = object() + * + * def __init__(self, value, timestamp=NO_VALUE): # <<<<<<<<<<<<<< + * self.value = value + * self._timestamp = timestamp +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 1856, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1856, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 1856, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_timestamp = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp,0}; + struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1856, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1856, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1856, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1856, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1856, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 1856, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1856, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1856, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1856, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); + } + __pyx_v_self = values[0]; + __pyx_v_value = values[1]; + __pyx_v_timestamp = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1856, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10_NoContext___init__(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_timestamp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":1857 + * + * def __init__(self, value, timestamp=NO_VALUE): + * self.value = value # <<<<<<<<<<<<<< + * self._timestamp = timestamp + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_value, __pyx_v_value) < (0)) __PYX_ERR(0, 1857, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1858 + * def __init__(self, value, timestamp=NO_VALUE): + * self.value = value + * self._timestamp = timestamp # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_2, __pyx_v_timestamp) < (0)) __PYX_ERR(0, 1858, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1856 + * NO_VALUE = object() + * + * def __init__(self, value, timestamp=NO_VALUE): # <<<<<<<<<<<<<< + * self.value = value + * self._timestamp = timestamp +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1860 + * self._timestamp = timestamp + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_3timestamp = {"timestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_3timestamp(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("timestamp (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1860, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1860, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timestamp", 0) < (0)) __PYX_ERR(0, 1860, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, i); __PYX_ERR(0, 1860, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1860, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("timestamp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1860, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10_NoContext_2timestamp(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext_2timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timestamp", 0); + + /* "apache_beam/runners/common.py":1862 + * @property + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: # <<<<<<<<<<<<<< + * raise ValueError('No timestamp in this context.') + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_NO_VALUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__pyx_t_1 == __pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_3)) { + + /* "apache_beam/runners/common.py":1863 + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: + * raise ValueError('No timestamp in this context.') # <<<<<<<<<<<<<< + * else: + * return self._timestamp +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_No_timestamp_in_this_context}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1863, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1862 + * @property + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: # <<<<<<<<<<<<<< + * raise ValueError('No timestamp in this context.') + * else: +*/ + } + + /* "apache_beam/runners/common.py":1865 + * raise ValueError('No timestamp in this context.') + * else: + * return self._timestamp # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1860 + * self._timestamp = timestamp + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1867 + * return self._timestamp + * + * @property # <<<<<<<<<<<<<< + * def existing_windows(self): + * raise ValueError('No existing_windows in this context.') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_5existing_windows(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_10_NoContext_5existing_windows = {"existing_windows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10_NoContext_5existing_windows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_10_NoContext_5existing_windows(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("existing_windows (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1867, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1867, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "existing_windows", 0) < (0)) __PYX_ERR(0, 1867, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("existing_windows", 1, 1, 1, i); __PYX_ERR(0, 1867, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1867, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("existing_windows", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1867, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.existing_windows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10_NoContext_4existing_windows(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10_NoContext_4existing_windows(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("existing_windows", 0); + + /* "apache_beam/runners/common.py":1869 + * @property + * def existing_windows(self): + * raise ValueError('No existing_windows in this context.') # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_No_existing_windows_in_this_cont}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1869, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1867 + * return self._timestamp + * + * @property # <<<<<<<<<<<<<< + * def existing_windows(self): + * raise ValueError('No existing_windows in this context.') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common._NoContext.existing_windows", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1877 + * Keeps track of state that DoFns want, currently, user counters. + * """ + * def __init__(self, counter_factory): # <<<<<<<<<<<<<< + * self.step_name = '' + * self._counter_factory = counter_factory +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9DoFnState_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_9DoFnState_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9DoFnState_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9DoFnState_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_counter_factory = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_counter_factory_2,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1877, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1877, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1877, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1877, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1877, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1877, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1877, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_counter_factory = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1877, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_9DoFnState___init__(__pyx_self, __pyx_v_self, __pyx_v_counter_factory); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_9DoFnState___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":1878 + * """ + * def __init__(self, counter_factory): + * self.step_name = '' # <<<<<<<<<<<<<< + * self._counter_factory = counter_factory + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name, __pyx_mstate_global->__pyx_kp_u__3) < (0)) __PYX_ERR(0, 1878, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1879 + * def __init__(self, counter_factory): + * self.step_name = '' + * self._counter_factory = counter_factory # <<<<<<<<<<<<<< + * + * def counter_for(self, aggregator): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory, __pyx_v_counter_factory) < (0)) __PYX_ERR(0, 1879, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1877 + * Keeps track of state that DoFns want, currently, user counters. + * """ + * def __init__(self, counter_factory): # <<<<<<<<<<<<<< + * self.step_name = '' + * self._counter_factory = counter_factory +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.DoFnState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1881 + * self._counter_factory = counter_factory + * + * def counter_for(self, aggregator): # <<<<<<<<<<<<<< + * """Looks up the counter for this aggregator, creating one if necessary.""" + * return self._counter_factory.get_aggregator_counter( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9DoFnState_3counter_for(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6common_9DoFnState_2counter_for, "Looks up the counter for this aggregator, creating one if necessary."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_9DoFnState_3counter_for = {"counter_for", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9DoFnState_3counter_for, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_9DoFnState_2counter_for}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9DoFnState_3counter_for(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_aggregator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("counter_for (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_aggregator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1881, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1881, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1881, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "counter_for", 0) < (0)) __PYX_ERR(0, 1881, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("counter_for", 1, 2, 2, i); __PYX_ERR(0, 1881, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1881, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1881, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_aggregator = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("counter_for", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1881, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnState.counter_for", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_9DoFnState_2counter_for(__pyx_self, __pyx_v_self, __pyx_v_aggregator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_9DoFnState_2counter_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aggregator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("counter_for", 0); + + /* "apache_beam/runners/common.py":1883 + * def counter_for(self, aggregator): + * """Looks up the counter for this aggregator, creating one if necessary.""" + * return self._counter_factory.get_aggregator_counter( # <<<<<<<<<<<<<< + * self.step_name, aggregator) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/common.py":1884 + * """Looks up the counter for this aggregator, creating one if necessary.""" + * return self._counter_factory.get_aggregator_counter( + * self.step_name, aggregator) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_aggregator}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_aggregator_counter, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/common.py":1881 + * self._counter_factory = counter_factory + * + * def counter_for(self, aggregator): # <<<<<<<<<<<<<< + * """Looks up the counter for this aggregator, creating one if necessary.""" + * return self._counter_factory.get_aggregator_counter( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnState.counter_for", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1890 + * class DoFnContext(object): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, label, element=None, state=None): # <<<<<<<<<<<<<< + * self.label = label + * self.state = state +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_label = 0; + PyObject *__pyx_v_element = 0; + PyObject *__pyx_v_state = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_label,&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1890, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1890, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1890, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1890, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1890, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 1890, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1890, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1890, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1890, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_label = values[0]; + __pyx_v_element = values[1]; + __pyx_v_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1890, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext___init__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self), __pyx_v_label, __pyx_v_element, __pyx_v_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6common_11DoFnContext___init__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, PyObject *__pyx_v_label, PyObject *__pyx_v_element, PyObject *__pyx_v_state) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/common.py":1891 + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, label, element=None, state=None): + * self.label = label # <<<<<<<<<<<<<< + * self.state = state + * if element is not None: +*/ + __Pyx_INCREF(__pyx_v_label); + __Pyx_GIVEREF(__pyx_v_label); + __Pyx_GOTREF(__pyx_v_self->label); + __Pyx_DECREF(__pyx_v_self->label); + __pyx_v_self->label = __pyx_v_label; + + /* "apache_beam/runners/common.py":1892 + * def __init__(self, label, element=None, state=None): + * self.label = label + * self.state = state # <<<<<<<<<<<<<< + * if element is not None: + * self.set_element(element) +*/ + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + __Pyx_GOTREF(__pyx_v_self->state); + __Pyx_DECREF(__pyx_v_self->state); + __pyx_v_self->state = __pyx_v_state; + + /* "apache_beam/runners/common.py":1893 + * self.label = label + * self.state = state + * if element is not None: # <<<<<<<<<<<<<< + * self.set_element(element) + * +*/ + __pyx_t_1 = (__pyx_v_element != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/common.py":1894 + * self.state = state + * if element is not None: + * self.set_element(element) # <<<<<<<<<<<<<< + * + * def set_element(self, windowed_value): +*/ + if (!(likely(((__pyx_v_element) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_element, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self->__pyx_vtab)->set_element(__pyx_v_self, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_element), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":1893 + * self.label = label + * self.state = state + * if element is not None: # <<<<<<<<<<<<<< + * self.set_element(element) + * +*/ + } + + /* "apache_beam/runners/common.py":1890 + * class DoFnContext(object): + * """For internal use only; no backwards-compatibility guarantees.""" + * def __init__(self, label, element=None, state=None): # <<<<<<<<<<<<<< + * self.label = label + * self.state = state +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1896 + * self.set_element(element) + * + * def set_element(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (Optional[WindowedValue]) -> None + * self.windowed_value = windowed_value +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6common_11DoFnContext_set_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_element", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_set_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/common.py":1898 + * def set_element(self, windowed_value): + * # type: (Optional[WindowedValue]) -> None + * self.windowed_value = windowed_value # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_INCREF((PyObject *)__pyx_v_windowed_value); + __Pyx_GIVEREF((PyObject *)__pyx_v_windowed_value); + __Pyx_GOTREF((PyObject *)__pyx_v_self->windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v_self->windowed_value); + __pyx_v_self->windowed_value = __pyx_v_windowed_value; + + /* "apache_beam/runners/common.py":1896 + * self.set_element(element) + * + * def set_element(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (Optional[WindowedValue]) -> None + * self.windowed_value = windowed_value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.set_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_3set_element = {"set_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_3set_element(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_element (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1896, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1896, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_element", 0) < (0)) __PYX_ERR(0, 1896, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_element", 1, 1, 1, i); __PYX_ERR(0, 1896, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1896, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set_element", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1896, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.set_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 1896, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_2set_element(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_2set_element(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_element", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6common_11DoFnContext_set_element(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.set_element", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1900 + * self.windowed_value = windowed_value + * + * @property # <<<<<<<<<<<<<< + * def element(self): + * if self.windowed_value is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7element_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7element_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7element___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7element___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/runners/common.py":1902 + * @property + * def element(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('element not accessible in this context') + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->windowed_value) == Py_None); + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/runners/common.py":1903 + * def element(self): + * if self.windowed_value is None: + * raise AttributeError('element not accessible in this context') # <<<<<<<<<<<<<< + * else: + * return self.windowed_value.value +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_element_not_accessible_in_this_c}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1903, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1902 + * @property + * def element(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('element not accessible in this context') + * else: +*/ + } + + /* "apache_beam/runners/common.py":1905 + * raise AttributeError('element not accessible in this context') + * else: + * return self.windowed_value.value # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->windowed_value->value); + __pyx_r = __pyx_v_self->windowed_value->value; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1900 + * self.windowed_value = windowed_value + * + * @property # <<<<<<<<<<<<<< + * def element(self): + * if self.windowed_value is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1907 + * return self.windowed_value.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * if self.windowed_value is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_9timestamp_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_9timestamp___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_9timestamp___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/runners/common.py":1909 + * @property + * def timestamp(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('timestamp not accessible in this context') + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->windowed_value) == Py_None); + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/runners/common.py":1910 + * def timestamp(self): + * if self.windowed_value is None: + * raise AttributeError('timestamp not accessible in this context') # <<<<<<<<<<<<<< + * else: + * return self.windowed_value.timestamp +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_timestamp_not_accessible_in_this}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1910, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1909 + * @property + * def timestamp(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('timestamp not accessible in this context') + * else: +*/ + } + + /* "apache_beam/runners/common.py":1912 + * raise AttributeError('timestamp not accessible in this context') + * else: + * return self.windowed_value.timestamp # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->windowed_value), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1907 + * return self.windowed_value.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * if self.windowed_value is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/common.py":1914 + * return self.windowed_value.timestamp + * + * @property # <<<<<<<<<<<<<< + * def windows(self): + * if self.windowed_value is None: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7windows_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7windows_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7windows___get__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_7windows___get__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/runners/common.py":1916 + * @property + * def windows(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('windows not accessible in this context') + * else: +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self->windowed_value) == Py_None); + if (unlikely(__pyx_t_1)) { + + /* "apache_beam/runners/common.py":1917 + * def windows(self): + * if self.windowed_value is None: + * raise AttributeError('windows not accessible in this context') # <<<<<<<<<<<<<< + * else: + * return self.windowed_value.windows +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_windows_not_accessible_in_this_c}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 1917, __pyx_L1_error) + + /* "apache_beam/runners/common.py":1916 + * @property + * def windows(self): + * if self.windowed_value is None: # <<<<<<<<<<<<<< + * raise AttributeError('windows not accessible in this context') + * else: +*/ + } + + /* "apache_beam/runners/common.py":1919 + * raise AttributeError('windows not accessible in this context') + * else: + * return self.windowed_value.windows # <<<<<<<<<<<<<< +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->windowed_value->windows); + __pyx_r = __pyx_v_self->windowed_value->windows; + goto __pyx_L0; + } + + /* "apache_beam/runners/common.py":1914 + * return self.windowed_value.timestamp + * + * @property # <<<<<<<<<<<<<< + * def windows(self): + * if self.windowed_value is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.windows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.label, self.state, self.windowed_value) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->label); + __Pyx_GIVEREF(__pyx_v_self->label); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->label) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->state); + __Pyx_GIVEREF(__pyx_v_self->state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->state) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->windowed_value); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->windowed_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->windowed_value)) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.label, self.state, self.windowed_value) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.label, self.state, self.windowed_value) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.label is not None or self.state is not None or self.windowed_value is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.label, self.state, self.windowed_value) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.label is not None or self.state is not None or self.windowed_value is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->label != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->state != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->windowed_value) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.label is not None or self.state is not None or self.windowed_value is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.label is not None or self.state is not None or self.windowed_value is not None + * if use_setstate: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnContext); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_61400015); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_61400015); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_61400015) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.label is not None or self.state is not None or self.windowed_value is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, None), state + * else: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnContext__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_61400015); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_61400015); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_61400015) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnContext__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_11DoFnContext_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_11DoFnContext_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoFnContext__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnContext__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnContext__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.common.DoFnContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_3__pyx_unpickle_Receiver(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_3__pyx_unpickle_Receiver = {"__pyx_unpickle_Receiver", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_3__pyx_unpickle_Receiver, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_3__pyx_unpickle_Receiver(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Receiver (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Receiver", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Receiver", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Receiver", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_Receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_2__pyx_unpickle_Receiver(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_2__pyx_unpickle_Receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Receiver", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = Receiver.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = Receiver.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = Receiver.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = Receiver.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_Receiver__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = Receiver.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_Receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_Receiver__set_state(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Receiver__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_Receiver__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Receiver__set_state(Receiver __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_Receiver__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MethodWrapper(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_5__pyx_unpickle_MethodWrapper(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_5__pyx_unpickle_MethodWrapper = {"__pyx_unpickle_MethodWrapper", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_5__pyx_unpickle_MethodWrapper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_5__pyx_unpickle_MethodWrapper(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MethodWrapper (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MethodWrapper", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MethodWrapper", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MethodWrapper", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_MethodWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_4__pyx_unpickle_MethodWrapper(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_4__pyx_unpickle_MethodWrapper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MethodWrapper", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MethodWrapper(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') # <<<<<<<<<<<<<< + * __pyx_result = MethodWrapper.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, __pyx_k_args_defaults_dynamic_timer_tag); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') + * __pyx_result = MethodWrapper.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') + * __pyx_result = MethodWrapper.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MethodWrapper.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_MethodWrapper__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') + * __pyx_result = MethodWrapper.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): + * __pyx_result.args = __pyx_state[0]; __pyx_result.defaults = __pyx_state[1]; __pyx_result.dynamic_timer_tag_arg_name = __pyx_state[2]; __pyx_result.has_userstate_arguments = __pyx_state[3]; __pyx_result.key_arg_name = __pyx_state[4]; __pyx_result.method_name = __pyx_state[5]; __pyx_result.method_value = __pyx_state[6]; __pyx_result.restriction_provider = __pyx_state[7]; __pyx_result.restriction_provider_arg_name = __pyx_state[8]; __pyx_result.state_args_to_replace = __pyx_state[9]; __pyx_result.timer_args_to_replace = __pyx_state[10]; __pyx_result.timestamp_arg_name = __pyx_state[11]; __pyx_result.unbounded_per_element = __pyx_state[12]; __pyx_result.watermark_estimator_provider = __pyx_state[13]; __pyx_result.watermark_estimator_provider_arg_name = __pyx_state[14]; __pyx_result.window_arg_name = __pyx_state[15] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MethodWrapper(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x49bc0f9, 0xc8b0c72, 0xed3c1c6, b'args, defaults, dynamic_timer_tag_arg_name, has_userstate_arguments, key_arg_name, method_name, method_value, restriction_provider, restriction_provider_arg_name, state_args_to_replace, timer_args_to_replace, timestamp_arg_name, unbounded_per_element, watermark_estimator_provider, watermark_estimator_provider_arg_name, window_arg_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_MethodWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.args = __pyx_state[0]; __pyx_result.defaults = __pyx_state[1]; __pyx_result.dynamic_timer_tag_arg_name = __pyx_state[2]; __pyx_result.has_userstate_arguments = __pyx_state[3]; __pyx_result.key_arg_name = __pyx_state[4]; __pyx_result.method_name = __pyx_state[5]; __pyx_result.method_value = __pyx_state[6]; __pyx_result.restriction_provider = __pyx_state[7]; __pyx_result.restriction_provider_arg_name = __pyx_state[8]; __pyx_result.state_args_to_replace = __pyx_state[9]; __pyx_result.timer_args_to_replace = __pyx_state[10]; __pyx_result.timestamp_arg_name = __pyx_state[11]; __pyx_result.unbounded_per_element = __pyx_state[12]; __pyx_result.watermark_estimator_provider = __pyx_state[13]; __pyx_result.watermark_estimator_provider_arg_name = __pyx_state[14]; __pyx_result.window_arg_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_MethodWrapper__set_state(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MethodWrapper__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): + * __pyx_result.args = __pyx_state[0]; __pyx_result.defaults = __pyx_state[1]; __pyx_result.dynamic_timer_tag_arg_name = __pyx_state[2]; __pyx_result.has_userstate_arguments = __pyx_state[3]; __pyx_result.key_arg_name = __pyx_state[4]; __pyx_result.method_name = __pyx_state[5]; __pyx_result.method_value = __pyx_state[6]; __pyx_result.restriction_provider = __pyx_state[7]; __pyx_result.restriction_provider_arg_name = __pyx_state[8]; __pyx_result.state_args_to_replace = __pyx_state[9]; __pyx_result.timer_args_to_replace = __pyx_state[10]; __pyx_result.timestamp_arg_name = __pyx_state[11]; __pyx_result.unbounded_per_element = __pyx_state[12]; __pyx_result.watermark_estimator_provider = __pyx_state[13]; __pyx_result.watermark_estimator_provider_arg_name = __pyx_state[14]; __pyx_result.window_arg_name = __pyx_state[15] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->args); + __Pyx_DECREF(__pyx_v___pyx_result->args); + __pyx_v___pyx_result->args = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->defaults); + __Pyx_DECREF(__pyx_v___pyx_result->defaults); + __pyx_v___pyx_result->defaults = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->dynamic_timer_tag_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->dynamic_timer_tag_arg_name); + __pyx_v___pyx_result->dynamic_timer_tag_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_userstate_arguments = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->key_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->key_arg_name); + __pyx_v___pyx_result->key_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->method_name); + __Pyx_DECREF(__pyx_v___pyx_result->method_name); + __pyx_v___pyx_result->method_name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->method_value); + __Pyx_DECREF(__pyx_v___pyx_result->method_value); + __pyx_v___pyx_result->method_value = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->restriction_provider); + __Pyx_DECREF(__pyx_v___pyx_result->restriction_provider); + __pyx_v___pyx_result->restriction_provider = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->restriction_provider_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->restriction_provider_arg_name); + __pyx_v___pyx_result->restriction_provider_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->state_args_to_replace); + __Pyx_DECREF(__pyx_v___pyx_result->state_args_to_replace); + __pyx_v___pyx_result->state_args_to_replace = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timer_args_to_replace); + __Pyx_DECREF(__pyx_v___pyx_result->timer_args_to_replace); + __pyx_v___pyx_result->timer_args_to_replace = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timestamp_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->timestamp_arg_name); + __pyx_v___pyx_result->timestamp_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->unbounded_per_element = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->watermark_estimator_provider); + __Pyx_DECREF(__pyx_v___pyx_result->watermark_estimator_provider); + __pyx_v___pyx_result->watermark_estimator_provider = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->watermark_estimator_provider_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->watermark_estimator_provider_arg_name); + __pyx_v___pyx_result->watermark_estimator_provider_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->window_arg_name); + __Pyx_DECREF(__pyx_v___pyx_result->window_arg_name); + __pyx_v___pyx_result->window_arg_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): + * __pyx_result.args = __pyx_state[0]; __pyx_result.defaults = __pyx_state[1]; __pyx_result.dynamic_timer_tag_arg_name = __pyx_state[2]; __pyx_result.has_userstate_arguments = __pyx_state[3]; __pyx_result.key_arg_name = __pyx_state[4]; __pyx_result.method_name = __pyx_state[5]; __pyx_result.method_value = __pyx_state[6]; __pyx_result.restriction_provider = __pyx_state[7]; __pyx_result.restriction_provider_arg_name = __pyx_state[8]; __pyx_result.state_args_to_replace = __pyx_state[9]; __pyx_result.timer_args_to_replace = __pyx_state[10]; __pyx_result.timestamp_arg_name = __pyx_state[11]; __pyx_result.unbounded_per_element = __pyx_state[12]; __pyx_result.watermark_estimator_provider = __pyx_state[13]; __pyx_result.watermark_estimator_provider_arg_name = __pyx_state[14]; __pyx_result.window_arg_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 16); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MethodWrapper__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MethodWrapper__set_state(MethodWrapper __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.args = __pyx_state[0]; __pyx_result.defaults = __pyx_state[1]; __pyx_result.dynamic_timer_tag_arg_name = __pyx_state[2]; __pyx_result.has_userstate_arguments = __pyx_state[3]; __pyx_result.key_arg_name = __pyx_state[4]; __pyx_result.method_name = __pyx_state[5]; __pyx_result.method_value = __pyx_state[6]; __pyx_result.restriction_provider = __pyx_state[7]; __pyx_result.restriction_provider_arg_name = __pyx_state[8]; __pyx_result.state_args_to_replace = __pyx_state[9]; __pyx_result.timer_args_to_replace = __pyx_state[10]; __pyx_result.timestamp_arg_name = __pyx_state[11]; __pyx_result.unbounded_per_element = __pyx_state[12]; __pyx_result.watermark_estimator_provider = __pyx_state[13]; __pyx_result.watermark_estimator_provider_arg_name = __pyx_state[14]; __pyx_result.window_arg_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_MethodWrapper__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_DoFnSignature(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_7__pyx_unpickle_DoFnSignature = {"__pyx_unpickle_DoFnSignature", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_DoFnSignature, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_7__pyx_unpickle_DoFnSignature(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnSignature (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DoFnSignature", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnSignature", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnSignature", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnSignature", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_6__pyx_unpickle_DoFnSignature(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_6__pyx_unpickle_DoFnSignature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnSignature", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') # <<<<<<<<<<<<<< + * __pyx_result = DoFnSignature.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, __pyx_k_is_stateful_dofn_batching_confi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') + * __pyx_result = DoFnSignature.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') + * __pyx_result = DoFnSignature.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DoFnSignature.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnSignature__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') + * __pyx_result = DoFnSignature.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): + * __pyx_result._is_stateful_dofn = __pyx_state[0]; __pyx_result.batching_configuration = __pyx_state[1]; __pyx_result.create_tracker_method = __pyx_state[2]; __pyx_result.create_watermark_estimator_method = __pyx_state[3]; __pyx_result.do_fn = __pyx_state[4]; __pyx_result.finish_bundle_method = __pyx_state[5]; __pyx_result.initial_restriction_method = __pyx_state[6]; __pyx_result.process_batch_method = __pyx_state[7]; __pyx_result.process_method = __pyx_state[8]; __pyx_result.setup_lifecycle_method = __pyx_state[9]; __pyx_result.split_method = __pyx_state[10]; __pyx_result.start_bundle_method = __pyx_state[11]; __pyx_result.teardown_lifecycle_method = __pyx_state[12]; __pyx_result.timer_methods = __pyx_state[13] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnSignature", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._is_stateful_dofn = __pyx_state[0]; __pyx_result.batching_configuration = __pyx_state[1]; __pyx_result.create_tracker_method = __pyx_state[2]; __pyx_result.create_watermark_estimator_method = __pyx_state[3]; __pyx_result.do_fn = __pyx_state[4]; __pyx_result.finish_bundle_method = __pyx_state[5]; __pyx_result.initial_restriction_method = __pyx_state[6]; __pyx_result.process_batch_method = __pyx_state[7]; __pyx_result.process_method = __pyx_state[8]; __pyx_result.setup_lifecycle_method = __pyx_state[9]; __pyx_result.split_method = __pyx_state[10]; __pyx_result.start_bundle_method = __pyx_state[11]; __pyx_result.teardown_lifecycle_method = __pyx_state[12]; __pyx_result.timer_methods = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnSignature__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnSignature__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): + * __pyx_result._is_stateful_dofn = __pyx_state[0]; __pyx_result.batching_configuration = __pyx_state[1]; __pyx_result.create_tracker_method = __pyx_state[2]; __pyx_result.create_watermark_estimator_method = __pyx_state[3]; __pyx_result.do_fn = __pyx_state[4]; __pyx_result.finish_bundle_method = __pyx_state[5]; __pyx_result.initial_restriction_method = __pyx_state[6]; __pyx_result.process_batch_method = __pyx_state[7]; __pyx_result.process_method = __pyx_state[8]; __pyx_result.setup_lifecycle_method = __pyx_state[9]; __pyx_result.split_method = __pyx_state[10]; __pyx_result.start_bundle_method = __pyx_state[11]; __pyx_result.teardown_lifecycle_method = __pyx_state[12]; __pyx_result.timer_methods = __pyx_state[13] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_is_stateful_dofn = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->batching_configuration); + __Pyx_DECREF(__pyx_v___pyx_result->batching_configuration); + __pyx_v___pyx_result->batching_configuration = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->create_tracker_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->create_tracker_method); + __pyx_v___pyx_result->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->create_watermark_estimator_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->create_watermark_estimator_method); + __pyx_v___pyx_result->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->do_fn); + __Pyx_DECREF(__pyx_v___pyx_result->do_fn); + __pyx_v___pyx_result->do_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->finish_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->finish_bundle_method); + __pyx_v___pyx_result->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->initial_restriction_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->initial_restriction_method); + __pyx_v___pyx_result->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->process_batch_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->process_batch_method); + __pyx_v___pyx_result->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->process_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->process_method); + __pyx_v___pyx_result->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->setup_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->setup_lifecycle_method); + __pyx_v___pyx_result->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->split_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->split_method); + __pyx_v___pyx_result->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->start_bundle_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->start_bundle_method); + __pyx_v___pyx_result->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->teardown_lifecycle_method); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->teardown_lifecycle_method); + __pyx_v___pyx_result->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timer_methods); + __Pyx_DECREF(__pyx_v___pyx_result->timer_methods); + __pyx_v___pyx_result->timer_methods = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): + * __pyx_result._is_stateful_dofn = __pyx_state[0]; __pyx_result.batching_configuration = __pyx_state[1]; __pyx_result.create_tracker_method = __pyx_state[2]; __pyx_result.create_watermark_estimator_method = __pyx_state[3]; __pyx_result.do_fn = __pyx_state[4]; __pyx_result.finish_bundle_method = __pyx_state[5]; __pyx_result.initial_restriction_method = __pyx_state[6]; __pyx_result.process_batch_method = __pyx_state[7]; __pyx_result.process_method = __pyx_state[8]; __pyx_result.setup_lifecycle_method = __pyx_state[9]; __pyx_result.split_method = __pyx_state[10]; __pyx_result.start_bundle_method = __pyx_state[11]; __pyx_result.teardown_lifecycle_method = __pyx_state[12]; __pyx_result.timer_methods = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 14); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DoFnSignature__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnSignature__set_state(DoFnSignature __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._is_stateful_dofn = __pyx_state[0]; __pyx_result.batching_configuration = __pyx_state[1]; __pyx_result.create_tracker_method = __pyx_state[2]; __pyx_result.create_watermark_estimator_method = __pyx_state[3]; __pyx_result.do_fn = __pyx_state[4]; __pyx_result.finish_bundle_method = __pyx_state[5]; __pyx_result.initial_restriction_method = __pyx_state[6]; __pyx_result.process_batch_method = __pyx_state[7]; __pyx_result.process_method = __pyx_state[8]; __pyx_result.setup_lifecycle_method = __pyx_state[9]; __pyx_result.split_method = __pyx_state[10]; __pyx_result.start_bundle_method = __pyx_state[11]; __pyx_result.teardown_lifecycle_method = __pyx_state[12]; __pyx_result.timer_methods = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnSignature__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_DoFnInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_9__pyx_unpickle_DoFnInvoker = {"__pyx_unpickle_DoFnInvoker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_DoFnInvoker, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_9__pyx_unpickle_DoFnInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnInvoker (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DoFnInvoker", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnInvoker", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnInvoker", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_8__pyx_unpickle_DoFnInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_8__pyx_unpickle_DoFnInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnInvoker", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DoFnInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') # <<<<<<<<<<<<<< + * __pyx_result = DoFnInvoker.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, __pyx_k_bundle_context_values__setup_co); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') + * __pyx_result = DoFnInvoker.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') + * __pyx_result = DoFnInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DoFnInvoker.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnInvoker__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') + * __pyx_result = DoFnInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x1fb7971, 0x3c04d4f, 0x19c44e4, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, signature, user_state_context') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnInvoker__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_bundle_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->_bundle_context_values); + __pyx_v___pyx_result->_bundle_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_setup_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->_setup_context_values); + __pyx_v___pyx_result->_setup_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v___pyx_result->bundle_finalizer_param); + __pyx_v___pyx_result->bundle_finalizer_param = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->output_handler); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->output_handler); + __pyx_v___pyx_result->output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->signature); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->signature); + __pyx_v___pyx_result->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->user_state_context); + __pyx_v___pyx_result->user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DoFnInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnInvoker__set_state(DoFnInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.signature = __pyx_state[4]; __pyx_result.user_state_context = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnInvoker__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_SimpleInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_11__pyx_unpickle_SimpleInvoker = {"__pyx_unpickle_SimpleInvoker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_SimpleInvoker, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_11__pyx_unpickle_SimpleInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleInvoker (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SimpleInvoker", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleInvoker", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleInvoker", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_SimpleInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_10__pyx_unpickle_SimpleInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_10__pyx_unpickle_SimpleInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleInvoker", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') # <<<<<<<<<<<<<< + * __pyx_result = SimpleInvoker.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, __pyx_k_bundle_context_values__setup_co_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') + * __pyx_result = SimpleInvoker.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') + * __pyx_result = SimpleInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SimpleInvoker.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_SimpleInvoker__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') + * __pyx_result = SimpleInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.process_batch_method = __pyx_state[4]; __pyx_result.process_method = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.user_state_context = __pyx_state[7] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_SimpleInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.process_batch_method = __pyx_state[4]; __pyx_result.process_method = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.user_state_context = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_SimpleInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleInvoker__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.process_batch_method = __pyx_state[4]; __pyx_result.process_method = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.user_state_context = __pyx_state[7] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bundle_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bundle_context_values); + __pyx_v___pyx_result->__pyx_base._bundle_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._setup_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._setup_context_values); + __pyx_v___pyx_result->__pyx_base._setup_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.bundle_finalizer_param); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.bundle_finalizer_param); + __pyx_v___pyx_result->__pyx_base.bundle_finalizer_param = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.output_handler); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.output_handler); + __pyx_v___pyx_result->__pyx_base.output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->process_batch_method); + __Pyx_DECREF(__pyx_v___pyx_result->process_batch_method); + __pyx_v___pyx_result->process_batch_method = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->process_method); + __Pyx_DECREF(__pyx_v___pyx_result->process_method); + __pyx_v___pyx_result->process_method = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.signature); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.signature); + __pyx_v___pyx_result->__pyx_base.signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.process_batch_method = __pyx_state[4]; __pyx_result.process_method = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.user_state_context = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SimpleInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SimpleInvoker__set_state(SimpleInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.bundle_finalizer_param = __pyx_state[2]; __pyx_result.output_handler = __pyx_state[3]; __pyx_result.process_batch_method = __pyx_state[4]; __pyx_result.process_method = __pyx_state[5]; __pyx_result.signature = __pyx_state[6]; __pyx_result.user_state_context = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_SimpleInvoker__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PerWindowInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_PerWindowInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_13__pyx_unpickle_PerWindowInvoker = {"__pyx_unpickle_PerWindowInvoker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_PerWindowInvoker, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_13__pyx_unpickle_PerWindowInvoker(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_PerWindowInvoker (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_PerWindowInvoker", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PerWindowInvoker", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PerWindowInvoker", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_PerWindowInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_12__pyx_unpickle_PerWindowInvoker(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_12__pyx_unpickle_PerWindowInvoker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PerWindowInvoker", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_PerWindowInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') # <<<<<<<<<<<<<< + * __pyx_result = PerWindowInvoker.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, __pyx_k_bundle_context_values__setup_co_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') + * __pyx_result = PerWindowInvoker.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') + * __pyx_result = PerWindowInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = PerWindowInvoker.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_PerWindowInvoker__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') + * __pyx_result = PerWindowInvoker.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.args_for_process = __pyx_state[2]; __pyx_result.args_for_process_batch = __pyx_state[3]; __pyx_result.bundle_finalizer_param = __pyx_state[4]; __pyx_result.context = __pyx_state[5]; __pyx_result.current_window_index = __pyx_state[6]; __pyx_result.current_windowed_value = __pyx_state[7]; __pyx_result.has_cached_window_args = __pyx_state[8]; __pyx_result.has_cached_window_batch_args = __pyx_state[9]; __pyx_result.has_windowed_inputs = __pyx_state[10]; __pyx_result.is_key_param_required = __pyx_state[11]; __pyx_result.is_splittable = __pyx_state[12]; __pyx_result.kwargs_for_process = __pyx_state[13]; __pyx_result.kwargs_for_process_batch = __pyx_state[14]; __pyx_result.output_handler = __pyx_state[15]; __pyx_result.placeholders_for_process = __pyx_state[16]; __pyx_result.placeholders_for_process_batch = __pyx_state[17]; __pyx_result.process_batch_method = __pyx_state[18]; __pyx_result.process_method = __pyx_state[19]; __pyx_result.recalculate_window_args = __pyx_state[20]; __pyx_result.restriction = __pyx_state[21]; __pyx_result.side_inputs = __pyx_state[22]; __pyx_result.signature = __pyx_state[23]; __pyx_result.splitting_lock = __pyx_state[24]; __pyx_result.stop_window_index = __pyx_state[25]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[26]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[27]; __pyx_result.user_state_context = __pyx_state[28]; __pyx_result.watermark_estimator_state = __pyx_state[29] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PerWindowInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x74fffff, 0x2e8f3b2, 0xcaecfd7, b'_bundle_context_values, _setup_context_values, args_for_process, args_for_process_batch, bundle_finalizer_param, context, current_window_index, current_windowed_value, has_cached_window_args, has_cached_window_batch_args, has_windowed_inputs, is_key_param_required, is_splittable, kwargs_for_process, kwargs_for_process_batch, output_handler, placeholders_for_process, placeholders_for_process_batch, process_batch_method, process_method, recalculate_window_args, restriction, side_inputs, signature, splitting_lock, stop_window_index, threadsafe_restriction_tracker, threadsafe_watermark_estimator, user_state_context, watermark_estimator_state') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_PerWindowInvoker", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.args_for_process = __pyx_state[2]; __pyx_result.args_for_process_batch = __pyx_state[3]; __pyx_result.bundle_finalizer_param = __pyx_state[4]; __pyx_result.context = __pyx_state[5]; __pyx_result.current_window_index = __pyx_state[6]; __pyx_result.current_windowed_value = __pyx_state[7]; __pyx_result.has_cached_window_args = __pyx_state[8]; __pyx_result.has_cached_window_batch_args = __pyx_state[9]; __pyx_result.has_windowed_inputs = __pyx_state[10]; __pyx_result.is_key_param_required = __pyx_state[11]; __pyx_result.is_splittable = __pyx_state[12]; __pyx_result.kwargs_for_process = __pyx_state[13]; __pyx_result.kwargs_for_process_batch = __pyx_state[14]; __pyx_result.output_handler = __pyx_state[15]; __pyx_result.placeholders_for_process = __pyx_state[16]; __pyx_result.placeholders_for_process_batch = __pyx_state[17]; __pyx_result.process_batch_method = __pyx_state[18]; __pyx_result.process_method = __pyx_state[19]; __pyx_result.recalculate_window_args = __pyx_state[20]; __pyx_result.restriction = __pyx_state[21]; __pyx_result.side_inputs = __pyx_state[22]; __pyx_result.signature = __pyx_state[23]; __pyx_result.splitting_lock = __pyx_state[24]; __pyx_result.stop_window_index = __pyx_state[25]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[26]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[27]; __pyx_result.user_state_context = __pyx_state[28]; __pyx_result.watermark_estimator_state = __pyx_state[29] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 30) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_PerWindowInvoker__set_state(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PerWindowInvoker__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.args_for_process = __pyx_state[2]; __pyx_result.args_for_process_batch = __pyx_state[3]; __pyx_result.bundle_finalizer_param = __pyx_state[4]; __pyx_result.context = __pyx_state[5]; __pyx_result.current_window_index = __pyx_state[6]; __pyx_result.current_windowed_value = __pyx_state[7]; __pyx_result.has_cached_window_args = __pyx_state[8]; __pyx_result.has_cached_window_batch_args = __pyx_state[9]; __pyx_result.has_windowed_inputs = __pyx_state[10]; __pyx_result.is_key_param_required = __pyx_state[11]; __pyx_result.is_splittable = __pyx_state[12]; __pyx_result.kwargs_for_process = __pyx_state[13]; __pyx_result.kwargs_for_process_batch = __pyx_state[14]; __pyx_result.output_handler = __pyx_state[15]; __pyx_result.placeholders_for_process = __pyx_state[16]; __pyx_result.placeholders_for_process_batch = __pyx_state[17]; __pyx_result.process_batch_method = __pyx_state[18]; __pyx_result.process_method = __pyx_state[19]; __pyx_result.recalculate_window_args = __pyx_state[20]; __pyx_result.restriction = __pyx_state[21]; __pyx_result.side_inputs = __pyx_state[22]; __pyx_result.signature = __pyx_state[23]; __pyx_result.splitting_lock = __pyx_state[24]; __pyx_result.stop_window_index = __pyx_state[25]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[26]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[27]; __pyx_result.user_state_context = __pyx_state[28]; __pyx_result.watermark_estimator_state = __pyx_state[29] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 30) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._bundle_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._bundle_context_values); + __pyx_v___pyx_result->__pyx_base._bundle_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._setup_context_values); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._setup_context_values); + __pyx_v___pyx_result->__pyx_base._setup_context_values = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->args_for_process); + __Pyx_DECREF(__pyx_v___pyx_result->args_for_process); + __pyx_v___pyx_result->args_for_process = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->args_for_process_batch); + __Pyx_DECREF(__pyx_v___pyx_result->args_for_process_batch); + __pyx_v___pyx_result->args_for_process_batch = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.bundle_finalizer_param); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.bundle_finalizer_param); + __pyx_v___pyx_result->__pyx_base.bundle_finalizer_param = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->context); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->context); + __pyx_v___pyx_result->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->current_window_index); + __Pyx_DECREF(__pyx_v___pyx_result->current_window_index); + __pyx_v___pyx_result->current_window_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->current_windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->current_windowed_value); + __pyx_v___pyx_result->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_cached_window_args = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_cached_window_batch_args = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_windowed_inputs = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_key_param_required = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_splittable = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->kwargs_for_process); + __Pyx_DECREF(__pyx_v___pyx_result->kwargs_for_process); + __pyx_v___pyx_result->kwargs_for_process = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->kwargs_for_process_batch); + __Pyx_DECREF(__pyx_v___pyx_result->kwargs_for_process_batch); + __pyx_v___pyx_result->kwargs_for_process_batch = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.output_handler); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.output_handler); + __pyx_v___pyx_result->__pyx_base.output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->placeholders_for_process); + __Pyx_DECREF(__pyx_v___pyx_result->placeholders_for_process); + __pyx_v___pyx_result->placeholders_for_process = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->placeholders_for_process_batch); + __Pyx_DECREF(__pyx_v___pyx_result->placeholders_for_process_batch); + __pyx_v___pyx_result->placeholders_for_process_batch = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->process_batch_method); + __Pyx_DECREF(__pyx_v___pyx_result->process_batch_method); + __pyx_v___pyx_result->process_batch_method = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->process_method); + __Pyx_DECREF(__pyx_v___pyx_result->process_method); + __pyx_v___pyx_result->process_method = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->recalculate_window_args = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->restriction); + __Pyx_DECREF(__pyx_v___pyx_result->restriction); + __pyx_v___pyx_result->restriction = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->side_inputs); + __Pyx_DECREF(__pyx_v___pyx_result->side_inputs); + __pyx_v___pyx_result->side_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.signature); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.signature); + __pyx_v___pyx_result->__pyx_base.signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->splitting_lock); + __Pyx_DECREF(__pyx_v___pyx_result->splitting_lock); + __pyx_v___pyx_result->splitting_lock = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 25, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->stop_window_index); + __Pyx_DECREF(__pyx_v___pyx_result->stop_window_index); + __pyx_v___pyx_result->stop_window_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 26, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->threadsafe_restriction_tracker); + __Pyx_DECREF(__pyx_v___pyx_result->threadsafe_restriction_tracker); + __pyx_v___pyx_result->threadsafe_restriction_tracker = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 27, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->threadsafe_watermark_estimator); + __Pyx_DECREF(__pyx_v___pyx_result->threadsafe_watermark_estimator); + __pyx_v___pyx_result->threadsafe_watermark_estimator = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 28, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 29, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->watermark_estimator_state); + __Pyx_DECREF(__pyx_v___pyx_result->watermark_estimator_state); + __pyx_v___pyx_result->watermark_estimator_state = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.args_for_process = __pyx_state[2]; __pyx_result.args_for_process_batch = __pyx_state[3]; __pyx_result.bundle_finalizer_param = __pyx_state[4]; __pyx_result.context = __pyx_state[5]; __pyx_result.current_window_index = __pyx_state[6]; __pyx_result.current_windowed_value = __pyx_state[7]; __pyx_result.has_cached_window_args = __pyx_state[8]; __pyx_result.has_cached_window_batch_args = __pyx_state[9]; __pyx_result.has_windowed_inputs = __pyx_state[10]; __pyx_result.is_key_param_required = __pyx_state[11]; __pyx_result.is_splittable = __pyx_state[12]; __pyx_result.kwargs_for_process = __pyx_state[13]; __pyx_result.kwargs_for_process_batch = __pyx_state[14]; __pyx_result.output_handler = __pyx_state[15]; __pyx_result.placeholders_for_process = __pyx_state[16]; __pyx_result.placeholders_for_process_batch = __pyx_state[17]; __pyx_result.process_batch_method = __pyx_state[18]; __pyx_result.process_method = __pyx_state[19]; __pyx_result.recalculate_window_args = __pyx_state[20]; __pyx_result.restriction = __pyx_state[21]; __pyx_result.side_inputs = __pyx_state[22]; __pyx_result.signature = __pyx_state[23]; __pyx_result.splitting_lock = __pyx_state[24]; __pyx_result.stop_window_index = __pyx_state[25]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[26]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[27]; __pyx_result.user_state_context = __pyx_state[28]; __pyx_result.watermark_estimator_state = __pyx_state[29] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 30) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 30); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_PerWindowInvoker__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PerWindowInvoker__set_state(PerWindowInvoker __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._bundle_context_values = __pyx_state[0]; __pyx_result._setup_context_values = __pyx_state[1]; __pyx_result.args_for_process = __pyx_state[2]; __pyx_result.args_for_process_batch = __pyx_state[3]; __pyx_result.bundle_finalizer_param = __pyx_state[4]; __pyx_result.context = __pyx_state[5]; __pyx_result.current_window_index = __pyx_state[6]; __pyx_result.current_windowed_value = __pyx_state[7]; __pyx_result.has_cached_window_args = __pyx_state[8]; __pyx_result.has_cached_window_batch_args = __pyx_state[9]; __pyx_result.has_windowed_inputs = __pyx_state[10]; __pyx_result.is_key_param_required = __pyx_state[11]; __pyx_result.is_splittable = __pyx_state[12]; __pyx_result.kwargs_for_process = __pyx_state[13]; __pyx_result.kwargs_for_process_batch = __pyx_state[14]; __pyx_result.output_handler = __pyx_state[15]; __pyx_result.placeholders_for_process = __pyx_state[16]; __pyx_result.placeholders_for_process_batch = __pyx_state[17]; __pyx_result.process_batch_method = __pyx_state[18]; __pyx_result.process_method = __pyx_state[19]; __pyx_result.recalculate_window_args = __pyx_state[20]; __pyx_result.restriction = __pyx_state[21]; __pyx_result.side_inputs = __pyx_state[22]; __pyx_result.signature = __pyx_state[23]; __pyx_result.splitting_lock = __pyx_state[24]; __pyx_result.stop_window_index = __pyx_state[25]; __pyx_result.threadsafe_restriction_tracker = __pyx_state[26]; __pyx_result.threadsafe_watermark_estimator = __pyx_state[27]; __pyx_result.user_state_context = __pyx_state[28]; __pyx_result.watermark_estimator_state = __pyx_state[29] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 30) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_PerWindowInvoker__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_DoFnRunner(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_15__pyx_unpickle_DoFnRunner = {"__pyx_unpickle_DoFnRunner", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_DoFnRunner, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_15__pyx_unpickle_DoFnRunner(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnRunner (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DoFnRunner", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnRunner", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnRunner", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnRunner", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_14__pyx_unpickle_DoFnRunner(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_14__pyx_unpickle_DoFnRunner(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnRunner", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') # <<<<<<<<<<<<<< + * __pyx_result = DoFnRunner.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, __pyx_k_bundle_finalizer_param_context_d); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') + * __pyx_result = DoFnRunner.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') + * __pyx_result = DoFnRunner.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DoFnRunner.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnRunner__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') + * __pyx_result = DoFnRunner.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): + * __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.context = __pyx_state[1]; __pyx_result.do_fn_invoker = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.side_inputs = __pyx_state[4]; __pyx_result.step_name = __pyx_state[5]; __pyx_result.transform_id = __pyx_state[6] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnRunner", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.context = __pyx_state[1]; __pyx_result.do_fn_invoker = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.side_inputs = __pyx_state[4]; __pyx_result.step_name = __pyx_state[5]; __pyx_result.transform_id = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnRunner__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnRunner__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): + * __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.context = __pyx_state[1]; __pyx_result.do_fn_invoker = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.side_inputs = __pyx_state[4]; __pyx_result.step_name = __pyx_state[5]; __pyx_result.transform_id = __pyx_state[6] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->bundle_finalizer_param); + __Pyx_DECREF(__pyx_v___pyx_result->bundle_finalizer_param); + __pyx_v___pyx_result->bundle_finalizer_param = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->context); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->context); + __pyx_v___pyx_result->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->do_fn_invoker); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->do_fn_invoker); + __pyx_v___pyx_result->do_fn_invoker = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->execution_context); + __pyx_v___pyx_result->execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->side_inputs); + __Pyx_DECREF(__pyx_v___pyx_result->side_inputs); + __pyx_v___pyx_result->side_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->step_name); + __Pyx_DECREF(__pyx_v___pyx_result->step_name); + __pyx_v___pyx_result->step_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->transform_id); + __Pyx_DECREF(__pyx_v___pyx_result->transform_id); + __pyx_v___pyx_result->transform_id = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): + * __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.context = __pyx_state[1]; __pyx_result.do_fn_invoker = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.side_inputs = __pyx_state[4]; __pyx_result.step_name = __pyx_state[5]; __pyx_result.transform_id = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 7); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DoFnRunner__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnRunner__set_state(DoFnRunner __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.bundle_finalizer_param = __pyx_state[0]; __pyx_result.context = __pyx_state[1]; __pyx_result.do_fn_invoker = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.side_inputs = __pyx_state[4]; __pyx_result.step_name = __pyx_state[5]; __pyx_result.transform_id = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnRunner__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_OutputHandler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_17__pyx_unpickle_OutputHandler = {"__pyx_unpickle_OutputHandler", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_OutputHandler, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_17__pyx_unpickle_OutputHandler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_OutputHandler (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_OutputHandler", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OutputHandler", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OutputHandler", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_16__pyx_unpickle_OutputHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_16__pyx_unpickle_OutputHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_OutputHandler", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = OutputHandler.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_OutputHandler__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_OutputHandler__set_state(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_OutputHandler__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_OutputHandler__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_OutputHandler__set_state(OutputHandler __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_OutputHandler__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle__OutputHandler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_19__pyx_unpickle__OutputHandler = {"__pyx_unpickle__OutputHandler", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle__OutputHandler, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_19__pyx_unpickle__OutputHandler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__OutputHandler (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__OutputHandler", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OutputHandler", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__OutputHandler", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle__OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_18__pyx_unpickle__OutputHandler(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_18__pyx_unpickle__OutputHandler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__OutputHandler", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') # <<<<<<<<<<<<<< + * __pyx_result = _OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, __pyx_k_process_batch_yields_elements_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') + * __pyx_result = _OutputHandler.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') + * __pyx_result = _OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle__OutputHandler__set_state(((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') + * __pyx_result = _OutputHandler.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): + * __pyx_result._process_batch_yields_elements = __pyx_state[0]; __pyx_result._process_yields_batches = __pyx_state[1]; __pyx_result.main_receivers = __pyx_state[2]; __pyx_result.output_batch_converter = __pyx_state[3]; __pyx_result.per_element_output_counter = __pyx_state[4]; __pyx_result.tagged_receivers = __pyx_state[5]; __pyx_result.window_fn = __pyx_state[6] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle__OutputHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._process_batch_yields_elements = __pyx_state[0]; __pyx_result._process_yields_batches = __pyx_state[1]; __pyx_result.main_receivers = __pyx_state[2]; __pyx_result.output_batch_converter = __pyx_state[3]; __pyx_result.per_element_output_counter = __pyx_state[4]; __pyx_result.tagged_receivers = __pyx_state[5]; __pyx_result.window_fn = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle__OutputHandler__set_state(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__OutputHandler__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): + * __pyx_result._process_batch_yields_elements = __pyx_state[0]; __pyx_result._process_yields_batches = __pyx_state[1]; __pyx_result.main_receivers = __pyx_state[2]; __pyx_result.output_batch_converter = __pyx_state[3]; __pyx_result.per_element_output_counter = __pyx_state[4]; __pyx_result.tagged_receivers = __pyx_state[5]; __pyx_result.window_fn = __pyx_state[6] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_process_batch_yields_elements = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_process_yields_batches = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->main_receivers); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->main_receivers); + __pyx_v___pyx_result->main_receivers = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->output_batch_converter); + __Pyx_DECREF(__pyx_v___pyx_result->output_batch_converter); + __pyx_v___pyx_result->output_batch_converter = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->per_element_output_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->per_element_output_counter); + __pyx_v___pyx_result->per_element_output_counter = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->tagged_receivers); + __Pyx_DECREF(__pyx_v___pyx_result->tagged_receivers); + __pyx_v___pyx_result->tagged_receivers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->window_fn); + __Pyx_DECREF(__pyx_v___pyx_result->window_fn); + __pyx_v___pyx_result->window_fn = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): + * __pyx_result._process_batch_yields_elements = __pyx_state[0]; __pyx_result._process_yields_batches = __pyx_state[1]; __pyx_result.main_receivers = __pyx_state[2]; __pyx_result.output_batch_converter = __pyx_state[3]; __pyx_result.per_element_output_counter = __pyx_state[4]; __pyx_result.tagged_receivers = __pyx_state[5]; __pyx_result.window_fn = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__OutputHandler__set_state(<_OutputHandler> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__OutputHandler__set_state(_OutputHandler __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._process_batch_yields_elements = __pyx_state[0]; __pyx_result._process_yields_batches = __pyx_state[1]; __pyx_result.main_receivers = __pyx_state[2]; __pyx_result.output_batch_converter = __pyx_state[3]; __pyx_result.per_element_output_counter = __pyx_state[4]; __pyx_result.tagged_receivers = __pyx_state[5]; __pyx_result.window_fn = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle__OutputHandler__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnContext(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_DoFnContext(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6common_21__pyx_unpickle_DoFnContext = {"__pyx_unpickle_DoFnContext", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_DoFnContext, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6common_21__pyx_unpickle_DoFnContext(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnContext (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DoFnContext", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnContext", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoFnContext", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6common_20__pyx_unpickle_DoFnContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6common_20__pyx_unpickle_DoFnContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnContext", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DoFnContext(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') # <<<<<<<<<<<<<< + * __pyx_result = DoFnContext.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, __pyx_k_label_state_windowed_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') + * __pyx_result = DoFnContext.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') + * __pyx_result = DoFnContext.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DoFnContext.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnContext__set_state(((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') + * __pyx_result = DoFnContext.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): + * __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnContext(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x3a8e3cf, 0xba3ce3b, 0x1b535c7, b'label, state, windowed_value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6common___pyx_unpickle_DoFnContext__set_state(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoFnContext__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): + * __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->label); + __Pyx_DECREF(__pyx_v___pyx_result->label); + __pyx_v___pyx_result->label = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->state); + __Pyx_DECREF(__pyx_v___pyx_result->state); + __pyx_v___pyx_result->state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->windowed_value); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->windowed_value); + __pyx_v___pyx_result->windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): + * __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DoFnContext__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoFnContext__set_state(DoFnContext __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.label = __pyx_state[0]; __pyx_result.state = __pyx_state[1]; __pyx_result.windowed_value = __pyx_state[2] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 3) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.common.__pyx_unpickle_DoFnContext__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_vtable_11apache_beam_7runners_6common_Receiver; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_Receiver(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_Receiver *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6common_Receiver; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_Receiver(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_Receiver) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_Receiver[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_Receiver_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_Receiver}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n An object that consumes a WindowedValue.\n\n This class can be efficiently used to pass values between the\n sdk and worker harnesses.\n ")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_Receiver}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_Receiver}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_Receiver_spec = { + "apache_beam.runners.common.Receiver", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_7runners_6common_Receiver_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_Receiver = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""Receiver", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_Receiver, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n An object that consumes a WindowedValue.\n\n This class can be efficiently used to pass values between the\n sdk and worker harnesses.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_Receiver, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_Receiver, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_MethodWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)o); + p->args = Py_None; Py_INCREF(Py_None); + p->defaults = Py_None; Py_INCREF(Py_None); + p->method_value = Py_None; Py_INCREF(Py_None); + p->method_name = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->state_args_to_replace = Py_None; Py_INCREF(Py_None); + p->timer_args_to_replace = Py_None; Py_INCREF(Py_None); + p->timestamp_arg_name = Py_None; Py_INCREF(Py_None); + p->window_arg_name = Py_None; Py_INCREF(Py_None); + p->key_arg_name = Py_None; Py_INCREF(Py_None); + p->restriction_provider = Py_None; Py_INCREF(Py_None); + p->restriction_provider_arg_name = Py_None; Py_INCREF(Py_None); + p->watermark_estimator_provider = Py_None; Py_INCREF(Py_None); + p->watermark_estimator_provider_arg_name = Py_None; Py_INCREF(Py_None); + p->dynamic_timer_tag_arg_name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_MethodWrapper(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *p = (struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_MethodWrapper) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->args); + Py_CLEAR(p->defaults); + Py_CLEAR(p->method_value); + Py_CLEAR(p->method_name); + Py_CLEAR(p->state_args_to_replace); + Py_CLEAR(p->timer_args_to_replace); + Py_CLEAR(p->timestamp_arg_name); + Py_CLEAR(p->window_arg_name); + Py_CLEAR(p->key_arg_name); + Py_CLEAR(p->restriction_provider); + Py_CLEAR(p->restriction_provider_arg_name); + Py_CLEAR(p->watermark_estimator_provider); + Py_CLEAR(p->watermark_estimator_provider_arg_name); + Py_CLEAR(p->dynamic_timer_tag_arg_name); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_MethodWrapper(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *p = (struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->args) { + e = (*v)(p->args, a); if (e) return e; + } + if (p->defaults) { + e = (*v)(p->defaults, a); if (e) return e; + } + if (p->method_value) { + e = (*v)(p->method_value, a); if (e) return e; + } + if (p->state_args_to_replace) { + e = (*v)(p->state_args_to_replace, a); if (e) return e; + } + if (p->timer_args_to_replace) { + e = (*v)(p->timer_args_to_replace, a); if (e) return e; + } + if (p->timestamp_arg_name) { + e = (*v)(p->timestamp_arg_name, a); if (e) return e; + } + if (p->window_arg_name) { + e = (*v)(p->window_arg_name, a); if (e) return e; + } + if (p->key_arg_name) { + e = (*v)(p->key_arg_name, a); if (e) return e; + } + if (p->restriction_provider) { + e = (*v)(p->restriction_provider, a); if (e) return e; + } + if (p->restriction_provider_arg_name) { + e = (*v)(p->restriction_provider_arg_name, a); if (e) return e; + } + if (p->watermark_estimator_provider) { + e = (*v)(p->watermark_estimator_provider, a); if (e) return e; + } + if (p->watermark_estimator_provider_arg_name) { + e = (*v)(p->watermark_estimator_provider_arg_name, a); if (e) return e; + } + if (p->dynamic_timer_tag_arg_name) { + e = (*v)(p->dynamic_timer_tag_arg_name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_MethodWrapper(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *p = (struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)o; + tmp = ((PyObject*)p->args); + p->args = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->defaults); + p->defaults = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->method_value); + p->method_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->state_args_to_replace); + p->state_args_to_replace = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timer_args_to_replace); + p->timer_args_to_replace = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timestamp_arg_name); + p->timestamp_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->window_arg_name); + p->window_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->key_arg_name); + p->key_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->restriction_provider); + p->restriction_provider = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->restriction_provider_arg_name); + p->restriction_provider_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->watermark_estimator_provider); + p->watermark_estimator_provider = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->watermark_estimator_provider_arg_name); + p->watermark_estimator_provider_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->dynamic_timer_tag_arg_name); + p->dynamic_timer_tag_arg_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_args(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_4args_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_defaults(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_defaults(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_8defaults_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_method_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_method_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_12method_value_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_28watermark_estimator_provider_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_MethodWrapper[] = { + {"invoke_timer_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_MethodWrapper[] = { + {"args", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_args, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_args, 0, 0}, + {"defaults", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_defaults, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_defaults, 0, 0}, + {"method_value", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_method_value, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_method_value, 0, 0}, + {"watermark_estimator_provider", __pyx_getprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider, __pyx_setprop_11apache_beam_7runners_6common_13MethodWrapper_watermark_estimator_provider, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_MethodWrapper_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_MethodWrapper}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Represents a method that can be invoked by `DoFnInvoker`.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_MethodWrapper}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_MethodWrapper}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_MethodWrapper}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6common_MethodWrapper}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_MethodWrapper}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_MethodWrapper_spec = { + "apache_beam.runners.common.MethodWrapper", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_MethodWrapper_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_MethodWrapper = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""MethodWrapper", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_MethodWrapper, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n Represents a method that can be invoked by `DoFnInvoker`."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_MethodWrapper, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_MethodWrapper, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_MethodWrapper, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6common_MethodWrapper, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_13MethodWrapper_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_MethodWrapper, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnSignature(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)o); + p->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + p->batching_configuration = Py_None; Py_INCREF(Py_None); + p->do_fn = Py_None; Py_INCREF(Py_None); + p->timer_methods = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnSignature(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnSignature) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->process_method); + Py_CLEAR(p->process_batch_method); + Py_CLEAR(p->start_bundle_method); + Py_CLEAR(p->finish_bundle_method); + Py_CLEAR(p->setup_lifecycle_method); + Py_CLEAR(p->teardown_lifecycle_method); + Py_CLEAR(p->create_watermark_estimator_method); + Py_CLEAR(p->initial_restriction_method); + Py_CLEAR(p->create_tracker_method); + Py_CLEAR(p->split_method); + Py_CLEAR(p->batching_configuration); + Py_CLEAR(p->do_fn); + Py_CLEAR(p->timer_methods); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnSignature(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->process_method) { + e = (*v)(((PyObject *)p->process_method), a); if (e) return e; + } + if (p->process_batch_method) { + e = (*v)(((PyObject *)p->process_batch_method), a); if (e) return e; + } + if (p->start_bundle_method) { + e = (*v)(((PyObject *)p->start_bundle_method), a); if (e) return e; + } + if (p->finish_bundle_method) { + e = (*v)(((PyObject *)p->finish_bundle_method), a); if (e) return e; + } + if (p->setup_lifecycle_method) { + e = (*v)(((PyObject *)p->setup_lifecycle_method), a); if (e) return e; + } + if (p->teardown_lifecycle_method) { + e = (*v)(((PyObject *)p->teardown_lifecycle_method), a); if (e) return e; + } + if (p->create_watermark_estimator_method) { + e = (*v)(((PyObject *)p->create_watermark_estimator_method), a); if (e) return e; + } + if (p->initial_restriction_method) { + e = (*v)(((PyObject *)p->initial_restriction_method), a); if (e) return e; + } + if (p->create_tracker_method) { + e = (*v)(((PyObject *)p->create_tracker_method), a); if (e) return e; + } + if (p->split_method) { + e = (*v)(((PyObject *)p->split_method), a); if (e) return e; + } + if (p->batching_configuration) { + e = (*v)(p->batching_configuration, a); if (e) return e; + } + if (p->do_fn) { + e = (*v)(p->do_fn, a); if (e) return e; + } + if (p->timer_methods) { + e = (*v)(p->timer_methods, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_DoFnSignature(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)o; + tmp = ((PyObject*)p->process_method); + p->process_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->process_batch_method); + p->process_batch_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->start_bundle_method); + p->start_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->finish_bundle_method); + p->finish_bundle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->setup_lifecycle_method); + p->setup_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->teardown_lifecycle_method); + p->teardown_lifecycle_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->create_watermark_estimator_method); + p->create_watermark_estimator_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->initial_restriction_method); + p->initial_restriction_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->create_tracker_method); + p->create_tracker_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->split_method); + p->split_method = ((struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->batching_configuration); + p->batching_configuration = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->do_fn); + p->do_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timer_methods); + p->timer_methods = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_14process_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20process_batch_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19start_bundle_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_20finish_bundle_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22setup_lifecycle_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25teardown_lifecycle_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_create_watermark_estimator_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_create_watermark_estimator_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_33create_watermark_estimator_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_26initial_restriction_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21create_tracker_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_split_method(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_split_method(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_12split_method_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_22batching_configuration_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5do_fn_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13timer_methods_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_DoFnSignature[] = { + {"get_restriction_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_watermark_estimator_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"is_unbounded_per_element", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_validate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_9_validate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_check_duplicate_dofn_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_validate_process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_12_validate_process}, + {"_validate_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_validate_bundle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_16_validate_bundle_method}, + {"_validate_stateful_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"is_splittable_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_restriction_coder", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_13DoFnSignature_22get_restriction_coder}, + {"is_stateful_dofn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"has_timers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"has_bundle_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_bundle_contexts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_setup_contexts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnSignature[] = { + {"process_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_method, 0, 0}, + {"process_batch_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_process_batch_method, 0, 0}, + {"start_bundle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_start_bundle_method, 0, 0}, + {"finish_bundle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_finish_bundle_method, 0, 0}, + {"setup_lifecycle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_setup_lifecycle_method, 0, 0}, + {"teardown_lifecycle_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_teardown_lifecycle_method, 0, 0}, + {"create_watermark_estimator_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_create_watermark_estimator_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_create_watermark_estimator_method, 0, 0}, + {"initial_restriction_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_initial_restriction_method, 0, 0}, + {"create_tracker_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_create_tracker_method, 0, 0}, + {"split_method", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_split_method, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_split_method, 0, 0}, + {"batching_configuration", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_batching_configuration, 0, 0}, + {"do_fn", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_do_fn, 0, 0}, + {"timer_methods", __pyx_getprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods, __pyx_setprop_11apache_beam_7runners_6common_13DoFnSignature_timer_methods, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_DoFnSignature_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnSignature}, + {Py_tp_doc, (void *)PyDoc_STR("Represents the signature of a given ``DoFn`` object.\n\n Signature of a ``DoFn`` provides a view of the properties of a given ``DoFn``.\n Among other things, this will give an extensible way for for (1) accessing the\n structure of the ``DoFn`` including methods and method parameters\n (2) identifying features that a given ``DoFn`` support, for example, whether\n a given ``DoFn`` is a Splittable ``DoFn`` (\n https://s.apache.org/splittable-do-fn) (3) validating a ``DoFn`` based on the\n feature set offered by it.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_DoFnSignature}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_DoFnSignature}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_DoFnSignature}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6common_DoFnSignature}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_DoFnSignature}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_DoFnSignature_spec = { + "apache_beam.runners.common.DoFnSignature", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_DoFnSignature_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_DoFnSignature = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""DoFnSignature", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnSignature, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Represents the signature of a given ``DoFn`` object.\n\n Signature of a ``DoFn`` provides a view of the properties of a given ``DoFn``.\n Among other things, this will give an extensible way for for (1) accessing the\n structure of the ``DoFn`` including methods and method parameters\n (2) identifying features that a given ``DoFn`` support, for example, whether\n a given ``DoFn`` is a Splittable ``DoFn`` (\n https://s.apache.org/splittable-do-fn) (3) validating a ``DoFn`` based on the\n feature set offered by it.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnSignature, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnSignature, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_DoFnSignature, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6common_DoFnSignature, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_13DoFnSignature_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_DoFnSignature, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker; + p->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)Py_None); Py_INCREF(Py_None); + p->output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)Py_None); Py_INCREF(Py_None); + p->user_state_context = Py_None; Py_INCREF(Py_None); + p->bundle_finalizer_param = Py_None; Py_INCREF(Py_None); + p->_setup_context_values = Py_None; Py_INCREF(Py_None); + p->_bundle_context_values = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->signature); + Py_CLEAR(p->output_handler); + Py_CLEAR(p->user_state_context); + Py_CLEAR(p->bundle_finalizer_param); + Py_CLEAR(p->_setup_context_values); + Py_CLEAR(p->_bundle_context_values); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnInvoker(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->signature) { + e = (*v)(((PyObject *)p->signature), a); if (e) return e; + } + if (p->output_handler) { + e = (*v)(((PyObject *)p->output_handler), a); if (e) return e; + } + if (p->user_state_context) { + e = (*v)(p->user_state_context, a); if (e) return e; + } + if (p->bundle_finalizer_param) { + e = (*v)(p->bundle_finalizer_param, a); if (e) return e; + } + if (p->_setup_context_values) { + e = (*v)(p->_setup_context_values, a); if (e) return e; + } + if (p->_bundle_context_values) { + e = (*v)(p->_bundle_context_values, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_DoFnInvoker(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)o; + tmp = ((PyObject*)p->signature); + p->signature = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->output_handler); + p->output_handler = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->user_state_context); + p->user_state_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->bundle_finalizer_param); + p->bundle_finalizer_param = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_setup_context_values); + p->_setup_context_values = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_bundle_context_values); + p->_bundle_context_values = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_signature(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_signature(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9signature_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_22bundle_finalizer_param_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_DoFnInvoker[] = { + {"create_invoker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_2create_invoker}, + {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_6invoke_process_batch}, + {"invoke_setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_8invoke_setup}, + {"invoke_teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker_14invoke_teardown}, + {"invoke_user_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"invoke_create_watermark_estimator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnInvoker[] = { + {"signature", __pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_signature, __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_signature, 0, 0}, + {"bundle_finalizer_param", __pyx_getprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param, __pyx_setprop_11apache_beam_7runners_6common_11DoFnInvoker_bundle_finalizer_param, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_DoFnInvoker_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker}, + {Py_tp_doc, (void *)PyDoc_STR("An abstraction that can be used to execute DoFn methods.\n\n A DoFnInvoker describes a particular way for invoking methods of a DoFn\n represented by a given DoFnSignature.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_DoFnInvoker}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_DoFnInvoker}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_DoFnInvoker}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6common_DoFnInvoker}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_DoFnInvoker_spec = { + "apache_beam.runners.common.DoFnInvoker", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_DoFnInvoker_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_DoFnInvoker = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""DoFnInvoker", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("An abstraction that can be used to execute DoFn methods.\n\n A DoFnInvoker describes a particular way for invoking methods of a DoFn\n represented by a given DoFnSignature."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnInvoker, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnInvoker, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_DoFnInvoker, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6common_DoFnInvoker, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_11DoFnInvoker_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker __pyx_vtable_11apache_beam_7runners_6common_SimpleInvoker; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_SimpleInvoker(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker*)__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker; + p->process_method = Py_None; Py_INCREF(Py_None); + p->process_batch_method = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_SimpleInvoker(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_SimpleInvoker) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->process_method); + Py_CLEAR(p->process_batch_method); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_SimpleInvoker(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnInvoker(o, v, a); if (e) return e; + if (p->process_method) { + e = (*v)(p->process_method, a); if (e) return e; + } + if (p->process_batch_method) { + e = (*v)(p->process_batch_method, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_SimpleInvoker(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker *)o; + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnInvoker(o); + tmp = ((PyObject*)p->process_method); + p->process_method = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->process_batch_method); + p->process_batch_method = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_SimpleInvoker[] = { + {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_SimpleInvoker_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_SimpleInvoker}, + {Py_tp_doc, (void *)PyDoc_STR("An invoker that processes elements ignoring windowing information.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_SimpleInvoker}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_SimpleInvoker}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_SimpleInvoker}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_SimpleInvoker}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_SimpleInvoker_spec = { + "apache_beam.runners.common.SimpleInvoker", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_SimpleInvoker_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_SimpleInvoker = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""SimpleInvoker", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_SimpleInvoker, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("An invoker that processes elements ignoring windowing information."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_SimpleInvoker, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_SimpleInvoker, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_SimpleInvoker, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_13SimpleInvoker_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_SimpleInvoker, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker __pyx_vtable_11apache_beam_7runners_6common_PerWindowInvoker; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_PerWindowInvoker(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6common_DoFnInvoker(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker*)__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker; + p->side_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)Py_None); Py_INCREF(Py_None); + p->args_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->kwargs_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->placeholders_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->args_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->kwargs_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->placeholders_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->process_method = Py_None; Py_INCREF(Py_None); + p->process_batch_method = Py_None; Py_INCREF(Py_None); + p->threadsafe_restriction_tracker = Py_None; Py_INCREF(Py_None); + p->threadsafe_watermark_estimator = Py_None; Py_INCREF(Py_None); + p->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + p->restriction = Py_None; Py_INCREF(Py_None); + p->watermark_estimator_state = Py_None; Py_INCREF(Py_None); + p->current_window_index = Py_None; Py_INCREF(Py_None); + p->stop_window_index = Py_None; Py_INCREF(Py_None); + p->splitting_lock = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_PerWindowInvoker(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_PerWindowInvoker) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->side_inputs); + Py_CLEAR(p->context); + Py_CLEAR(p->args_for_process); + Py_CLEAR(p->kwargs_for_process); + Py_CLEAR(p->placeholders_for_process); + Py_CLEAR(p->args_for_process_batch); + Py_CLEAR(p->kwargs_for_process_batch); + Py_CLEAR(p->placeholders_for_process_batch); + Py_CLEAR(p->process_method); + Py_CLEAR(p->process_batch_method); + Py_CLEAR(p->threadsafe_restriction_tracker); + Py_CLEAR(p->threadsafe_watermark_estimator); + Py_CLEAR(p->current_windowed_value); + Py_CLEAR(p->restriction); + Py_CLEAR(p->watermark_estimator_state); + Py_CLEAR(p->current_window_index); + Py_CLEAR(p->stop_window_index); + Py_CLEAR(p->splitting_lock); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnInvoker(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_PerWindowInvoker(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnInvoker(o, v, a); if (e) return e; + if (p->side_inputs) { + e = (*v)(p->side_inputs, a); if (e) return e; + } + if (p->context) { + e = (*v)(((PyObject *)p->context), a); if (e) return e; + } + if (p->args_for_process) { + e = (*v)(p->args_for_process, a); if (e) return e; + } + if (p->kwargs_for_process) { + e = (*v)(p->kwargs_for_process, a); if (e) return e; + } + if (p->placeholders_for_process) { + e = (*v)(p->placeholders_for_process, a); if (e) return e; + } + if (p->args_for_process_batch) { + e = (*v)(p->args_for_process_batch, a); if (e) return e; + } + if (p->kwargs_for_process_batch) { + e = (*v)(p->kwargs_for_process_batch, a); if (e) return e; + } + if (p->placeholders_for_process_batch) { + e = (*v)(p->placeholders_for_process_batch, a); if (e) return e; + } + if (p->process_method) { + e = (*v)(p->process_method, a); if (e) return e; + } + if (p->process_batch_method) { + e = (*v)(p->process_batch_method, a); if (e) return e; + } + if (p->threadsafe_restriction_tracker) { + e = (*v)(p->threadsafe_restriction_tracker, a); if (e) return e; + } + if (p->threadsafe_watermark_estimator) { + e = (*v)(p->threadsafe_watermark_estimator, a); if (e) return e; + } + if (p->current_windowed_value) { + e = (*v)(((PyObject *)p->current_windowed_value), a); if (e) return e; + } + if (p->restriction) { + e = (*v)(p->restriction, a); if (e) return e; + } + if (p->watermark_estimator_state) { + e = (*v)(p->watermark_estimator_state, a); if (e) return e; + } + if (p->current_window_index) { + e = (*v)(p->current_window_index, a); if (e) return e; + } + if (p->stop_window_index) { + e = (*v)(p->stop_window_index, a); if (e) return e; + } + if (p->splitting_lock) { + e = (*v)(p->splitting_lock, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_PerWindowInvoker(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *p = (struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker *)o; + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnInvoker(o); + tmp = ((PyObject*)p->side_inputs); + p->side_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->context); + p->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->args_for_process); + p->args_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->kwargs_for_process); + p->kwargs_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->placeholders_for_process); + p->placeholders_for_process = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->args_for_process_batch); + p->args_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->kwargs_for_process_batch); + p->kwargs_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->placeholders_for_process_batch); + p->placeholders_for_process_batch = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->process_method); + p->process_method = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->process_batch_method); + p->process_batch_method = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->threadsafe_restriction_tracker); + p->threadsafe_restriction_tracker = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->threadsafe_watermark_estimator); + p->threadsafe_watermark_estimator = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->current_windowed_value); + p->current_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->restriction); + p->restriction = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->watermark_estimator_state); + p->watermark_estimator_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->current_window_index); + p->current_window_index = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->stop_window_index); + p->stop_window_index = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->splitting_lock); + p->splitting_lock = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_PerWindowInvoker[] = { + {"invoke_process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_should_process_window_for_sdf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_invoke_process_per_window", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_invoke_process_batch_per_window", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_16PerWindowInvoker_12_try_split}, + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_scale_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_PerWindowInvoker}, + {Py_tp_doc, (void *)PyDoc_STR("An invoker that processes elements considering windowing information.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_PerWindowInvoker}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_PerWindowInvoker}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_PerWindowInvoker}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_PerWindowInvoker}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker_spec = { + "apache_beam.runners.common.PerWindowInvoker", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_PerWindowInvoker = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""PerWindowInvoker", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_PerWindowInvoker, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("An invoker that processes elements considering windowing information."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_PerWindowInvoker, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_PerWindowInvoker, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_PerWindowInvoker, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_16PerWindowInvoker_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_PerWindowInvoker, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner __pyx_vtable_11apache_beam_7runners_6common_DoFnRunner; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnRunner(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner; + p->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)Py_None); Py_INCREF(Py_None); + p->step_name = Py_None; Py_INCREF(Py_None); + p->side_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->do_fn_invoker = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)Py_None); Py_INCREF(Py_None); + p->bundle_finalizer_param = Py_None; Py_INCREF(Py_None); + p->transform_id = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->execution_context = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnRunner(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnRunner) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->context); + Py_CLEAR(p->step_name); + Py_CLEAR(p->side_inputs); + Py_CLEAR(p->do_fn_invoker); + Py_CLEAR(p->bundle_finalizer_param); + Py_CLEAR(p->transform_id); + Py_CLEAR(p->execution_context); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnRunner(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->context) { + e = (*v)(((PyObject *)p->context), a); if (e) return e; + } + if (p->step_name) { + e = (*v)(p->step_name, a); if (e) return e; + } + if (p->side_inputs) { + e = (*v)(p->side_inputs, a); if (e) return e; + } + if (p->do_fn_invoker) { + e = (*v)(((PyObject *)p->do_fn_invoker), a); if (e) return e; + } + if (p->bundle_finalizer_param) { + e = (*v)(p->bundle_finalizer_param, a); if (e) return e; + } + if (p->execution_context) { + e = (*v)(p->execution_context, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_DoFnRunner(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)o; + tmp = ((PyObject*)p->context); + p->context = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->step_name); + p->step_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->side_inputs); + p->side_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->do_fn_invoker); + p->do_fn_invoker = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->bundle_finalizer_param); + p->bundle_finalizer_param = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->execution_context); + p->execution_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_22bundle_finalizer_param_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_DoFnRunner[] = { + {"_maybe_sample_exception", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"process_with_sized_restriction", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_11try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"process_user_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_invoke_bundle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_invoke_lifecycle_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_21setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_23start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_25finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_27teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_29finalize, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_reraise_augmented", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnRunner[] = { + {"bundle_finalizer_param", __pyx_getprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param, __pyx_setprop_11apache_beam_7runners_6common_10DoFnRunner_bundle_finalizer_param, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_DoFnRunner_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnRunner}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A helper class for executing ParDo operations.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_DoFnRunner}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_DoFnRunner}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_DoFnRunner}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6common_DoFnRunner}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_DoFnRunner}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_DoFnRunner_spec = { + "apache_beam.runners.common.DoFnRunner", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_DoFnRunner_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_DoFnRunner = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""DoFnRunner", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnRunner, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees.\n\n A helper class for executing ParDo operations.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnRunner, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnRunner, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_DoFnRunner, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6common_DoFnRunner, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_10DoFnRunner_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_DoFnRunner, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler __pyx_vtable_11apache_beam_7runners_6common_OutputHandler; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_OutputHandler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_OutputHandler(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_OutputHandler) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_OutputHandler[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_OutputHandler_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_OutputHandler}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_OutputHandler}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_OutputHandler}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_OutputHandler_spec = { + "apache_beam.runners.common.OutputHandler", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_7runners_6common_OutputHandler_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_OutputHandler = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""OutputHandler", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_OutputHandler, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_OutputHandler, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_OutputHandler, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler __pyx_vtable_11apache_beam_7runners_6common__OutputHandler; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common__OutputHandler(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6common_OutputHandler(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler*)__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler; + p->window_fn = Py_None; Py_INCREF(Py_None); + p->main_receivers = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)Py_None); Py_INCREF(Py_None); + p->tagged_receivers = Py_None; Py_INCREF(Py_None); + p->per_element_output_counter = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)Py_None); Py_INCREF(Py_None); + p->output_batch_converter = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common__OutputHandler(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *p = (struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common__OutputHandler) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->window_fn); + Py_CLEAR(p->main_receivers); + Py_CLEAR(p->tagged_receivers); + Py_CLEAR(p->per_element_output_counter); + Py_CLEAR(p->output_batch_converter); + __pyx_tp_dealloc_11apache_beam_7runners_6common_OutputHandler(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common__OutputHandler(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *p = (struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_7runners_6common__OutputHandler); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->window_fn) { + e = (*v)(p->window_fn, a); if (e) return e; + } + if (p->main_receivers) { + e = (*v)(((PyObject *)p->main_receivers), a); if (e) return e; + } + if (p->tagged_receivers) { + e = (*v)(p->tagged_receivers, a); if (e) return e; + } + if (p->per_element_output_counter) { + e = (*v)(((PyObject *)p->per_element_output_counter), a); if (e) return e; + } + if (p->output_batch_converter) { + e = (*v)(p->output_batch_converter, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common__OutputHandler(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *p = (struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_7runners_6common__OutputHandler); } + tmp = ((PyObject*)p->window_fn); + p->window_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->main_receivers); + p->main_receivers = ((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->tagged_receivers); + p->tagged_receivers = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->per_element_output_counter); + p->per_element_output_counter = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->output_batch_converter); + p->output_batch_converter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common__OutputHandler[] = { + {"start_bundle_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_6start_bundle_outputs}, + {"finish_bundle_outputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler_8finish_bundle_outputs}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common__OutputHandler_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common__OutputHandler}, + {Py_tp_doc, (void *)PyDoc_STR("Processes output produced by DoFn method invocations.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common__OutputHandler}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common__OutputHandler}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common__OutputHandler}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common__OutputHandler}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common__OutputHandler_spec = { + "apache_beam.runners.common._OutputHandler", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common__OutputHandler_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common__OutputHandler = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""_OutputHandler", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common__OutputHandler, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Processes output produced by DoFn method invocations."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common__OutputHandler, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common__OutputHandler, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common__OutputHandler, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_14_OutputHandler_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common__OutputHandler, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext __pyx_vtable_11apache_beam_7runners_6common_DoFnContext; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common_DoFnContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext; + p->label = Py_None; Py_INCREF(Py_None); + p->state = Py_None; Py_INCREF(Py_None); + p->windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnContext(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnContext) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->label); + Py_CLEAR(p->state); + Py_CLEAR(p->windowed_value); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnContext(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->label) { + e = (*v)(p->label, a); if (e) return e; + } + if (p->state) { + e = (*v)(p->state, a); if (e) return e; + } + if (p->windowed_value) { + e = (*v)(((PyObject *)p->windowed_value), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common_DoFnContext(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *p = (struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *)o; + tmp = ((PyObject*)p->label); + p->label = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->state); + p->state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->windowed_value); + p->windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_element(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7element_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_timestamp(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_9timestamp_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_windows(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7windows_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6common_DoFnContext[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6common_DoFnContext[] = { + {"element", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_element, 0, 0, 0}, + {"timestamp", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_timestamp, 0, 0, 0}, + {"windows", __pyx_getprop_11apache_beam_7runners_6common_11DoFnContext_windows, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common_DoFnContext_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnContext}, + {Py_tp_doc, (void *)PyDoc_STR("For internal use only; no backwards-compatibility guarantees.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common_DoFnContext}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common_DoFnContext}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6common_DoFnContext}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6common_DoFnContext}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6common_11DoFnContext_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common_DoFnContext}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common_DoFnContext_spec = { + "apache_beam.runners.common.DoFnContext", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common_DoFnContext_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common_DoFnContext = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""DoFnContext", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common_DoFnContext, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("For internal use only; no backwards-compatibility guarantees."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common_DoFnContext, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common_DoFnContext, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6common_DoFnContext, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6common_DoFnContext, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6common_11DoFnContext_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common_DoFnContext, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter __pyx_vtable_11apache_beam_7runners_6common__ReceiverAdapter; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common__ReceiverAdapter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6common_Receiver(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter; + p->underlying = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common__ReceiverAdapter(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *p = (struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common__ReceiverAdapter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->underlying); + __pyx_tp_dealloc_11apache_beam_7runners_6common_Receiver(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common__ReceiverAdapter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *p = (struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_7runners_6common__ReceiverAdapter); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->underlying) { + e = (*v)(p->underlying, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common__ReceiverAdapter(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *p = (struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_7runners_6common__ReceiverAdapter); } + tmp = ((PyObject*)p->underlying); + p->underlying = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common__ReceiverAdapter}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common__ReceiverAdapter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common__ReceiverAdapter}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common__ReceiverAdapter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter_spec = { + "apache_beam.runners.common._ReceiverAdapter", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common__ReceiverAdapter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""_ReceiverAdapter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common__ReceiverAdapter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common__ReceiverAdapter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common__ReceiverAdapter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common__ReceiverAdapter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_defaults(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_defaults(PyObject *o) { + struct __pyx_defaults *p = (struct __pyx_defaults *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_defaults) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->arg0); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_defaults(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_defaults *p = (struct __pyx_defaults *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->arg0) { + e = (*v)(p->arg0, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_defaults(PyObject *o) { + PyObject* tmp; + struct __pyx_defaults *p = (struct __pyx_defaults *)o; + tmp = ((PyObject*)p->arg0); + p->arg0 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_defaults_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_defaults}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_defaults}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common___pyx_defaults}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_defaults}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_defaults_spec = { + "apache_beam.runners.common.__pyx_defaults", + sizeof(struct __pyx_defaults), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_defaults_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_defaults = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_defaults", /*tp_name*/ + sizeof(struct __pyx_defaults), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_defaults, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_defaults, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common___pyx_defaults, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_defaults, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_d); + Py_CLEAR(p->__pyx_v_seen); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_sig); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_1); + Py_CLEAR(p->__pyx_t_5); + Py_CLEAR(p->__pyx_t_6); + Py_CLEAR(p->__pyx_t_7); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_d) { + e = (*v)(p->__pyx_v_d, a); if (e) return e; + } + if (p->__pyx_v_seen) { + e = (*v)(p->__pyx_v_seen, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_sig) { + e = (*v)(((PyObject *)p->__pyx_v_sig), a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + if (p->__pyx_t_5) { + e = (*v)(p->__pyx_t_5, a); if (e) return e; + } + if (p->__pyx_t_6) { + e = (*v)(p->__pyx_t_6, a); if (e) return e; + } + if (p->__pyx_t_7) { + e = (*v)(p->__pyx_t_7, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts_spec = { + "apache_beam.runners.common.__pyx_scope_struct__get_bundle_contexts", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct__get_bundle_contexts", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_d); + Py_CLEAR(p->__pyx_v_seen); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_sig); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_1); + Py_CLEAR(p->__pyx_t_5); + Py_CLEAR(p->__pyx_t_6); + Py_CLEAR(p->__pyx_t_7); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_d) { + e = (*v)(p->__pyx_v_d, a); if (e) return e; + } + if (p->__pyx_v_seen) { + e = (*v)(p->__pyx_v_seen, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_sig) { + e = (*v)(((PyObject *)p->__pyx_v_sig), a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + if (p->__pyx_t_5) { + e = (*v)(p->__pyx_t_5, a); if (e) return e; + } + if (p->__pyx_t_6) { + e = (*v)(p->__pyx_t_6, a); if (e) return e; + } + if (p->__pyx_t_7) { + e = (*v)(p->__pyx_t_7, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts_spec = { + "apache_beam.runners.common.__pyx_scope_struct_1_get_setup_contexts", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_1_get_setup_contexts", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_arg); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_arg) { + e = (*v)(p->__pyx_v_arg, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr_spec = { + "apache_beam.runners.common.__pyx_scope_struct_2_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_2_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_si); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_si) { + e = (*v)(p->__pyx_v_si, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr_spec = { + "apache_beam.runners.common.__pyx_scope_struct_3_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_3_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_arg); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_arg) { + e = (*v)(p->__pyx_v_arg, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr_spec = { + "apache_beam.runners.common.__pyx_scope_struct_4_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_4_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_arg); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_arg) { + e = (*v)(p->__pyx_v_arg, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr_spec = { + "apache_beam.runners.common.__pyx_scope_struct_5_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_5_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_arg); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_arg) { + e = (*v)(p->__pyx_v_arg, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr_spec = { + "apache_beam.runners.common.__pyx_scope_struct_6_genexpr", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_6_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_restriction); + Py_CLEAR(p->__pyx_v_restriction_provider); + Py_CLEAR(p->__pyx_v_stop_window_index); + Py_CLEAR(p->__pyx_v_watermark_estimator_state); + Py_CLEAR(p->__pyx_v_windowed_value); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split++] = ((struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_restriction) { + e = (*v)(p->__pyx_v_restriction, a); if (e) return e; + } + if (p->__pyx_v_restriction_provider) { + e = (*v)(p->__pyx_v_restriction_provider, a); if (e) return e; + } + if (p->__pyx_v_stop_window_index) { + e = (*v)(p->__pyx_v_stop_window_index, a); if (e) return e; + } + if (p->__pyx_v_watermark_estimator_state) { + e = (*v)(p->__pyx_v_watermark_estimator_state, a); if (e) return e; + } + if (p->__pyx_v_windowed_value) { + e = (*v)(p->__pyx_v_windowed_value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *p = (struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split *)o; + tmp = ((PyObject*)p->__pyx_v_restriction); + p->__pyx_v_restriction = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_restriction_provider); + p->__pyx_v_restriction_provider = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_stop_window_index); + p->__pyx_v_stop_window_index = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_watermark_estimator_state); + p->__pyx_v_watermark_estimator_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_windowed_value); + p->__pyx_v_windowed_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split_spec = { + "apache_beam.runners.common.__pyx_scope_struct_7__try_split", + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.common.""__pyx_scope_struct_7__try_split", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_11apache_beam_7runners_6common_TaggedOutput = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_7runners_6common_TimestampedValue = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyTypeObject_TaggedOutput_Timest); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 16; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_7runners_6common_TaggedOutput, (void *)&__pyx_v_11apache_beam_7runners_6common_TimestampedValue, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_7runners_6common_Receiver = &__pyx_vtable_11apache_beam_7runners_6common_Receiver; + __pyx_vtable_11apache_beam_7runners_6common_Receiver.receive = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_8Receiver_receive; + __pyx_vtable_11apache_beam_7runners_6common_Receiver.receive_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_8Receiver_receive_batch; + __pyx_vtable_11apache_beam_7runners_6common_Receiver.flush = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_8Receiver_flush; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_Receiver_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) __PYX_ERR(0, 115, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_Receiver_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver = &__pyx_type_11apache_beam_7runners_6common_Receiver; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_vtabptr_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Receiver, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_MethodWrapper_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper)) __PYX_ERR(0, 135, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_MethodWrapper_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = &__pyx_type_11apache_beam_7runners_6common_MethodWrapper; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 135, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6common_13MethodWrapper___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6common_13MethodWrapper___init__.doc = __pyx_doc_11apache_beam_7runners_6common_13MethodWrapper___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6common_13MethodWrapper___init__; + } + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MethodWrapper, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_DoFnSignature_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature)) __PYX_ERR(0, 260, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_DoFnSignature_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = &__pyx_type_11apache_beam_7runners_6common_DoFnSignature; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoFnSignature, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker = &__pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_start_bundle = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_start_bundle; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_finish_bundle = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_finish_bundle; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_split = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_split; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_initial_restriction = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_initial_restriction; + __pyx_vtable_11apache_beam_7runners_6common_DoFnInvoker.invoke_create_tracker = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnInvoker_invoke_create_tracker; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_DoFnInvoker_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker)) __PYX_ERR(0, 464, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_DoFnInvoker_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = &__pyx_type_11apache_beam_7runners_6common_DoFnInvoker; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 464, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6common_11DoFnInvoker___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6common_11DoFnInvoker___init__.doc = __pyx_doc_11apache_beam_7runners_6common_11DoFnInvoker___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6common_11DoFnInvoker___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoFnInvoker, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) < (0)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker = &__pyx_vtable_11apache_beam_7runners_6common_SimpleInvoker; + __pyx_vtable_11apache_beam_7runners_6common_SimpleInvoker.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker; + __pyx_vtable_11apache_beam_7runners_6common_SimpleInvoker.__pyx_base.invoke_process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_13SimpleInvoker_invoke_process; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_SimpleInvoker_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker)) __PYX_ERR(0, 664, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_SimpleInvoker_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = &__pyx_type_11apache_beam_7runners_6common_SimpleInvoker; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SimpleInvoker, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) < (0)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker = &__pyx_vtable_11apache_beam_7runners_6common_PerWindowInvoker; + __pyx_vtable_11apache_beam_7runners_6common_PerWindowInvoker.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker; + __pyx_vtable_11apache_beam_7runners_6common_PerWindowInvoker.__pyx_base.invoke_process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_16PerWindowInvoker_invoke_process; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker)) __PYX_ERR(0, 777, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = &__pyx_type_11apache_beam_7runners_6common_PerWindowInvoker; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner = &__pyx_vtable_11apache_beam_7runners_6common_DoFnRunner; + __pyx_vtable_11apache_beam_7runners_6common_DoFnRunner.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_10DoFnRunner_process; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_DoFnRunner_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_DoFnRunner_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = &__pyx_type_11apache_beam_7runners_6common_DoFnRunner; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6common_10DoFnRunner___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6common_10DoFnRunner___init__.doc = __pyx_doc_11apache_beam_7runners_6common_10DoFnRunner___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6common_10DoFnRunner___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoFnRunner, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler = &__pyx_vtable_11apache_beam_7runners_6common_OutputHandler; + __pyx_vtable_11apache_beam_7runners_6common_OutputHandler.handle_process_outputs = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs; + __pyx_vtable_11apache_beam_7runners_6common_OutputHandler.handle_process_batch_outputs = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_OutputHandler_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler)) __PYX_ERR(0, 1612, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_OutputHandler_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler = &__pyx_type_11apache_beam_7runners_6common_OutputHandler; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OutputHandler, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) < (0)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler = &__pyx_vtable_11apache_beam_7runners_6common__OutputHandler; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler.__pyx_base.handle_process_outputs = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler.__pyx_base.handle_process_batch_outputs = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler._maybe_propagate_windowing_info = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__maybe_propagate_windowing_info; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler._handle_tagged_output = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__handle_tagged_output; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler._write_value_to_tag = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_value_to_tag; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler._write_batch_to_tag = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__write_batch_to_tag; + __pyx_vtable_11apache_beam_7runners_6common__OutputHandler._verify_batch_output = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *))__pyx_f_11apache_beam_7runners_6common_14_OutputHandler__verify_batch_output; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common__OutputHandler_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common__OutputHandler_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler = &__pyx_type_11apache_beam_7runners_6common__OutputHandler; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6common_14_OutputHandler___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6common_14_OutputHandler___init__.doc = __pyx_doc_11apache_beam_7runners_6common_14_OutputHandler___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6common_14_OutputHandler___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OutputHandler_2, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext = &__pyx_vtable_11apache_beam_7runners_6common_DoFnContext; + __pyx_vtable_11apache_beam_7runners_6common_DoFnContext.set_element = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6common_11DoFnContext_set_element; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common_DoFnContext_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext)) __PYX_ERR(0, 1888, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common_DoFnContext_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext = &__pyx_type_11apache_beam_7runners_6common_DoFnContext; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext, __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoFnContext, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) < (0)) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter = &__pyx_vtable_11apache_beam_7runners_6common__ReceiverAdapter; + __pyx_vtable_11apache_beam_7runners_6common__ReceiverAdapter.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter)) __PYX_ERR(2, 182, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) < (0)) __PYX_ERR(2, 182, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = &__pyx_type_11apache_beam_7runners_6common__ReceiverAdapter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) < (0)) __PYX_ERR(2, 182, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter, __pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter) < (0)) __PYX_ERR(2, 182, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) < (0)) __PYX_ERR(2, 182, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ReceiverAdapter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) < (0)) __PYX_ERR(2, 182, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults)) __PYX_ERR(0, 1856, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults) < (0)) __PYX_ERR(0, 1856, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults = &__pyx_type_11apache_beam_7runners_6common___pyx_defaults; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults) < (0)) __PYX_ERR(0, 1856, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts)) __PYX_ERR(0, 427, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts) < (0)) __PYX_ERR(0, 427, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts) < (0)) __PYX_ERR(0, 427, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct__get_bundle_contexts->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts)) __PYX_ERR(0, 445, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts) < (0)) __PYX_ERR(0, 445, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts) < (0)) __PYX_ERR(0, 445, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_1_get_setup_contexts->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 717, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_2_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 796, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_3_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 797, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_4_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 799, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 799, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 799, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_5_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 805, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_6_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split)) __PYX_ERR(0, 1153, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split = &__pyx_type_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common___pyx_scope_struct_7__try_split->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(3, 27, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(3, 36, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(3, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) __PYX_ERR(3, 46, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(3, 46, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) __PYX_ERR(3, 49, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(3, 49, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) __PYX_ERR(3, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.transforms.cy_dataflow_distribution_counter"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.transforms.cy_dataflow_distribution_counter", "DataflowDistributionCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) __PYX_ERR(4, 32, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = (struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter)) __PYX_ERR(4, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 26; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_common(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_common}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "common", + __pyx_k_Worker_operations_executor_For_i, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_common(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_common(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_common(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + size_t __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'common' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "common" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_common", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__runners__common) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.runners.common")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.runners.common", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/runners/common.py":25 + * # pytype: skip-file + * + * import logging # <<<<<<<<<<<<<< + * import sys + * import threading +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":26 + * + * import logging + * import sys # <<<<<<<<<<<<<< + * import threading + * import traceback +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":27 + * import logging + * import sys + * import threading # <<<<<<<<<<<<<< + * import traceback + * from enum import Enum +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":28 + * import sys + * import threading + * import traceback # <<<<<<<<<<<<<< + * from enum import Enum + * from typing import TYPE_CHECKING +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_traceback, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_traceback, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":29 + * import threading + * import traceback + * from enum import Enum # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Enum}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Enum}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":30 + * import traceback + * from enum import Enum + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Dict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":31 + * from enum import Enum + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Dict + * from typing import Iterable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":32 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import Dict # <<<<<<<<<<<<<< + * from typing import Iterable + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":33 + * from typing import Any + * from typing import Dict + * from typing import Iterable # <<<<<<<<<<<<<< + * from typing import List + * from typing import Mapping +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":34 + * from typing import Dict + * from typing import Iterable + * from typing import List # <<<<<<<<<<<<<< + * from typing import Mapping + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":35 + * from typing import Iterable + * from typing import List + * from typing import Mapping # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Tuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":36 + * from typing import List + * from typing import Mapping + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Tuple + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":37 + * from typing import Mapping + * from typing import Optional + * from typing import Tuple # <<<<<<<<<<<<<< + * + * from apache_beam.coders import TupleCoder +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":39 + * from typing import Tuple + * + * from apache_beam.coders import TupleCoder # <<<<<<<<<<<<<< + * from apache_beam.coders import coders + * from apache_beam.internal import util +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TupleCoder}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TupleCoder}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":40 + * + * from apache_beam.coders import TupleCoder + * from apache_beam.coders import coders # <<<<<<<<<<<<<< + * from apache_beam.internal import util + * from apache_beam.options.value_provider import RuntimeValueProvider +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_coders, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":41 + * from apache_beam.coders import TupleCoder + * from apache_beam.coders import coders + * from apache_beam.internal import util # <<<<<<<<<<<<<< + * from apache_beam.options.value_provider import RuntimeValueProvider + * from apache_beam.pvalue import TaggedOutput +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_util}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_internal, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_util}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":42 + * from apache_beam.coders import coders + * from apache_beam.internal import util + * from apache_beam.options.value_provider import RuntimeValueProvider # <<<<<<<<<<<<<< + * from apache_beam.pvalue import TaggedOutput + * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RuntimeValueProvider}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_options_value_provid, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RuntimeValueProvider}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":43 + * from apache_beam.internal import util + * from apache_beam.options.value_provider import RuntimeValueProvider + * from apache_beam.pvalue import TaggedOutput # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider + * from apache_beam.runners.sdf_utils import RestrictionTrackerView +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TaggedOutput}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_pvalue, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TaggedOutput}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + if (!(likely(PyType_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_5))) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_XGOTREF((PyObject *)__pyx_v_11apache_beam_7runners_6common_TaggedOutput); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6common_TaggedOutput, ((PyTypeObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":44 + * from apache_beam.options.value_provider import RuntimeValueProvider + * from apache_beam.pvalue import TaggedOutput + * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import RestrictionTrackerView + * from apache_beam.runners.sdf_utils import SplitResultPrimary +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NoOpWatermarkEstimatorProvider}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NoOpWatermarkEstimatorProvider}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":45 + * from apache_beam.pvalue import TaggedOutput + * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider + * from apache_beam.runners.sdf_utils import RestrictionTrackerView # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionTrackerView}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionTrackerView}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":46 + * from apache_beam.runners.sdf_utils import NoOpWatermarkEstimatorProvider + * from apache_beam.runners.sdf_utils import RestrictionTrackerView + * from apache_beam.runners.sdf_utils import SplitResultPrimary # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.sdf_utils import ThreadsafeRestrictionTracker +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultPrimary}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultPrimary}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":47 + * from apache_beam.runners.sdf_utils import RestrictionTrackerView + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import ThreadsafeRestrictionTracker + * from apache_beam.runners.sdf_utils import ThreadsafeWatermarkEstimator +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultResidual}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultResidual}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":48 + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.sdf_utils import ThreadsafeRestrictionTracker # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import ThreadsafeWatermarkEstimator + * from apache_beam.transforms import DoFn +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadsafeRestrictionTracker}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadsafeRestrictionTracker}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":49 + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.sdf_utils import ThreadsafeRestrictionTracker + * from apache_beam.runners.sdf_utils import ThreadsafeWatermarkEstimator # <<<<<<<<<<<<<< + * from apache_beam.transforms import DoFn + * from apache_beam.transforms import core +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadsafeWatermarkEstimator}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadsafeWatermarkEstimator}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":50 + * from apache_beam.runners.sdf_utils import ThreadsafeRestrictionTracker + * from apache_beam.runners.sdf_utils import ThreadsafeWatermarkEstimator + * from apache_beam.transforms import DoFn # <<<<<<<<<<<<<< + * from apache_beam.transforms import core + * from apache_beam.transforms import userstate +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DoFn}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DoFn}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":51 + * from apache_beam.runners.sdf_utils import ThreadsafeWatermarkEstimator + * from apache_beam.transforms import DoFn + * from apache_beam.transforms import core # <<<<<<<<<<<<<< + * from apache_beam.transforms import userstate + * from apache_beam.transforms.core import RestrictionProvider +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":52 + * from apache_beam.transforms import DoFn + * from apache_beam.transforms import core + * from apache_beam.transforms import userstate # <<<<<<<<<<<<<< + * from apache_beam.transforms.core import RestrictionProvider + * from apache_beam.transforms.core import WatermarkEstimatorProvider +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":53 + * from apache_beam.transforms import core + * from apache_beam.transforms import userstate + * from apache_beam.transforms.core import RestrictionProvider # <<<<<<<<<<<<<< + * from apache_beam.transforms.core import WatermarkEstimatorProvider + * from apache_beam.transforms.window import GlobalWindow +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProvider}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_core, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProvider}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":54 + * from apache_beam.transforms import userstate + * from apache_beam.transforms.core import RestrictionProvider + * from apache_beam.transforms.core import WatermarkEstimatorProvider # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import GlobalWindow + * from apache_beam.transforms.window import GlobalWindows +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WatermarkEstimatorProvider}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_core, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WatermarkEstimatorProvider}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":55 + * from apache_beam.transforms.core import RestrictionProvider + * from apache_beam.transforms.core import WatermarkEstimatorProvider + * from apache_beam.transforms.window import GlobalWindow # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.transforms.window import TimestampedValue +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindow}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindow}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":56 + * from apache_beam.transforms.core import WatermarkEstimatorProvider + * from apache_beam.transforms.window import GlobalWindow + * from apache_beam.transforms.window import GlobalWindows # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import TimestampedValue + * from apache_beam.transforms.window import WindowFn +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindows}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindows}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":57 + * from apache_beam.transforms.window import GlobalWindow + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.transforms.window import TimestampedValue # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import WindowFn + * from apache_beam.typehints.batch import BatchConverter +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimestampedValue}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimestampedValue}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + if (!(likely(PyType_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_5))) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_XGOTREF((PyObject *)__pyx_v_11apache_beam_7runners_6common_TimestampedValue); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6common_TimestampedValue, ((PyTypeObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":58 + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.transforms.window import TimestampedValue + * from apache_beam.transforms.window import WindowFn # <<<<<<<<<<<<<< + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.counters import Counter +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowFn}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowFn}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":59 + * from apache_beam.transforms.window import TimestampedValue + * from apache_beam.transforms.window import WindowFn + * from apache_beam.typehints.batch import BatchConverter # <<<<<<<<<<<<<< + * from apache_beam.utils.counters import Counter + * from apache_beam.utils.counters import CounterName +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints_batch, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":60 + * from apache_beam.transforms.window import WindowFn + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.counters import Counter # <<<<<<<<<<<<<< + * from apache_beam.utils.counters import CounterName + * from apache_beam.utils.timestamp import Timestamp +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Counter}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Counter}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":61 + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.counters import Counter + * from apache_beam.utils.counters import CounterName # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import Timestamp + * from apache_beam.utils.windowed_value import HomogeneousWindowedBatch +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":62 + * from apache_beam.utils.counters import Counter + * from apache_beam.utils.counters import CounterName + * from apache_beam.utils.timestamp import Timestamp # <<<<<<<<<<<<<< + * from apache_beam.utils.windowed_value import HomogeneousWindowedBatch + * from apache_beam.utils.windowed_value import WindowedBatch +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":63 + * from apache_beam.utils.counters import CounterName + * from apache_beam.utils.timestamp import Timestamp + * from apache_beam.utils.windowed_value import HomogeneousWindowedBatch # <<<<<<<<<<<<<< + * from apache_beam.utils.windowed_value import WindowedBatch + * from apache_beam.utils.windowed_value import WindowedValue +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":64 + * from apache_beam.utils.timestamp import Timestamp + * from apache_beam.utils.windowed_value import HomogeneousWindowedBatch + * from apache_beam.utils.windowed_value import WindowedBatch # <<<<<<<<<<<<<< + * from apache_beam.utils.windowed_value import WindowedValue + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowedBatch}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":65 + * from apache_beam.utils.windowed_value import HomogeneousWindowedBatch + * from apache_beam.utils.windowed_value import WindowedBatch + * from apache_beam.utils.windowed_value import WindowedValue # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowedValue}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":67 + * from apache_beam.utils.windowed_value import WindowedValue + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.io.iobase import RestrictionProgress + * from apache_beam.iobase import RestrictionTracker +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/common.py":68 + * + * if TYPE_CHECKING: + * from apache_beam.io.iobase import RestrictionProgress # <<<<<<<<<<<<<< + * from apache_beam.iobase import RestrictionTracker + * from apache_beam.iobase import WatermarkEstimator +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_io_iobase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionProgress}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":69 + * if TYPE_CHECKING: + * from apache_beam.io.iobase import RestrictionProgress + * from apache_beam.iobase import RestrictionTracker # <<<<<<<<<<<<<< + * from apache_beam.iobase import WatermarkEstimator + * from apache_beam.runners.worker.bundle_processor import ExecutionContext +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionTracker}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_iobase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_RestrictionTracker}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":70 + * from apache_beam.io.iobase import RestrictionProgress + * from apache_beam.iobase import RestrictionTracker + * from apache_beam.iobase import WatermarkEstimator # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.transforms import sideinputs +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WatermarkEstimator}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_iobase, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WatermarkEstimator}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":71 + * from apache_beam.iobase import RestrictionTracker + * from apache_beam.iobase import WatermarkEstimator + * from apache_beam.runners.worker.bundle_processor import ExecutionContext # <<<<<<<<<<<<<< + * from apache_beam.transforms import sideinputs + * from apache_beam.transforms.core import TimerSpec +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecutionContext}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_bundl, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecutionContext}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":72 + * from apache_beam.iobase import WatermarkEstimator + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.transforms import sideinputs # <<<<<<<<<<<<<< + * from apache_beam.transforms.core import TimerSpec + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":73 + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.transforms import sideinputs + * from apache_beam.transforms.core import TimerSpec # <<<<<<<<<<<<<< + * + * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder( +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimerSpec}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_core, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimerSpec}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":67 + * from apache_beam.utils.windowed_value import WindowedValue + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.io.iobase import RestrictionProgress + * from apache_beam.iobase import RestrictionTracker +*/ + } + + /* "apache_beam/runners/common.py":75 + * from apache_beam.transforms.core import TimerSpec + * + * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder( # <<<<<<<<<<<<<< + * coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl() + * +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_WindowedValueCoder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/common.py":76 + * + * IMPULSE_VALUE_CODER_IMPL = coders.WindowedValueCoder( + * coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl() # <<<<<<<<<<<<<< + * + * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested( +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_BytesCoder); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_GlobalWindowCoder); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_12}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_13 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IMPULSE_VALUE_CODER_IMPL, __pyx_t_2) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":78 + * coders.BytesCoder(), coders.GlobalWindowCoder()).get_impl() + * + * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested( # <<<<<<<<<<<<<< + * GlobalWindows.windowed_value(b'')) + * +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IMPULSE_VALUE_CODER_IMPL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encode_nested); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":79 + * + * ENCODED_IMPULSE_VALUE = IMPULSE_VALUE_CODER_IMPL.encode_nested( + * GlobalWindows.windowed_value(b'')) # <<<<<<<<<<<<<< + * + * _LOGGER = logging.getLogger(__name__) +*/ + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_GlobalWindows); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_b__3}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ENCODED_IMPULSE_VALUE, __pyx_t_2) < (0)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":81 + * GlobalWindows.windowed_value(b'')) + * + * _LOGGER = logging.getLogger(__name__) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LOGGER, __pyx_t_2) < (0)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":84 + * + * + * class NameContext(object): # <<<<<<<<<<<<<< + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_NameContext, __pyx_mstate_global->__pyx_n_u_NameContext, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_kp_u_Holds_the_name_information_for_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[4]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[4]) < 0))) __PYX_ERR(0, 84, __pyx_L1_error) + } + + /* "apache_beam/runners/common.py":86 + * class NameContext(object): + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): # <<<<<<<<<<<<<< + * # type: (str, Optional[str]) -> None + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NameContext___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_9) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":97 + * self.transform_id = transform_id + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return self.step_name == other.step_name + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_3__eq__, 0, __pyx_mstate_global->__pyx_n_u_NameContext___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_9) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":100 + * return self.step_name == other.step_name + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'NameContext(%s)' % self.__dict__ + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_5__repr__, 0, __pyx_mstate_global->__pyx_n_u_NameContext___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_9) < (0)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":103 + * return 'NameContext(%s)' % self.__dict__ + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.step_name) + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_7__hash__, 0, __pyx_mstate_global->__pyx_n_u_NameContext___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_9) < (0)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":106 + * return hash(self.step_name) + * + * def metrics_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for metrics reporting.""" + * return self.step_name +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_9metrics_name, 0, __pyx_mstate_global->__pyx_n_u_NameContext_metrics_name, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_metrics_name, __pyx_t_9) < (0)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":110 + * return self.step_name + * + * def logging_name(self): # <<<<<<<<<<<<<< + * """Returns the step name used for logging.""" + * return self.step_name +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11NameContext_11logging_name, 0, __pyx_mstate_global->__pyx_n_u_NameContext_logging_name, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logging_name, __pyx_t_9) < (0)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":84 + * + * + * class NameContext(object): # <<<<<<<<<<<<<< + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NameContext, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NameContext, __pyx_t_9) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":123 + * sdk and worker harnesses. + * """ + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * raise NotImplementedError +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_1receive, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Receiver_receive, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_mstate_global->__pyx_n_u_receive, __pyx_t_2) < (0)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":127 + * raise NotImplementedError + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * raise NotImplementedError +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_3receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Receiver_receive_batch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_mstate_global->__pyx_n_u_receive_batch, __pyx_t_2) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":131 + * raise NotImplementedError + * + * def flush(self): # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_5flush, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Receiver_flush, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_2) < (0)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Receiver___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Receiver, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Receiver__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_8Receiver_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Receiver___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":208 + * self.watermark_estimator_provider = NoOpWatermarkEstimatorProvider() + * + * def invoke_timer_callback( # <<<<<<<<<<<<<< + * self, + * user_state_context, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_3invoke_timer_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MethodWrapper_invoke_timer_callb, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_mstate_global->__pyx_n_u_invoke_timer_callback, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MethodWrapper___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MethodWrapper, (type(self), 0x49bc0f9, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MethodWrapper__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13MethodWrapper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MethodWrapper___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":240 + * + * + * class BatchingPreference(Enum): # <<<<<<<<<<<<<< + * DO_NOT_CARE = 1 # This operation can operate on batches or element-at-a-time + * # TODO: Should we also store batching parameters here? (time/size preferences) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_BatchingPreference, __pyx_mstate_global->__pyx_n_u_BatchingPreference, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_2 != __pyx_t_5) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 240, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":241 + * + * class BatchingPreference(Enum): + * DO_NOT_CARE = 1 # This operation can operate on batches or element-at-a-time # <<<<<<<<<<<<<< + * # TODO: Should we also store batching parameters here? (time/size preferences) + * BATCH_REQUIRED = 2 # This operation can only operate on batches +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DO_NOT_CARE, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 241, __pyx_L1_error) + + /* "apache_beam/runners/common.py":243 + * DO_NOT_CARE = 1 # This operation can operate on batches or element-at-a-time + * # TODO: Should we also store batching parameters here? (time/size preferences) + * BATCH_REQUIRED = 2 # This operation can only operate on batches # <<<<<<<<<<<<<< + * BATCH_FORBIDDEN = 3 # This operation can only work element-at-a-time + * # Other possibilities: BATCH_PREFERRED (with min batch size specified) +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_BATCH_REQUIRED, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + + /* "apache_beam/runners/common.py":244 + * # TODO: Should we also store batching parameters here? (time/size preferences) + * BATCH_REQUIRED = 2 # This operation can only operate on batches + * BATCH_FORBIDDEN = 3 # This operation can only work element-at-a-time # <<<<<<<<<<<<<< + * # Other possibilities: BATCH_PREFERRED (with min batch size specified) + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_BATCH_FORBIDDEN, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(0, 244, __pyx_L1_error) + + /* "apache_beam/runners/common.py":247 + * # Other possibilities: BATCH_PREFERRED (with min batch size specified) + * + * @property # <<<<<<<<<<<<<< + * def supports_batches(self) -> bool: + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) +*/ + __pyx_t_7 = NULL; + __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (PyDict_SetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_1supports_batches, 0, __pyx_mstate_global->__pyx_n_u_BatchingPreference_supports_batc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_supports_batches, __pyx_t_5) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":251 + * return self in (self.BATCH_REQUIRED, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def supports_elements(self) -> bool: + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) +*/ + __pyx_t_8 = NULL; + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_3supports_elements, 0, __pyx_mstate_global->__pyx_n_u_BatchingPreference_supports_elem, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_supports_elements, __pyx_t_5) < (0)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":255 + * return self in (self.BATCH_FORBIDDEN, self.DO_NOT_CARE) + * + * @property # <<<<<<<<<<<<<< + * def requires_batches(self) -> bool: + * return self == self.BATCH_REQUIRED +*/ + __pyx_t_12 = NULL; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_18BatchingPreference_5requires_batches, 0, __pyx_mstate_global->__pyx_n_u_BatchingPreference_requires_batc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_requires_batches, __pyx_t_5) < (0)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/common.py":240 + * + * + * class BatchingPreference(Enum): # <<<<<<<<<<<<<< + * DO_NOT_CARE = 1 # This operation can operate on batches or element-at-a-time + * # TODO: Should we also store batching parameters here? (time/size preferences) +*/ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BatchingPreference, __pyx_t_2, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BatchingPreference, __pyx_t_5) < (0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":312 + * self.timer_methods[timer_spec] = MethodWrapper(do_fn, method.__name__) + * + * def get_restriction_provider(self): # <<<<<<<<<<<<<< + * # type: () -> RestrictionProvider + * return self.process_method.restriction_provider +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_3get_restriction_provider, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_restriction_pr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_get_restriction_provider, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":316 + * return self.process_method.restriction_provider + * + * def get_watermark_estimator_provider(self): # <<<<<<<<<<<<<< + * # type: () -> WatermarkEstimatorProvider + * return self.process_method.watermark_estimator_provider +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_5get_watermark_estimator_provider, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_watermark_esti, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_get_watermark_estimator_provider, __pyx_t_2) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":320 + * return self.process_method.watermark_estimator_provider + * + * def is_unbounded_per_element(self): # <<<<<<<<<<<<<< + * return self.process_method.unbounded_per_element + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_7is_unbounded_per_element, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_is_unbounded_per_e, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_is_unbounded_per_element, __pyx_t_2) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":323 + * return self.process_method.unbounded_per_element + * + * def _validate(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._validate_process() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_9_validate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__validate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_validate, __pyx_t_2) < (0)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/common.py":331 + * self._validate_stateful_dofn() + * + * def _check_duplicate_dofn_params(self, method: MethodWrapper): # <<<<<<<<<<<<<< + * param_ids = [ + * d.param_id for d in method.defaults if isinstance(d, core._DoFnParam) +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_method, __pyx_mstate_global->__pyx_n_u_MethodWrapper) < (0)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_11_check_duplicate_dofn_params, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__check_duplicate_d, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_check_duplicate_dofn_params, __pyx_t_4) < (0)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":340 + * (self.do_fn, method.method_name, param_ids)) + * + * def _validate_process(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_13_validate_process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__validate_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_validate_process, __pyx_t_4) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":347 + * self._check_duplicate_dofn_params(self.process_method) + * + * def _validate_process_batch(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._check_duplicate_dofn_params(self.process_batch_method) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_15_validate_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__validate_process_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_validate_process_batch, __pyx_t_4) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":376 + * f"method parameter {d}") + * + * def _validate_bundle_method(self, method_wrapper): # <<<<<<<<<<<<<< + * """Validate that none of the DoFnParameters are used in the function + * """ +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_17_validate_bundle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__validate_bundle_m, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_validate_bundle_method, __pyx_t_4) < (0)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":385 + * (param, method_wrapper)) + * + * def _validate_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> None + * userstate.validate_stateful_dofn(self.do_fn) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_19_validate_stateful_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature__validate_stateful, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_validate_stateful_dofn, __pyx_t_4) < (0)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":389 + * userstate.validate_stateful_dofn(self.do_fn) + * + * def is_splittable_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.get_restriction_provider() is not None +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_21is_splittable_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_is_splittable_dofn, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_is_splittable_dofn, __pyx_t_4) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":393 + * return self.get_restriction_provider() is not None + * + * def get_restriction_coder(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[TupleCoder] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_23get_restriction_coder, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_restriction_co, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_get_restriction_coder, __pyx_t_4) < (0)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":405 + * return None + * + * def is_stateful_dofn(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self._is_stateful_dofn +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_25is_stateful_dofn, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_is_stateful_dofn, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_is_stateful_dofn, __pyx_t_4) < (0)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":409 + * return self._is_stateful_dofn + * + * def has_timers(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * _, all_timer_specs = userstate.get_dofn_specs(self.do_fn) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_27has_timers, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_has_timers, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_has_timers, __pyx_t_4) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":414 + * return bool(all_timer_specs) + * + * def has_bundle_finalization(self): # <<<<<<<<<<<<<< + * for sig in (self.start_bundle_method, + * self.process_method, +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_29has_bundle_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_has_bundle_finaliz, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_has_bundle_finalization, __pyx_t_4) < (0)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":427 + * return False + * + * def get_bundle_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_31get_bundle_contexts, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_bundle_context, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_get_bundle_contexts, __pyx_t_4) < (0)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":445 + * pass + * + * def get_setup_contexts(self): # <<<<<<<<<<<<<< + * seen = set() + * for sig in (self.setup_lifecycle_method, +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_34get_setup_contexts, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature_get_setup_contexts, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_get_setup_contexts, __pyx_t_4) < (0)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_37__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnSignature, (type(self), 0x8b80bb7, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnSignature__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13DoFnSignature_39__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnSignature___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":488 + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * + * @staticmethod # <<<<<<<<<<<<<< + * def create_invoker( + * signature, # type: DoFnSignature +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_3create_invoker, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_create_invoker, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[6]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_create_invoker, __pyx_t_4) < (0)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = NULL; + __Pyx_GetNameInClass(__pyx_t_9, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_create_invoker); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_create_invoker, __pyx_t_4) < (0)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_5invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process, __pyx_t_4) < (0)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":573 + * raise NotImplementedError + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_7invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_process_batch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process_batch, __pyx_t_4) < (0)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":593 + * raise NotImplementedError + * + * def invoke_setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_9invoke_setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_setup, __pyx_t_4) < (0)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":604 + * self.signature.setup_lifecycle_method.method_value() + * + * def invoke_start_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_11invoke_start_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_start_bundle, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_start_bundle, __pyx_t_4) < (0)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":616 + * self.signature.start_bundle_method.method_value()) + * + * def invoke_finish_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_13invoke_finish_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_finish_bundle, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_finish_bundle, __pyx_t_4) < (0)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":627 + * self._bundle_context_values = None + * + * def invoke_teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_15invoke_teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_teardown, __pyx_t_4) < (0)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":637 + * self._setup_context_values = None + * + * def invoke_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * # self.output_handler is Optional, but in practice it won't be None here +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_17invoke_user_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_user_timer, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_user_timer, __pyx_t_4) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":650 + * dynamic_timer_tag)) + * + * def invoke_create_watermark_estimator(self, estimator_state): # <<<<<<<<<<<<<< + * return self.signature.create_watermark_estimator_method.method_value( + * estimator_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_19invoke_create_watermark_estimator, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_create_waterm, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_create_watermark_estimato, __pyx_t_4) < (0)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":654 + * estimator_state) + * + * def invoke_split(self, element, restriction): # <<<<<<<<<<<<<< + * return self.signature.split_method.method_value(element, restriction) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_21invoke_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_split, __pyx_t_4) < (0)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":657 + * return self.signature.split_method.method_value(element, restriction) + * + * def invoke_initial_restriction(self, element): # <<<<<<<<<<<<<< + * return self.signature.initial_restriction_method.method_value(element) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_23invoke_initial_restriction, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_initial_restr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_initial_restriction, __pyx_t_4) < (0)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":660 + * return self.signature.initial_restriction_method.method_value(element) + * + * def invoke_create_tracker(self, restriction): # <<<<<<<<<<<<<< + * return self.signature.create_tracker_method.method_value(restriction) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_25invoke_create_tracker, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker_invoke_create_tracke, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_invoke_create_tracker, __pyx_t_4) < (0)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnInvoker, (type(self), 0x1fb7971, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnInvoker__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnInvoker_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnInvoker___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":676 + * self.process_batch_method = signature.process_batch_method.method_value + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_3invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleInvoker_invoke_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process, __pyx_t_4) < (0)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":688 + * return [] + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_5invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleInvoker_invoke_process_bat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process_batch, __pyx_t_4) < (0)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleInvoker___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SimpleInvoker, (type(self), 0x7ba5979, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SimpleInvoker__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13SimpleInvoker_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SimpleInvoker___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":700 + * + * + * def _get_arg_placeholders( # <<<<<<<<<<<<<< + * method: MethodWrapper, + * input_args: Optional[List[Any]], +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_method, __pyx_mstate_global->__pyx_n_u_MethodWrapper) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_input_args, __pyx_mstate_global->__pyx_kp_u_Optional_List_Any) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_input_kwargs, __pyx_mstate_global->__pyx_kp_u_Optional_Dict_str_any) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_1_get_arg_placeholders, 0, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_arg_placeholders, __pyx_t_9) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":844 + * signature.process_batch_method, input_args, input_kwargs) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_3invoke_process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker_invoke_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process, __pyx_t_9) < (0)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":916 + * return residuals + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_5invoke_process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker_invoke_process_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[8]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process_batch, __pyx_t_9) < (0)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":943 + * windowed_batch, additional_args, additional_kwargs) + * + * def _should_process_window_for_sdf( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_7_should_process_window_for_sdf, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker__should_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_should_process_window_for_sdf, __pyx_t_9) < (0)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":980 + * return True + * + * def _invoke_process_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_9_invoke_process_per_window, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker__invoke_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process_per_window, __pyx_t_9) < (0)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1083 + * return None + * + * def _invoke_process_batch_per_window( # <<<<<<<<<<<<<< + * self, + * windowed_batch: WindowedBatch, +*/ + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_windowed_batch, __pyx_mstate_global->__pyx_n_u_WindowedBatch) < (0)) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_11_invoke_process_batch_per_window, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker__invoke_process_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_invoke_process_batch_per_window, __pyx_t_4) < (0)) __PYX_ERR(0, 1083, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1153 + * self.threadsafe_watermark_estimator) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _try_split( + * fraction, +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_13_try_split, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker__try_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_try_split_2, __pyx_t_4) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = NULL; + __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_try_split_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_try_split_2, __pyx_t_4) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1336 + * return None + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * if not self.is_splittable: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_15try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker_try_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_4) < (0)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1364 + * return (residuals, primaries) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _scale_progress(progress, window_index, stop_window_index): + * # We scale progress based upon the amount of work we will do for one +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_17_scale_progress, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker__scale_progress, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_scale_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = NULL; + __Pyx_GetNameInClass(__pyx_t_9, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_scale_progress); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_scale_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1375 + * return RestrictionProgress(completed=completed, remaining=remaining) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * if not self.is_splittable: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_19current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker_current_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PerWindowInvoker, (type(self), 0x74fffff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PerWindowInvoker__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_16PerWindowInvoker_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PerWindowInvoker___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1495 + * bundle_finalizer_param=self.bundle_finalizer_param) + * + * def process(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * try: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_4) < (0)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1503 + * return [] + * + * def _maybe_sample_exception( # <<<<<<<<<<<<<< + * self, exc_info: Tuple, windowed_value: Optional[WindowedValue]) -> None: + * +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_exc_info, __pyx_mstate_global->__pyx_n_u_Tuple) < (0)) __PYX_ERR(0, 1503, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_windowed_value, __pyx_mstate_global->__pyx_kp_u_Optional_WindowedValue) < (0)) __PYX_ERR(0, 1503, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_5_maybe_sample_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner__maybe_sample_excepti, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_maybe_sample_exception, __pyx_t_9) < (0)) __PYX_ERR(0, 1503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1519 + * self.execution_context.instruction_id) + * + * def process_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * try: +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_7process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_process_batch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_process_batch, __pyx_t_9) < (0)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1526 + * self._reraise_augmented(exn) + * + * def process_with_sized_restriction(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> Iterable[SplitResultResidual] + * (element, (restriction, estimator_state)), _ = windowed_value.value +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_9process_with_sized_restriction, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_process_with_sized_re, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_process_with_sized_restriction, __pyx_t_9) < (0)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1534 + * watermark_estimator_state=estimator_state) + * + * def try_split(self, fraction): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SplitResultPrimary], Iterable[SplitResultResidual]]] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_11try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_try_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_9) < (0)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1539 + * return self.do_fn_invoker.try_split(fraction) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[RestrictionProgress] + * assert isinstance(self.do_fn_invoker, PerWindowInvoker) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_13current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_current_element_progr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_9) < (0)) __PYX_ERR(0, 1539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1544 + * return self.do_fn_invoker.current_element_progress() + * + * def process_user_timer( # <<<<<<<<<<<<<< + * self, timer_spec, key, window, timestamp, pane_info, dynamic_timer_tag): + * try: +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_15process_user_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_process_user_timer, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_process_user_timer, __pyx_t_9) < (0)) __PYX_ERR(0, 1544, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1552 + * self._reraise_augmented(exn) + * + * def _invoke_bundle_method(self, bundle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_17_invoke_bundle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner__invoke_bundle_method, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_invoke_bundle_method, __pyx_t_9) < (0)) __PYX_ERR(0, 1552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1559 + * self._reraise_augmented(exn) + * + * def _invoke_lifecycle_method(self, lifecycle_method): # <<<<<<<<<<<<<< + * try: + * self.context.set_element(None) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_19_invoke_lifecycle_method, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner__invoke_lifecycle_met, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_invoke_lifecycle_method, __pyx_t_9) < (0)) __PYX_ERR(0, 1559, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1566 + * self._reraise_augmented(exn) + * + * def setup(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_21setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_setup, __pyx_t_9) < (0)) __PYX_ERR(0, 1566, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1570 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup) + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_23start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_start, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_9) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1574 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_start_bundle) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_25finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_9) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1578 + * self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle) + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_27teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_teardown, __pyx_t_9) < (0)) __PYX_ERR(0, 1578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1582 + * self._invoke_lifecycle_method(self.do_fn_invoker.invoke_teardown) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.bundle_finalizer_param.finalize_bundle() +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_29finalize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner_finalize, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_finalize, __pyx_t_9) < (0)) __PYX_ERR(0, 1582, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1586 + * self.bundle_finalizer_param.finalize_bundle() + * + * def _reraise_augmented(self, exn, windowed_value=None): # <<<<<<<<<<<<<< + * if getattr(exn, '_tagged_with_step', False) or not self.step_name: + * raise exn +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_31_reraise_augmented, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner__reraise_augmented, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_reraise_augmented, __pyx_t_9) < (0)) __PYX_ERR(0, 1586, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnRunner, (type(self), 0x177d0a4, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnRunner__set_state(self, __pyx_state) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10DoFnRunner_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnRunner___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1613 + * + * class OutputHandler(object): + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_1handle_process_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_handle_process_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, __pyx_mstate_global->__pyx_n_u_handle_process_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1618 + * raise NotImplementedError + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_3handle_process_batch_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_handle_process_bat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, __pyx_mstate_global->__pyx_n_u_handle_process_batch_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1618, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OutputHandler, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OutputHandler__set_state(self, __pyx_state) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13OutputHandler_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1657 + * self._process_batch_yields_elements = process_batch_yields_elements + * + * def handle_process_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_element, results, watermark_estimator=None): + * # type: (WindowedValue, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_3handle_process_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_handle_process_ou, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_handle_process_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1710 + * self.per_element_output_counter.add_input(output_element_count) + * + * def handle_process_batch_outputs( # <<<<<<<<<<<<<< + * self, windowed_input_batch, results, watermark_estimator=None): + * # type: (WindowedBatch, Iterable[Any], Optional[WatermarkEstimator]) -> None +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_5handle_process_batch_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_handle_process_ba, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_handle_process_batch_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1710, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1816 + * "expected to produce a batch.") + * + * def start_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Validate that start_bundle does not output any elements""" + * if results is None: +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_7start_bundle_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_start_bundle_outp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_start_bundle_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1816, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1823 + * 'Start Bundle should not output any elements but got %s' % results) + * + * def finish_bundle_outputs(self, results): # <<<<<<<<<<<<<< + * """Dispatch the result of finish_bundle to the appropriate receivers. + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_9finish_bundle_outputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler_finish_bundle_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_finish_bundle_outputs, __pyx_t_9) < (0)) __PYX_ERR(0, 1823, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler___reduce_cython_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__OutputHandler, (type(self), 0xa5be297, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__OutputHandler__set_state(self, __pyx_state) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_14_OutputHandler_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OutputHandler___setstate_cython_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_9) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1852 + * + * + * class _NoContext(WindowFn.AssignContext): # <<<<<<<<<<<<<< + * """An uninspectable WindowFn.AssignContext.""" + * NO_VALUE = object() +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_WindowFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_AssignContext); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_NoContext, __pyx_mstate_global->__pyx_n_u_NoContext, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_kp_u_An_uninspectable_WindowFn_Assign); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 1852, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1854 + * class _NoContext(WindowFn.AssignContext): + * """An uninspectable WindowFn.AssignContext.""" + * NO_VALUE = object() # <<<<<<<<<<<<<< + * + * def __init__(self, value, timestamp=NO_VALUE): +*/ + __pyx_t_7 = NULL; + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NO_VALUE, __pyx_t_9) < (0)) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1856 + * NO_VALUE = object() + * + * def __init__(self, value, timestamp=NO_VALUE): # <<<<<<<<<<<<<< + * self.value = value + * self._timestamp = timestamp +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NoContext___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common___pyx_defaults)) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_t_7 = PyObject_GetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NO_VALUE); + if (unlikely(!__pyx_t_7)) { + PyErr_Clear(); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NO_VALUE); + } + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_9)->arg0 = __pyx_t_7; + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_11apache_beam_7runners_6common_22__defaults__); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_9) < (0)) __PYX_ERR(0, 1856, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1860 + * self._timestamp = timestamp + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * if self._timestamp is self.NO_VALUE: +*/ + __pyx_t_7 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_3timestamp, 0, __pyx_mstate_global->__pyx_n_u_NoContext_timestamp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_9) < (0)) __PYX_ERR(0, 1860, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1867 + * return self._timestamp + * + * @property # <<<<<<<<<<<<<< + * def existing_windows(self): + * raise ValueError('No existing_windows in this context.') +*/ + __pyx_t_12 = NULL; + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_10_NoContext_5existing_windows, 0, __pyx_mstate_global->__pyx_n_u_NoContext_existing_windows, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_existing_windows, __pyx_t_9) < (0)) __PYX_ERR(0, 1867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1852 + * + * + * class _NoContext(WindowFn.AssignContext): # <<<<<<<<<<<<<< + * """An uninspectable WindowFn.AssignContext.""" + * NO_VALUE = object() +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NoContext, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NoContext, __pyx_t_9) < (0)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1872 + * + * + * class DoFnState(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[10]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFnState, __pyx_mstate_global->__pyx_n_u_DoFnState, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_kp_u_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_4 != __pyx_mstate_global->__pyx_tuple[10]) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[10]) < 0))) __PYX_ERR(0, 1872, __pyx_L1_error) + } + + /* "apache_beam/runners/common.py":1877 + * Keeps track of state that DoFns want, currently, user counters. + * """ + * def __init__(self, counter_factory): # <<<<<<<<<<<<<< + * self.step_name = '' + * self._counter_factory = counter_factory +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9DoFnState_1__init__, 0, __pyx_mstate_global->__pyx_n_u_DoFnState___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_9) < (0)) __PYX_ERR(0, 1877, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1881 + * self._counter_factory = counter_factory + * + * def counter_for(self, aggregator): # <<<<<<<<<<<<<< + * """Looks up the counter for this aggregator, creating one if necessary.""" + * return self._counter_factory.get_aggregator_counter( +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9DoFnState_3counter_for, 0, __pyx_mstate_global->__pyx_n_u_DoFnState_counter_for, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_counter_for, __pyx_t_9) < (0)) __PYX_ERR(0, 1881, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/common.py":1872 + * + * + * class DoFnState(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DoFnState, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DoFnState, __pyx_t_9) < (0)) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1896 + * self.set_element(element) + * + * def set_element(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (Optional[WindowedValue]) -> None + * self.windowed_value = windowed_value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_3set_element, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnContext_set_element, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext, __pyx_mstate_global->__pyx_n_u_set_element, __pyx_t_4) < (0)) __PYX_ERR(0, 1896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnContext___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoFnContext, (type(self), 0x3a8e3cf, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoFnContext__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11DoFnContext_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoFnContext___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Receiver(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_3__pyx_unpickle_Receiver, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Receiver, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Receiver, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_5__pyx_unpickle_MethodWrapper, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MethodWrapper, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MethodWrapper, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnSignature(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x8b80bb7, 0xe7c08a8, 0x87afe8e, b'_is_stateful_dofn, batching_configuration, create_tracker_method, create_watermark_estimator_method, do_fn, finish_bundle_method, initial_restriction_method, process_batch_method, process_method, setup_lifecycle_method, split_method, start_bundle_method, teardown_lifecycle_method, timer_methods') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_7__pyx_unpickle_DoFnSignature, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnSignature, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnSignature, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_9__pyx_unpickle_DoFnInvoker, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnInvoker, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnInvoker, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SimpleInvoker(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x7ba5979, 0x6ac4a7d, 0x25ce176, b'_bundle_context_values, _setup_context_values, bundle_finalizer_param, output_handler, process_batch_method, process_method, signature, user_state_context') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_11__pyx_unpickle_SimpleInvoker, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleInvoker, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SimpleInvoker, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_13__pyx_unpickle_PerWindowInvoker, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PerWindowInvoker, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PerWindowInvoker, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoFnRunner(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x177d0a4, 0x8a5d4de, 0x503639a, b'bundle_finalizer_param, context, do_fn_invoker, execution_context, side_inputs, step_name, transform_id') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_15__pyx_unpickle_DoFnRunner, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnRunner, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnRunner, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_17__pyx_unpickle_OutputHandler, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OutputHandler, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OutputHandler, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__OutputHandler(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xa5be297, 0x46a3542, 0xca1400f, b'_process_batch_yields_elements, _process_yields_batches, main_receivers, output_batch_converter, per_element_output_counter, tagged_receivers, window_fn') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_19__pyx_unpickle__OutputHandler, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OutputHandler, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__OutputHandler, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6common_21__pyx_unpickle_DoFnContext, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnContext, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoFnContext, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/common.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_14); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.runners.common", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.common"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 1256, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/runners/common.py":624 + * self.signature.finish_bundle_method.method_value()) + * for c in self._bundle_context_values.values(): + * c[0].__exit__(None, None, None) # <<<<<<<<<<<<<< + * self._bundle_context_values = None + * +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/runners/common.py":713 + * # Not to be confused with ArgumentPlaceHolder, which may be passed in + * # input_args and is a placeholder for side-inputs. + * class ArgPlaceholder(object): # <<<<<<<<<<<<<< + * def __init__(self, placeholder): + * self.placeholder = placeholder +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/runners/common.py":1594 + * # Attempt to construct the same kind of exception + * # with an augmented message. + * new_exn = type(exn)(exn.args[0] + step_annotation, *exn.args[1:]) # <<<<<<<<<<<<<< + * new_exn._tagged_with_step = True # Could raise attribute error. + * except: # pylint: disable=bare-except +*/ + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 1594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + + /* "apache_beam/runners/common.py":84 + * + * + * class NameContext(object): # <<<<<<<<<<<<<< + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + + /* "apache_beam/runners/common.py":86 + * class NameContext(object): + * """Holds the name information for a step.""" + * def __init__(self, step_name, transform_id=None): # <<<<<<<<<<<<<< + * # type: (str, Optional[str]) -> None + * +*/ + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + + /* "apache_beam/runners/common.py":488 + * self.bundle_finalizer_param = None # type: Optional[core._BundleFinalizerParam] + * + * @staticmethod # <<<<<<<<<<<<<< + * def create_invoker( + * signature, # type: DoFnSignature +*/ + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(7, Py_None, Py_None, Py_None, Py_None, Py_True, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + + /* "apache_beam/runners/common.py":546 + * bundle_finalizer_param) + * + * def invoke_process( # <<<<<<<<<<<<<< + * self, + * windowed_value, # type: WindowedValue +*/ + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + + /* "apache_beam/runners/common.py":573 + * raise NotImplementedError + * + * def invoke_process_batch( # <<<<<<<<<<<<<< + * self, + * windowed_batch, # type: WindowedBatch +*/ + __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); + + /* "apache_beam/runners/common.py":1872 + * + * + * class DoFnState(object): # <<<<<<<<<<<<<< + * """For internal use only; no backwards-compatibility guarantees. + * +*/ + __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]); + __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 1872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<11; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 11; } index[] = {{1},{40},{5},{75},{37},{35},{47},{131},{38},{3},{77},{49},{15},{36},{29},{4},{179},{24},{19},{23},{108},{9},{171},{54},{35},{2},{0},{1},{8},{29},{19},{7},{38},{6},{48},{2},{15},{36},{48},{66},{16},{9},{20},{90},{24},{14},{6},{40},{15},{42},{21},{38},{3},{14},{13},{15},{14},{14},{18},{35},{35},{36},{18},{20},{10},{7},{11},{21},{11},{4},{4},{11},{29},{31},{23},{11},{29},{31},{26},{33},{45},{32},{38},{26},{32},{24},{24},{31},{27},{29},{10},{17},{10},{28},{30},{32},{35},{34},{29},{35},{19},{17},{18},{24},{29},{41},{16},{16},{19},{20},{13},{31},{33},{42},{23},{37},{31},{37},{37},{33},{35},{38},{32},{46},{37},{24},{32},{30},{38},{9},{18},{21},{20},{21},{12},{4},{16},{12},{17},{13},{24},{24},{8},{8},{7},{4},{4},{7},{13},{31},{33},{35},{8},{11},{18},{20},{20},{20},{24},{24},{10},{19},{27},{20},{30},{4},{8},{13},{14},{31},{32},{33},{34},{36},{43},{42},{37},{36},{35},{13},{16},{34},{36},{43},{49},{32},{47},{27},{41},{31},{37},{26},{20},{8},{16},{26},{28},{14},{16},{22},{16},{19},{19},{18},{22},{20},{17},{14},{13},{31},{33},{28},{34},{18},{19},{10},{13},{12},{28},{28},{10},{9},{9},{14},{16},{5},{10},{18},{23},{26},{8},{11},{13},{13},{18},{18},{1},{1},{11},{15},{17},{10},{15},{18},{20},{21},{18},{34},{18},{26},{29},{43},{22},{27},{29},{27},{26},{27},{32},{3},{9},{4},{16},{22},{12},{22},{23},{6},{18},{18},{5},{20},{21},{4},{22},{13},{1},{10},{28},{17},{18},{5},{6},{9},{14},{26},{7},{4},{16},{15},{11},{16},{14},{14},{26},{24},{23},{16},{17},{20},{1},{18},{8},{20},{15},{18},{8},{5},{36},{5},{7},{17},{7},{13},{9},{4},{9},{6},{15},{21},{8},{9},{16},{8},{3},{11},{8},{15},{6},{13},{21},{5},{2},{21},{8},{21},{29},{10},{8},{7},{9},{22},{21},{45},{54},{38},{19},{11},{14},{19},{22},{8},{10},{21},{24},{18},{9},{9},{32},{12},{28},{22},{23},{10},{8},{1},{8},{25},{19},{10},{12},{21},{14},{21},{21},{33},{20},{26},{24},{14},{20},{32},{26},{12},{12},{19},{15},{21},{17},{13},{13},{20},{18},{16},{24},{5},{3},{2},{6},{18},{24},{5},{16},{7},{15},{12},{8},{14},{23},{13},{6},{11},{12},{14},{12},{10},{15},{8},{7},{7},{21},{4},{13},{6},{17},{2},{14},{5},{22},{14},{14},{27},{1},{9},{5},{8},{9},{26},{11},{12},{3},{11},{9},{7},{19},{20},{12},{19},{13},{7},{13},{20},{29},{18},{14},{18},{30},{22},{8},{8},{12},{14},{12},{11},{10},{26},{26},{25},{28},{28},{28},{31},{23},{28},{29},{14},{12},{7},{13},{10},{17},{13},{9},{19},{14},{8},{16},{18},{8},{20},{21},{13},{20},{14},{9},{11},{17},{20},{16},{19},{25},{6},{7},{6},{5},{16},{15},{15},{24},{4},{4},{4},{11},{12},{10},{12},{19},{5},{30},{2},{11},{10},{3},{9},{4},{5},{5},{12},{20},{5},{10},{12},{15},{9},{17},{5},{5},{16},{17},{3},{3},{16},{17},{2},{8},{8},{9},{30},{5},{10},{9},{10},{10},{8},{10},{9},{12},{9},{10},{46},{6},{21},{12},{6},{22},{12},{18},{9},{4},{9},{23},{17},{23},{23},{22},{5},{6},{1},{19},{28},{25},{15},{6},{9},{12},{16},{14},{20},{22},{14},{8},{9},{7},{14},{10},{1},{3},{54},{45},{0},{2},{11},{77},{48},{58},{190},{205},{40},{667},{16},{22},{15},{11},{11},{9},{13},{19},{18},{18},{19},{16},{21},{21},{152},{9},{10},{248},{11},{14},{11},{89},{89},{163},{74},{55},{22},{603},{17},{65},{50},{200},{35},{16},{28},{29},{175},{14},{72},{272},{1250},{284},{382},{671},{649},{128},{43},{309},{41},{44},{23},{17},{11},{10},{2},{2},{2},{7},{7},{2},{27},{44},{61},{19},{39},{39},{16},{11},{11},{46},{16},{2},{57},{56},{58},{55},{55},{55},{13},{11},{61},{777},{468},{411},{133},{110},{126},{56},{31},{267},{155},{28}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (9196 bytes) */ +const char* const cstring = "(\265/\375`\236W\025\037\001j\036\275=G\340\352\314\0030\314c\215'\346\032\305c-f\363<\317\363<\317\363<\326B[\266omF\3506\254jC\266\023l\253\016M\324\220\374=\307\271\024\004A\020\004\207\322\376\202\235_UO\206\335\3217\207Q\000\000v\214\"\212\003\275\003\355\003\336\355\236\347\334\226g\331\335\016x\343w/GWU\345l\334\213\323\224\363\333-\355>\227\256\343^\345\375\345\335\324\276Ci\221\251\234\300Rh27\226\307\352\032\\_\032\314\306...\300\276\276\274<\037\263\272\267\303>\256\236\350\253\353\266\0264'\250S=\332\375\333i\256\256\225\365\226\323x\336EQ\364\345)3\030\214o\346\266\270-\250\357\275v\267s\331\327\327_\036\212\376\372\254\205ey\372\366\027\206\305\307YnRw\305\006CA\231\255\240\262\025\033\352c\267\267}\347\366\334\024\317\362\234\313\242\300zq\013\203\341V\316\027\024\346\262\202\243\261\310\320\027\3545;i\201\355\370\355\226\256A\035\352\362v\237\233kc\324\257\236\363\336\256z\270\357T\034\264\325\271*\212\336\244\375\215a\356\022|U\024\250{w}\027s\264\373\225\277\375\355iN\317\005y/\r\246]\267\262\250\355E__\374\242,_\341\034\252sa\356;z\363\362\336\013D\327\376\246p\367(\232\242\375E\321\326y\202\336f-\350\354\3252\223\335p&2\333\315E\366Baf+\261\363v\276N\334\023\337\341\340\313\362v\215\371\336\337\365m\365\264\353\372K{;\216\311\013f\223\341j0[\013\354\365\222\231\330f14\345\344v\232\260.\257\247\234\245\355\336\223\306\303wxtv\345\001g\314\026l\307aS\204BO\337\330\365\022FFZo\313\343\245\271\246\207G\357.\354\261\242.\214\332\344\\\017\023\202W\375\352W\010\2766N\327t\327Jc\325\205\273\3519\260\347\276:\336\3665\345~U\325\324\014\272=\022\217vTUy\205\226\207\272z\337\341{\235\355&\374r\330\245\345\337\336\266\361k\372\226\367\336\315\312\336\314\026\273r\034.\022\247=\247\377\272\315\326\002Q\260\200\201+\001\211\357\261\367+I\217\367\034I\347\245\334\307IZ\271\230\007\257;\022\022\010\336\007\303\274\017\223\227\302<\207\276\256\317\007\367`\177\271\351\203\375f\344\3554\263Es\316\254\320\320\004Ef^3,\367\315Z\335\263<\366\256\252\351\201\266\334""\003\356\036\366\334\247\366\336\232\261\0334u2\323\027\204\3315\316\371\356=g\323\\l\243\266\334,qP2B\203\321\314\366\355o\317\255lW\203'nKo}\275\336[\341\226_=\020\205\375\232\323M\267\005\304w|\264\2708\255\254\267\272\230\273vm;\017h\246fWW\034\026\217\235)\242\362\010\235\365\305\260\371\242\2223a\037\367\202]\205\215u.\214\323\312\314V\326\362un\232\274\367\272\272\326\354^e\335\024\323\214\335\324|E\202,\334\366\367\215SS\004hz\316\203\315\016s\330\233:\327\204M\357\353]\3054M\246\226\357\361\316\014\256\271\025\346\276\236\233\216x\365\345\300\234\031\241\373\330dy\333\256\346\353\306\314\036\263\374E\355>8vM\225\215]\236W\333\330\304\344\371\265]c-\337\201\263\366\264\277\010\314\t\024\314\256\263zS\35590\363\355>3\310\266\356\210\352\362\340\3363A>\274\357\251\373\372ZjoW]W\315\036\1779\355\3557)\177o\255\273\302\351\372\302\276\333Lnv\034\3163a\2675}wU8\316\301+\353\363\246_\3156\346\276ZpN\207[\367\244\335\255\336\237\2556\006t\325v\2051;\233\343p\332}\276]\333\330l\317V\303\325\220\305.\371\231pG\270\370:\277\037\237}\204\304y\205e7\250\311\372\343\341\227\024Y\034j\305\032}@G5\357d\231s\206\221c\204&\214\277#\2048o\211\373\301\306\207\033\230\210#\340L\200\3235z7k\324/=2c\374l\233\235\252]\350\216\207\377P\\\321,\225\251\"\262\206\254\255\252?\"h\346\014\025\335`\026\220\301#\202\270\032\240\"\232H\200\037@%C\210\210\254yG\370\300\322\231\t\014c\t>\001\221\213\217\301Q\035\\\266\203:\242\266\325)\232U\372\321*\263k\306\220I\2439H\332@\021\271\315`\300\027 \25700\356\327n\340\361=,\210 \033\201\371M\213\t\242K\226\200 \256\346\013\024\021D\347f\r\024G\251\376\240\375L\240\364\177\267\355\2360\362\335\231@\213\307\352\257D\271\233\202\310\227\250YfW\215B\367\310\025\363\200\001!\000%\035D!\000\240\014\240a\313\036\360\313\331\302.\271\260 VP\020Y&qB\342W\227\324\007,\376O\256\020""\021\371\014\224+F\237\024\242\341\231\317\032\244\000e\321%\204k\264+\377\014\230\210\240\237\024\221/b\372&ye\"\376\346\222\232\275\201\346\033\252\2572\221\363\204\223\346@\375\225\260$\"\326\204\251\322\320\302i\227h|\216\031\243,\006\230\340\300\022\232\312\232\014Ax\2521L\322'\225\304\032}\322\250\274\023\252\312\342O\3301\203\310^\370P\022\207\n\206/w\202;\342\276\33185\2579\352U\r\"\361%L\304sF\221:\244~j\310\032\342 |\374\034\255\200f\321\270yc^\3157\371\224Ky5\002 \352\020*\213\247]\332\271\272E\361)J\342\351\272a\273\304&\355\212\032d\342\307B.\004\022\307\377\263G\352\020\212\177\341\254E*\376\203\313V\300\242\013p;\243\006\211\370&!\251,\262\354\004\004>\006yB\206\tQ$bm\316@}\227\360Db\221~)\004\300\324\201\305\301U\327\3148r\216\360\341D<\231\210\\\276 D\211\210+\032D\273\314\347,1\247r\004!K\3509\214\312\342jx\2737\356\325\255S\237\324!tl\216\345\022\031CX\"\021A2DI\\\331\256\361\263\354X\355\252\017\224D\020\007\327\014\000\300,\326\"Ca-'\r\235\335P\330M\306\004\275\005i\000B\314Y\220\346[ur|\013\364\257/\366q\033\2630\320EW\024\315\301\360.\350c\357C\323\325\357V\257\266\335\353\330\356\333\336W\356s\325\267\365\376]Q\226\307?\234\316\266\361\333\213\275\217\247A8\r\366\356\363\276\267\334\347\363\251\353\352\334\216\223\366\326\347\302\036\330}o;\352\276l\254\272@\216\372\027E\331\016\274\361,\352WuEc\370\355~Ey\360\256\355l\213\202wY\t-\264\357^4mc\035\212\276\274\247\343\257\016\325\255o\367\301(\332\213\321\266\3578\234\242\256\312\323\035\252\242h\374\276\335s5\247wTm\371\353\006S\216\366\030U;\354\246\335\273l\332{\035^\341\276CQ\264\267n\372v\326us*\333\327 \252\3020G}o]wM\333\240\347h\020\366\365:\352}7\351\352\363/\337\275(\320\267<\257\373\202\375\365\276\345/\354\276.\320\263+\034\243-_+1\224N\207\312\345P(\212\302\200\001\345\342\202BY8\361\360\234\202\301\023\014\237z\275\023\r\315IF\346\364\362r\272`\362\3611\355\354\230rrL\336\243\250if\306\024\023crq1\255\254\344\344\224\274/\261l)C\206RLL\t\207+\321h%\231\214\344=\311uI,K\332\355H""\0324\220,X\030\361\360\300\360\250\327\033\271\270\214f\263\321\312\312\010\005ed\301\202\310\347\023\261\254h]ihD''!\037\237\020\017O\010\010\014\371|\241\014\031p\270\020\215\026\222\311\312\337\257\354\365J\033\233\262\3672%\245|\275\312\363$yx\3108&Y\226\344\361\310\336I\r\032H\031\231\236\2368\036\333v|y\231\315\306\013\027~>\366\263\353_\325\257\306>\307\320\337\035\nP4\324l\206B\251\234ppN\357{\252\325N'\026\023\313\232x<\323\355f2\321J>>\245\235\235\222\353\226nnJ44%\031\231\222\212J\251\204B\352\365H\353J\"\305\220H\267QO\317h\024\034\215bF\243\233(\030\024\305\261HUE\0324\210D0\221\350\014\261l\210\307\013\305\304\204n\241[\311\303S\346\344\224e\256,kH\037\037rg\207\314\345\310\232\032\022\006#\317s\264\261\031u\2721C\2061&\006\264A\347\353\360\317/|u\030k\375\332\317\016\005\256I\310\032I\243\2212R6n\3300\352\350\214@\340\370\276\343\315\315(#3\342p\243\3156\262\260\214\261X\356\347h>\315\313\177\241\3609now\330\r`\322\302\350\3433\356\354\214<\336\250\252#\n\312x2\236\200l\000\000\350\260\366\337o\377F\3734\006\237\303N\240\022P\246\2604o6\311\311\024\245\030;\201\315C\347\244\344\025<\333\346\014\002\304\n\tXh\023\252F\303\332\020f\361'b\272\204>\201\346\327\177\000\315\013d8Bh\372\311\030\212u\010\306W;\346\323\347\265\305o\205\212\031\362\355\207\200\3568Kg1f\016\315\026(\342\260\337\":\264G\200\217s\353l\006\346\177\315\255\220C\250\n\001\210\250\025\370\325\243\372cB}\200T\223T|\232\304 \007\210(y\271\"\"B\216(i\213\261H\"q\364\004}[0\303\303\210\341i\222!\022\250R\254Z%\025%h\222Z\001\003\021\2375\362\233O\346\020\031\347j\241]4\312<@\305\372+9\025\006\020\246\034D\343y\201a\316\250%\352\261\376\320 \376\206(\r~G\255\3360\363\333\344\226\360\361\177\364\t]\200\313\n\344\t\020\315\"-\310Z\305\250\023\252F\326g\215\304Z=\222\3617\010\037\306\224EMN\215\037D\033\000\021\216\302\325\277\tC\253\233\245\026\2315J\021?\302\347\342\3374~d\024\256\237\013\n~\204}C\313\314p:c\2760i\344n\031\333\245MT\304\007:5\340\017\020\365\320\353\317.`'8\347\0023\206i""\344\217\\\374\213\332\371\0033\221'H\031?\203Ng\021Y\"\004\300A\007\214\013b\304\212(\021A\204x\010)\300\252'j\020\213\377\372\221\362\002Sf\273\354\036\2351\327\356\363\356\251IX\001\256a\304\360\024QA\262\313i\253G\004\260E\ny\365rO(\375\346\2169\005\2438\002\225\267\203\"OMb*\272~uG\335\200\336`\t\210\350`\241\202\227%$\370\243\215\340\274%\204\374\021\264\232o\004\024\177\026\337\206\237vf\002\017\037\"\342\013 K\021\307*\243\330C\331\330\252\2226)\276\010\343c\024[\215\r\033C\023G\311M%p\245LE\025\2526L\335\255\372\203.0\2012\277\tQ\361Kj\325*\007\030\232\014C\310\372Es\254j\020\327\357\374\351\271+p\374\220Y\225+J\240\331E\036@\032y\244\\7y;\030\216\303\337]\341\343\277\316b*\356xP\255f\035W\r\323\036\025\024?\n\263\000\224\000\214\216\017a>Y\rO\222O\302\222\307\037\231\203\237\203 k|\215\037\225\010?\002\010\310\265\262]\031?\301<\003\375\352\223Z\244,\236\267\353\216\270\013<(\360\325\215:\004b5\204A\2407 \376J\342\303\023s:\343pM|\026~A\216\317\272\235\003\264d\334Iz\250ZfT\230\342\340\035\337\365o\253\031\024#\331\344\001\305\010\0055F\315d\241Bq\231\303&L\231:& \210#\212\217\237\226\273\345\315\021@?\255\233&f\206p\016[;BM\273\034\340n\277\035\306\024\374\323\001\275!\361\371\217jh\001\301_\325\240\232DO\250\321~kh\342\372s\003\231\307\202\246@\264\325\376\315\3517\023\340\360\243O\273\2459V\367M\035\201v0w\231\302Tk\325j\234\225M\201\313\024\374\203\313\252\025i\3742D\014\301oA\365\312\254c\335-\263\031\304m\016\022\372b\276\030\375\021\247A\266\201\001\026\025\302S\010\200\201\016\033\005\210\001&\21072\005\272\032R\030\360{""\204\0308\234\362D\212n\311^H!\304\311\023rI\3441\334\261G\266\017\020H\256\253\212\n\211\202B\276^0\330\357\377r\177\346\317\274|\340\317:\\\321\301\3718\274\317\243\375\327\317\212\204_\3366u\315Ew\237Yc\207~t\366K~\310\237\005C\224\033&\255\003\324\036t\203\030\013\271\346\345\205\204\202B:9\331\331\221\221\031\341p#\233m\304\3022\212\305D\277\237\215\215\250w\032M\264\262\"\222\311D\257W\250\247'\324{MMHF&d\263\205LLvvJ\034\034\031\231\022\207+m\266\222\205\245\214\305t\272\335N\203\206^/\264\256!\026\026\r\032\312\014\031\312\223\023\262%I\033\222t!\311\031\014\314\350\3422\252\250\200r5\277\306\004\344\337H=$\036\036R\034\223T\225\206\246V\033\331\330\214t\272Q\232\216jjF00\357+\352\365D:\235\310f\023\265\264\210TTD\261\230\252\2068/7l(utJ \260|\337\362\346\246\\Y\201\301J\013\026\310`\220LS\022Ea`LLppF\327\035s\271\261\246f\234\2319O\370\303\275\337\253\375\333\317\306\017n\270+m\227:TW\320\014f\021*\252\251\021a\300\020z\337P\333\206f\263\220\212J\351}\351\272%\006\014\344\206\r\244\216N\232\216(:\256\200z\202?h\363mt_\267\362\313\237\224\003\037\246U*\344\020,\364z\225==\345\272\322\320\224//\245\212J\211\202\242\252$\347d\206\014$\016\267!\030\034{\275q]o7\027\353\247\301\360tW\330 \373U\213\004\311\234\034\362\367#ih\310\027\362\302\205\234\234\321\373\221ei\264\261E&\003\361\344\374\234\335\337\245?\005\375~F?3\367\316\256\331\023\266\353\341\345\001\207{hyhQy\257r]\025\313\252v;\225\006\r\252\225\025UJ\212\n\006S\251,\244\202\301TJ&\225\302\245R\266T\212%\225\n\211\307\250TO\013\264\244\236\243\314\320\214\010\000\000\020\000\303\221\020,*\020\307\204\203\372\250}\244F\324\312H\302B\020\005q\010\205\220\322\010\00120 \000\000\200\004P\000\317\351\272\263:\247\312NEj\324\324\334\316-\261V\036\025\222m\253\240\3137\224W\341\003\230#\027\271\252\377\316\313\214\351\3120\264m3\360\204`\240\314\3001\364q\377\205\240\264\215HB\200\262p\025\262\376+D\007u\203\212\263\rz\220:9\212\343\000N\273\215\212b;\344\261X\nd\032\275\221\343\332\230\254v\243\302\331\377u""s\0137\016A\211\343\341\217Co\346`\022\347\353\310\351\206E\351\004@.\006\354<\022Z'\004\321;0s\233<\343\343\017\334&\004\023\333\265\376\002\333\374\323\204\017\231\005\241\313\303\241\337)\021\270\276n\265<\370?\027<\027N\321\266\246\330=\354\020\342\320\332\022o\336\014M\203$\341\326\234\017\3529\310C\266(\263%Y\240\354\211A\262\322\360B\000)\356T \005\355\366\205u\336\335\253\213\007X\343\373\362\241\002\031\033U\027)3Cj/\215\342\344\004\n\206\3634\362|\316\223\357e5)\257+\3325\337\273\037;\315%\227\331df\320\030h\222F\354pE\213\331\202\275\024\002\257\306\327\tD\224)\310\261ep\341\332R[\233\313l\3248\2202\227,;L\222\226\322IYdUh\255\304\205d\324YY\255\315\000\214XX\020\225V?`\273\322\302g\361\nP\017\022H\341\364\013\032@]\314\207\247q\213E\017\006B)\247EFG\334O\242<`7\212 \356\026&D\227\341%\\\002,`+\357\207Z\343hf\302W\210tJ\213\230]HE\267\242\345w\211\235\373\327\376?\202L\335\254?J\264\270\006E.\374>\3549GX>\t\374H6\024\017\205\313\\\"\035\020V(/\242\205\235\033\272\261\207\206\312\372\346\357|\0211\3246\373\262\212w\242\324\213\277^\020\312>\227\234\355,$R\243f\365\301\tY\266\2437\345q\014\276\376Q\342\216s\317\377`\343\305z\307\326\345%Z\304\330\306\357\221\216\347$\231Z=m<\322\355\267|\331*\027\317\230\0055\252\310h\\\323!\251N \025<\365\3438&\035\374!\352i\317SV-\240\025\367\023\3407\023\221e\223\206\352\032\235\214F\241\252\3507U\200\023H\021?\001\304E\023x\202\354\003M$\250\025}?\233|\332\000j\325jR2\005\377\341\274\320\001\244\023\026|s\210\213`\373\200\240\315\317H20D\027F\371\317\3776\021\\(\017\236yY|$\256\265f\304><\006\340O\341\3169\r\371\222K\253\223\301x\004W\227\325|i(\003\275\230\202\311F\221\000y\375d\347A}\242\310;\244\202q\367\200\033]\241E\027\361\302\365\035\325\310g\354\341/ s\260\270\0370bMiT\025\363U\211\266\216.G\361\222\266\"P\025\332\220\307\226\372\330\273\377\217u\333\373g\354\2668\256h\301>Q\005\313\253\005Z0\354\325/\362\277\227\261-\314!}\322\302\017\236R\377m\261\257d\331\3073\301\237\344\000\033_G\210~\311\276@\367\007\007F~ \n\301\341\326A\306g\276\r\337\204\025\007:\033\367\032\303lj\036\232\264\324\\j\205\025?\030\306\016 \"n\271Q^\316\205\200\226\037y\253\276\363\252\002\304\273H(\252\201A\3162\265\301\314M\003\356\252\312W\252\260\353\324=m\224\360Ty\241a\317\006\003\376J\352\310R@L&]\016\222Y&\311\362#\257K\244\350\314z\335\206\366eW\252\2200\201Fg\201JP\217g\254C\177\333\021\035\025\021\n*\001g)P\000'40p\321A~\332\257\345\004Y\2013\217\274\304+\224S""\345\337-\204\244C>\254\303\357\255A\354+@\311\026\350\006\005\373y-\374x\217;\2604`\323/\2001^\335\240\013\217\007\342\272\030.\005:\024\225\2703\314t\356\224(\002\016=\267:\205\003O\014\230\237\\\240\250\2416re\207I\310\321\211=x\267\020z\321\276e\354\031\364MV.\324\006y\262\031\202x\373\025\364)\213O^\200\202\361&@`\237\243\035\225\276\004\003?\215\023%V\373C\177A\377cv'\t3\375\032\346}Dp\213v\322\324=\320L4\252\262\016s\0051\004b\201\313\226\363\352.A\365\251R\312\177\037_\2300\243\334G\3031%:\274\212^\247\000\251O\010U\343\263\270\332\005?\244\231\312\037\204\367aE\033p\272\"\334\t2\324\034\227\037\366b=V>3\265UK\352\001K\363s_ \347D\232\334\305\256\242\342m\366\212\361Fhy\244(\032\266p\031Z;\3675\251\n\017\003\363\034\320T\002\010\216\005'\317}\240\240\311\010\r+\3449Li\222f\263WA\276\035\361\"\337\242\353\347\002\032\333\022\206m\263\235\252\205\354\337e\272\202\353\267\321\317d\316\364\375\244\366\3157\377\273GU\344\233\214\362\200l5\334K\034\260E\035\007\216fr\301\037\337a\222\303#\217\304X\227TW\303\005\203\326\222z\273\220\360\205!\276Q\371\365&~\335\265\023\277\314\3503vI-\344m\037M\3247\000\274j\216Ty\363\027\242R\014\000\203F\331)BIPb\214y`&x\037\335-Nc<\224b\272:N\375\335\007\nxn\346B\2414\271\216\033\351'\314\326e\241\233\n\354.\2675\343\207\300\320=\354\222\024\367\314V\242yD\234\224\240\362\002h\252F1\000\346\306\305p\320\200\256\267]Hk\250\033\0029#\241\217\247\350H\301\033j\010a\006\222^N\201\212Nx\231=f\202\024_\264\303\340Ahj\\\350\341\271t\233+\256{.\017\3633W\370\373\014f\210\333\243\217\300Z\211\315\355*OC\016\324:n\222\304N\326\3338b&&\201\t!\305\\52+\274.\2620s\324\304\032\3609\261\354\022\326\300\004z\317\242\202\030\340E\334t\306\0373\274\210d\317\303\340\2411\312\321\371nz\267a\214\233PG\263\027\244\214\3656\324\027\243\363\035\nw\325\003\217\223T\034\205\030e\276\307\222\017g\271\316Y\003\356\034\006=\216\340!kBA];\373\310\303h\030\245\264\302A^x\366+ \376\355\\\022Bp\256F\017\354J\211\216jD<\t\330\334\367\322\333\337\237\202\255\245}q""\354w\034,-U\365\005f\270\214\202%\333\206[e\036\014\001D\235\365\303/\022%\272q+\256\221\006\212\350X=\253s_Dd\226\323\034Q7mOF\201\331\302!\242\220\302\340\026\223\207R\031,l\261\tk\021Z\2429\374^\254\017y\357\360\245\211At\304XDY\020V\333\221\246\344J\236\322\314f\000\211\001\301\177\t^\223k4\023\356%\257\314\272P\216\304E[\336\311\334\273\324s\276\357~=s\310M\317\035\233-\321\376\340\021\216Ld\204\325AW\353\347\246\007ly\347o\307J\246\346^\232\265\t\275e\006<=~\234\323\324\351m5\000z\022\021AB&41matc\376\221\211\253\031\231\351\203\201t\034\324\237\004\274\274\\\273mY\031D\272\366\005\356\225\316\263jyx\326\367Jc\025\204w\217@\311\n\206\270\334:>\205\350\224\272\371\364 \343\373X\220\304l\017\215\253\006\234,O\376R\211\n\365\031\262\232\001f\005\332\241\201\260\002,\301q\037\034\223\013\016\002\005(\3528{\360\017\025X\266\262\n\212{\221\250\322}\260\361\0201\036d\230a=oD\277z6ZP\346r\351\232 \301T\032\341\206\367\202\272\237\366JD9%\253:\202\372\300\201\"fZF\001\236\337\004\361ks(d>0\233\213NXF\037\206\252\236A\377X\020Or\271\244\211\372<\003\242\346_KO2\223VS\320v\005(~&`V!\264N\310\303\032,F\221\255\274\007\232\354h\217\341\375\023\317\2618\255Y\354$\023E3\261\005,\227\022\n*\250b\277F\2031\":\271E\204\2527\322\244?F\345`,'\324\345\320\214\240o\356Cn_\212\206\346P\232\314\325}\235\243\034T\353\036\275\222;\t2\3547o\374$9\224\263\266\211:\375\0051\007\374\320vUiR\256\2071cL\372\234&\302\325b3*\320kn\333\201\241Wj\246\216\004\325c\340\324\036\023LD.\332\335`\233b\251\327\332 \235\210\r\024w\345\374\261+\237\325\337>\216\020\250\237\013~\314D\301J(\025\354\212\005\331\372\374\353\323\300\332\374\350\264(\024\326\336*\342\016\272\227\264\036FF\214T'\314\214\2463Eq\3050\r\331F\343\203\210\002\t\203\002\261\342\321\301\363\234\257V\211/E\240\221\3306\321\360\\W\256\000F\234\017\211\370\275\t\023#\271^\022\325\301@\232:\264\213/\r\035\214\306\272J n\336\212I\303{i\230\250\276)Z\345\300\210e\212 Nn<|\311\322\217\022R\257\373\204cS\340+\025r\027\360\215\344\300\222\224\026\277\226w\242\237\313\001\270U\325E@U\200\200.:s\0011'\005\347W\223\374\315\234m'\2460r\250$A\177\326\326!|\214\321oqu\246\2401\276\017\354wF\214\r\203X\"E\374\275q5|\003\372#\340\026o\215C\t\356\255F\010\265\366\024q\241\312\r`\247\266\315\331\221~\000l\360\310\334\323\316\356\036\234<\251A\002\r\037&\007j\242\244\320\027\3777?\312c\302\215\373\264:\301\025\341\tk\242\364\202\307m\213\273\252Vf\313\264S\205m\023\033\374\300\277\314\300|\017\334\314\225\373\236\\\266\232)\037\250\035\203\362\275i_\253\353\373\3050\267\016\234\213\202\246\310\267\002\312\354\336\315lZ\346\004\251\306\214\021Y3~\334\020\314^_\201\330X\205W\t\354\253\227\324\273\342\301b\216\356\317D\335\325\245\333\371\317\311'(\227jfO@sN$n\213\233\3463\354\322@j.\304%\275\023\327]A\237\330!\021\270\257J\362\345\225\017@\222\304u\177\360\265X\026\tr\321\212\362\362\216\000S\263\324\261\222\252\003\367\252\235~\313:1\254\215ThS\227@<\367\330\312M\233(~\233\313\326Mhpv\334\214*\325g4\332i\271\032\272^\373\330\311\326F\252M\371\302\355\255\317\250r\246,>\242\036\241\361\006\351\327.\370X\335\234\217l\266\370\005\223\017\031\325{\212k\366\361\317uD\203\256\204\210\235\314\371\037?!\215\260\n\260\303}\240\256Ea.TI\336\303L\024\304\255\244\023A\034\201\212[\n\232B\016CN;\304\323\006QOE\305\255O\200\373\221\177\222\341\337\014V\200\333P\206\375\242\332\210B\354\231\325\374Io\263\010.\201B\342\256p\025\223I\372N(\340l\244v\027\\\265\tE\226\227\300\266\322A\312nT\353\022f!mv'\213\366\341\006fF\307\305\364\207\302\300\367M\022\254\260d\301cl\220\304H\357_\222\035[\331\033\256""\302\021Ht5\355yv\025\030\314\264\225\316\013k\275\013 \202U\230p!x\214\376\327\323Dh%fO\373!\006\376\362\376\367K\234-U \350\324B\3167v\021N\242h\303\320y/G\354\234\372RY\356\003c0\306\370\326\236\257ye\377j\021\257\342\374\354\302ea\017\t\327'_\305\226\250\323;'TC+\317y\017\206\262\351\344u\243+\217\306\306\017\221-\310\211\234b\345\006\342 Z\202rr\366\373\007\327\233\023\275MbR\230+\346k\021\215\231\213o\347\025\254\320C\265\220\310<+\360\232\265QS*\203\241>XD\327>u\264\352-u@\366\332\003Q?#\032a\341\216\021\r\211\247]\366z\n\2273;k\r\206\020\021u\220RN&\017X\216\340\t,m?\341\262\342l\311\354\213\267\201b|n3\004'J~'\306q#+p\237\251{\267\006\220\262\267fD\202\332\261\007S\036K'o\000\375\231j\211\\\366\327\3529*\3560\253\033\004\226\236a#\230s\300g\345\255\332\233\2707g\360+\356\212.\275R\020S\200M\315\272\254(=\014\013\274\311^\365\312\355\242\270@d\3464\206\247?)\243\234\177\373\337(\321\2441\224&\335\022k\323v\364\006(\332\005\035\001\307\032r\200\274zXk\\XGq\377a\\h*\305\355\215\024\257\017\031D\005\221\355\030\343\374\200\003\336Zk\324F\367\246A\357\316^\331\361\010&R\334K\276\357\253\275\302n\337+G\327\225\211\237*\t\213^\270R\335\255\237\337\377\375g\263\"\323\025\206\026\337@l\017v3\036W\\[\310\262[H\tqYa\250\347\224r''\300ma\252@\212\2131\23542\363R\260c\203~\326\212b\253J\236D\376\200\006s\204\342\303\334\334l\206\371\276X\016\226}{\033\360u\005#\t\256\\\350\0257@\000\341\243\233\230\306\357\211\023\262L<\361v\202\273\013Z\325\360\212<\361z\231a\214a\243\371""\235\255\360<+\r?$\225\020\030\006\020\245;@0\020V\3229\277\225\344\030B\310\335\325iD\001\312E\241\220\204\364!\033d\277\242\r\350\206\030n\303\032o0\364\335@\017\341\032\017zZ\364N\334?`\313\336\241V\304\222\226\016\234\215v\2353z\377\304\310\326\330\322\321\244:\005\241\021\246\207\013\374O\347%\022&&\211\260\016e;\321\007\305}\344a!\210U\271\315\346\312\314\3559L\031\030\264\233%'\327\211OhE\0102\315&/\310\261\310\022\345p\320\354\256+\202\3217<\n\r?\331\210\271\204-\227\013:\316\200dr\345[\030\267;+\202\334\20442tb.\340\225dr\343Z\231L\320j\361u\326\027\372\n\246\342\225\302\204\202\251\260\"y\217\275b\2529~\034K\017*\263\344\377\221\201\257h\303\013\227\264]\225*\236\375b\346X\225Xff\231Zs\252\356X\251\312x\352\"U\271_\2352\370\336\245u\223(\035Y\342!\360\203\207\003\2667\t}\314J\036g\266q\355\035\021\034j@\316\002\304.j\243\203t|\022aM\244\325Z\221\231\313\233-a\3776\250:\344\004O\215\367\251\013f;\333Zd\237AL\016\230\245$p\250\001\352W\327\354\217\002\r\030f\t\204gq\t\220\350V\205\350\254\365\000n\275A\315Y\370y+\274&P\\d\200\025W9\315\353\235E&pN(\302\203\025\200\342!\034gd\252M\262\364\203\240\234v\341bn\261\320x\336q\202\221\262\223\342\325\213\027Wl\177\267\371\214\202Y\000\346\250R\341\360\013w\177\251\017\251>c\301U\2458\260\217<=XDf\241x\316_\207\300\245\341\304\244^\031\345\200\323\235P\310\345\312\030\247\306\210\346\032\276\202\\A\251\177f\251\300\365\257\364\252d\023@\330#\3523\251\0370Z?\014\264\216\251\2050X$\370\354\260e\201\346-\301p\303Mw\234\221\200a\242<\020\331\212\213p\336\362\344\316LG2,\373\351\275\331KZx\206\n\035,?\344I\023\373\025\351K\326l\247\371\323\311x*w\\^\325\246\314\214\3645#\255F\246\231\346\033\0270\034\034\254\211\304/\032\324\200\340q\342\262\355a\201\342\273-\246\353K+Pc\235\037L\317<\037f\r\372B\025\001\242H\245\343H\233\371'\347k\rS\035\037\035_\376\240\206\3068\010\310\257\003o*\301\276\256p:\253\356\360v\264\216ic\030\310\252+\201\030e\317\321\324\005\022\330^0\014\265l\365\t\247{\351\373\330\001\037\313\277\224\326""\221\032s\243\336\337\036\237`\354\007\346\340\232y\317)\032\330\010\334\216\245+\363d\360<\307\206\221,\240\350*%\347\346\322]\251}y\226Uf\272F\002`\005R2v\325;\017\205\362\255\204\302~\347\374.\320\204\231c8(\234\374\364\010\303Z}\244\351,p\360\014fwH\207\010_\334\355\274\225x$\004u:\354\311\270;\234/B\305\337[\363\204\251\267\232\\\357\226\320d\320\305?]\333\241B\307\250\363\315N\017\033\256HEp R\367\252N\233g\2529Ok.\313\351\377\365^a\315\36257\303\305\343\375"; + PyObject *data = __Pyx_DecompressString(cstring, 9196, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (9049 bytes) */ +const char* const cstring = "BZh91AY&SY<\260?\216\000\t\366\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`%\377y\367\313\301\304}\266\276\355\325\332f\263\346\001\r\262\007\271\234\207\264\355\207\241\357z\345NN\000\027\241=\333\206\332\216\347\034\366q8P(/m\020v\321AU\263\024\307\256s&\250\000\034\347\037^\332\276\313\335r\216\000;o\257\000\000\007\320\224H!L\214b0&\214\230\005=1\241\251\250\302m0\232\230\2152\215=FL\204\3755OA\247\240ML\311\0324\307\242\233MA(\220\223c\010\002h\321\006\252{$\324\374LS\365S\324=OS\365L\364\236T\364\215<\210\017(\321\351\r\r6\220\0324\r4\003z\210\003L\201\010\204\322j\024\361\245?Se\r\023\324`a4L\321\032zM\223\323SS\365Oje045=A\200\322m\023\020\032<\232\233PI\251\020\232L$\36524\325\036C\004\2156\247\232)\344\207\250z\206\217Hh='\251\262\200\006\324\000\001\240\006\200\000\r\002$I\246\215\0322\000h\006F\206\203\021\241\247\251\217AM\246\220\320\0001\202O$4\332\215\242fI\210\362\200H\220B4\t\240O#A\220\004\321\246\246\251\370\t=I\2311M6\246\233\324@h4h\006\200\000\000\000\037\374\204%\330\304\002\013oe\036\\\230\235\007\267\236\264t\223\206\265t\312\212\254\014\037u{\035\312\205\"\334s\252-K@\246\311$\206\306Hx=z B\314\t>\262I\026\010\300Y\024\210\200\244\204=\272\372\364\364\217Z\2130r%m\233\026S\365\373\260g`\325\352\342\004\240\203\203\210Y`\312\316a\"Z\347\367\206q\023\207\002\255\355L\214\n\230{\244\035\034\021d\302!D\006\207\0020\261\022\030R\217\341\357\002\307\336\003~\236C\241\375_\256\345\376\330\373\337w\326\365\376\376\177t\211\256\273\211\226SX/\203\277\006\213qz-Z\350\256\365\217u\274\3072\253\255}V\253\335o:\273k\374\352\246\257\276\305\213\037\325\225\263r\314""\314\275[9\034\247\225\226V\251WF\304\n\333f\336$\304\027\322\372d\300d\234\365o\346\252Xz\253\317=i\347\214\252/<<<e;\327\232\2456n\236\266\t\323\207f\340<\030\345D\223\016L\2319\363\346\267\0143\030Va~\030a\201\216:4\030\236]\202\036$P\371|\035\035\032tQ\263g\311\307f\317OOfV\364\227\370\357,\203\342-\242 \233;)\263\276p\233\316\300\002\\\251r\345J\223\026L\2319\372\022d\311\227+I\244\325\253W\250\021\351\020z\206\200lb`\206\322\033\006\306\332\210\202\n\260F\020D\202\007J\211(\252UX\n#\001Q\030\211%\374\254R\273q\267\264\036!<5\334\265k\263r\316\205\221\n\210\201b\300\235\270\310\321\023{\037b\223\013\357\276\373K\313\312\357\276\3743a\206\031\361\025\023\230Q\027H\306\014\256\376\302\365\352\354g\325\320\307\301\026\036\374Zgv\202\017\202\014T\305T\342\253\260@GJ\320Q#\307\317\215\0325\367_}\366\337}\346b\216$D\3704\202jQU\004UU@ESJ\n\021}\246\022M\253/\365\355\3726\376\357g\331\372-\317\237?y\2508\200c[\026\303f\317\205\022(g\317\2374H\220\342D\"D\211\026DdU\020UAc \214R\237\037wn\335\2724\032\261\213_^}\202x\207J\032m!\266\327 \324\r\236\317\220[\002`X\205\233636l\331\263f\332\332\317\326\033\240#t\03016\233i\244\376?/\343\373y\376}\237\rG\016\2414i\020b1\003\214T\211Q\023\2653Z\326\265\256y\272\264 \253_N\236\236\346\233\213\217\300\212\033\312\n\254\021B""\356C\r\376nn\017&T\227TB%4\323M5m\332 Z\202\250\n\250L\355\362X\273\203r\337_\255\244\252\004\302>\220\035\206\244*#M\261\232zi\245\244o\351@\010\004\025\020\366K\256\272\333m\266\333\263t.\010\"z\272\275\235ea\235\214\010\221\005B\315\030_\031#\002\306\"\031\245/?\340W\337\034fD\203 q\227a\311\225\234\t\322A\370U\266\210=||\235F\273\207\220\277\227\365\262\344&8E\327-\360\302+\327Y\314OM\327\\\\\014\266\037\t\362\262\364\250\212t\214;\273\324\370&\204\247F\035\350\222\333\305\007\036\223\341\324\335&&T\013\273\021nj|\001\324\303\251\201 \221\260\365\370\206\035aRY`L\231\244\207\343n\330(\344K\366\320\320\227-\323\211\013nG\024I\014\313W\341(\245JP\271\004\253=E$\323\322\224\242\005 \364\245)\214\217\362 \364}[\2406\310\254t\310\016\241\241\355\026\007+\301\212\374\227\327\006\317#\357%@\313\036\320$\024\n\n\215Z\r\271\334\225\276\364=\264+\002\204B\275P\004\245\032\301\224,,J\226\020\220\363\016\034\200\332\247/r=\271\254o\270#F\240T\222\246U\310N\227\262QbJR\224\273F\251\217\3149\036\250\204\361\223\317<\311\246H\217\317\256Q)qNT2\334+\234\210D\223\214y0\023m\003\325M\326n\317\226)\347\234\270\2467\016G^\370\000\327\0210x\305\026'\307! \353e\226O\3225\250U \361\036\373\330\260f\373\333\264~\254\207\261\324\361<}B\2577\256\215{\237V\033\377\273\346f\227\202=\217/\346\354x<\225\365<\314\377\247\326\327'\247\216Gz\350|n\260\035\265\375O ~#\376\3778V\241\033\300\232\377\256\230\020\303Jy\307\355\346)\352\372\026\361Q\003q\253\376\375u\204\355\215\177\216\200\367dV\376\001\275\337?\361\321\257\277\266\262\016\353\004mez\312!r\341\207\nB\351\\\241<\2627DTeuw\300\234\230\030\035U\201\031\226A1\203~\204\360\217\345\251\013M0[;\206\326/\353\326\271\301\236f{\272\310=]\347gM\275=\007&\305\364\227\317OC\271\034i\312d\367y\3664\244z\330\204J\225\276w\003\321\001\342\270:X\3616P\223\347y\2504\003\361A\256\2216\023Y\n\021ma6P\200\301\300R\314\\\334mL\204\211\262\037@h\000\0376\341\231\027\252\020'AS1\030\250\231\024,\260\222\227\367\231\317|]\002\372-\036W\374\233\357\270\276l""\314:\264\223\245\215iu\316\014\014\036c\\\010-b\331\004\202\020|\305\361\244tH\204\014\351\333\376\254*\t\263\223\352|\"\2462\020\202\013\351A\t\323'\241\206\273\332\347}\026bG\t98x\356\345\345\354W\032q)f\344:]\0178\264\367\312\367\267\270{p\241\n7\214\270\277\277\275\276\264\231\007\243\273\037\013\207\270\354\225\302\346J\341\372\337mh\344\032\336\016$\316\255\235l\rv\366t\304\326e\263\300\317\203E\214\264u\321N\3207\265\352\327\377{\265&\030%\200\226a\364\365_`j\342\212\377+\203v\253\002\266QF\024z\224\323\204\2345\323\237l\372\374\235oF\347)\3728\177~\201\345c\217\024\364li\357\341b\311\306\245$\241)\"\300h\224_\367\311`~\372\305U\214>j\224D\201\226\300\003\261\311T\216\034U\tD\024\222\272\263S\034JjC\010\016\021o\034\272W\370ox\200\320r\363\363\036\037hq\234\201Q\027\302D\233T\367\350\354@\247^\276?\240y\364\034\262\371\334\202\311\037+b\022\356\357Y1\307b\0322Aq#B&2\341\020\310\021\240\221\205\234\364n>\005.\rC\211\333\033X\010\216\017\363\334r\004\014\034\026r\300\224\245,`;\227\014\210\021\024hL\320\200\260\215LIyDXH\365\3071\236\377\303\370\334oZ\237\346\367\006\207&\342\007\021\337w\254\357\315\266\205\235\037\333\342\270@rR\266n\353\206\367\262\356r\177?+\336\337\241\333\333\333\266\227\331|\3757\032\034x\240k$\365i\341""\271\225c\306\302\031\022syF\2479S\213!,,J\300%\".\354\255\016\350\222\345\207i\244&#eiS\026b\314\230\315u\344\363W\232\274\354\224\313\255\376\2564\336\245O\304\217C\245\367 \255\\#\210I\267\337\211ec\254e\214\275\347\241\316\354\241\231>\265\241\007\225\020\001Tn\030$\371\344_\237n\022w3\223<\242\315\005\242\270\327YV\205\330\321k\327\323\020\212\210E\327&\365\375\375C4]]\264\313\021%\333\321:a\227\277\243\357\312IH\262\224\352\013Ed\332\334\242k/\262\323\3273\350\325b\336\235UT\302\226\rUUB\232\246\252\275~o\322\360n\341W\354\366'T\235\003D\353Xt\200-u\224\252\262\227\310\2744\"\244=C\314\356T\326e.R\331\\\265\247\261\247\353\322\037H\3641uH\361>\0352 \260\327\256\260\326b\361\344N\303\361O*\344\236f\033%\003;\267\017\2511tp\0332\341\231\220\341\310h5 \266\327j\303\003y\215\273\237\237\264\"h\033S\342\031\342\252\314Y\213\202\261kB\016\333W_j\244=\365\302\272\037q\301&B\206\342\252\236u\033\256\222\311z\t!\024\326\026J\321[j\262\247e\277\353\366G\024\252\274\333\3439\371\"\321\023\r\022p/>X\345\235\306G\355*\311\356\314\303\321\3652A\022G\244\252\326I\214\334\217\332\217\020\372\231\365\r\241o>\337\270\271\207\264\375\236\217\017G\213\277x\347\362\352\241\263\2169\336\273\0359\275\235\016B\204\260\n(\201NI4\224i\232S\177A$\351-\025\321]\225\260\3712\034h`\203$\021\2438\323r+\313\202\226\343\307\216Q\221\014\276-%\242\261\2264\364z\374^-X\325#\364\270\\\223A\302\007\343n\013\032\215\001\322p\232R4\3514\256\203\242\211*O\207\311\337z\351M\276&yb8\237\241\367\277\305\326\225\372F\376j\031\261\004!\227\033H\2272\310b\226E\026\0338\025\374\356\nI<\330yM%\r\232\263\237\202\374\254\312?']\275\034\367\313\277\256!\241t\345\255+O\017\232\335\244p$qp\365q\006\322<7\002\016\241\3653\214}O\302\376e\206w3H\366\276~\214X\261W\013\235{\236=\242\334\251h\303!H\265rfN\006j\312@\337\031\344\366\346I\321L\005\255J\305\3153\t\005""\221x\024\320.E\317\275\320s\025\211\336\303\n\370\177\245\275@\353U\026\261\202\326\313T\333\037.\346S\037>\037\"\013\013\307~\010\324\371+\032\375\347\375L\320\307\331\0041\277\317\372~{<\224+\341\001\320>\371\300B\301)Q\221\376\221\205\224\234\016\342\256H-\360\001\263\335\362\037\022$\214!\004\007`\022b\373\037l\2100#\207\225u\363\274\275}\035p\326\334\361\254^/\212n&7\022\274\356+\307\350\342\340\354\021\014v\320a\304\367&\250\300a\270X1\215;\016~\177\222\370\034\260\0131'0\341\200\265\014\000\314\027d\034\004\340\224P}\244\360\336\3271\247\"\367~\004\235\241gfA\203>\033\203\222 \246\342\321\024H,h\002\223\360\364\023P\022\212\003\014\213\216x\016\302\235\360\002\nk\340'\224\222\264\244\267\036l\361/\206\311\352\2140#pn\272`\350\3629\233\013|r\340$l1)\300\007/\263\363rn7\216x\271\336\205\3476\022I-\304\216x\222\r\n\\w\0026\022\314\331\0045\204\211\321,_P\035\005 \000\2413\017<\201\307nS\220\210\313\277RH\365@\233\326\303L\032D\204\247\237\001\255g&\324\"\0329\277\000\220\336\200P\010[\236\032\267\252\034\003\204\016zr\3643\\=\321\034w\224A\030\344x\275\004\030\031\007\242\203\220\372X\340\340g\240\271\347\002u\231\004\0228\215\007\342\034@\316\262cM\206\204d\365A\333\343y\237\017\257\331\361\237C\361\276\226v\017\355\2723\270\365\240\325\265\276pF\354\226\334\335W\366\321TF\204\202\316+\376\250\220B\324yG<\362[z\300\314:\312&\313W\365\347\312fF\371\3745J\207R\222%Y\343V\244BVIR\244#\315\036r\306&\200uF4\201\210\030\355\370 i\020\231\201\0043\0205\002\345\335\312@\274\202O\347\335\313\354\256+\203\265\340?\t\210\321R\217$\310\225\230\247}/\250\276\357U\014\211\003@\332\334\2600c\237^TQ\337V\343\027\226%8\206\336\220\r\300\032U\233E\031\240f\236Xi\345\3344b\037\r\213\026\020A\016\r\340\334\316\004\316\305B\\\261`\263*,\240\227\364!\260\205\260f\267O\375\312\325\235\\\233\2206\325&vj\0108\302jE\206\351s\263\216\315\224\276\251\213q\214[\200\3401\021\034\021\301\035\300\255\000\323\334\302\250\315;\344\241\220Ab\202\0050&\205\021,\021\221$N5\n\303\024\312\356-\tF4""\"Z\367\353\366\331\311\023\266>\377\250s\2171x_\265-\365&\007;\021\354i\026\023^\262@\035\203^\177\r/\001\353NjI\201\333\312\253C\227\r\302\312\327\033FF\211\243\200\321\303\302i\341\343\377\303J\3243P\376\2776\376\255\315\357t\363\370\223TF\334MKB\354|W.\267\010RB\302\200\302\213\022\021\324\230j5\002UH'z\211\010l.\212\273U\360\204\304D\005{\207e\227j\260\340v0Gh\375\256\236\254\305\3650\344S\002D\2749\265\273\224\005?Ql\242\353\232\210\202\242\2445\263\201\337@Y.P\356\3173=tx\351!aI\037GQ\254F\261r\006\277\260j8\307\306\375\314\367\217\337\214\016\243\214\243\215\016+5(V\003\004,\234\346\335\n\230\214\226b\230%x\252\221\341)\333\261\224Sv.L\032I=\024\033\274\260\201\264\333p\342\216%\021\001\r\270\220\250\266i0X[y\2060\226\005\311$T\346\272\243H\230!j\006\225\3650b\243\013\325J\325\240uBv\332\264\3514\206\224\022$y\023Z\250H%\212Y\027Etc\275r\224j\3335\032\233\007J\024\005\202\350Zjd\326\322\t\225\002\rG\035\253\000\022\030n\331\022\201\306\200\010\221\302\254?c\202\000S\361\006p8\3716\366\350;\007!\211\332\231\306\226S\207\340280\003\214\003\307\203\354\016d\r\235UU\025U\026\350\322K\016\005\0330(\270\026CM\256\305\226\211U(\246\246\275\233Lp1A\210k\251BL\204\336\014a\r\231\031\337\010QP5M\265;\353\001\233\341\225\347\243\020\275\032:\263j\310I\262\314p\271^oI\236\\\344\226&9A\215\222\252\266\273\231\033*\260\271\334RQD,\026Y\364\320\315\201X\r\\\3543\324\n\014\2778\212\2250\354\232\003\244\313\300\025r\360\001Z\345Q*n}\024\023\204\020CER\311x\263m\003\030\320\312\371qdA\0063@\325T\005\322\356\316a85\032/\313\206g\016E\366l\323jw\370N\211[q\276\375\271\3157\275]\271r\204`\251VB\304\227n\010\004A\016\363d\273G8\002\342^\337\235)\224K\202\020\313\006/Y\250\254\346\236\212\261\014,\013/\232CD\201L'qs\326\231\261\257\010\ru\201\310\352\2645\234\3033\":\017\020h\326\2318\264\233\220\nC\356\013\221\007\226\234\014\254\330\277\264*p\341\264\326i\342\336\334_\007]p\\\r\331c\314.\304V\020\021\221\225\236\202M\325\236\236`kd\307A\250\006@Fc\311\267\204\2020lEc\t\010=\250`""\246\324\341\202\3701[n$\362\343R\226\336:\260\333\226\205\341m\t\271\310%j\005\357h\224\240N\355\365\3048\354\354\365}n>\237\007\332\372\337\245\373w\003\3632\362J7I/\211hP\227d\315\022\340\224J\034l\224Rt\271Q\252\260\216\335*\\*`VcOd\370\260\354\311\000ZzN\017i/\206\351\240~\247\3662\033\314vJ\001\"\016\243\206\336ha\301\253\002\371\026\013W\002\350w_\230\340\267\302\326\251p\\\206\\\030=\305\010\326h\001o*\223\265\005\311\024a+\231YB\320ook\017Q\3426z\273\2176\216\006s\014\364\017\362+\245\241\260m1\246\206\007j\033oI\241\223\211\233\2019\275\272\025\n0\250\013d(\025\204JH\341\222:\345\t\"B&@\n\2018\240\317\305d\033\3647\215\345\315\227;\316\375om\366>\177>\3365\316\363\2571%D\211\361\257\262\262\020$\255\252G\243\342\301\014`\246\240\017\030T\371\254SV\002\031\0309\373|\322\016\335!\200\t\010\033\324\231#\030\214\323&\276y-\246\313\323\207\305mbw\310\035\031#\"H\241\222\226U\324\267fm\343h%\334\254Q,\263\224oW{\035\353.4\264\344J\356l229D\262\220\371\362\324##\265\267l\310\025\220\024\226'\221\346vs\304w;\331\357\333|v\321AM\211\351P_\233Qi\036\312=*K@)bB\010,!X\321z\250\026\031IUA\221\301Dm&\356a\261:,;&Z\211\016`i\013\265""\2663\r2PB\304`\311\032\220\214a\341\241\035\030\355\000\031\014\354^\374\232c\323c\221\222\301\204\220\025&[tT\232\002h\230\n\327z\274V\2613\014\304UY\204b\203-\271\211b\245\301\260\213\224\271v\230\005\322\315\205\202\334B\341\001\260I\201\324\311b(Q$\027\t&\304\311\026go\230\360\322\264\236\035\036\033\334-t\247\316\374\037\233\260\320\376\263\034g >\242I\003\333\323\327`kE\207\332\227\003\342\255Q\355\265$\217_\240\003\273\364\033M\020\224\373\2551\363\206\031\010\363\323\005\341j\013\321 t\367\210x\022\372\304K0\335t\315\204\250AP%<\263U\004\361\373^I\240\265f\030\3016\003@\337\2476s<\336O\014\004\273\031V\304\301\2464\275\261\026\017\270$)\027 \232\335\362\256\004\2113m\350\362\356\006e\233\016\320\304d\262fcr7\030\304\3301-\321$\233\353\353:\272\365\367\277F\243\027\225A\304\317\264\371iA\271H\362\244\032\245\234yv\244\253\020\325\261K|A\365wC\342\035\013\251\262\333\321\204\261\245[g\202V\342\257\010\211U\327~\210p^\223i5\2005\210K9@\30391\201\260\321\250t\357g\200\341\263\025\233#Hs\321eeKa\024\234(\276r\013\255\204X\307\004%.#&yd\224\006py\355\216\224Y\"\252\252\320\220\241\324g\302\222y\201P\355\276\335\342\336!\257G\207\0138\270\277$\200\204q\205\002\201\362\371\351AR\234\363R\234\324V\302-(\014\244_\023\001\204<\310^L\007\212\013\022\242\010\200\243\270\341\204P\212\256\007pw\336\253\312{\273\270\324g\344\251S\234\222@\246\013\001Q\001V@\363R\nRH\300EA\220\264;\340\303\256^\343\345\210\t\203\224\276Tw\311vN\023\240\244\2207\035@\373\220r\225\350\326\272:\224$g>\260y\212\316)\026\004 \317\"\346\256::{-;^l(-\n\265\205R\005c]\233\262\231\355[\211d\223a\000\024\020\016Y\230\2472#nTE0\025\226\222\"\304\327\236!\222I\005\207\024u\344d\0260F\r\033\262\002\324\r\002\272\254Q\000\323\010\214\033{k\344\211\252\272\205D\311\017\237Y\323\326\264\033\006l\037\271\373\237\310\376=\376<\214X\316X\036nfJ\234:|Y\307\206\220\304\2325>\370\226y\303\355\331F\035=\0024\035\203\2129j\005\305n\231\303g\257\020\327ow\0040\006vE8}\307g\265\310U\2032\0061XQ\013\000\265\2214\004""\330\267\022\301\026Aa\217h#\233\343\272\305\351\366\300\230\225#\215\322m\253%h\301\306\226\023U&\364`E\333\034E\270\332\234\202^\244J\0202\001\353\021\270\317 \2308/\241cf\207\\\300\005\272M&\\\246\330WZh\267\232\235\254\2069T\345a|\265U[\227}\230H(A@0\022\206[\246Z\255#\264\252\332X\267\270I7jj\2615\211Q\220\265\026\214\232o\256[O\031afIN~\3644\213\327\212r\370[\010I\375\177E\3221\224G\313t\350\331\227#\263\202\335\271y\316\361\035G\202\352\352F\2163\344\037|\266.\005\233\034\333\230$\017I\026\260\214r\2141\260T\031\256\316;\334\025\356R#\235!\026\226&\" \236\2058\304\343\236bS\323\275\231\233;\336#\226+\325g,td2\267zE\205\020\343Z\230\367c\003,\343\020\234v\232\372q\036\035\034 7\232b\266\375\257\343\013[\273\254\257\355#\225EW\035m\330\030p\033\\\346,M5\205\216\273+\227\304B\373\271o\260\023l\302nn\317\331S\261\237|\234}\372\354M|M\002\372\256w\365\274\017\253\215\370.\366\313b\371\" \332\201{\344\267fIi\276F\205\373De\273\177o\240\365?qn\265\003\345~\337\361\367\262\202^.\262\355\303\323\220\025|\213\317\340o\333o\343aq\005\343\263\307\375\034wX\343l\261c1~\021\270\234\266\343h\367\327\370}\213\304\337\023\350J\200\266l\036\227\273J\337\027}\215\3616\374\023\253\336\346\361\204\212\374U\233\016\277'v+\032;LFp\250\214\3147\312Um\355\037\032\267x\362c\273\214\245\350\235\265\264\036[$\231|q|\365\364\251^\363\216\252\t\341U\025R\312!P\r\344O\313 \242\007I\016\230y\022O\331\343\262\212HPm\356\254Y\0163\264\332\235g\246k\021\374\020\366\n7\327tL\355\210P1\273\321\300\276>\032*\210N\342\246\031\372\213\322&\213\220\340q\217;\227t\206D\304\365\327\371\\\027\233\2327#_G\3147|\374\271\325W\327,E$\"\246n\206\201\022\026i\331\351\3655\003\313\265\357x\350\240\375\333\223\375}'n\237\275\306\276\347\231-O\320?\301\203\367\037\243d\276[|Z\177,\202m\244\\\234\235x\371\204\315\344_O\315\237\344\023\362?\037\034C\322g!\364\237y\302{8Ck\304\037\206\245L~\304\374\315\312u\362}u\016\343\354\347\325\035?""\353\351\210\217C\033e\262Bo\r\230F\313\036U\304\275E@Q`It*\237\275\345\304\325VI\313\2736H\036\3144A\231X\037\262xy\035\3429\336+\362\206\312\333\212\244\030\357p\356\3568\324\2506\035\324X{\365 M\255\000\341\2601\234\212`a\335\262\005\247\271{\312\310\316|\344\326.$:\312\266\314Bp\234\203*.l\016\365};\234f\303\372\257\255E\331s>\245w\373#y\326 .B\236\263u6\344L\326\324\262\200\305\222\201\331\245\025\004U\301\364k,\302M5\006\017@\274\\b\003\004.\242\344=\320\220\373;\310\211Z\360r\341\256\3546\213\010\3078\244\033iq\300\346Pj\027\207&q/8\312p\242\t\270r\252D]<\215\223\203i\"Fm\340\336\037\017\352\201K\t\234;\007\004l!\007>\027\232\243\204\215\263\263\354\356]\033B\340m\nf\261+\016\026\203\264\276w\214\316\tm\030\032\022\372.\336\"\352\332n\037\315p\261\244\303\3647x\033\343\333\364\3601.\373VE\200{}\030v\261\340\2401\303*i\324w\251\247\245\016\022\207\200o\030\263\014\337\340X\rg\017\337-\016:f\232\335\326\365\220\217\021\n\217\014\013\302\004\274\203)\304\201Q@\206\006a\236\004,\013\2744/\350\333\302\036/?\024vZ\273K\261\002\"\345\304\304\304=C\2766\206\251\214v\034b\232\2623Q\035H+\252\255\252c__R'\023\255\361\330\261\275\336\320\320\"\267\3368l,o\214ky\303\347h\027\032\230j\315\n\333;\330\261c;\304\014&\031\nFu41wX\324\357\276F\213hN\206\\=\354#WMB\354m\"s\247{\255\016\021\221I\250_\225\002\006\220U\221\227\030\021\023\n\261\002\362\250X\323\276c7\361\305P\251\324\007\340\204\342\2619\032\274]\214\343\2056\251[N\2639\366\300\305\276\002\227\314\010\031\316\332\330]\215da\363*_N\316\037Z\210\300\310\307)\002q\343\270\016\365\221\230\215N\332\366\233-U^\240\206\300\221\365\244\022U0\230tpO\212[\3477\017\007\016\016\t\3520j\301<\t[)\010\221{\243'\200\206\tI\205\035\250V|Y\366_\220\353\377#\377\370\273\222)\302\204\201\345\201\374p"; + PyObject *data = __Pyx_DecompressString(cstring, 9049, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (9387 bytes) */ +const char* const cstring = "x\332\315z\313_\023I\327\277\344\236\000A\020\025\357AA\324Q\034\034g\364\321\231y\214\334D\356\020PTl\233\244\t\301\334\350N\200x_f\231e/\263\3142\313,Y\262\354e\226\374\t\363'\274\347[\325\235t'A\235\367\367.~~0\337\256KWW\235s\352\234S\347\324p0\031\310&cI%-\2053\342F\\\n\274\210%#\251\275\211\344pPQb\321\344h*\231\221\3663\303c\251\211d\200\375\304\224\200\222\216\3072\274\373F6\303\253#)I\t$S\231\300\226\270+\005\304\300\222\244d\344X8\023K%C\262\030~/\311\013\242,&\002\021i3\226\224\"xg8-\247\302\222\242\334\270\031HH\231\255T\344N*\031\317\005\322\350'e$90\276\217iI\221\200\022\373 \005\376\376+\360+\373\236,\205\245\330.U\017*\303\023\261dL\331\n<\315\033e+\225\215G\002l\230T6\223\246\316|=RdU\214g\245\300DJ\016\304hErR\214\007\262\212\304\272>\246y\0076h\216{\242\034Q\356\204S\211\264\230\211m\304h\221\271@4K\323\2417$e\330\347\013\004\246%)\255\0042XQ \265\031P2bF\nd\266DN\005%\260G}o\007\302YY\226\222\231x\3566>\"\007\302\251,>JC\004\002\317R\361\010\215\260%\005\222\264L\232\315fJN\210\240S\200\236\210rJFJ\017O%\003SI\314\177\227\315;\223b\r\364\261\315l\234\023\234\372NK9N\324DV\311\0046@\366\351\325@&\233\216K\217i`\032H\214\334\016D\211)C\263\350A\364\336\215E$\232\016cj`oKJ2\236e\225X2\032X\216%\350\315\251\344n\212\2705G\223\323\231\177cP\2719\227\nH\3731%C\375\204=FR\205\276@\313 q\320\207\033\246>\231X\202\370.&\322-\032\223\322\\\312 \326h\216\370\315d)\"\305c\033\222L+#\236q\221!\202Q\247d`a|\341\316\375\207\367\003b2B<\337&Q \321\313n\204\343\242\242\220\260\021\3717\262\261x\006_\312\245\211?\201\251\315@.\225\r$%\222\r\242X\232\372\231_\310`\271\212\224a\304\037\022\223\264rFw\201^\247u\r\005\"1\022\255\014\211\026\336\236\020\343\2124<\237F\0171\376z\214&\366\232\346w\233\246\223[_\257\325\317\020Q^\007-U\026\221[\037\016,H\362\235\367R\216\263\215I\267\022\020e\211Q>G\323Q\262\351tJ\206\234C\000\364M!l\210\231\360V\340\306V&\223V\036\335\275\033\215e\266\262\033\303$\234w\305\264\030\336\222\356nHb\342nLQ\262\222r\367\336\310\037\277""\377vsx\311\330\031K\322\016UcHi_\ng\231t\021\275\032d\3506\333N$\374LH\271,\033\262A\254\021w\305X\034\273|8\020\002+\343\261\367`RB\022\223\ng#\010\251\313z@\316&\2234JM\017\350\253b},\223\260LA\031^\316\210\324\313\272\201\361\276\276\177\211\332\001).%\350\023\n\233.\304yP\341\333\031\364RH\242cl\253\014\362\017\353R\036\031\032\376\257\030\211\010T%q\212\t\214b|\236\312]\242d\"E:(\027\0103Q\300\376!:D \271\221\230\202u\353\337e\243\212ap%\006\235\327 \332R\222i\302M9\225\340,f\244\331\023\025Z\266\256\277 \214r*\222\rc\2132\306\016G\303\244)I\374i\263\306\302 <+f\223uaH7\211M\213>\026a\341Z\324\244@\377\205\360<\252\211\251u\314\030'\252\310\366f2\032S\370r#M\037S\036\005\206R\033\333B&%\304\230\n\031b\263\245\245\023a%\232\200\004\3456\204\325\014\005\230\242\0332\331\210\005\3164yh8P\023\342A\331Pb\303\240\205\316\215;\\0\3560\235\372'\237\225\222\312\312a\351\357\333\201\214\0305\351\240\357\363\rJ\303$Q`\276\225\270&\302\217\363o3m;\034x\275\267\025\243\361 I\320\233C\203\312\320\272\241\024\277\377MR\024A9\272\020\027\303\322\026\331\001I\266X\331\247\301\320\3503ab~\351\351\324\330\330\370\034/.\215/\256L-\215\217=\005;\250\343\256D\223\223Y\211>\276 K\233\022\355\277\260\324\\3,\223\026 \225\246\263RRZt\321W\373S]\214m\310\367\252>gF\022^C\266X\214\223\245\346\226\376i.#)\243)Z\343(\267~:\300\260\214\005C\301\211\231\371\027\302\330\324rhi\352\351Jhj~nl^\230\233\017\t\243AZ,\t\005\250\217\377\372wL\217\303\202 K\330LB\230\231\021A\2606\222\212g:\246e35\032\013A\265n\355L\217\255G\2577\266\034\335h\016\313\022\232b\315\243\362*A\357\220\341.\321\361\035\366\350\207\334\002\371\275@\262\034#\377 \325\252\363&\363~\204\rF\376\026\355\324\234\211\211qZPm\243\265\350\245o\370\343[\270p\264h'Zd\323\255\352\341 \266\252\207\256?~\272\264\325e\332D\255\346\010\013%`g\313\214\336L\302\330\003\237!+\263\025,1\365^\177j\315\316Z[Kn\032\255\372\267\371|\005\256\360Z\264\307c\233R8\027n\331%!\3466h\335\"<+A\332\017Ki\203\tF\017\231\234\037\322\252\202\230\215B(%\363""\353\272m5\004\026\374\210\312:\253\364.\233\372\246\263V\221T\230*L\014\266\326\324\031\333P_'w\213\306=R\346\002\\\362H\243`\351\035kba\224\301vS\331\314g\243J\316\325\245f\231T\242\230\311\312\222\245\320\232\223\346\346\226\3144u \005\027~/\324L\256\020Im&\205tMtL=\311\353\216E\250\3131\325\315\"\321\252\223\211\354\337i\256\363\240U'\303Ybs\265v\212J\306V\022t\353\2424w01\210zE8?\217\357\242\373N-z1\236~\347C-\024\3261\243\221W`\314[\027^\321\220\037k'&\177\r\237\212)B\375\364\331\202(h?\236d\324\232Mn\220\035\"\367P \237\302l\t\2263\006\277\361@\322\004\345\251\213\020\253\321\017q\0029\235c9:\273\305\302!L0$F\231\366\031\237\033\235\037\033\037\023\246f\027Vf\226\307\205\325\340\314\312\270\331o\030Of\023\343\206#\254\233\243\311xjC\214\363\003\203\371\231\331Ms\205\362,\225HE\245\244\224\312*\306\371\202\331j\313\347\004La\tS\230\231\242\251\202F\306\031Q\230\231\237\234\034_\302qe&\025~?+\246q\346\231e\002\374B\246\222$[\n\315\273\255\261\271i\267Y;\030:\235\351\354\260\030\217\343\204=7\317'j:]\232\036iPiG\020\2545$\t[\215u\2345\326:YJ\313\326\272x*\032\305y\025\347ls=\355Z\222w\205\325\013s)\275\272\376T\373\200\251\252\361\360kj\252\371\233s\251\371\364\013c\033\214\033\273\300\360lq\0006\216\210\363\314\205}&b\023\310\202\245d)43A\370A{cs\023\223\376u\017\213\217!p\347[i\350\263\305\320\252\321\214\256?\337\363\373\203\376\314p\255\0072{\035F\227\0051I\221\216\315\024\333\033t\362\341{Jw:\032\313\315dn\321\243\211\216\315}\032\274*( .N?\354\312\351\364\275\027\024\332bR\315Ah\321\316N\326B\335\206\243\025\272LP\"\233\315\335k\366\270\251\3518\237\244\251\243u\t?h\346+l\352T\233\006\2213\267O\377q2\020\346h\333-I\233\372AQ\026\214\207`DL\323\3663\212\315l3\2654\261\253\326\266\031\317*[\265\222\036ll,\363\371\232\017\260\020$\353\201\226\221\245\305\031\26794\332\\\263\032\223\366\3105\202na\241\016\343\335e\230a\363\321k\231jY\244P/\231Bx\226B31\032\233\233(b\355`\345\327\367\3328m\226\3016ZX6\236Y\220I\025\3129S\r\375\306\"Y1\316,+\233yhm\201\314\327""\263\361\321\351\251\271I\262\251Q)\302wqh\213ND\021E\334\224\232\251Tok\326\273\3148\363\241\361\264L\241\230\220\241\251k\017\265vV\322Cv!\004P\331\0173\303\315C\267P\362\030\347x\335o\004\3259\362\316f#n\211\030Z\n|\006\346\032n\315E\2121d\023\3318\276BQ\256\030\267+\202(G\025S\021\021m\252\210\222$FY\317x\\7\310\010\370+\246\260\3300s\016-5F\234\334R\227\242\277\rQ\221\254\225\2155)f\347\224a\026\274\256\271\201\346\036i\326d\256\321\343r\303<.\327\252\205\024\225@\316S\\i\325\270\227\222!\211\272\226\327%1e\371&\035\272\223\n\242\355J\353Z\372\264,\035\323\304\365\245\245\221\302G\024)\311(\303L\334\315Ml\222\206\277\2504\267\324<\206\346\246=\235\325\002\247\217\034\245?\346\250(\214\223\364\237\351l}}\215e\276\363X-\205\341\322\261\360{\366\314\016l\351z\320I!\347ZJ\24439\241\341s,\030%*\271d\230\030M\324 cI\311\032E\020\311\337\246\211Fj~\034\267G\230\267\220\213I\224\3200\342G\226:#`\264\221J\305\255\036?I ;wY\316Qa\375|F\216\322\367\216j\202\300\002\372\002\235:b\031)\201\"M\222,&\213\252H\230^8\236R$.\321\310\346\304)>\031\251=\010\020\025\224\262\210\263\020E$\303\0322K\243\037q \013B\315\345\027\303\264{r\307\025S\262\036\265!\207C\300\031^\266\306\201\254A\237\343#<\307\231\326Z}\355d\305\024\265Q\335\330\2556r\255\202/\217~\245\375\010%\340D\322\300P\025\234\353\212^\003\224\350\005\313\251\276V\207/f\353]j\",\010\021\230d\016z\334\\\210\262\223K]\272\230\024\206E\026Y\214\244\004b%14L?\374\034\245\353$\n\336\352+\247\270#1OH\262\024\206\300I\n\310&\330\177d\213\370Q\241\201\"\rE~\342\245\250\213\200,[-\372\322\344\313S`\006\036\206\264\237D\304\236\214\025\204\326\220T\003u\007\222\273\303\026\247\270\245\207\314\274\210M=\271W\217\374\010H8n\222 \240`\240\220\332$\232'D0HF\036A\367\367 N\326\035\312\032\031\037\005a3\233$\022\342L\270\237\226i3\314\320qG\302\203PW\3705\tf\325\304q\263\026hY9\374g\363_\263\353\320\\\303\311D\t`)\336Hr=\262b\004X\364\035b\216\267\010\002\324\231\376\253\237\231Hb[\207\303\005\014+r\253\256\177\201\377\262\241\364G&\223\372\363\036\2171Y\0029B\202\022\2544*\375K\310)\330\0149F2L\377x3\241\264\307\177H\321\003\224L*m\261\215\264W2\226\024&\025(\201\233\332 ~\355Ju\233\227\332L\245a\2040u\014\236Br\223\357Z]\266\302F\236N\257\345;\334(\361\365\313F\264\302\304'C\347\245\323\"si\350C\360y\330\017\355=\003\025\363+\372\240\306\233uEk\326\271iZ*1V\242\021$<\340@F\344\341\0179\035\314\273\255E\225\321\233\305\376k\317\354t\316\230cT\351\005&D\026Y\262\356?\316Kk]\203\343h4\202\033a\221O\213\327X_\256o\250\357\347(\214V\253\317j\370O\204DW\362\212\2054\305\032\302b:\006\251a\317\360F\225l\202\227dv\204\345\317\272v\307#\016\004\374)\233\204\353M\262hJ<\266h\321O\317-ZxR\244EC-\224\335\320f\t\2756\264Y\203\215\326\266\306\200KCs-\302b\255\266\034\376\033\332Z}n\227+,\372\267Cg~\276\035\r\235`\016\247\324B\024Bs\334\323\250\200\347\303}%R5\265\007\356a\222\226\223\353Up\363\215\260pc&\2749\353&\353\021\t\003\315b\323\252N\251UB\312\352\205\372v\250\325YJ\212u\\\2533\322\312\0211\327\351\237\252\225uC\333\242\212\237\225\270\244\362_\3720\tNR\206qhR\300\326\350!+ELE\332\027\021\301\320\266\320\366DbR*\222D\356B|\223\256\204DLiu\026I\322\225.=\031\347\215z|Ih\021k\342\256\326w\203\224J\014W}\004\346\256(\265[?8\262*\306\256\000}\030\007\230a6[\347V1`6\003>\r\346Z\3426X\230+\026\334\301\023\3527\304X\221\235\302\033M\006\010\237\246\033\022D\215\206\233\024M\327&\224\034}!\232a\241-\223I\324+\270\302\242""\357d6\014\027B\0200=\372eQ\256\030\\X#\334%\264`9\265\246\366\352\321\235\372\t\255\366T{P\230\205\213\300\334epN\243\235R;;\327\202\036dg\352\341\327\026Ou/\363\370\3034\277Y\327\322%\311&q\333\212o\216l\032\311N*7;e2j\rqaz\3368\3321\265\212\032\336D\341\223z\332\264u\242\2669\367\332:\031{L\372\365\330\332\254\304\035\346\275\026>\356\367\316\007\255\332\330\330\365\006\266\2159A\214\335\2204\313\237\376\314]\024\"u\355\270\310\026R+q\037\277U\235\316\r\3531\223\227\214/\325\206U\230\220\326$\205\225X\377\375\017\261\364Bn\236yK\201['\026r!\262\205\265\242\360t-4.\204\346\205\205\340\334\2700571\177\242\036\200\265v=a\216\374\236h\014\314\252#\337\332\252\216_J#\245\211r\277f\033)wW\035'\013mU\2177\177\276p\277\220U'\212\267J\243\245\017\225\356\312\265J\350\240\373\310\341\376\246\344\373\363\217\013a\365\224\032T\227\213m\305\356\252\253#\377\274 V}\355\325\366\256\374~aW}[\032\371\326\377\217\357\204\323\253y\372\251\203\247=?\242u\\R\027\253\236\216\374x\241\267\360J\273r\257\334\177\344\360\344}Z\317\315\322\245\262X\353\177\265\330\337\262\377o\345\021\364\357\322\316\336.\005Q\377\\;s\253t\247\274\243\331\250\251J\023\333\313\213\371\254\326{\263t\266l/\337/g*#\230Y\260\3528\243\235\031.m\224\035\345\340\221\303\371\217\353\204\273\273\340(\004\013!\265[\275\246\256\024\373\213\277\0257\264\033\217h\211+\007\375\007\364V\247\326I\323\370\307\203\236\035j\260\352;\245\235\272Y\352.\r\224\304\322n9T\351\251\334\253\254\036\374v\300\326\254\367\256:\272\362J\341\246\312\246\242\344\007\363;G\016\177>Z\020\212\301\342b\325\341\321<\001\"\326\371\022\265\267\347\037\025\026\211`\016_\276\377\033>\323{\372\310q^\035\320.\337/\007ixb\002+=9h\303B\203Uog~\261\352\362\346\211\222\035Z\307@1\010\n\375\245\332\351c>\277\346\277F\013\020\213_\312\213F\365}u\247\352\353.\020g|\232\357\266v\373\331a\033\233)}\257\352\273N}inNF\303B\n\223s\177\313\344G\352l\325\241]$\001+\017\037\264Q\2777m'\234\256\177\356\237p^\004\305.\252\304\232\263\205\317\305\311\322\010\321\003_\240\376\352l\351\224v\373\357\312\006\321\301\325\255u\017h\003\277\227\031!z\363\230\210\327\257u\336*\221\270\020{\260\252\017\345S\345\347\025\361\310\325\247\365\335\320n<\254\320\252{\013s\234\223W\324\224v\347\257\312Re\207\006\320\274WT\245x\243\004\241\363\016\320\n;.\253\033\305\266j\3079\265\273z\222\376N\025F\252\275(\364\005\264\300\257\345\266j\337\2206\364\240,W\316\223|\234g2\332]\270\240]\374\243,V;\256\321\000\036H>hB\0179\325M\014\360\320F*\234WG\324\351\342\016M\300\333_\354,-\021\241ba\325\177\221X\326]\355\031\"a|\203\357^P\037\020\251|\330\311\376K\352:-\243\347F\311_\216\037\364W\375\264\035\252~\322\016G\\\260\273\264\256\301\342r\251\263\274T\3361\023\367\274z\247(\227\270\016\251\372.\253\321\342bQ\324KW\324=\010s\325\345\256\372\210O\017\350MblF\273\366\237\312\251J\020;\375d\376\243v\036\362\347\203\036ru\346_\026^\320D\351a\255\020\245Y\271\374\2444>\220\"\370\245\270xD\265\213\337H+\265\347\357k]7J\366\322\203r\177\255\254\217O\373`F%\001\206\274\337'f0\005\242w\312\177UE\243\205=\362\332\035\243n\007j\307(|\320\316=\256\374u\010]k\252\272_\236=\350>\3507\325\334-}\256\004+\213\265\032\365R1Q\036)O\261\252\000\253\375\275`'e\275c*;\ncZ\337\315Ro\t\235\372\257\232*oA\2111\245\323u\262\332s\252\332\335S\245\r{\356<\376.]\376\347\341\t\347\251\302m5L\304r\\\322.A\362=\275\205\321\302\307\342\265\342z\231I\375\225\242\017{\216\366\343\365\3426i\332\377h\177\316\036\326\225Hg~]""\355\327.\220M\001c\373\n\247\nA\010Y\254\260Cb\t]\ta e\324\352\357[\020:\352\256\332M\263\016>=\342\372\221\236\3769I*\341\333>\351W&\373m\3300Lo\220\375@U{\376?X\3330\251\347\235#\246\036B\205\356#\3179\265W\273\364We\261\n\225y\004\375{\004\375\t=|Z\273N\322\305\212$\030\305\376#\017W\312[\264\255Hsb\333>#5\353\273\240\216\034A\305\016\026_\224\306iO\370I\253j$\303\276\3625\322D$\234\267\213\341R\267v\213T\365\021-\301\177]\273>v\020\254\366`\223t\321d\350\243\016m\340q\345\361\001\023\345\376\206\t`!\236o\031\255}\250\270W\022\231\272\036,\276*\355\224\333 <\276\374-2SL$\211n\264\206b\250\324\r\203M\026\260\264Z&\333\r]\331\t\023\327\221\237,\214\024&h:\"8\261\233\177Q\030W{a@{\210@\036\322\323G\370\341Z\004{\215\tG)Z~}\340>\2406KM\333\377\313\300\303\245H\271\277\374\240\362\313\301\213\303\340\221\265f\021\014>\247\235\273\243\335\201\246\363\235\207.#e|^\275\252\006uUT\355\270W\276Z\3267\357\016\351\271X\3613\355_\222V\327E\355\"\261\030\032\250\223\254\226\277\013\372\206)\235g\305\247\305Ty\215\014\005-\006o^\346\242\353;G\273E\264\366\014\026_\243\005e\322Kk\305\367\345\036\355\267\347\2074\021fI\311\206U\317\320\374\246\016\231\263C\254\271\314v\203\313\r\253\030\322\316\375Rb\026\376+y@\274\266G\353a\006\300\313\376`\256\301\343\313\252\341\322\300\305\271]\232\205U\367\344\235\371\220\326\2553\233(\226\267\345o2\362^'e\010\037\201\204Q\263\221|@\342\275\371\316\002\367\034\372H\343\020a:a\232h\317\332\272\362_\264KwJ\213U\033\355\302~\255\037\276\221\315\237\337\244\255f;K\376\327\"}\330\336\007\256\300\335\261\367\323xd\266{\013\277\025D\332\311W\213\243\305\035\355\306\237\225\247\025\021\365d\201\324/\304\372HyP{0y\260S\275|\243d+\221\320\2352\277P\242\t^R_A\027c\314sd\236\203TD\275\315\365-\234?\235\017\027\272\341\377p\267P\353\207\371eJ\341wb\"#\341Eu\2628R\234#a\030\201K\263R\270\245\216\222\241l\256\277C\306\271\277\271^\353\271\216\335\326\252\341*\351\247\305\026#\335-\236\242m|\334\013Gd8<\334\244DJ\375\304\330N?,\313=\022r\222\216\223\005""\0374Y\360\240\207l\276\227<\002\322\203\031\365wXO\313x?j\331UC\305\336\342\n\224\204\035\336\345\277z\271\271\005\362\355i\234\366\221\255\017NG\321\001o\023\374\351)\3640\356\355T{\316\026\024\222//\363\"zN\027^Q7{\221\004\206\\\000\355\354\335\0223O\236\232\254\321\3060\004\227\\7\010\031\367\265\177)\375\005\206\352\"|\243\344\206\355o%\302W\271=\244'lo\335\361\2559\300\275&g\330\364L\237\3549\341\364\347\353v\304\227\037\310'\3251-\360Gy\263\302\224\203\230\337\325N\017\221\227\327]\276]\221\016~\320\247\332\321\247:\325\227\330\355Gu\0077\310'\357%O1X6{\276\254a\260\330T\305<{k\325\257|\304\035\330\272P\341\022d\373H\177d6\337\211\211\rk}D;\332\346\216v\255\035\312\006\272\235L\237Z?\351\014r\376q7\001\306'\242\235\207;\313\354v\365\nc1\243\305%u\tg\n\346\2028\273\013\235T\334/~*\337+\277$C\215\203\006\244\306{\206\274X\207\372T\335*\306\311\032<#\346:\310N`i\030\203{\245\027\340\354sS\345\307\302\357\225\007\264?\026\264\205\220\026\2224)\366\317\211\023\333m\2436\202Q\333$`\322\026\001Dl[\200-\333G\300G\333W\300W\333\023\373\317\032\273\014\274\233\007\345\301\262R\031\320\376^\325V\327\265\365\rm\243\366\315\t\0148a\233\005\314\332\226\000K\266\025\300\212m\r\260f{\017xo\223\001\262m\017\260g\373\000\370`\373\002\370b\233\262\023L\331\027\000\013\366E{\335\302\336-e\310\001\234$\237\"z\270xd\2551\323\203\\=mx\342 \242=\247\t\212\232\370A\373\360\005Km{\211/\274\264\275\001\274\261m\0026m\333\200m[\020\337\013\332\307\001\343\366\267\200\267\366\r\300\206\375#\340\243\375+\340\253\375\255\003m\216\r\300\206c\037\260\357\370\004\370\344\0109\tB\316\227\200\227\316-\300\2263\016\210;\203.|\3015\016\030w\275\003\274sE\000\021W\026\220u\345\0009W\310\215Q\334/\001/\3359@\316\375\031\360\331\035""\362\240\315\363\022\360\322\023\003\304<\t@\3023\351\005\267\275\323\200i\357\032`\315\273\016X\367\276\007\274\367\246\000)\357G\300G\357W\300W\357\202\017\264\366\205\000!\337\026`\313\027\007\304}\263\355\340f\373\"`\261]\006\310\355\273\200\335\366\351\016|\250c\0360\337\261\320\361/\004\3517\362\213\006+\312\301\2006AL\212h\221\230\026\213k\3614\215\264c\010\357s\300s\333<`\336\220\247U\300\252-\tH\332\262\200\254!A\237\001\237\rV\256\001\326\354\357\000\357\354\022@\262o\001\266\354q@\334\236\005d\355\237\000\237\354A\3600\350\030\003\2149\236\001\2369tnK\000\311\261\r\330v$\000\t\307\016`\3071\005\376N9\027\000\013\316\025\300\212!\002o\000o\234i@\332\271\007\330s~\002|r~\005|u\216\202\351\243\256u\300\272!\0201@\314\025\007\304]i@\332\365\004\"\360\304=\t\230t\317\000f\334\363\200y\3672`\331\235\000$\334\031@\306\020\235O\200O\356'\220\222'\236w\200w\236( \352\211\003\342\236\024 \345Q\000\212g\nr1\345]\000,xW\000+\336\227\200\227\3367\2007\3368 \356U\000\212w\037\260\337 V3\220\240\031\3372`\331\367\022\360\322\367\032\360\332'\000\004C\310\024\200\342\333\007\354\373>\002>\372\276\002\276\372\236C\326\236\033\002\270\nXm_\003\254\265\257\003\326\333\023\200D{\006\220i\317\001r\355\237\000\237\332\237@8\237t,\003\226;^\001^u\010\000\241c\003\260\321\261\t\330\354\230\350\204\372\352\234\005\314v.\001\226:W\000+\235k\200\265\316\034 \327\371\304\2171\375\343\200q\3773\3003\377\014`\306\377\016\360\316\037\005D\375q@\334\237\002\244\374\n@\361\317u\021\314u\255\000V\272V\273\352\032n\244\334[^,G+\257\017\335\207\374pR\257ik\251\341\302Z8\252E\367\265\375O\020\375\266)\354\200)C\005\317\331\376\257v\244>\356\002`\301\320\351Vu\032\007\304m\n@\261\355\003\366\033L\315s\354\263\347\244\323\301J\373*`\325\330\246\353\200u\373\016`\307\276\017\330\267\347L\332\377vi\254\334V>[i?xp\330\177d\255\031\371\031\332\2040\211\2201\353\030 fK\000\022\266\034 g(\220/\377\237\321m\005\324X\261\277\001\274\261\213\000\321\036\001D\014\205\246\023L7Q\272\n\233\004L:\246\001""\323\216U\300\252c\035\260n\230/]\257\305\0001\307g\300g\307\030\024\323\230s\334\371\263\247[\203\372\205\263\344\274L\0273\332/\317\016\035\332\314\246\266\271\255m\347\264\334gX\366\266\031\254f\306 \206\000\020la@\270\301\007\260\232\337\017\200\017\366/\200/v}\031\257\000\257\034)@\312\241\000\024\3074&>\355\234\007\314;\223\200\244S\006\310\316W\320\241\257\\o\001o]\202\353\247Y\254\376Q<[r\226\226)\216\376\274\022=X9\274v\030\322\026\023Z\"\243ehm\\\270\202\230x\320\260U\272\221z\rxm{\013xk\333\000l\330R\200\224m\027\260k0Z_\367S,\361\251\341\373\274\000\2740\330.\000\004{\030\020\246\235\001\201\265?\301\272\2378\306\001\343\206\311\232\001\3148\336\003\336;d\200\354\330\003\3549>\000>8\276\000\2768t[\245\033)\021 :#\200\210\341\274\350Fj\002d\233pM\003\246]s\2009\327\022`\311\265\t\330t%\000\t\227\014\220\033<\232\027\260@/\334o\001o\335a@\330\275\t\330to\003\266\335\2130=\213\206c\263\016X7lU\004\020\361d\001Y\317'\300'\317g\317\277\025O\034tB\332\315\247\330\253o\265\267\033\230E\233\356\"O\003\246m\313\200e\333\013\300\013\303\313\320\335\325y\320|\336\276\014X\266o\003\266\355I@\322\330x\243\240\353\250\343\r\340\215\343\035\340]\203\214\352\336\302,`\326\031\003\304\234\t@\202$\366\377J\361\350\312N\227\300w\200w\306^\213\002\242?\343B\351\022\250oG]\3646\001\233\306\372'\260\252\t\307,`\326\261\004Xr\254\000V\034k\2005c\375\273\200]\307G\300GC\002\237b\341O\235K\200%\347\032`\315\371\026\360\326\220G\t 9?\003>;\307 Pc\256)\300\224k\0060\343Z\000,\030{[\002H\256m\300\266!\226;\200\035\327\004\204m\302=\013\230u/\001\226\334+\200\025\367\032`\315\360\235>\002>\032N\323(`\3243\t\230\364\254\002V\r!}\373\257\005\261\320G\034}\211\250\346\317k\241\007\305\241\322\351R\230\374\201\027\225\311\203\337\017\355\207\367\265yA\023H\311F\177\326J\362C:\216\354\227\325\257\010\0327\235\322\245\"\013e/Z\rji\273\342\320\376\2349\034\323\026H\316\266\264\255]m\367\003\310\323\260{f\376W\206\363 v\270\247\255\276\326^cOj\033;\332\016\331ln2t\265:\016\0307\014\247n9""\364C\255.\315\372\311R\267\237\272\341\034\203\214\216\331'\001\223\366i\300\264\341w\350\016\207nc\364\343A\014\020\263\357\001\366\014\213\363\325\344\205\260\234_\331]\376x0D\201RkM?K\003R\374\310K\231\333\025\026\342\315\237\241\330\375p\261\255\026\030\350\254v\366\"\027B\214\370\366*\377Y\273\210#\354\337\2242\322\003\034\002r\274g\n\357\021\233\257\366\236\256^\275\326\230[\374\347\372\tg{\236\177\353l\037*.\362\n\2125!W{\275\334V\017C}\243\020(\017K\361\224\002\240\310\242+n\315}N=W\274KA\245\201\262h\344i\332\216\311d\"\374\214L\246:O)\363\271J\177=\353\311\303e\254\035\311\323Mu\246\324\306\223\246I\204\234\265_\221\317\353@\002\215\326n\372\323l,\250\341!b\261\000\261\277\300RH,\206t\20321\"\002\244\310F\266\210#5v;Sh\031nbD\340\251\334\277\313,\177\200d\351.\345\206\350q\230\245\264\027\315q+\304\231|g\n\222\372\260\370\270\364\036q\353c\306D\346d\240\230,\007\213;\337($vE\335A\256\264\235\302\020\357\265\305\245*\305\217\377.\366\031\311\313O\205\007$\n\036\n\236i#O\017\206\265\205EN\274\326/\376U\364\224\332\240\026j/R\240R\373\365\311\201\377P\374\316{\332\251k\305\207\304\232\240\351E\272h\240\3756q\220\324B+\337\373\342CZ\356H\321\374\"\321\241\364\270\234\244t\316w^{D\372k\221oq\3755$g\326+\303\224\331\373\316k\217)\262\205\314e\3755D\013\223\225\271CC\246\030\205)\025\214\000-\ru\203\310q\306\210\325\272y*\261z\262\327\370!\316\r\262\364\030\345 |\235\024\227S\n\003$\r\010\300Q\352\004\362\331\301\004\325\317\362M\010fRN\201]\036\350G\030\226'\315\026\221\274\246A\210m\347K\277A\224{\260i\217(\351w\021\271R\372Pa\211\202\212\036\n3O \217HYyru\333\220\010\351C\2743\244\215 \177\240\017\253\r\"3m\244\343XV\344\n\273N\200\344\010+\222\034R\n\234g\300\220\220\037@\350\222B\362\235yA\235#\261\361\237\253e\250\261[\206(\373\217\215hg\311\314 \037z\205\246hG\376\205\026\244\236V\223\304{\272\205\222-\243\235\342\311\035\326\207B\246'\265\223""\327\212\217\020\010\2464\3568\351\267\237~\203r=\005~\027\201\376@0\366\303gw\253t\rqy>\217\010\rd\035U\257\327\256\376\207\356\355\\E\366\370\270\016\224\243\241\313,#\025\272}Ai\271\333t\325gG\017m\363tB\233Y\357\261\354\326\274zO\273\204{B\310t\035\325\223\276d G\310\272\2661%q\223b\263A\214AW>\036k\217\247\017G\364\333+\227\265\313\270\254\303\345\212-\277\360\010\201\356\r\355!%\334\252\0354K$`~/\330H\224\255\t\030\372\322\006q\301\341\374\005f\240\020\267\357\270\240\376\215\231 S\013\342\221\370\031\367T\216\316\234\325%\017\323G#\204v\250\230\341ik}/\320\305\000\036v\377\337\357\013ch\\\332\361\303\362\363\237.\036\220\257\357\214A\346\005\361\273=T$%r\274\244C\227g\221\014\262H\272\021\245\357<2\313:\357\033\264\212u\303\000\272X\233\327k\352a\221\034\323G~\252\236\2173\246\335\370oe\347\300\306nW\035\323\201\022\302\270\202r@\212\217\264\336\303\212\2752\242\213\242~\347\303|\231\310[\3253\367\325\316\241\"\273\224\021l\266\330\356\272\2423\236\221\201\247a<\270\325\305\262\244\224\201\250\267z\363\027\013\313*n\027x\317\026\"\352-m\340\277\225\317\207A\236\270'J\355\030J\213o\204\021V\274\211\204\244\033RK\227D\006\212c\320&\344\032\334:x\212\353a~\312\212\236.\304h+\371I,: \360\367\265\263\270\330r\222.\224`/Pr\272\203\371\201\254\022\227#z\257\322\315\244\341J\347\301\242\276\375;\360i?\273r\245\356\034\371:\365$\024m\302\221{\346\227iD\354Lk\367N\250\021H Y\020\314'\205\353\027TD\036\033\210\345\000Y\276\\G/\273\3226\200d+M\304wp\215\246\302,\314\027v%O\353\000\321\371]\251\313d\310\222\270\264\302\335\231#~\205\201>q^;\377\013\277\3546b\362\321\\\026\373ca\013\313sig\256\203\323,\361NW'X\342\331_\336\346\211S\363\014\220\230\354\340\342lh\307\004}\216=\327g\302\026\311g\302\234=\372\034\271w\314\263?\342\227\352.Qr\266\0333\030\300\205*\256\000\352Z\215\314\r\351\022\375\272\2021+;e\307\370\0308\033\220]e\016\322\005v\347\205T\003\256\207\264\035\363\265\232-$\026!\203vR\353\272\242~\204\277\325\016\336\210\307\375lk""}\340l\275\256\256\243\350\302\013]\226B\022\224\335\215\363\347\337\343\372\014\273D\307o/\210\230\300+v\375\246\275\013\367\232l\332\255?+AV\370\265l\323\356\321\355@h#?\277\374\204Y\377I\031cF\017v#\220N*\354\254\204[9\377}\202<\255\371.\316\221\343\302\217o\3420;\207\244Y\377\317_\271\271V|P\032\244\243\031\277r\303\357\032\215\230\256\334\020K\216|D\365\273\245O\314\202\375\340\252\315\221\241\337\220\2765]\r\242M\363\260\342\250\264\274\037\364\275\3539\334|\350tp\037\031\004\300\375\017\027n\317\216\024\236\361D(nex\370\325\255nu\02073O\026\274\230\310_t\207t\0047\252\316\024\030\255j\357\320\306:\242\027\3430~\270Zu\341\016]\034D\206/\310I\272\\h\343\032\210y\254l\316p\313#\270\320h\010\27211\034un\343.'\263\242\377\003\216f\t\023"; + PyObject *data = __Pyx_DecompressString(cstring, 9387, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (22686 bytes) */ +const char* const bytes = ".An uninspectable WindowFn.AssignContext.DoFn DoFn is splittable but DoFn does not have a RestrictionTrackerParam definedDoFn.process() method-only parameter Expected size >= 0 but received %s.Finish Bundle should only output WindowedValue For internal use only; no backwards-compatibility guarantees.\n\n Keeps track of state that DoFns want, currently, user counters.\n Holds the name information for a step.In Input value to a stateful DoFn or KeyParam must be a KV tuple; instead, got 'Must provide context when not using SimpleInvokerNameContext(%s)No existing_windows in this context.No timestamp in this context.NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Optional[Dict[str, any]]Optional[List[Any]]Optional[WindowedValue]. Per-key DoFn params are not yet supported for process_batch (https://github.com/apache/beam/issues/21653).Received Requested execution of a stateful DoFn, but no user state context is available. This likely means that the current runner does not support the execution of stateful DoFns.Start Bundle should not output any elements but got %sValue for sideinput %s not provided'.?add_noteapache_beam/runners/common.py cannot be used in disableelement not accessible in this contextenable from DoFn that was expected to produce a batch.gc has duplicate has unsupported per-key DoFn param has unsupported process_batch method parameter https://github.com/apache/beam/issues/21653: Per-key process_batch is not a stringisenabled method parameters: 'obj_to_invoke' has to be either a 'DoFn' or a 'RestrictionProvider'. Received %r instead.per-element-output-count, tag timestamp not accessible in this contexttype but got %s uses unsupported DoFn param ElementParam. [while running '%s']windows not accessible in this contextAnyArgPlaceholderAssignContextBATCH_FORBIDDENBATCH_REQUIREDBatchConverterBatchingPreferenceBa""tchingPreference.requires_batchesBatchingPreference.supports_batchesBatchingPreference.supports_elementsBundleContextParamBundleFinalizerParamBytesCoderCounterCounterNameDATAFLOW_DISTRIBUTIONDO_NOT_CAREDictDoFnDoFnContextDoFnContext.__reduce_cython__DoFnContext.__setstate_cython__DoFnContext.set_elementDoFnInvokerDoFnInvoker.__reduce_cython__DoFnInvoker.__setstate_cython__DoFnInvoker.create_invokerDoFnInvoker.invoke_create_trackerDoFnInvoker.invoke_create_watermark_estimatorDoFnInvoker.invoke_finish_bundleDoFnInvoker.invoke_initial_restrictionDoFnInvoker.invoke_processDoFnInvoker.invoke_process_batchDoFnInvoker.invoke_setupDoFnInvoker.invoke_splitDoFnInvoker.invoke_start_bundleDoFnInvoker.invoke_teardownDoFnInvoker.invoke_user_timer_DoFnParamDoFnProcessParamsDoFnRunnerDoFnRunner.__reduce_cython__DoFnRunner.__setstate_cython__DoFnRunner._invoke_bundle_methodDoFnRunner._invoke_lifecycle_methodDoFnRunner._maybe_sample_exceptionDoFnRunner._reraise_augmentedDoFnRunner.current_element_progressDoFnRunner.finalizeDoFnRunner.finishDoFnRunner.processDoFnRunner.process_batchDoFnRunner.process_user_timerDoFnRunner.process_with_sized_restrictionDoFnRunner.setupDoFnRunner.startDoFnRunner.teardownDoFnRunner.try_splitDoFnSignatureDoFnSignature.__reduce_cython__DoFnSignature.__setstate_cython__DoFnSignature._check_duplicate_dofn_paramsDoFnSignature._validateDoFnSignature._validate_bundle_methodDoFnSignature._validate_processDoFnSignature._validate_process_batchDoFnSignature._validate_stateful_dofnDoFnSignature.get_bundle_contextsDoFnSignature.get_restriction_coderDoFnSignature.get_restriction_providerDoFnSignature.get_setup_contextsDoFnSignature.get_watermark_estimator_providerDoFnSignature.has_bundle_finalizationDoFnSignature.has_timersDoFnSignature.is_splittable_dofnDoFnSignature.is_stateful_dofnDoFnSignature.is_unbounded_per_elementDoFnStateDoFnState.__init__DoFnState.counter_forDynamicTimerTagParamENCODED_IMPULSE_VALUEElementParamEnumExecutionContextGlobalWindowGlobalWindowCoder""GlobalWindowsHomogeneousWindowedBatchIMPULSE_VALUE_CODER_IMPLIterableKeyParam_LOGGERListLockMappingMethodWrapperMethodWrapper.__reduce_cython__MethodWrapper.__setstate_cython__MethodWrapper.invoke_timer_callbackNO_VALUENameContextNameContext.__eq__NameContext.__hash__NameContext.__init__NameContext.__repr__NameContext.logging_nameNameContext.metrics_name_NoContext_NoContext.__init___NoContext.existing_windows_NoContext.timestampNoOpWatermarkEstimatorProviderNoneOptionalOutputHandler_OutputHandlerOutputHandler.__reduce_cython___OutputHandler.__reduce_cython__OutputHandler.__setstate_cython___OutputHandler.__setstate_cython___OutputHandler.finish_bundle_outputs_OutputHandler.handle_process_batch_outputsOutputHandler.handle_process_batch_outputs_OutputHandler.handle_process_outputsOutputHandler.handle_process_outputs_OutputHandler.start_bundle_outputsPaneInfoParamPerWindowInvokerPerWindowInvoker.__reduce_cython__PerWindowInvoker.__setstate_cython__PerWindowInvoker._invoke_process_per_windowPerWindowInvoker._invoke_process_batch_per_windowPerWindowInvoker._scale_progressPerWindowInvoker._should_process_window_for_sdfPerWindowInvoker._try_splitPerWindowInvoker.current_element_progressPerWindowInvoker.invoke_processPerWindowInvoker.invoke_process_batchPerWindowInvoker.try_split__Pyx_PyDict_NextRefReceiver_ReceiverAdapterReceiver.__reduce_cython__Receiver.__setstate_cython__Receiver.flushReceiver.receiveReceiver.receive_batchRestrictionParamRestrictionProgressRestrictionProviderRestrictionTrackerRestrictionTrackerViewRuntimeValueProviderSetupContextParamSideInputParamSimpleInvokerSimpleInvoker.__reduce_cython__SimpleInvoker.__setstate_cython__SimpleInvoker.invoke_processSimpleInvoker.invoke_process_batchSplitResultPrimarySplitResultResidualStateParamTYPE_CHECKINGTaggedOutputThreadsafeRestrictionTrackerThreadsafeWatermarkEstimatorTimerParamTimerSpecTimestampTimestampParamTimestampedValueTupleTupleCoderWatermarkEstimatorWatermarkEstimatorParamWatermarkEstimatorProviderWindow""FnWindowParamWindowedBatchWindowedValueWindowedValueCoderWindowedValueParam_aaccumulatoradditional_argsadditional_kwargsaggregatorall_timer_specsapache_beam.codersapache_beam.internalapache_beam.io.iobaseapache_beam.iobaseapache_beam.options.value_providerapache_beam.pvalueapache_beam.runners.commonapache_beam.runners.sdf_utilsapache_beam.runners.worker.bundle_processorapache_beam.transformsapache_beam.transforms.coreapache_beam.transforms.windowapache_beam.typehints.batchapache_beam.utils.countersapache_beam.utils.timestampapache_beam.utils.windowed_valueargarg_namesargsargs_for_processargs_for_process_batchargs_to_pickargs_with_placeholdersas_empty_windowed_valueassignasyncio.coroutines_attached_callbackbatch_beam_yields_batches_beam_yields_elementsboolbundle_finalizer_parambundle_methodccheck_done_check_duplicate_dofn_params__class_getitem__cline_in_tracebackclosecoderscompletedcompleted_workcompute_whole_window_splitcontextcore_counter_factorycounter_factorycounter_forcreate_and_entercreate_invokercreate_trackercreate_watermark_estimatorcurrent_element_progresscurrent_estimator_statecurrent_progresscurrent_watermarkcurrent_window_indexddefault_arg_valuesdefaultsdeferred_restrictiondeferred_statusdeferred_timestamp__dict___dictdisable_global_windowed_args_cachingdo_fn__doc__dynamic_timer_tagelementencode_nested__enter__enumenumerate__eq__estimator_stateestimator_state_coderexc_infoexceptionexisting_windows__exit__exnexperimentsfinalizefinalize_bundlefinishfinish_bundlefinish_bundle_outputsflushfnformat_exception_onlyfractionfraction_of_remainderfrom_batch_and_windowed_valuefrom_index__func__genexprgetLoggerget_aggregator_counter_get_arg_placeholders_get_arg_placeholders..ArgPlaceholder_get_arg_placeholders..ArgPlaceholder.__init___get_arg_placeholders..genexprget_bundle_contextsget_counterget_dofn_specsget_estimator_stateget_function_argumentsget_implget_lengthget_restriction_coderget_restriction_providerget_setup_contextsget_stateget_time""rget_watermark_estimator_provider__getstate__handle_process_batch_outputshandle_process_outputshas_bundle_finalizationhas_timers__hash__i__init____init__..genexprinitial_restrictioninput_argsinput_kwargsinsert_values_in_argsinstruction_id_invoke_bundle_methodinvoke_create_trackerinvoke_create_watermark_estimatorinvoke_finish_bundleinvoke_initial_restriction_invoke_lifecycle_methodinvoke_processinvoke_process_batch_invoke_process_batch_per_window_invoke_process_per_windowinvoke_setupinvoke_splitinvoke_start_bundleinvoke_teardowninvoke_timer_callbackinvoke_user_timer_is_coroutineis_cythonizedis_globally_windowedis_splittable_dofnis_stateful_dofnis_unbounded_per_elementitemskeykwkwargskwargs_for_processkwargs_for_process_batchlabellifecycle_methodlogginglogging_contextlogging_name__main__main_receivers_maybe_sample_exception__metaclass__methodmethod_namemethod_valuemethod_wrappermetrics_name__module____mro_entries____name____new__new_exnnew_stop_window_indexnextobj_to_invokeobjectobserve_timestampofoperation_nameotheroutput_batch_converteroutput_handleroutput_sampleroutputs_per_element_counterppane_infoparamparam_idparam_idsper_element_output_counterplaceholderplaceholderspop__prepare__primariesprimaryprimary_restrictionprimary_restrictionsprimary_sizeprimary_split_valueprimary_valueprocessprocess_batchprocess_batch_methodprocess_batch_yields_elementsprocess_invocationprocess_methodprocess_user_timerprocess_with_sized_restrictionprocess_yields_batchesprogressproperty__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_DoFnContext__pyx_unpickle_DoFnInvoker__pyx_unpickle_DoFnRunner__pyx_unpickle_DoFnSignature__pyx_unpickle_MethodWrapper__pyx_unpickle_OutputHandler__pyx_unpickle_PerWindowInvoker__pyx_unpickle_Receiver__pyx_unpickle_SimpleInvoker__pyx_unpickle__OutputHandler__pyx_vtable____qualname__receivereceive_batch__reduce____reduce_cython____reduce_ex__remainingremaining_args_iterremaining_work__repr__requires_batches_reraise_augmentedres""idualresidual_restrictionresidual_restrictionsresidual_sizeresidual_split_valueresidual_valueresidualsrestrictionrestriction_coderrestriction_providerrestriction_sizerestriction_trackerrestriction_tracker_paramresultresultsreturnroundsample_exception_scale_progressscaled_progressscoped_metrics_containerseenselfsendset_element__set_name__setdefault__setstate____setstate_cython__setup_should_process_window_for_sdfsiside_inputssideinputssigsignaturesizesplitstartstart_bundlestart_bundle_outputsstatestate_specstaticmethodstep_annotationstep_namestop_window_indexstripsupersupports_batchessupports_elementssystagtagged_receivers_tagged_with_steptbteardown__test__threadingthreadsafe_restriction_trackerthrowtimer_spectimestamp_timestamptimestampsto_indextotal_worktracebacktransform_idtry_split_try_split_try_split..compute_whole_window_splittypingunbounded_per_elementunused_valueupdateuse_per_window_invokeruse_setstateuser_state_contextuserstateutil_validate_validate_bundle_method_validate_process_validate_process_batch_validate_stateful_dofnvalidate_stateful_dofnvaluevalueswwatermark_estimatorwatermark_estimator_providerwatermark_estimator_statewatermark_paramwindowwindow_fnwindow_indexwindow_observingwindowed_batchwindowed_input_batchwindowed_input_elementwindowed_valuewindowfnwindowingwindowswith_tracebackwith_valuexzipPyObject *\000PyTypeObject *\000_BYTE_TO_PANE_INFO\000TimestampPyTypeObject *\000\000TaggedOutput\000TimestampedValue\2301\200\001\330\004+\2501\250F\260!\320\0021\260\021\330\004\020\220\001\330\010\t\210\032\2204\220u\230F\240*\250C\250z\270\021\270#\270T\300\021\340\004\007\200s\210!\210;\220c\230\023\230A\230S\240\001\240\021\330\006\014\210J\220a\330\n\013\330\013\017\210x\220v\230^\2501\200!\360\n\000\005\t\320\010!\240\021\330\010\013\2101\320\014\035\230Q\330\010\014\210E\220\024\220Z\320\0372\260!\340\004\010\210\n\320\022)\250\035\260a\200!\360\n\000\005\t\320\010\"\240!\330\010\013\2101\320\014\035\230Q\330\010\014\210E\220\024\220Z\320""\0373\2601\340\004\010\210\017\320\027,\250A\330\010\014\210J\320\026*\250-\260q\320\0023\2601\330\004\007\200w\210a\210u\320\024)\250\027\260\003\2604\260t\2701\330\006\014\210A\330\004\026\320\026.\250b\260\004\260A\340\004\005\360\006\000\007\021\220\004\220A\220T\230\021\230#\230U\240!\2403\240b\320(:\270#\270U\300!\3001\330\006\r\320\r\"\240!\360\010\000\007\021\220\014\230A\330\n\023\320\023)\250\021\250$\250a\250v\260T\270\022\2702\270V\3003\300a\330\n\013\330\006\r\320\r\"\240!\330\004\017\210s\220)\2301\330\004\007\200s\210%\210q\340\004\016\210g\220_\240A\240Q\330\004\010\320\010 \240\001\240\032\2501\330\004\013\210:\220Q\220a\330\004\n\210!\200!\360\010\000\024\025\340\004\032\230$\320\0364\260A\260T\270\021\330\004\032\230$\320\036@\300\001\330\010\014\210A\330\t\r\210Q\330\006\t\210\021\330\010\014\320\014$\240A\330\010\013\210=\230\003\2301\330\n\016\320\016#\2403\240a\240~\260Q\330\010\013\210=\230\003\2304\230q\330\n\021\220\021\330\006\n\320\n,\320,H\310\001\330\n\013\330\006\n\210!\330\n&\240a\240q\340\004\005\330\010\014\210J\220o\240Q\330\004\007\200t\2101\330\006\014\210J\220a\330\n\013\340\004\025\220Q\220a\330\010\036\230a\230t\2401\330\004\005\330\010\014\210J\220o\240Q\360\006\000\005\010\320\007\027\220w\230a\330\006\027\220q\320\030+\2504\250q\330\004\013\2101\200!\360\006\000\023\024\330 !\330\026\027\330\030\031\340\004\010\210\017\320\0274\260A\330\010\030\230\004\320\0341\260\021\260.\300\001\200!\360\\\001\000\005\006\3604\000\005\034\2301\330\004\034\230A\340\004\027\220}\240G\2501\360\010\000\005\010\320\007\030\230\004\230M\250\023\320,>\270b\300\001\330\006\021\320\021$\320$5\260Q\330\006\t\210\024\210Q\360\006\000\t\016\320\r*\250!\330\010\023\320\023&\240a\240z\260\023\260J\270a\340\006\030\320\030(\320(8\270\001\330\n\024\220N\240!\360\010\000\007\037\230o\320-=\270R\270q\330\006\t\320\t\037\230s\240(\250!\360\n\000\t$\2401\330\014\036\230b\240\001\330\014\031\230\021\330\020\021\330\020\023\2201\330\024\031\230\021\330\030 ""\320 0\260\001\330\030'\320'7\260r\270\032\3001\330\032\"\240!\330\010\021\220\033\320\0346\260a\330\014#\2401\330\010\017\210x\220w\230a\330\010\017\210y\230\007\230q\330\010\020\220\001\220\032\2301\230K\240q\360\010\000\t!\240\r\250R\250q\330\010\023\320\023)\250\022\2508\2601\360\014\000\007\037\230a\360\n\000\005\032\320\031,\320,>\270a\330\004\037\320\0372\3202F\300a\330\004\014\320\014\037\230z\250\021\250!\330\004\007\200q\330\006\017\210{\230!\330\006\020\220\016\230a\330\006\025\320\025)\320):\270!\330\n\030\230\010\240\001\330\006\t\210\035\220b\230\001\330\010\016\210j\230\001\320\031?\270r\300\021\330\006\026\320\026*\320*;\2701\330\n\030\230\010\240\001\330\006\t\210\036\220r\230\021\330\010\016\210j\230\001\320\031?\270r\300\021\360\010\000\007\036\230Q\230j\250\t\260\021\330\035\036\330\006\036\230a\230z\250\032\2601\330\036\037\330\006\020\220\001\330\n\030\230\010\240\001\240\021\330\013!\240\036\250q\330\006\032\230'\240\021\330\n\034\230A\330\016\034\230M\250\021\330\022'\240~\260\\\300\021\330\006\033\2307\240!\330\n\035\230Q\330\016\035\230]\250!\330\022(\250\016\260l\300!\330\016 \240\001\330\016!\240\021\340\006\t\210\021\330\010\017\320\017%\240S\250\r\260R\260q\330\010\021\220\033\320\0346\260a\330\014\032\230-\240r\250\021\330\010\013\2101\330\n\036\230g\240Q\240a\330\010\013\2101\330\n\037\230w\240a\240q\330\006\007\330\n \320 7\260q\330\t\037\230t\320#9\270\023\270A\360\006\000\007\020\210{\320\0324\260A\330\n!\240\021\330\006\r\210X\220W\230A\330\006\r\210Y\220g\230Q\330\006\016\210a\210z\230\021\230+\240Q\340\006\r\210Q\200!\340\004\013\2104\320\017(\250\003\2507\260!\200!\340\004\013\2104\320\017 \320 7\260q\330\010\014\210L\230\001\200!\330\004\013\2104\210{\230#\230U\240!\200!\340\004\013\2104\210\177\230a\200!\330\004\013\2104\210\177\230a\200!\340\004\013\2104\210q\200!\330\004\013\2104\210q\220\004\220A\200!\330\004\013\2104\210z\320\031;\270=\310\001\330\010\t\200!\330\004\013\2104\210z\320\0314\260M\300\021\300!\200!\330\004""\013\2104\210z\320\031/\250}\270A\270Q\200!\330\004\013\2104\210z\230\035\240m\2601\260I\270Q\200!\330 !\330\004\013\2105\220\003\2204\220q\200!\330 !\330\004\013\2105\220\004\220D\320\030)\250\024\250Q\200!\330!\"\330\004\013\2105\220\004\220D\320\030*\250$\250a\200!\360\010\000\017\020\330\022\023\330\021\022\330\023\024\330\031\032\330\031\032\330\035\036\3608\000\005\023\220,\230c\240\021\330\004\035\320\0350\260\001\330\010\024\220C\220{\240#\240]\260!\330\010\021\220\037\240\n\250!\330\010\021\320\021&\240j\260\003\2609\320\270a\330\n\032\230!\330\006\t\320\t\032\230\"\230A\330\010\016\210j\230\001\330\0142\260\"\260A\360\006\000\007\020\210q\220\016\230i\240}\260A\330\017\020\330\006\034\320\034.\250a\330\n\030\230\r\240Q\330\016\017\330\016\034\230A\330\016\034\230H\240B\240o\260Y\270b\300\007\300q\360\006\000\007\036\320\0350\260\001\330\n\031\230\035\240a\330\016\017\330\016\034\230A\330\016\034\230H\240A\240[\260\001\330\n\034\230A\330\n\035\230Y\240k\260\022\3203J\310!\330\006\016\320\016#\2401\200!\330\026-\320-I\310\021\340\004\007\200t\320\013\036\230c\240\021\330\006\007\340\004\025\220T\320\031+\2501\330\004\007\200\177\220c\230\021\330\006\007\340\004\022\320\022#\2401\330\010\t\330\010\t\330\010\014\210A\330\010\014\320\014\036\230a\200!\360\n\000\005\t\210\n\320\022,\250M\270\021\330\004\010\210\005\210T\320\021'\240w\250a\330\006\007\200q\210\002\210)\2201\220F\230&\240\001\330\004\010\320\010!\240\021\320\002 \240\001\360\020\000\005\t\210\r\220Q\330\004\010\320\010\030\230\001\200\001\330\014\r\330\020\021\330\022\023\330\002\017\210~\320\035-\250Q\330\002\021\320\021!\320!3\2601\340\002\016\210f\220A\330\002\027\220v\230Q\360\n\000\003\030\220q\330\004\005\360\006\000\003!\240\001\360\006\000\005\024\2203\220a\220{\240\"\240C\240q\320(<\270B\270a\360\006\000\005\037\230a\230~\250Q\250d\260%\3207G\300q\330\036(\250\002\250!\340\004\023\2203\220a\220{\240\"\240C\240q\250\001\330\004\035\230Z\240r\250\021\360\006\000\003\031\230\004\230A\230Z\240q\250\001\330\002\006\200c\210\025\210c\220\021\220)\2301\230A\230S\240\001\320!8\270\001\330\004\007\200t\2105\220\016\230c\240\021\330\006\034\230G\2401\240N\260!\2601\330\t\r\210U\220*\230C\230q\330\006\034\230G\2401\240N\260!\2601\330\t\r""\210U\220-\230s\240!\330\006\034\230G\2401\240N\260!\2601\330\t\r\210U\320\022&\240c\250\021\330\006\034\230G\2401\240N\260!\2601\330\t\r\210U\320\022\"\240#\240Q\330\006\034\230G\2401\240N\260!\2601\330\t\r\210U\220/\240\023\240A\330\006\034\230G\2401\240N\260!\2601\330\t\r\210U\320\022\"\240#\240Q\340\006\007\330\010\036\230g\240Q\240d\250!\2501\330\r\016\330\010\013\2102\210W\220A\330\n\020\220\n\230!\320\033A\300\022\3001\330\t\023\2201\220C\220t\2305\240\001\330\006\034\230G\2401\240N\260!\2601\330\t\023\2201\220C\220t\2305\240\001\330\006\034\230G\2401\240N\260!\2601\330\t\023\2201\220C\220v\230T\240\024\240U\320*@\300\003\3001\330\006\034\230G\2401\240N\260!\2601\330\t\023\2201\220C\220t\2305\240\001\330\006\034\230G\2401\240N\260!\2601\330\t\023\2201\220C\220t\2305\240\001\330\006\034\230G\2401\240N\260!\2601\360\006\000\007\010\330\010\036\230g\240Q\240d\250!\2501\330\r\016\340\002\030\230\007\230q\240\004\240A\240Q\360\006\000\003\022\220\022\2203\220a\220q\330\022\027\220s\230&\240\t\250\021\250!\330\022\025\220Z\230q\240\003\2401\340\002\t\210\036\320\027/\250q\200!\330\004\010\210\r\220Q\330\004\010\320\010\034\230A\200!\360\n\000\005\t\210\017\320\027-\250Q\330\010\014\210J\320\026+\250=\270\001\330\004\010\210\005\210T\320\021(\250\007\250q\330\006\007\200q\210\002\210)\2201\220F\230&\240\001\330\004\010\320\010\"\240!\200!\340\004\010\320\010\032\230!\330\004\010\320\010 \240\001\330\004\010\320\010 \240\001\240\024\240Q\330\004\010\320\010 \240\001\240\024\240Q\330\004\010\320\010 \240\001\200!\360\022\000\005\016\210Q\330\004\007\200t\2101\330\006\n\210$\210n\230D\320 6\260f\270A\330\010\016\210a\210v\320\025'\240z\260\021\260,\270e\3001\330\006\n\210$\210n\230D\320 6\260f\270A\330\010\016\210a\210v\320\025'\240z\260\021\330\014\030\230\005\230X\240[\260\001\340\004\007\200t\2101\330\006\014\210A\210T\320\021(\250\t\260\023\260A\260Q\330\004\007\200t\2101\330\006\014\210A\210T\320\021%\240Q\330\004\007\200t\2101\330\006\014\210A\210T\320\021\"\240!""\330\004\007\200t\2101\330\006\014\210A\210T\320\0210\260\001\340\004\007\200q\330\006\r\210T\220\035\230c\240\021\340\006\r\210T\220\035\230a\200!\340\004\005\330\006\n\210.\320\030-\250Q\250a\330\004\013\320\013\034\230A\330\006\n\320\n\035\230Q\230a\200!\360\n\000\005\t\320\010%\240Q\240d\250!\200!\340\004\013\210:\220Q\220d\320\032*\250!\330\004\013\2104\210~\320\0356\260a\200!\340\004\013\210:\220Q\220d\320\032*\250!\330\004\013\2104\210~\230Z\240q\250\001\200!\340\004\010\320\010%\240Q\240d\250!\340\004\010\210\005\210T\320\021&\240a\330\006\t\210\024\210Z\220q\230\003\2304\230q\330\010\t\360\006\000\007\n\210\022\2104\210t\2205\230\001\360\006\000\t\017\320\016!\240\021\330\014\023\2201\220D\230\001\340\006\t\210\022\2104\210t\2205\230\013\2404\240u\250M\270\024\270U\300!\330\010\016\320\016!\240\021\330\014\023\2201\220D\320\030E\300Q\300a\360\n\000\007\016\210R\210t\2204\220u\230A\330\023\027\220u\230A\330\023\027\220u\230A\330\010\016\210j\230\001\330\014\023\2201\220D\230\001\330\037 \240\001\200!\330\004\013\320\013\035\230R\230t\2401\200!\360\010\000\005\021\220\r\230R\230x\240|\2602\260X\270Q\330\004\005\330\010\032\230!\330\t\026\220b\230\004\230B\230h\240l\260\"\260H\270A\330\004\t\320\t&\240a\330\004\013\320\013\036\230a\230z\250\033\260J\270a\200\001\360\010\000\005\016\210T\320\0212\260$\3206P\320PT\320Te\320ei\360\000\000j\001C\002\360\000\000C\002G\002\360\000\000G\002d\002\360\000\000d\002h\002\360\000\000h\002{\002\360\000\000{\002\177\002\360\000\000\177\002@\003\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033+\2507\260%\260s\270$\320>V\320V]\320]b\320be\320ei\360\000\000j\001F\002\360\000\000F\002M\002\360\000\000M\002R\002\360\000\000R\002U\002\360\000\000U\002Y\002\360\000\000Y\002k\002\360\000\000k\002r\002\360\000\000r\002w\002\360\000\000w\002z\002\360\000\000z\002~\002\360\000\000~\002I\003\360\000\000I\003P\003\360\000\000P\003Q\003\330\004\007""\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601\260G\270;\300a\200\001\360\010\000\005\016\210T\320\021*\250$\320.F\300d\320J]\320]a\320az\320z~\360\000\000\177\001X\002\360\000\000X\002\\\002\360\000\000\\\002f\002\360\000\000f\002j\002\360\000\000j\002A\003\360\000\000A\003E\003\360\000\000E\003^\003\360\000\000^\003b\003\360\000\000b\003{\003\360\000\000{\003\177\003\360\000\000\177\003^\004\360\000\000^\004b\004\360\000\000b\004x\004\360\000\000x\004|\004\360\000\000|\004T\005\360\000\000T\005X\005\360\000\000X\005h\005\360\000\000h\005l\005\360\000\000l\005A\006\360\000\000A\006E\006\360\000\000E\006`\006\360\000\000`\006d\006\360\000\000d\006u\006\360\000\000u\006y\006\360\000\000y\006T\007\360\000\000T\007X\007\360\000\000X\007y\007\360\000\000y\007}\007\360\000\000}\007T\010\360\000\000T\010X\010\360\000\000X\010i\010\360\000\000i\010m\010\360\000\000m\010G\t\360\000\000G\tK\t\360\000\000K\tY\t\360\000\000Y\t]\t\360\000\000]\tk\t\360\000\000k\to\t\360\000\000o\t{\t\360\000\000{\t\177\t\360\000\000\177\tP\n\360\000\000P\nT\n\360\000\000T\nh\n\360\000\000h\nl\n\360\000\000l\nM\013\360\000\000M\013Q\013\360\000\000Q\013r\013\360\000\000r\013v\013\360\000\000v\013K\014\360\000\000K\014O\014\360\000\000O\014P\014\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\0333\2607\270%\270s\300$\320F]\320]d\320di\320il\320lp\360\000\000q\001C\002\360\000\000C\002J\002\360\000\000J\002O\002\360\000\000O\002R\002\360\000\000R\002V\002\360\000\000V\002n\002\360\000\000n\002u\002\360\000\000u\002z\002\360\000\000z\002}\002\360\000\000}\002A\003\360\000\000A\003Y\003\360\000\000Y\003`\003\360\000\000`\003e\003\360\000\000e\003h\003\360\000\000h\003l\003\360\000\000l\003u\003\360\000\000u\003|\003\360\000\000|\003A\004\360\000\000A\004D\004\360\000\000D\004H\004\360\000\000H\004^\004\360\000\000^\004e\004\360\000\000e\004j\004\360\000\000j\004m\004\360\000""\000m\004q\004\360\000\000q\004I\005\360\000\000I\005P\005\360\000\000P\005U\005\360\000\000U\005X\005\360\000\000X\005\\\005\360\000\000\\\005p\005\360\000\000p\005w\005\360\000\000w\005|\005\360\000\000|\005\177\005\360\000\000\177\005C\006\360\000\000C\006]\006\360\000\000]\006d\006\360\000\000d\006i\006\360\000\000i\006l\006\360\000\000l\006p\006\360\000\000p\006@\007\360\000\000@\007G\007\360\000\000G\007L\007\360\000\000L\007O\007\360\000\000O\007S\007\360\000\000S\007m\007\360\000\000m\007t\007\360\000\000t\007y\007\360\000\000y\007|\007\360\000\000|\007@\010\360\000\000@\010`\010\360\000\000`\010g\010\360\000\000g\010l\010\360\000\000l\010o\010\360\000\000o\010s\010\360\000\000s\010I\t\360\000\000I\tP\t\360\000\000P\tU\t\360\000\000U\tX\t\360\000\000X\t\\\t\360\000\000\\\tl\t\360\000\000l\ts\t\360\000\000s\tx\t\360\000\000x\t{\t\360\000\000{\t\177\t\360\000\000\177\tL\n\360\000\000L\nS\n\360\000\000S\nX\n\360\000\000X\n[\n\360\000\000[\n_\n\360\000\000_\nl\n\360\000\000l\ns\n\360\000\000s\nx\n\360\000\000x\n{\n\360\000\000{\n\177\n\360\000\000\177\nJ\013\360\000\000J\013Q\013\360\000\000Q\013V\013\360\000\000V\013Y\013\360\000\000Y\013]\013\360\000\000]\013m\013\360\000\000m\013t\013\360\000\000t\013y\013\360\000\000y\013|\013\360\000\000|\013@\014\360\000\000@\014S\014\360\000\000S\014Z\014\360\000\000Z\014_\014\360\000\000_\014b\014\360\000\000b\014f\014\360\000\000f\014F\r\360\000\000F\rM\r\360\000\000M\rR\r\360\000\000R\rU\r\360\000\000U\rY\r\360\000\000Y\ry\r\360\000\000y\r@\016\360\000\000@\016E\016\360\000\000E\016H\016\360\000\000H\016L\016\360\000\000L\016`\016\360\000\000`\016g\016\360\000\000g\016l\016\360\000\000l\016o\016\360\000\000o\016s\016\360\000\000s\016N\017\360\000\000N\017U\017\360\000\000U\017V\017\330\004\007\200q\330\010\017\320\0171\260\024\260Q\260g\270[\310\007\310q\340\010\017\320\0171\260\024\260Q\260g\270[\310\001\200\001\360\010\000\005\016\210T\320\021*\250$\320.F\300d\320Jc\320cg\320gx\320x|\360\000\000}\001I\002\360\000""\000I\002M\002\360\000\000M\002N\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\0333\2607\270%\270s\300$\320F]\320]d\320di\320il\320lp\360\000\000q\001I\002\360\000\000I\002P\002\360\000\000P\002U\002\360\000\000U\002X\002\360\000\000X\002\\\002\360\000\000\\\002l\002\360\000\000l\002s\002\360\000\000s\002x\002\360\000\000x\002{\002\360\000\000{\002\177\002\360\000\000\177\002J\003\360\000\000J\003Q\003\360\000\000Q\003V\003\360\000\000V\003Y\003\360\000\000Y\003]\003\360\000\000]\003q\003\360\000\000q\003x\003\360\000\000x\003y\003\330\004\007\200q\330\010\017\320\017,\250D\260\001\260\027\270\013\3007\310!\340\010\017\320\017,\250D\260\001\260\027\270\013\3001\200\001\360\010\000\005\016\210T\320\021*\250$\320.F\300d\320Jc\320cg\320gx\320x|\360\000\000}\001T\002\360\000\000T\002X\002\360\000\000X\002i\002\360\000\000i\002m\002\360\000\000m\002y\002\360\000\000y\002}\002\360\000\000}\002~\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\0333\2607\270%\270s\300$\320F]\320]d\320di\320il\320lp\360\000\000q\001I\002\360\000\000I\002P\002\360\000\000P\002U\002\360\000\000U\002X\002\360\000\000X\002\\\002\360\000\000\\\002l\002\360\000\000l\002s\002\360\000\000s\002x\002\360\000\000x\002{\002\360\000\000{\002\177\002\360\000\000\177\002U\003\360\000\000U\003\\\003\360\000\000\\\003a\003\360\000\000a\003d\003\360\000\000d\003h\003\360\000\000h\003x\003\360\000\000x\003\177\003\360\000\000\177\003D\004\360\000\000D\004G\004\360\000\000G\004K\004\360\000\000K\004V\004\360\000\000V\004]\004\360\000\000]\004b\004\360\000\000b\004e\004\360\000\000e\004i\004\360\000\000i\004}\004\360\000\000}\004D\005\360\000\000D\005E\005\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q\200\001\360\010\000\005\016\210T\220\027\230\004\230K\240t\320+H\310""\004\320Lf\320fj\320jy\320y}\360\000\000~\001L\002\360\000\000L\002P\002\360\000\000P\002_\002\360\000\000_\002c\002\360\000\000c\002z\002\360\000\000z\002~\002\360\000\000~\002^\003\360\000\000^\003b\003\360\000\000b\003z\003\360\000\000z\003~\003\360\000\000~\003V\004\360\000\000V\004Z\004\360\000\000Z\004o\004\360\000\000o\004s\004\360\000\000s\004K\005\360\000\000K\005O\005\360\000\000O\005n\005\360\000\000n\005r\005\360\000\000r\005Z\006\360\000\000Z\006^\006\360\000\000^\006_\006\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2306\240\027\250\005\250S\260\004\260J\270g\300U\310#\310T\320Qm\320mt\320ty\320y|\360\000\000}\001A\002\360\000\000A\002O\002\360\000\000O\002V\002\360\000\000V\002[\002\360\000\000[\002^\002\360\000\000^\002b\002\360\000\000b\002o\002\360\000\000o\002v\002\360\000\000v\002{\002\360\000\000{\002~\002\360\000\000~\002B\003\360\000\000B\003P\003\360\000\000P\003W\003\360\000\000W\003\\\003\360\000\000\\\003_\003\360\000\000_\003c\003\360\000\000c\003y\003\360\000\000y\003@\004\360\000\000@\004E\004\360\000\000E\004H\004\360\000\000H\004L\004\360\000\000L\004k\004\360\000\000k\004r\004\360\000\000r\004w\004\360\000\000w\004z\004\360\000\000z\004~\004\360\000\000~\004U\005\360\000\000U\005\\\005\360\000\000\\\005a\005\360\000\000a\005d\005\360\000\000d\005h\005\360\000\000h\005\177\005\360\000\000\177\005F\006\360\000\000F\006K\006\360\000\000K\006N\006\360\000\000N\006R\006\360\000\000R\006f\006\360\000\000f\006m\006\360\000\000m\006r\006\360\000\000r\006u\006\360\000\000u\006y\006\360\000\000y\006W\007\360\000\000W\007^\007\360\000\000^\007c\007\360\000\000c\007f\007\360\000\000f\007j\007\360\000\000j\007Q\010\360\000\000Q\010X\010\360\000\000X\010]\010\360\000\000]\010`\010\360\000\000`\010d\010\360\000\000d\010u\010\360\000\000u\010|\010\360\000\000|\010}\010\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!""\2607\270+\300Q\200\001\360\010\000\005\016\210T\320\021%\240T\320)B\300$\320F^\320^b\360\000\000c\001G\002\360\000\000G\002K\002\360\000\000K\002S\002\360\000\000S\002W\002\360\000\000W\002n\002\360\000\000n\002r\002\360\000\000r\002O\003\360\000\000O\003S\003\360\000\000S\003j\003\360\000\000j\003n\003\360\000\000n\003\177\003\360\000\000\177\003C\004\360\000\000C\004\\\004\360\000\000\\\004`\004\360\000\000`\004o\004\360\000\000o\004s\004\360\000\000s\004I\005\360\000\000I\005M\005\360\000\000M\005i\005\360\000\000i\005m\005\360\000\000m\005n\005\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\0333\2607\270%\270s\300$\320F]\320]d\320di\320il\320lp\360\000\000q\001T\002\360\000\000T\002[\002\360\000\000[\002`\002\360\000\000`\002c\002\360\000\000c\002g\002\360\000\000g\002n\002\360\000\000n\002u\002\360\000\000u\002z\002\360\000\000z\002}\002\360\000\000}\002A\003\360\000\000A\003W\003\360\000\000W\003^\003\360\000\000^\003c\003\360\000\000c\003f\003\360\000\000f\003j\003\360\000\000j\003F\004\360\000\000F\004M\004\360\000\000M\004R\004\360\000\000R\004U\004\360\000\000U\004Y\004\360\000\000Y\004o\004\360\000\000o\004v\004\360\000\000v\004{\004\360\000\000{\004~\004\360\000\000~\004B\005\360\000\000B\005R\005\360\000\000R\005Y\005\360\000\000Y\005^\005\360\000\000^\005a\005\360\000\000a\005e\005\360\000\000e\005}\005\360\000\000}\005D\006\360\000\000D\006I\006\360\000\000I\006L\006\360\000\000L\006P\006\360\000\000P\006^\006\360\000\000^\006e\006\360\000\000e\006j\006\360\000\000j\006m\006\360\000\000m\006q\006\360\000\000q\006F\007\360\000\000F\007M\007\360\000\000M\007R\007\360\000\000R\007U\007\360\000\000U\007Y\007\360\000\000Y\007t\007\360\000\000t\007{\007\360\000\000{\007@\010\360\000\000@\010C\010\360\000\000C\010G\010\360\000\000G\010V\010\360\000\000V\010]\010\360\000\000]\010^\010\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.""\250d\260!\2607\270+\300Q\200\001\360\010\000\005\016\210T\220\030\230\024\230X\240T\250\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\025\250c\260\024\260W\270G\3005\310\003\3104\320O_\320_f\320fg\330\004\007\200q\330\010\017\320\017,\250D\260\001\260\027\270\013\3007\310!\340\010\017\320\017,\250D\260\001\260\027\270\013\3001\200!\340\004\005\330\006\r\210T\220\036\230\177\250a\250q\330\004\013\320\013\034\230A\330\006\n\320\n\035\230Q\230e\2401\330\006\r\210Q\200\001\360\010\000\005\016\210T\320\021*\250$\250j\270\004\320\300\021\330\004\013\2104\210~\230_\250A\330\010\026\220k\240\021\240!\330\024\025\330\"#\200!\360\006\000\023\024\330 !\330\026\027\330\030\031\360&\000\005\013\210!\200!\360\006\000\027\030\330\030\031\360\034\000\005\013\210!\200\001\330\004)\250\021\250&\260\001\200!\340\004\010\320\010\032\230!\200!\240\001\240!""\200!\340\004\n\210!\200!\330\004\n\210!\240a\200!\340\004\007\320\007\031\230\031\240/\260\021\260$\260a\330\004\013\2104\210q\220\001\200!\360\006\000\023\024\330 !\330\026\027\330\030\031\340\004\010\210\017\320\027.\250a\330\010\030\230\004\230O\2501\250N\270!\330\004\013\2101\200!\360\006\000\005\t\210\017\320\027.\250a\330\010\025\220Q\220f\230L\250\001\330\010\014\210J\220n\240A\240[\3200F\300a\330\014\020\220\001\330\014\r\330\014\r\330\014\r\330\014\r\330\014\r\320\002&\240a\330\004\010\210\t\220\021\330\004\010\210\016\220a\200!\330\004\005\330\006\n\210(\220,\230a\230q\330\006\023\2201\330\004\013\320\013\034\230A\330\006\n\320\n\035\230Q\230a\200!\330\004\005\330\006\n\210(\220,\230a\230q\330\006\026\220a\330\004\013\320\013\034\230A\330\006\n\320\n\035\230Q\230a\200!\340\004\010\320\010\036\230a\230t\240>\260\021\200\001\330\004&\240a\240v\250Q\200\001\330\004.\250a\250v\260Q\200!\340\004\005\330\006\n\210.\320\030*\250!\330\n\026\220e\2308\240;\250k\270\021\330\004\013\320\013\034\230A\330\006\n\320\n\035\230Q\230a\200!\340\004\010\320\010!\240\021\240$\240n\260A\240q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220>\240\030\250\021\250!\330\004\007\200|\2207\230!\330\0100\260\001\3201B\300.\320PQ\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023#\2408\2501\250A\330\004\007\200|\2207\230!\330\0102\260!\3203F\300n\320TU\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2208\2308\2401\240A\330\004\007\200|\2207\230!\330\010*\250!\250;\260n\300A\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220:\230X\240Q\240a\330\004\007\200|\2207\230!\330\010,\250A\250]\270.\310\001\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023""\220;\230h\240a\240q\330\004\007\200|\2207\230!\330\010-\250Q\250n\270N\310!\330\004\013\2101\200!\340\004\010\320\010\037\320\037/\250q\200\001\330\004(\250\001\250\026\250q\200!\330\004\010\210\007\210q\220\004\220A\330\020\024\220A\330\020\024\220A\330\006\n\210%\210s\220!\330\010\t\330\n\r\210R\210s\220$\220a\330\014\023\2201\330\017\020\360\006\000\005\014\2101\200!\360\016\000\005\010\200t\2101\330\006\030\230\001\330\n\016\320\016!\240\024\240Q\340\006\t\210\024\210Q\330\010\017\210s\220!\220>\240\032\2503\250a\330\010\022\220.\240\001\340\010\021\220\034\230Q\330\006\024\220A\220R\220q\230\010\240\004\240F\250$\250a\330\006\021\220\027\230\001\230\021\330\006\030\320\030-\250T\3201G\300q\330\n\016\320\016!\240\024\320%:\270!\330\006\t\210\024\210T\220\021\330\010\014\320\014\037\230t\2401\330\014\036\230a\330\010\014\320\014&\240a\360\014\000\005\010\200t\320\013\037\230s\240$\240a\330\006\007\330\010\r\210_\230N\250!\330\016\031\230\021\330\010\016\210j\230\001\330\014\r\330'5\260Q\340\004\010\210\003\2105\220\004\220A\330\006\t\210\024\210U\220.\240\003\2401\330\010\030\230\001\230\025\230n\250A\330\013\017\210u\220J\230c\240\021\330\010\030\230\001\230\025\230a\330\013\017\210u\220M\240\023\240A\330\010\030\230\001\230\025\230a\330\013\017\210u\320\024(\250\003\2501\330\010\030\230\001\230\025\230a\330\013\017\210u\320\024$\240C\240q\330\010\030\230\001\230\025\230n\250A\330\013\017\210u\220O\2403\240a\330\010\030\230\001\230\025\230n\250A\330\013\025\220Q\220c\230\024\230U\240!\330\010\017\210t\320\023'\240w\250a\330\010\030\230\001\230\021\330\014\020\320\020#\240:\250Q\250a\250}\270E\300\021\330\013\025\220Q\220c\230\024\230U\240!\330\010\017\210t\320\023'\240w\250a\330\010\030\230\001\230\021\330\014\020\320\020#\240:\250Q\330\020\021\220\021\330\020\021\330\020\021\330\020\036\230a\330\020\036\230a\330\013\017\210u\320\024*\250#\250Q\330\010\030\230\001\230\025\230d\240!\330\013\025\220Q\220c\230\024\230U\240!\330\010\030\230\001\230\025\230d\320""\"9\270\021\270\"\270A\270Q\330\013\025\220Q\220c\230\024\230U\240!\330\010\030\230\001\230\025\230d\320\"8\270\001\270\022\2701\270A\340\004\031\320\031,\250C\250q\340\004\007\200q\330\006\030\230\007\230q\240\001\340\004\010\210\017\320\027.\250a\330\010\t\330\010\014\210O\2302\320\0351\260\021\330\010\014\210A\340\004\007\200t\2101\330\006\r\210T\320\0211\260\027\270\001\330\006\n\320\n)\250\033\260A\330\006\030\230\004\320\034;\320;K\3101\330\006\t\210\021\330\010\036\320\0363\2601\330\010\022\220.\240\001\330\010\017\210t\220:\320\0356\260b\3208I\310\021\330\014\025\220Q\330\010\013\2105\220\002\220!\330\n\020\220\n\230!\320\033A\300\022\3001\330\010\t\330\014\020\320\020/\320/A\300\021\330\010\t\330\014\020\320\020/\320/C\3001\330\010\032\230!\230:\320%;\2701\330\032\033\330\010\017\320\017\"\240!\330\014\033\230>\250\033\260A\260Q\330\014\036\230a\330\014\037\230q\330\004\013\2101\200!\340\026\027\360\014\000\005\010\200t\2101\330\006\036\230a\330\n\016\320\016'\240t\2501\340\006\t\210\024\210Q\330\010\017\210z\230\021\320\032*\250!\330\010\017\210s\220!\220>\240\032\2503\250a\330\010\022\220.\240\001\340\010\021\220\034\230Q\330\006\024\220A\220R\220q\230\010\240\004\240F\250$\250a\330\006\021\220\027\230\001\230\021\330\006\036\230a\330\n\016\320\016$\240A\330\016\022\220!\330\016\022\220!\330\016\017\360\006\000\007\n\210\024\210T\220\021\330\010\014\320\014%\240T\250\021\330\014$\240A\330\010\014\320\014,\250A\340\004\010\210\003\2105\220\004\220A\330\006\t\210\024\210U\220.\240\003\2401\330\010\036\230a\230u\240N\260!\330\013\017\210u\220J\230c\240\021\330\010\016\320\016!\240\021\330\014\r\340\013\017\210u\220M\240\023\240A\330\010\036\230a\230u\240A\330\013\017\210u\320\024$\240C\240q\330\010\036\230a\230u\240N\260!\330\013\017\210u\220O\2403\240a\330\010\017\210z\230\021\320\032*\250!\330\010\036\230a\230u\240N\260!\330\013\025\220Q\220c\230\024\230U\240!\330\010\016\320\016!\240\021\330\014\r\340\013\025\220Q\220c\230\024\230U\240!\330\010\016\320""\016!\240\021\330\014\r\340\013\025\220Q\220c\230\024\230U\240!\330\010\036\230a\230u\240D\320(?\270q\300\002\300!\3001\330\013\025\220Q\220c\230\024\230U\240!\330\010\036\230a\230u\240D\320(>\270a\270r\300\021\300!\340\004\037\320\0378\270\003\2701\340\004\007\200q\330\006\036\230g\240Q\240a\340\004\010\210\017\320\0274\260A\330\010\t\330\010\014\320\014!\240\021\330\r'\240q\330\010\014\210A\200!\360\006\000\023\024\330 !\330\026\027\330\030\031\340\004\007\200t\2101\330\006\030\230\001\330\004\007\200t\2101\330\006\032\230!\340\004\010\210\010\220\014\230A\230Q\360\n\000\005\021\220\001\330\004\007\200t\2101\330\006\t\210\034\220S\230\001\360\n\000\t\027\220d\230*\320$?\270}\310A\330\014\032\230!\340\013\017\210q\330\010\014\320\014&\240a\330\010\014\210O\2301\330\010\014\320\014)\250\021\330\006\007\330\010\013\2104\320\017$\240D\250\003\2501\250N\270*\300B\300a\330\n\016\210c\220\025\220i\230q\240\016\250a\330\014\017\210t\2204\320\0276\260a\330\020 \320 3\2601\330\016\017\330\014\027\220t\320\0336\260a\330\020\035\230Q\330\024\"\240(\250.\270\r\300Q\330\020\021\330\020\021\330\014\017\210q\330\016\027\220w\230a\230q\340\n\r\210T\320\0210\260\001\260\021\33012\330\014\027\220t\320\0336\260a\330\020 \320 1\260\021\330\014\017\210q\330\016\027\220w\230a\230q\340\r\021\220\021\330\n\016\320\016(\250\001\330\n\016\210o\230Q\330\n\016\320\016+\2501\330\n\016\320\016&\240a\330\n\016\320\0160\260\001\330\n\016\320\0160\260\001\330\t\r\320\r\"\240$\240c\250\021\250.\270\n\300#\300Q\330\006\n\210%\210~\230Q\330\010\014\320\014'\240q\330\014\031\230\021\330\020\036\230h\240n\260M\300\021\330\014\r\330\014\r\340\006\n\320\n%\240Q\330\n\032\320\032+\2501\330\004\013\2101\200!\360\006\000\027\030\330\030\031\360\006\000\005\010\200t\2101\330\006\030\230\001\330\004\007\200t\2101\330\006\032\230!\340\004\013\210:\220Q\320\026&\240a\340\004\007\200t\320\013 \240\004\240C\240q\250\016\260j\300\003\3001\330\006\n\210%\210~\230Q\330\010\014\320\014-\250Q\330\014$\240C\240q\330""\020\036\230a\330\020\036\230m\2501\330\020\036\230a\330\014\r\330\014\r\340\006\n\320\n+\2501\330\n\032\320\032+\2501\200!\340\004\007\200t\2104\210q\330\006\r\210Q\340\t\r\210Q\330\006\035\230T\240\021\330\006\032\230$\230a\330\006'\240t\2501\340\004\007\200t\2101\330\006\r\210Q\340\004\017\320\017-\320->\270a\330\004\007\200t\320\013 \240\003\2404\240q\330\006\r\210Q\360\010\000\005\014\2101\330\004\013\320\013\033\320\033+\2501\330\010\022\320\022(\250\001\200!\340\004\007\200t\2104\210q\330\006\r\210Q\340\t\r\210Q\330\006\t\210\024\210T\220\021\330\010\017\210q\360\n\000\007\020\320\017\037\230{\250!\330\n\013\330\n\016\210a\330\n\016\210a\330\n\016\210a\330\n\016\210a\330\n\016\210a\330\n\016\210j\320\0301\260\021\330\n\016\210a\330\n\016\210a\330\006\t\210\024\210Q\330\010\017\210q\340\006\021\220\033\230D\320 5\260Q\330\006\016\210k\230\021\200!\360\010\000\005\010\200t\320\013\036\230a\330\006\r\210Z\220q\230\001\330\013\017\320\017(\250\002\320*<\270A\330\013\017\320\0170\260\002\3202H\310\001\360\006\000\007\016\210Q\200!\340\004\007\200t\210<\220s\230$\230a\330\006\014\210J\220a\220q\340\006\r\210T\220\021\200!\330?@\360\022\000\005\010\200x\210s\220!\330\006\020\220\001\340\004\033\2301\330\004\010\210\n\220!\330\006\013\2109\220D\320\030.\250a\250q\340\006\t\210\024\210T\220\021\340\010\017\210t\320\023+\2507\260!\340\010\014\320\014!\240\021\240!\340\010\013\210:\220Q\220h\230a\330\n\021\220\032\2301\230H\240A\330\n\033\2301\340\n\016\320\016#\2407\250%\250q\330\016\021\220\021\320\022&\240j\260\003\2601\330\014\032\230,\240c\250\021\320*>\270a\340\n\033\320\033/\250|\2701\270A\340\010 \240\004\320$;\270;\300a\330\014\032\230!\340\010\014\320\014 \240\001\240\025\320&6\260a\340\010\017\210z\230\021\320\0320\260\001\340\010\031\230\024\320\035=\270Q\330\014 \320 8\270\004\270A\340\010 \240\001\340\010\014\320\014 \240\001\240\025\320&6\260a\360\n\000\005\010\200t\320\013'\240w\250a\330\006\n\320\n%\240Z\250q\260\001\200!\360\014\000\005\010\200x\210s""\220!\330\006\007\340\004\010\210\n\220!\330\006\014\210A\330\006\t\210\032\2201\220H\230A\330\010\016\210f\220A\330\010\013\2104\210z\230\021\230%\230q\330\n\020\220\t\230\021\320\032=\270V\3001\330\010\021\220\026\220q\340\006\t\210\032\2201\220H\230A\330\010\031\230\021\340\010\016\210l\230!\320\033M\310Q\330\033-\250R\250t\2601\260A\340\006\t\210\024\210S\220\001\330\010\014\210O\2308\2401\240A\340\010\014\320\014\035\230Q\230d\240(\250!\2501\200!\340\004\007\200x\210s\220!\330\006\007\330\004\n\210,\220a\330\010A\300\022\3001"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 597; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 52) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 597; i < 701; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 701; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 597; + for (Py_ssize_t i=0; i<104; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,1,2,3}; + int32_t const cint_constants_4[] = {24629412L,33257841L,61400015L,77316345L,122683391L,129653113L,146279351L,173793943L,238750788L}; + for (int i = 0; i < 13; i++) { + numbertab[i] = PyLong_FromLong((i < 4 ? cint_constants_1[i - 0] : cint_constants_4[i - 4])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<13; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 4; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 5; + unsigned int flags : 10; + unsigned int first_line : 11; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 427}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seen, __pyx_mstate->__pyx_n_u_sig, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_bundle_contexts, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 445}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seen, __pyx_mstate->__pyx_n_u_sig, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_setup_contexts, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 717}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arg}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 714}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_placeholder}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 796}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_si}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 797}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arg}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 799}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arg}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 805}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_arg}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1199}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_to_index, __pyx_mstate->__pyx_n_u_from_index, __pyx_mstate->__pyx_n_u_restriction_size, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_primary_restriction, __pyx_mstate->__pyx_n_u_residual_restriction}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_compute_whole_window_split, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_j_2_A_q_i_A_a_Q_A_HBoYb_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 86}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_4_U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 100}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_Rt1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 106}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_metrics_name, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 110}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_logging_name, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 123}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_receive, __pyx_mstate->__pyx_kp_b_iso88591__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 127}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_receive_batch, __pyx_mstate->__pyx_kp_b_iso88591__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 131}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_Qg_q_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 208}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_user_state_context, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_pane_info, __pyx_mstate->__pyx_n_u_dynamic_timer_tag, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_kw, __pyx_mstate->__pyx_n_u_state_spec, __pyx_mstate->__pyx_n_u_timer_spec}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_timer_callback, __pyx_mstate->__pyx_kp_b_iso88591_Q_t1_nD_6fA_av_z_e1_nD_6fA_av_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_Kt_H_Lffjjyy_L_L_P_P_____c_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 247}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_supports_batches, __pyx_mstate->__pyx_kp_b_iso88591_5_D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 251}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_supports_elements, __pyx_mstate->__pyx_kp_b_iso88591_5_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 255}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_requires_batches, __pyx_mstate->__pyx_kp_b_iso88591_5_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 312}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_restriction_provider, __pyx_mstate->__pyx_kp_b_iso88591_4_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 316}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_watermark_estimator_provider, __pyx_mstate->__pyx_kp_b_iso88591_4_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 320}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_is_unbounded_per_element, __pyx_mstate->__pyx_kp_b_iso88591_4_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 323}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 331}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method, __pyx_mstate->__pyx_n_u_param_ids, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_check_duplicate_dofn_params, __pyx_mstate->__pyx_kp_b_iso88591_1_4uF_Cz_T_s_c_AS_Ja_xv_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 340}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_validate_process, __pyx_mstate->__pyx_kp_b_iso88591_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 347}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_validate_process_batch, __pyx_mstate->__pyx_kp_b_iso88591_Qd_T_a_Zq_4q_4t5_1D_4t5_4uM_U_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 376}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method_wrapper, __pyx_mstate->__pyx_n_u_param}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_validate_bundle_method, __pyx_mstate->__pyx_kp_b_iso88591_U_s_j_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 385}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_validate_stateful_dofn, __pyx_mstate->__pyx_kp_b_iso88591_AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 389}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_is_splittable_dofn, __pyx_mstate->__pyx_kp_b_iso88591_4_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 393}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_restriction_coder, __pyx_mstate->__pyx_kp_b_iso88591_t_a_Zq_A_0_2H_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 405}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_is_stateful_dofn, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 409}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u__10, __pyx_mstate->__pyx_n_u_all_timer_specs}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_has_timers, __pyx_mstate->__pyx_kp_b_iso88591_a_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 414}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sig, __pyx_mstate->__pyx_n_u_d}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_has_bundle_finalization, __pyx_mstate->__pyx_kp_b_iso88591_q_A_A_A_s_Rs_a_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_B_F_b_c_G_G_K_K_S_S_W_W_n_n, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 488}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_signature, __pyx_mstate->__pyx_n_u_output_handler, __pyx_mstate->__pyx_n_u_context, __pyx_mstate->__pyx_n_u_side_inputs, __pyx_mstate->__pyx_n_u_input_args, __pyx_mstate->__pyx_n_u_input_kwargs, __pyx_mstate->__pyx_n_u_process_invocation, __pyx_mstate->__pyx_n_u_user_state_context, __pyx_mstate->__pyx_n_u_bundle_finalizer_param, __pyx_mstate->__pyx_n_u_use_per_window_invoker}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_create_invoker, __pyx_mstate->__pyx_kp_b_iso88591_8_c_0_C_j_9_MQ_t1_1_A_iq_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 546}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_watermark_estimator_state, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 573}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process_batch, __pyx_mstate->__pyx_kp_b_iso88591__12, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 593}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_setup, __pyx_mstate->__pyx_kp_b_iso88591_1_Q_E_Z_2_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 604}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_start_bundle, __pyx_mstate->__pyx_kp_b_iso88591_1_Q_E_Z_31_A_J_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 616}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_finish_bundle, __pyx_mstate->__pyx_kp_b_iso88591_Q_J_T_q_q_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 627}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_teardown, __pyx_mstate->__pyx_kp_b_iso88591_M_T_wa_q_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 637}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timer_spec, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_pane_info, __pyx_mstate->__pyx_n_u_dynamic_timer_tag}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_user_timer, __pyx_mstate->__pyx_kp_b_iso88591_a_QfL_JnA_0Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 650}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_estimator_state}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_create_watermark_estimato, __pyx_mstate->__pyx_kp_b_iso88591_4z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 654}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_restriction}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_split, __pyx_mstate->__pyx_kp_b_iso88591_4z_m1IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 657}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_initial_restriction, __pyx_mstate->__pyx_kp_b_iso88591_4z_4M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 660}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_restriction}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_create_tracker, __pyx_mstate->__pyx_kp_b_iso88591_4z_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_FdJccggxx_I_I_M_M_N_G1F_a_vWE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 676}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_watermark_estimator_state, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process, __pyx_mstate->__pyx_kp_b_iso88591_a_O1N_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 688}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_watermark_estimator_state, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process_batch, __pyx_mstate->__pyx_kp_b_iso88591_4A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_FdJccggxx_T_T_X_X_i_i_m_m_y_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 700}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_method, __pyx_mstate->__pyx_n_u_input_args, __pyx_mstate->__pyx_n_u_input_kwargs, __pyx_mstate->__pyx_n_u_arg_names, __pyx_mstate->__pyx_n_u_default_arg_values, __pyx_mstate->__pyx_n_u_ArgPlaceholder, __pyx_mstate->__pyx_n_u_args_to_pick, __pyx_mstate->__pyx_n_u_args_with_placeholders, __pyx_mstate->__pyx_n_u_remaining_args_iter, __pyx_mstate->__pyx_n_u_a_2, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_placeholders, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_get_arg_placeholders, __pyx_mstate->__pyx_kp_b_iso88591_Q_31_fA_vQ_q_3a_Cq_Ba_a_Qd_7Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 844}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_watermark_estimator_state, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process, __pyx_mstate->__pyx_kp_b_iso88591_t1_t1_AQ_t1_S_d_A_q_a_O1_4_D_1N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 916}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs, __pyx_mstate->__pyx_n_u_w}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process_batch, __pyx_mstate->__pyx_kp_b_iso88591_t1_t1_Q_a_t_Cq_j_1_Q_Q_Cq_a_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 943}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_additional_kwargs, __pyx_mstate->__pyx_n_u_window_index, __pyx_mstate->__pyx_n_u_restriction_tracker, __pyx_mstate->__pyx_n_u_watermark_estimator, __pyx_mstate->__pyx_n_u_restriction_tracker_param, __pyx_mstate->__pyx_n_u_watermark_param}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_should_process_window_for_sdf, __pyx_mstate->__pyx_kp_b_iso88591_4AT_A_Q_A_1_3a_Q_4q_H_aq_JoQ_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 21, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 980}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs, __pyx_mstate->__pyx_n_u_args_for_process, __pyx_mstate->__pyx_n_u_kwargs_for_process, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_side_inputs, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_unused_value, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_deferred_status, __pyx_mstate->__pyx_n_u_deferred_restriction, __pyx_mstate->__pyx_n_u_deferred_timestamp, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_current_watermark, __pyx_mstate->__pyx_n_u_estimator_state, __pyx_mstate->__pyx_n_u_residual_value, __pyx_mstate->__pyx_n_u_si}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process_per_window, __pyx_mstate->__pyx_kp_b_iso88591_t1_Q_Q_s_3a_Q_ARq_F_a_T1Gq_T_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1083}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch, __pyx_mstate->__pyx_n_u_additional_args, __pyx_mstate->__pyx_n_u_additional_kwargs, __pyx_mstate->__pyx_n_u_args_for_process_batch, __pyx_mstate->__pyx_n_u_kwargs_for_process_batch, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_side_inputs, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_si}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_process_batch_per_window, __pyx_mstate->__pyx_kp_b_iso88591_t1_a_t1_Q_z_s_3a_Q_ARq_F_a_a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 30, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1153}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fraction, __pyx_mstate->__pyx_n_u_window_index, __pyx_mstate->__pyx_n_u_stop_window_index, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_watermark_estimator_state, __pyx_mstate->__pyx_n_u_restriction_provider, __pyx_mstate->__pyx_n_u_restriction_tracker, __pyx_mstate->__pyx_n_u_watermark_estimator, __pyx_mstate->__pyx_n_u_compute_whole_window_split, __pyx_mstate->__pyx_n_u_compute_whole_window_split, __pyx_mstate->__pyx_n_u_primary_restrictions, __pyx_mstate->__pyx_n_u_residual_restrictions, __pyx_mstate->__pyx_n_u_window_observing, __pyx_mstate->__pyx_n_u_progress, __pyx_mstate->__pyx_n_u_RestrictionProgress, __pyx_mstate->__pyx_n_u_scaled_progress, __pyx_mstate->__pyx_n_u_fraction_of_remainder, __pyx_mstate->__pyx_n_u_new_stop_window_index, __pyx_mstate->__pyx_n_u_primary, __pyx_mstate->__pyx_n_u_residual, __pyx_mstate->__pyx_n_u_current_watermark, __pyx_mstate->__pyx_n_u_current_estimator_state, __pyx_mstate->__pyx_n_u_split, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_primary_size, __pyx_mstate->__pyx_n_u_residual_size, __pyx_mstate->__pyx_n_u_primary_split_value, __pyx_mstate->__pyx_n_u_residual_split_value, __pyx_mstate->__pyx_n_u_windows}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_try_split_2, __pyx_mstate->__pyx_kp_b_iso88591_4_1_A_G1_M_b_5Q_Q_az_Ja_8_N_o_R, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1336}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_residuals, __pyx_mstate->__pyx_n_u_primaries}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_t4q_Q_Q_T_q_a_a_a_a_a_j_1_a_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1364}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_progress, __pyx_mstate->__pyx_n_u_window_index, __pyx_mstate->__pyx_n_u_stop_window_index, __pyx_mstate->__pyx_n_u_completed, __pyx_mstate->__pyx_n_u_remaining, __pyx_mstate->__pyx_n_u_RestrictionProgress}; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_scale_progress, __pyx_mstate->__pyx_kp_b_iso88591_Rx_2XQ_b_Bhl_HA_a_az_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1375}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_current_window_index, __pyx_mstate->__pyx_n_u_stop_window_index, __pyx_mstate->__pyx_n_u_threadsafe_restriction_tracker, __pyx_mstate->__pyx_n_u_progress}; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_t4q_Q_Q_T_a_t1_t1_Q_a_t_4q_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_FdJ_aazz_X_X_f_f_j_j_A_A_E_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1495}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_T_aq_A_Qe1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1503}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc_info, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_output_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_maybe_sample_exception, __pyx_mstate->__pyx_kp_b_iso88591_I_t_c_T_1_c_1_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1519}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch, __pyx_mstate->__pyx_n_u_exn}; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_process_batch, __pyx_mstate->__pyx_kp_b_iso88591_Qa_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1526}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_estimator_state, __pyx_mstate->__pyx_n_u__10}; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_process_with_sized_restriction, __pyx_mstate->__pyx_kp_b_iso88591_Z_t_4__A_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1534}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction}; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_Qd_4_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1539}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_Qd_4_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1544}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timer_spec, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_window, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_pane_info, __pyx_mstate->__pyx_n_u_dynamic_timer_tag, __pyx_mstate->__pyx_n_u_exn}; + __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_process_user_timer, __pyx_mstate->__pyx_kp_b_iso88591_e8_k_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1552}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_bundle_method, __pyx_mstate->__pyx_n_u_exn}; + __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_bundle_method, __pyx_mstate->__pyx_kp_b_iso88591_aq_1_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1559}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lifecycle_method, __pyx_mstate->__pyx_n_u_exn}; + __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_invoke_lifecycle_method, __pyx_mstate->__pyx_kp_b_iso88591_aq_a_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1566}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_setup, __pyx_mstate->__pyx_kp_b_iso88591_nA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1570}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1574}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1578}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_teardown, __pyx_mstate->__pyx_kp_b_iso88591_nA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1582}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_finalize, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1586}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exn, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_step_annotation, __pyx_mstate->__pyx_n_u_new_exn, __pyx_mstate->__pyx_n_u_exc_info, __pyx_mstate->__pyx_n_u__10, __pyx_mstate->__pyx_n_u_tb}; + __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_reraise_augmented, __pyx_mstate->__pyx_kp_b_iso88591_31_wau_4t1_A_b_A_AT_U_3b_U_1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_j_LDPddhhvvz_G_G_K_K_L_G1F_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1613}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_input_element, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_watermark_estimator}; + __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_handle_process_outputs, __pyx_mstate->__pyx_kp_b_iso88591_AB, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1618}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_input_element, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_watermark_estimator}; + __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_handle_process_batch_outputs, __pyx_mstate->__pyx_kp_b_iso88591_AB, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1657}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_input_element, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_watermark_estimator}; + __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_handle_process_outputs, __pyx_mstate->__pyx_kp_b_iso88591_AB_xs_1_9D_aq_T_Q_A_6a_Qha_1HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1710}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_input_batch, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_watermark_estimator}; + __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_handle_process_batch_outputs, __pyx_mstate->__pyx_kp_b_iso88591_xs_1_9D_aq_T_t_7_Qha_1HA_1_7_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1816}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_results}; + __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_start_bundle_outputs, __pyx_mstate->__pyx_kp_b_iso88591_xs_a_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1823}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_finish_bundle_outputs, __pyx_mstate->__pyx_kp_b_iso88591_xs_A_1HA_fA_4z_q_V1_q_1HA_l_MQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_2_6PPTTeei_j_C_C_G_G_d_d_h_h, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1856}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1860}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_kp_b_iso88591_t_s_a_Jaq_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1867}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_existing_windows, __pyx_mstate->__pyx_kp_b_iso88591_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1877}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counter_factory_2}; + __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1881}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_aggregator}; + __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_counter_for, __pyx_mstate->__pyx_kp_b_iso88591_4_7q_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1896}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_common_py, __pyx_mstate->__pyx_n_u_set_element, __pyx_mstate->__pyx_kp_b_iso88591__14, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_XT_G1F_a_vWE_Q_q_t7_c_WG5_4O, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Receiver, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MethodWrapper, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DoFnSignature, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DoFnInvoker, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SimpleInvoker, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_PerWindowInvoker, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DoFnRunner, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_OutputHandler, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__OutputHandler, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DoFnContext, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* pyfrozenset_new (used by PySetContains) */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000) +#if CYTHON_COMPILING_IN_LIMITED_API + || __Pyx_get_runtime_version() >= 0x030A0000 +#endif + ) + return result; + { + Py_ssize_t size = __Pyx_PySet_GET_SIZE(result); + if (likely(size > 0)) + return result; +#if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) { + Py_DECREF(result); + return NULL; + } +#endif + } + Py_DECREF(result); +#endif + } + return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type); +} + +/* PySetContains */ +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* GetException (used by pep479) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectCall2Args (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* SliceTupleAndList */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + *_length = stop - start; + *_start = start; + *_stop = stop; +} +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + Py_ssize_t length = PyTuple_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length); +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice_locked( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + Py_ssize_t length = PyList_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (length <= 0) { + return PyList_New(0); + } + return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length); +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(src); + result = __Pyx_PyList_GetSlice_locked(src, start, stop); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +#endif // CYTHON_COMPILING_IN_CPYTHON + +/* IterNextPlain (used by IterNext) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* IterNext */ +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(defval); + return defval; + } + if (defval) { + Py_INCREF(defval); + return defval; + } + __Pyx_PyErr_SetNone(PyExc_StopIteration); + return NULL; +} +static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { + __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator)); + PyErr_Format(PyExc_TypeError, + __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name); + __Pyx_DECREF_TypeName(iterator_type_name); +} +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { + PyObject* next; +#if !CYTHON_COMPILING_IN_LIMITED_API + iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc); + if (likely(iternext)) { + next = iternext(iterator); + if (likely(next)) + return next; + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + if (unlikely(iternext == &_PyObject_NextNotImplemented)) + return NULL; + #endif + } else if (CYTHON_USE_TYPE_SLOTS) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else +#endif + if (unlikely(!PyIter_Check(iterator))) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else { + next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator); + if (likely(next)) + return next; + } + return __Pyx_PyIter_Next2Default(defval); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + calculate_long: + { + long x; + x = a - b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla - llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) - (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace); +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* pybuiltin_invalid (used by pyint_simplify) */ +static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + if (argname) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", + argname, type_name, obj_type_name + ); + } else { + PyErr_Format(PyExc_TypeError, + "Expected %.200s, got " __Pyx_FMT_TYPENAME, + type_name, obj_type_name + ); + } + __Pyx_DECREF_TypeName(obj_type_name); +} + +/* pyint_simplify */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { + PyObject *number = *number_var; + if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { + return 0; + } + PyObject *int_object; + if (likely(PyNumber_Check(number))) { + int_object = PyNumber_Long(number); + if (unlikely(!int_object)) goto bad; + } else { + __Pyx_PyBuiltin_Invalid(number, "int", argname); + goto bad; + } + *number_var = int_object; + Py_DECREF(number); + return 0; +bad: + *number_var = NULL; + Py_DECREF(number); + return -1; +} + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallNextTpTraverse */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + traverseproc tp_traverse = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_traverse) + return tp_traverse(obj, v, a); + return 0; +} + +/* CallNextTpClear */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + inquiry tp_clear = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_clear) + tp_clear(obj); +} + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* GetNameInClass */ +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + PyObject *dict; + assert(PyType_Check(nmspace)); +#if CYTHON_USE_TYPE_SLOTS + dict = ((PyTypeObject*)nmspace)->tp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* GetRuntimeVersion */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +void __Pyx_init_runtime_version(void) { + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* ReturnWithStopIteration (used by CoroutineBase) */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase (used by Generator) */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; +#endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/runners/common.cp314-win_amd64.pyd b/sdks/python/apache_beam/runners/common.cp314-win_amd64.pyd new file mode 100644 index 000000000000..3f3db3475e36 Binary files /dev/null and b/sdks/python/apache_beam/runners/common.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/runners/worker/logger.c b/sdks/python/apache_beam/runners/worker/logger.c new file mode 100644 index 000000000000..34d6125a13bd --- /dev/null +++ b/sdks/python/apache_beam/runners/worker/logger.c @@ -0,0 +1,13841 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "name": "apache_beam.runners.worker.logger", + "sources": [ + "apache_beam/runners/worker/logger.py" + ] + }, + "module_name": "apache_beam.runners.worker.logger" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__runners__worker__logger +#define __PYX_HAVE_API__apache_beam__runners__worker__logger +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/runners/worker/logger.py", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_defaults; +struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext; + +/* "apache_beam/runners/worker/logger.py":164 + * + * + * def initialize( # <<<<<<<<<<<<<< + * job_id: str, + * worker_id: str, +*/ +struct __pyx_defaults { + PyObject_HEAD + PyObject *arg0; +}; + + +/* "apache_beam/runners/worker/logger.py":56 + * + * + * @contextlib.contextmanager # <<<<<<<<<<<<<< + * def PerThreadLoggingContext(**kwargs: Any) -> Iterator[None]: + * """A context manager to add per thread attributes.""" +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext { + PyObject_HEAD + PyObject *__pyx_v_kwargs; + PyObject *__pyx_v_stack; +}; + +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* CallUnboundCMethod1.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* KeywordStringCheck.proto */ +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(const char* function_name, PyObject *kw); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* ListAppend.proto (used by append) */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallMethod0.proto (used by pop) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* pop.proto */ +static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L); +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE +static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L); +#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\ + __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L)) +#else +#define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L) +#define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* pyint_simplify.proto */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto (used by CIntToPy) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* IterNextPlain.proto (used by CoroutineBase) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "apache_beam.runners.worker.logger" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.runners.worker.logger" +extern int __pyx_module_is_main_apache_beam__runners__worker__logger; +int __pyx_module_is_main_apache_beam__runners__worker__logger = 0; + +/* Implementation of "apache_beam.runners.worker.logger" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_super; +/* #### Code section: string_decls ### */ +static const char __pyx_k_Python_worker_logging[] = "Python worker logging."; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_2get_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_PerThreadLoggingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_job_id, PyObject *__pyx_v_worker_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_2format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_record); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_5__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_3initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_job_id, PyObject *__pyx_v_worker_id, PyObject *__pyx_v_log_path, PyObject *__pyx_v_log_level); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults; + PyObject *__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type__update; + PyObject *__pyx_codeobj_tab[6]; + PyObject *__pyx_string_tab[136]; + PyObject *__pyx_number_tab[1]; +/* #### Code section: module_state_contents ### */ + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *__pyx_freelist_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext[8]; +int __pyx_freecount_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext; +#endif +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_A_JSON_formatter_class_as_expect __pyx_string_tab[1] +#define __pyx_kp_u_Dict_str_Any __pyx_string_tab[2] +#define __pyx_kp_u_Iterator_None __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u__2 __pyx_string_tab[5] +#define __pyx_kp_u__3 __pyx_string_tab[6] +#define __pyx_kp_u__4 __pyx_string_tab[7] +#define __pyx_kp_u__5 __pyx_string_tab[8] +#define __pyx_kp_u_add_note __pyx_string_tab[9] +#define __pyx_kp_u_apache_beam_runners_worker_logge_2 __pyx_string_tab[10] +#define __pyx_kp_u_disable __pyx_string_tab[11] +#define __pyx_kp_u_enable __pyx_string_tab[12] +#define __pyx_kp_u_gc __pyx_string_tab[13] +#define __pyx_kp_u_isenabled __pyx_string_tab[14] +#define __pyx_kp_u_logging_LogRecord __pyx_string_tab[15] +#define __pyx_kp_u_with_args __pyx_string_tab[16] +#define __pyx_n_u_Any __pyx_string_tab[17] +#define __pyx_n_u_Dict __pyx_string_tab[18] +#define __pyx_n_u_FileHandler __pyx_string_tab[19] +#define __pyx_n_u_Formatter __pyx_string_tab[20] +#define __pyx_n_u_INFO __pyx_string_tab[21] +#define __pyx_n_u_Iterator __pyx_string_tab[22] +#define __pyx_n_u_JsonLogFormatter __pyx_string_tab[23] +#define __pyx_n_u_JsonLogFormatter___init __pyx_string_tab[24] +#define __pyx_n_u_JsonLogFormatter_format __pyx_string_tab[25] +#define __pyx_n_u_List __pyx_string_tab[26] +#define __pyx_n_u_None __pyx_string_tab[27] +#define __pyx_n_u_PerThreadLoggingContext __pyx_string_tab[28] +#define __pyx_n_u_PerThreadWorkerData __pyx_string_tab[29] +#define __pyx_n_u_PerThreadWorkerData___init __pyx_string_tab[30] +#define __pyx_n_u_PerThreadWorkerData_get_data __pyx_string_tab[31] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[32] +#define __pyx_n_u_WARN __pyx_string_tab[33] +#define __pyx_n_u_WARNING __pyx_string_tab[34] +#define __pyx_n_u_addHandler __pyx_string_tab[35] +#define __pyx_n_u_all_data __pyx_string_tab[36] +#define __pyx_n_u_apache_beam_runners_worker __pyx_string_tab[37] +#define __pyx_n_u_apache_beam_runners_worker_logge __pyx_string_tab[38] +#define __pyx_n_u_append __pyx_string_tab[39] +#define __pyx_n_u_args __pyx_string_tab[40] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[41] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[42] +#define __pyx_n_u_close __pyx_string_tab[43] +#define __pyx_n_u_contextlib __pyx_string_tab[44] +#define __pyx_n_u_contextmanager __pyx_string_tab[45] +#define __pyx_n_u_created __pyx_string_tab[46] +#define __pyx_n_u_current_state __pyx_string_tab[47] +#define __pyx_n_u_data __pyx_string_tab[48] +#define __pyx_n_u_datum __pyx_string_tab[49] +#define __pyx_n_u_doc __pyx_string_tab[50] +#define __pyx_n_u_dumps __pyx_string_tab[51] +#define __pyx_n_u_exc_info __pyx_string_tab[52] +#define __pyx_n_u_exception __pyx_string_tab[53] +#define __pyx_n_u_file_handler __pyx_string_tab[54] +#define __pyx_n_u_filename __pyx_string_tab[55] +#define __pyx_n_u_format __pyx_string_tab[56] +#define __pyx_n_u_format_exception __pyx_string_tab[57] +#define __pyx_n_u_func __pyx_string_tab[58] +#define __pyx_n_u_funcName __pyx_string_tab[59] +#define __pyx_n_u_getLogger __pyx_string_tab[60] +#define __pyx_n_u_get_current_tracker __pyx_string_tab[61] +#define __pyx_n_u_get_data __pyx_string_tab[62] +#define __pyx_n_u_init __pyx_string_tab[63] +#define __pyx_n_u_initialize __pyx_string_tab[64] +#define __pyx_n_u_int __pyx_string_tab[65] +#define __pyx_n_u_is_coroutine __pyx_string_tab[66] +#define __pyx_n_u_items __pyx_string_tab[67] +#define __pyx_n_u_job __pyx_string_tab[68] +#define __pyx_n_u_job_id __pyx_string_tab[69] +#define __pyx_n_u_json __pyx_string_tab[70] +#define __pyx_n_u_kwargs __pyx_string_tab[71] +#define __pyx_n_u_levelname __pyx_string_tab[72] +#define __pyx_n_u_local __pyx_string_tab[73] +#define __pyx_n_u_log_level __pyx_string_tab[74] +#define __pyx_n_u_log_path __pyx_string_tab[75] +#define __pyx_n_u_logger __pyx_string_tab[76] +#define __pyx_n_u_logging __pyx_string_tab[77] +#define __pyx_n_u_logging_name __pyx_string_tab[78] +#define __pyx_n_u_main __pyx_string_tab[79] +#define __pyx_n_u_message __pyx_string_tab[80] +#define __pyx_n_u_metaclass __pyx_string_tab[81] +#define __pyx_n_u_module __pyx_string_tab[82] +#define __pyx_n_u_mro_entries __pyx_string_tab[83] +#define __pyx_n_u_msecs __pyx_string_tab[84] +#define __pyx_n_u_msg __pyx_string_tab[85] +#define __pyx_n_u_name __pyx_string_tab[86] +#define __pyx_n_u_name_2 __pyx_string_tab[87] +#define __pyx_n_u_name_context __pyx_string_tab[88] +#define __pyx_n_u_nanos __pyx_string_tab[89] +#define __pyx_n_u_next __pyx_string_tab[90] +#define __pyx_n_u_output __pyx_string_tab[91] +#define __pyx_n_u_per_thread_worker_data __pyx_string_tab[92] +#define __pyx_n_u_pop __pyx_string_tab[93] +#define __pyx_n_u_prepare __pyx_string_tab[94] +#define __pyx_n_u_process __pyx_string_tab[95] +#define __pyx_n_u_qualname __pyx_string_tab[96] +#define __pyx_n_u_record __pyx_string_tab[97] +#define __pyx_n_u_record_msg __pyx_string_tab[98] +#define __pyx_n_u_return __pyx_string_tab[99] +#define __pyx_n_u_seconds __pyx_string_tab[100] +#define __pyx_n_u_self __pyx_string_tab[101] +#define __pyx_n_u_send __pyx_string_tab[102] +#define __pyx_n_u_setFormatter __pyx_string_tab[103] +#define __pyx_n_u_setLevel __pyx_string_tab[104] +#define __pyx_n_u_set_name __pyx_string_tab[105] +#define __pyx_n_u_setdefault __pyx_string_tab[106] +#define __pyx_n_u_severity __pyx_string_tab[107] +#define __pyx_n_u_stack __pyx_string_tab[108] +#define __pyx_n_u_stage __pyx_string_tab[109] +#define __pyx_n_u_stage_name __pyx_string_tab[110] +#define __pyx_n_u_statesampler __pyx_string_tab[111] +#define __pyx_n_u_step __pyx_string_tab[112] +#define __pyx_n_u_str __pyx_string_tab[113] +#define __pyx_n_u_super __pyx_string_tab[114] +#define __pyx_n_u_test __pyx_string_tab[115] +#define __pyx_n_u_thread __pyx_string_tab[116] +#define __pyx_n_u_threading __pyx_string_tab[117] +#define __pyx_n_u_throw __pyx_string_tab[118] +#define __pyx_n_u_timestamp __pyx_string_tab[119] +#define __pyx_n_u_traceback __pyx_string_tab[120] +#define __pyx_n_u_tracker __pyx_string_tab[121] +#define __pyx_n_u_typing __pyx_string_tab[122] +#define __pyx_n_u_update __pyx_string_tab[123] +#define __pyx_n_u_value __pyx_string_tab[124] +#define __pyx_n_u_values __pyx_string_tab[125] +#define __pyx_n_u_work __pyx_string_tab[126] +#define __pyx_n_u_work_item_id __pyx_string_tab[127] +#define __pyx_n_u_worker __pyx_string_tab[128] +#define __pyx_n_u_worker_id __pyx_string_tab[129] +#define __pyx_kp_b_iso88591_1_F_Q_1_3av_AV7_A_1_nF_S_q_AV1 __pyx_string_tab[130] +#define __pyx_kp_b_iso88591_9A_q __pyx_string_tab[131] +#define __pyx_kp_b_iso88591_WJa_AQ_m1_AXQ_2_2Yaq __pyx_string_tab[132] +#define __pyx_kp_b_iso88591_XQ_9A_Q __pyx_string_tab[133] +#define __pyx_kp_b_iso88591__6 __pyx_string_tab[134] +#define __pyx_kp_b_iso88591_q_Q_gQa_1 __pyx_string_tab[135] +#define __pyx_int_1000000 __pyx_number_tab[0] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext); + for (int i=0; i<6; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<136; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext); + for (int i=0; i<6; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<136; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/runners/worker/logger.py":40 + * # work_item_id, step_name, stage_name. + * class _PerThreadWorkerData(threading.local): + * def __init__(self) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * # in the list, as going up and down all the way to zero incurs several +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 40, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 40, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 40, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 40, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.logger._PerThreadWorkerData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData___init__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/logger.py":41 + * class _PerThreadWorkerData(threading.local): + * def __init__(self) -> None: + * super().__init__() # <<<<<<<<<<<<<< + * # in the list, as going up and down all the way to zero incurs several + * # reallocations. +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_5) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(0, 41, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":44 + * # in the list, as going up and down all the way to zero incurs several + * # reallocations. + * self.stack: List[Dict[str, Any]] = [] # <<<<<<<<<<<<<< + * + * def get_data(self) -> Dict[str, Any]: +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_stack, __pyx_t_1) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":40 + * # work_item_id, step_name, stage_name. + * class _PerThreadWorkerData(threading.local): + * def __init__(self) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * # in the list, as going up and down all the way to zero incurs several +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.logger._PerThreadWorkerData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/logger.py":46 + * self.stack: List[Dict[str, Any]] = [] + * + * def get_data(self) -> Dict[str, Any]: # <<<<<<<<<<<<<< + * all_data = {} + * for datum in self.stack: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_3get_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_3get_data = {"get_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_3get_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_3get_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 46, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 46, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_data", 0) < (0)) __PYX_ERR(0, 46, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_data", 1, 1, 1, i); __PYX_ERR(0, 46, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 46, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.logger._PerThreadWorkerData.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_2get_data(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_2get_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_all_data = NULL; + PyObject *__pyx_v_datum = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_data", 0); + + /* "apache_beam/runners/worker/logger.py":47 + * + * def get_data(self) -> Dict[str, Any]: + * all_data = {} # <<<<<<<<<<<<<< + * for datum in self.stack: + * all_data.update(datum) +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_all_data = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":48 + * def get_data(self) -> Dict[str, Any]: + * all_data = {} + * for datum in self.stack: # <<<<<<<<<<<<<< + * all_data.update(datum) + * return all_data +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 48, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 48, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_datum, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":49 + * all_data = {} + * for datum in self.stack: + * all_data.update(datum) # <<<<<<<<<<<<<< + * return all_data + * +*/ + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type__update, __pyx_v_all_data, __pyx_v_datum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":48 + * def get_data(self) -> Dict[str, Any]: + * all_data = {} + * for datum in self.stack: # <<<<<<<<<<<<<< + * all_data.update(datum) + * return all_data +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":50 + * for datum in self.stack: + * all_data.update(datum) + * return all_data # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_all_data); + __pyx_r = __pyx_v_all_data; + goto __pyx_L0; + + /* "apache_beam/runners/worker/logger.py":46 + * self.stack: List[Dict[str, Any]] = [] + * + * def get_data(self) -> Dict[str, Any]: # <<<<<<<<<<<<<< + * all_data = {} + * for datum in self.stack: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.logger._PerThreadWorkerData.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_all_data); + __Pyx_XDECREF(__pyx_v_datum); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6worker_6logger_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/worker/logger.py":56 + * + * + * @contextlib.contextmanager # <<<<<<<<<<<<<< + * def PerThreadLoggingContext(**kwargs: Any) -> Iterator[None]: + * """A context manager to add per thread attributes.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_1PerThreadLoggingContext(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_6logger_PerThreadLoggingContext, "A context manager to add per thread attributes."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_1PerThreadLoggingContext = {"PerThreadLoggingContext", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_1PerThreadLoggingContext, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_6logger_PerThreadLoggingContext}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_1PerThreadLoggingContext(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("PerThreadLoggingContext (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("PerThreadLoggingContext", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (__pyx_kwds_len > 0) { + if (unlikely(__Pyx_CheckKeywordStrings("PerThreadLoggingContext", __pyx_kwds) == -1)) return NULL; + __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = PyDict_New(); + if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_PerThreadLoggingContext(__pyx_self, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_PerThreadLoggingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs) { + struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PerThreadLoggingContext", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 56, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6worker_6logger_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_PerThreadLoggingContext, __pyx_mstate_global->__pyx_n_u_PerThreadLoggingContext, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge); if (unlikely(!gen)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.logger.PerThreadLoggingContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6worker_6logger_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("PerThreadLoggingContext", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L7_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 56, __pyx_L1_error) + } + + /* "apache_beam/runners/worker/logger.py":59 + * def PerThreadLoggingContext(**kwargs: Any) -> Iterator[None]: + * """A context manager to add per thread attributes.""" + * stack = per_thread_worker_data.stack # <<<<<<<<<<<<<< + * stack.append(kwargs) + * try: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_per_thread_worker_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_v_stack = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":60 + * """A context manager to add per thread attributes.""" + * stack = per_thread_worker_data.stack + * stack.append(kwargs) # <<<<<<<<<<<<<< + * try: + * yield +*/ + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_cur_scope->__pyx_v_stack, __pyx_cur_scope->__pyx_v_kwargs); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 60, __pyx_L1_error) + + /* "apache_beam/runners/worker/logger.py":61 + * stack = per_thread_worker_data.stack + * stack.append(kwargs) + * try: # <<<<<<<<<<<<<< + * yield + * finally: +*/ + /*try:*/ { + + /* "apache_beam/runners/worker/logger.py":62 + * stack.append(kwargs) + * try: + * yield # <<<<<<<<<<<<<< + * finally: + * stack.pop() +*/ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L7_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L5_error) + } + + /* "apache_beam/runners/worker/logger.py":64 + * yield + * finally: + * stack.pop() # <<<<<<<<<<<<<< + * + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_cur_scope->__pyx_v_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L6; + } + __pyx_L5_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_assign + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; + { + __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_cur_scope->__pyx_v_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; + goto __pyx_L1_error; + __pyx_L9_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; + goto __pyx_L1_error; + } + __pyx_L6:; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/runners/worker/logger.py":56 + * + * + * @contextlib.contextmanager # <<<<<<<<<<<<<< + * def PerThreadLoggingContext(**kwargs: Any) -> Iterator[None]: + * """A context manager to add per thread attributes.""" +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("PerThreadLoggingContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/logger.py":69 + * class JsonLogFormatter(logging.Formatter): + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * self.job_id = job_id +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_job_id = 0; + PyObject *__pyx_v_worker_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_job_id,&__pyx_mstate_global->__pyx_n_u_worker_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 69, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 69, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 69, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 69, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 69, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 69, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 69, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_job_id = ((PyObject*)values[1]); + __pyx_v_worker_id = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.logger.JsonLogFormatter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_job_id), (&PyUnicode_Type), 0, "job_id", 2))) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_worker_id), (&PyUnicode_Type), 0, "worker_id", 2))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter___init__(__pyx_self, __pyx_v_self, __pyx_v_job_id, __pyx_v_worker_id); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_job_id, PyObject *__pyx_v_worker_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/logger.py":70 + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: + * super().__init__() # <<<<<<<<<<<<<< + * self.job_id = job_id + * self.worker_id = worker_id +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_5) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(0, 70, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":71 + * def __init__(self, job_id: str, worker_id: str) -> None: + * super().__init__() + * self.job_id = job_id # <<<<<<<<<<<<<< + * self.worker_id = worker_id + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_job_id, __pyx_v_job_id) < (0)) __PYX_ERR(0, 71, __pyx_L1_error) + + /* "apache_beam/runners/worker/logger.py":72 + * super().__init__() + * self.job_id = job_id + * self.worker_id = worker_id # <<<<<<<<<<<<<< + * + * def format(self, record: logging.LogRecord) -> str: +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_worker_id, __pyx_v_worker_id) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + + /* "apache_beam/runners/worker/logger.py":69 + * class JsonLogFormatter(logging.Formatter): + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * self.job_id = job_id +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.logger.JsonLogFormatter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/logger.py":74 + * self.worker_id = worker_id + * + * def format(self, record: logging.LogRecord) -> str: # <<<<<<<<<<<<<< + * """Returns a JSON string based on a LogRecord instance. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_3format(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_2format, "Returns a JSON string based on a LogRecord instance.\n\n Args:\n record: A LogRecord instance. See below for details.\n\n Returns:\n A JSON string representing the record.\n\n A LogRecord instance has the following attributes and is used for\n formatting the final message.\n\n Attributes:\n created: A double representing the timestamp for record creation\n (e.g., 1438365207.624597). Note that the number contains also msecs and\n microsecs information. Part of this is also available in the 'msecs'\n attribute.\n msecs: A double representing the msecs part of the record creation\n (e.g., 624.5970726013184).\n msg: Logging message containing formatting instructions or an arbitrary\n object. This is the first argument of a log call.\n args: A tuple containing the positional arguments for the logging call.\n levelname: A string. Possible values are: INFO, WARNING, ERROR, etc.\n exc_info: None or a 3-tuple with exception information as it is\n returned by a call to sys.exc_info().\n name: Logger's name. Most logging is done using the default root logger\n and therefore the name will be 'root'.\n filename: Basename of the file where logging occurred.\n funcName: Name of the function where logging occurred.\n process: The PID of the process running the worker.\n thread: An id for the thread where the record was logged. This is not a\n real TID (the one provided by OS) but rather the id (address) of a\n Python thread object. Nevertheless having this value can allow to\n filter log statement from only one specific thread.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_3format = {"format", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_3format, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_2format}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_3format(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_record = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("format (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_record,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 74, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 74, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 74, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "format", 0) < (0)) __PYX_ERR(0, 74, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("format", 1, 2, 2, i); __PYX_ERR(0, 74, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 74, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 74, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_record = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("format", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 74, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.logger.JsonLogFormatter.format", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_2format(__pyx_self, __pyx_v_self, __pyx_v_record); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_2format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_record) { + PyObject *__pyx_v_output = 0; + PyObject *__pyx_v_record_msg = NULL; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_v_tracker = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11[4]; + PyObject *__pyx_t_12[3]; + size_t __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("format", 0); + + /* "apache_beam/runners/worker/logger.py":109 + * filter log statement from only one specific thread. + * """ + * output: Dict[str, Any] = {} # <<<<<<<<<<<<<< + * output['timestamp'] = { + * 'seconds': int(record.created), 'nanos': int(record.msecs * 1000000) +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_output = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":111 + * output: Dict[str, Any] = {} + * output['timestamp'] = { + * 'seconds': int(record.created), 'nanos': int(record.msecs * 1000000) # <<<<<<<<<<<<<< + * } + * # ERROR. INFO, DEBUG log levels translate into the same for severity +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_created); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_3) < (0)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_msecs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyLong_MultiplyObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nanos, __pyx_t_3) < (0)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/logger.py":110 + * """ + * output: Dict[str, Any] = {} + * output['timestamp'] = { # <<<<<<<<<<<<<< + * 'seconds': int(record.created), 'nanos': int(record.msecs * 1000000) + * } +*/ + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_1) < 0))) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":116 + * # property. WARNING becomes WARN. + * output['severity'] = ( + * record.levelname if record.levelname != 'WARNING' else 'WARN') # <<<<<<<<<<<<<< + * + * # msg could be an arbitrary object, convert it to a string first. +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_levelname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WARNING, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_levelname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_WARN); + __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_WARN; + } + + /* "apache_beam/runners/worker/logger.py":115 + * # ERROR. INFO, DEBUG log levels translate into the same for severity + * # property. WARNING becomes WARN. + * output['severity'] = ( # <<<<<<<<<<<<<< + * record.levelname if record.levelname != 'WARNING' else 'WARN') + * +*/ + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_severity, __pyx_t_1) < 0))) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":119 + * + * # msg could be an arbitrary object, convert it to a string first. + * record_msg = str(record.msg) # <<<<<<<<<<<<<< + * + * # Prepare the actual message using the message formatting string and the +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_record_msg = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/logger.py":123 + * # Prepare the actual message using the message formatting string and the + * # positional arguments as they have been used in the log call. + * if record.args: # <<<<<<<<<<<<<< + * try: + * output['message'] = record_msg % record.args +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/logger.py":124 + * # positional arguments as they have been used in the log call. + * if record.args: + * try: # <<<<<<<<<<<<<< + * output['message'] = record_msg % record.args + * except (TypeError, ValueError): +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "apache_beam/runners/worker/logger.py":125 + * if record.args: + * try: + * output['message'] = record_msg % record.args # <<<<<<<<<<<<<< + * except (TypeError, ValueError): + * output['message'] = '%s with args (%s)' % (record_msg, record.args) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_v_record_msg, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_message, __pyx_t_1) < 0))) __PYX_ERR(0, 125, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":124 + * # positional arguments as they have been used in the log call. + * if record.args: + * try: # <<<<<<<<<<<<<< + * output['message'] = record_msg % record.args + * except (TypeError, ValueError): +*/ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/logger.py":126 + * try: + * output['message'] = record_msg % record.args + * except (TypeError, ValueError): # <<<<<<<<<<<<<< + * output['message'] = '%s with args (%s)' % (record_msg, record.args) + * else: +*/ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches2(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), ((PyObject *)(((PyTypeObject*)PyExc_ValueError)))); + if (__pyx_t_8) { + __Pyx_AddTraceback("apache_beam.runners.worker.logger.JsonLogFormatter.format", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 126, __pyx_L6_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/logger.py":127 + * output['message'] = record_msg % record.args + * except (TypeError, ValueError): + * output['message'] = '%s with args (%s)' % (record_msg, record.args) # <<<<<<<<<<<<<< + * else: + * output['message'] = record_msg +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_9), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_11[0] = __pyx_v_record_msg; + __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u_with_args; + __pyx_t_11[2] = __pyx_t_10; + __pyx_t_11[3] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_11, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_v_record_msg) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_record_msg) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_message, __pyx_t_9) < 0))) __PYX_ERR(0, 127, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L5_exception_handled; + } + goto __pyx_L6_except_error; + + /* "apache_beam/runners/worker/logger.py":124 + * # positional arguments as they have been used in the log call. + * if record.args: + * try: # <<<<<<<<<<<<<< + * output['message'] = record_msg % record.args + * except (TypeError, ValueError): +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + __pyx_L9_try_end:; + } + + /* "apache_beam/runners/worker/logger.py":123 + * # Prepare the actual message using the message formatting string and the + * # positional arguments as they have been used in the log call. + * if record.args: # <<<<<<<<<<<<<< + * try: + * output['message'] = record_msg % record.args +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/worker/logger.py":129 + * output['message'] = '%s with args (%s)' % (record_msg, record.args) + * else: + * output['message'] = record_msg # <<<<<<<<<<<<<< + * + * # The thread ID is logged as a combination of the process ID and thread ID +*/ + /*else*/ { + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_message, __pyx_v_record_msg) < 0))) __PYX_ERR(0, 129, __pyx_L1_error) + } + __pyx_L3:; + + /* "apache_beam/runners/worker/logger.py":133 + * # The thread ID is logged as a combination of the process ID and thread ID + * # since workers can run in multiple processes. + * output['thread'] = '%s:%s' % (record.process, record.thread) # <<<<<<<<<<<<<< + * # job ID and worker ID. These do not change during the lifetime of a worker. + * output['job'] = self.job_id +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_12[0] = __pyx_t_3; + __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_12[2] = __pyx_t_1; + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_thread, __pyx_t_2) < 0))) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":135 + * output['thread'] = '%s:%s' % (record.process, record.thread) + * # job ID and worker ID. These do not change during the lifetime of a worker. + * output['job'] = self.job_id # <<<<<<<<<<<<<< + * output['worker'] = self.worker_id + * # Stage, step and work item ID come from thread local storage since they +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_job_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_job, __pyx_t_2) < 0))) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":136 + * # job ID and worker ID. These do not change during the lifetime of a worker. + * output['job'] = self.job_id + * output['worker'] = self.worker_id # <<<<<<<<<<<<<< + * # Stage, step and work item ID come from thread local storage since they + * # change with every new work item leased for execution. If there is no +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_worker_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_worker, __pyx_t_2) < 0))) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":140 + * # change with every new work item leased for execution. If there is no + * # work item ID then we make sure the step is undefined too. + * data = per_thread_worker_data.get_data() # <<<<<<<<<<<<<< + * if 'work_item_id' in data: + * output['work'] = data['work_item_id'] +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_per_thread_worker_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_13 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_13 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":141 + * # work item ID then we make sure the step is undefined too. + * data = per_thread_worker_data.get_data() + * if 'work_item_id' in data: # <<<<<<<<<<<<<< + * output['work'] = data['work_item_id'] + * +*/ + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_n_u_work_item_id, __pyx_v_data, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 141, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/logger.py":142 + * data = per_thread_worker_data.get_data() + * if 'work_item_id' in data: + * output['work'] = data['work_item_id'] # <<<<<<<<<<<<<< + * + * tracker = statesampler.get_current_tracker() +*/ + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_work_item_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_work, __pyx_t_2) < 0))) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":141 + * # work item ID then we make sure the step is undefined too. + * data = per_thread_worker_data.get_data() + * if 'work_item_id' in data: # <<<<<<<<<<<<<< + * output['work'] = data['work_item_id'] + * +*/ + } + + /* "apache_beam/runners/worker/logger.py":144 + * output['work'] = data['work_item_id'] + * + * tracker = statesampler.get_current_tracker() # <<<<<<<<<<<<<< + * if tracker: + * output['stage'] = tracker.stage_name +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_statesampler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_current_tracker); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_13 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_tracker = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":145 + * + * tracker = statesampler.get_current_tracker() + * if tracker: # <<<<<<<<<<<<<< + * output['stage'] = tracker.stage_name + * +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_tracker); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 145, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/logger.py":146 + * tracker = statesampler.get_current_tracker() + * if tracker: + * output['stage'] = tracker.stage_name # <<<<<<<<<<<<<< + * + * if tracker.current_state() and tracker.current_state().name_context: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tracker, __pyx_mstate_global->__pyx_n_u_stage_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_stage, __pyx_t_2) < 0))) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":148 + * output['stage'] = tracker.stage_name + * + * if tracker.current_state() and tracker.current_state().name_context: # <<<<<<<<<<<<<< + * output['step'] = tracker.current_state().name_context.logging_name() + * +*/ + __pyx_t_3 = __pyx_v_tracker; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_13 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_state, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_14) { + } else { + __pyx_t_4 = __pyx_t_14; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = __pyx_v_tracker; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_13 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_state, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __pyx_t_14; + __pyx_L15_bool_binop_done:; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/logger.py":149 + * + * if tracker.current_state() and tracker.current_state().name_context: + * output['step'] = tracker.current_state().name_context.logging_name() # <<<<<<<<<<<<<< + * + * # All logging happens using the root logger. We will add the basename of the +*/ + __pyx_t_1 = __pyx_v_tracker; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_13 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_state, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_name_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_13 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_step, __pyx_t_3) < 0))) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/logger.py":148 + * output['stage'] = tracker.stage_name + * + * if tracker.current_state() and tracker.current_state().name_context: # <<<<<<<<<<<<<< + * output['step'] = tracker.current_state().name_context.logging_name() + * +*/ + } + + /* "apache_beam/runners/worker/logger.py":145 + * + * tracker = statesampler.get_current_tracker() + * if tracker: # <<<<<<<<<<<<<< + * output['stage'] = tracker.stage_name + * +*/ + } + + /* "apache_beam/runners/worker/logger.py":155 + * # to identify who generated the record. + * output['logger'] = '%s:%s:%s' % ( + * record.name, record.filename, record.funcName) # <<<<<<<<<<<<<< + * # Add exception information if any is available. + * if record.exc_info: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_funcName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_15[0] = __pyx_t_1; + __pyx_t_15[1] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_15[2] = __pyx_t_2; + __pyx_t_15[3] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_15[4] = __pyx_t_9; + + /* "apache_beam/runners/worker/logger.py":154 + * # file and the function name where the logging happened to make it easier + * # to identify who generated the record. + * output['logger'] = '%s:%s:%s' % ( # <<<<<<<<<<<<<< + * record.name, record.filename, record.funcName) + * # Add exception information if any is available. +*/ + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_logger, __pyx_t_3) < 0))) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/logger.py":157 + * record.name, record.filename, record.funcName) + * # Add exception information if any is available. + * if record.exc_info: # <<<<<<<<<<<<<< + * output['exception'] = ''.join( + * traceback.format_exception(*record.exc_info)) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/logger.py":159 + * if record.exc_info: + * output['exception'] = ''.join( + * traceback.format_exception(*record.exc_info)) # <<<<<<<<<<<<<< + * + * return json.dumps(output) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_traceback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_format_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_record, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":158 + * # Add exception information if any is available. + * if record.exc_info: + * output['exception'] = ''.join( # <<<<<<<<<<<<<< + * traceback.format_exception(*record.exc_info)) + * +*/ + __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__3, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely((PyDict_SetItem(__pyx_v_output, __pyx_mstate_global->__pyx_n_u_exception, __pyx_t_2) < 0))) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":157 + * record.name, record.filename, record.funcName) + * # Add exception information if any is available. + * if record.exc_info: # <<<<<<<<<<<<<< + * output['exception'] = ''.join( + * traceback.format_exception(*record.exc_info)) +*/ + } + + /* "apache_beam/runners/worker/logger.py":161 + * traceback.format_exception(*record.exc_info)) + * + * return json.dumps(output) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_dumps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_13 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_13 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_output}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/logger.py":74 + * self.worker_id = worker_id + * + * def format(self, record: logging.LogRecord) -> str: # <<<<<<<<<<<<<< + * """Returns a JSON string based on a LogRecord instance. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.worker.logger.JsonLogFormatter.format", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_output); + __Pyx_XDECREF(__pyx_v_record_msg); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XDECREF(__pyx_v_tracker); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/logger.py":164 + * + * + * def initialize( # <<<<<<<<<<<<<< + * job_id: str, + * worker_id: str, +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_5__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__defaults__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); + __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 164, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 164, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 164, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.logger.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_4initialize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_6logger_3initialize, "Initialize root logger so that we log JSON to a file and text to stdout."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_6logger_4initialize = {"initialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_6logger_4initialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_6logger_3initialize}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_6logger_4initialize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_job_id = 0; + PyObject *__pyx_v_worker_id = 0; + PyObject *__pyx_v_log_path = 0; + PyObject *__pyx_v_log_level = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initialize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_job_id,&__pyx_mstate_global->__pyx_n_u_worker_id,&__pyx_mstate_global->__pyx_n_u_log_path,&__pyx_mstate_global->__pyx_n_u_log_level,0}; + struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 164, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 164, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 164, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 164, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 164, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "initialize", 0) < (0)) __PYX_ERR(0, 164, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("initialize", 0, 3, 4, i); __PYX_ERR(0, 164, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 164, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 164, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 164, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 164, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); + } + __pyx_v_job_id = ((PyObject*)values[0]); + __pyx_v_worker_id = ((PyObject*)values[1]); + __pyx_v_log_path = ((PyObject*)values[2]); + if (__Pyx_PyInt_FromNumber(&values[3], "log_level", 0) < (0)) __PYX_ERR(0, 168, __pyx_L3_error) + __pyx_v_log_level = ((PyObject*)values[3]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("initialize", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 164, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.logger.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_job_id), (&PyUnicode_Type), 0, "job_id", 2))) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_worker_id), (&PyUnicode_Type), 0, "worker_id", 2))) __PYX_ERR(0, 166, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_path), (&PyUnicode_Type), 0, "log_path", 2))) __PYX_ERR(0, 167, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_level), (&PyLong_Type), 0, "log_level", 2))) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_6logger_3initialize(__pyx_self, __pyx_v_job_id, __pyx_v_worker_id, __pyx_v_log_path, __pyx_v_log_level); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_6logger_3initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_job_id, PyObject *__pyx_v_worker_id, PyObject *__pyx_v_log_path, PyObject *__pyx_v_log_level) { + PyObject *__pyx_v_file_handler = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("initialize", 0); + + /* "apache_beam/runners/worker/logger.py":171 + * """Initialize root logger so that we log JSON to a file and text to stdout.""" + * + * file_handler = logging.FileHandler(log_path) # <<<<<<<<<<<<<< + * file_handler.setFormatter(JsonLogFormatter(job_id, worker_id)) + * logging.getLogger().addHandler(file_handler) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FileHandler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_log_path}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_file_handler = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":172 + * + * file_handler = logging.FileHandler(log_path) + * file_handler.setFormatter(JsonLogFormatter(job_id, worker_id)) # <<<<<<<<<<<<<< + * logging.getLogger().addHandler(file_handler) + * +*/ + __pyx_t_4 = __pyx_v_file_handler; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_job_id, __pyx_v_worker_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setFormatter, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":173 + * file_handler = logging.FileHandler(log_path) + * file_handler.setFormatter(JsonLogFormatter(job_id, worker_id)) + * logging.getLogger().addHandler(file_handler) # <<<<<<<<<<<<<< + * + * # Default level is set to INFO to avoid logging various DEBUG level log calls +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_file_handler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_addHandler, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":177 + * # Default level is set to INFO to avoid logging various DEBUG level log calls + * # sprinkled throughout the code. + * logging.getLogger().setLevel(log_level) # <<<<<<<<<<<<<< +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_log_level}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setLevel, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/logger.py":164 + * + * + * def initialize( # <<<<<<<<<<<<<< + * job_id: str, + * worker_id: str, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.logger.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_file_handler); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_defaults(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_defaults(PyObject *o) { + struct __pyx_defaults *p = (struct __pyx_defaults *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_defaults) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + Py_CLEAR(p->arg0); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_defaults}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_defaults}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults_spec = { + "apache_beam.runners.worker.logger.__pyx_defaults", + sizeof(struct __pyx_defaults), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, + __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.logger.""__pyx_defaults", /*tp_name*/ + sizeof(struct __pyx_defaults), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_defaults, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_defaults, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *p = (struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_kwargs); + Py_CLEAR(p->__pyx_v_stack); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *p = (struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_kwargs) { + e = (*v)(p->__pyx_v_kwargs, a); if (e) return e; + } + if (p->__pyx_v_stack) { + e = (*v)(p->__pyx_v_stack, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext_spec = { + "apache_beam.runners.worker.logger.__pyx_scope_struct__PerThreadLoggingContext", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.logger.""__pyx_scope_struct__PerThreadLoggingContext", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults)) __PYX_ERR(0, 164, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults = &__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_defaults; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext)) __PYX_ERR(0, 56, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext = &__pyx_type_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_scope_struct__PerThreadLoggingContext->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_logger(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_logger}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "logger", + __pyx_k_Python_worker_logging, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_logger(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_logger(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_logger(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'logger' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "logger" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_logger", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__runners__worker__logger) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.runners.worker.logger")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.runners.worker.logger", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/runners/worker/logger.py":23 + * # mypy: disallow-untyped-defs + * + * import contextlib # <<<<<<<<<<<<<< + * import json + * import logging +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_contextlib, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_contextlib, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":24 + * + * import contextlib + * import json # <<<<<<<<<<<<<< + * import logging + * import threading +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_json, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_json, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":25 + * import contextlib + * import json + * import logging # <<<<<<<<<<<<<< + * import threading + * import traceback +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":26 + * import json + * import logging + * import threading # <<<<<<<<<<<<<< + * import traceback + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":27 + * import logging + * import threading + * import traceback # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Dict +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_traceback, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_traceback, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":28 + * import threading + * import traceback + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Dict + * from typing import Iterator +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":29 + * import traceback + * from typing import Any + * from typing import Dict # <<<<<<<<<<<<<< + * from typing import Iterator + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":30 + * from typing import Any + * from typing import Dict + * from typing import Iterator # <<<<<<<<<<<<<< + * from typing import List + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":31 + * from typing import Dict + * from typing import Iterator + * from typing import List # <<<<<<<<<<<<<< + * + * from apache_beam.runners.worker import statesampler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":33 + * from typing import List + * + * from apache_beam.runners.worker import statesampler # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_statesampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_statesampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":39 + * # context information that changes while work items get executed: + * # work_item_id, step_name, stage_name. + * class _PerThreadWorkerData(threading.local): # <<<<<<<<<<<<<< + * def __init__(self) -> None: + * super().__init__() +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_local); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 39, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/logger.py":40 + * # work_item_id, step_name, stage_name. + * class _PerThreadWorkerData(threading.local): + * def __init__(self) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * # in the list, as going up and down all the way to zero incurs several +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_1__init__, 0, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + PyList_Append(__pyx_t_2, __pyx_t_8); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/logger.py":46 + * self.stack: List[Dict[str, Any]] = [] + * + * def get_data(self) -> Dict[str, Any]: # <<<<<<<<<<<<<< + * all_data = {} + * for datum in self.stack: +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Dict_str_Any) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_20_PerThreadWorkerData_3get_data, 0, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData_get_data, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_get_data, __pyx_t_7) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/logger.py":39 + * # context information that changes while work items get executed: + * # work_item_id, step_name, stage_name. + * class _PerThreadWorkerData(threading.local): # <<<<<<<<<<<<<< + * def __init__(self) -> None: + * super().__init__() +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData, __pyx_t_4, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (__Pyx_CyFunction_InitClassCell(__pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData, __pyx_t_7) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/logger.py":53 + * + * + * per_thread_worker_data = _PerThreadWorkerData() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PerThreadWorkerData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_per_thread_worker_data, __pyx_t_4) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/logger.py":56 + * + * + * @contextlib.contextmanager # <<<<<<<<<<<<<< + * def PerThreadLoggingContext(**kwargs: Any) -> Iterator[None]: + * """A context manager to add per thread attributes.""" +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_contextlib); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_contextmanager); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_kwargs, __pyx_mstate_global->__pyx_n_u_Any) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Iterator_None) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_1PerThreadLoggingContext, 0, __pyx_mstate_global->__pyx_n_u_PerThreadLoggingContext, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PerThreadLoggingContext, __pyx_t_4) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/logger.py":67 + * + * + * class JsonLogFormatter(logging.Formatter): # <<<<<<<<<<<<<< + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Formatter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_kp_u_A_JSON_formatter_class_as_expect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_7 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 67, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/logger.py":69 + * class JsonLogFormatter(logging.Formatter): + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: # <<<<<<<<<<<<<< + * super().__init__() + * self.job_id = job_id +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_job_id, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_worker_id, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_1__init__, 0, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + PyList_Append(__pyx_t_4, __pyx_t_8); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/logger.py":74 + * self.worker_id = worker_id + * + * def format(self, record: logging.LogRecord) -> str: # <<<<<<<<<<<<<< + * """Returns a JSON string based on a LogRecord instance. + * +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_record, __pyx_mstate_global->__pyx_kp_u_logging_LogRecord) < (0)) __PYX_ERR(0, 74, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_16JsonLogFormatter_3format, 0, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter_format, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_5) < (0)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/logger.py":67 + * + * + * class JsonLogFormatter(logging.Formatter): # <<<<<<<<<<<<<< + * """A JSON formatter class as expected by the logging standard module.""" + * def __init__(self, job_id: str, worker_id: str) -> None: +*/ + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter, __pyx_t_7, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_CyFunction_InitClassCell(__pyx_t_4, __pyx_t_5) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_JsonLogFormatter, __pyx_t_5) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/logger.py":164 + * + * + * def initialize( # <<<<<<<<<<<<<< + * job_id: str, + * worker_id: str, +*/ + __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_job_id, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_worker_id, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_log_path, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_log_level, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_6logger_4initialize, 0, __pyx_mstate_global->__pyx_n_u_initialize, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_logge, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_6logger___pyx_defaults)) __PYX_ERR(0, 164, __pyx_L1_error) + + /* "apache_beam/runners/worker/logger.py":168 + * worker_id: str, + * log_path: str, + * log_level: int = logging.INFO) -> None: # <<<<<<<<<<<<<< + * """Initialize root logger so that we log JSON to a file and text to stdout.""" + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INFO); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 1) < (0)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_2)->arg0 = ((PyObject*)__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_11apache_beam_7runners_6worker_6logger_5__defaults__); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_initialize, __pyx_t_2) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/logger.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.runners.worker.logger", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.worker.logger"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 41, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + __pyx_mstate->__pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type; + __pyx_mstate->__pyx_umethod_PyList_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type__update.type = (PyObject*)(&PyDict_Type); + __pyx_mstate->__pyx_umethod_PyDict_Type__update.method_name = &__pyx_mstate->__pyx_n_u_update; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 9; } index[] = {{1},{66},{14},{14},{179},{1},{0},{1},{1},{8},{36},{7},{6},{2},{9},{17},{12},{3},{4},{11},{9},{4},{8},{16},{25},{23},{4},{4},{23},{20},{29},{29},{20},{4},{7},{10},{8},{26},{33},{6},{4},{18},{18},{5},{10},{14},{7},{13},{4},{5},{7},{5},{8},{9},{12},{8},{6},{16},{8},{8},{9},{19},{8},{8},{10},{3},{13},{5},{3},{6},{4},{6},{9},{5},{9},{8},{6},{7},{12},{8},{7},{13},{10},{15},{5},{3},{4},{8},{12},{5},{4},{6},{22},{3},{11},{7},{12},{6},{10},{6},{7},{4},{4},{12},{8},{12},{10},{8},{5},{5},{10},{12},{4},{3},{5},{8},{6},{9},{5},{9},{9},{7},{6},{6},{5},{6},{4},{12},{6},{9},{354},{24},{77},{33},{5},{33}}; + #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (1328 bytes) */ +const char* const cstring = "BZh91AY&SY\373\327N)\000\000q\377\377\377\377\377\377u\357\374\374\277\375\375\372\277\377\377\372\300@@@@@@@@@@@@\000@\000P\004x\226\207\241!\020\333\216\"\236\221\251\224\323\311\030\236M'\250\0001\032\032\001\221\2046\240z\215\0324\320\000\320\321\241\223\023M\030z\240\3255&\232m&\232{T\364mF\232\200\311\202d` \323@4\001\200CF\t\246\004\032\003 \001\246\210\t\240L\232T\366\214\223\005=OQ\265\000z\215\003@\000\000\000\000\000\036\243M=M\246\240p\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001$\223B\236\n&\324\336%?EZ\265\330 \352\305\227\335]p\322\262\2535N\245\302\310\322\000\270\241\263\354\376z\235n_\033\323\345\223\356\225\n\025O\216=I8m\366U\017/\317\351A\272Wh z(\212j\201\331\2140\365\203?6\221q\035\354c\017\001V\221\343\262\363)~QM*7\344 \205`H$\236y\371\n0\273\"@r@\275:g\021X|C\233\242D\331o_\362\036\306\250\001]\233\263j\330Q\267\026\033\023\3118n2\333\352w\021\355\346&V\217\333\342\203G\355\274\251^\311\026\203\303\323\220T\270\372\342\330\363\\\263\313\030\333\275\326\n\211\347\003\034\242dc\222\025\251\246\023-\264\023\002\"\255\256M\224u\261\013d\252V\267\245\231\333\230$x\325y\325\024\261\013\323\217\036\261\275\274%\0308\304\216b\247\230\346\202\200\345G:\203\274r\210\177VA\254x\020\346\324\300l*\270\301\316`\21616\261~,\021\2550\027%\212\036\246\244\007\364\374XI\3227\177s\277\253\303\330\025$\3217\010\245<\252\370[\367\016\362\343n\325\"\3322\251y\327S\212[]\243\225$\202\252QY\363g\020\t\371,X\361\266\255\262a\234\260\273\2013\352T\222V\366\306\350G\016r\203\013\221\023a67\354\rZ\241\340\320\326\241$d\3741t-U\205`*\253\204Q\347a\314F\305\312xk\222BU0\216\001\320\033B\255\334u\211\203\253A\025\221$.{\336\211\222Mw\304\307v\301q^\3040\"\2242\312\306=\227\316\372\342\242\023K\337J\254i\214\014n\004\r\234\010\022a""\310\004\334\013\225\370\300+\213\255[\321\357x\254K;\341K\332j6\344\214\001ck\241\322\234\204\323Wf|aE\330w\025\017\241\257\306\371'\230\302F\022\241\232+\305\241\230gM3B\202\024E\230=8\304PL\31392\373\003#,\310\262\242M\256\317+\214\315\213)\202\333\262@\334V\003\033`\217\311\352\3558#\243\304\327\316\267\364\262\244(@\004\022$\260\213\200\277Y3C$\272\312N\263<\310\244\212\017\317N\3665\347\315UWfQ^\225Fk\356\222\000\364\001\242\253O}\244U\331\214\352~\323M@ \250g\330p!\312\266Pv\321\020(d\223\260\350Cc\225\002\031$C\352\272\023\021\000\367\302\353\003\341\3041\275\267\306\254\332\202\020fL\305zu)^!\320i=]\314\034\257.\002dP\030\020\362{d\355r\321+[\261j3\254\271\260\264\351%V\344#\035\"ho\277\036K\335\275\224\033yI\031#5\201\230\034\014\224\360&\274\225x(\277ME8\246R\251\307N\220\314\202\252c\200\313y\n r\035\252\350\246\355\326>NQj*\227\202\260:\266\255\276\021\333Q\206zg\026g\232[\225|\211\301\202`+Q{k=3}\313\177\210\353\310gOQ[\210S\216\343\201\261\031\310\375\nB\204fU\000\221\203\021\027$\003\362q\003\214\027\334f\001\215\210\0273\3609C\203N\261\236f\334\022\260\340\257\027\322'C\\gT\3211\244\262\267\275\031vh*\034y\305z\027X\242$\267\r\001\212\021!F9\000n3\312\335&Dl\330\305\302D\254\024`\016\013\314f\217\310\304\364\022\001\342\312\251\231\212\256}\373\374\366\031h\256\323u\034\231z\306\362\016\r\020\336\233\240\356\001\335\347kW\242I\3059a4*\2359H>\227D\237L*.\006\265]\330\205\035\321\212\266\245&\271\240mX \316\211\236\321\252_[\311\262\264\026UV\232\320M\016\\hU\337?\225i\327E\26767\261\351J\014\033.=\270p,Zj{\370\361\277#\030\024\274\356\316\267!\230\206B\026\254)\263Zw\001\324\312o!\326\222\t\350\334\256D4\304J$3b\003h\210\"\334\344L\223\327\250\\\022\035U\031\252\233T\245\277\361w$S\205\t\017\275t\342\220"; + PyObject *data = __Pyx_DecompressString(cstring, 1328, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1209 bytes) */ +const char* const cstring = "x\332uTKo\333F\020\216\035\307\2578rc\247M\363*VA\021\267h\"\327m\200\276\002\024JR\267N\r\305N\212\270\255a,V\344H\332\230\334\245v\227\262\225\242h\216<\362\310#\217:\352\250c\216=\352\250\243\177\202\177Bg\271\262\020\264) \016\207;\257o\276\231\325\247U\362\344\371\323\032iH\0252c@\021/`Z\023\246\t\034G\340\031\360I\275KL\013H \233M.\232D\033&|\246|\022J?\016\240\362\230{f_\033u\227TE\367`\013s0#\325~M\n8\250I\003\030\314\014y\3245-)\010\327\304\207\200\327\255\023\004]L\2460\034\313\242\223 ;?\354\334\273\377\365}\202\005\210\202\227X^\023\035\327\013H\240\211l\220z\314\003\303\0051\335\010t\205l5HW\306D\000\3024\222D\026\372[\001\010[\020\r\246\300\277\306\204\220\206\031.\005\305ple\215\370\\a\021\336\001\033\275\311\002\r\225o+\3373\337\247\350\n,b^\013h\035X\270\256b!@\351\365#\251\016A\255[2@U\242\256\3175\253\007\000\302\312\246\307\265\323\3741[\225m\331|\006\236D\272\216\270i\021\246\232\232|\202DY\3266y\000?a\257\001\250\3153\376\267j\233O\3178|\242\245\300\370\211\355\337\337\025J\271\340\206\322\377\030\3348\267\2716v\014;\240~i)`\376\266\003\365H\n\003\307\206N\316\367\212\246\0363\303\336u6)\363Nc\023\014\365m$\335\351\036\343c\033\2435L\377\014\032{\325g5\373l\325~DN\307\255\262 (\002\336b\2672f\267\342\330\375\177K\305\361\316\242\010\354\01665\323]\341qYA\206e\214\213\001\332\013P\"`j\024\363\240\316\274C/\220\032GP\364\214\2537\326B&\030\246\362\260\035\\r/V\n\204\241\270\334\370\205\350\360\211CJ}\351\241\210\303H\303\261\207Y\033\022\337\020\331%j\340\364h\313\365du\301Bp\274;I'\236\2246b\3419YC/\244l\273\350\303rwV\331\302=tG\216N\307\271\225\234\005\374\025pt\342\232N:\345\006B\375R\326\361G\271\377\022W\340\360\310R\022@\007\002\013&\220\036r-\233\2648\261J\304L\31318^\317\361\213ZwJC\206\264\321\020\264Ff\254bXq\223p\362\324]\366BS\222\"`\305\001\r!2\253C\335t\t\336\222c\226\005\023R\013T\020s\204?P\324\024\033D\335@\213^#\031Q\032)\210\230\002\253H\017l\321v\314\002\227Q\0257\310I,\331T`b%\212\241\372x\321\203\006\336:\037\357\371\344""\002\240\276m\233\246\024\2651,\324|h\26080\032M\212\233.\016\333;D\321\204B\024~\305\002h\026F8Um \302?(\035[\330\024\217q\036\016\275\223\310\034*\362\310\360\".\214&+7\036\246\373\233\211#l\022:,\210\235\320\266u\373P;B\234\235\243bL\010\367\207\3237\20676\372\227O7\247\316]\370(\333\035\315,&\345dc4\277\232~\231\262\264\223\355\367\026\372\253\375j\377\305\340\2537\267\337TO\347\317]\270\350\033\336\374\274\177\276\377`\320y\263{2\273\224T\223\203\254|\226\377Az\234\351\374No\261\177g0uR\200\372&}\234M9|\017R\343\252,\r/\226\363k\275\362hf\356\365_\251\207\251\213D\277[{V=\231)%\301\360z\245\307\254\275\355l\373\331\\\326>\231]H\256\246\245\314\313\257\344{\275\332\340\366\240\352@\275\312\256\346\245^\275\177ip\360w\371t\361\014\314\037y\331\332\233\330\335wy\243\207\231\347\\\1776#\315\036f\220o\214\026W\207\253\037\347\017\235\375br?\351\244\273)\033N\177ha/$+\330A\325\362\2640\234_\313\333\257\247FK\227F\313\357\215J\313\243\345\367\323\275\354I\316\320z~%\275\232-\345\325|w4]J\302lcx\363n\257\332\373\265\217\337\013\311\365\364\213t?\237\312/c\363\347\027\213\317\3372\226\265\207\323\267\206\267\356\025^g\225F3\363\311bZ\266\257K\351.V\253\254\217\241,'m{\272\220^I\261\003\333\025\302\034!\342\215\177\000\"\323\3720"; + PyObject *data = __Pyx_DecompressString(cstring, 1209, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (1954 bytes) */ +const char* const bytes = ")A JSON formatter class as expected by the logging standard module.Dict[str, Any]Iterator[None]Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.:.?add_noteapache_beam/runners/worker/logger.pydisableenablegcisenabledlogging.LogRecord with args (AnyDictFileHandlerFormatterINFOIteratorJsonLogFormatterJsonLogFormatter.__init__JsonLogFormatter.formatListNonePerThreadLoggingContext_PerThreadWorkerData_PerThreadWorkerData.__init___PerThreadWorkerData.get_data__Pyx_PyDict_NextRefWARNWARNINGaddHandlerall_dataapache_beam.runners.workerapache_beam.runners.worker.loggerappendargsasyncio.coroutinescline_in_tracebackclosecontextlibcontextmanagercreatedcurrent_statedatadatum__doc__dumpsexc_infoexceptionfile_handlerfilenameformatformat_exception__func__funcNamegetLoggerget_current_trackerget_data__init__initializeint_is_coroutineitemsjobjob_idjsonkwargslevelnamelocallog_levellog_pathloggerlogginglogging_name__main__message__metaclass____module____mro_entries__msecsmsgname__name__name_contextnanosnextoutputper_thread_worker_datapop__prepare__process__qualname__recordrecord_msgreturnsecondsselfsendsetFormattersetLevel__set_name__setdefaultseveritystackstagestage_namestatesamplerstepstrsuper__test__threadthreadingthrowtimestamptracebacktrackertypingupdatevaluevaluesworkwork_item_idworkerworker_id\320\002\033\320\0331\260\021\360F\001\000\005\036\230Q\330\004\n\210!\2101\330\010\023\2203\220a\220v\230[\250\t\260\023\260A\260V\2707\300\"\300A\360\010\000\005\013\210!\2101\330\010\016\210n\230F\240+\250S\260\017\270q\360\006\000\005\022\220\023\220A\220V\2301\360\010\000\005\010\200v\210Q\330\006\007\330\010\016\210a\210}\230K\240r\250\026\250q\330\016\031\230\021\330\010\016\210a\210}\320\0340\260\003\260<\270v\300Q\340\006\014\210A\210]\230!\360\010\000\005\013\210!\210<\220x\230s\240&\250\n\260&\270\001\340\004\n\210!\2109\220D\230\001\330\004\n\210!\210<""\220t\2301\360\010\000\005\014\320\013!\240\031\250!\330\004\007\200\177\220c\230\021\330\006\014\210A\210Z\220t\2301\230A\340\004\016\210l\320\032.\250a\330\004\007\200q\330\006\014\210A\210[\230\007\230q\340\006\t\210\027\220\016\230c\240\024\240W\250N\270\"\270A\330\010\016\210a\210z\230\027\240\016\250b\260\r\270]\310!\360\n\000\005\013\210!\210<\220{\240!\330\010\016\210g\220V\230;\240f\250A\340\004\007\200v\210Q\330\006\014\210A\210_\230B\230e\2401\330\n\023\320\023$\240B\240f\250A\340\004\013\2104\210v\220Q\220a\320\002\030\230\001\330\004\t\210\022\2109\220A\360\006\000\005\t\320\010'\240q\200\001\330\014\r\330\017\020\330\016\017\330\017\025\220W\230J\240a\360\006\000\003\022\220\027\230\014\240A\240Q\330\002\016\210m\2301\320\034,\250A\250X\260Q\330\002\t\210\032\2202\220[\240\001\240\021\360\010\000\003\n\210\032\2202\220Y\230a\230q\320\002\035\320\035-\250X\260Q\330\004\t\210\022\2109\220A\330\004\010\210\n\220!\330\004\010\210\r\220Q\200\001\330./\320\002\030\230\001\330\004\017\210q\330\004\010\210\t\220\024\220Q\330\006\016\210g\220Q\220a\330\004\013\2101"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 130; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 17) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 130; i < 136; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 136; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 130; + for (Py_ssize_t i=0; i<6; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int32_t const cint_constants_4[] = {1000000L}; + for (int i = 0; i < 1; i++) { + numbertab[i] = PyLong_FromLong(cint_constants_4[i - 0]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 8; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS|CO_GENERATOR), 56}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_stack}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_PerThreadLoggingContext, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 40}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_9A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 46}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_all_data, __pyx_mstate->__pyx_n_u_datum}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_get_data, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_gQa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_job_id, __pyx_mstate->__pyx_n_u_worker_id}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_XQ_9A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 74}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_record, __pyx_mstate->__pyx_n_u_output, __pyx_mstate->__pyx_n_u_record_msg, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_tracker}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_1_F_Q_1_3av_AV7_A_1_nF_S_q_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 164}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_job_id, __pyx_mstate->__pyx_n_u_worker_id, __pyx_mstate->__pyx_n_u_log_path, __pyx_mstate->__pyx_n_u_log_level, __pyx_mstate->__pyx_n_u_file_handler}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_logge_2, __pyx_mstate->__pyx_n_u_initialize, __pyx_mstate->__pyx_kp_b_iso88591_WJa_AQ_m1_AXQ_2_2Yaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return __Pyx_CallCFunction(cfunc, self, arg); + } else if (flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); + } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); + } + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); + } +#endif + PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + } else +#endif + { + result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); + } + return result; +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + const char* function_name, + PyObject *kw) +{ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments) + CYTHON_UNUSED_VAR(function_name); + CYTHON_UNUSED_VAR(kw); + return 0; +#else + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { +#if PY_VERSION_HEX >= 0x03090000 + CYTHON_UNUSED_VAR(function_name); +#else + Py_ssize_t kwsize; + #if CYTHON_ASSUME_SAFE_SIZE + kwsize = PyTuple_GET_SIZE(kw); + #else + kwsize = PyTuple_Size(kw); + if (unlikely(kwsize < 0)) return -1; + #endif + for (Py_ssize_t pos = 0; pos < kwsize; pos++) { + PyObject* key = NULL; + #if CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kw, pos); + #else + key = PyTuple_GetItem(kw, pos); + if (unlikely(!key)) return -1; + #endif + if (unlikely(!PyUnicode_Check(key))) { + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return -1; + } + } +#endif + } else { + if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1; + } + return 0; +#endif +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod0 (used by pop) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* pop */ +static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { + if (__Pyx_IS_TYPE(L, &PySet_Type)) { + return PySet_Pop(L); + } + return __Pyx_PyObject_CallMethod0(L, __pyx_mstate_global->__pyx_n_u_pop); +} +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE +static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { + if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { + __Pyx_SET_SIZE(L, Py_SIZE(L) - 1); + return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); + } + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyList_Type_pop, L); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_multiply(op1, op2); + } + calculate_long: + CYTHON_UNUSED_VAR(a); + CYTHON_UNUSED_VAR(b); + lla = a; + goto calculate_long_long; + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) * (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace); +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* pybuiltin_invalid (used by pyint_simplify) */ +static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + if (argname) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", + argname, type_name, obj_type_name + ); + } else { + PyErr_Format(PyExc_TypeError, + "Expected %.200s, got " __Pyx_FMT_TYPENAME, + type_name, obj_type_name + ); + } + __Pyx_DECREF_TypeName(obj_type_name); +} + +/* pyint_simplify */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { + PyObject *number = *number_var; + if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { + return 0; + } + PyObject *int_object; + if (likely(PyNumber_Check(number))) { + int_object = PyNumber_Long(number); + if (unlikely(!int_object)) goto bad; + } else { + __Pyx_PyBuiltin_Invalid(number, "int", argname); + goto bad; + } + *number_var = int_object; + Py_DECREF(number); + return 0; +bad: + *number_var = NULL; + Py_DECREF(number); + return -1; +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__4); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CyFunctionClassCell */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = __Pyx_PyList_GET_SIZE(cyfunctions); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(count < 0)) return -1; + #endif + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + __Pyx_PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + __Pyx_CyFunction_SetClassObj(m, classobj); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__5); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify (used by CIntFromPy) */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* GetRuntimeVersion */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +void __Pyx_init_runtime_version(void) { + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* RaiseException (used by CoroutineBase) */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* IterNextPlain (used by CoroutineBase) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* ReturnWithStopIteration (used by CoroutineBase) */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase (used by Generator) */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; +#endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/runners/worker/logger.cp314-win_amd64.pyd b/sdks/python/apache_beam/runners/worker/logger.cp314-win_amd64.pyd new file mode 100644 index 000000000000..f1fffd8155f3 Binary files /dev/null and b/sdks/python/apache_beam/runners/worker/logger.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/runners/worker/opcounters.c b/sdks/python/apache_beam/runners/worker/opcounters.c new file mode 100644 index 000000000000..ee870f0f5a7f --- /dev/null +++ b/sdks/python/apache_beam/runners/worker/opcounters.c @@ -0,0 +1,29094 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.runners.worker.opcounters", + "sources": [ + "apache_beam/runners/worker/opcounters.py" + ] + }, + "module_name": "apache_beam.runners.worker.opcounters" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__runners__worker__opcounters +#define __PYX_HAVE_API__apache_beam__runners__worker__opcounters +/* Early includes */ +#include +#include +#include + + #if CYTHON_COMPILING_IN_LIMITED_API + #ifdef _MSC_VER + #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.") + #else + #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API. + #endif + #endif + +#include "datetime.h" + + #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->DateTimeType) + #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType) + + #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC + #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name) + + /* Backport for Python < 3.10 */ + #if PY_VERSION_HEX < 0x030a00a1 + #ifndef PyDateTime_TIME_GET_TZINFO + #define PyDateTime_TIME_GET_TZINFO(o) ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None) + #endif + #ifndef PyDateTime_DATE_GET_TZINFO + #define PyDateTime_DATE_GET_TZINFO(o) ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None) + #endif + #endif + + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE PyObject * + __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index) + { + PyObject *item = PyList_GetItem(list, index); + Py_XINCREF(item); + return item; + } + #else + #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef + #endif + + #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable) + { + return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable); + } + + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Clear(PyObject *list) + { + return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL); + } + #else + #define __Pyx_CAPI_PyList_Extend PyList_Extend + #define __Pyx_CAPI_PyList_Clear PyList_Clear + #endif + + + #if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) + #else + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) + #endif + +#include + + #if PY_MAJOR_VERSION <= 2 + #define PyDict_GetItemWithError _PyDict_GetItemWithError + #endif + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) + { + int res; + PyObject *key_obj = PyUnicode_FromString(key); + if (key_obj == NULL) { + *result = NULL; + return -1; + } + res = __Pyx_PyDict_GetItemRef(mp, key_obj, result); + Py_DECREF(key_obj); + return res; + } + #else + #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef + #endif + #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000) + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value, + PyObject **result) + { + PyObject *value; + if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) { + // get error + if (result) { + *result = NULL; + } + return -1; + } + if (value != NULL) { + // present + if (result) { + *result = value; + } + else { + Py_DECREF(value); + } + return 1; + } + + // missing: set the item + if (PyDict_SetItem(d, key, default_value) < 0) { + // set error + if (result) { + *result = NULL; + } + return -1; + } + if (result) { + Py_INCREF(default_value); + *result = default_value; + } + return 0; + } + #else + #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef + #endif + + + #if PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj) + { + PyObject *obj = PyWeakref_GetObject(ref); + if (obj == NULL) { + // SystemError if ref is NULL + *pobj = NULL; + return -1; + } + if (obj == Py_None) { + *pobj = NULL; + return 0; + } + Py_INCREF(obj); + *pobj = obj; + return 1; + } + #else + #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef + #endif + +#include "pythread.h" + + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get) + #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/runners/worker/opcounters.py", + "cpython/datetime.pxd", + "cpython/contextvars.pxd", + "", + "apache_beam/runners/worker/opcounters.pxd", + "apache_beam/utils/counters.pxd", + "cpython/type.pxd", + "cpython/bool.pxd", + "cpython/complex.pxd", + "apache_beam/metrics/cells.pxd", + "apache_beam/metrics/execution.pxd", + "apache_beam/runners/worker/statesampler_fast.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_5utils_8counters_Counter; +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData; +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData; +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback; +struct __pyx_opt_args_7cpython_11contextvars_get_value; +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; + +/* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value { + int __pyx_n; + PyObject *default_value; +}; + +/* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { + int __pyx_n; + PyObject *default_value; +}; +struct __pyx_opt_args_7cpython_8datetime_time_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_new; +struct __pyx_opt_args_7cpython_8datetime_timezone_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp; + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_time_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_timezone_new { + int __pyx_n; + PyObject *name; +}; + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp { + int __pyx_n; + PyObject *tz; +}; + +/* "apache_beam/utils/counters.pxd":20 + * # cython: overflowcheck=True + * + * cdef class Counter(object): # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object combine_fn +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_Counter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtab; + PyObject *name; + PyObject *combine_fn; + PyObject *accumulator; + PyObject *_add_input; +}; + + +/* "apache_beam/utils/counters.pxd":28 + * + * + * cdef class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_obj_11apache_beam_5utils_8counters_Counter __pyx_base; + PyObject *_fast_add_input; + PyObject *_fast_add_input_n; +}; + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab; + PyObject *_lock; + PyDateTime_DateTime *_start_time; +}; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int64_t value; +}; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data; +}; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + PyObject *data_class; + PyObject *data; +}; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":62 + * + * + * cdef class DistributionData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData { + PyObject_HEAD + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/metrics/cells.pxd":69 + * + * + * cdef class _BoundedTrieNode(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode { + PyObject_HEAD + int64_t _size; + PyObject *_children; + int _truncated; +}; + + +/* "apache_beam/metrics/cells.pxd":74 + * cdef readonly bint _truncated + * + * cdef class BoundedTrieData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData { + PyObject_HEAD + int64_t _bound; + PyObject *_singleton; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *_root; +}; + + +/* "apache_beam/metrics/execution.pxd":26 + * + * + * cdef class _TypedMetricName(object): # <<<<<<<<<<<<<< + * cdef readonly object cell_type + * cdef readonly object metric_name +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName { + PyObject_HEAD + PyObject *cell_type; + PyObject *metric_name; + PyObject *fast_name; + int64_t _hash; +}; + + +/* "apache_beam/metrics/execution.pxd":36 + * + * + * cdef class MetricUpdater(object): # <<<<<<<<<<<<<< + * cdef _TypedMetricName typed_metric_name + * cdef object default_value +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *typed_metric_name; + PyObject *default_value; + int process_wide; +}; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtab; + PyObject *step_name; + PyObject *lock; + PyObject *metrics; +}; + + +/* "statesampler_fast.pxd":25 + * from libc.stdint cimport int32_t, int64_t + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * cdef int _sampling_period_ms +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtab; + int _sampling_period_ms; + int _sampling_period_ms_start; + double _sampling_period_ratio; + PyObject *scoped_states_by_index; + int started; + int finished; + PyObject *sampling_thread; + PyThread_type_lock lock; + int64_t state_transition_count; + int64_t time_since_transition; + int32_t current_state_index; +}; + + +/* "statesampler_fast.pxd":52 + * self, counter_name, name_context, output_counter, metrics_container) + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *sampler; + int32_t state_index; + PyObject *counter; + PyObject *name; + PyObject *name_context; + int64_t _nsecs; + int32_t old_state_index; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *metrics_container; +}; + + +/* "apache_beam/runners/worker/opcounters.pxd":25 + * + * + * cdef class TransformIOCounter(object): # <<<<<<<<<<<<<< + * cdef readonly object _counter_factory + * cdef readonly object _state_sampler +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtab; + PyObject *_counter_factory; + PyObject *_state_sampler; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *bytes_read_counter; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *scoped_state; + PyObject *_latest_step; +}; + + +/* "apache_beam/runners/worker/opcounters.pxd":38 + * + * + * cdef class NoOpTransformIOCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; + + +/* "apache_beam/runners/worker/opcounters.pxd":42 + * + * + * cdef class SideInputReadCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * cdef readonly object declaring_step + * cdef readonly object input_index +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; + PyObject *declaring_step; + PyObject *input_index; +}; + + +/* "apache_beam/runners/worker/opcounters.pxd":47 + * + * + * cdef class SumAccumulator(object): # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t _value + * cpdef update(self, libc.stdint.int64_t value) +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtab; + int64_t _value; +}; + + +/* "apache_beam/runners/worker/opcounters.pxd":53 + * + * + * cdef class OperationCounters(object): # <<<<<<<<<<<<<< + * cdef public _counter_factory + * cdef public Counter element_counter +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtab; + PyObject *_counter_factory; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *element_counter; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *mean_byte_counter; + PyObject *coder_impl; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *active_accumulator; + PyObject *current_size; + int64_t _sample_counter; + int64_t _next_sample; + PyObject *output_type_constraints; + PyObject *producer_batch_converter; +}; + + +/* "apache_beam/runners/worker/opcounters.py":224 + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * + * def _observable_callback(self, inner_coder_impl, accumulator): # <<<<<<<<<<<<<< + * def _observable_callback_inner(value, is_encoded=False): + * # TODO(ccy): If this stream is large, sample it as well. +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback { + PyObject_HEAD + PyObject *__pyx_v_accumulator; + PyObject *__pyx_v_inner_coder_impl; +}; + + + +/* "apache_beam/utils/counters.pxd":20 + * # cython: overflowcheck=True + * + * cdef class Counter(object): # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object combine_fn +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter { + int (*update)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtabptr_11apache_beam_5utils_8counters_Counter; + + +/* "apache_beam/utils/counters.pxd":28 + * + * + * cdef class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell { + int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update_locked)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*get_metric_cell)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer; + + +/* "statesampler_fast.pxd":25 + * from libc.stdint cimport int32_t, int64_t + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * cdef int _sampling_period_ms +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, int __pyx_skip_dispatch); + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state_c)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *); + PyObject *(*_scoped_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + + +/* "statesampler_fast.pxd":52 + * self, counter_name, name_context, output_counter, metrics_container) + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, int __pyx_skip_dispatch); + PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + + +/* "apache_beam/runners/worker/opcounters.py":41 + * + * + * class TransformIOCounter(object): # <<<<<<<<<<<<<< + * """Class to track time and bytes consumed while reading from IO. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter { + PyObject *(*update_current_step)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch); + PyObject *(*add_bytes_read)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int64_t, int __pyx_skip_dispatch); + PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch); + PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + + +/* "apache_beam/runners/worker/opcounters.py":94 + * + * + * class NoOpTransformIOCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * """All operations for IO tracking are no-ops.""" + * def __init__(self): +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + + +/* "apache_beam/runners/worker/opcounters.py":112 + * + * + * class SideInputReadCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * """Tracks time and bytes consumed while reading from side inputs. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + + +/* "apache_beam/runners/worker/opcounters.py":166 + * + * + * class SumAccumulator(object): # <<<<<<<<<<<<<< + * """Accumulator for collecting byte counts.""" + * def __init__(self): +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator { + PyObject *(*update)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int64_t, int __pyx_skip_dispatch); + int64_t (*value)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + + +/* "apache_beam/runners/worker/opcounters.py":178 + * + * + * class OperationCounters(object): # <<<<<<<<<<<<<< + * """The set of basic counters to attach to an Operation.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters { + PyObject *(*update_from)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*update_from_batch)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*do_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *); + PyObject *(*update_collect)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch); + PyObject *(*type_check)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + int64_t (*_compute_next_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int64_t); + int (*_should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *); + int (*should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters; +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_do_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *); +static CYTHON_INLINE int __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *); +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_SubtractCObj(op1, op2, floatval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* PyNumber_Hex.proto */ +#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16) + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/ +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int64_t __pyx_v_count, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_update_current_step(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___enter__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___exit__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception_type, CYTHON_UNUSED PyObject *__pyx_v_exception_value, CYTHON_UNUSED PyObject *__pyx_v_traceback, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_add_bytes_read(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, CYTHON_UNUSED int64_t __pyx_v_count, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_update(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int64_t __pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static int64_t __pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_value(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_type_check(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_do_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_collect(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int64_t __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__compute_next_sample(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int64_t __pyx_v_i); /* proto*/ +static CYTHON_INLINE int __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto*/ +static int __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "apache_beam.utils.counters" */ + +/* Module declarations from "apache_beam.runners.worker" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "cpython.exc" */ + +/* Module declarations from "cpython.module" */ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython.list" */ + +/* Module declarations from "cpython.sequence" */ + +/* Module declarations from "cpython.mapping" */ + +/* Module declarations from "cpython.iterator" */ + +/* Module declarations from "cpython.number" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.bool" */ + +/* Module declarations from "cpython.long" */ + +/* Module declarations from "cpython.float" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.complex" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "cpython.unicode" */ + +/* Module declarations from "cpython.pyport" */ + +/* Module declarations from "cpython.dict" */ + +/* Module declarations from "cpython.instance" */ + +/* Module declarations from "cpython.function" */ + +/* Module declarations from "cpython.method" */ + +/* Module declarations from "cpython.weakref" */ + +/* Module declarations from "cpython.getargs" */ + +/* Module declarations from "cpython.pythread" */ + +/* Module declarations from "cpython.pystate" */ + +/* Module declarations from "cpython.set" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cpython.pycapsule" */ + +/* Module declarations from "cpython.contextvars" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "datetime" */ + +/* Module declarations from "cpython.datetime" */ + +/* Module declarations from "apache_beam.metrics.cells" */ + +/* Module declarations from "apache_beam.metrics.execution" */ +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker = 0; +#define __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker (*__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker) +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT = 0; +#define __pyx_v_11apache_beam_7metrics_9execution__DEFAULT (*__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT) + +/* Module declarations from "apache_beam.runners.worker.statesampler_fast" */ + +/* Module declarations from "apache_beam.runners.worker.opcounters" */ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_NoOpTransformIOCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SideInputReadCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SumAccumulator__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_OperationCounters__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.runners.worker.opcounters" +extern int __pyx_module_is_main_apache_beam__runners__worker__opcounters; +int __pyx_module_is_main_apache_beam__runners__worker__opcounters = 0; + +/* Implementation of "apache_beam.runners.worker.opcounters" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_id; +/* #### Code section: string_decls ### */ +static const char __pyx_k_value_2[] = "_value"; +static const char __pyx_k_counter_factory__latest_step__s[] = "_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state"; +static const char __pyx_k_counter_factory__next_sample__s[] = "_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter"; +static const char __pyx_k_Counters_collect_the_progress_of[] = "Counters collect the progress of the Worker for reporting to the service."; +static const char __pyx_k_counter_factory__latest_step__s_2[] = "_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state"; +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_2update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_4_update_counters_for_requesting_step(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_step_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_6add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int64_t __pyx_v_count); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_8__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_10__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_2update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_4__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_6__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_8add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int64_t __pyx_v_count); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_declaring_step, PyObject *__pyx_v_input_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_2_update_counters_for_requesting_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v_step_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_2update(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int64_t __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_4value(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_coder, PyObject *__pyx_v_index, PyObject *__pyx_v_suffix, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_2update_from(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_4update_from_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback__observable_callback_inner(PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_is_encoded); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_6_observable_callback(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_inner_coder_impl, PyObject *__pyx_v_accumulator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_8type_check(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10update_collect(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_14restart_sampling(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_22__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_2__pyx_unpickle_NoOpTransformIOCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_4__pyx_unpickle_SideInputReadCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_6__pyx_unpickle_SumAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_8__pyx_unpickle_OperationCounters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SumAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_OperationCounters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_Counter; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_4bool_bool; + PyTypeObject *__pyx_ptype_7cpython_7complex_complex; + PyTypeObject *__pyx_ptype_7cpython_8datetime_date; + PyTypeObject *__pyx_ptype_7cpython_8datetime_time; + PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime; + PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta; + PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_tuple[2]; + PyObject *__pyx_codeobj_tab[35]; + PyObject *__pyx_string_tab[216]; + PyObject *__pyx_number_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *__pyx_freelist_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback[8]; +int __pyx_freecount_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_ElementCount __pyx_string_tab[1] +#define __pyx_kp_u_MeanByteCount __pyx_string_tab[2] +#define __pyx_kp_u_None __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u_ParDo_s __pyx_string_tab[5] +#define __pyx_kp_u_Runtime_type_violation_detected __pyx_string_tab[6] +#define __pyx_kp_u__10 __pyx_string_tab[7] +#define __pyx_kp_u__2 __pyx_string_tab[8] +#define __pyx_kp_u__3 __pyx_string_tab[9] +#define __pyx_kp_u__4 __pyx_string_tab[10] +#define __pyx_kp_u__5 __pyx_string_tab[11] +#define __pyx_kp_u__6 __pyx_string_tab[12] +#define __pyx_kp_u__7 __pyx_string_tab[13] +#define __pyx_kp_u__8 __pyx_string_tab[14] +#define __pyx_kp_u__9 __pyx_string_tab[15] +#define __pyx_kp_u_add_note __pyx_string_tab[16] +#define __pyx_kp_u_apache_beam_runners_worker_opcou_2 __pyx_string_tab[17] +#define __pyx_kp_u_at __pyx_string_tab[18] +#define __pyx_kp_u_disable __pyx_string_tab[19] +#define __pyx_kp_u_enable __pyx_string_tab[20] +#define __pyx_kp_u_gc __pyx_string_tab[21] +#define __pyx_kp_u_isenabled __pyx_string_tab[22] +#define __pyx_kp_u_read_sideinput __pyx_string_tab[23] +#define __pyx_kp_u_read_sideinput_byte_count __pyx_string_tab[24] +#define __pyx_kp_u_stringsource __pyx_string_tab[25] +#define __pyx_n_u_Any __pyx_string_tab[26] +#define __pyx_n_u_BEAM_DISTRIBUTION __pyx_string_tab[27] +#define __pyx_n_u_BatchConverter __pyx_string_tab[28] +#define __pyx_n_u_Counter __pyx_string_tab[29] +#define __pyx_n_u_CounterName __pyx_string_tab[30] +#define __pyx_n_u_HomogeneousWindowedBatch __pyx_string_tab[31] +#define __pyx_n_u_NoOpTransformIOCounter __pyx_string_tab[32] +#define __pyx_n_u_NoOpTransformIOCounter___enter __pyx_string_tab[33] +#define __pyx_n_u_NoOpTransformIOCounter___exit __pyx_string_tab[34] +#define __pyx_n_u_NoOpTransformIOCounter___reduce __pyx_string_tab[35] +#define __pyx_n_u_NoOpTransformIOCounter___setstat __pyx_string_tab[36] +#define __pyx_n_u_NoOpTransformIOCounter_add_bytes __pyx_string_tab[37] +#define __pyx_n_u_NoOpTransformIOCounter_update_cu __pyx_string_tab[38] +#define __pyx_n_u_OperationCounters __pyx_string_tab[39] +#define __pyx_n_u_OperationCounters___reduce_cytho __pyx_string_tab[40] +#define __pyx_n_u_OperationCounters___setstate_cyt __pyx_string_tab[41] +#define __pyx_n_u_OperationCounters__observable_ca __pyx_string_tab[42] +#define __pyx_n_u_OperationCounters_restart_sampli __pyx_string_tab[43] +#define __pyx_n_u_OperationCounters_should_sample __pyx_string_tab[44] +#define __pyx_n_u_OperationCounters_type_check __pyx_string_tab[45] +#define __pyx_n_u_OperationCounters_update_collect __pyx_string_tab[46] +#define __pyx_n_u_OperationCounters_update_from __pyx_string_tab[47] +#define __pyx_n_u_OperationCounters_update_from_ba __pyx_string_tab[48] +#define __pyx_n_u_Optional __pyx_string_tab[49] +#define __pyx_n_u_ParDo __pyx_string_tab[50] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[51] +#define __pyx_n_u_SUM __pyx_string_tab[52] +#define __pyx_n_u_SideInputReadCounter __pyx_string_tab[53] +#define __pyx_n_u_SideInputReadCounter___reduce_cy __pyx_string_tab[54] +#define __pyx_n_u_SideInputReadCounter___setstate __pyx_string_tab[55] +#define __pyx_n_u_SideInputReadCounter__update_cou __pyx_string_tab[56] +#define __pyx_n_u_StateSampler __pyx_string_tab[57] +#define __pyx_n_u_SumAccumulator __pyx_string_tab[58] +#define __pyx_n_u_SumAccumulator___reduce_cython __pyx_string_tab[59] +#define __pyx_n_u_SumAccumulator___setstate_cython __pyx_string_tab[60] +#define __pyx_n_u_SumAccumulator_update __pyx_string_tab[61] +#define __pyx_n_u_SumAccumulator_value __pyx_string_tab[62] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[63] +#define __pyx_n_u_TransformIOCounter __pyx_string_tab[64] +#define __pyx_n_u_TransformIOCounter___enter __pyx_string_tab[65] +#define __pyx_n_u_TransformIOCounter___exit __pyx_string_tab[66] +#define __pyx_n_u_TransformIOCounter___reduce_cyth __pyx_string_tab[67] +#define __pyx_n_u_TransformIOCounter___setstate_cy __pyx_string_tab[68] +#define __pyx_n_u_TransformIOCounter__update_count __pyx_string_tab[69] +#define __pyx_n_u_TransformIOCounter_add_bytes_rea __pyx_string_tab[70] +#define __pyx_n_u_TransformIOCounter_update_curren __pyx_string_tab[71] +#define __pyx_n_u_TypeCheckError __pyx_string_tab[72] +#define __pyx_n_u_accumulator __pyx_string_tab[73] +#define __pyx_n_u_add_bytes_read __pyx_string_tab[74] +#define __pyx_n_u_apache_beam_runners_worker_opcou __pyx_string_tab[75] +#define __pyx_n_u_apache_beam_runners_worker_state __pyx_string_tab[76] +#define __pyx_n_u_apache_beam_typehints __pyx_string_tab[77] +#define __pyx_n_u_apache_beam_typehints_batch __pyx_string_tab[78] +#define __pyx_n_u_apache_beam_typehints_decorators __pyx_string_tab[79] +#define __pyx_n_u_apache_beam_utils __pyx_string_tab[80] +#define __pyx_n_u_apache_beam_utils_counters __pyx_string_tab[81] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[82] +#define __pyx_n_u_check_instance_type __pyx_string_tab[83] +#define __pyx_n_u_class __pyx_string_tab[84] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[85] +#define __pyx_n_u_coder __pyx_string_tab[86] +#define __pyx_n_u_count __pyx_string_tab[87] +#define __pyx_n_u_counter_factory __pyx_string_tab[88] +#define __pyx_n_u_counters __pyx_string_tab[89] +#define __pyx_n_u_current_state __pyx_string_tab[90] +#define __pyx_n_u_declaring_step __pyx_string_tab[91] +#define __pyx_n_u_dict __pyx_string_tab[92] +#define __pyx_n_u_dict_2 __pyx_string_tab[93] +#define __pyx_n_u_enter __pyx_string_tab[94] +#define __pyx_n_u_estimate_byte_size __pyx_string_tab[95] +#define __pyx_n_u_estimate_size __pyx_string_tab[96] +#define __pyx_n_u_exc_info __pyx_string_tab[97] +#define __pyx_n_u_exception_type __pyx_string_tab[98] +#define __pyx_n_u_exception_value __pyx_string_tab[99] +#define __pyx_n_u_exit __pyx_string_tab[100] +#define __pyx_n_u_floor __pyx_string_tab[101] +#define __pyx_n_u_func __pyx_string_tab[102] +#define __pyx_n_u_get_counter __pyx_string_tab[103] +#define __pyx_n_u_get_estimated_size_and_observabl __pyx_string_tab[104] +#define __pyx_n_u_get_impl __pyx_string_tab[105] +#define __pyx_n_u_get_length __pyx_string_tab[106] +#define __pyx_n_u_getstate __pyx_string_tab[107] +#define __pyx_n_u_id __pyx_string_tab[108] +#define __pyx_n_u_index __pyx_string_tab[109] +#define __pyx_n_u_init __pyx_string_tab[110] +#define __pyx_n_u_inner_coder_impl __pyx_string_tab[111] +#define __pyx_n_u_input_index __pyx_string_tab[112] +#define __pyx_n_u_io_target __pyx_string_tab[113] +#define __pyx_n_u_is_coroutine __pyx_string_tab[114] +#define __pyx_n_u_is_encoded __pyx_string_tab[115] +#define __pyx_n_u_items __pyx_string_tab[116] +#define __pyx_n_u_iter __pyx_string_tab[117] +#define __pyx_n_u_log __pyx_string_tab[118] +#define __pyx_n_u_main __pyx_string_tab[119] +#define __pyx_n_u_math __pyx_string_tab[120] +#define __pyx_n_u_module __pyx_string_tab[121] +#define __pyx_n_u_name __pyx_string_tab[122] +#define __pyx_n_u_name_2 __pyx_string_tab[123] +#define __pyx_n_u_new __pyx_string_tab[124] +#define __pyx_n_u_observable_callback __pyx_string_tab[125] +#define __pyx_n_u_observable_callback_inner __pyx_string_tab[126] +#define __pyx_n_u_observable_callback_locals__obs __pyx_string_tab[127] +#define __pyx_n_u_out __pyx_string_tab[128] +#define __pyx_n_u_pop __pyx_string_tab[129] +#define __pyx_n_u_producer_batch_converter __pyx_string_tab[130] +#define __pyx_n_u_producer_type_hints __pyx_string_tab[131] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[132] +#define __pyx_n_u_pyx_result __pyx_string_tab[133] +#define __pyx_n_u_pyx_state __pyx_string_tab[134] +#define __pyx_n_u_pyx_type __pyx_string_tab[135] +#define __pyx_n_u_pyx_unpickle_NoOpTransformIOCo __pyx_string_tab[136] +#define __pyx_n_u_pyx_unpickle_OperationCounters __pyx_string_tab[137] +#define __pyx_n_u_pyx_unpickle_SideInputReadCoun __pyx_string_tab[138] +#define __pyx_n_u_pyx_unpickle_SumAccumulator __pyx_string_tab[139] +#define __pyx_n_u_pyx_unpickle_TransformIOCounte __pyx_string_tab[140] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[141] +#define __pyx_n_u_qualname __pyx_string_tab[142] +#define __pyx_n_u_randint __pyx_string_tab[143] +#define __pyx_n_u_random __pyx_string_tab[144] +#define __pyx_n_u_reduce __pyx_string_tab[145] +#define __pyx_n_u_reduce_cython __pyx_string_tab[146] +#define __pyx_n_u_reduce_ex __pyx_string_tab[147] +#define __pyx_n_u_register_observer __pyx_string_tab[148] +#define __pyx_n_u_restart_sampling __pyx_string_tab[149] +#define __pyx_n_u_scoped_state __pyx_string_tab[150] +#define __pyx_n_u_self __pyx_string_tab[151] +#define __pyx_n_u_set_name __pyx_string_tab[152] +#define __pyx_n_u_setdefault __pyx_string_tab[153] +#define __pyx_n_u_setstate __pyx_string_tab[154] +#define __pyx_n_u_setstate_cython __pyx_string_tab[155] +#define __pyx_n_u_should_sample __pyx_string_tab[156] +#define __pyx_n_u_side_input_id __pyx_string_tab[157] +#define __pyx_n_u_size __pyx_string_tab[158] +#define __pyx_n_u_startswith __pyx_string_tab[159] +#define __pyx_n_u_state __pyx_string_tab[160] +#define __pyx_n_u_state_sampler __pyx_string_tab[161] +#define __pyx_n_u_step_name __pyx_string_tab[162] +#define __pyx_n_u_suffix __pyx_string_tab[163] +#define __pyx_n_u_super __pyx_string_tab[164] +#define __pyx_n_u_sys __pyx_string_tab[165] +#define __pyx_n_u_test __pyx_string_tab[166] +#define __pyx_n_u_traceback __pyx_string_tab[167] +#define __pyx_n_u_type_check __pyx_string_tab[168] +#define __pyx_n_u_typing __pyx_string_tab[169] +#define __pyx_n_u_update __pyx_string_tab[170] +#define __pyx_n_u_update_collect __pyx_string_tab[171] +#define __pyx_n_u_update_counters_for_requesting __pyx_string_tab[172] +#define __pyx_n_u_update_current_step __pyx_string_tab[173] +#define __pyx_n_u_update_from __pyx_string_tab[174] +#define __pyx_n_u_update_from_batch __pyx_string_tab[175] +#define __pyx_n_u_update_n __pyx_string_tab[176] +#define __pyx_n_u_use_setstate __pyx_string_tab[177] +#define __pyx_n_u_value __pyx_string_tab[178] +#define __pyx_n_u_values __pyx_string_tab[179] +#define __pyx_n_u_verbose __pyx_string_tab[180] +#define __pyx_n_u_windowed_batch __pyx_string_tab[181] +#define __pyx_n_u_windowed_value __pyx_string_tab[182] +#define __pyx_n_u_with_traceback __pyx_string_tab[183] +#define __pyx_kp_b_PyObject__DEFAULT_get_current_tr __pyx_string_tab[184] +#define __pyx_kp_b_iso88591_0_q __pyx_string_tab[185] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[186] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[187] +#define __pyx_kp_b_iso88591_1_3 __pyx_string_tab[188] +#define __pyx_kp_b_iso88591_2_6 __pyx_string_tab[189] +#define __pyx_kp_b_iso88591_2_a_m1_A_0_q_4_k_L_Q_3l_Ya_nAZ __pyx_string_tab[190] +#define __pyx_kp_b_iso88591_4AV1 __pyx_string_tab[191] +#define __pyx_kp_b_iso88591_4_Q_nA_4_0_1_a_q_55H_ir_1_7q __pyx_string_tab[192] +#define __pyx_kp_b_iso88591_4_a __pyx_string_tab[193] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[194] +#define __pyx_kp_b_iso88591_AV1 __pyx_string_tab[195] +#define __pyx_kp_b_iso88591_D_Q_U_D_q __pyx_string_tab[196] +#define __pyx_kp_b_iso88591_HN_d_O_z_d_3_q_1_d_a_q __pyx_string_tab[197] +#define __pyx_kp_b_iso88591_T_D_t_LDPeeiij_G1F_a_vWE_Q_q_t __pyx_string_tab[198] +#define __pyx_kp_b_iso88591_T_D_t_LDPeeiij_G1F_a_vWE_Q_q_t_2 __pyx_string_tab[199] +#define __pyx_kp_b_iso88591_T_D_t_LDPeeiizz_M_M_Q_Q_R_G1F_a __pyx_string_tab[200] +#define __pyx_kp_b_iso88591_T_D_t_MTQffjjww_K_K_O_O_a_a_e_e __pyx_string_tab[201] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G __pyx_string_tab[202] +#define __pyx_kp_b_iso88591_Ya __pyx_string_tab[203] +#define __pyx_kp_b_iso88591_Zq __pyx_string_tab[204] +#define __pyx_kp_b_iso88591__11 __pyx_string_tab[205] +#define __pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1 __pyx_string_tab[206] +#define __pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1 __pyx_string_tab[207] +#define __pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1 __pyx_string_tab[208] +#define __pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1 __pyx_string_tab[209] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1 __pyx_string_tab[210] +#define __pyx_kp_b_iso88591_q_a __pyx_string_tab[211] +#define __pyx_kp_b_iso88591_q_t_G1D_G1D_6 __pyx_string_tab[212] +#define __pyx_kp_b_iso88591_s_1_7_1_7 __pyx_string_tab[213] +#define __pyx_kp_b_iso88591_t_AQ __pyx_string_tab[214] +#define __pyx_kp_b_iso88591_vRr_T_WAQ __pyx_string_tab[215] +#define __pyx_float_1_0 __pyx_number_tab[0] +#define __pyx_int_1 __pyx_number_tab[1] +#define __pyx_int_10 __pyx_number_tab[2] +#define __pyx_int_75797132 __pyx_number_tab[3] +#define __pyx_int_196964917 __pyx_number_tab[4] +#define __pyx_int_201270984 __pyx_number_tab[5] +#define __pyx_int_268225155 __pyx_number_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback); + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<35; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<216; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback); + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<35; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<216; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":46 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":50 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":54 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":59 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":63 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":67 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":71 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":75 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":80 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":85 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":89 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":93 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":97 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":101 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":105 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":109 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":113 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":118 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":123 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":127 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":131 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + +static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) { + + /* "cpython/datetime.pxd":256 + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: + * PyDateTime_IMPORT # <<<<<<<<<<<<<< + * + * # Create date object using DateTime CAPI factory function. +*/ + (void)(PyDateTime_IMPORT); + + /* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + + /* function exit code */ +} + +/* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_new", 0); + + /* "cpython/datetime.pxd":261 + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) # <<<<<<<<<<<<<< + * + * # Create time object using DateTime CAPI factory function +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Date *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_Time *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("time_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":266 + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create datetime object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) + __pyx_r = ((PyDateTime_Time *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":271 + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + +static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) { + PyDateTime_Delta *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timedelta_new", 0); + + /* "cpython/datetime.pxd":276 + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) { + PyObject *__pyx_v_name = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timezone_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_name = __pyx_optional_args->name; + } + } + + /* "cpython/datetime.pxd":280 + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) # <<<<<<<<<<<<<< + * + * # Create datetime object using DB API constructor. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_name != Py_None); + if (__pyx_t_2) { + __pyx_t_1 = ((PyObject *)__pyx_v_name); + } else { + __pyx_t_1 = NULL; + } + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) { + PyObject *__pyx_v_tz = ((PyObject *)Py_None); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_from_timestamp", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_tz = __pyx_optional_args->tz; + } + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "cpython/datetime.pxd":285 + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) # <<<<<<<<<<<<<< + * + * # Create date object using DB API constructor. +*/ + __pyx_t_2 = (__pyx_v_tz != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_tz); + __Pyx_GIVEREF(__pyx_v_tz); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_from_timestamp", 0); + + /* "cpython/datetime.pxd":289 + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) # <<<<<<<<<<<<<< + * + * # More recognizable getters for date/time/datetime/timedelta. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_Date *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_utc", 0); + + /* "cpython/datetime.pxd":298 + * # Get UTC singleton + * cdef inline object get_utc(): + * return __Pyx_TimeZone_UTC # <<<<<<<<<<<<<< + * + * # Get tzinfo of time +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC)); + __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC); + goto __pyx_L0; + + /* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("time_tzinfo", 0); + + /* "cpython/datetime.pxd":302 + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): + * return PyDateTime_TIME_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get tzinfo of datetime +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("datetime_tzinfo", 0); + + /* "cpython/datetime.pxd":306 + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): + * return PyDateTime_DATE_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get year of date +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":310 + * # Get year of date + * cdef inline int date_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of date +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":314 + * # Get month of date + * cdef inline int date_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of date +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":318 + * # Get day of date + * cdef inline int date_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get year of datetime +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":322 + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of datetime +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":326 + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of datetime +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":330 + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get hour of time +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":334 + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: + * return PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of time +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":338 + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: + * return PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of time +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":342 + * # Get second of time + * cdef inline int time_second(object o) noexcept: + * return PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of time +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":346 + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of time +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":351 + * cdef inline int time_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get hour of datetime +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":355 + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: + * return PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":359 + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: + * return PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":363 + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: + * return PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":367 + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":372 + * cdef inline int datetime_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get days of timedelta +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":376 + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< + * + * # Get seconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":380 + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< + * + * # Get microseconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":384 + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< + * + * cdef inline double total_seconds(timedelta obj) noexcept: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + +static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) { + double __pyx_v_days; + double __pyx_v_seconds; + double __pyx_v_micros; + double __pyx_r; + + /* "cpython/datetime.pxd":392 + * cdef: + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) # <<<<<<<<<<<<<< + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) +*/ + __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":393 + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) # <<<<<<<<<<<<<< + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":394 + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) # <<<<<<<<<<<<<< + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":395 + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 # <<<<<<<<<<<<<< +*/ + __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":23 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: + * return self.cval.real # <<<<<<<<<<<<<< + * + * # unavailable in limited API +*/ + __pyx_r = __pyx_v_self->cval.real; + goto __pyx_L0; + + /* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":29 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: + * return self.cval.imag # <<<<<<<<<<<<<< + * + * # PyTypeObject PyComplex_Type +*/ + __pyx_r = __pyx_v_self->cval.imag; + goto __pyx_L0; + + /* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":121 + * or None if no such value or default was found. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":122 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< + * if value is NULL: + * # context variable does not have a default +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error) + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + __pyx_t_2 = (__pyx_v_value == NULL); + if (__pyx_t_2) { + + /* "cpython/contextvars.pxd":125 + * if value is NULL: + * # context variable does not have a default + * pyvalue = default_value # <<<<<<<<<<<<<< + * else: + * # value or default value of context variable +*/ + __Pyx_INCREF(__pyx_v_default_value); + __pyx_v_pyvalue = __pyx_v_default_value; + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + goto __pyx_L3; + } + + /* "cpython/contextvars.pxd":128 + * else: + * # value or default value of context variable + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_pyvalue = __pyx_t_3; + __pyx_t_3 = 0; + + /* "cpython/contextvars.pxd":129 + * # value or default value of context variable + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue + * +*/ + Py_XDECREF(__pyx_v_value); + } + __pyx_L3:; + + /* "cpython/contextvars.pxd":130 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value_no_default", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":140 + * Ignores the default value of the context variable, if any. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":141 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< + * # value of context variable or 'default_value' + * pyvalue = value +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error) + + /* "cpython/contextvars.pxd":143 + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_pyvalue = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cpython/contextvars.pxd":144 + * # value of context variable or 'default_value' + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue +*/ + Py_XDECREF(__pyx_v_value); + + /* "cpython/contextvars.pxd":145 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "apache_beam/runners/worker/opcounters.py":50 + * Some examples of IO can be side inputs, shuffle, or streaming state. + * """ + * def __init__(self, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * """Create a new IO read counter. + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__, "Create a new IO read counter.\n\n Args:\n counter_factory: A counters.CounterFactory to create byte counters.\n state_sampler: A statesampler.StateSampler to transition into read states.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 50, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 50, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 50, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 50, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 50, __pyx_L3_error) + } + __pyx_v_counter_factory = values[0]; + __pyx_v_state_sampler = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_state_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/opcounters.py":57 + * state_sampler: A statesampler.StateSampler to transition into read states. + * """ + * self._counter_factory = counter_factory # <<<<<<<<<<<<<< + * self._state_sampler = state_sampler + * self._latest_step = None +*/ + __Pyx_INCREF(__pyx_v_counter_factory); + __Pyx_GIVEREF(__pyx_v_counter_factory); + __Pyx_GOTREF(__pyx_v_self->_counter_factory); + __Pyx_DECREF(__pyx_v_self->_counter_factory); + __pyx_v_self->_counter_factory = __pyx_v_counter_factory; + + /* "apache_beam/runners/worker/opcounters.py":58 + * """ + * self._counter_factory = counter_factory + * self._state_sampler = state_sampler # <<<<<<<<<<<<<< + * self._latest_step = None + * self.bytes_read_counter = None +*/ + __Pyx_INCREF(__pyx_v_state_sampler); + __Pyx_GIVEREF(__pyx_v_state_sampler); + __Pyx_GOTREF(__pyx_v_self->_state_sampler); + __Pyx_DECREF(__pyx_v_self->_state_sampler); + __pyx_v_self->_state_sampler = __pyx_v_state_sampler; + + /* "apache_beam/runners/worker/opcounters.py":59 + * self._counter_factory = counter_factory + * self._state_sampler = state_sampler + * self._latest_step = None # <<<<<<<<<<<<<< + * self.bytes_read_counter = None + * self.scoped_state = None +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_latest_step); + __Pyx_DECREF(__pyx_v_self->_latest_step); + __pyx_v_self->_latest_step = Py_None; + + /* "apache_beam/runners/worker/opcounters.py":60 + * self._state_sampler = state_sampler + * self._latest_step = None + * self.bytes_read_counter = None # <<<<<<<<<<<<<< + * self.scoped_state = None + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->bytes_read_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->bytes_read_counter); + __pyx_v_self->bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); + + /* "apache_beam/runners/worker/opcounters.py":61 + * self._latest_step = None + * self.bytes_read_counter = None + * self.scoped_state = None # <<<<<<<<<<<<<< + * + * def update_current_step(self): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->scoped_state); + __Pyx_DECREF((PyObject *)__pyx_v_self->scoped_state); + __pyx_v_self->scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)Py_None); + + /* "apache_beam/runners/worker/opcounters.py":50 + * Some examples of IO can be side inputs, shuffle, or streaming state. + * """ + * def __init__(self, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * """Create a new IO read counter. + * +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":63 + * self.scoped_state = None + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * """Update the current running step. + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_current_state = NULL; + PyObject *__pyx_v_current_step_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_current_step", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_current_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":74 + * consumption of IO. + * """ + * current_state = self._state_sampler.current_state() # <<<<<<<<<<<<<< + * current_step_name = current_state.name.step_name + * if current_step_name != self._latest_step: +*/ + __pyx_t_2 = __pyx_v_self->_state_sampler; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_state, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_current_state = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":75 + * """ + * current_state = self._state_sampler.current_state() + * current_step_name = current_state.name.step_name # <<<<<<<<<<<<<< + * if current_step_name != self._latest_step: + * self._latest_step = current_step_name +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_state, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_current_step_name = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":76 + * current_state = self._state_sampler.current_state() + * current_step_name = current_state.name.step_name + * if current_step_name != self._latest_step: # <<<<<<<<<<<<<< + * self._latest_step = current_step_name + * self._update_counters_for_requesting_step(current_step_name) +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_current_step_name, __pyx_v_self->_latest_step, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/opcounters.py":77 + * current_step_name = current_state.name.step_name + * if current_step_name != self._latest_step: + * self._latest_step = current_step_name # <<<<<<<<<<<<<< + * self._update_counters_for_requesting_step(current_step_name) + * +*/ + __Pyx_INCREF(__pyx_v_current_step_name); + __Pyx_GIVEREF(__pyx_v_current_step_name); + __Pyx_GOTREF(__pyx_v_self->_latest_step); + __Pyx_DECREF(__pyx_v_self->_latest_step); + __pyx_v_self->_latest_step = __pyx_v_current_step_name; + + /* "apache_beam/runners/worker/opcounters.py":78 + * if current_step_name != self._latest_step: + * self._latest_step = current_step_name + * self._update_counters_for_requesting_step(current_step_name) # <<<<<<<<<<<<<< + * + * def _update_counters_for_requesting_step(self, step_name): +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_current_step_name}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_counters_for_requesting, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":76 + * current_state = self._state_sampler.current_state() + * current_step_name = current_state.name.step_name + * if current_step_name != self._latest_step: # <<<<<<<<<<<<<< + * self._latest_step = current_step_name + * self._update_counters_for_requesting_step(current_step_name) +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":63 + * self.scoped_state = None + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * """Update the current running step. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.update_current_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_current_state); + __Pyx_XDECREF(__pyx_v_current_step_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_2update_current_step, "Update the current running step.\n\n Due to the fusion optimization, user code may choose to emit the data\n structure that holds side inputs (Iterable, Dict, or others). This call\n updates the current step, to attribute the data consumption to the step\n that is responsible for actual consumption.\n\n CounterName uses the io_target field for information pertinent to the\n consumption of IO.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step = {"update_current_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_2update_current_step}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_current_step (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("update_current_step", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("update_current_step", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_2update_current_step(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_2update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_current_step", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_update_current_step(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.update_current_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":80 + * self._update_counters_for_requesting_step(current_step_name) + * + * def _update_counters_for_requesting_step(self, step_name): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step = {"_update_counters_for_requesting_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_step_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_update_counters_for_requesting_step (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 80, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 80, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_update_counters_for_requesting_step", 0) < (0)) __PYX_ERR(0, 80, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_update_counters_for_requesting_step", 1, 1, 1, i); __PYX_ERR(0, 80, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 80, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_update_counters_for_requesting_step", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 80, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter._update_counters_for_requesting_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_4_update_counters_for_requesting_step(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), __pyx_v_step_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_4_update_counters_for_requesting_step(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_step_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_update_counters_for_requesting_step", 0); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":83 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * if count > 0 and self.bytes_read_counter: + * self.bytes_read_counter.update(count) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int64_t __pyx_v_count, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_bytes_read", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_bytes_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":84 + * + * def add_bytes_read(self, count): + * if count > 0 and self.bytes_read_counter: # <<<<<<<<<<<<<< + * self.bytes_read_counter.update(count) + * +*/ + __pyx_t_8 = (__pyx_v_count > 0); + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->bytes_read_counter)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_7) { + + /* "apache_beam/runners/worker/opcounters.py":85 + * def add_bytes_read(self, count): + * if count > 0 and self.bytes_read_counter: + * self.bytes_read_counter.update(count) # <<<<<<<<<<<<<< + * + * def __enter__(self): +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *)__pyx_v_self->bytes_read_counter->__pyx_vtab)->update(__pyx_v_self->bytes_read_counter, __pyx_t_1, 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":84 + * + * def add_bytes_read(self, count): + * if count > 0 and self.bytes_read_counter: # <<<<<<<<<<<<<< + * self.bytes_read_counter.update(count) + * +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":83 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * if count > 0 and self.bytes_read_counter: + * self.bytes_read_counter.update(count) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read = {"add_bytes_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_count; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_bytes_read (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 83, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_bytes_read", 0) < (0)) __PYX_ERR(0, 83, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_bytes_read", 1, 1, 1, i); __PYX_ERR(0, 83, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + } + __pyx_v_count = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_count == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_bytes_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 83, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_6add_bytes_read(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), __pyx_v_count); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_6add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int64_t __pyx_v_count) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_bytes_read", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_add_bytes_read(__pyx_v_self, __pyx_v_count, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":87 + * self.bytes_read_counter.update(count) + * + * def __enter__(self): # <<<<<<<<<<<<<< + * self.scoped_state.__enter__() + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":88 + * + * def __enter__(self): + * self.scoped_state.__enter__() # <<<<<<<<<<<<<< + * + * def __exit__(self, exception_type, exception_value, traceback): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self->scoped_state->__pyx_vtab)->__pyx___enter__(__pyx_v_self->scoped_state, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":87 + * self.bytes_read_counter.update(count) + * + * def __enter__(self): # <<<<<<<<<<<<<< + * self.scoped_state.__enter__() + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_8__enter__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_8__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___enter__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":90 + * self.scoped_state.__enter__() + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * self.scoped_state.__exit__(exception_type, exception_value, traceback) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":91 + * + * def __exit__(self, exception_type, exception_value, traceback): + * self.scoped_state.__exit__(exception_type, exception_value, traceback) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self->scoped_state->__pyx_vtab)->__pyx___exit__(__pyx_v_self->scoped_state, __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":90 + * self.scoped_state.__enter__() + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * self.scoped_state.__exit__(exception_type, exception_value, traceback) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_exception_type = 0; + PyObject *__pyx_v_exception_value = 0; + PyObject *__pyx_v_traceback = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exception_type,&__pyx_mstate_global->__pyx_n_u_exception_value,&__pyx_mstate_global->__pyx_n_u_traceback,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 90, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 90, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(0, 90, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 90, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 90, __pyx_L3_error) + } + __pyx_v_exception_type = values[0]; + __pyx_v_exception_value = values[1]; + __pyx_v_traceback = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 90, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_10__exit__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_10__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___exit__(__pyx_v_self, __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":26 + * + * cdef class TransformIOCounter(object): + * cdef readonly object _counter_factory # <<<<<<<<<<<<<< + * cdef readonly object _state_sampler + * cdef Counter bytes_read_counter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_counter_factory); + __pyx_r = __pyx_v_self->_counter_factory; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":27 + * cdef class TransformIOCounter(object): + * cdef readonly object _counter_factory + * cdef readonly object _state_sampler # <<<<<<<<<<<<<< + * cdef Counter bytes_read_counter + * cdef statesampler_fast.ScopedState scoped_state +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_state_sampler); + __pyx_r = __pyx_v_self->_state_sampler; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_12__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_counter_factory); + __Pyx_GIVEREF(__pyx_v_self->_counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_latest_step); + __Pyx_GIVEREF(__pyx_v_self->_latest_step); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_latest_step) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_state_sampler); + __Pyx_GIVEREF(__pyx_v_self->_state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->bytes_read_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->bytes_read_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->bytes_read_counter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->scoped_state); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->scoped_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->scoped_state)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->_counter_factory != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_latest_step != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_state_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->bytes_read_counter) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->scoped_state) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TransformIOCounte); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_201270984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_201270984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_201270984) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, None), state + * else: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TransformIOCounter__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TransformIOCounte); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_201270984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_201270984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_201270984) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TransformIOCounter__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_TransformIOCounter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TransformIOCounter__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.TransformIOCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":96 + * class NoOpTransformIOCounter(TransformIOCounter): + * """All operations for IO tracking are no-ops.""" + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(None, None) + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/opcounters.py":97 + * """All operations for IO tracking are no-ops.""" + * def __init__(self): + * super().__init__(None, None) # <<<<<<<<<<<<<< + * + * def update_current_step(self): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":96 + * class NoOpTransformIOCounter(TransformIOCounter): + * """All operations for IO tracking are no-ops.""" + * def __init__(self): # <<<<<<<<<<<<<< + * super().__init__(None, None) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":99 + * super().__init__(None, None) + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_update_current_step(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_current_step", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_current_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":100 + * + * def update_current_step(self): + * pass # <<<<<<<<<<<<<< + * + * def __enter__(self): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.update_current_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":99 + * super().__init__(None, None) + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step = {"update_current_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_current_step (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("update_current_step", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("update_current_step", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_2update_current_step(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_2update_current_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_current_step", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_update_current_step(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.update_current_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":102 + * pass + * + * def __enter__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___enter__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":103 + * + * def __enter__(self): + * pass # <<<<<<<<<<<<<< + * + * def __exit__(self, exception_type, exception_value, traceback): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":102 + * pass + * + * def __enter__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_4__enter__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_4__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___enter__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":105 + * pass + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * pass + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___exit__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception_type, CYTHON_UNUSED PyObject *__pyx_v_exception_value, CYTHON_UNUSED PyObject *__pyx_v_traceback, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":106 + * + * def __exit__(self, exception_type, exception_value, traceback): + * pass # <<<<<<<<<<<<<< + * + * def add_bytes_read(self, count): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":105 + * pass + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_exception_type = 0; + PyObject *__pyx_v_exception_value = 0; + PyObject *__pyx_v_traceback = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exception_type,&__pyx_mstate_global->__pyx_n_u_exception_value,&__pyx_mstate_global->__pyx_n_u_traceback,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 105, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 105, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(0, 105, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error) + } + __pyx_v_exception_type = values[0]; + __pyx_v_exception_value = values[1]; + __pyx_v_traceback = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 105, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_6__exit__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self), __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_6__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, PyObject *__pyx_v_exception_type, PyObject *__pyx_v_exception_value, PyObject *__pyx_v_traceback) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___exit__(__pyx_v_self, __pyx_v_exception_type, __pyx_v_exception_value, __pyx_v_traceback, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":108 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * pass + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_add_bytes_read(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, CYTHON_UNUSED int64_t __pyx_v_count, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_bytes_read", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_bytes_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":109 + * + * def add_bytes_read(self, count): + * pass # <<<<<<<<<<<<<< + * + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":108 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read = {"add_bytes_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_count; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_bytes_read (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 108, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_bytes_read", 0) < (0)) __PYX_ERR(0, 108, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_bytes_read", 1, 1, 1, i); __PYX_ERR(0, 108, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + } + __pyx_v_count = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_count == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_bytes_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 108, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_8add_bytes_read(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self), __pyx_v_count); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_8add_bytes_read(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, int64_t __pyx_v_count) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_bytes_read", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_add_bytes_read(__pyx_v_self, __pyx_v_count, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.add_bytes_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base._counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._latest_step); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._latest_step); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base._latest_step) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base._state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->__pyx_base.scoped_state)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->__pyx_base._counter_factory != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base._latest_step != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base._state_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_state) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_NoOpTransformIOCo); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_201270984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_201270984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_201270984) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, None), state + * else: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_NoOpTransformIOCounter__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_NoOpTransformIOCo); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_201270984); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_201270984); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_201270984) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_NoOpTransformIOCounter__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_NoOpTransformIOCounter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_NoOpTransformIOCounter__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_NoOpTransformIOCounter__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.NoOpTransformIOCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":125 + * not be the only step that spends time reading from this side input. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__, "Create a side input read counter.\n\n Args:\n counter_factory: A counters.CounterFactory to create byte counters.\n state_sampler: A statesampler.StateSampler to transition into read states.\n declaring_step: A string with the step name of the step that directly\n receives the side input initially.\n input_index: The index of the side input in the list of inputs of the\n declaring step.\n\n The side input is uniquely identified by (declaring_step, input_index);\n where declaring_step is the step that receives the PCollectionView as a\n side input, and input_index is the index of the PCollectionView within\n the list of inputs.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + PyObject *__pyx_v_declaring_step = 0; + PyObject *__pyx_v_input_index = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,&__pyx_mstate_global->__pyx_n_u_declaring_step,&__pyx_mstate_global->__pyx_n_u_input_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 125, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 125, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 125, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 125, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 125, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 125, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 125, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 125, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 125, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 125, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 125, __pyx_L3_error) + } + __pyx_v_counter_factory = values[0]; + __pyx_v_state_sampler = values[1]; + __pyx_v_declaring_step = values[2]; + __pyx_v_input_index = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 125, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_declaring_step, __pyx_v_input_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_declaring_step, PyObject *__pyx_v_input_index) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/opcounters.py":146 + * the list of inputs. + * """ + * super().__init__(counter_factory, state_sampler) # <<<<<<<<<<<<<< + * self.declaring_step = declaring_step + * self.input_index = input_index +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":147 + * """ + * super().__init__(counter_factory, state_sampler) + * self.declaring_step = declaring_step # <<<<<<<<<<<<<< + * self.input_index = input_index + * +*/ + __Pyx_INCREF(__pyx_v_declaring_step); + __Pyx_GIVEREF(__pyx_v_declaring_step); + __Pyx_GOTREF(__pyx_v_self->declaring_step); + __Pyx_DECREF(__pyx_v_self->declaring_step); + __pyx_v_self->declaring_step = __pyx_v_declaring_step; + + /* "apache_beam/runners/worker/opcounters.py":148 + * super().__init__(counter_factory, state_sampler) + * self.declaring_step = declaring_step + * self.input_index = input_index # <<<<<<<<<<<<<< + * + * # Side inputs are set up within the start state of the first receiving +*/ + __Pyx_INCREF(__pyx_v_input_index); + __Pyx_GIVEREF(__pyx_v_input_index); + __Pyx_GOTREF(__pyx_v_self->input_index); + __Pyx_DECREF(__pyx_v_self->input_index); + __pyx_v_self->input_index = __pyx_v_input_index; + + /* "apache_beam/runners/worker/opcounters.py":152 + * # Side inputs are set up within the start state of the first receiving + * # step. We check the current state to create the internal counters. + * self.update_current_step() # <<<<<<<<<<<<<< + * + * def _update_counters_for_requesting_step(self, step_name): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.update_current_step(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":125 + * not be the only step that spends time reading from this side input. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":154 + * self.update_current_step() + * + * def _update_counters_for_requesting_step(self, step_name): # <<<<<<<<<<<<<< + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step = {"_update_counters_for_requesting_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_step_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_update_counters_for_requesting_step (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 154, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 154, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_update_counters_for_requesting_step", 0) < (0)) __PYX_ERR(0, 154, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_update_counters_for_requesting_step", 1, 1, 1, i); __PYX_ERR(0, 154, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 154, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_update_counters_for_requesting_step", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 154, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter._update_counters_for_requesting_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_2_update_counters_for_requesting_step(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self), __pyx_v_step_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_2_update_counters_for_requesting_step(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v_step_name) { + PyObject *__pyx_v_side_input_id = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_update_counters_for_requesting_step", 0); + + /* "apache_beam/runners/worker/opcounters.py":155 + * + * def _update_counters_for_requesting_step(self, step_name): + * side_input_id = counters.side_input_id(step_name, self.input_index) # <<<<<<<<<<<<<< + * self.scoped_state = self._state_sampler.scoped_state( + * self.declaring_step, 'read-sideinput', io_target=side_input_id) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_counters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_side_input_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_step_name, __pyx_v_self->input_index}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_side_input_id = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":156 + * def _update_counters_for_requesting_step(self, step_name): + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.declaring_step, 'read-sideinput', io_target=side_input_id) + * self.bytes_read_counter = self._counter_factory.get_counter( +*/ + __pyx_t_4 = __pyx_v_self->__pyx_base._state_sampler; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/opcounters.py":157 + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( + * self.declaring_step, 'read-sideinput', io_target=side_input_id) # <<<<<<<<<<<<<< + * self.bytes_read_counter = self._counter_factory.get_counter( + * CounterName( +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_self->declaring_step, __pyx_mstate_global->__pyx_kp_u_read_sideinput}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_io_target, __pyx_v_side_input_id, __pyx_t_2, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/opcounters.py":156 + * def _update_counters_for_requesting_step(self, step_name): + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.declaring_step, 'read-sideinput', io_target=side_input_id) + * self.bytes_read_counter = self._counter_factory.get_counter( +*/ + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState))))) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + __pyx_v_self->__pyx_base.scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":158 + * self.scoped_state = self._state_sampler.scoped_state( + * self.declaring_step, 'read-sideinput', io_target=side_input_id) + * self.bytes_read_counter = self._counter_factory.get_counter( # <<<<<<<<<<<<<< + * CounterName( + * 'read-sideinput-byte-count', +*/ + __pyx_t_2 = __pyx_v_self->__pyx_base._counter_factory; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/opcounters.py":159 + * self.declaring_step, 'read-sideinput', io_target=side_input_id) + * self.bytes_read_counter = self._counter_factory.get_counter( + * CounterName( # <<<<<<<<<<<<<< + * 'read-sideinput-byte-count', + * step_name=self.declaring_step, +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/runners/worker/opcounters.py":162 + * 'read-sideinput-byte-count', + * step_name=self.declaring_step, + * io_target=side_input_id), # <<<<<<<<<<<<<< + * Counter.SUM) + * +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_read_sideinput_byte_count}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_step_name, __pyx_v_self->declaring_step, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 159, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_io_target, __pyx_v_side_input_id, __pyx_t_7, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/opcounters.py":163 + * step_name=self.declaring_step, + * io_target=side_input_id), + * Counter.SUM) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter), __pyx_mstate_global->__pyx_n_u_SUM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_counter, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/opcounters.py":158 + * self.scoped_state = self._state_sampler.scoped_state( + * self.declaring_step, 'read-sideinput', io_target=side_input_id) + * self.bytes_read_counter = self._counter_factory.get_counter( # <<<<<<<<<<<<<< + * CounterName( + * 'read-sideinput-byte-count', +*/ + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + __pyx_v_self->__pyx_base.bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":154 + * self.update_current_step() + * + * def _update_counters_for_requesting_step(self, step_name): # <<<<<<<<<<<<<< + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter._update_counters_for_requesting_step", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_side_input_id); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":43 + * + * cdef class SideInputReadCounter(TransformIOCounter): + * cdef readonly object declaring_step # <<<<<<<<<<<<<< + * cdef readonly object input_index + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->declaring_step); + __pyx_r = __pyx_v_self->declaring_step; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":44 + * cdef class SideInputReadCounter(TransformIOCounter): + * cdef readonly object declaring_step + * cdef readonly object input_index # <<<<<<<<<<<<<< + * + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->input_index); + __pyx_r = __pyx_v_self->input_index; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.declaring_step, self.input_index, self.scoped_state) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base._counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._latest_step); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._latest_step); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base._latest_step) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base._state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base._state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->declaring_step); + __Pyx_GIVEREF(__pyx_v_self->declaring_step); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->declaring_step) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->input_index); + __Pyx_GIVEREF(__pyx_v_self->input_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->input_index) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.scoped_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_v_self->__pyx_base.scoped_state)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.declaring_step, self.input_index, self.scoped_state) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.declaring_step, self.input_index, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.declaring_step is not None or self.input_index is not None or self.scoped_state is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._latest_step, self._state_sampler, self.bytes_read_counter, self.declaring_step, self.input_index, self.scoped_state) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.declaring_step is not None or self.input_index is not None or self.scoped_state is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->__pyx_base._counter_factory != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base._latest_step != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base._state_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.bytes_read_counter) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->declaring_step != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->input_index != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.scoped_state) != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.declaring_step is not None or self.input_index is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.declaring_step is not None or self.input_index is not None or self.scoped_state is not None + * if use_setstate: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SideInputReadCoun); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_268225155); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_268225155); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_268225155) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self._latest_step is not None or self._state_sampler is not None or self.bytes_read_counter is not None or self.declaring_step is not None or self.input_index is not None or self.scoped_state is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, None), state + * else: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SideInputReadCounter__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SideInputReadCoun); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_268225155); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_268225155); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_268225155) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SideInputReadCounter__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SideInputReadCounter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SideInputReadCounter__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SideInputReadCounter__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SideInputReadCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":168 + * class SumAccumulator(object): + * """Accumulator for collecting byte counts.""" + * def __init__(self): # <<<<<<<<<<<<<< + * self._value = 0 + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/runners/worker/opcounters.py":169 + * """Accumulator for collecting byte counts.""" + * def __init__(self): + * self._value = 0 # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __pyx_v_self->_value = 0; + + /* "apache_beam/runners/worker/opcounters.py":168 + * class SumAccumulator(object): + * """Accumulator for collecting byte counts.""" + * def __init__(self): # <<<<<<<<<<<<<< + * self._value = 0 + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":171 + * self._value = 0 + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._value += value + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_update(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int64_t __pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":172 + * + * def update(self, value): + * self._value += value # <<<<<<<<<<<<<< + * + * def value(self): +*/ + __pyx_v_self->_value = (__pyx_v_self->_value + __pyx_v_value); + + /* "apache_beam/runners/worker/opcounters.py":171 + * self._value = 0 + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._value += value + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_value; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 171, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 171, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 171, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error) + } + __pyx_v_value = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 171, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_2update(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_2update(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int64_t __pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":174 + * self._value += value + * + * def value(self): # <<<<<<<<<<<<<< + * return self._value + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int64_t __pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_value(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, int __pyx_skip_dispatch) { + int64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int64_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("value", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":175 + * + * def value(self): + * return self._value # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_self->_value; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":174 + * self._value += value + * + * def value(self): # <<<<<<<<<<<<<< + * return self._value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value = {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_4value(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_4value(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("value", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_value(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_6__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumAccumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_196964917); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_196964917); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_196964917) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, None), state + * else: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumAccumulator); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_196964917); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_196964917); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_196964917) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_8__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SumAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.SumAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":180 + * class OperationCounters(object): + * """The set of basic counters to attach to an Operation.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_coder = 0; + PyObject *__pyx_v_index = 0; + PyObject *__pyx_v_suffix = 0; + PyObject *__pyx_v_producer_type_hints = 0; + PyObject *__pyx_v_producer_batch_converter = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_coder,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_suffix,&__pyx_mstate_global->__pyx_n_u_producer_type_hints,&__pyx_mstate_global->__pyx_n_u_producer_batch_converter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 180, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 180, __pyx_L3_error) + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_out)); + + /* "apache_beam/runners/worker/opcounters.py":187 + * index, + * suffix='out', + * producer_type_hints=None, # <<<<<<<<<<<<<< + * producer_batch_converter=None, # type: Optional[BatchConverter] + * ): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/opcounters.py":188 + * suffix='out', + * producer_type_hints=None, + * producer_batch_converter=None, # type: Optional[BatchConverter] # <<<<<<<<<<<<<< + * ): + * self._counter_factory = counter_factory +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 7, i); __PYX_ERR(0, 180, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 180, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 180, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 180, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 180, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 180, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_out)); + + /* "apache_beam/runners/worker/opcounters.py":187 + * index, + * suffix='out', + * producer_type_hints=None, # <<<<<<<<<<<<<< + * producer_batch_converter=None, # type: Optional[BatchConverter] + * ): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/opcounters.py":188 + * suffix='out', + * producer_type_hints=None, + * producer_batch_converter=None, # type: Optional[BatchConverter] # <<<<<<<<<<<<<< + * ): + * self._counter_factory = counter_factory +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_counter_factory = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_coder = values[2]; + __pyx_v_index = values[3]; + __pyx_v_suffix = values[4]; + __pyx_v_producer_type_hints = values[5]; + __pyx_v_producer_batch_converter = values[6]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 7, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_coder, __pyx_v_index, __pyx_v_suffix, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter); + + /* "apache_beam/runners/worker/opcounters.py":180 + * class OperationCounters(object): + * """The set of basic counters to attach to an Operation.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_coder, PyObject *__pyx_v_index, PyObject *__pyx_v_suffix, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6[5]; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/opcounters.py":190 + * producer_batch_converter=None, # type: Optional[BatchConverter] + * ): + * self._counter_factory = counter_factory # <<<<<<<<<<<<<< + * self.element_counter = counter_factory.get_counter( + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) +*/ + __Pyx_INCREF(__pyx_v_counter_factory); + __Pyx_GIVEREF(__pyx_v_counter_factory); + __Pyx_GOTREF(__pyx_v_self->_counter_factory); + __Pyx_DECREF(__pyx_v_self->_counter_factory); + __pyx_v_self->_counter_factory = __pyx_v_counter_factory; + + /* "apache_beam/runners/worker/opcounters.py":191 + * ): + * self._counter_factory = counter_factory + * self.element_counter = counter_factory.get_counter( # <<<<<<<<<<<<<< + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) + * self.mean_byte_counter = counter_factory.get_counter( +*/ + __pyx_t_2 = __pyx_v_counter_factory; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/opcounters.py":192 + * self._counter_factory = counter_factory + * self.element_counter = counter_factory.get_counter( + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) # <<<<<<<<<<<<<< + * self.mean_byte_counter = counter_factory.get_counter( + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), +*/ + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_step_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_suffix), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_index), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6[0] = __pyx_t_3; + __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_6[2] = __pyx_t_4; + __pyx_t_6[3] = __pyx_t_5; + __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_ElementCount; + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 13, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter), __pyx_mstate_global->__pyx_n_u_SUM); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_counter, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/opcounters.py":191 + * ): + * self._counter_factory = counter_factory + * self.element_counter = counter_factory.get_counter( # <<<<<<<<<<<<<< + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) + * self.mean_byte_counter = counter_factory.get_counter( +*/ + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->element_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->element_counter); + __pyx_v_self->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":193 + * self.element_counter = counter_factory.get_counter( + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) + * self.mean_byte_counter = counter_factory.get_counter( # <<<<<<<<<<<<<< + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), + * Counter.BEAM_DISTRIBUTION) +*/ + __pyx_t_5 = __pyx_v_counter_factory; + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/worker/opcounters.py":194 + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) + * self.mean_byte_counter = counter_factory.get_counter( + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), # <<<<<<<<<<<<<< + * Counter.BEAM_DISTRIBUTION) + * self.coder_impl = coder.get_impl() if coder else None +*/ + __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_step_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_suffix), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_index), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6[0] = __pyx_t_7; + __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_6[2] = __pyx_t_2; + __pyx_t_6[3] = __pyx_t_4; + __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_MeanByteCount; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 14, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":195 + * self.mean_byte_counter = counter_factory.get_counter( + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), + * Counter.BEAM_DISTRIBUTION) # <<<<<<<<<<<<<< + * self.coder_impl = coder.get_impl() if coder else None + * self.active_accumulator = None # type: Optional[SumAccumulator] +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter), __pyx_mstate_global->__pyx_n_u_BEAM_DISTRIBUTION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_counter, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/opcounters.py":193 + * self.element_counter = counter_factory.get_counter( + * '%s-%s%s-ElementCount' % (step_name, suffix, index), Counter.SUM) + * self.mean_byte_counter = counter_factory.get_counter( # <<<<<<<<<<<<<< + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), + * Counter.BEAM_DISTRIBUTION) +*/ + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->mean_byte_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->mean_byte_counter); + __pyx_v_self->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":196 + * '%s-%s%s-MeanByteCount' % (step_name, suffix, index), + * Counter.BEAM_DISTRIBUTION) + * self.coder_impl = coder.get_impl() if coder else None # <<<<<<<<<<<<<< + * self.active_accumulator = None # type: Optional[SumAccumulator] + * self.current_size = None # type: Optional[int] +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_coder); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 196, __pyx_L1_error) + if (__pyx_t_9) { + __pyx_t_3 = __pyx_v_coder; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->coder_impl); + __Pyx_DECREF(__pyx_v_self->coder_impl); + __pyx_v_self->coder_impl = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":197 + * Counter.BEAM_DISTRIBUTION) + * self.coder_impl = coder.get_impl() if coder else None + * self.active_accumulator = None # type: Optional[SumAccumulator] # <<<<<<<<<<<<<< + * self.current_size = None # type: Optional[int] + * self._sample_counter = 0 +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_v_self->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)Py_None); + + /* "apache_beam/runners/worker/opcounters.py":198 + * self.coder_impl = coder.get_impl() if coder else None + * self.active_accumulator = None # type: Optional[SumAccumulator] + * self.current_size = None # type: Optional[int] # <<<<<<<<<<<<<< + * self._sample_counter = 0 + * self._next_sample = 0 +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_size); + __Pyx_DECREF(__pyx_v_self->current_size); + __pyx_v_self->current_size = Py_None; + + /* "apache_beam/runners/worker/opcounters.py":199 + * self.active_accumulator = None # type: Optional[SumAccumulator] + * self.current_size = None # type: Optional[int] + * self._sample_counter = 0 # <<<<<<<<<<<<<< + * self._next_sample = 0 + * self.output_type_constraints = producer_type_hints or {} +*/ + __pyx_v_self->_sample_counter = 0; + + /* "apache_beam/runners/worker/opcounters.py":200 + * self.current_size = None # type: Optional[int] + * self._sample_counter = 0 + * self._next_sample = 0 # <<<<<<<<<<<<<< + * self.output_type_constraints = producer_type_hints or {} + * self.producer_batch_converter = producer_batch_converter +*/ + __pyx_v_self->_next_sample = 0; + + /* "apache_beam/runners/worker/opcounters.py":201 + * self._sample_counter = 0 + * self._next_sample = 0 + * self.output_type_constraints = producer_type_hints or {} # <<<<<<<<<<<<<< + * self.producer_batch_converter = producer_batch_converter + * +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_producer_type_hints); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 201, __pyx_L1_error) + if (!__pyx_t_9) { + } else { + __Pyx_INCREF(__pyx_v_producer_type_hints); + __pyx_t_1 = __pyx_v_producer_type_hints; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->output_type_constraints); + __Pyx_DECREF(__pyx_v_self->output_type_constraints); + __pyx_v_self->output_type_constraints = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":202 + * self._next_sample = 0 + * self.output_type_constraints = producer_type_hints or {} + * self.producer_batch_converter = producer_batch_converter # <<<<<<<<<<<<<< + * + * def update_from(self, windowed_value): +*/ + __Pyx_INCREF(__pyx_v_producer_batch_converter); + __Pyx_GIVEREF(__pyx_v_producer_batch_converter); + __Pyx_GOTREF(__pyx_v_self->producer_batch_converter); + __Pyx_DECREF(__pyx_v_self->producer_batch_converter); + __pyx_v_self->producer_batch_converter = __pyx_v_producer_batch_converter; + + /* "apache_beam/runners/worker/opcounters.py":180 + * class OperationCounters(object): + * """The set of basic counters to attach to an Operation.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":204 + * self.producer_batch_converter = producer_batch_converter + * + * def update_from(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_from", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_windowed_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":208 + * + * """Add one value to this counter.""" + * if self._should_sample(): # <<<<<<<<<<<<<< + * self.do_sample(windowed_value) + * +*/ + __pyx_t_6 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error) + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/opcounters.py":209 + * """Add one value to this counter.""" + * if self._should_sample(): + * self.do_sample(windowed_value) # <<<<<<<<<<<<<< + * + * def update_from_batch(self, windowed_batch): +*/ + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_do_sample(__pyx_v_self, __pyx_v_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":208 + * + * """Add one value to this counter.""" + * if self._should_sample(): # <<<<<<<<<<<<<< + * self.do_sample(windowed_value) + * +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":204 + * self.producer_batch_converter = producer_batch_converter + * + * def update_from(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_2update_from, "Add one value to this counter."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from = {"update_from", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_2update_from}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_from (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 204, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_from", 0) < (0)) __PYX_ERR(0, 204, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_from", 1, 1, 1, i); __PYX_ERR(0, 204, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 204, __pyx_L3_error) + } + __pyx_v_windowed_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_from", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 204, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_2update_from(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_2update_from(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_from", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":211 + * self.do_sample(windowed_value) + * + * def update_from_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedBatch) -> None + * assert self.producer_batch_converter is not None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_batch, int __pyx_skip_dispatch) { + PyObject *__pyx_v_batch_length = NULL; + PyObject *__pyx_v_mean_element_size = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_from_batch", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_from_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_windowed_batch}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":213 + * def update_from_batch(self, windowed_batch): + * # type: (windowed_value.WindowedBatch) -> None + * assert self.producer_batch_converter is not None # <<<<<<<<<<<<<< + * assert isinstance(windowed_batch, windowed_value.HomogeneousWindowedBatch) + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_6 = (__pyx_v_self->producer_batch_converter != Py_None); + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 213, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 213, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/opcounters.py":214 + * # type: (windowed_value.WindowedBatch) -> None + * assert self.producer_batch_converter is not None + * assert isinstance(windowed_batch, windowed_value.HomogeneousWindowedBatch) # <<<<<<<<<<<<<< + * + * batch_length = self.producer_batch_converter.get_length( +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_IsInstance(__pyx_v_windowed_batch, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 214, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 214, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/opcounters.py":216 + * assert isinstance(windowed_batch, windowed_value.HomogeneousWindowedBatch) + * + * batch_length = self.producer_batch_converter.get_length( # <<<<<<<<<<<<<< + * windowed_batch.values) + * self.element_counter.update(batch_length) +*/ + __pyx_t_1 = __pyx_v_self->producer_batch_converter; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/worker/opcounters.py":217 + * + * batch_length = self.producer_batch_converter.get_length( + * windowed_batch.values) # <<<<<<<<<<<<<< + * self.element_counter.update(batch_length) + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_length, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_batch_length = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":218 + * batch_length = self.producer_batch_converter.get_length( + * windowed_batch.values) + * self.element_counter.update(batch_length) # <<<<<<<<<<<<<< + * + * mean_element_size = self.producer_batch_converter.estimate_byte_size( +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *)__pyx_v_self->element_counter->__pyx_vtab)->update(__pyx_v_self->element_counter, __pyx_v_batch_length, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L1_error) + + /* "apache_beam/runners/worker/opcounters.py":220 + * self.element_counter.update(batch_length) + * + * mean_element_size = self.producer_batch_converter.estimate_byte_size( # <<<<<<<<<<<<<< + * windowed_batch.values) / batch_length + * self.mean_byte_counter.update_n(mean_element_size, batch_length) +*/ + __pyx_t_4 = __pyx_v_self->producer_batch_converter; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/opcounters.py":221 + * + * mean_element_size = self.producer_batch_converter.estimate_byte_size( + * windowed_batch.values) / batch_length # <<<<<<<<<<<<<< + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_batch, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_byte_size, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_v_batch_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_mean_element_size = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":222 + * mean_element_size = self.producer_batch_converter.estimate_byte_size( + * windowed_batch.values) / batch_length + * self.mean_byte_counter.update_n(mean_element_size, batch_length) # <<<<<<<<<<<<<< + * + * def _observable_callback(self, inner_coder_impl, accumulator): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->mean_byte_counter); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_mean_element_size, __pyx_v_batch_length}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_n, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":211 + * self.do_sample(windowed_value) + * + * def update_from_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedBatch) -> None + * assert self.producer_batch_converter is not None +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_batch_length); + __Pyx_XDECREF(__pyx_v_mean_element_size); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch = {"update_from_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_from_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_from_batch", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_from_batch", 1, 1, 1, i); __PYX_ERR(0, 211, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + } + __pyx_v_windowed_batch = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_from_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_4update_from_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_4update_from_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_from_batch", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_from_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":224 + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * + * def _observable_callback(self, inner_coder_impl, accumulator): # <<<<<<<<<<<<<< + * def _observable_callback_inner(value, is_encoded=False): + * # TODO(ccy): If this stream is large, sample it as well. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback = {"_observable_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_inner_coder_impl = 0; + PyObject *__pyx_v_accumulator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_observable_callback (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inner_coder_impl,&__pyx_mstate_global->__pyx_n_u_accumulator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 224, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_observable_callback", 0) < (0)) __PYX_ERR(0, 224, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_observable_callback", 1, 2, 2, i); __PYX_ERR(0, 224, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + } + __pyx_v_inner_coder_impl = values[0]; + __pyx_v_accumulator = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_observable_callback", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._observable_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_6_observable_callback(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v_inner_coder_impl, __pyx_v_accumulator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":225 + * + * def _observable_callback(self, inner_coder_impl, accumulator): + * def _observable_callback_inner(value, is_encoded=False): # <<<<<<<<<<<<<< + * # TODO(ccy): If this stream is large, sample it as well. + * # To do this, we'll need to compute the average size of elements +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback_1_observable_callback_inner(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback_1_observable_callback_inner = {"_observable_callback_inner", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback_1_observable_callback_inner, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback_1_observable_callback_inner(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_is_encoded = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_observable_callback_inner (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_is_encoded,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 225, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 225, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 225, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_observable_callback_inner", 0) < (0)) __PYX_ERR(0, 225, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_observable_callback_inner", 0, 1, 2, i); __PYX_ERR(0, 225, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 225, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 225, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_value = values[0]; + __pyx_v_is_encoded = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_observable_callback_inner", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 225, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._observable_callback._observable_callback_inner", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback__observable_callback_inner(__pyx_self, __pyx_v_value, __pyx_v_is_encoded); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback__observable_callback_inner(PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_is_encoded) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *__pyx_outer_scope; + Py_ssize_t __pyx_v_size; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_observable_callback_inner", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "apache_beam/runners/worker/opcounters.py":231 + * # We'll also want make sure we sample at least some of this stream + * # (as self.should_sample() may be sampling very sparsely by now). + * if is_encoded: # <<<<<<<<<<<<<< + * size = len(value) + * accumulator.update(size) +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_encoded); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":232 + * # (as self.should_sample() may be sampling very sparsely by now). + * if is_encoded: + * size = len(value) # <<<<<<<<<<<<<< + * accumulator.update(size) + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_v_size = __pyx_t_2; + + /* "apache_beam/runners/worker/opcounters.py":233 + * if is_encoded: + * size = len(value) + * accumulator.update(size) # <<<<<<<<<<<<<< + * else: + * accumulator.update(inner_coder_impl.estimate_size(value)) +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_accumulator)) { __Pyx_RaiseClosureNameError("accumulator"); __PYX_ERR(0, 233, __pyx_L1_error) } + __pyx_t_4 = __pyx_cur_scope->__pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/opcounters.py":231 + * # We'll also want make sure we sample at least some of this stream + * # (as self.should_sample() may be sampling very sparsely by now). + * if is_encoded: # <<<<<<<<<<<<<< + * size = len(value) + * accumulator.update(size) +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/worker/opcounters.py":235 + * accumulator.update(size) + * else: + * accumulator.update(inner_coder_impl.estimate_size(value)) # <<<<<<<<<<<<<< + * + * return _observable_callback_inner +*/ + /*else*/ { + if (unlikely(!__pyx_cur_scope->__pyx_v_accumulator)) { __Pyx_RaiseClosureNameError("accumulator"); __PYX_ERR(0, 235, __pyx_L1_error) } + __pyx_t_5 = __pyx_cur_scope->__pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(!__pyx_cur_scope->__pyx_v_inner_coder_impl)) { __Pyx_RaiseClosureNameError("inner_coder_impl"); __PYX_ERR(0, 235, __pyx_L1_error) } + __pyx_t_7 = __pyx_cur_scope->__pyx_v_inner_coder_impl; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_estimate_size, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "apache_beam/runners/worker/opcounters.py":225 + * + * def _observable_callback(self, inner_coder_impl, accumulator): + * def _observable_callback_inner(value, is_encoded=False): # <<<<<<<<<<<<<< + * # TODO(ccy): If this stream is large, sample it as well. + * # To do this, we'll need to compute the average size of elements +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._observable_callback._observable_callback_inner", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":224 + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * + * def _observable_callback(self, inner_coder_impl, accumulator): # <<<<<<<<<<<<<< + * def _observable_callback_inner(value, is_encoded=False): + * # TODO(ccy): If this stream is large, sample it as well. +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_6_observable_callback(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_inner_coder_impl, PyObject *__pyx_v_accumulator) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *__pyx_cur_scope; + PyObject *__pyx_v__observable_callback_inner = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_observable_callback", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 224, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_inner_coder_impl = __pyx_v_inner_coder_impl; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inner_coder_impl); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inner_coder_impl); + __pyx_cur_scope->__pyx_v_accumulator = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_accumulator); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_accumulator); + + /* "apache_beam/runners/worker/opcounters.py":225 + * + * def _observable_callback(self, inner_coder_impl, accumulator): + * def _observable_callback_inner(value, is_encoded=False): # <<<<<<<<<<<<<< + * # TODO(ccy): If this stream is large, sample it as well. + * # To do this, we'll need to compute the average size of elements +*/ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20_observable_callback_1_observable_callback_inner, 0, __pyx_mstate_global->__pyx_n_u_observable_callback_locals__obs, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1]); + __pyx_v__observable_callback_inner = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":237 + * accumulator.update(inner_coder_impl.estimate_size(value)) + * + * return _observable_callback_inner # <<<<<<<<<<<<<< + * + * def type_check(self, value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v__observable_callback_inner); + __pyx_r = __pyx_v__observable_callback_inner; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":224 + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * + * def _observable_callback(self, inner_coder_impl, accumulator): # <<<<<<<<<<<<<< + * def _observable_callback_inner(value, is_encoded=False): + * # TODO(ccy): If this stream is large, sample it as well. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._observable_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__observable_callback_inner); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":239 + * return _observable_callback_inner + * + * def type_check(self, value): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_type_check(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_transform_label = NULL; + PyObject *__pyx_v_type_constraint_tuple = NULL; + PyObject *__pyx_v_parameter_name = NULL; + PyObject *__pyx_v_constraint = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_error_msg = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_traceback = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + int __pyx_t_17; + PyObject *__pyx_t_18[4]; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + int __pyx_t_22; + char const *__pyx_t_23; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + PyObject *__pyx_t_28 = NULL; + PyObject *__pyx_t_29 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("type_check", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_type_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":241 + * def type_check(self, value): + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( # <<<<<<<<<<<<<< + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple +*/ + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/opcounters.py":242 + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( + * self.output_type_constraints.items()): # <<<<<<<<<<<<<< + * parameter_name, constraint = type_constraint_tuple + * try: +*/ + if (unlikely(__pyx_v_self->output_type_constraints == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 242, __pyx_L1_error) + } + + /* "apache_beam/runners/worker/opcounters.py":241 + * def type_check(self, value): + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( # <<<<<<<<<<<<<< + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple +*/ + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->output_type_constraints, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + + /* "apache_beam/runners/worker/opcounters.py":242 + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( + * self.output_type_constraints.items()): # <<<<<<<<<<<<<< + * parameter_name, constraint = type_constraint_tuple + * try: +*/ + __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_8); + if (unlikely(__pyx_t_9 == 0)) break; + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/opcounters.py":241 + * def type_check(self, value): + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( # <<<<<<<<<<<<<< + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple +*/ + __Pyx_XDECREF_SET(__pyx_v_transform_label, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_type_constraint_tuple, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":243 + * for transform_label, type_constraint_tuple in ( + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple # <<<<<<<<<<<<<< + * try: + * _check_instance_type(constraint, value, parameter_name, verbose=True) +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_type_constraint_tuple))) || (PyList_CheckExact(__pyx_v_type_constraint_tuple))) { + PyObject* sequence = __pyx_v_type_constraint_tuple; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 243, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_type_constraint_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_parameter_name, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":244 + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple + * try: # <<<<<<<<<<<<<< + * _check_instance_type(constraint, value, parameter_name, verbose=True) + * except TypeCheckError as e: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "apache_beam/runners/worker/opcounters.py":245 + * parameter_name, constraint = type_constraint_tuple + * try: + * _check_instance_type(constraint, value, parameter_name, verbose=True) # <<<<<<<<<<<<<< + * except TypeCheckError as e: + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_check_instance_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_constraint, __pyx_v_value, __pyx_v_parameter_name}; + __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 245, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_verbose, Py_True, __pyx_t_14, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 245, __pyx_L7_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":244 + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple + * try: # <<<<<<<<<<<<<< + * _check_instance_type(constraint, value, parameter_name, verbose=True) + * except TypeCheckError as e: +*/ + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L14_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":246 + * try: + * _check_instance_type(constraint, value, parameter_name, verbose=True) + * except TypeCheckError as e: # <<<<<<<<<<<<<< + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) + * if not transform_label.startswith('ParDo'): +*/ + __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TypeCheckError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_14); + __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0; + if (__pyx_t_9) { + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.type_check", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 246, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_e = __pyx_t_3; + /*try:*/ { + + /* "apache_beam/runners/worker/opcounters.py":248 + * except TypeCheckError as e: + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) + * if not transform_label.startswith('ParDo'): # <<<<<<<<<<<<<< + * transform_label = 'ParDo(%s)' % transform_label + * error_msg = ( +*/ + __pyx_t_15 = __pyx_v_transform_label; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_mstate_global->__pyx_n_u_ParDo}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 248, __pyx_L20_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_17 = (!__pyx_t_16); + if (__pyx_t_17) { + + /* "apache_beam/runners/worker/opcounters.py":249 + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) + * if not transform_label.startswith('ParDo'): + * transform_label = 'ParDo(%s)' % transform_label # <<<<<<<<<<<<<< + * error_msg = ( + * 'Runtime type violation detected within %s: ' +*/ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_ParDo_s, __pyx_v_transform_label); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_transform_label, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":248 + * except TypeCheckError as e: + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) + * if not transform_label.startswith('ParDo'): # <<<<<<<<<<<<<< + * transform_label = 'ParDo(%s)' % transform_label + * error_msg = ( +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":252 + * error_msg = ( + * 'Runtime type violation detected within %s: ' + * '%s' % (transform_label, e)) # <<<<<<<<<<<<<< + * _, _, traceback = sys.exc_info() + * raise TypeCheckError(error_msg).with_traceback(traceback) +*/ + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_transform_label), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_e), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 252, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_18[0] = __pyx_mstate_global->__pyx_kp_u_Runtime_type_violation_detected; + __pyx_t_18[1] = __pyx_t_4; + __pyx_t_18[2] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_18[3] = __pyx_t_15; + + /* "apache_beam/runners/worker/opcounters.py":251 + * transform_label = 'ParDo(%s)' % transform_label + * error_msg = ( + * 'Runtime type violation detected within %s: ' # <<<<<<<<<<<<<< + * '%s' % (transform_label, e)) + * _, _, traceback = sys.exc_info() +*/ + __pyx_t_19 = __Pyx_PyUnicode_Join(__pyx_t_18, 4, 39 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15)); + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 251, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_v_error_msg = ((PyObject*)__pyx_t_19); + __pyx_t_19 = 0; + + /* "apache_beam/runners/worker/opcounters.py":253 + * 'Runtime type violation detected within %s: ' + * '%s' % (transform_label, e)) + * _, _, traceback = sys.exc_info() # <<<<<<<<<<<<<< + * raise TypeCheckError(error_msg).with_traceback(traceback) + * +*/ + __pyx_t_15 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_20))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_20); + assert(__pyx_t_15); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_20, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; + __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_19); + } + if ((likely(PyTuple_CheckExact(__pyx_t_19))) || (PyList_CheckExact(__pyx_t_19))) { + PyObject* sequence = __pyx_t_19; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 253, __pyx_L20_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_20 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_20); + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_15); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_20 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_XGOTREF(__pyx_t_20); + __pyx_t_15 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_XGOTREF(__pyx_t_15); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_20 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_15 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_21 = PyObject_GetIter(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 253, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_21); + index = 0; __pyx_t_20 = __pyx_t_10(__pyx_t_21); if (unlikely(!__pyx_t_20)) goto __pyx_L23_unpacking_failed; + __Pyx_GOTREF(__pyx_t_20); + index = 1; __pyx_t_15 = __pyx_t_10(__pyx_t_21); if (unlikely(!__pyx_t_15)) goto __pyx_L23_unpacking_failed; + __Pyx_GOTREF(__pyx_t_15); + index = 2; __pyx_t_4 = __pyx_t_10(__pyx_t_21); if (unlikely(!__pyx_t_4)) goto __pyx_L23_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_21), 3) < (0)) __PYX_ERR(0, 253, __pyx_L20_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L24_unpacking_done; + __pyx_L23_unpacking_failed:; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 253, __pyx_L20_error) + __pyx_L24_unpacking_done:; + } + __pyx_v__ = __pyx_t_20; + __pyx_t_20 = 0; + __Pyx_DECREF_SET(__pyx_v__, __pyx_t_15); + __pyx_t_15 = 0; + __pyx_v_traceback = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":254 + * '%s' % (transform_label, e)) + * _, _, traceback = sys.exc_info() + * raise TypeCheckError(error_msg).with_traceback(traceback) # <<<<<<<<<<<<<< + * + * def do_sample(self, windowed_value): +*/ + __pyx_t_20 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_TypeCheckError); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 254, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_21))) { + __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_21); + assert(__pyx_t_20); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21); + __Pyx_INCREF(__pyx_t_20); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_21, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_v_error_msg}; + __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 254, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_t_4 = __pyx_t_15; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_traceback}; + __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_traceback, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 254, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_19); + } + __Pyx_Raise(__pyx_t_19, 0, 0, 0); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __PYX_ERR(0, 254, __pyx_L20_error) + } + + /* "apache_beam/runners/worker/opcounters.py":246 + * try: + * _check_instance_type(constraint, value, parameter_name, verbose=True) + * except TypeCheckError as e: # <<<<<<<<<<<<<< + * # TODO: Remove the 'ParDo' prefix for the label name (BEAM-10710) + * if not transform_label.startswith('ParDo'): +*/ + /*finally:*/ { + __pyx_L20_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); + if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_27); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __pyx_t_9 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_27); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26); + __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; + __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23; + goto __pyx_L9_except_error; + } + } + } + goto __pyx_L9_except_error; + + /* "apache_beam/runners/worker/opcounters.py":244 + * self.output_type_constraints.items()): + * parameter_name, constraint = type_constraint_tuple + * try: # <<<<<<<<<<<<<< + * _check_instance_type(constraint, value, parameter_name, verbose=True) + * except TypeCheckError as e: +*/ + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L14_try_end:; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":239 + * return _observable_callback_inner + * + * def type_check(self, value): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_XDECREF(__pyx_t_21); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.type_check", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_transform_label); + __Pyx_XDECREF(__pyx_v_type_constraint_tuple); + __Pyx_XDECREF(__pyx_v_parameter_name); + __Pyx_XDECREF(__pyx_v_constraint); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_error_msg); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_traceback); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check = {"type_check", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("type_check (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 239, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 239, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "type_check", 0) < (0)) __PYX_ERR(0, 239, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("type_check", 1, 1, 1, i); __PYX_ERR(0, 239, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 239, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("type_check", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 239, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.type_check", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_8type_check(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_8type_check(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("type_check", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_type_check(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.type_check", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":256 + * raise TypeCheckError(error_msg).with_traceback(traceback) + * + * def do_sample(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue) -> None + * self.type_check(windowed_value.value) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_do_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_windowed_value) { + PyObject *__pyx_v_size = NULL; + PyObject *__pyx_v_observables = NULL; + PyObject *__pyx_v_observable = NULL; + PyObject *__pyx_v_inner_coder_impl = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("do_sample", 0); + + /* "apache_beam/runners/worker/opcounters.py":258 + * def do_sample(self, windowed_value): + * # type: (windowed_value.WindowedValue) -> None + * self.type_check(windowed_value.value) # <<<<<<<<<<<<<< + * + * size, observables = ( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowed_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->__pyx_vtab)->type_check(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":261 + * + * size, observables = ( + * self.coder_impl.get_estimated_size_and_observables(windowed_value)) # type: ignore[union-attr] # <<<<<<<<<<<<<< + * if not observables: + * self.current_size = size +*/ + __pyx_t_1 = __pyx_v_self->coder_impl; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_windowed_value}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_estimated_size_and_observabl, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 260, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + + /* "apache_beam/runners/worker/opcounters.py":260 + * self.type_check(windowed_value.value) + * + * size, observables = ( # <<<<<<<<<<<<<< + * self.coder_impl.get_estimated_size_and_observables(windowed_value)) # type: ignore[union-attr] + * if not observables: +*/ + __pyx_v_size = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_observables = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":262 + * size, observables = ( + * self.coder_impl.get_estimated_size_and_observables(windowed_value)) # type: ignore[union-attr] + * if not observables: # <<<<<<<<<<<<<< + * self.current_size = size + * else: +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_observables); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + + /* "apache_beam/runners/worker/opcounters.py":263 + * self.coder_impl.get_estimated_size_and_observables(windowed_value)) # type: ignore[union-attr] + * if not observables: + * self.current_size = size # <<<<<<<<<<<<<< + * else: + * self.active_accumulator = SumAccumulator() +*/ + __Pyx_INCREF(__pyx_v_size); + __Pyx_GIVEREF(__pyx_v_size); + __Pyx_GOTREF(__pyx_v_self->current_size); + __Pyx_DECREF(__pyx_v_self->current_size); + __pyx_v_self->current_size = __pyx_v_size; + + /* "apache_beam/runners/worker/opcounters.py":262 + * size, observables = ( + * self.coder_impl.get_estimated_size_and_observables(windowed_value)) # type: ignore[union-attr] + * if not observables: # <<<<<<<<<<<<<< + * self.current_size = size + * else: +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/opcounters.py":265 + * self.current_size = size + * else: + * self.active_accumulator = SumAccumulator() # <<<<<<<<<<<<<< + * self.active_accumulator.update(size) + * for observable, inner_coder_impl in observables: +*/ + /*else*/ { + __pyx_t_4 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_v_self->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":266 + * else: + * self.active_accumulator = SumAccumulator() + * self.active_accumulator.update(size) # <<<<<<<<<<<<<< + * for observable, inner_coder_impl in observables: + * observable.register_observer( +*/ + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_size); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self->active_accumulator->__pyx_vtab)->update(__pyx_v_self->active_accumulator, __pyx_t_9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":267 + * self.active_accumulator = SumAccumulator() + * self.active_accumulator.update(size) + * for observable, inner_coder_impl in observables: # <<<<<<<<<<<<<< + * observable.register_observer( + * self._observable_callback( +*/ + if (likely(PyList_CheckExact(__pyx_v_observables)) || PyTuple_CheckExact(__pyx_v_observables)) { + __pyx_t_2 = __pyx_v_observables; __Pyx_INCREF(__pyx_t_2); + __pyx_t_10 = 0; + __pyx_t_11 = NULL; + } else { + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_observables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 267, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_11)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 267, __pyx_L1_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_10; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 267, __pyx_L1_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); + #endif + ++__pyx_t_10; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_11(__pyx_t_2); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 267, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 267, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); + index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_12); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_observable, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_inner_coder_impl, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/opcounters.py":268 + * self.active_accumulator.update(size) + * for observable, inner_coder_impl in observables: + * observable.register_observer( # <<<<<<<<<<<<<< + * self._observable_callback( + * inner_coder_impl, self.active_accumulator)) +*/ + __pyx_t_5 = __pyx_v_observable; + __Pyx_INCREF(__pyx_t_5); + + /* "apache_beam/runners/worker/opcounters.py":269 + * for observable, inner_coder_impl in observables: + * observable.register_observer( + * self._observable_callback( # <<<<<<<<<<<<<< + * inner_coder_impl, self.active_accumulator)) + * +*/ + __pyx_t_12 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_12); + + /* "apache_beam/runners/worker/opcounters.py":270 + * observable.register_observer( + * self._observable_callback( + * inner_coder_impl, self.active_accumulator)) # <<<<<<<<<<<<<< + * + * def update_collect(self): +*/ + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_inner_coder_impl, ((PyObject *)__pyx_v_self->active_accumulator)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_observable_callback, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register_observer, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/opcounters.py":267 + * self.active_accumulator = SumAccumulator() + * self.active_accumulator.update(size) + * for observable, inner_coder_impl in observables: # <<<<<<<<<<<<<< + * observable.register_observer( + * self._observable_callback( +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/worker/opcounters.py":256 + * raise TypeCheckError(error_msg).with_traceback(traceback) + * + * def do_sample(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue) -> None + * self.type_check(windowed_value.value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.do_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XDECREF(__pyx_v_observables); + __Pyx_XDECREF(__pyx_v_observable); + __Pyx_XDECREF(__pyx_v_inner_coder_impl); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":272 + * inner_coder_impl, self.active_accumulator)) + * + * def update_collect(self): # <<<<<<<<<<<<<< + * """Collects the accumulated size estimates. + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_collect(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_collect", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_collect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":278 + * for the total and store the result in a counter. + * """ + * self.element_counter.update(1) # <<<<<<<<<<<<<< + * if self.current_size is not None: + * self.mean_byte_counter.update(self.current_size) +*/ + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *)__pyx_v_self->element_counter->__pyx_vtab)->update(__pyx_v_self->element_counter, __pyx_mstate_global->__pyx_int_1, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 278, __pyx_L1_error) + + /* "apache_beam/runners/worker/opcounters.py":279 + * """ + * self.element_counter.update(1) + * if self.current_size is not None: # <<<<<<<<<<<<<< + * self.mean_byte_counter.update(self.current_size) + * self.current_size = None +*/ + __pyx_t_6 = (__pyx_v_self->current_size != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/opcounters.py":280 + * self.element_counter.update(1) + * if self.current_size is not None: + * self.mean_byte_counter.update(self.current_size) # <<<<<<<<<<<<<< + * self.current_size = None + * elif self.active_accumulator is not None: +*/ + __pyx_t_1 = __pyx_v_self->current_size; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *)__pyx_v_self->mean_byte_counter->__pyx_vtab)->update(__pyx_v_self->mean_byte_counter, __pyx_t_1, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":281 + * if self.current_size is not None: + * self.mean_byte_counter.update(self.current_size) + * self.current_size = None # <<<<<<<<<<<<<< + * elif self.active_accumulator is not None: + * self.mean_byte_counter.update(self.active_accumulator.value()) +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_size); + __Pyx_DECREF(__pyx_v_self->current_size); + __pyx_v_self->current_size = Py_None; + + /* "apache_beam/runners/worker/opcounters.py":279 + * """ + * self.element_counter.update(1) + * if self.current_size is not None: # <<<<<<<<<<<<<< + * self.mean_byte_counter.update(self.current_size) + * self.current_size = None +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/worker/opcounters.py":282 + * self.mean_byte_counter.update(self.current_size) + * self.current_size = None + * elif self.active_accumulator is not None: # <<<<<<<<<<<<<< + * self.mean_byte_counter.update(self.active_accumulator.value()) + * self.active_accumulator = None +*/ + __pyx_t_6 = (((PyObject *)__pyx_v_self->active_accumulator) != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/opcounters.py":283 + * self.current_size = None + * elif self.active_accumulator is not None: + * self.mean_byte_counter.update(self.active_accumulator.value()) # <<<<<<<<<<<<<< + * self.active_accumulator = None + * +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v_self->active_accumulator->__pyx_vtab)->value(__pyx_v_self->active_accumulator, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *)__pyx_v_self->mean_byte_counter->__pyx_vtab)->update(__pyx_v_self->mean_byte_counter, __pyx_t_1, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/opcounters.py":284 + * elif self.active_accumulator is not None: + * self.mean_byte_counter.update(self.active_accumulator.value()) + * self.active_accumulator = None # <<<<<<<<<<<<<< + * + * def _compute_next_sample(self, i): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_v_self->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)Py_None); + + /* "apache_beam/runners/worker/opcounters.py":282 + * self.mean_byte_counter.update(self.current_size) + * self.current_size = None + * elif self.active_accumulator is not None: # <<<<<<<<<<<<<< + * self.mean_byte_counter.update(self.active_accumulator.value()) + * self.active_accumulator = None +*/ + } + __pyx_L3:; + + /* "apache_beam/runners/worker/opcounters.py":272 + * inner_coder_impl, self.active_accumulator)) + * + * def update_collect(self): # <<<<<<<<<<<<<< + * """Collects the accumulated size estimates. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_collect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10update_collect, "Collects the accumulated size estimates.\n\n Now that the element has been processed, we ask our accumulator\n for the total and store the result in a counter.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect = {"update_collect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10update_collect}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_collect (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("update_collect", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("update_collect", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10update_collect(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10update_collect(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_collect", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_collect(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.update_collect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":286 + * self.active_accumulator = None + * + * def _compute_next_sample(self, i): # <<<<<<<<<<<<<< + * # https://en.wikipedia.org/wiki/Reservoir_sampling#Fast_Approximation + * gap = math.log(1.0 - random.random()) / math.log(1.0 - (10.0 / i)) +*/ + +static int64_t __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__compute_next_sample(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int64_t __pyx_v_i) { + PyObject *__pyx_v_gap = NULL; + int64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_compute_next_sample", 0); + + /* "apache_beam/runners/worker/opcounters.py":288 + * def _compute_next_sample(self, i): + * # https://en.wikipedia.org/wiki/Reservoir_sampling#Fast_Approximation + * gap = math.log(1.0 - random.random()) / math.log(1.0 - (10.0 / i)) # <<<<<<<<<<<<<< + * return i + math.floor(gap) + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_random); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_random); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_7 = __Pyx_PyFloat_SubtractCObj(__pyx_mstate_global->__pyx_float_1_0, __pyx_t_3, 1.0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_v_i == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 288, __pyx_L1_error) + } + __pyx_t_2 = PyFloat_FromDouble((1.0 - (10.0 / ((double)__pyx_v_i)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_gap = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/opcounters.py":289 + * # https://en.wikipedia.org/wiki/Reservoir_sampling#Fast_Approximation + * gap = math.log(1.0 - random.random()) / math.log(1.0 - (10.0 / i)) + * return i + math.floor(gap) # <<<<<<<<<<<<<< + * + * def _should_sample(self): +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_gap}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_9; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":286 + * self.active_accumulator = None + * + * def _compute_next_sample(self, i): # <<<<<<<<<<<<<< + * # https://en.wikipedia.org/wiki/Reservoir_sampling#Fast_Approximation + * gap = math.log(1.0 - random.random()) / math.log(1.0 - (10.0 / i)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._compute_next_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_gap); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":291 + * return i + math.floor(gap) + * + * def _should_sample(self): # <<<<<<<<<<<<<< + * """Determines whether to sample the next element. + * +*/ + +static CYTHON_INLINE int __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_should_sample", 0); + + /* "apache_beam/runners/worker/opcounters.py":325 + * True if it is time to compute another element's size. + * """ + * if self.coder_impl is None: # <<<<<<<<<<<<<< + * return False + * self._sample_counter += 1 +*/ + __pyx_t_1 = (__pyx_v_self->coder_impl == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":326 + * """ + * if self.coder_impl is None: + * return False # <<<<<<<<<<<<<< + * self._sample_counter += 1 + * if self._next_sample == 0: +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":325 + * True if it is time to compute another element's size. + * """ + * if self.coder_impl is None: # <<<<<<<<<<<<<< + * return False + * self._sample_counter += 1 +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":327 + * if self.coder_impl is None: + * return False + * self._sample_counter += 1 # <<<<<<<<<<<<<< + * if self._next_sample == 0: + * if random.randint(1, self._sample_counter) <= 10: +*/ + __pyx_v_self->_sample_counter = (__pyx_v_self->_sample_counter + 1); + + /* "apache_beam/runners/worker/opcounters.py":328 + * return False + * self._sample_counter += 1 + * if self._next_sample == 0: # <<<<<<<<<<<<<< + * if random.randint(1, self._sample_counter) <= 10: + * if self._sample_counter > 30: +*/ + __pyx_t_1 = (__pyx_v_self->_next_sample == 0); + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":329 + * self._sample_counter += 1 + * if self._next_sample == 0: + * if random.randint(1, self._sample_counter) <= 10: # <<<<<<<<<<<<<< + * if self._sample_counter > 30: + * self._next_sample = self._compute_next_sample(self._sample_counter) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_random); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_randint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_sample_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_1, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_10, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":330 + * if self._next_sample == 0: + * if random.randint(1, self._sample_counter) <= 10: + * if self._sample_counter > 30: # <<<<<<<<<<<<<< + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True +*/ + __pyx_t_1 = (__pyx_v_self->_sample_counter > 30); + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":331 + * if random.randint(1, self._sample_counter) <= 10: + * if self._sample_counter > 30: + * self._next_sample = self._compute_next_sample(self._sample_counter) # <<<<<<<<<<<<<< + * return True + * return False +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->__pyx_vtab)->_compute_next_sample(__pyx_v_self, __pyx_v_self->_sample_counter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_v_self->_next_sample = __pyx_t_7; + + /* "apache_beam/runners/worker/opcounters.py":330 + * if self._next_sample == 0: + * if random.randint(1, self._sample_counter) <= 10: + * if self._sample_counter > 30: # <<<<<<<<<<<<<< + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":332 + * if self._sample_counter > 30: + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True # <<<<<<<<<<<<<< + * return False + * elif self._sample_counter >= self._next_sample: +*/ + __pyx_r = 1; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":329 + * self._sample_counter += 1 + * if self._next_sample == 0: + * if random.randint(1, self._sample_counter) <= 10: # <<<<<<<<<<<<<< + * if self._sample_counter > 30: + * self._next_sample = self._compute_next_sample(self._sample_counter) +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":333 + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True + * return False # <<<<<<<<<<<<<< + * elif self._sample_counter >= self._next_sample: + * self._next_sample = self._compute_next_sample(self._sample_counter) +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":328 + * return False + * self._sample_counter += 1 + * if self._next_sample == 0: # <<<<<<<<<<<<<< + * if random.randint(1, self._sample_counter) <= 10: + * if self._sample_counter > 30: +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":334 + * return True + * return False + * elif self._sample_counter >= self._next_sample: # <<<<<<<<<<<<<< + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True +*/ + __pyx_t_1 = (__pyx_v_self->_sample_counter >= __pyx_v_self->_next_sample); + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/opcounters.py":335 + * return False + * elif self._sample_counter >= self._next_sample: + * self._next_sample = self._compute_next_sample(self._sample_counter) # <<<<<<<<<<<<<< + * return True + * return False +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->__pyx_vtab)->_compute_next_sample(__pyx_v_self, __pyx_v_self->_sample_counter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_v_self->_next_sample = __pyx_t_7; + + /* "apache_beam/runners/worker/opcounters.py":336 + * elif self._sample_counter >= self._next_sample: + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True # <<<<<<<<<<<<<< + * return False + * +*/ + __pyx_r = 1; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":334 + * return True + * return False + * elif self._sample_counter >= self._next_sample: # <<<<<<<<<<<<<< + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":337 + * self._next_sample = self._compute_next_sample(self._sample_counter) + * return True + * return False # <<<<<<<<<<<<<< + * + * def should_sample(self): +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":291 + * return i + math.floor(gap) + * + * def _should_sample(self): # <<<<<<<<<<<<<< + * """Determines whether to sample the next element. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._should_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":339 + * return False + * + * def should_sample(self): # <<<<<<<<<<<<<< + * # We create this separate method because the above "_should_sample()" method + * # is marked as inline in Cython and thus can't be exposed to Python code. +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("should_sample", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_should_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/opcounters.py":342 + * # We create this separate method because the above "_should_sample()" method + * # is marked as inline in Cython and thus can't be exposed to Python code. + * return self._should_sample() # <<<<<<<<<<<<<< + * + * def restart_sampling(self): +*/ + __pyx_t_6 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_r = __pyx_t_6; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":339 + * return False + * + * def should_sample(self): # <<<<<<<<<<<<<< + * # We create this separate method because the above "_should_sample()" method + * # is marked as inline in Cython and thus can't be exposed to Python code. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.should_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample = {"should_sample", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("should_sample (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("should_sample", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("should_sample", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12should_sample(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12should_sample(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("should_sample", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_should_sample(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.should_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":344 + * return self._should_sample() + * + * def restart_sampling(self): # <<<<<<<<<<<<<< + * self._sample_counter = 0 + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling = {"restart_sampling", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("restart_sampling (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("restart_sampling", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("restart_sampling", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_14restart_sampling(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_14restart_sampling(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("restart_sampling", 0); + + /* "apache_beam/runners/worker/opcounters.py":345 + * + * def restart_sampling(self): + * self._sample_counter = 0 # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __pyx_v_self->_sample_counter = 0; + + /* "apache_beam/runners/worker/opcounters.py":344 + * return self._should_sample() + * + * def restart_sampling(self): # <<<<<<<<<<<<<< + * self._sample_counter = 0 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":347 + * self._sample_counter = 0 + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s [%s]>' % ( + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16__str__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_7genexpr__pyx_v_x = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/runners/worker/opcounters.py":348 + * + * def __str__(self): + * return '<%s [%s]>' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/worker/opcounters.py":349 + * def __str__(self): + * return '<%s [%s]>' % ( + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 349, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 349, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L5_error) + } else { + __pyx_t_4 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 349, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_7genexpr__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_t_3 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_7[1] = __pyx_t_1; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_7[3] = __pyx_t_3; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__6; + + /* "apache_beam/runners/worker/opcounters.py":348 + * + * def __str__(self): + * return '<%s [%s]>' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) + * +*/ + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":347 + * self._sample_counter = 0 + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s [%s]>' % ( + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.py":351 + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '<%s %s at %s>' % ( + * self.__class__.__name__, [x for x in self.__iter__()], hex(id(self))) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_19__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_19__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18__repr__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_8genexpr1__pyx_v_x = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7[7]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/runners/worker/opcounters.py":352 + * + * def __repr__(self): + * return '<%s %s at %s>' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, [x for x in self.__iter__()], hex(id(self))) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/worker/opcounters.py":353 + * def __repr__(self): + * return '<%s %s at %s>' % ( + * self.__class__.__name__, [x for x in self.__iter__()], hex(id(self))) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_iter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 353, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 353, __pyx_L5_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L5_error) + } else { + __pyx_t_4 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 353, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_4); + __pyx_t_4 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr1__pyx_v_x))) __PYX_ERR(0, 353, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_7[1] = __pyx_t_1; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__7; + __pyx_t_7[3] = __pyx_t_3; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_at; + __pyx_t_7[5] = __pyx_t_2; + __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u__8; + + /* "apache_beam/runners/worker/opcounters.py":352 + * + * def __repr__(self): + * return '<%s %s at %s>' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, [x for x in self.__iter__()], hex(id(self))) +*/ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/opcounters.py":351 + * self.__class__.__name__, ', '.join([str(x) for x in self.__iter__()])) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '<%s %s at %s>' % ( + * self.__class__.__name__, [x for x in self.__iter__()], hex(id(self))) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":54 + * + * cdef class OperationCounters(object): + * cdef public _counter_factory # <<<<<<<<<<<<<< + * cdef public Counter element_counter + * cdef public Counter mean_byte_counter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_counter_factory); + __pyx_r = __pyx_v_self->_counter_factory; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->_counter_factory); + __Pyx_DECREF(__pyx_v_self->_counter_factory); + __pyx_v_self->_counter_factory = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_counter_factory); + __Pyx_DECREF(__pyx_v_self->_counter_factory); + __pyx_v_self->_counter_factory = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":55 + * cdef class OperationCounters(object): + * cdef public _counter_factory + * cdef public Counter element_counter # <<<<<<<<<<<<<< + * cdef public Counter mean_byte_counter + * cdef public coder_impl +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->element_counter); + __pyx_r = ((PyObject *)__pyx_v_self->element_counter); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(4, 55, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->element_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->element_counter); + __pyx_v_self->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.element_counter.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->element_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->element_counter); + __pyx_v_self->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":56 + * cdef public _counter_factory + * cdef public Counter element_counter + * cdef public Counter mean_byte_counter # <<<<<<<<<<<<<< + * cdef public coder_impl + * cdef public SumAccumulator active_accumulator +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->mean_byte_counter); + __pyx_r = ((PyObject *)__pyx_v_self->mean_byte_counter); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(4, 56, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->mean_byte_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->mean_byte_counter); + __pyx_v_self->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.mean_byte_counter.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->mean_byte_counter); + __Pyx_DECREF((PyObject *)__pyx_v_self->mean_byte_counter); + __pyx_v_self->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":57 + * cdef public Counter element_counter + * cdef public Counter mean_byte_counter + * cdef public coder_impl # <<<<<<<<<<<<<< + * cdef public SumAccumulator active_accumulator + * cdef public object current_size +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->coder_impl); + __pyx_r = __pyx_v_self->coder_impl; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->coder_impl); + __Pyx_DECREF(__pyx_v_self->coder_impl); + __pyx_v_self->coder_impl = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->coder_impl); + __Pyx_DECREF(__pyx_v_self->coder_impl); + __pyx_v_self->coder_impl = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":58 + * cdef public Counter mean_byte_counter + * cdef public coder_impl + * cdef public SumAccumulator active_accumulator # <<<<<<<<<<<<<< + * cdef public object current_size + * cdef public libc.stdint.int64_t _sample_counter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_r = ((PyObject *)__pyx_v_self->active_accumulator); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator))))) __PYX_ERR(4, 58, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_v_self->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.active_accumulator.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v_self->active_accumulator); + __pyx_v_self->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":59 + * cdef public coder_impl + * cdef public SumAccumulator active_accumulator + * cdef public object current_size # <<<<<<<<<<<<<< + * cdef public libc.stdint.int64_t _sample_counter + * cdef public libc.stdint.int64_t _next_sample +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->current_size); + __pyx_r = __pyx_v_self->current_size; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->current_size); + __Pyx_DECREF(__pyx_v_self->current_size); + __pyx_v_self->current_size = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->current_size); + __Pyx_DECREF(__pyx_v_self->current_size); + __pyx_v_self->current_size = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":60 + * cdef public SumAccumulator active_accumulator + * cdef public object current_size + * cdef public libc.stdint.int64_t _sample_counter # <<<<<<<<<<<<<< + * cdef public libc.stdint.int64_t _next_sample + * cdef public object output_type_constraints +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_sample_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._sample_counter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 60, __pyx_L1_error) + __pyx_v_self->_sample_counter = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._sample_counter.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":61 + * cdef public object current_size + * cdef public libc.stdint.int64_t _sample_counter + * cdef public libc.stdint.int64_t _next_sample # <<<<<<<<<<<<<< + * cdef public object output_type_constraints + * cdef public object producer_batch_converter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_next_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._next_sample.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 61, __pyx_L1_error) + __pyx_v_self->_next_sample = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters._next_sample.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":62 + * cdef public libc.stdint.int64_t _sample_counter + * cdef public libc.stdint.int64_t _next_sample + * cdef public object output_type_constraints # <<<<<<<<<<<<<< + * cdef public object producer_batch_converter + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->output_type_constraints); + __pyx_r = __pyx_v_self->output_type_constraints; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->output_type_constraints); + __Pyx_DECREF(__pyx_v_self->output_type_constraints); + __pyx_v_self->output_type_constraints = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->output_type_constraints); + __Pyx_DECREF(__pyx_v_self->output_type_constraints); + __pyx_v_self->output_type_constraints = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/opcounters.pxd":63 + * cdef public libc.stdint.int64_t _next_sample + * cdef public object output_type_constraints + * cdef public object producer_batch_converter # <<<<<<<<<<<<<< + * + * cpdef update_from(self, windowed_value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->producer_batch_converter); + __pyx_r = __pyx_v_self->producer_batch_converter; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->producer_batch_converter); + __Pyx_DECREF(__pyx_v_self->producer_batch_converter); + __pyx_v_self->producer_batch_converter = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->producer_batch_converter); + __Pyx_DECREF(__pyx_v_self->producer_batch_converter); + __pyx_v_self->producer_batch_converter = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_20__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._counter_factory, self._next_sample, self._sample_counter, self.active_accumulator, self.coder_impl, self.current_size, self.element_counter, self.mean_byte_counter, self.output_type_constraints, self.producer_batch_converter) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_next_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_sample_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->_counter_factory); + __Pyx_GIVEREF(__pyx_v_self->_counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->active_accumulator); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->active_accumulator); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_v_self->active_accumulator)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->coder_impl); + __Pyx_GIVEREF(__pyx_v_self->coder_impl); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->coder_impl) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->current_size); + __Pyx_GIVEREF(__pyx_v_self->current_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->current_size) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->element_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->element_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_v_self->element_counter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->mean_byte_counter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->mean_byte_counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_v_self->mean_byte_counter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->output_type_constraints); + __Pyx_GIVEREF(__pyx_v_self->output_type_constraints); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->output_type_constraints) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->producer_batch_converter); + __Pyx_GIVEREF(__pyx_v_self->producer_batch_converter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->producer_batch_converter) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._counter_factory, self._next_sample, self._sample_counter, self.active_accumulator, self.coder_impl, self.current_size, self.element_counter, self.mean_byte_counter, self.output_type_constraints, self.producer_batch_converter) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._next_sample, self._sample_counter, self.active_accumulator, self.coder_impl, self.current_size, self.element_counter, self.mean_byte_counter, self.output_type_constraints, self.producer_batch_converter) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._counter_factory is not None or self.active_accumulator is not None or self.coder_impl is not None or self.current_size is not None or self.element_counter is not None or self.mean_byte_counter is not None or self.output_type_constraints is not None or self.producer_batch_converter is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._counter_factory, self._next_sample, self._sample_counter, self.active_accumulator, self.coder_impl, self.current_size, self.element_counter, self.mean_byte_counter, self.output_type_constraints, self.producer_batch_converter) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._counter_factory is not None or self.active_accumulator is not None or self.coder_impl is not None or self.current_size is not None or self.element_counter is not None or self.mean_byte_counter is not None or self.output_type_constraints is not None or self.producer_batch_converter is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->_counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->active_accumulator) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->coder_impl != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->current_size != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->element_counter) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->mean_byte_counter) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->output_type_constraints != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->producer_batch_converter != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self.active_accumulator is not None or self.coder_impl is not None or self.current_size is not None or self.element_counter is not None or self.mean_byte_counter is not None or self.output_type_constraints is not None or self.producer_batch_converter is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._counter_factory is not None or self.active_accumulator is not None or self.coder_impl is not None or self.current_size is not None or self.element_counter is not None or self.mean_byte_counter is not None or self.output_type_constraints is not None or self.producer_batch_converter is not None + * if use_setstate: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OperationCounters); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_75797132); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_75797132); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_75797132) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._counter_factory is not None or self.active_accumulator is not None or self.coder_impl is not None or self.current_size is not None or self.element_counter is not None or self.mean_byte_counter is not None or self.output_type_constraints is not None or self.producer_batch_converter is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, None), state + * else: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_OperationCounters__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OperationCounters); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_75797132); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_75797132); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_75797132) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OperationCounters__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_22__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_22__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_OperationCounters__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_OperationCounters__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OperationCounters__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.OperationCounters.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_1__pyx_unpickle_TransformIOCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_1__pyx_unpickle_TransformIOCounter = {"__pyx_unpickle_TransformIOCounter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_1__pyx_unpickle_TransformIOCounter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_1__pyx_unpickle_TransformIOCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_TransformIOCounter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_TransformIOCounter", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TransformIOCounter", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TransformIOCounter", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_TransformIOCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TransformIOCounter", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_TransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') # <<<<<<<<<<<<<< + * __pyx_result = TransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, __pyx_k_counter_factory__latest_step__s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = TransformIOCounter.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = TransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = TransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = TransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_TransformIOCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_TransformIOCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_TransformIOCounter__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->_counter_factory); + __pyx_v___pyx_result->_counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_latest_step); + __Pyx_DECREF(__pyx_v___pyx_result->_latest_step); + __pyx_v___pyx_result->_latest_step = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->_state_sampler); + __pyx_v___pyx_result->_state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->bytes_read_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->bytes_read_counter); + __pyx_v___pyx_result->bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->scoped_state); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->scoped_state); + __pyx_v___pyx_result->scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_TransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_TransformIOCounter__set_state(TransformIOCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_TransformIOCounter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_NoOpTransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_3__pyx_unpickle_NoOpTransformIOCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_3__pyx_unpickle_NoOpTransformIOCounter = {"__pyx_unpickle_NoOpTransformIOCounter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_3__pyx_unpickle_NoOpTransformIOCounter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_3__pyx_unpickle_NoOpTransformIOCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_NoOpTransformIOCounter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_NoOpTransformIOCounter", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoOpTransformIOCounter", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoOpTransformIOCounter", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_NoOpTransformIOCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_2__pyx_unpickle_NoOpTransformIOCounter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_2__pyx_unpickle_NoOpTransformIOCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_NoOpTransformIOCounter", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_NoOpTransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') # <<<<<<<<<<<<<< + * __pyx_result = NoOpTransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, __pyx_k_counter_factory__latest_step__s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = NoOpTransformIOCounter.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = NoOpTransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = NoOpTransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_NoOpTransformIOCounter__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') + * __pyx_result = NoOpTransformIOCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_NoOpTransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_NoOpTransformIOCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_NoOpTransformIOCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_NoOpTransformIOCounter__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._counter_factory); + __pyx_v___pyx_result->__pyx_base._counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._latest_step); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._latest_step); + __pyx_v___pyx_result->__pyx_base._latest_step = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._state_sampler); + __pyx_v___pyx_result->__pyx_base._state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.bytes_read_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.bytes_read_counter); + __pyx_v___pyx_result->__pyx_base.bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_state); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_state); + __pyx_v___pyx_result->__pyx_base.scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_NoOpTransformIOCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_NoOpTransformIOCounter__set_state(NoOpTransformIOCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.scoped_state = __pyx_state[4] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 5) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_NoOpTransformIOCounter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SideInputReadCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_5__pyx_unpickle_SideInputReadCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_5__pyx_unpickle_SideInputReadCounter = {"__pyx_unpickle_SideInputReadCounter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_5__pyx_unpickle_SideInputReadCounter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_5__pyx_unpickle_SideInputReadCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SideInputReadCounter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SideInputReadCounter", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SideInputReadCounter", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SideInputReadCounter", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SideInputReadCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_4__pyx_unpickle_SideInputReadCounter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_4__pyx_unpickle_SideInputReadCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SideInputReadCounter", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SideInputReadCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') # <<<<<<<<<<<<<< + * __pyx_result = SideInputReadCounter.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, __pyx_k_counter_factory__latest_step__s_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') + * __pyx_result = SideInputReadCounter.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') + * __pyx_result = SideInputReadCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SideInputReadCounter.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SideInputReadCounter__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') + * __pyx_result = SideInputReadCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.declaring_step = __pyx_state[4]; __pyx_result.input_index = __pyx_state[5]; __pyx_result.scoped_state = __pyx_state[6] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SideInputReadCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SideInputReadCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.declaring_step = __pyx_state[4]; __pyx_result.input_index = __pyx_state[5]; __pyx_result.scoped_state = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SideInputReadCounter__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SideInputReadCounter__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.declaring_step = __pyx_state[4]; __pyx_result.input_index = __pyx_state[5]; __pyx_result.scoped_state = __pyx_state[6] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._counter_factory); + __pyx_v___pyx_result->__pyx_base._counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._latest_step); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._latest_step); + __pyx_v___pyx_result->__pyx_base._latest_step = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._state_sampler); + __pyx_v___pyx_result->__pyx_base._state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.bytes_read_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.bytes_read_counter); + __pyx_v___pyx_result->__pyx_base.bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->declaring_step); + __Pyx_DECREF(__pyx_v___pyx_result->declaring_step); + __pyx_v___pyx_result->declaring_step = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->input_index); + __Pyx_DECREF(__pyx_v___pyx_result->input_index); + __pyx_v___pyx_result->input_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_state); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.scoped_state); + __pyx_v___pyx_result->__pyx_base.scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.declaring_step = __pyx_state[4]; __pyx_result.input_index = __pyx_state[5]; __pyx_result.scoped_state = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 7); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SideInputReadCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SideInputReadCounter__set_state(SideInputReadCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._latest_step = __pyx_state[1]; __pyx_result._state_sampler = __pyx_state[2]; __pyx_result.bytes_read_counter = __pyx_state[3]; __pyx_result.declaring_step = __pyx_state[4]; __pyx_result.input_index = __pyx_state[5]; __pyx_result.scoped_state = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SideInputReadCounter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_7__pyx_unpickle_SumAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_7__pyx_unpickle_SumAccumulator = {"__pyx_unpickle_SumAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_7__pyx_unpickle_SumAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_7__pyx_unpickle_SumAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SumAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SumAccumulator", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumAccumulator", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SumAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_6__pyx_unpickle_SumAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_6__pyx_unpickle_SumAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SumAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') # <<<<<<<<<<<<<< + * __pyx_result = SumAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, __pyx_k_value_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SumAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SumAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SumAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SumAccumulator__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') + * __pyx_result = SumAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbbd7235, 0x0fab5fa, 0xe106c97, b'_value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SumAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_SumAccumulator__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SumAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumAccumulator__set_state(SumAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_SumAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_OperationCounters(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_9__pyx_unpickle_OperationCounters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10opcounters_9__pyx_unpickle_OperationCounters = {"__pyx_unpickle_OperationCounters", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_9__pyx_unpickle_OperationCounters, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10opcounters_9__pyx_unpickle_OperationCounters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_OperationCounters (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_OperationCounters", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OperationCounters", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OperationCounters", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_OperationCounters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10opcounters_8__pyx_unpickle_OperationCounters(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10opcounters_8__pyx_unpickle_OperationCounters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_OperationCounters", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_OperationCounters(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') # <<<<<<<<<<<<<< + * __pyx_result = OperationCounters.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, __pyx_k_counter_factory__next_sample__s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') + * __pyx_result = OperationCounters.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') + * __pyx_result = OperationCounters.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = OperationCounters.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_OperationCounters__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') + * __pyx_result = OperationCounters.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._next_sample = __pyx_state[1]; __pyx_result._sample_counter = __pyx_state[2]; __pyx_result.active_accumulator = __pyx_state[3]; __pyx_result.coder_impl = __pyx_state[4]; __pyx_result.current_size = __pyx_state[5]; __pyx_result.element_counter = __pyx_state[6]; __pyx_result.mean_byte_counter = __pyx_state[7]; __pyx_result.output_type_constraints = __pyx_state[8]; __pyx_result.producer_batch_converter = __pyx_state[9] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_OperationCounters(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_OperationCounters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._next_sample = __pyx_state[1]; __pyx_result._sample_counter = __pyx_state[2]; __pyx_result.active_accumulator = __pyx_state[3]; __pyx_result.coder_impl = __pyx_state[4]; __pyx_result.current_size = __pyx_state[5]; __pyx_result.element_counter = __pyx_state[6]; __pyx_result.mean_byte_counter = __pyx_state[7]; __pyx_result.output_type_constraints = __pyx_state[8]; __pyx_result.producer_batch_converter = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10opcounters___pyx_unpickle_OperationCounters__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_OperationCounters__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._next_sample = __pyx_state[1]; __pyx_result._sample_counter = __pyx_state[2]; __pyx_result.active_accumulator = __pyx_state[3]; __pyx_result.coder_impl = __pyx_state[4]; __pyx_result.current_size = __pyx_state[5]; __pyx_result.element_counter = __pyx_state[6]; __pyx_result.mean_byte_counter = __pyx_state[7]; __pyx_result.output_type_constraints = __pyx_state[8]; __pyx_result.producer_batch_converter = __pyx_state[9] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->_counter_factory); + __pyx_v___pyx_result->_counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_next_sample = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_sample_counter = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->active_accumulator); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->active_accumulator); + __pyx_v___pyx_result->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->coder_impl); + __Pyx_DECREF(__pyx_v___pyx_result->coder_impl); + __pyx_v___pyx_result->coder_impl = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->current_size); + __Pyx_DECREF(__pyx_v___pyx_result->current_size); + __pyx_v___pyx_result->current_size = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->element_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->element_counter); + __pyx_v___pyx_result->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->mean_byte_counter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->mean_byte_counter); + __pyx_v___pyx_result->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->output_type_constraints); + __Pyx_DECREF(__pyx_v___pyx_result->output_type_constraints); + __pyx_v___pyx_result->output_type_constraints = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->producer_batch_converter); + __Pyx_DECREF(__pyx_v___pyx_result->producer_batch_converter); + __pyx_v___pyx_result->producer_batch_converter = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._next_sample = __pyx_state[1]; __pyx_result._sample_counter = __pyx_state[2]; __pyx_result.active_accumulator = __pyx_state[3]; __pyx_result.coder_impl = __pyx_state[4]; __pyx_result.current_size = __pyx_state[5]; __pyx_result.element_counter = __pyx_state[6]; __pyx_result.mean_byte_counter = __pyx_state[7]; __pyx_result.output_type_constraints = __pyx_state[8]; __pyx_result.producer_batch_converter = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 10); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_OperationCounters__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_OperationCounters__set_state(OperationCounters __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._counter_factory = __pyx_state[0]; __pyx_result._next_sample = __pyx_state[1]; __pyx_result._sample_counter = __pyx_state[2]; __pyx_result.active_accumulator = __pyx_state[3]; __pyx_result.coder_impl = __pyx_state[4]; __pyx_result.current_size = __pyx_state[5]; __pyx_result.element_counter = __pyx_state[6]; __pyx_result.mean_byte_counter = __pyx_state[7]; __pyx_result.output_type_constraints = __pyx_state[8]; __pyx_result.producer_batch_converter = __pyx_state[9] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 10) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.opcounters.__pyx_unpickle_OperationCounters__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + p->_counter_factory = Py_None; Py_INCREF(Py_None); + p->_state_sampler = Py_None; Py_INCREF(Py_None); + p->bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + p->scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)Py_None); Py_INCREF(Py_None); + p->_latest_step = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_counter_factory); + Py_CLEAR(p->_state_sampler); + Py_CLEAR(p->bytes_read_counter); + Py_CLEAR(p->scoped_state); + Py_CLEAR(p->_latest_step); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_counter_factory) { + e = (*v)(p->_counter_factory, a); if (e) return e; + } + if (p->_state_sampler) { + e = (*v)(p->_state_sampler, a); if (e) return e; + } + if (p->bytes_read_counter) { + e = (*v)(((PyObject *)p->bytes_read_counter), a); if (e) return e; + } + if (p->scoped_state) { + e = (*v)(((PyObject *)p->scoped_state), a); if (e) return e; + } + if (p->_latest_step) { + e = (*v)(p->_latest_step, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *)o; + tmp = ((PyObject*)p->_counter_factory); + p->_counter_factory = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_state_sampler); + p->_state_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->bytes_read_counter); + p->bytes_read_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->scoped_state); + p->scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_latest_step); + p->_latest_step = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter__counter_factory(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_16_counter_factory_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter__state_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_14_state_sampler_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter[] = { + {"_update_counters_for_requesting_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter[] = { + {"_counter_factory", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter__counter_factory, 0, 0, 0}, + {"_state_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter__state_sampler, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_doc, (void *)PyDoc_STR("Class to track time and bytes consumed while reading from IO.\n\n Subclasses should be able to track consumption of IO across steps\n in the same stage - for instance, if a Shuffle or Side Input iterable\n is passed down to a next step.\n\n Some examples of IO can be side inputs, shuffle, or streaming state.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter_spec = { + "apache_beam.runners.worker.opcounters.TransformIOCounter", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""TransformIOCounter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Class to track time and bytes consumed while reading from IO.\n\n Subclasses should be able to track consumption of IO across steps\n in the same stage - for instance, if a Shuffle or Side Input iterable\n is passed down to a next step.\n\n Some examples of IO can be side inputs, shuffle, or streaming state.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter*)__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_doc, (void *)PyDoc_STR("All operations for IO tracking are no-ops.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter_spec = { + "apache_beam.runners.worker.opcounters.NoOpTransformIOCounter", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""NoOpTransformIOCounter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("All operations for IO tracking are no-ops."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter*)__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + p->declaring_step = Py_None; Py_INCREF(Py_None); + p->input_index = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->declaring_step); + Py_CLEAR(p->input_index); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(o, v, a); if (e) return e; + if (p->declaring_step) { + e = (*v)(p->declaring_step, a); if (e) return e; + } + if (p->input_index) { + e = (*v)(p->input_index, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter(o); + tmp = ((PyObject*)p->declaring_step); + p->declaring_step = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->input_index); + p->input_index = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_declaring_step(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_14declaring_step_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_input_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_11input_index_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter[] = { + {"_update_counters_for_requesting_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter[] = { + {"declaring_step", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_declaring_step, 0, 0, 0}, + {"input_index", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_input_index, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {Py_tp_doc, (void *)PyDoc_STR("Tracks time and bytes consumed while reading from side inputs.\n\n This class is designed to track consumption of side inputs across fused steps.\n We represent a side input as a declaring step, and an input index.\n\n The declaring step is the step that originally receives the side input for\n consumption, and the input index in which the declaring step receives the side\n input that we want to identify.\n\n Note that the declaring step originally receives the side input, but it may\n not be the only step that spends time reading from this side input.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter_spec = { + "apache_beam.runners.worker.opcounters.SideInputReadCounter", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""SideInputReadCounter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Tracks time and bytes consumed while reading from side inputs.\n\n This class is designed to track consumption of side inputs across fused steps.\n We represent a side input as a declaring step, and an input index.\n\n The declaring step is the step that originally receives the side input for\n consumption, and the input index in which the declaring step receives the side\n input that we want to identify.\n\n Note that the declaring step originally receives the side input, but it may\n not be the only step that spends time reading from this side input.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SumAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SumAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10opcounters_SumAccumulator[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SumAccumulator}, + {Py_tp_doc, (void *)PyDoc_STR("Accumulator for collecting byte counts.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10opcounters_SumAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SumAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator_spec = { + "apache_beam.runners.worker.opcounters.SumAccumulator", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""SumAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("Accumulator for collecting byte counts."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_OperationCounters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + p->_counter_factory = Py_None; Py_INCREF(Py_None); + p->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + p->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + p->coder_impl = Py_None; Py_INCREF(Py_None); + p->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)Py_None); Py_INCREF(Py_None); + p->current_size = Py_None; Py_INCREF(Py_None); + p->output_type_constraints = Py_None; Py_INCREF(Py_None); + p->producer_batch_converter = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_OperationCounters(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_OperationCounters) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_counter_factory); + Py_CLEAR(p->element_counter); + Py_CLEAR(p->mean_byte_counter); + Py_CLEAR(p->coder_impl); + Py_CLEAR(p->active_accumulator); + Py_CLEAR(p->current_size); + Py_CLEAR(p->output_type_constraints); + Py_CLEAR(p->producer_batch_converter); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_OperationCounters(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_counter_factory) { + e = (*v)(p->_counter_factory, a); if (e) return e; + } + if (p->element_counter) { + e = (*v)(((PyObject *)p->element_counter), a); if (e) return e; + } + if (p->mean_byte_counter) { + e = (*v)(((PyObject *)p->mean_byte_counter), a); if (e) return e; + } + if (p->coder_impl) { + e = (*v)(p->coder_impl, a); if (e) return e; + } + if (p->active_accumulator) { + e = (*v)(((PyObject *)p->active_accumulator), a); if (e) return e; + } + if (p->current_size) { + e = (*v)(p->current_size, a); if (e) return e; + } + if (p->output_type_constraints) { + e = (*v)(p->output_type_constraints, a); if (e) return e; + } + if (p->producer_batch_converter) { + e = (*v)(p->producer_batch_converter, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_OperationCounters(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)o; + tmp = ((PyObject*)p->_counter_factory); + p->_counter_factory = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->element_counter); + p->element_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->mean_byte_counter); + p->mean_byte_counter = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->coder_impl); + p->coder_impl = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->active_accumulator); + p->active_accumulator = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->current_size); + p->current_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->output_type_constraints); + p->output_type_constraints = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->producer_batch_converter); + p->producer_batch_converter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__counter_factory(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__counter_factory(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_16_counter_factory_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_element_counter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_element_counter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15element_counter_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_mean_byte_counter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_mean_byte_counter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17mean_byte_counter_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_coder_impl(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_coder_impl(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_10coder_impl_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_active_accumulator(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_active_accumulator(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_18active_accumulator_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_current_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_current_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12current_size_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__sample_counter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__sample_counter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15_sample_counter_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__next_sample(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__next_sample(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_12_next_sample_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_output_type_constraints(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_output_type_constraints(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23output_type_constraints_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_producer_batch_converter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_producer_batch_converter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_24producer_batch_converter_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10opcounters_OperationCounters[] = { + {"_observable_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"restart_sampling", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_OperationCounters[] = { + {"_counter_factory", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__counter_factory, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__counter_factory, 0, 0}, + {"element_counter", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_element_counter, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_element_counter, 0, 0}, + {"mean_byte_counter", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_mean_byte_counter, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_mean_byte_counter, 0, 0}, + {"coder_impl", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_coder_impl, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_coder_impl, 0, 0}, + {"active_accumulator", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_active_accumulator, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_active_accumulator, 0, 0}, + {"current_size", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_current_size, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_current_size, 0, 0}, + {"_sample_counter", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__sample_counter, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__sample_counter, 0, 0}, + {"_next_sample", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__next_sample, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__next_sample, 0, 0}, + {"output_type_constraints", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_output_type_constraints, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_output_type_constraints, 0, 0}, + {"producer_batch_converter", __pyx_getprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_producer_batch_converter, __pyx_setprop_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_producer_batch_converter, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_19__repr__}, + {Py_tp_str, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17__str__}, + {Py_tp_doc, (void *)PyDoc_STR("The set of basic counters to attach to an Operation.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_OperationCounters}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters_spec = { + "apache_beam.runners.worker.opcounters.OperationCounters", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""OperationCounters", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_19__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_17__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("The set of basic counters to attach to an Operation."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters_OperationCounters, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_accumulator); + Py_CLEAR(p->__pyx_v_inner_coder_impl); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_accumulator) { + e = (*v)(p->__pyx_v_accumulator, a); if (e) return e; + } + if (p->__pyx_v_inner_coder_impl) { + e = (*v)(p->__pyx_v_inner_coder_impl, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback *)o; + tmp = ((PyObject*)p->__pyx_v_accumulator); + p->__pyx_v_accumulator = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_inner_coder_impl); + p->__pyx_v_inner_coder_impl = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback_spec = { + "apache_beam.runners.worker.opcounters.__pyx_scope_struct___observable_callback", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.opcounters.""__pyx_scope_struct___observable_callback", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = &__pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter.update_current_step = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_update_current_step; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter.add_bytes_read = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_add_bytes_read; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter.__pyx___enter__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___enter__; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter.__pyx___exit__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___exit__; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter)) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = &__pyx_type_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__.doc = __pyx_doc_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_TransformIOCounter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = &__pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter.__pyx_base.update_current_step = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_update_current_step; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter.__pyx_base.add_bytes_read = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_add_bytes_read; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter.__pyx_base.__pyx___enter__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___enter__; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter.__pyx_base.__pyx___exit__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter___exit__; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter)) __PYX_ERR(0, 94, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = &__pyx_type_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = &__pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter)) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = &__pyx_type_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__.doc = __pyx_doc_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SideInputReadCounter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = &__pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SumAccumulator.update = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_update; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_SumAccumulator.value = (int64_t (*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_value; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator)) __PYX_ERR(0, 166, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = &__pyx_type_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SumAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) < (0)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters = &__pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.update_from = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.update_from_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_from_batch; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.do_sample = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_do_sample; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.update_collect = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_update_collect; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.type_check = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_type_check; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters._compute_next_sample = (int64_t (*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int64_t))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__compute_next_sample; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters._should_sample = (int (*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters__should_sample; + __pyx_vtable_11apache_beam_7runners_6worker_10opcounters_OperationCounters.should_sample = (int (*)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_should_sample; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters)) __PYX_ERR(0, 178, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = &__pyx_type_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_OperationCounters, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback)) __PYX_ERR(0, 224, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback) < (0)) __PYX_ERR(0, 224, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback = &__pyx_type_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback) < (0)) __PYX_ERR(0, 224, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters___pyx_scope_struct___observable_callback->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.counters"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.counters", "Counter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) __PYX_ERR(5, 20, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_8counters_Counter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_Counter)) __PYX_ERR(5, 20, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.counters", "AccumulatorCombineFnCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) __PYX_ERR(5, 28, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter)) __PYX_ERR(5, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(8, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #else + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #else + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #else + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #else + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #else + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.cells"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "MetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) __PYX_ERR(9, 23, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(9, 23, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "CounterCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) __PYX_ERR(9, 29, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(9, 29, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) __PYX_ERR(9, 37, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(9, 37, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "AbstractMetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) __PYX_ERR(9, 44, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell)) __PYX_ERR(9, 44, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "GaugeCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) __PYX_ERR(9, 50, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(9, 50, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "StringSetCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) __PYX_ERR(9, 54, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell)) __PYX_ERR(9, 54, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) __PYX_ERR(9, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell)) __PYX_ERR(9, 58, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) __PYX_ERR(9, 62, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "_BoundedTrieNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) __PYX_ERR(9, 69, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) __PYX_ERR(9, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "_TypedMetricName", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) __PYX_ERR(10, 26, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricUpdater", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) __PYX_ERR(10, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricsContainer", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) __PYX_ERR(10, 42, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer = (struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(10, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.worker.statesampler_fast"); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "StateSampler", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) __PYX_ERR(11, 25, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(11, 25, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "ScopedState", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) __PYX_ERR(11, 52, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState)) __PYX_ERR(11, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject__DEFAULT_get_current_tr); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 12; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT, (void **)&__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_opcounters(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_opcounters}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "opcounters", + __pyx_k_Counters_collect_the_progress_of, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_opcounters(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_opcounters(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_opcounters(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'opcounters' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "opcounters" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_opcounters", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__runners__worker__opcounters) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.runners.worker.opcounters")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.runners.worker.opcounters", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/runners/worker/opcounters.py":22 + * # pytype: skip-file + * + * import math # <<<<<<<<<<<<<< + * import random + * import sys +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_math, __pyx_t_2) < (0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":23 + * + * import math + * import random # <<<<<<<<<<<<<< + * import sys + * from typing import TYPE_CHECKING +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_random, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_random, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":24 + * import math + * import random + * import sys # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":25 + * import random + * import sys + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":26 + * import sys + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Optional + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":27 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import Optional # <<<<<<<<<<<<<< + * + * from apache_beam.typehints import TypeCheckError +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":29 + * from typing import Optional + * + * from apache_beam.typehints import TypeCheckError # <<<<<<<<<<<<<< + * from apache_beam.typehints.decorators import _check_instance_type + * from apache_beam.utils import counters +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TypeCheckError}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TypeCheckError}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":30 + * + * from apache_beam.typehints import TypeCheckError + * from apache_beam.typehints.decorators import _check_instance_type # <<<<<<<<<<<<<< + * from apache_beam.utils import counters + * from apache_beam.utils import windowed_value +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_check_instance_type}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints_decorators, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_check_instance_type}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":31 + * from apache_beam.typehints import TypeCheckError + * from apache_beam.typehints.decorators import _check_instance_type + * from apache_beam.utils import counters # <<<<<<<<<<<<<< + * from apache_beam.utils import windowed_value + * from apache_beam.utils.counters import Counter +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_counters}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_counters}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":32 + * from apache_beam.typehints.decorators import _check_instance_type + * from apache_beam.utils import counters + * from apache_beam.utils import windowed_value # <<<<<<<<<<<<<< + * from apache_beam.utils.counters import Counter + * from apache_beam.utils.counters import CounterName +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_windowed_value}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_windowed_value}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":33 + * from apache_beam.utils import counters + * from apache_beam.utils import windowed_value + * from apache_beam.utils.counters import Counter # <<<<<<<<<<<<<< + * from apache_beam.utils.counters import CounterName + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Counter}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":34 + * from apache_beam.utils import windowed_value + * from apache_beam.utils.counters import Counter + * from apache_beam.utils.counters import CounterName # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":36 + * from apache_beam.utils.counters import CounterName + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.statesampler import StateSampler + * from apache_beam.typehints.batch import BatchConverter +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/worker/opcounters.py":37 + * + * if TYPE_CHECKING: + * from apache_beam.runners.worker.statesampler import StateSampler # <<<<<<<<<<<<<< + * from apache_beam.typehints.batch import BatchConverter + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StateSampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StateSampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":38 + * if TYPE_CHECKING: + * from apache_beam.runners.worker.statesampler import StateSampler + * from apache_beam.typehints.batch import BatchConverter # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints_batch, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":36 + * from apache_beam.utils.counters import CounterName + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.statesampler import StateSampler + * from apache_beam.typehints.batch import BatchConverter +*/ + } + + /* "apache_beam/runners/worker/opcounters.py":63 + * self.scoped_state = None + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * """Update the current running step. + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_3update_current_step, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter_update_curren, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_update_current_step, __pyx_t_2) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":80 + * self._update_counters_for_requesting_step(current_step_name) + * + * def _update_counters_for_requesting_step(self, step_name): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_5_update_counters_for_requesting_step, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter__update_count, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_update_counters_for_requesting, __pyx_t_2) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":83 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * if count > 0 and self.bytes_read_counter: + * self.bytes_read_counter.update(count) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_7add_bytes_read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter_add_bytes_rea, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_add_bytes_read, __pyx_t_2) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":87 + * self.bytes_read_counter.update(count) + * + * def __enter__(self): # <<<<<<<<<<<<<< + * self.scoped_state.__enter__() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_9__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter___enter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_2) < (0)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":90 + * self.scoped_state.__enter__() + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * self.scoped_state.__exit__(exception_type, exception_value, traceback) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_11__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter___exit, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_2) < (0)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_TransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_TransformIOCounter__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_18TransformIOCounter_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_TransformIOCounter___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":99 + * super().__init__(None, None) + * + * def update_current_step(self): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_3update_current_step, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter_update_cu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_update_current_step, __pyx_t_2) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":102 + * pass + * + * def __enter__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_5__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter___enter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_2) < (0)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":105 + * pass + * + * def __exit__(self, exception_type, exception_value, traceback): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_7__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter___exit, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_2) < (0)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":108 + * pass + * + * def add_bytes_read(self, count): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_9add_bytes_read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter_add_bytes, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_add_bytes_read, __pyx_t_2) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_NoOpTransformIOCounter, (type(self), 0xbff26c8, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_NoOpTransformIOCounter__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_22NoOpTransformIOCounter_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NoOpTransformIOCounter___setstat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":154 + * self.update_current_step() + * + * def _update_counters_for_requesting_step(self, step_name): # <<<<<<<<<<<<<< + * side_input_id = counters.side_input_id(step_name, self.input_index) + * self.scoped_state = self._state_sampler.scoped_state( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_3_update_counters_for_requesting_step, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SideInputReadCounter__update_cou, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, __pyx_mstate_global->__pyx_n_u_update_counters_for_requesting, __pyx_t_2) < (0)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SideInputReadCounter___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SideInputReadCounter, (type(self), 0xffcca83, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SideInputReadCounter__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_20SideInputReadCounter_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SideInputReadCounter___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":171 + * self._value = 0 + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._value += value + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumAccumulator_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":174 + * self._value += value + * + * def value(self): # <<<<<<<<<<<<<< + * return self._value + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_5value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumAccumulator_value, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < (0)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumAccumulator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumAccumulator, (type(self), 0xbbd7235, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_14SumAccumulator_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumAccumulator___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":204 + * self.producer_batch_converter = producer_batch_converter + * + * def update_from(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedValue) -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_3update_from, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_update_from, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_update_from, __pyx_t_2) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":211 + * self.do_sample(windowed_value) + * + * def update_from_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (windowed_value.WindowedBatch) -> None + * assert self.producer_batch_converter is not None +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_5update_from_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_update_from_ba, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_update_from_batch, __pyx_t_2) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":224 + * self.mean_byte_counter.update_n(mean_element_size, batch_length) + * + * def _observable_callback(self, inner_coder_impl, accumulator): # <<<<<<<<<<<<<< + * def _observable_callback_inner(value, is_encoded=False): + * # TODO(ccy): If this stream is large, sample it as well. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_7_observable_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters__observable_ca, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_observable_callback, __pyx_t_2) < (0)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":239 + * return _observable_callback_inner + * + * def type_check(self, value): # <<<<<<<<<<<<<< + * # type: (Any, bool) -> None + * for transform_label, type_constraint_tuple in ( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_9type_check, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_type_check, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":272 + * inner_coder_impl, self.active_accumulator)) + * + * def update_collect(self): # <<<<<<<<<<<<<< + * """Collects the accumulated size estimates. + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_11update_collect, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_update_collect, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_update_collect, __pyx_t_2) < (0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":339 + * return False + * + * def should_sample(self): # <<<<<<<<<<<<<< + * # We create this separate method because the above "_should_sample()" method + * # is marked as inline in Cython and thus can't be exposed to Python code. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_13should_sample, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_should_sample, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_should_sample, __pyx_t_2) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":344 + * return self._should_sample() + * + * def restart_sampling(self): # <<<<<<<<<<<<<< + * self._sample_counter = 0 + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_15restart_sampling, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters_restart_sampli, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_restart_sampling, __pyx_t_2) < (0)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_OperationCounters, (type(self), 0x484928c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_OperationCounters__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_17OperationCounters_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_OperationCounters___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_TransformIOCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xbff26c8, 0x4e8c442, 0xc1ef2a6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, scoped_state') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_1__pyx_unpickle_TransformIOCounter, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TransformIOCounte, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_TransformIOCounte, __pyx_t_2) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_3__pyx_unpickle_NoOpTransformIOCounter, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_NoOpTransformIOCo, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_NoOpTransformIOCo, __pyx_t_2) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SideInputReadCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xffcca83, 0xcc99b50, 0x5e946f6, b'_counter_factory, _latest_step, _state_sampler, bytes_read_counter, declaring_step, input_index, scoped_state') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_5__pyx_unpickle_SideInputReadCounter, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SideInputReadCoun, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SideInputReadCoun, __pyx_t_2) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_7__pyx_unpickle_SumAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumAccumulator, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumAccumulator, __pyx_t_2) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_OperationCounters(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x484928c, 0x11319b8, 0x8c9216b, b'_counter_factory, _next_sample, _sample_counter, active_accumulator, coder_impl, current_size, element_counter, mean_byte_counter, output_type_constraints, producer_batch_converter') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10opcounters_9__pyx_unpickle_OperationCounters, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OperationCounters, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opcou, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_OperationCounters, __pyx_t_2) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/opcounters.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.runners.worker.opcounters", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.worker.opcounters"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(0, 353, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/runners/worker/opcounters.py":97 + * """All operations for IO tracking are no-ops.""" + * def __init__(self): + * super().__init__(None, None) # <<<<<<<<<<<<<< + * + * def update_current_step(self): +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/runners/worker/opcounters.py":225 + * + * def _observable_callback(self, inner_coder_impl, accumulator): + * def _observable_callback_inner(value, is_encoded=False): # <<<<<<<<<<<<<< + * # TODO(ccy): If this stream is large, sample it as well. + * # To do this, we'll need to compute the average size of elements +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 9; } index[] = {{1},{13},{14},{4},{179},{9},{39},{1},{2},{1},{2},{2},{2},{1},{1},{1},{8},{40},{4},{7},{6},{2},{9},{14},{25},{14},{3},{17},{14},{7},{11},{24},{22},{32},{31},{40},{42},{37},{42},{17},{35},{37},{38},{34},{31},{28},{32},{29},{35},{8},{5},{20},{3},{20},{38},{40},{57},{12},{14},{32},{34},{21},{20},{13},{18},{28},{27},{36},{38},{55},{33},{38},{14},{11},{14},{37},{39},{21},{27},{32},{17},{26},{18},{20},{9},{18},{5},{5},{15},{8},{13},{14},{8},{5},{9},{18},{13},{8},{14},{15},{8},{5},{8},{11},{34},{8},{10},{12},{2},{5},{8},{16},{11},{9},{13},{10},{5},{8},{3},{8},{4},{10},{4},{8},{7},{20},{26},{56},{3},{3},{24},{19},{14},{12},{11},{10},{37},{32},{35},{29},{33},{14},{12},{7},{6},{10},{17},{13},{17},{16},{12},{4},{12},{10},{12},{19},{13},{13},{4},{10},{5},{13},{9},{6},{5},{3},{8},{9},{10},{6},{6},{14},{36},{19},{11},{17},{8},{12},{5},{6},{7},{14},{14},{14},{40},{11},{9},{14},{10},{11},{121},{11},{94},{13},{9},{11},{54},{84},{216},{216},{310},{389},{91},{19},{11},{2},{57},{59},{58},{58},{58},{11},{86},{46},{22},{29}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2368 bytes) */ +const char* const cstring = "(\265/\375`\031\024\265I\000\ng,\026I\320\356:\007\000_<\213N\314\005\360\032\007\3405\230\302\272\330\024\326\305\246p/\247\0174P\275\245\304n\2117'P'\t\222\322\344\017wv\374\211'2\226\321/,V;\330\230g\365Q\313\003\232l\242\237\331\235\314\357\032\0130\0012\001l\001\267G\377\216\345\255\277t\225\317\267\325\332\024K\323\356\315\177\207\366CS|\315\307\233\265o-\312\345R\323Y\266\361\325\260\322\225e\304\367\311\"\036o\266\231\037\377,\327r\313\327\256\214~\256\277\007\347\025-\344wE\306\345\002\263Yq\241\201\325\270\260l\214\252\265\202\303\252\224\017\265\231\367\014\207(y\216\213\225p\263\304\343\213\343.\021\357kq\217\341\014\377\223\261\273\371\005q%*,\263\211~\036\235}L\266~\214MmR\273\037\263O\013oy\337\212\342E\245\200)(\300\013:`\010\020\304\010\032\037}8\231\307\036\360k#\r\205\035aBf\351;\203\372M^\022\3373\352Q\004Ifx\2648\217\374\362\214\361%\001\371o\020?\215\357[\202\231\203\342?\006\315\214\003e. j\177\211\343 \03699\2321P\226\301\375{_2\214\231\033\334<\374\025\257A\021_\360\304\303I\311Lk\006\304\372y8j\276A\034\371\374\352\217\215\344\213\340\036A\234i\034\267\002\371\245q\360y\226y\234e\236\343V\360\375\230\022\216\315\274\342\370kO\266JJ\002h\202RO\345820F^\234\324\n\251S@\256D\342\235\204lk\310*Z1\220x\"!\3763\014\030\214\215\212D\213e10*\2001\027n\306\347w\216\355\337&\266\326n\\i\356\333(\223\231[o\321\356+{QF\376\026\277\314\341\326\317\3678\273\275\255e\221\274\246\215\367<\311\023\216%69i\356\3275s\337p\245\265\241\325Y\227e.Q);\223!P\326\372|\355b\322\024s\r\217\267f\355,\223\273\366|\024\361\333\255/\267y\264v\304\267\027\361(\216\226\306g\370\311q\213\370Z\221\377\314\332\020\233:gR\366\345gYx\373\237q\333\232h\255~\021\027^\231\325/\346\360\271\265\366C\214G\273\037g\235\307\020\3436\212\034\271\251s\370\"j\363\215B\241\256\316Z\267V0\026\031\227\227U\253ee[38\2607\311\333\223\371%\315\232\031\206\252\232YS\303\367\2336+^\263\304./\2165165\262\247\341\267\227\261<\034Y7\334\214\265\344-]1[\313Z\306\303'\311\374\264\320\276H\232\231\266""\311\262v\365k\236\360\306H2\253\006\217n\033\255\214F\252\357\347\347#\311\217F\373\376?\025*>\034\234\257\325\372T\237J\344\002\003\343\005\320\255\337l\335v\373E\321Q\344\364\034\233>\333\r\030b\351>t\255\365F-I\320y\317v\212\234\005P\020\264u\336\344z\204nz\001%q\246N\226\034\007\211\267b\354\343\367\237\351\254\035\014J\347\253\207\312J!\230:,7 \003\243\364\302\243\204\212g\010G\352\374(\361l\272\020\253\006\007]D\031\350~T\223\005}\001G\347\320\211P]\250N\\Q\324\223*\203\266\234 \242\325\246\232\234P\004\001z\200\224\205~\240\0076\372\206j\223v\360^\253\213\324\003e\235\00620B^\254&T\225z\341j\274\350\000\241\247R\n(\002S\252\321\261eC\337\240\240\223\320\021RO\224\332\320\rt\344\236!%^J'`\305 \322O\316\017RO\265\342TBH\177\235 x\242UD\245\340\321S:\023\253j=\271kP\232\203s\003J\274\233\342\240\017P2\247\201\367J#\200t\020\023\257\203\203\007\240\364\2510\250\202\000\274\223jRy\320\240\334IN@\251gC\033t\364\016\r\236hW\032R\301\320E\324\035T\205*(\36164x\251\264v\206h\360\256\252\241N \320\tp\360\016\364\003\275\223\220I\307a=\255\031R\001\257T\225\336\240\013P\330\tr\352\034\315I\350u\252\316\n\271\021\245S\212j!A\357\245\320\324y:\267)\027`\243\213R\3204\304A\2072\241\253\"\351\t@*eA\025\210\240)9\016 \003\203\343\256\032(v:\336\311t\350w\345pKIpNt\324\256\304\206~\325\227z\"\215pc\242\017\330\265\234\364\324\252\341\325\222B\2704\235\346C\027\351<\254\246uD\245\360\321S\250\241\225TG;\234-F\322\024\036\017\330I=!\033\232#\032R1\351&\r\372Eq\316\216\333{\355fC(:\2265\265r\325\304f:M\275\327L\027\331\361\350| \254\0312THAA\244\333\215\224\"\005)'\207tsC\242\241!\275\274\214\264\036a,\223\215\254\035\301\300\264Z#\025\025Q\334\331\371ll>\026\226o\265\372T\202v\337\263>\013{\250\242\253\320\351:\260\016S\351::\243\233\233\017\010\350\303\341\356\375>\327\367\275\210X\370t\237\025}\205\254\313^\035\266\213Q\365`5\235e\227`\210Dg\322\301\326\r\244\026\211Eb\215\200\200F9\217xxF4\332(\014G;;#\227k\364\3622ji\031\255V_\213\026\037\315\367z}11\242 \027?\375\347\366L""\240\014\261\350R:\276v8\365h^\235d\307B\267\241\263\255'\001\201\265\250\361\254\222\014\215\214\210\210$I\222a\014\201\014a\214:\t\317\007\342\271 \204\224C\206\030D\010aDdDDD&HA\222T\246\003\240*\030D\301z\273\306\213\307Al\334\361!o\t\003M\361\351\363\215[0\r\224\031\213\323Ah\364\271\227\232L\322\340qib\256\233\275\232\240\376Fs\002\220\203\362\342\211\244\377\207\023\255\200\213\256\336;\027\260\010*\320\367\021:\200\322\025\224\233s\023#\234K\353\315\232P\325N\242\247\367K\303\304\304\200\035@\"?D0\025\267\336\013J\345\2506\372\216\25019\260mlnk\2214\304\242-\330N=n\317I\245~\245$6U\235\306\n\350\"Jc\366R\363\023\356\006\230\037\375r\344\007\3750{\236\\\n\3503\034\023\220yg\004\022T!\270\017\370\274F\004\032%\2066\326\001\240\272\220\2426E\333\2524\031\347\370\216h+_\315\243\265G\214+\312@\301\372n|\373R\037\3667\313\3252\307\275\317\337\327\264-\210m.b\351\335\310Hu\370\263\231z\n\362\315?\204B\373y\271\223\3226(\332n.\025\315\2001\035h\275u\252\003\362\243Vy#\252L74U\021\3101\315\327\352_\227\374 \023\211@L\301d\314\\ \243\242\335\246\3478\022\030 \224j\033.a\346\2435Ug\"%\226\336&\250U\217Y\241\267\370\242t\2517\242\003\013b\221\230(\020w\354\375\300\244\353u\336G\177\327,9""\266\374\336v\321`.\035\027\232\244\317\214\325X\217\033\241p\013\033\370\2618\245\263\222\265\201\234\335\364\321m\007\025f\"\014\306\r\250\200\000\272vv\350Y\202\017\315\216J\013\335\257\322\022%\311\355J\355j\227^\266\347W)c\213q\343\346\221\024\205%L\376\006O\236\220d\341\321\302K\242VQ\365\347\203\245O.2\270\013\024\256\255\247E\212-eIni\307u\341\245\263\223\022\233\336\375\250)n\261FN\000\274\3618\204\000\217\006\353\210iY\000\0139x\300\332\003 D\226\361\331\225\346\020\177r\364\347\212\2069\013\306_(\331\343\014\355aB,;\023\024]\360\001H\251p\324\361&)\371\242\257\033Xa\001\004\355?r\366*\322+\250\\\337\372K\224\273O \243z\315H<\021\335\325\213a\372\300\251@{\310\377\243\020\033B\263\262\275\t\351\361\337\2717t\214\020(\212\202JA\037\276/\013\332\253\242\204:\004q\032"; + PyObject *data = __Pyx_DecompressString(cstring, 2368, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2603 bytes) */ +const char* const cstring = "BZh91AY&SY\362r\371G\000\001\272\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`\t\277Y{\227\256\233o{\273\257G\227\266\240\354\336\206\221\002\325\335\274Q\201\222HO*x\2150&S\324\332&dm \236\247\241\017D6\223 3M <\202\032mCM\244i\247\243Sjbd\323\321\251\345\036\240\222\224\006F\204~$\023h\202\036\240\321\246\200b4\000\003A\240\000\000\006M\000\365\006\206\231\000\002\023$\3114 \000b\000\032\032\032hh\001\240\000\000\000\000\032\003@\000\000\000\t\021\004 \022z4\246\030L\247\252x$\361O\322\236\241\220\006\201\246\200\000\032\006\206\217P\323@\000\006\200\004\032b`A\200\t\246\232i\200\010\300F&L\002`\000#\010\300\000#\000&L\230L@\221B\230\t\251\2053\010\220\375I\372\231\224'\352\215\003\324i\352hz\236\240\320\000\000\000\r\000\000\0322\000\321\351:\202A\311i \252\334\265\305\031%:@\274\326\221\3546\332b]\025\372t\272\177\341],)C\234\205XD\262\325\026h\010\255\3164[\316>]=_m\n\364\r\035\223Kcsp\2453N\240%{\324w\336G\247\324W\257}G\271\311\316N\034\320p98\254U\252\361\225\243\217\277\240\312\271\336\212\331\221\334\366]\177\300\370\374\263H\032\361\316h\332\227\215m\006\265\255h\326\271\377\324\221\376b\006 (\200\242!\026\224\016\036\353\314\007\177\216+\026\204%\327]u\327]\214`E\336K\222F$\246\256\262\320\033\017\021\036v\"\304\332\301\266\333m\260\033\033C\013\212\033Gy2\335b\214w\256\004Z\337\244\t\221q\266p\332*\312\021E$\310\236$\345\332x9\245\010\236\352\336\245\"%\030\002\002#=\220\t\257\314kAo>\245U\353X\212\201\353c\255\302\002\216\364G\243\253z\330k\036\366\232H\2144\3525\343]\014u\255\372\225\370 \203\020Dp\021\030\222\034\231\262!y\007\351\"\034\235\017R\366\031\363\303\211b\377\351[m\027\332[\332\245\224\235;0\230\263\263\214\270=\016\307\077\077'\017\027,\336e\302\263\n\023d@\242\261DKp\226K\360'\266\033ZkN\347\367\254\344\\Ao\251\002\337Qv0\342\215~\365\261\013ir\356^\010\221\003\000[\3464\354\242X6\237r\001\306\326K?\310\341\302\210c \210;\373\267R\265\346\331\270\373\236\246\024\360z}TS\253\3454tqsB|\001Am@c\rat\335Qw4\204Q\216\225J\233\267\270-z\227\231\221\"\033jG\201\261\230\333\246\320\\cW|\216\234B\214\315\004\264`\257\\e\024\355\241\252\240\034\226m\014Hi\200\241\025\304\366z\367y\026^\353\r5u\300B\025\245\207\"\3305c\330\271\031\346&\343\263\311r\3444\206\t\205\236e\361\371\2769\344\330\216\027\255g\212\367\025\020\020I\331\343\320\3715\232\256\333\0011\246\300b\356q\347[T\036\331\r\246\271@\341\330r\244\263\245\014,\2211\241\014\310\202\374\334K+)e\0105\362\210\342\311rVm\327\312\200\316b\201\004a[\234\364j\224QW\036\264\2604\332M\215\252\006\240\320\332m&\233\302\016\330p $\205'\211\313$\313;\025C\313\211\020Z\360\205\026R\335`\214f`\236$\306\204>\363H%\206\003\036G<\245G\303\267\\\350\342\217]\350T\350p\"\036\233q\326\234\227\304\225\n:\220\302k\214\036\311\306V\277BY\216\014\200\334\366r\2400\333H\367\004.\256\255\301[\265\260\263\024F\017\242\220\215\346k\260\264\367\331\007\203\2460\317\217G[Wj\245\365\356j\220\214\243H\306p\233\256\254\333Y\314\021\177\025\267\232\361\264\227\016\204\257\214\365\212\010M\304\343+E\300\233\200f`Q\205\034\261\006\n\306Mjw\332\016\250OI\212\303T\222\256\013\262\331\237\022@\212\346\014\"\345$.\240\273D\346=\210\020Q\204w\r&\223@0\342p\332uB0\221MG7\031)\211\323\037`R\236\226\245\312\365\020\000-\273\310\346)Ev\024\245aI""\0241!\226'\001\001\025\013\005\032\253\036\3157(2\334\310)\352N\353\271EF\346l\206\366\337\006j\206!\245}\223\326\322\332\236c\021\337\307\270+5\332\254F\002\227\205\274`l\255\002\206!\024\312c\201\245\302oP\025K\005\314\010\021\"\003\341!\224\262 wL\tK\254\231d\027\251\000o\031\276\2618H<\205\221E\335/Y\365\205\3514\206\275C\370\243\3621\265\314B<\337\344\206\217\365\037[\323\366\256\016\346\376\016\212\"\351!\331\301\363C4t\271h\254\217]\277l\253\245\324zDi#\232\377VZ3|g\232\262\210M\034\305k\221\301\0077z\022\035\\w\344ptB\034\333\275\n\245(p\203\233\241\331\273\274V\033\356\243\"\235\010\361\352\200\210\367\334\312q\221\002\277\323\"\351\353\335\376\025\200\305\242\363\354\224\263\251\350\253\264!\355\377$?\337\204>`h~\250\371\320\014\0160\220\221@\300\322\260\361\rY\302i|\231\343&@\022\005\217\310~\367#\020Y\344\365y<\026\343\014@\230}?\226Hq\262\216\236PI\307a$\206[rIH\342\005\223\262]\340\032\006:nH\244\3348'\327(e\013B\326\224\302\2259\030\036\3032S\3076P\215\202v3\304\206A\025\343\001\020\017Ou\266\264\270\240O\237'\024\214(\361\246L\202\322\\\266\0328\001z\213\250\306!\227\364YTP/\230\234kL\254k\013\223N\241\343o\254j\3034\245\3159a\245\215\333\364\273\212\350\204\301R\313\002\251\212G\253g\353[6\275\365\237C.4Z\356\350\366\021\001\201\021\232+2SR(\207b\266G\215\245>8:Fv\354+\340f\346\363\362\252=\035Z\323\033\337\205\r\215\303\201\270q\020\234C\207\010m\r\203M5\020\036\351\223\377\227\307\256\243J\030\177\361w$S\205\t\017'/\224p"; + PyObject *data = __Pyx_DecompressString(cstring, 2603, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2353 bytes) */ +const char* const cstring = "x\332\325W\313[\023Y\026\207$JT\224ft@[\235\256\314\350\370\030\t\246E\355i\034\232\000\021\030\344\021\010\322 vYT\335$%\225\252P\017 \2646,\263\254e-\263\254e-\263d\311\362.\263\344O\340O\230sn%\204\220\200|\263\231o\374>\363\273\367\334s\316=\367<\213\276\276\204BrD5G5K5\373\246\211\240\216\024L\302v3\232Jf4\223pfV0\271\321\202\231\325TN68\211(\362\032\321\005\223(\005\3160uY4\211\216L*7\227\230\353\033\370i\200\023T\211\323\311g\"\232\006gXk\242\"\030\00618-\315\255Y\262b\312*g\026\362\304\210r\223i\256\240Y\234J\210\304\231\032\227\007\276\223\002f\226\250\234AL\\p\217\004U\325L\301\2245\225\007qY\315<\342$Y\207K\344M\202\322o\005\305 \3219A\037\323\036?4\236\314\303\033\344\034aWq\233\262\2460Q0\337\004\021\270oK6\263`\311/?so\270\017\317\270\217C\334PT\220$\036.!B^\020\263\204_#B\256_\267T\225\350F\377\226\246\257\023\275_\313\213\350\035\240D\363\005\016<#\311\206\260\246\020\242\342oF\224\r\177%\351D\220\372\014Y\"\262\232\267\314\306]\337\032x\271\217)z\203.T3\206f\351\"\031\212\253\205\221D|\232\037\233\\H\315O\216,\246&ggF\004S\314\216j\352&\321\341\332Q\377\366*\314\01092\241\345\264\014Q\211f\031K\262*i[Db\"3\332l>\245\013\252\221\326\364\334\344lM\242%5\312\363\004\221\347\317>\337\226\315s\216u\"Y\"\341E\226'\347\360A8\r\210\342791\024\350%\203G\327\235\301d\345%\246\312\322u0\2377L\222\237\315cnB\244\253w\311K\224o\226\307\366o\034d\350\342\n]\371H?\nT\330\240\033\333t\373\353Q[\333\037\355\361\000@<\220@H\004\226\021\226\003\237\020>\005\010\002\td\021\262\001\005A\t\354 \354\004\342A\224\013\216\004\321\004xM\027\355z\341\rx\033\345\216\362\357\007\217hr\376\260\221\024\371\377}\327k\317,\307\312\343\373\203x\331\373\303F\222\360\215w\355\320\235?@\343n\3734\352\237\016$\021\222\201\371\300\377\372\275_\020\276\004F\361\275\243\301\t\204\211\340\024\302Tp\026a6\270\212\260\032\024\021\304`\026!\033\\GX\017j\010Z\360+\302\327\340X\010`,\224\010\325\275\366\322K\225\273\313\217\366\357\036\214\323\205\324a#)\336\312k\323\007)\232L\323\364g\372y\213n\375\216\346\265O\241\225S\201Y\204\331\200\200 \324\336S@(\004\276\"|\r,\241%K\301\017\010\037\300\364\377\306\277t8ES\037\350\207O\364\223H\305\014\315\030\324\200\000\356\202\312\341\300(\3363\032\030G\030\017,\",\006V\021Vk\206I\010R\315\321U\373\206\321\242\341`\002!Qs\364;\204wA\036\201\017\246\021\3225\327\252\010jPG\320\203S\350\332\251\320<\302|h\ta)\264\202\260\022\372\r\341\267\3206\302vh\027a74|\251\036\204\037\275\007\320g\267\312\353\007\275t.y\330H\352>\016\202\335}Qom\324u\367\273\246\027\363\306\313\203\373\231\003_u\235\"\370\343\347\272\275\354\010\364\207~\332?\274\337^#\2558\320""\216\367\240o\303\000\241\0346\365\301\375uh\030\025\350\362C\245\333l\224\300%_\354\327\320\026\3030\316hld?\n\346c\327\216\265\026\2447\237\270\267\275n\357\244\344O\345v\372\317y:\017\301\024\316\025}P\232\200!\220 >.add_noteapache_beam/runners/worker/opcounters.py at disableenablegcisenabledread-sideinputread-sideinput-byte-countAnyBEAM_DISTRIBUTIONBatchConverterCounterCounterNameHomogeneousWindowedBatchNoOpTransformIOCounterNoOpTransformIOCounter.__enter__NoOpTransformIOCounter.__exit__NoOpTransformIOCounter.__reduce_cython__NoOpTransformIOCounter.__setstate_cython__NoOpTransformIOCounter.add_bytes_readNoOpTransformIOCounter.update_current_stepOperationCountersOperationCounters.__reduce_cython__OperationCounters.__setstate_cython__OperationCounters._observable_callbackOperationCounters.restart_samplingOperationCounters.should_sampleOperationCounters.type_checkOperationCounters.update_collectOperationCounters.update_fromOperationCounters.update_from_batchOptionalParDo__Pyx_PyDict_NextRefSUMSideInputReadCounterSideInputReadCounter.__reduce_cython__SideInputReadCounter.__setstate_cython__SideInputReadCounter._update_counters_for_requesting_stepStateSamplerSumAccumulatorSumAccumulator.__reduce_cython__SumAccumulator.__setstate_cython__SumAccumulator.updateSumAccumulator.valueTYPE_CHECKINGTransformIOCounterTransformIOCounter.__enter__TransformIOCounter.__exit__TransformIOCounter.__reduce_cython__TransformIOCounter.__setstate_cython__TransformIOCounter._update_counters_for_requesting_stepTransformIOCounter.add_bytes_readTransformIOCounter.update_current_stepTypeCheckErroraccumulatoradd_bytes_readapache_beam.runners.worker.opcountersapache_beam.runners.worker.statesamplerapache_beam.typehintsapache_beam.typehints.batchapache_beam.typehints.decoratorsapache_beam.utilsapache_beam.utils.countersasyncio.coroutines_check_instance_type__class__cline_in_tracebackcodercountcounter_factorycounterscurrent_statede""claring_step__dict___dict__enter__estimate_byte_sizeestimate_sizeexc_infoexception_typeexception_value__exit__floor__func__get_counterget_estimated_size_and_observablesget_implget_length__getstate__idindex__init__inner_coder_implinput_indexio_target_is_coroutineis_encodeditems__iter__log__main__math__module__name__name____new___observable_callback_observable_callback_inner_observable_callback.._observable_callback_inneroutpopproducer_batch_converterproducer_type_hints__pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_NoOpTransformIOCounter__pyx_unpickle_OperationCounters__pyx_unpickle_SideInputReadCounter__pyx_unpickle_SumAccumulator__pyx_unpickle_TransformIOCounter__pyx_vtable____qualname__randintrandom__reduce____reduce_cython____reduce_ex__register_observerrestart_samplingscoped_stateself__set_name__setdefault__setstate____setstate_cython__should_sampleside_input_idsizestartswithstatestate_samplerstep_namesuffixsupersys__test__tracebacktype_checktypingupdateupdate_collect_update_counters_for_requesting_stepupdate_current_stepupdate_fromupdate_from_batchupdate_nuse_setstatevaluevaluesverbosewindowed_batchwindowed_valuewith_tracebackPyObject *\000\000_DEFAULT\000get_current_tracker\200\001\330\0040\260\001\260\026\260q\200!\330\004\010\210\013\2201\200!\330\004*\250!\360\030\000\005\014\2101\200!\330\004\010\320\010\033\2301\200\001\330\0042\260!\2606\270\021\200!\340\004\010\320\010\031\320\0312\260!\330\014\020\320\020(\250\006\250a\330\006\026\220m\2401\330\006\007\330\010\034\230A\230\\\250\027\3200@\300\010\310\001\330\006\r\320\r\037\230q\340\010\013\2104\210\177\230k\250\021\250!\330\n\034\230L\250\002\250!\330\010\t\330\014\r\330\021\024\320\024%\240Q\330\010\013\2103\210l\230#\230Y\240a\330\010\016\210n\230A\230Z\240\177\260a\260q\200\001\330\0044\260A\260V\2701\200!\340\004\013\2104\320\017)\250\027\260\001\330\004\013\210:\220Q\320\026&\240n\260A\340\004\023\2204\320\0270\260\013\2701\330\010\026\220a\330\004\010\320\010\030\230\007""\230q\240\001\340\004\030\230\004\320\0345\3205H\310\001\330\010\026\220i\230r\240\021\330\004\010\320\010\032\230)\2401\320$7\260q\200!\360\006\000\005\014\2104\210\177\230a\200!\330\004\013\2104\210q\200\001\330\004,\250A\250V\2601\200!\360\026\000\005\025\220D\230\017\240~\260Q\330\004\030\230\r\240U\250!\330\004\007\320\007\031\230\023\230D\240\001\330\006\n\320\n\032\230!\330\006\n\320\n/\250q\260\001\200!\330\004\024\220H\230N\250!\250;\260d\270!\330\004\010\320\010\030\230\004\230O\250=\270\001\330\010\014\320\014\035\320\035/\250z\270\021\330\004\010\320\010\036\230d\320\"3\260<\270q\330\010\023\2201\330\014\r\330\014\026\220d\230!\330\014\026\220a\330\010\017\210q\200\001\360\010\000\005\016\210T\320\021$\240D\250\017\260t\320;L\310D\320Pe\320ei\320ij\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033-\250W\260E\270\023\270D\300\016\310g\320UZ\320Z]\320]a\320aq\320qx\320x}\360\000\000~\001A\002\360\000\000A\002E\002\360\000\000E\002Y\002\360\000\000Y\002`\002\360\000\000`\002e\002\360\000\000e\002h\002\360\000\000h\002l\002\360\000\000l\002z\002\360\000\000z\002A\003\360\000\000A\003B\003\330\004\007\200q\330\010\017\320\0173\2604\260q\270\007\270{\310'\320QR\340\010\017\320\0173\2604\260q\270\007\270{\310!\200\001\360\010\000\005\016\210T\320\021$\240D\250\017\260t\320;L\310D\320Pe\320ei\320ij\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033-\250W\260E\270\023\270D\300\016\310g\320UZ\320Z]\320]a\320aq\320qx\320x}\360\000\000~\001A\002\360\000\000A\002E\002\360\000\000E\002Y\002\360\000\000Y\002`\002\360\000\000`\002e\002\360\000\000e\002h\002\360\000\000h\002l\002\360\000\000l\002z\002\360\000\000z\002A\003\360\000\000A\003B\003\330\004\007\200q\330\010\017\320\0177\260t\2701\270G\300;\310g\320UV\340\010\017\320\0177\260t\2701\270G\300;\310a\200\001\360\010\000\005\016\210T\320\021$\240D""\250\017\260t\320;L\310D\320Pe\320ei\320iz\320z~\360\000\000\177\001M\002\360\000\000M\002Q\002\360\000\000Q\002R\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033-\250W\260E\270\023\270D\300\016\310g\320UZ\320Z]\320]a\320aq\320qx\320x}\360\000\000~\001A\002\360\000\000A\002E\002\360\000\000E\002Y\002\360\000\000Y\002`\002\360\000\000`\002e\002\360\000\000e\002h\002\360\000\000h\002l\002\360\000\000l\002|\002\360\000\000|\002C\003\360\000\000C\003H\003\360\000\000H\003K\003\360\000\000K\003O\003\360\000\000O\003\\\003\360\000\000\\\003c\003\360\000\000c\003h\003\360\000\000h\003k\003\360\000\000k\003o\003\360\000\000o\003}\003\360\000\000}\003D\004\360\000\000D\004E\004\330\004\007\200q\330\010\017\320\0175\260T\270\021\270'\300\033\310G\320ST\340\010\017\320\0175\260T\270\021\270'\300\033\310A\200\001\360\010\000\005\016\210T\320\021$\240D\250\017\260t\320;M\310T\320Qf\320fj\320jw\320w{\360\000\000|\001K\002\360\000\000K\002O\002\360\000\000O\002a\002\360\000\000a\002e\002\360\000\000e\002y\002\360\000\000y\002}\002\360\000\000}\002W\003\360\000\000W\003[\003\360\000\000[\003\\\003\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\320\033-\250W\260E\270\023\270D\320@T\320T[\320[`\320`c\320cg\320gs\320sz\320z\177\360\000\000@\002C\002\360\000\000C\002G\002\360\000\000G\002U\002\360\000\000U\002\\\002\360\000\000\\\002a\002\360\000\000a\002d\002\360\000\000d\002h\002\360\000\000h\002y\002\360\000\000y\002@\003\360\000\000@\003E\003\360\000\000E\003H\003\360\000\000H\003L\003\360\000\000L\003_\003\360\000\000_\003f\003\360\000\000f\003k\003\360\000\000k\003n\003\360\000\000n\003r\003\360\000\000r\003K\004\360\000\000K\004R\004\360\000\000R\004W\004\360\000\000W\004Z\004\360\000\000Z\004^\004\360\000\000^\004x\004\360\000\000x\004\177\004\360\000\000\177\004@\005\330\004\007\200q\330\010\017\320\0172""\260$\260a\260w\270k\310\027\320PQ\340\010\017\320\0172\260$\260a\260w\270k\310\021\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601\260G\270;\300a\200!\330\004\010\210\r\220Y\230a\320\037/\320/@\300\001\200!\330\004\010\210\r\220Z\230q\200!\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220>\240\030\250\021\250!\330\004\007\200|\2207\230!\330\0100\260\001\3201B\300.\320PQ\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023)\250\030\260\021\260!\330\004\007\200|\2207\230!\330\0108\270\001\3209R\320R`\320`a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023$\240H\250A\250Q\330\004\007\200|\2207\230!\330\0103\2601\3204H\310\016\320VW\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023%\240X\250Q\250a\330\004\007\200|\2207\230!\330\0104\260A\3205J\310.\320XY\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023'\240x\250q\260\001\330\004\007\200|\2207\230!\330\0106\260a\3207N\310n\320\\]\330\004\013\2101\200\001\330\004/\250q\260\006\260a\200!\360\014\000\005\t\320\010\030\230\007\230q\240\001\330\004\007\200t\210>\230\027\240\001\330\006\n\320\n\034\230G\2401\240D\250\001\330\006\n\320\n\032\230!\330\t\r\320\r!\240\027\250\001\330\006\n\320\n\034\230G\2401\240D\320(;\2706\300\021\330\006\n\320\n \240\001\320\004*\250!\360\014\000\007\n\210\021\330\010\017\210s\220!\2201\330\010\023\2207\230!\2301\340\010\023\2207\230!\320\033+\250>\270\021\270!\200!\360\010\000\005\010\200t\210?\230!\330\006\n\210*\220A\220Q\200!\330\004\007\200v\210R\210r\220\024\220T\230\021\330\006\n\320\n\035\230W\240A\240Q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 184; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 26) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 184; i < 216; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 216; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 184; + for (Py_ssize_t i=0; i<32; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {1.0}; + for (int i = 0; i < 1; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 1; + int8_t const cint_constants_1[] = {1,10}; + int32_t const cint_constants_4[] = {75797132L,196964917L,201270984L,268225155L}; + for (int i = 0; i < 6; i++) { + numbertab[i] = PyLong_FromLong((i < 2 ? cint_constants_1[i - 0] : cint_constants_4[i - 2])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<7; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 225}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_is_encoded, __pyx_mstate->__pyx_n_u_size}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_observable_callback_inner, __pyx_mstate->__pyx_kp_b_iso88591_s_1_7_1_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 63}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_current_step, __pyx_mstate->__pyx_kp_b_iso88591_D_Q_U_D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 80}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_step_name}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_counters_for_requesting, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_count}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_add_bytes_read, __pyx_mstate->__pyx_kp_b_iso88591_vRr_T_WAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exception_type, __pyx_mstate->__pyx_n_u_exception_value, __pyx_mstate->__pyx_n_u_traceback}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_t_LDPeeiij_G1F_a_vWE_Q_q_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_0_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 99}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_current_step, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 102}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 105}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exception_type, __pyx_mstate->__pyx_n_u_exception_value, __pyx_mstate->__pyx_n_u_traceback}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 108}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_count}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_add_bytes_read, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_t_LDPeeiij_G1F_a_vWE_Q_q_t_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_4AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 154}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_side_input_id}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_counters_for_requesting, __pyx_mstate->__pyx_kp_b_iso88591_HN_d_O_z_d_3_q_1_d_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_t_LDPeeiizz_M_M_Q_Q_R_G1F_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 171}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 174}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 204}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_from, __pyx_mstate->__pyx_kp_b_iso88591_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_from_batch, __pyx_mstate->__pyx_kp_b_iso88591_4_Q_nA_4_0_1_a_q_55H_ir_1_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inner_coder_impl, __pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_observable_callback_inner, __pyx_mstate->__pyx_n_u_observable_callback_inner}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_observable_callback, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 239}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_type_check, __pyx_mstate->__pyx_kp_b_iso88591_2_a_m1_A_0_q_4_k_L_Q_3l_Ya_nAZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 272}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_update_collect, __pyx_mstate->__pyx_kp_b_iso88591_q_t_G1D_G1D_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 339}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_should_sample, __pyx_mstate->__pyx_kp_b_iso88591_4_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 344}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opcou_2, __pyx_mstate->__pyx_n_u_restart_sampling, __pyx_mstate->__pyx_kp_b_iso88591_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_D_t_MTQffjjww_K_K_O_O_a_a_e_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_TransformIOCounte, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_XQa_7_4A5J_XY_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_NoOpTransformIOCo, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_8_9RR_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SideInputReadCoun, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SumAccumulator, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_OperationCounters, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_314H_VW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* RaiseClosureNameError */ +static void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* PyFloatBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double a = floatval; + double b, result; + CYTHON_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + if (likely(PyFloat_CheckExact(op2))) { + b = __Pyx_PyFloat_AS_DOUBLE(op2); + + } else + if (likely(PyLong_CheckExact(op2))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsZero(op2)) { + b = 0.0; + + } else if (__Pyx_PyLong_IsCompact(op2)) { + b = (double) __Pyx_PyLong_CompactValue(op2); + } else { + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2); + switch (size) { + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #endif + b = PyLong_AsDouble(op2); + if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL; + #if CYTHON_USE_PYLONG_INTERNALS + } + } + #endif + } else { + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); + } + result = a - b; + return PyFloat_FromDouble(result); +} +#endif + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__9); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__10); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* GetRuntimeVersion */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +void __Pyx_init_runtime_version(void) { + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/runners/worker/opcounters.cp314-win_amd64.pyd b/sdks/python/apache_beam/runners/worker/opcounters.cp314-win_amd64.pyd new file mode 100644 index 000000000000..a70209edc6e6 Binary files /dev/null and b/sdks/python/apache_beam/runners/worker/opcounters.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/runners/worker/operations.c b/sdks/python/apache_beam/runners/worker/operations.c new file mode 100644 index 000000000000..f7b25c50290b --- /dev/null +++ b/sdks/python/apache_beam/runners/worker/operations.c @@ -0,0 +1,75103 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.runners.worker.operations", + "sources": [ + "apache_beam/runners/worker/operations.py" + ] + }, + "module_name": "apache_beam.runners.worker.operations" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__runners__worker__operations +#define __PYX_HAVE_API__apache_beam__runners__worker__operations +/* Early includes */ +#include +#include +#include + + #if CYTHON_COMPILING_IN_LIMITED_API + #ifdef _MSC_VER + #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.") + #else + #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API. + #endif + #endif + +#include "datetime.h" + + #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->DateTimeType) + #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType) + + #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC + #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name) + + /* Backport for Python < 3.10 */ + #if PY_VERSION_HEX < 0x030a00a1 + #ifndef PyDateTime_TIME_GET_TZINFO + #define PyDateTime_TIME_GET_TZINFO(o) ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None) + #endif + #ifndef PyDateTime_DATE_GET_TZINFO + #define PyDateTime_DATE_GET_TZINFO(o) ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None) + #endif + #endif + + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE PyObject * + __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index) + { + PyObject *item = PyList_GetItem(list, index); + Py_XINCREF(item); + return item; + } + #else + #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef + #endif + + #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable) + { + return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable); + } + + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Clear(PyObject *list) + { + return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL); + } + #else + #define __Pyx_CAPI_PyList_Extend PyList_Extend + #define __Pyx_CAPI_PyList_Clear PyList_Clear + #endif + + + #if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) + #else + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) + #endif + +#include + + #if PY_MAJOR_VERSION <= 2 + #define PyDict_GetItemWithError _PyDict_GetItemWithError + #endif + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) + { + int res; + PyObject *key_obj = PyUnicode_FromString(key); + if (key_obj == NULL) { + *result = NULL; + return -1; + } + res = __Pyx_PyDict_GetItemRef(mp, key_obj, result); + Py_DECREF(key_obj); + return res; + } + #else + #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef + #endif + #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000) + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value, + PyObject **result) + { + PyObject *value; + if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) { + // get error + if (result) { + *result = NULL; + } + return -1; + } + if (value != NULL) { + // present + if (result) { + *result = value; + } + else { + Py_DECREF(value); + } + return 1; + } + + // missing: set the item + if (PyDict_SetItem(d, key, default_value) < 0) { + // set error + if (result) { + *result = NULL; + } + return -1; + } + if (result) { + Py_INCREF(default_value); + *result = default_value; + } + return 0; + } + #else + #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef + #endif + + + #if PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj) + { + PyObject *obj = PyWeakref_GetObject(ref); + if (obj == NULL) { + // SystemError if ref is NULL + *pobj = NULL; + return -1; + } + if (obj == Py_None) { + *pobj = NULL; + return 0; + } + Py_INCREF(obj); + *pobj = obj; + return 1; + } + #else + #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef + #endif + +#include "pythread.h" + + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get) + #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/runners/worker/operations.py", + "cpython/datetime.pxd", + "cpython/contextvars.pxd", + "", + "apache_beam/runners/worker/operations.pxd", + "apache_beam/utils/windowed_value.pxd", + "apache_beam/transforms/cy_dataflow_distribution_counter.pxd", + "apache_beam/runners/common.pxd", + "apache_beam/utils/counters.pxd", + "cpython/type.pxd", + "cpython/bool.pxd", + "cpython/complex.pxd", + "apache_beam/metrics/cells.pxd", + "apache_beam/metrics/execution.pxd", + "apache_beam/runners/worker/statesampler_fast.pxd", + "apache_beam/runners/worker/opcounters.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase; +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; +struct __pyx_obj_11apache_beam_7runners_6common_Receiver; +struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner; +struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler; +struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler; +struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext; +struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter; +struct __pyx_obj_11apache_beam_5utils_8counters_Counter; +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData; +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData; +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup; +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs; +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create; + +/* "apache_beam/utils/windowed_value.pxd":55 + * + * @cython.locals(wv=WindowedValue) + * cpdef WindowedValue create( # <<<<<<<<<<<<<< + * object value, int64_t timestamp_micros, object windows, object pane_info=*) + * +*/ +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create { + int __pyx_n; + PyObject *pane_info; +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":25 + * + * # 3 buckets for every power of ten -> 1, 2, 5 + * cdef enum: # <<<<<<<<<<<<<< + * BUCKET_PER_TEN = 3 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_BUCKET_PER_TEN = 3 +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":29 + * + * # Assume the max input is max(int64_t), then the possible max bucket size is 59 + * cdef enum: # <<<<<<<<<<<<<< + * MAX_BUCKET_SIZE = 59 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE = 59 +}; +struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process; +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs; +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs; + +/* "apache_beam/runners/common.pxd":80 + * cdef object _bundle_context_values + * + * cpdef invoke_process(self, WindowedValue windowed_value, # <<<<<<<<<<<<<< + * restriction=*, watermark_estimator_state=*, + * additional_args=*, additional_kwargs=*) +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process { + int __pyx_n; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *additional_args; + PyObject *additional_kwargs; +}; + +/* "apache_beam/runners/common.pxd":136 + * @cython.locals(windowed_value=WindowedValue, + * output_element_count=int64_t) + * cpdef handle_process_outputs(self, WindowedValue element, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":141 + * @cython.locals(windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_batch_outputs(self, WindowedBatch input_batch, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":157 + * windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_outputs(self, WindowedValue element, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; + +/* "apache_beam/runners/common.pxd":163 + * windowed_batch=WindowedBatch, + * output_element_count=int64_t) + * cpdef handle_process_batch_outputs(self, WindowedBatch input_batch, results, # <<<<<<<<<<<<<< + * watermark_estimator=*) + * +*/ +struct __pyx_opt_args_11apache_beam_7runners_6common_14_OutputHandler_handle_process_batch_outputs { + int __pyx_n; + PyObject *watermark_estimator; +}; +struct __pyx_opt_args_7cpython_11contextvars_get_value; +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; + +/* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value { + int __pyx_n; + PyObject *default_value; +}; + +/* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { + int __pyx_n; + PyObject *default_value; +}; +struct __pyx_opt_args_7cpython_8datetime_time_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_new; +struct __pyx_opt_args_7cpython_8datetime_timezone_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp; + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_time_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_timezone_new { + int __pyx_n; + PyObject *name; +}; + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp { + int __pyx_n; + PyObject *tz; +}; +struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output; + +/* "apache_beam/runners/worker/operations.pxd":93 + * cpdef finish(self) + * cpdef teardown(self) + * cpdef output(self, WindowedValue windowed_value, int output_index=*) # <<<<<<<<<<<<<< + * cpdef execution_time_monitoring_infos(self, transform_id) + * cpdef user_monitoring_infos(self, transform_id) +*/ +struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output { + int __pyx_n; + int output_index; +}; + +/* "apache_beam/utils/windowed_value.pxd":27 + * cdef list _BYTE_TO_PANE_INFO + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class PaneInfo(object): + * cdef readonly bint _is_first +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo { + PyObject_HEAD + int _is_first; + int _is_last; + int _timing; + int _index; + int _nonspeculative_index; + unsigned char _encoded_byte; +}; + + +/* "apache_beam/utils/windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab; + PyObject *value; + PyObject *windows; + PyObject *pane_info; + int64_t timestamp_micros; + PyObject *timestamp_object; +}; + + +/* "apache_beam/utils/windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab; +}; + + +/* "apache_beam/utils/windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv; +}; + + +/* "apache_beam/utils/windowed_value.pxd":59 + * + * + * cdef class _IntervalWindowBase(object): # <<<<<<<<<<<<<< + * cdef object _start_object + * cdef readonly int64_t _start_micros +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase { + PyObject_HEAD + PyObject *_start_object; + int64_t _start_micros; + PyObject *_end_object; + int64_t _end_micros; +}; + + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":32 + * MAX_BUCKET_SIZE = 59 + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * cdef public int64_t min + * cdef public int64_t max +*/ +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtab; + int64_t min; + int64_t max; + int64_t count; + int64_t sum; + int64_t *buckets; + int is_cythonized; +}; + + +/* "apache_beam/runners/common.pxd":30 + * + * + * cdef class Receiver(object): # <<<<<<<<<<<<<< + * cpdef receive(self, WindowedValue windowed_value) + * cpdef receive_batch(self, WindowedBatch windowed_batch) +*/ +struct __pyx_obj_11apache_beam_7runners_6common_Receiver { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtab; +}; + + +/* "apache_beam/runners/common.pxd":36 + * + * + * cdef class MethodWrapper(object): # <<<<<<<<<<<<<< + * cdef public object args + * cdef public object defaults +*/ +struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper { + PyObject_HEAD + PyObject *args; + PyObject *defaults; + PyObject *method_value; + PyObject *method_name; + int has_userstate_arguments; + PyObject *state_args_to_replace; + PyObject *timer_args_to_replace; + PyObject *timestamp_arg_name; + PyObject *window_arg_name; + PyObject *key_arg_name; + PyObject *restriction_provider; + PyObject *restriction_provider_arg_name; + PyObject *watermark_estimator_provider; + PyObject *watermark_estimator_provider_arg_name; + PyObject *dynamic_timer_tag_arg_name; + int unbounded_per_element; +}; + + +/* "apache_beam/runners/common.pxd":55 + * + * + * cdef class DoFnSignature(object): # <<<<<<<<<<<<<< + * cdef public MethodWrapper process_method + * cdef public MethodWrapper process_batch_method +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *process_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *process_batch_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *start_bundle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *finish_bundle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *setup_lifecycle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *teardown_lifecycle_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *create_watermark_estimator_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *initial_restriction_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *create_tracker_method; + struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper *split_method; + PyObject *batching_configuration; + PyObject *do_fn; + PyObject *timer_methods; + int _is_stateful_dofn; +}; + + +/* "apache_beam/runners/common.pxd":72 + * + * + * cdef class DoFnInvoker(object): # <<<<<<<<<<<<<< + * cdef public DoFnSignature signature + * cdef OutputHandler output_handler +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature *signature; + struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *output_handler; + PyObject *user_state_context; + PyObject *bundle_finalizer_param; + PyObject *_setup_context_values; + PyObject *_bundle_context_values; +}; + + +/* "apache_beam/runners/common.pxd":90 + * + * + * cdef class SimpleInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef object process_method + * cdef object process_batch_method +*/ +struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; + PyObject *process_method; + PyObject *process_batch_method; +}; + + +/* "apache_beam/runners/common.pxd":95 + * + * + * cdef class PerWindowInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef list side_inputs + * cdef DoFnContext context +*/ +struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker { + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; + PyObject *side_inputs; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *context; + PyObject *args_for_process; + PyObject *kwargs_for_process; + PyObject *placeholders_for_process; + PyObject *args_for_process_batch; + PyObject *kwargs_for_process_batch; + PyObject *placeholders_for_process_batch; + int has_windowed_inputs; + int recalculate_window_args; + int has_cached_window_args; + int has_cached_window_batch_args; + PyObject *process_method; + PyObject *process_batch_method; + int is_splittable; + PyObject *threadsafe_restriction_tracker; + PyObject *threadsafe_watermark_estimator; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *current_windowed_value; + PyObject *restriction; + PyObject *watermark_estimator_state; + PyObject *current_window_index; + PyObject *stop_window_index; + int is_key_param_required; + PyObject *splitting_lock; +}; + + +/* "apache_beam/runners/common.pxd":122 + * + * + * cdef class DoFnRunner: # <<<<<<<<<<<<<< + * cdef DoFnContext context + * cdef object step_name +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *context; + PyObject *step_name; + PyObject *side_inputs; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *do_fn_invoker; + PyObject *bundle_finalizer_param; + PyObject *transform_id; + PyObject *execution_context; +}; + + +/* "apache_beam/runners/common.pxd":133 + * + * + * cdef class OutputHandler(object): # <<<<<<<<<<<<<< + * @cython.locals(windowed_value=WindowedValue, + * output_element_count=int64_t) +*/ +struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *__pyx_vtab; +}; + + +/* "apache_beam/runners/common.pxd":145 + * + * + * cdef class _OutputHandler(OutputHandler): # <<<<<<<<<<<<<< + * cdef object window_fn + * cdef Receiver main_receivers +*/ +struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler { + struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler __pyx_base; + PyObject *window_fn; + struct __pyx_obj_11apache_beam_7runners_6common_Receiver *main_receivers; + PyObject *tagged_receivers; + struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *per_element_output_counter; + PyObject *output_batch_converter; + int _process_batch_yields_elements; + int _process_yields_batches; +}; + + +/* "apache_beam/runners/common.pxd":175 + * cdef inline _verify_batch_output(self, result) + * + * cdef class DoFnContext(object): # <<<<<<<<<<<<<< + * cdef object label + * cdef object state +*/ +struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *__pyx_vtab; + PyObject *label; + PyObject *state; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *windowed_value; +}; + + +/* "apache_beam/runners/common.pxd":182 + * + * + * cdef class _ReceiverAdapter(Receiver): # <<<<<<<<<<<<<< + * cdef object underlying +*/ +struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter { + struct __pyx_obj_11apache_beam_7runners_6common_Receiver __pyx_base; + PyObject *underlying; +}; + + +/* "apache_beam/utils/counters.pxd":20 + * # cython: overflowcheck=True + * + * cdef class Counter(object): # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object combine_fn +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_Counter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtab; + PyObject *name; + PyObject *combine_fn; + PyObject *accumulator; + PyObject *_add_input; +}; + + +/* "apache_beam/utils/counters.pxd":28 + * + * + * cdef class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_obj_11apache_beam_5utils_8counters_Counter __pyx_base; + PyObject *_fast_add_input; + PyObject *_fast_add_input_n; +}; + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab; + PyObject *_lock; + PyDateTime_DateTime *_start_time; +}; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int64_t value; +}; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data; +}; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + PyObject *data_class; + PyObject *data; +}; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":62 + * + * + * cdef class DistributionData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData { + PyObject_HEAD + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/metrics/cells.pxd":69 + * + * + * cdef class _BoundedTrieNode(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode { + PyObject_HEAD + int64_t _size; + PyObject *_children; + int _truncated; +}; + + +/* "apache_beam/metrics/cells.pxd":74 + * cdef readonly bint _truncated + * + * cdef class BoundedTrieData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData { + PyObject_HEAD + int64_t _bound; + PyObject *_singleton; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *_root; +}; + + +/* "apache_beam/metrics/execution.pxd":26 + * + * + * cdef class _TypedMetricName(object): # <<<<<<<<<<<<<< + * cdef readonly object cell_type + * cdef readonly object metric_name +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName { + PyObject_HEAD + PyObject *cell_type; + PyObject *metric_name; + PyObject *fast_name; + int64_t _hash; +}; + + +/* "apache_beam/metrics/execution.pxd":36 + * + * + * cdef class MetricUpdater(object): # <<<<<<<<<<<<<< + * cdef _TypedMetricName typed_metric_name + * cdef object default_value +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *typed_metric_name; + PyObject *default_value; + int process_wide; +}; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtab; + PyObject *step_name; + PyObject *lock; + PyObject *metrics; +}; + + +/* "statesampler_fast.pxd":25 + * from libc.stdint cimport int32_t, int64_t + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * cdef int _sampling_period_ms +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtab; + int _sampling_period_ms; + int _sampling_period_ms_start; + double _sampling_period_ratio; + PyObject *scoped_states_by_index; + int started; + int finished; + PyObject *sampling_thread; + PyThread_type_lock lock; + int64_t state_transition_count; + int64_t time_since_transition; + int32_t current_state_index; +}; + + +/* "statesampler_fast.pxd":52 + * self, counter_name, name_context, output_counter, metrics_container) + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *sampler; + int32_t state_index; + PyObject *counter; + PyObject *name; + PyObject *name_context; + int64_t _nsecs; + int32_t old_state_index; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *metrics_container; +}; + + +/* "opcounters.pxd":25 + * + * + * cdef class TransformIOCounter(object): # <<<<<<<<<<<<<< + * cdef readonly object _counter_factory + * cdef readonly object _state_sampler +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtab; + PyObject *_counter_factory; + PyObject *_state_sampler; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *bytes_read_counter; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *scoped_state; + PyObject *_latest_step; +}; + + +/* "opcounters.pxd":38 + * + * + * cdef class NoOpTransformIOCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; + + +/* "opcounters.pxd":42 + * + * + * cdef class SideInputReadCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * cdef readonly object declaring_step + * cdef readonly object input_index +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter { + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; + PyObject *declaring_step; + PyObject *input_index; +}; + + +/* "opcounters.pxd":47 + * + * + * cdef class SumAccumulator(object): # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t _value + * cpdef update(self, libc.stdint.int64_t value) +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtab; + int64_t _value; +}; + + +/* "opcounters.pxd":53 + * + * + * cdef class OperationCounters(object): # <<<<<<<<<<<<<< + * cdef public _counter_factory + * cdef public Counter element_counter +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtab; + PyObject *_counter_factory; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *element_counter; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *mean_byte_counter; + PyObject *coder_impl; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *active_accumulator; + PyObject *current_size; + int64_t _sample_counter; + int64_t _next_sample; + PyObject *output_type_constraints; + PyObject *producer_batch_converter; +}; + + +/* "apache_beam/runners/worker/operations.pxd":31 + * + * + * cdef class ConsumerSet(Receiver): # <<<<<<<<<<<<<< + * cdef list consumers + * cdef readonly opcounters.OperationCounters opcounter +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet { + struct __pyx_obj_11apache_beam_7runners_6common_Receiver __pyx_base; + PyObject *consumers; + struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *opcounter; + PyObject *step_name; + PyObject *output_index; + PyObject *coder; + PyObject *output_sampler; + PyObject *element_sampler; + PyObject *execution_context; +}; + + +/* "apache_beam/runners/worker/operations.pxd":45 + * cpdef update_counters_batch(self, WindowedBatch windowed_batch) + * + * cdef class SingletonElementConsumerSet(ConsumerSet): # <<<<<<<<<<<<<< + * cdef Operation consumer + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *consumer; +}; + + +/* "apache_beam/runners/worker/operations.pxd":52 + * cpdef flush(self) + * + * cdef class GeneralPurposeConsumerSet(ConsumerSet): # <<<<<<<<<<<<<< + * cdef list element_consumers + * cdef list passthrough_batch_consumers +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base; + PyObject *element_consumers; + PyObject *passthrough_batch_consumers; + PyObject *other_batch_consumers; + int has_batch_consumers; + PyObject *_batched_elements; + PyObject *producer_batch_converter; +}; + + +/* "apache_beam/runners/worker/operations.pxd":64 + * cpdef flush(self) + * + * cdef class Operation(object): # <<<<<<<<<<<<<< + * cdef readonly name_context + * cdef readonly operation_name +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *__pyx_vtab; + PyObject *name_context; + PyObject *operation_name; + PyObject *spec; + PyObject *consumers; + PyObject *counter_factory; + PyObject *metrics_container; + PyObject *execution_context; + PyObject *receivers; + int debug_logging_enabled; + int setup_done; + PyObject *step_name; + PyObject *state_sampler; + PyObject *scoped_start_state; + PyObject *scoped_process_state; + PyObject *scoped_finish_state; + PyObject *data_sampler; +}; + + +/* "apache_beam/runners/worker/operations.pxd":100 + * + * + * cdef class ReadOperation(Operation): # <<<<<<<<<<<<<< + * @cython.locals(windowed_value=WindowedValue) + * cpdef start(self) +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; + + +/* "apache_beam/runners/worker/operations.pxd":105 + * + * + * cdef class ImpulseReadOperation(Operation): # <<<<<<<<<<<<<< + * cdef object source + * @cython.locals(windowed_value=WindowedValue) +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; + PyObject *source; +}; + + +/* "apache_beam/runners/worker/operations.pxd":111 + * + * + * cdef class DoOperation(Operation): # <<<<<<<<<<<<<< + * cdef DoFnRunner dofn_runner + * cdef object tagged_receivers +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; + struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *dofn_runner; + PyObject *tagged_receivers; + PyObject *side_input_maps; + PyObject *user_state_context; + PyObject *timer_inputs; + PyObject *timer_specs; + PyObject *input_info; + PyObject *fn; + PyObject *scoped_timer_processing_state; +}; + + +/* "apache_beam/runners/worker/operations.pxd":123 + * + * + * cdef class SdfProcessSizedElements(DoOperation): # <<<<<<<<<<<<<< + * cdef object lock + * cdef object element_start_output_bytes +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base; + PyObject *lock; + PyObject *element_start_output_bytes; +}; + + +/* "apache_beam/runners/worker/operations.pxd":127 + * cdef object element_start_output_bytes + * + * cdef class SdfTruncateSizedRestrictions(DoOperation): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base; +}; + + +/* "apache_beam/runners/worker/operations.pxd":130 + * pass + * + * cdef class CombineOperation(Operation): # <<<<<<<<<<<<<< + * cdef object phased_combine_fn + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; + PyObject *phased_combine_fn; +}; + + +/* "apache_beam/runners/worker/operations.pxd":134 + * + * + * cdef class PGBKCVOperation(Operation): # <<<<<<<<<<<<<< + * cdef public object combine_fn + * cdef public object combine_fn_add_input +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; + PyObject *combine_fn; + PyObject *combine_fn_add_input; + PyObject *combine_fn_compact; + int is_default_windowing; + PyObject *timestamp_combiner; + PyObject *table; + long max_keys; + long key_count; +}; + + +/* "apache_beam/runners/worker/operations.pxd":148 + * + * + * cdef class FlattenOperation(Operation): # <<<<<<<<<<<<<< + * pass +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; + + +/* "apache_beam/runners/worker/operations.py":462 + * self.data_sampler: Optional[DataSampler] = None + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup { + PyObject_HEAD + PyObject *__pyx_v_data_sampler; + PyObject *__pyx_v_transform_id; +}; + + +/* "apache_beam/runners/worker/operations.py":820 + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) + * + * def _read_side_inputs(self, tags_and_types): # <<<<<<<<<<<<<< + * # type: (...) -> Iterator[apache_sideinputs.SideInputMap] + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs { + PyObject_HEAD + PyObject *__pyx_v_element_counter; + PyObject *__pyx_v_i; + PyObject *__pyx_v_iterator_fn; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self; + PyObject *__pyx_v_si; + PyObject *__pyx_v_si_counter; + PyObject *__pyx_v_side_tag; + PyObject *__pyx_v_sources; + PyObject *__pyx_v_tags_and_types; + PyObject *__pyx_v_view_class; + PyObject *__pyx_v_view_options; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); +}; + + + +/* "apache_beam/utils/windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; + + +/* "apache_beam/utils/windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + + +/* "apache_beam/utils/windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":32 + * MAX_BUCKET_SIZE = 59 + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * cdef public int64_t min + * cdef public int64_t max +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + int (*add_input)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + int (*add_input_n)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int64_t, int __pyx_skip_dispatch); + int64_t (*_fast_calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t); + void (*translate_to_histogram)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int (*add_inputs_for_test)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int64_t (*calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + PyObject *(*extract_output)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + + +/* "apache_beam/runners/common.pxd":30 + * + * + * cdef class Receiver(object): # <<<<<<<<<<<<<< + * cpdef receive(self, WindowedValue windowed_value) + * cpdef receive_batch(self, WindowedBatch windowed_batch) +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver { + PyObject *(*receive)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); + PyObject *(*receive_batch)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch); + PyObject *(*flush)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver; + + +/* "apache_beam/runners/common.pxd":72 + * + * + * cdef class DoFnInvoker(object): # <<<<<<<<<<<<<< + * cdef public DoFnSignature signature + * cdef OutputHandler output_handler +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker { + PyObject *(*invoke_process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_11DoFnInvoker_invoke_process *__pyx_optional_args); + PyObject *(*invoke_start_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch); + PyObject *(*invoke_finish_bundle)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, int __pyx_skip_dispatch); + PyObject *(*invoke_split)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*invoke_initial_restriction)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*invoke_create_tracker)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker; + + +/* "apache_beam/runners/common.pxd":90 + * + * + * cdef class SimpleInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef object process_method + * cdef object process_batch_method +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker; + + +/* "apache_beam/runners/common.pxd":95 + * + * + * cdef class PerWindowInvoker(DoFnInvoker): # <<<<<<<<<<<<<< + * cdef list side_inputs + * cdef DoFnContext context +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker *__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker; + + +/* "apache_beam/runners/common.pxd":122 + * + * + * cdef class DoFnRunner: # <<<<<<<<<<<<<< + * cdef DoFnContext context + * cdef object step_name +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner { + PyObject *(*process)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner; + + +/* "apache_beam/runners/common.pxd":133 + * + * + * cdef class OutputHandler(object): # <<<<<<<<<<<<<< + * @cython.locals(windowed_value=WindowedValue, + * output_element_count=int64_t) +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler { + PyObject *(*handle_process_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_outputs *__pyx_optional_args); + PyObject *(*handle_process_batch_outputs)(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6common_13OutputHandler_handle_process_batch_outputs *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler; + + +/* "apache_beam/runners/common.pxd":145 + * + * + * cdef class _OutputHandler(OutputHandler): # <<<<<<<<<<<<<< + * cdef object window_fn + * cdef Receiver main_receivers +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*_maybe_propagate_windowing_info)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); + PyObject *(*_handle_tagged_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); + PyObject *(*_write_value_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *); + PyObject *(*_write_batch_to_tag)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *); + PyObject *(*_verify_batch_output)(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler *__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler; + + +/* "apache_beam/runners/common.pxd":175 + * cdef inline _verify_batch_output(self, result) + * + * cdef class DoFnContext(object): # <<<<<<<<<<<<<< + * cdef object label + * cdef object state +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext { + PyObject *(*set_element)(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext *__pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext; + + +/* "apache_beam/runners/common.pxd":182 + * + * + * cdef class _ReceiverAdapter(Receiver): # <<<<<<<<<<<<<< + * cdef object underlying +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter *__pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter; + + +/* "apache_beam/utils/counters.pxd":20 + * # cython: overflowcheck=True + * + * cdef class Counter(object): # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object combine_fn +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter { + int (*update)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtabptr_11apache_beam_5utils_8counters_Counter; + + +/* "apache_beam/utils/counters.pxd":28 + * + * + * cdef class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell { + int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update_locked)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*get_metric_cell)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer; + + +/* "statesampler_fast.pxd":25 + * from libc.stdint cimport int32_t, int64_t + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * cdef int _sampling_period_ms +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, int __pyx_skip_dispatch); + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state_c)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *); + PyObject *(*_scoped_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + + +/* "statesampler_fast.pxd":52 + * self, counter_name, name_context, output_counter, metrics_container) + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, int __pyx_skip_dispatch); + PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + + +/* "opcounters.pxd":25 + * + * + * cdef class TransformIOCounter(object): # <<<<<<<<<<<<<< + * cdef readonly object _counter_factory + * cdef readonly object _state_sampler +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter { + PyObject *(*update_current_step)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch); + PyObject *(*add_bytes_read)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int64_t, int __pyx_skip_dispatch); + PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, int __pyx_skip_dispatch); + PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + + +/* "opcounters.pxd":38 + * + * + * cdef class NoOpTransformIOCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + + +/* "opcounters.pxd":42 + * + * + * cdef class SideInputReadCounter(TransformIOCounter): # <<<<<<<<<<<<<< + * cdef readonly object declaring_step + * cdef readonly object input_index +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + + +/* "opcounters.pxd":47 + * + * + * cdef class SumAccumulator(object): # <<<<<<<<<<<<<< + * cdef libc.stdint.int64_t _value + * cpdef update(self, libc.stdint.int64_t value) +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator { + PyObject *(*update)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int64_t, int __pyx_skip_dispatch); + int64_t (*value)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + + +/* "opcounters.pxd":53 + * + * + * cdef class OperationCounters(object): # <<<<<<<<<<<<<< + * cdef public _counter_factory + * cdef public Counter element_counter +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters { + PyObject *(*update_from)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*update_from_batch)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*do_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *); + PyObject *(*update_collect)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch); + PyObject *(*type_check)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, PyObject *, int __pyx_skip_dispatch); + int64_t (*_compute_next_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int64_t); + int (*_should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *); + int (*should_sample)(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + + +/* "apache_beam/runners/worker/operations.py":108 + * + * + * class ConsumerSet(Receiver): # <<<<<<<<<<<<<< + * """A ConsumerSet represents a graph edge between two Operation nodes. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet { + struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver __pyx_base; + PyObject *(*update_counters_start)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); + PyObject *(*update_counters_finish)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, int __pyx_skip_dispatch); + PyObject *(*update_counters_batch)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet; + + +/* "apache_beam/runners/worker/operations.py":238 + * + * + * class SingletonElementConsumerSet(ConsumerSet): # <<<<<<<<<<<<<< + * """ConsumerSet representing a single consumer that can only process elements + * (not batches).""" +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + + +/* "apache_beam/runners/worker/operations.py":282 + * + * + * class GeneralPurposeConsumerSet(ConsumerSet): # <<<<<<<<<<<<<< + * """ConsumerSet implementation that handles all combinations of possible edges. + * """ +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + + +/* "apache_beam/runners/worker/operations.py":412 + * + * + * class Operation(object): # <<<<<<<<<<<<<< + * """An operation representing the live version of a work item specification. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation { + PyObject *(*start)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch); + PyObject *(*process)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch); + PyObject *(*finish)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch); + PyObject *(*teardown)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch); + PyObject *(*output)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args); + PyObject *(*execution_time_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*user_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*pcollection_count_monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*monitoring_infos)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + + +/* "apache_beam/runners/worker/operations.py":703 + * + * + * class ReadOperation(Operation): # <<<<<<<<<<<<<< + * def start(self): + * with self.scoped_start_state: +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation; + + +/* "apache_beam/runners/worker/operations.py":717 + * + * + * class ImpulseReadOperation(Operation): # <<<<<<<<<<<<<< + * def __init__( + * self, +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + + +/* "apache_beam/runners/worker/operations.py":795 + * + * + * class DoOperation(Operation): # <<<<<<<<<<<<<< + * """A Do operation that will execute a custom DoFn for each input element.""" + * def __init__( +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation; + + +/* "apache_beam/runners/worker/operations.py":1060 + * + * + * class SdfProcessSizedElements(DoOperation): # <<<<<<<<<<<<<< + * def __init__(self, *args, **kwargs): + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + + +/* "apache_beam/runners/worker/operations.py":1046 + * + * + * class SdfTruncateSizedRestrictions(DoOperation): # <<<<<<<<<<<<<< + * def __init__(self, *args, **kwargs): + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + + +/* "apache_beam/runners/worker/operations.py":1143 + * + * + * class CombineOperation(Operation): # <<<<<<<<<<<<<< + * """A Combine operation executing a CombineFn for each input element.""" + * def __init__(self, name_context, spec, counter_factory, state_sampler): +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation; + + +/* "apache_beam/runners/worker/operations.py":1236 + * + * + * class PGBKCVOperation(Operation): # <<<<<<<<<<<<<< + * """PGBKCVOperation GroupByKey with CombineValues operation. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; + PyObject *(*add_key_value)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*output_key)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + + +/* "apache_beam/runners/worker/operations.py":1360 + * + * + * class FlattenOperation(Operation): # <<<<<<<<<<<<<< + * """Flatten operation. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation { + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto (used by CIntToPyUnicode) */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto (used by CIntToPyUnicode) */ +#include + +/* CIntToPyUnicode.proto */ +#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterNextPlain.proto (used by IterNext) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* IterNext.proto */ +#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); + +/* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* KeywordStringCheck.proto */ +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(const char* function_name, PyObject *kw); + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2)) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) +#endif + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* CallUnboundCMethod1.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* DivInt[long].proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant); + +/* SetItemInt.proto */ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* CallNextTpDealloc.proto */ +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); + +/* CallNextTpTraverse.proto */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/* CallNextTpClear.proto */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* GetVTable.proto */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* PyRuntimeWarning_Check.proto */ +#define __Pyx_PyExc_RuntimeWarning_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeWarning) + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/ +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_add_key_value(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "apache_beam.utils.windowed_value" */ +static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp) +static PyObject **__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0; +#define __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO (*__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO) + +/* Module declarations from "apache_beam.transforms.cy_dataflow_distribution_counter" */ + +/* Module declarations from "apache_beam.runners.common" */ +static PyTypeObject **__pyx_vp_11apache_beam_7runners_6common_TaggedOutput = 0; +#define __pyx_v_11apache_beam_7runners_6common_TaggedOutput (*__pyx_vp_11apache_beam_7runners_6common_TaggedOutput) +static PyTypeObject **__pyx_vp_11apache_beam_7runners_6common_TimestampedValue = 0; +#define __pyx_v_11apache_beam_7runners_6common_TimestampedValue (*__pyx_vp_11apache_beam_7runners_6common_TimestampedValue) + +/* Module declarations from "apache_beam.runners.worker" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "apache_beam.utils.counters" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "cpython.exc" */ + +/* Module declarations from "cpython.module" */ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython.list" */ + +/* Module declarations from "cpython.sequence" */ + +/* Module declarations from "cpython.mapping" */ + +/* Module declarations from "cpython.iterator" */ + +/* Module declarations from "cpython.number" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.bool" */ + +/* Module declarations from "cpython.long" */ + +/* Module declarations from "cpython.float" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.complex" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "cpython.unicode" */ + +/* Module declarations from "cpython.pyport" */ + +/* Module declarations from "cpython.dict" */ + +/* Module declarations from "cpython.instance" */ + +/* Module declarations from "cpython.function" */ + +/* Module declarations from "cpython.method" */ + +/* Module declarations from "cpython.weakref" */ + +/* Module declarations from "cpython.getargs" */ + +/* Module declarations from "cpython.pythread" */ + +/* Module declarations from "cpython.pystate" */ + +/* Module declarations from "cpython.set" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cpython.pycapsule" */ + +/* Module declarations from "cpython.contextvars" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "datetime" */ + +/* Module declarations from "cpython.datetime" */ + +/* Module declarations from "apache_beam.metrics.cells" */ + +/* Module declarations from "apache_beam.metrics.execution" */ +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker = 0; +#define __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker (*__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker) +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT = 0; +#define __pyx_v_11apache_beam_7metrics_9execution__DEFAULT (*__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT) + +/* Module declarations from "apache_beam.runners.worker.statesampler_fast" */ + +/* Module declarations from "apache_beam.runners.worker.opcounters" */ + +/* Module declarations from "apache_beam.runners.worker.operations" */ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value = 0; +static PyTypeObject *__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type = 0; +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.runners.worker.operations" +extern int __pyx_module_is_main_apache_beam__runners__worker__operations; +int __pyx_module_is_main_apache_beam__runners__worker__operations = 0; + +/* Implementation of "apache_beam.runners.worker.operations" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_filter; +static PyObject *__pyx_builtin_min; +static PyObject *__pyx_builtin_max; +static PyObject *__pyx_builtin_sum; +static PyObject *__pyx_builtin_reversed; +static PyObject *__pyx_builtin_zip; +/* #### Code section: string_decls ### */ +static const char __pyx_k_Worker_operations_executor[] = "Worker operations executor."; +static const char __pyx_k_batched_elements_coder_consumer[] = "_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name"; +static const char __pyx_k_coder_consumers_element_sampler[] = "coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name"; +static const char __pyx_k_combine_fn_combine_fn_add_input[] = "combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner"; +static const char __pyx_k_coder_consumer_consumers_element[] = "coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name"; +static const char __pyx_k_consumers_counter_factory_data_s[] = "consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name"; +static const char __pyx_k_consumers_counter_factory_data_s_2[] = "consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name"; +static const char __pyx_k_consumers_counter_factory_data_s_3[] = "consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context"; +static const char __pyx_k_consumers_counter_factory_data_s_4[] = "consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context"; +static const char __pyx_k_consumers_counter_factory_data_s_5[] = "consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_8update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_16__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_18__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumer, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_output_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_consumers, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_22current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_24finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_26teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_v_output_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_operation, PyObject *__pyx_v_output_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_is_recursive); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_48__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_50__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_consumers, PyObject *__pyx_v_source, PyObject *__pyx_v_output_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_sampler, PyObject *__pyx_v_side_input_maps, PyObject *__pyx_v_user_state_context); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tags_and_types); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_15process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_17process_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_timer_family_id, PyObject *__pyx_v_timer_info); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_timer_data); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_27finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_29teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_37__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_39__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_windowing); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6add_key_value(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_12output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_14__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_16__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, CYTHON_UNUSED PyObject *__pyx_v_step_name, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink, PyObject *__pyx_v_is_streaming); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_map_task, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_Receiver; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_OutputHandler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__OutputHandler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common_DoFnContext; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_Counter; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_4bool_bool; + PyTypeObject *__pyx_ptype_7cpython_7complex_complex; + PyTypeObject *__pyx_ptype_7cpython_8datetime_date; + PyTypeObject *__pyx_ptype_7cpython_8datetime_time; + PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime; + PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta; + PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_Operation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup; + PyObject *__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_slice[2]; + PyObject *__pyx_tuple[10]; + PyObject *__pyx_codeobj_tab[126]; + PyObject *__pyx_string_tab[733]; + PyObject *__pyx_number_tab[16]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[8]; +int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[8]; +int __pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_A_write_operation_that_will_writ __pyx_string_tab[1] +#define __pyx_kp_u_An_executor_for_map_tasks_Stores __pyx_string_tab[2] +#define __pyx_kp_u_Expected_an_instance_of_operatio __pyx_string_tab[3] +#define __pyx_kp_u_Finishing_s __pyx_string_tab[4] +#define __pyx_kp_u_Input_to_operation __pyx_string_tab[5] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[6] +#define __pyx_kp_u_Optional_BatchConverter __pyx_string_tab[7] +#define __pyx_kp_u_Partial_group_by_key_operation_T __pyx_string_tab[8] +#define __pyx_kp_u_Processing_s_in_s __pyx_string_tab[9] +#define __pyx_kp_u_Setup_called_for_s __pyx_string_tab[10] +#define __pyx_kp_u_SingletonElementConsumerSet_rece __pyx_string_tab[11] +#define __pyx_kp_u_Starting_op_d_s __pyx_string_tab[12] +#define __pyx_kp_u_Teardown_called_for_s __pyx_string_tab[13] +#define __pyx_kp_u_This_is_very_inefficient_consid __pyx_string_tab[14] +#define __pyx_kp_u_Unknown_side_input_type_r __pyx_string_tab[15] +#define __pyx_kp_u__2 __pyx_string_tab[16] +#define __pyx_kp_u__3 __pyx_string_tab[17] +#define __pyx_kp_u__4 __pyx_string_tab[18] +#define __pyx_kp_u__5 __pyx_string_tab[19] +#define __pyx_kp_u__6 __pyx_string_tab[20] +#define __pyx_kp_u__7 __pyx_string_tab[21] +#define __pyx_kp_u__8 __pyx_string_tab[22] +#define __pyx_kp_u_add_note __pyx_string_tab[23] +#define __pyx_kp_u_apache_beam_runners_worker_opera_2 __pyx_string_tab[24] +#define __pyx_kp_u_coder_2 __pyx_string_tab[25] +#define __pyx_kp_u_disable __pyx_string_tab[26] +#define __pyx_kp_u_enable __pyx_string_tab[27] +#define __pyx_kp_u_gc __pyx_string_tab[28] +#define __pyx_kp_u_isenabled __pyx_string_tab[29] +#define __pyx_kp_u_len_consumers __pyx_string_tab[30] +#define __pyx_kp_u_must_be_rebatched_from_type __pyx_string_tab[31] +#define __pyx_kp_u_out __pyx_string_tab[32] +#define __pyx_kp_u_process_timers __pyx_string_tab[33] +#define __pyx_kp_u_receivers_s __pyx_string_tab[34] +#define __pyx_kp_u_s __pyx_string_tab[35] +#define __pyx_kp_u_s_2 __pyx_string_tab[36] +#define __pyx_kp_u_side_input __pyx_string_tab[37] +#define __pyx_kp_u_stringsource __pyx_string_tab[38] +#define __pyx_kp_u_to __pyx_string_tab[39] +#define __pyx_kp_u_warning_to_indicate_an_inefficie __pyx_string_tab[40] +#define __pyx_n_u_Any __pyx_string_tab[41] +#define __pyx_n_u_BATCH_FORBIDDEN __pyx_string_tab[42] +#define __pyx_n_u_BATCH_REQUIRED __pyx_string_tab[43] +#define __pyx_n_u_BatchConverter __pyx_string_tab[44] +#define __pyx_n_u_BatchGroupAlsoByWindowsOperation __pyx_string_tab[45] +#define __pyx_n_u_BatchingPreference __pyx_string_tab[46] +#define __pyx_n_u_CallableWrapperCombineFn __pyx_string_tab[47] +#define __pyx_n_u_CombineFn __pyx_string_tab[48] +#define __pyx_n_u_CombineOperation __pyx_string_tab[49] +#define __pyx_n_u_CombineOperation___reduce_cython __pyx_string_tab[50] +#define __pyx_n_u_CombineOperation___setstate_cyth __pyx_string_tab[51] +#define __pyx_n_u_CombineOperation_finish __pyx_string_tab[52] +#define __pyx_n_u_CombineOperation_process __pyx_string_tab[53] +#define __pyx_n_u_CombineOperation_setup __pyx_string_tab[54] +#define __pyx_n_u_CombineOperation_teardown __pyx_string_tab[55] +#define __pyx_n_u_ConsumerSet __pyx_string_tab[56] +#define __pyx_n_u_ConsumerSet___reduce_cython __pyx_string_tab[57] +#define __pyx_n_u_ConsumerSet___setstate_cython __pyx_string_tab[58] +#define __pyx_n_u_ConsumerSet_create __pyx_string_tab[59] +#define __pyx_n_u_ConsumerSet_current_element_prog __pyx_string_tab[60] +#define __pyx_n_u_ConsumerSet_try_split __pyx_string_tab[61] +#define __pyx_n_u_ConsumerSet_update_counters_batc __pyx_string_tab[62] +#define __pyx_n_u_ConsumerSet_update_counters_fini __pyx_string_tab[63] +#define __pyx_n_u_ConsumerSet_update_counters_star __pyx_string_tab[64] +#define __pyx_n_u_CountCombineFn __pyx_string_tab[65] +#define __pyx_n_u_DEBUG __pyx_string_tab[66] +#define __pyx_n_u_DO_NOT_CARE __pyx_string_tab[67] +#define __pyx_n_u_DataSampler __pyx_string_tab[68] +#define __pyx_n_u_DefaultDict __pyx_string_tab[69] +#define __pyx_n_u_Dict __pyx_string_tab[70] +#define __pyx_n_u_DistributionData __pyx_string_tab[71] +#define __pyx_n_u_DoFnRunner __pyx_string_tab[72] +#define __pyx_n_u_DoFnState __pyx_string_tab[73] +#define __pyx_n_u_DoOperation __pyx_string_tab[74] +#define __pyx_n_u_DoOperation___reduce_cython __pyx_string_tab[75] +#define __pyx_n_u_DoOperation___setstate_cython __pyx_string_tab[76] +#define __pyx_n_u_DoOperation__get_runtime_perform __pyx_string_tab[77] +#define __pyx_n_u_DoOperation__read_side_inputs __pyx_string_tab[78] +#define __pyx_n_u_DoOperation_add_timer_info __pyx_string_tab[79] +#define __pyx_n_u_DoOperation_finalize_bundle __pyx_string_tab[80] +#define __pyx_n_u_DoOperation_finish __pyx_string_tab[81] +#define __pyx_n_u_DoOperation_get_batching_prefere __pyx_string_tab[82] +#define __pyx_n_u_DoOperation_get_input_batch_conv __pyx_string_tab[83] +#define __pyx_n_u_DoOperation_get_output_batch_con __pyx_string_tab[84] +#define __pyx_n_u_DoOperation_needs_finalization __pyx_string_tab[85] +#define __pyx_n_u_DoOperation_pcollection_count_mo __pyx_string_tab[86] +#define __pyx_n_u_DoOperation_process __pyx_string_tab[87] +#define __pyx_n_u_DoOperation_process_batch __pyx_string_tab[88] +#define __pyx_n_u_DoOperation_process_timer __pyx_string_tab[89] +#define __pyx_n_u_DoOperation_reset __pyx_string_tab[90] +#define __pyx_n_u_DoOperation_setup __pyx_string_tab[91] +#define __pyx_n_u_DoOperation_start __pyx_string_tab[92] +#define __pyx_n_u_DoOperation_teardown __pyx_string_tab[93] +#define __pyx_n_u_ELEMENT_COUNT_URN __pyx_string_tab[94] +#define __pyx_n_u_EmulatedIterable __pyx_string_tab[95] +#define __pyx_n_u_ExecutionContext __pyx_string_tab[96] +#define __pyx_n_u_FINISH_BUNDLE_MSECS_URN __pyx_string_tab[97] +#define __pyx_n_u_FlattenOperation __pyx_string_tab[98] +#define __pyx_n_u_FlattenOperation___reduce_cython __pyx_string_tab[99] +#define __pyx_n_u_FlattenOperation___setstate_cyth __pyx_string_tab[100] +#define __pyx_n_u_FlattenOperation_process __pyx_string_tab[101] +#define __pyx_n_u_FloatCoder __pyx_string_tab[102] +#define __pyx_n_u_FrozenSet __pyx_string_tab[103] +#define __pyx_n_u_GeneralPurposeConsumerSet __pyx_string_tab[104] +#define __pyx_n_u_GeneralPurposeConsumerSet___redu __pyx_string_tab[105] +#define __pyx_n_u_GeneralPurposeConsumerSet___sets __pyx_string_tab[106] +#define __pyx_n_u_GeneralPurposeConsumerSet_flush __pyx_string_tab[107] +#define __pyx_n_u_GeneralPurposeConsumerSet_receiv __pyx_string_tab[108] +#define __pyx_n_u_GeneralPurposeConsumerSet_receiv_2 __pyx_string_tab[109] +#define __pyx_n_u_GlobalWindows __pyx_string_tab[110] +#define __pyx_n_u_GroupedShuffleReadOperation __pyx_string_tab[111] +#define __pyx_n_u_ImpulseReadOperation __pyx_string_tab[112] +#define __pyx_n_u_ImpulseReadOperation___reduce_cy __pyx_string_tab[113] +#define __pyx_n_u_ImpulseReadOperation___setstate __pyx_string_tab[114] +#define __pyx_n_u_ImpulseReadOperation_process __pyx_string_tab[115] +#define __pyx_n_u_InMemoryWriteOperation __pyx_string_tab[116] +#define __pyx_n_u_InMemoryWriteOperation_process __pyx_string_tab[117] +#define __pyx_n_u_InefficientExecutionWarning __pyx_string_tab[118] +#define __pyx_n_u_Iterable __pyx_string_tab[119] +#define __pyx_n_u_IterableCoder __pyx_string_tab[120] +#define __pyx_n_u_Iterator __pyx_string_tab[121] +#define __pyx_n_u_LOGGER __pyx_string_tab[122] +#define __pyx_n_u_List __pyx_string_tab[123] +#define __pyx_n_u_MAX_BATCH_SIZE __pyx_string_tab[124] +#define __pyx_n_u_Mapping __pyx_string_tab[125] +#define __pyx_n_u_MeanCombineFn __pyx_string_tab[126] +#define __pyx_n_u_MetricsContainer __pyx_string_tab[127] +#define __pyx_n_u_MonitoringInfo __pyx_string_tab[128] +#define __pyx_n_u_NameContext __pyx_string_tab[129] +#define __pyx_n_u_NamedTuple __pyx_string_tab[130] +#define __pyx_n_u_NativeReadOperation __pyx_string_tab[131] +#define __pyx_n_u_NativeWriteOperation __pyx_string_tab[132] +#define __pyx_n_u_None __pyx_string_tab[133] +#define __pyx_n_u_OUTPUT_AT_EOW __pyx_string_tab[134] +#define __pyx_n_u_OpInputInfo __pyx_string_tab[135] +#define __pyx_n_u_Operation __pyx_string_tab[136] +#define __pyx_n_u_Operation___reduce_cython __pyx_string_tab[137] +#define __pyx_n_u_Operation___setstate_cython __pyx_string_tab[138] +#define __pyx_n_u_Operation__get_runtime_performan __pyx_string_tab[139] +#define __pyx_n_u_Operation_add_receiver __pyx_string_tab[140] +#define __pyx_n_u_Operation_current_element_progre __pyx_string_tab[141] +#define __pyx_n_u_Operation_execution_time_monitor __pyx_string_tab[142] +#define __pyx_n_u_Operation_finalize_bundle __pyx_string_tab[143] +#define __pyx_n_u_Operation_finish __pyx_string_tab[144] +#define __pyx_n_u_Operation_get_batching_preferenc __pyx_string_tab[145] +#define __pyx_n_u_Operation_get_input_batch_conver __pyx_string_tab[146] +#define __pyx_n_u_Operation_get_output_batch_conve __pyx_string_tab[147] +#define __pyx_n_u_Operation_monitoring_infos __pyx_string_tab[148] +#define __pyx_n_u_Operation_needs_finalization __pyx_string_tab[149] +#define __pyx_n_u_Operation_output __pyx_string_tab[150] +#define __pyx_n_u_Operation_pcollection_count_moni __pyx_string_tab[151] +#define __pyx_n_u_Operation_process __pyx_string_tab[152] +#define __pyx_n_u_Operation_process_batch __pyx_string_tab[153] +#define __pyx_n_u_Operation_reset __pyx_string_tab[154] +#define __pyx_n_u_Operation_setup __pyx_string_tab[155] +#define __pyx_n_u_Operation_start __pyx_string_tab[156] +#define __pyx_n_u_Operation_str_internal __pyx_string_tab[157] +#define __pyx_n_u_Operation_teardown __pyx_string_tab[158] +#define __pyx_n_u_Operation_try_split __pyx_string_tab[159] +#define __pyx_n_u_Operation_user_monitoring_infos __pyx_string_tab[160] +#define __pyx_n_u_Optional __pyx_string_tab[161] +#define __pyx_n_u_OutputSampler __pyx_string_tab[162] +#define __pyx_n_u_PGBKCVOperation __pyx_string_tab[163] +#define __pyx_n_u_PGBKCVOperation___reduce_cython __pyx_string_tab[164] +#define __pyx_n_u_PGBKCVOperation___setstate_cytho __pyx_string_tab[165] +#define __pyx_n_u_PGBKCVOperation_add_key_value __pyx_string_tab[166] +#define __pyx_n_u_PGBKCVOperation_finish __pyx_string_tab[167] +#define __pyx_n_u_PGBKCVOperation_output_key __pyx_string_tab[168] +#define __pyx_n_u_PGBKCVOperation_process __pyx_string_tab[169] +#define __pyx_n_u_PGBKCVOperation_setup __pyx_string_tab[170] +#define __pyx_n_u_PGBKCVOperation_teardown __pyx_string_tab[171] +#define __pyx_n_u_PGBKOperation __pyx_string_tab[172] +#define __pyx_n_u_PGBKOperation___init __pyx_string_tab[173] +#define __pyx_n_u_PGBKOperation_finish __pyx_string_tab[174] +#define __pyx_n_u_PGBKOperation_flush __pyx_string_tab[175] +#define __pyx_n_u_PGBKOperation_process __pyx_string_tab[176] +#define __pyx_n_u_PROCESS_BUNDLE_MSECS_URN __pyx_string_tab[177] +#define __pyx_n_u_PROGRESS_TYPE __pyx_string_tab[178] +#define __pyx_n_u_PhasedCombineFnExecutor __pyx_string_tab[179] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[180] +#define __pyx_n_u_RLock __pyx_string_tab[181] +#define __pyx_n_u_ReadOperation __pyx_string_tab[182] +#define __pyx_n_u_ReadOperation___reduce_cython __pyx_string_tab[183] +#define __pyx_n_u_ReadOperation___setstate_cython __pyx_string_tab[184] +#define __pyx_n_u_ReadOperation_start __pyx_string_tab[185] +#define __pyx_n_u_Receiver __pyx_string_tab[186] +#define __pyx_n_u_ReifyTimestampAndWindowsOperatio __pyx_string_tab[187] +#define __pyx_n_u_SAMPLED_BYTE_SIZE_URN __pyx_string_tab[188] +#define __pyx_n_u_START_BUNDLE_MSECS_URN __pyx_string_tab[189] +#define __pyx_n_u_SdfProcessSizedElements __pyx_string_tab[190] +#define __pyx_n_u_SdfProcessSizedElements___reduce __pyx_string_tab[191] +#define __pyx_n_u_SdfProcessSizedElements___setsta __pyx_string_tab[192] +#define __pyx_n_u_SdfProcessSizedElements_current __pyx_string_tab[193] +#define __pyx_n_u_SdfProcessSizedElements_monitori __pyx_string_tab[194] +#define __pyx_n_u_SdfProcessSizedElements_process __pyx_string_tab[195] +#define __pyx_n_u_SdfProcessSizedElements_try_spli __pyx_string_tab[196] +#define __pyx_n_u_SdfSplitResultsPrimary __pyx_string_tab[197] +#define __pyx_n_u_SdfSplitResultsResidual __pyx_string_tab[198] +#define __pyx_n_u_SdfTruncateSizedRestrictions __pyx_string_tab[199] +#define __pyx_n_u_SdfTruncateSizedRestrictions___r __pyx_string_tab[200] +#define __pyx_n_u_SdfTruncateSizedRestrictions___s __pyx_string_tab[201] +#define __pyx_n_u_SdfTruncateSizedRestrictions_cur __pyx_string_tab[202] +#define __pyx_n_u_SdfTruncateSizedRestrictions_try __pyx_string_tab[203] +#define __pyx_n_u_ShuffleWriteOperation __pyx_string_tab[204] +#define __pyx_n_u_SideInputMap __pyx_string_tab[205] +#define __pyx_n_u_SimpleMapTaskExecutor __pyx_string_tab[206] +#define __pyx_n_u_SimpleMapTaskExecutor___init __pyx_string_tab[207] +#define __pyx_n_u_SimpleMapTaskExecutor_execute __pyx_string_tab[208] +#define __pyx_n_u_SimpleMapTaskExecutor_operations __pyx_string_tab[209] +#define __pyx_n_u_SingletonElementConsumerSet __pyx_string_tab[210] +#define __pyx_n_u_SingletonElementConsumerSet___re __pyx_string_tab[211] +#define __pyx_n_u_SingletonElementConsumerSet___se __pyx_string_tab[212] +#define __pyx_n_u_SingletonElementConsumerSet_curr __pyx_string_tab[213] +#define __pyx_n_u_SingletonElementConsumerSet_flus __pyx_string_tab[214] +#define __pyx_n_u_SingletonElementConsumerSet_rece_2 __pyx_string_tab[215] +#define __pyx_n_u_SingletonElementConsumerSet_rece_3 __pyx_string_tab[216] +#define __pyx_n_u_SingletonElementConsumerSet_try __pyx_string_tab[217] +#define __pyx_n_u_SourceBundle __pyx_string_tab[218] +#define __pyx_n_u_SplitResultPrimary __pyx_string_tab[219] +#define __pyx_n_u_SplitResultResidual __pyx_string_tab[220] +#define __pyx_n_u_StateSampler __pyx_string_tab[221] +#define __pyx_n_u_StreamingGroupAlsoByWindowsOpera __pyx_string_tab[222] +#define __pyx_n_u_TOTAL_MSECS_URN __pyx_string_tab[223] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[224] +#define __pyx_n_u_TaggedReceivers __pyx_string_tab[225] +#define __pyx_n_u_TaggedReceivers___init __pyx_string_tab[226] +#define __pyx_n_u_TaggedReceivers___missing __pyx_string_tab[227] +#define __pyx_n_u_TaggedReceivers_total_output_by __pyx_string_tab[228] +#define __pyx_n_u_TimerSpec __pyx_string_tab[229] +#define __pyx_n_u_TimestampCombiner __pyx_string_tab[230] +#define __pyx_n_u_Tuple __pyx_string_tab[231] +#define __pyx_n_u_UngroupedShuffleReadOperation __pyx_string_tab[232] +#define __pyx_n_u_WORK_COMPLETED_URN __pyx_string_tab[233] +#define __pyx_n_u_WORK_REMAINING_URN __pyx_string_tab[234] +#define __pyx_n_u_WindowedBatch __pyx_string_tab[235] +#define __pyx_n_u_WindowedValue __pyx_string_tab[236] +#define __pyx_n_u_WindowedValueCoder __pyx_string_tab[237] +#define __pyx_n_u_WorkerCombineFn __pyx_string_tab[238] +#define __pyx_n_u_WorkerDoFn __pyx_string_tab[239] +#define __pyx_n_u_WorkerFlatten __pyx_string_tab[240] +#define __pyx_n_u_WorkerGroupingShuffleRead __pyx_string_tab[241] +#define __pyx_n_u_WorkerInMemoryWrite __pyx_string_tab[242] +#define __pyx_n_u_WorkerMergeWindows __pyx_string_tab[243] +#define __pyx_n_u_WorkerPartialGroupByKey __pyx_string_tab[244] +#define __pyx_n_u_WorkerRead __pyx_string_tab[245] +#define __pyx_n_u_WorkerReifyTimestampAndWindows __pyx_string_tab[246] +#define __pyx_n_u_WorkerShuffleWrite __pyx_string_tab[247] +#define __pyx_n_u_WorkerSideInputSource __pyx_string_tab[248] +#define __pyx_n_u_WorkerUngroupedShuffleRead __pyx_string_tab[249] +#define __pyx_n_u_WorkerWrite __pyx_string_tab[250] +#define __pyx_n_u_accumulator __pyx_string_tab[251] +#define __pyx_n_u_add_input __pyx_string_tab[252] +#define __pyx_n_u_add_key_value __pyx_string_tab[253] +#define __pyx_n_u_add_receiver __pyx_string_tab[254] +#define __pyx_n_u_add_timer_info __pyx_string_tab[255] +#define __pyx_n_u_apache_beam __pyx_string_tab[256] +#define __pyx_n_u_apache_beam_internal __pyx_string_tab[257] +#define __pyx_n_u_apache_beam_io __pyx_string_tab[258] +#define __pyx_n_u_apache_beam_metrics __pyx_string_tab[259] +#define __pyx_n_u_apache_beam_metrics_cells __pyx_string_tab[260] +#define __pyx_n_u_apache_beam_metrics_execution __pyx_string_tab[261] +#define __pyx_n_u_apache_beam_portability_api __pyx_string_tab[262] +#define __pyx_n_u_apache_beam_runners __pyx_string_tab[263] +#define __pyx_n_u_apache_beam_runners_common __pyx_string_tab[264] +#define __pyx_n_u_apache_beam_runners_sdf_utils __pyx_string_tab[265] +#define __pyx_n_u_apache_beam_runners_worker __pyx_string_tab[266] +#define __pyx_n_u_apache_beam_runners_worker_bundl __pyx_string_tab[267] +#define __pyx_n_u_apache_beam_runners_worker_data __pyx_string_tab[268] +#define __pyx_n_u_apache_beam_runners_worker_opera __pyx_string_tab[269] +#define __pyx_n_u_apache_beam_runners_worker_state __pyx_string_tab[270] +#define __pyx_n_u_apache_beam_transforms __pyx_string_tab[271] +#define __pyx_n_u_apache_beam_transforms_combiners __pyx_string_tab[272] +#define __pyx_n_u_apache_beam_transforms_userstate __pyx_string_tab[273] +#define __pyx_n_u_apache_beam_transforms_window __pyx_string_tab[274] +#define __pyx_n_u_apache_beam_typehints_batch __pyx_string_tab[275] +#define __pyx_n_u_apache_beam_utils_windowed_value __pyx_string_tab[276] +#define __pyx_n_u_apache_sideinputs __pyx_string_tab[277] +#define __pyx_n_u_append __pyx_string_tab[278] +#define __pyx_n_u_apply __pyx_string_tab[279] +#define __pyx_n_u_args __pyx_string_tab[280] +#define __pyx_n_u_as_windowed_values __pyx_string_tab[281] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[282] +#define __pyx_n_u_batch __pyx_string_tab[283] +#define __pyx_n_u_batch_type __pyx_string_tab[284] +#define __pyx_n_u_cast_to_operation __pyx_string_tab[285] +#define __pyx_n_u_cast_to_receiver __pyx_string_tab[286] +#define __pyx_n_u_class __pyx_string_tab[287] +#define __pyx_n_u_class_getitem __pyx_string_tab[288] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[289] +#define __pyx_n_u_close __pyx_string_tab[290] +#define __pyx_n_u_coder __pyx_string_tab[291] +#define __pyx_n_u_coders __pyx_string_tab[292] +#define __pyx_n_u_collections __pyx_string_tab[293] +#define __pyx_n_u_combine __pyx_string_tab[294] +#define __pyx_n_u_combine_fn __pyx_string_tab[295] +#define __pyx_n_u_combiners __pyx_string_tab[296] +#define __pyx_n_u_commit __pyx_string_tab[297] +#define __pyx_n_u_common __pyx_string_tab[298] +#define __pyx_n_u_compact __pyx_string_tab[299] +#define __pyx_n_u_completed_work __pyx_string_tab[300] +#define __pyx_n_u_consumer __pyx_string_tab[301] +#define __pyx_n_u_consumer_batch_converter __pyx_string_tab[302] +#define __pyx_n_u_consumer_batch_preference __pyx_string_tab[303] +#define __pyx_n_u_consumers __pyx_string_tab[304] +#define __pyx_n_u_core __pyx_string_tab[305] +#define __pyx_n_u_counter_factory __pyx_string_tab[306] +#define __pyx_n_u_counter_factory_2 __pyx_string_tab[307] +#define __pyx_n_u_create __pyx_string_tab[308] +#define __pyx_n_u_create_accumulator __pyx_string_tab[309] +#define __pyx_n_u_create_labels __pyx_string_tab[310] +#define __pyx_n_u_create_operation __pyx_string_tab[311] +#define __pyx_n_u_create_pgbk_op __pyx_string_tab[312] +#define __pyx_n_u_current_element_progress __pyx_string_tab[313] +#define __pyx_n_u_curry_combine_fn __pyx_string_tab[314] +#define __pyx_n_u_data_sampler __pyx_string_tab[315] +#define __pyx_n_u_dataflow_worker_native_operation __pyx_string_tab[316] +#define __pyx_n_u_dataflow_worker_shuffle_operatio __pyx_string_tab[317] +#define __pyx_n_u_debug __pyx_string_tab[318] +#define __pyx_n_u_debug_logging_enabled __pyx_string_tab[319] +#define __pyx_n_u_declaring_step __pyx_string_tab[320] +#define __pyx_n_u_defaultdict __pyx_string_tab[321] +#define __pyx_n_u_delayed_applications __pyx_string_tab[322] +#define __pyx_n_u_dict __pyx_string_tab[323] +#define __pyx_n_u_dict_2 __pyx_string_tab[324] +#define __pyx_n_u_doc __pyx_string_tab[325] +#define __pyx_n_u_dynamic_timer_tag __pyx_string_tab[326] +#define __pyx_n_u_el __pyx_string_tab[327] +#define __pyx_n_u_element_counter __pyx_string_tab[328] +#define __pyx_n_u_element_sampler __pyx_string_tab[329] +#define __pyx_n_u_elements __pyx_string_tab[330] +#define __pyx_n_u_encode __pyx_string_tab[331] +#define __pyx_n_u_enter __pyx_string_tab[332] +#define __pyx_n_u_enumerate __pyx_string_tab[333] +#define __pyx_n_u_execute __pyx_string_tab[334] +#define __pyx_n_u_execution_context __pyx_string_tab[335] +#define __pyx_n_u_execution_time_monitoring_infos __pyx_string_tab[336] +#define __pyx_n_u_exit __pyx_string_tab[337] +#define __pyx_n_u_explode_batch __pyx_string_tab[338] +#define __pyx_n_u_filter __pyx_string_tab[339] +#define __pyx_n_u_finalize __pyx_string_tab[340] +#define __pyx_n_u_finalize_bundle __pyx_string_tab[341] +#define __pyx_n_u_finish __pyx_string_tab[342] +#define __pyx_n_u_fire_timestamp __pyx_string_tab[343] +#define __pyx_n_u_flush __pyx_string_tab[344] +#define __pyx_n_u_fn __pyx_string_tab[345] +#define __pyx_n_u_fn_2 __pyx_string_tab[346] +#define __pyx_n_u_fns __pyx_string_tab[347] +#define __pyx_n_u_fraction_completed __pyx_string_tab[348] +#define __pyx_n_u_fraction_of_remainder __pyx_string_tab[349] +#define __pyx_n_u_fraction_remaining __pyx_string_tab[350] +#define __pyx_n_u_from_windowed_values __pyx_string_tab[351] +#define __pyx_n_u_func __pyx_string_tab[352] +#define __pyx_n_u_get __pyx_string_tab[353] +#define __pyx_n_u_getLogger __pyx_string_tab[354] +#define __pyx_n_u_get_batching_preference __pyx_string_tab[355] +#define __pyx_n_u_get_dofn_specs __pyx_string_tab[356] +#define __pyx_n_u_get_impl __pyx_string_tab[357] +#define __pyx_n_u_get_input_batch_converter __pyx_string_tab[358] +#define __pyx_n_u_get_iterator_fn_for_sources __pyx_string_tab[359] +#define __pyx_n_u_get_output_batch_converter __pyx_string_tab[360] +#define __pyx_n_u_get_output_sampler __pyx_string_tab[361] +#define __pyx_n_u_get_range_tracker __pyx_string_tab[362] +#define __pyx_n_u_get_runtime_performance_hints __pyx_string_tab[363] +#define __pyx_n_u_getstate __pyx_string_tab[364] +#define __pyx_n_u_has_callbacks __pyx_string_tab[365] +#define __pyx_n_u_has_element __pyx_string_tab[366] +#define __pyx_n_u_i __pyx_string_tab[367] +#define __pyx_n_u_index __pyx_string_tab[368] +#define __pyx_n_u_init __pyx_string_tab[369] +#define __pyx_n_u_init___locals_lambda __pyx_string_tab[370] +#define __pyx_n_u_input __pyx_string_tab[371] +#define __pyx_n_u_input_batch_converter __pyx_string_tab[372] +#define __pyx_n_u_input_index __pyx_string_tab[373] +#define __pyx_n_u_inputs __pyx_string_tab[374] +#define __pyx_n_u_int64_counter __pyx_string_tab[375] +#define __pyx_n_u_int64_distribution __pyx_string_tab[376] +#define __pyx_n_u_iobase __pyx_string_tab[377] +#define __pyx_n_u_isEnabledFor __pyx_string_tab[378] +#define __pyx_n_u_is_coroutine __pyx_string_tab[379] +#define __pyx_n_u_is_default __pyx_string_tab[380] +#define __pyx_n_u_is_recursive __pyx_string_tab[381] +#define __pyx_n_u_is_streaming __pyx_string_tab[382] +#define __pyx_n_u_items __pyx_string_tab[383] +#define __pyx_n_u_iterator_fn __pyx_string_tab[384] +#define __pyx_n_u_ix __pyx_string_tab[385] +#define __pyx_n_u_key __pyx_string_tab[386] +#define __pyx_n_u_kw __pyx_string_tab[387] +#define __pyx_n_u_kwargs __pyx_string_tab[388] +#define __pyx_n_u_labels __pyx_string_tab[389] +#define __pyx_n_u_lambda __pyx_string_tab[390] +#define __pyx_n_u_limit __pyx_string_tab[391] +#define __pyx_n_u_loads __pyx_string_tab[392] +#define __pyx_n_u_logging __pyx_string_tab[393] +#define __pyx_n_u_logging_name __pyx_string_tab[394] +#define __pyx_n_u_main __pyx_string_tab[395] +#define __pyx_n_u_main_input_coder __pyx_string_tab[396] +#define __pyx_n_u_main_input_tag __pyx_string_tab[397] +#define __pyx_n_u_map_task __pyx_string_tab[398] +#define __pyx_n_u_map_task_2 __pyx_string_tab[399] +#define __pyx_n_u_max __pyx_string_tab[400] +#define __pyx_n_u_max_size __pyx_string_tab[401] +#define __pyx_n_u_max_timestamp __pyx_string_tab[402] +#define __pyx_n_u_mean __pyx_string_tab[403] +#define __pyx_n_u_mean_byte_counter __pyx_string_tab[404] +#define __pyx_n_u_metaclass __pyx_string_tab[405] +#define __pyx_n_u_metrics_container __pyx_string_tab[406] +#define __pyx_n_u_metrics_name __pyx_string_tab[407] +#define __pyx_n_u_metrics_pb2 __pyx_string_tab[408] +#define __pyx_n_u_min __pyx_string_tab[409] +#define __pyx_n_u_missing __pyx_string_tab[410] +#define __pyx_n_u_module __pyx_string_tab[411] +#define __pyx_n_u_monitoring_infos __pyx_string_tab[412] +#define __pyx_n_u_mro_entries __pyx_string_tab[413] +#define __pyx_n_u_name __pyx_string_tab[414] +#define __pyx_n_u_name_2 __pyx_string_tab[415] +#define __pyx_n_u_name_context __pyx_string_tab[416] +#define __pyx_n_u_name_contexts __pyx_string_tab[417] +#define __pyx_n_u_needs_finalization __pyx_string_tab[418] +#define __pyx_n_u_new __pyx_string_tab[419] +#define __pyx_n_u_next __pyx_string_tab[420] +#define __pyx_n_u_o __pyx_string_tab[421] +#define __pyx_n_u_object __pyx_string_tab[422] +#define __pyx_n_u_once __pyx_string_tab[423] +#define __pyx_n_u_op __pyx_string_tab[424] +#define __pyx_n_u_opcounter __pyx_string_tab[425] +#define __pyx_n_u_opcounters __pyx_string_tab[426] +#define __pyx_n_u_operation __pyx_string_tab[427] +#define __pyx_n_u_operation_name __pyx_string_tab[428] +#define __pyx_n_u_operation_specs __pyx_string_tab[429] +#define __pyx_n_u_operations __pyx_string_tab[430] +#define __pyx_n_u_ops __pyx_string_tab[431] +#define __pyx_n_u_output __pyx_string_tab[432] +#define __pyx_n_u_output_batch_converter __pyx_string_tab[433] +#define __pyx_n_u_output_buffer __pyx_string_tab[434] +#define __pyx_n_u_output_coder __pyx_string_tab[435] +#define __pyx_n_u_output_coders __pyx_string_tab[436] +#define __pyx_n_u_output_index __pyx_string_tab[437] +#define __pyx_n_u_output_key __pyx_string_tab[438] +#define __pyx_n_u_output_num __pyx_string_tab[439] +#define __pyx_n_u_output_sampler __pyx_string_tab[440] +#define __pyx_n_u_output_tags __pyx_string_tab[441] +#define __pyx_n_u_output_value __pyx_string_tab[442] +#define __pyx_n_u_outputs __pyx_string_tab[443] +#define __pyx_n_u_paneinfo __pyx_string_tab[444] +#define __pyx_n_u_payload __pyx_string_tab[445] +#define __pyx_n_u_pcollection __pyx_string_tab[446] +#define __pyx_n_u_pcollection_count_monitoring_inf __pyx_string_tab[447] +#define __pyx_n_u_phase __pyx_string_tab[448] +#define __pyx_n_u_pickler __pyx_string_tab[449] +#define __pyx_n_u_pop __pyx_string_tab[450] +#define __pyx_n_u_prepare __pyx_string_tab[451] +#define __pyx_n_u_primaries __pyx_string_tab[452] +#define __pyx_n_u_primary __pyx_string_tab[453] +#define __pyx_n_u_printable_fields __pyx_string_tab[454] +#define __pyx_n_u_printable_name __pyx_string_tab[455] +#define __pyx_n_u_process __pyx_string_tab[456] +#define __pyx_n_u_process_batch __pyx_string_tab[457] +#define __pyx_n_u_process_batch_defined __pyx_string_tab[458] +#define __pyx_n_u_process_defined __pyx_string_tab[459] +#define __pyx_n_u_process_timer __pyx_string_tab[460] +#define __pyx_n_u_process_user_timer __pyx_string_tab[461] +#define __pyx_n_u_process_with_sized_restriction __pyx_string_tab[462] +#define __pyx_n_u_produce_batch __pyx_string_tab[463] +#define __pyx_n_u_produce_fn __pyx_string_tab[464] +#define __pyx_n_u_producer __pyx_string_tab[465] +#define __pyx_n_u_producer_batch_converter __pyx_string_tab[466] +#define __pyx_n_u_producer_type_hints __pyx_string_tab[467] +#define __pyx_n_u_progress __pyx_string_tab[468] +#define __pyx_n_u_ptransform __pyx_string_tab[469] +#define __pyx_n_u_pyx_capi __pyx_string_tab[470] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[471] +#define __pyx_n_u_pyx_result __pyx_string_tab[472] +#define __pyx_n_u_pyx_state __pyx_string_tab[473] +#define __pyx_n_u_pyx_type __pyx_string_tab[474] +#define __pyx_n_u_pyx_unpickle_CombineOperation __pyx_string_tab[475] +#define __pyx_n_u_pyx_unpickle_ConsumerSet __pyx_string_tab[476] +#define __pyx_n_u_pyx_unpickle_DoOperation __pyx_string_tab[477] +#define __pyx_n_u_pyx_unpickle_FlattenOperation __pyx_string_tab[478] +#define __pyx_n_u_pyx_unpickle_GeneralPurposeCon __pyx_string_tab[479] +#define __pyx_n_u_pyx_unpickle_ImpulseReadOperat __pyx_string_tab[480] +#define __pyx_n_u_pyx_unpickle_Operation __pyx_string_tab[481] +#define __pyx_n_u_pyx_unpickle_PGBKCVOperation __pyx_string_tab[482] +#define __pyx_n_u_pyx_unpickle_ReadOperation __pyx_string_tab[483] +#define __pyx_n_u_pyx_unpickle_SdfProcessSizedEl __pyx_string_tab[484] +#define __pyx_n_u_pyx_unpickle_SdfTruncateSizedR __pyx_string_tab[485] +#define __pyx_n_u_pyx_unpickle_SingletonElementC __pyx_string_tab[486] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[487] +#define __pyx_n_u_qualname __pyx_string_tab[488] +#define __pyx_n_u_read __pyx_string_tab[489] +#define __pyx_n_u_read_counter __pyx_string_tab[490] +#define __pyx_n_u_read_side_inputs __pyx_string_tab[491] +#define __pyx_n_u_read_side_inputs_locals_lambda __pyx_string_tab[492] +#define __pyx_n_u_receive __pyx_string_tab[493] +#define __pyx_n_u_receive_batch __pyx_string_tab[494] +#define __pyx_n_u_receiver __pyx_string_tab[495] +#define __pyx_n_u_receivers __pyx_string_tab[496] +#define __pyx_n_u_reduce __pyx_string_tab[497] +#define __pyx_n_u_reduce_cython __pyx_string_tab[498] +#define __pyx_n_u_reduce_ex __pyx_string_tab[499] +#define __pyx_n_u_remaining_work __pyx_string_tab[500] +#define __pyx_n_u_reset __pyx_string_tab[501] +#define __pyx_n_u_residual __pyx_string_tab[502] +#define __pyx_n_u_residuals __pyx_string_tab[503] +#define __pyx_n_u_restart_sampling __pyx_string_tab[504] +#define __pyx_n_u_return __pyx_string_tab[505] +#define __pyx_n_u_reversed __pyx_string_tab[506] +#define __pyx_n_u_runtime_output_constraints __pyx_string_tab[507] +#define __pyx_n_u_sampled_msecs_int __pyx_string_tab[508] +#define __pyx_n_u_sampler __pyx_string_tab[509] +#define __pyx_n_u_sampler_for_output __pyx_string_tab[510] +#define __pyx_n_u_scoped_process_state __pyx_string_tab[511] +#define __pyx_n_u_scoped_state __pyx_string_tab[512] +#define __pyx_n_u_self __pyx_string_tab[513] +#define __pyx_n_u_send __pyx_string_tab[514] +#define __pyx_n_u_serialized_fn __pyx_string_tab[515] +#define __pyx_n_u_set_name __pyx_string_tab[516] +#define __pyx_n_u_setdefault __pyx_string_tab[517] +#define __pyx_n_u_setstate __pyx_string_tab[518] +#define __pyx_n_u_setstate_cython __pyx_string_tab[519] +#define __pyx_n_u_setup __pyx_string_tab[520] +#define __pyx_n_u_setup_locals_get_output_sampler __pyx_string_tab[521] +#define __pyx_n_u_shuffle_sink __pyx_string_tab[522] +#define __pyx_n_u_shuffle_source __pyx_string_tab[523] +#define __pyx_n_u_si __pyx_string_tab[524] +#define __pyx_n_u_si_counter __pyx_string_tab[525] +#define __pyx_n_u_side_input_map __pyx_string_tab[526] +#define __pyx_n_u_side_input_maps __pyx_string_tab[527] +#define __pyx_n_u_side_inputs __pyx_string_tab[528] +#define __pyx_n_u_side_tag __pyx_string_tab[529] +#define __pyx_n_u_sideinputs __pyx_string_tab[530] +#define __pyx_n_u_simplefilter __pyx_string_tab[531] +#define __pyx_n_u_size __pyx_string_tab[532] +#define __pyx_n_u_source __pyx_string_tab[533] +#define __pyx_n_u_sources __pyx_string_tab[534] +#define __pyx_n_u_spec __pyx_string_tab[535] +#define __pyx_n_u_split __pyx_string_tab[536] +#define __pyx_n_u_start __pyx_string_tab[537] +#define __pyx_n_u_start_position __pyx_string_tab[538] +#define __pyx_n_u_state __pyx_string_tab[539] +#define __pyx_n_u_state_sampler __pyx_string_tab[540] +#define __pyx_n_u_state_sampler_2 __pyx_string_tab[541] +#define __pyx_n_u_staticmethod __pyx_string_tab[542] +#define __pyx_n_u_step_name __pyx_string_tab[543] +#define __pyx_n_u_step_name_2 __pyx_string_tab[544] +#define __pyx_n_u_stop_position __pyx_string_tab[545] +#define __pyx_n_u_str_internal __pyx_string_tab[546] +#define __pyx_n_u_suffix __pyx_string_tab[547] +#define __pyx_n_u_sum __pyx_string_tab[548] +#define __pyx_n_u_super __pyx_string_tab[549] +#define __pyx_n_u_supports_batches __pyx_string_tab[550] +#define __pyx_n_u_supports_elements __pyx_string_tab[551] +#define __pyx_n_u_table __pyx_string_tab[552] +#define __pyx_n_u_tag __pyx_string_tab[553] +#define __pyx_n_u_tag_to_pcollection_id __pyx_string_tab[554] +#define __pyx_n_u_tagged_receivers __pyx_string_tab[555] +#define __pyx_n_u_tags_and_types __pyx_string_tab[556] +#define __pyx_n_u_target __pyx_string_tab[557] +#define __pyx_n_u_teardown __pyx_string_tab[558] +#define __pyx_n_u_test __pyx_string_tab[559] +#define __pyx_n_u_test_shuffle_sink __pyx_string_tab[560] +#define __pyx_n_u_test_shuffle_sink_2 __pyx_string_tab[561] +#define __pyx_n_u_test_shuffle_source __pyx_string_tab[562] +#define __pyx_n_u_test_shuffle_source_2 __pyx_string_tab[563] +#define __pyx_n_u_threading __pyx_string_tab[564] +#define __pyx_n_u_throw __pyx_string_tab[565] +#define __pyx_n_u_timer_data __pyx_string_tab[566] +#define __pyx_n_u_timer_family_id __pyx_string_tab[567] +#define __pyx_n_u_timer_info __pyx_string_tab[568] +#define __pyx_n_u_timer_spec __pyx_string_tab[569] +#define __pyx_n_u_timestamp __pyx_string_tab[570] +#define __pyx_n_u_timestamp_combiner __pyx_string_tab[571] +#define __pyx_n_u_to_key __pyx_string_tab[572] +#define __pyx_n_u_to_runner_api_monitoring_infos __pyx_string_tab[573] +#define __pyx_n_u_total __pyx_string_tab[574] +#define __pyx_n_u_total_output_bytes __pyx_string_tab[575] +#define __pyx_n_u_transform_id __pyx_string_tab[576] +#define __pyx_n_u_try_split __pyx_string_tab[577] +#define __pyx_n_u_type __pyx_string_tab[578] +#define __pyx_n_u_typing __pyx_string_tab[579] +#define __pyx_n_u_unused_impulse __pyx_string_tab[580] +#define __pyx_n_u_update __pyx_string_tab[581] +#define __pyx_n_u_update_counters_batch __pyx_string_tab[582] +#define __pyx_n_u_update_counters_finish __pyx_string_tab[583] +#define __pyx_n_u_update_counters_start __pyx_string_tab[584] +#define __pyx_n_u_urn __pyx_string_tab[585] +#define __pyx_n_u_use_setstate __pyx_string_tab[586] +#define __pyx_n_u_user_key __pyx_string_tab[587] +#define __pyx_n_u_user_monitoring_infos __pyx_string_tab[588] +#define __pyx_n_u_user_state_context __pyx_string_tab[589] +#define __pyx_n_u_userstate __pyx_string_tab[590] +#define __pyx_n_u_v __pyx_string_tab[591] +#define __pyx_n_u_value __pyx_string_tab[592] +#define __pyx_n_u_values __pyx_string_tab[593] +#define __pyx_n_u_view_class __pyx_string_tab[594] +#define __pyx_n_u_view_options __pyx_string_tab[595] +#define __pyx_n_u_vs __pyx_string_tab[596] +#define __pyx_n_u_warn __pyx_string_tab[597] +#define __pyx_n_u_warnings __pyx_string_tab[598] +#define __pyx_n_u_window __pyx_string_tab[599] +#define __pyx_n_u_window_fn __pyx_string_tab[600] +#define __pyx_n_u_windowed_batch __pyx_string_tab[601] +#define __pyx_n_u_windowed_value __pyx_string_tab[602] +#define __pyx_n_u_windowfn __pyx_string_tab[603] +#define __pyx_n_u_windowing __pyx_string_tab[604] +#define __pyx_n_u_windows __pyx_string_tab[605] +#define __pyx_n_u_with_completed __pyx_string_tab[606] +#define __pyx_n_u_wkey __pyx_string_tab[607] +#define __pyx_n_u_wkv __pyx_string_tab[608] +#define __pyx_n_u_worker_printable_fields __pyx_string_tab[609] +#define __pyx_n_u_write_windowed_values __pyx_string_tab[610] +#define __pyx_n_u_zip __pyx_string_tab[611] +#define __pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P __pyx_string_tab[612] +#define __pyx_kp_b_PyObject__DEFAULT_get_current_tr __pyx_string_tab[613] +#define __pyx_kp_b_PyTypeObject_TaggedOutput_Timest __pyx_string_tab[614] +#define __pyx_kp_b_PyTypeObject_struct___pyx_obj_11 __pyx_string_tab[615] +#define __pyx_kp_b_iso88591_0_Qd_A_81A __pyx_string_tab[616] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[617] +#define __pyx_kp_b_iso88591_1F __pyx_string_tab[618] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[619] +#define __pyx_kp_b_iso88591_1_3 __pyx_string_tab[620] +#define __pyx_kp_b_iso88591_1_4 __pyx_string_tab[621] +#define __pyx_kp_b_iso88591_1_5 __pyx_string_tab[622] +#define __pyx_kp_b_iso88591_1_6 __pyx_string_tab[623] +#define __pyx_kp_b_iso88591_1_7 __pyx_string_tab[624] +#define __pyx_kp_b_iso88591_1_A_33a_2_a_A_5Q_q_a_A_7q_q_a_A __pyx_string_tab[625] +#define __pyx_kp_b_iso88591_1_q __pyx_string_tab[626] +#define __pyx_kp_b_iso88591_2_6 __pyx_string_tab[627] +#define __pyx_kp_b_iso88591_4 __pyx_string_tab[628] +#define __pyx_kp_b_iso88591_4_2 __pyx_string_tab[629] +#define __pyx_kp_b_iso88591_4_Q_a_4A_l_wa_J_q_t_Na_1_q_Q_7w __pyx_string_tab[630] +#define __pyx_kp_b_iso88591_4_q_q_q_q_1_1 __pyx_string_tab[631] +#define __pyx_kp_b_iso88591_4uA __pyx_string_tab[632] +#define __pyx_kp_b_iso88591_4y_1 __pyx_string_tab[633] +#define __pyx_kp_b_iso88591_4y_1_2 __pyx_string_tab[634] +#define __pyx_kp_b_iso88591_4z_5Q __pyx_string_tab[635] +#define __pyx_kp_b_iso88591_4z_Jaq __pyx_string_tab[636] +#define __pyx_kp_b_iso88591_5QfA __pyx_string_tab[637] +#define __pyx_kp_b_iso88591_6 __pyx_string_tab[638] +#define __pyx_kp_b_iso88591_6_A __pyx_string_tab[639] +#define __pyx_kp_b_iso88591_6_E __pyx_string_tab[640] +#define __pyx_kp_b_iso88591_7_4u_5Q __pyx_string_tab[641] +#define __pyx_kp_b_iso88591_7_4u_6a __pyx_string_tab[642] +#define __pyx_kp_b_iso88591_7q_a __pyx_string_tab[643] +#define __pyx_kp_b_iso88591_81 __pyx_string_tab[644] +#define __pyx_kp_b_iso88591_9 __pyx_string_tab[645] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[646] +#define __pyx_kp_b_iso88591_AQ __pyx_string_tab[647] +#define __pyx_kp_b_iso88591_A_D_q_36_A_4F_Qa_A_1 __pyx_string_tab[648] +#define __pyx_kp_b_iso88591_A_N_1 __pyx_string_tab[649] +#define __pyx_kp_b_iso88591_A_a __pyx_string_tab[650] +#define __pyx_kp_b_iso88591_D_Jaq_q_Q_RvYd_Q_6_4_1_1 __pyx_string_tab[651] +#define __pyx_kp_b_iso88591_D_b_T_at6_q_Cq_fAQ_Q_QavQc_U_Be __pyx_string_tab[652] +#define __pyx_kp_b_iso88591_D_d_6_vS_4q_Cq_A_JnD_fA_7_1_k_J __pyx_string_tab[653] +#define __pyx_kp_b_iso88591_D_q_q __pyx_string_tab[654] +#define __pyx_kp_b_iso88591_E_0_t1_4_0_a_3auG1_as_1_1_A_J_f __pyx_string_tab[655] +#define __pyx_kp_b_iso88591_IQ __pyx_string_tab[656] +#define __pyx_kp_b_iso88591_Q_1M_fA_4q_fA __pyx_string_tab[657] +#define __pyx_kp_b_iso88591_Q_1O5_a_d_wg_q_e7_4uG1_4uG7_q_Q __pyx_string_tab[658] +#define __pyx_kp_b_iso88591_Q_1_0_q __pyx_string_tab[659] +#define __pyx_kp_b_iso88591_Q_4_1A_A_HAQ_A_A_A __pyx_string_tab[660] +#define __pyx_kp_b_iso88591_Q_4_A_9G1_wa_6c_Q __pyx_string_tab[661] +#define __pyx_kp_b_iso88591_Q_83a_Q_N_5_q_Jc_nBha_d2K1 __pyx_string_tab[662] +#define __pyx_kp_b_iso88591_Q_AV1D_Qaq_WAQ_1_V2T_F_2Rt_S __pyx_string_tab[663] +#define __pyx_kp_b_iso88591_Q_A_a __pyx_string_tab[664] +#define __pyx_kp_b_iso88591_Q_Q_vQ_s __pyx_string_tab[665] +#define __pyx_kp_b_iso88591_Q_Q_vQ_s_9AQ_b_T_6 __pyx_string_tab[666] +#define __pyx_kp_b_iso88591_Q_Q_vQ_s_WA_t5_4AQ __pyx_string_tab[667] +#define __pyx_kp_b_iso88591_Q_T_XQa_t_gQ_1_5WA_Q __pyx_string_tab[668] +#define __pyx_kp_b_iso88591_Q_V1_a_1_U_1_Ya __pyx_string_tab[669] +#define __pyx_kp_b_iso88591_Q_V1_a_1_e9A_Ky __pyx_string_tab[670] +#define __pyx_kp_b_iso88591_Q_d_31F_4we1A_QgQ_1_3_aq_G1A __pyx_string_tab[671] +#define __pyx_kp_b_iso88591_Q_iq_t1_V1 __pyx_string_tab[672] +#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[673] +#define __pyx_kp_b_iso88591_T_1N_6_Qj_Zq_oQ_z_ivQ_q_4A_a_q __pyx_string_tab[674] +#define __pyx_kp_b_iso88591_T_L_NdRffjjvvz_J_J_N_N_____c_c __pyx_string_tab[675] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_M_M_Q_Q_V_V __pyx_string_tab[676] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_M_M_Q_Q_V_V_2 __pyx_string_tab[677] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_V_V_Z_Z_n_n __pyx_string_tab[678] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j __pyx_string_tab[679] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_2 __pyx_string_tab[680] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_3 __pyx_string_tab[681] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_4 __pyx_string_tab[682] +#define __pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_5 __pyx_string_tab[683] +#define __pyx_kp_b_iso88591_T_T_EYY_oos_t_H_H_L_L_b_b_f_f_r __pyx_string_tab[684] +#define __pyx_kp_b_iso88591_T_d_9_RRVVbbffxx_L_L_P_P_h_h_l __pyx_string_tab[685] +#define __pyx_kp_b_iso88591_T_f_Q_F_1 __pyx_string_tab[686] +#define __pyx_kp_b_iso88591_T_tCWW_ggkkzz_P_P_T_T_U_G1F_a_v __pyx_string_tab[687] +#define __pyx_kp_b_iso88591_V_1_Q_e1A_a_1_a_a_a_a_z_z_Q_N_1 __pyx_string_tab[688] +#define __pyx_kp_b_iso88591__10 __pyx_string_tab[689] +#define __pyx_kp_b_iso88591__11 __pyx_string_tab[690] +#define __pyx_kp_b_iso88591__12 __pyx_string_tab[691] +#define __pyx_kp_b_iso88591__13 __pyx_string_tab[692] +#define __pyx_kp_b_iso88591__14 __pyx_string_tab[693] +#define __pyx_kp_b_iso88591__15 __pyx_string_tab[694] +#define __pyx_kp_b_iso88591__16 __pyx_string_tab[695] +#define __pyx_kp_b_iso88591__9 __pyx_string_tab[696] +#define __pyx_kp_b_iso88591_a_T_1_wavQ_b_M_a_wb_t6_A_Q_t_G1 __pyx_string_tab[697] +#define __pyx_kp_b_iso88591_aq_7 __pyx_string_tab[698] +#define __pyx_kp_b_iso88591_aq_D_1_t1_G1A_AT_S_A_F_q __pyx_string_tab[699] +#define __pyx_kp_b_iso88591_aq_q __pyx_string_tab[700] +#define __pyx_kp_b_iso88591_aq_t_gQ_d_t_G1_T_F_O1 __pyx_string_tab[701] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[702] +#define __pyx_kp_b_iso88591_gQ_t_T_vQ_1 __pyx_string_tab[703] +#define __pyx_kp_b_iso88591_hc_j_j_1_a_a_d_D_waq_7_5_E_Q_7 __pyx_string_tab[704] +#define __pyx_kp_b_iso88591_it6_q_QfE_e1A_Q __pyx_string_tab[705] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1 __pyx_string_tab[706] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1 __pyx_string_tab[707] +#define __pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1 __pyx_string_tab[708] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1 __pyx_string_tab[709] +#define __pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1 __pyx_string_tab[710] +#define __pyx_kp_b_iso88591_q_0_kQR_HAQ_7_1_XXffg_1 __pyx_string_tab[711] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1 __pyx_string_tab[712] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1 __pyx_string_tab[713] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1 __pyx_string_tab[714] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_a_llm_1 __pyx_string_tab[715] +#define __pyx_kp_b_iso88591_q_E_t4was_4q_S_1_1 __pyx_string_tab[716] +#define __pyx_kp_b_iso88591_q_Q_1M_fAQ_q_E_fJat1_M_a_a_M_a __pyx_string_tab[717] +#define __pyx_kp_b_iso88591_q_Q_7_Bm1_T_a_W_Q_M_wa_A_M_a_Ja __pyx_string_tab[718] +#define __pyx_kp_b_iso88591_q_Q_V1_1_1_U_V1 __pyx_string_tab[719] +#define __pyx_kp_b_iso88591_q_Q_V1_1_1_e6_KvQ __pyx_string_tab[720] +#define __pyx_kp_b_iso88591_q_a __pyx_string_tab[721] +#define __pyx_kp_b_iso88591_s_4_3b_3a_c_Q_1_T_a_4G1_t_Qa_N __pyx_string_tab[722] +#define __pyx_kp_b_iso88591_s_c_1_B_C1_9_3e1_3a_A __pyx_string_tab[723] +#define __pyx_kp_b_iso88591_t1_1_q_L_A_AYhaq_D_t_1_q_a_Q_at __pyx_string_tab[724] +#define __pyx_kp_b_iso88591_t3a_S_v_v_V_a __pyx_string_tab[725] +#define __pyx_kp_b_iso88591_t4_Ct4q_d_a_M_a__A_L_AYnAQ_D_M __pyx_string_tab[726] +#define __pyx_kp_b_iso88591_t4q_Q_t_d_T __pyx_string_tab[727] +#define __pyx_kp_b_iso88591_t_s_a_d_Qa_t1_RvQ_fA_A_F_r_hl __pyx_string_tab[728] +#define __pyx_kp_b_iso88591_uF_a_F_t1_V1_6 __pyx_string_tab[729] +#define __pyx_kp_b_iso88591_uG1_Q_gQ_Q_wa __pyx_string_tab[730] +#define __pyx_kp_b_iso88591_y_v_a_4t5_L_q __pyx_string_tab[731] +#define __pyx_kp_b_iso88591_z_s __pyx_string_tab[732] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_1 __pyx_number_tab[1] +#define __pyx_int_3 __pyx_number_tab[2] +#define __pyx_int_9 __pyx_number_tab[3] +#define __pyx_int_10 __pyx_number_tab[4] +#define __pyx_int_4096 __pyx_number_tab[5] +#define __pyx_int_10000 __pyx_number_tab[6] +#define __pyx_int_332273 __pyx_number_tab[7] +#define __pyx_int_13052437 __pyx_number_tab[8] +#define __pyx_int_54202627 __pyx_number_tab[9] +#define __pyx_int_60572958 __pyx_number_tab[10] +#define __pyx_int_106916135 __pyx_number_tab[11] +#define __pyx_int_136289111 __pyx_number_tab[12] +#define __pyx_int_157929342 __pyx_number_tab[13] +#define __pyx_int_232423418 __pyx_number_tab[14] +#define __pyx_int_267513676 __pyx_number_tab[15] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_Operation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs); + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } + for (int i=0; i<10; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<126; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<733; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_Receiver); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_Operation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs); + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } + for (int i=0; i<10; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<126; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<733; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":46 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":50 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":54 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":59 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":63 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":67 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":71 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":75 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":80 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":85 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":89 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":93 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":97 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":101 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":105 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":109 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":113 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":118 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":123 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":127 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":131 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + +static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) { + + /* "cpython/datetime.pxd":256 + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: + * PyDateTime_IMPORT # <<<<<<<<<<<<<< + * + * # Create date object using DateTime CAPI factory function. +*/ + (void)(PyDateTime_IMPORT); + + /* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + + /* function exit code */ +} + +/* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_new", 0); + + /* "cpython/datetime.pxd":261 + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) # <<<<<<<<<<<<<< + * + * # Create time object using DateTime CAPI factory function +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Date *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_Time *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("time_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":266 + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create datetime object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) + __pyx_r = ((PyDateTime_Time *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":271 + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + +static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) { + PyDateTime_Delta *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timedelta_new", 0); + + /* "cpython/datetime.pxd":276 + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) { + PyObject *__pyx_v_name = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timezone_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_name = __pyx_optional_args->name; + } + } + + /* "cpython/datetime.pxd":280 + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) # <<<<<<<<<<<<<< + * + * # Create datetime object using DB API constructor. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_name != Py_None); + if (__pyx_t_2) { + __pyx_t_1 = ((PyObject *)__pyx_v_name); + } else { + __pyx_t_1 = NULL; + } + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) { + PyObject *__pyx_v_tz = ((PyObject *)Py_None); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_from_timestamp", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_tz = __pyx_optional_args->tz; + } + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "cpython/datetime.pxd":285 + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) # <<<<<<<<<<<<<< + * + * # Create date object using DB API constructor. +*/ + __pyx_t_2 = (__pyx_v_tz != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_tz); + __Pyx_GIVEREF(__pyx_v_tz); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_from_timestamp", 0); + + /* "cpython/datetime.pxd":289 + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) # <<<<<<<<<<<<<< + * + * # More recognizable getters for date/time/datetime/timedelta. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_Date *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_utc", 0); + + /* "cpython/datetime.pxd":298 + * # Get UTC singleton + * cdef inline object get_utc(): + * return __Pyx_TimeZone_UTC # <<<<<<<<<<<<<< + * + * # Get tzinfo of time +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC)); + __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC); + goto __pyx_L0; + + /* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("time_tzinfo", 0); + + /* "cpython/datetime.pxd":302 + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): + * return PyDateTime_TIME_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get tzinfo of datetime +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("datetime_tzinfo", 0); + + /* "cpython/datetime.pxd":306 + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): + * return PyDateTime_DATE_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get year of date +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":310 + * # Get year of date + * cdef inline int date_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of date +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":314 + * # Get month of date + * cdef inline int date_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of date +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":318 + * # Get day of date + * cdef inline int date_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get year of datetime +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":322 + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of datetime +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":326 + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of datetime +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":330 + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get hour of time +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":334 + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: + * return PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of time +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":338 + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: + * return PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of time +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":342 + * # Get second of time + * cdef inline int time_second(object o) noexcept: + * return PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of time +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":346 + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of time +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":351 + * cdef inline int time_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get hour of datetime +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":355 + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: + * return PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":359 + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: + * return PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":363 + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: + * return PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":367 + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":372 + * cdef inline int datetime_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get days of timedelta +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":376 + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< + * + * # Get seconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":380 + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< + * + * # Get microseconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":384 + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< + * + * cdef inline double total_seconds(timedelta obj) noexcept: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + +static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) { + double __pyx_v_days; + double __pyx_v_seconds; + double __pyx_v_micros; + double __pyx_r; + + /* "cpython/datetime.pxd":392 + * cdef: + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) # <<<<<<<<<<<<<< + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) +*/ + __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":393 + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) # <<<<<<<<<<<<<< + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":394 + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) # <<<<<<<<<<<<<< + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":395 + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 # <<<<<<<<<<<<<< +*/ + __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":23 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: + * return self.cval.real # <<<<<<<<<<<<<< + * + * # unavailable in limited API +*/ + __pyx_r = __pyx_v_self->cval.real; + goto __pyx_L0; + + /* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":29 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: + * return self.cval.imag # <<<<<<<<<<<<<< + * + * # PyTypeObject PyComplex_Type +*/ + __pyx_r = __pyx_v_self->cval.imag; + goto __pyx_L0; + + /* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":121 + * or None if no such value or default was found. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":122 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< + * if value is NULL: + * # context variable does not have a default +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error) + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + __pyx_t_2 = (__pyx_v_value == NULL); + if (__pyx_t_2) { + + /* "cpython/contextvars.pxd":125 + * if value is NULL: + * # context variable does not have a default + * pyvalue = default_value # <<<<<<<<<<<<<< + * else: + * # value or default value of context variable +*/ + __Pyx_INCREF(__pyx_v_default_value); + __pyx_v_pyvalue = __pyx_v_default_value; + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + goto __pyx_L3; + } + + /* "cpython/contextvars.pxd":128 + * else: + * # value or default value of context variable + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_pyvalue = __pyx_t_3; + __pyx_t_3 = 0; + + /* "cpython/contextvars.pxd":129 + * # value or default value of context variable + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue + * +*/ + Py_XDECREF(__pyx_v_value); + } + __pyx_L3:; + + /* "cpython/contextvars.pxd":130 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value_no_default", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":140 + * Ignores the default value of the context variable, if any. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":141 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< + * # value of context variable or 'default_value' + * pyvalue = value +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error) + + /* "cpython/contextvars.pxd":143 + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_pyvalue = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cpython/contextvars.pxd":144 + * # value of context variable or 'default_value' + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue +*/ + Py_XDECREF(__pyx_v_value); + + /* "cpython/contextvars.pxd":145 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "apache_beam/runners/worker/operations.py":93 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_operation(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Operation, value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_1_cast_to_operation = {"_cast_to_operation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_1_cast_to_operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_cast_to_operation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 93, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 93, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_cast_to_operation", 0) < (0)) __PYX_ERR(0, 93, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_cast_to_operation", 1, 1, 1, i); __PYX_ERR(0, 93, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 93, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_cast_to_operation", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 93, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations._cast_to_operation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(__pyx_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations__cast_to_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_cast_to_operation", 0); + + /* "apache_beam/runners/worker/operations.py":95 + * def _cast_to_operation(value): + * if cython.compiled: + * return cython.cast(Operation, value) # <<<<<<<<<<<<<< + * else: + * return value +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_value)); + __pyx_r = __pyx_v_value; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":93 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_operation(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Operation, value) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":101 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_receiver(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Receiver, value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver = {"_cast_to_receiver", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_cast_to_receiver (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 101, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 101, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_cast_to_receiver", 0) < (0)) __PYX_ERR(0, 101, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_cast_to_receiver", 1, 1, 1, i); __PYX_ERR(0, 101, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 101, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_cast_to_receiver", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 101, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations._cast_to_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(__pyx_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_2_cast_to_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_cast_to_receiver", 0); + + /* "apache_beam/runners/worker/operations.py":103 + * def _cast_to_receiver(value): + * if cython.compiled: + * return cython.cast(Receiver, value) # <<<<<<<<<<<<<< + * else: + * return value +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_value)); + __pyx_r = __pyx_v_value; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":101 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_receiver(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Receiver, value) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":116 + * ConsumerSet are attached to the outputting Operation. + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def create( + * counter_factory, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_output_index = 0; + PyObject *__pyx_v_consumers = 0; + PyObject *__pyx_v_coder = 0; + PyObject *__pyx_v_producer_type_hints = 0; + PyObject *__pyx_v_producer_batch_converter = 0; + PyObject *__pyx_v_output_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_output_index,&__pyx_mstate_global->__pyx_n_u_consumers,&__pyx_mstate_global->__pyx_n_u_coder,&__pyx_mstate_global->__pyx_n_u_producer_type_hints,&__pyx_mstate_global->__pyx_n_u_producer_batch_converter,&__pyx_mstate_global->__pyx_n_u_output_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 116, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(0, 116, __pyx_L3_error) + + /* "apache_beam/runners/worker/operations.py":125 + * producer_type_hints, + * producer_batch_converter, # type: Optional[BatchConverter] + * output_sampler=None, # type: Optional[OutputSampler] # <<<<<<<<<<<<<< + * ): + * # type: (...) -> ConsumerSet +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 7; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, i); __PYX_ERR(0, 116, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 116, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 116, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 116, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 116, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 116, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 116, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 116, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 116, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_counter_factory = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_output_index = values[2]; + __pyx_v_consumers = values[3]; + __pyx_v_coder = values[4]; + __pyx_v_producer_type_hints = values[5]; + __pyx_v_producer_batch_converter = values[6]; + __pyx_v_output_sampler = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create", 0, 7, 8, __pyx_nargs); __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(__pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler); + + /* "apache_beam/runners/worker/operations.py":116 + * ConsumerSet are attached to the outputting Operation. + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def create( + * counter_factory, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_create(PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) { + PyObject *__pyx_v_consumer = NULL; + PyObject *__pyx_v_consumer_batch_preference = NULL; + PyObject *__pyx_v_consumer_batch_converter = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + + /* "apache_beam/runners/worker/operations.py":128 + * ): + * # type: (...) -> ConsumerSet + * if len(consumers) == 1: # <<<<<<<<<<<<<< + * consumer = consumers[0] + * +*/ + __pyx_t_1 = PyObject_Length(__pyx_v_consumers); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 == 1); + if (__pyx_t_2) { + + /* "apache_beam/runners/worker/operations.py":129 + * # type: (...) -> ConsumerSet + * if len(consumers) == 1: + * consumer = consumers[0] # <<<<<<<<<<<<<< + * + * consumer_batch_preference = consumer.get_batching_preference() +*/ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_consumers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_consumer = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":131 + * consumer = consumers[0] + * + * consumer_batch_preference = consumer.get_batching_preference() # <<<<<<<<<<<<<< + * consumer_batch_converter = consumer.get_input_batch_converter() + * if (not consumer_batch_preference.supports_batches and +*/ + __pyx_t_4 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_batching_preference, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_consumer_batch_preference = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":132 + * + * consumer_batch_preference = consumer.get_batching_preference() + * consumer_batch_converter = consumer.get_input_batch_converter() # <<<<<<<<<<<<<< + * if (not consumer_batch_preference.supports_batches and + * producer_batch_converter is None and +*/ + __pyx_t_4 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_input_batch_converter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_consumer_batch_converter = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":133 + * consumer_batch_preference = consumer.get_batching_preference() + * consumer_batch_converter = consumer.get_input_batch_converter() + * if (not consumer_batch_preference.supports_batches and # <<<<<<<<<<<<<< + * producer_batch_converter is None and + * consumer_batch_converter is None): +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer_batch_preference, __pyx_mstate_global->__pyx_n_u_supports_batches); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/worker/operations.py":134 + * consumer_batch_converter = consumer.get_input_batch_converter() + * if (not consumer_batch_preference.supports_batches and + * producer_batch_converter is None and # <<<<<<<<<<<<<< + * consumer_batch_converter is None): + * return SingletonElementConsumerSet( +*/ + __pyx_t_7 = (__pyx_v_producer_batch_converter == Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/runners/worker/operations.py":135 + * if (not consumer_batch_preference.supports_batches and + * producer_batch_converter is None and + * consumer_batch_converter is None): # <<<<<<<<<<<<<< + * return SingletonElementConsumerSet( + * counter_factory, +*/ + __pyx_t_7 = (__pyx_v_consumer_batch_converter == Py_None); + __pyx_t_2 = __pyx_t_7; + __pyx_L5_bool_binop_done:; + + /* "apache_beam/runners/worker/operations.py":133 + * consumer_batch_preference = consumer.get_batching_preference() + * consumer_batch_converter = consumer.get_input_batch_converter() + * if (not consumer_batch_preference.supports_batches and # <<<<<<<<<<<<<< + * producer_batch_converter is None and + * consumer_batch_converter is None): +*/ + if (__pyx_t_2) { + + /* "apache_beam/runners/worker/operations.py":136 + * producer_batch_converter is None and + * consumer_batch_converter is None): + * return SingletonElementConsumerSet( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = NULL; + + /* "apache_beam/runners/worker/operations.py":143 + * coder, + * producer_type_hints, + * output_sampler) # <<<<<<<<<<<<<< + * + * return GeneralPurposeConsumerSet( +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumer, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_output_sampler}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":133 + * consumer_batch_preference = consumer.get_batching_preference() + * consumer_batch_converter = consumer.get_input_batch_converter() + * if (not consumer_batch_preference.supports_batches and # <<<<<<<<<<<<<< + * producer_batch_converter is None and + * consumer_batch_converter is None): +*/ + } + + /* "apache_beam/runners/worker/operations.py":128 + * ): + * # type: (...) -> ConsumerSet + * if len(consumers) == 1: # <<<<<<<<<<<<<< + * consumer = consumers[0] + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":145 + * output_sampler) + * + * return GeneralPurposeConsumerSet( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = NULL; + + /* "apache_beam/runners/worker/operations.py":153 + * consumers, + * producer_batch_converter, + * output_sampler) # <<<<<<<<<<<<<< + * + * def __init__( +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_consumers, __pyx_v_producer_batch_converter, __pyx_v_output_sampler}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":116 + * ConsumerSet are attached to the outputting Operation. + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def create( + * counter_factory, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_consumer); + __Pyx_XDECREF(__pyx_v_consumer_batch_preference); + __Pyx_XDECREF(__pyx_v_consumer_batch_converter); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":155 + * output_sampler) + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_output_index = 0; + PyObject *__pyx_v_consumers = 0; + PyObject *__pyx_v_coder = 0; + PyObject *__pyx_v_producer_type_hints = 0; + PyObject *__pyx_v_producer_batch_converter = 0; + PyObject *__pyx_v_output_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_output_index,&__pyx_mstate_global->__pyx_n_u_consumers,&__pyx_mstate_global->__pyx_n_u_coder,&__pyx_mstate_global->__pyx_n_u_producer_type_hints,&__pyx_mstate_global->__pyx_n_u_producer_batch_converter,&__pyx_mstate_global->__pyx_n_u_output_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 155, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 155, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 8; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, i); __PYX_ERR(0, 155, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 8)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 155, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 155, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 155, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 155, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 155, __pyx_L3_error) + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 155, __pyx_L3_error) + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 155, __pyx_L3_error) + } + __pyx_v_counter_factory = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_output_index = values[2]; + __pyx_v_consumers = values[3]; + __pyx_v_coder = values[4]; + __pyx_v_producer_type_hints = values[5]; + __pyx_v_producer_batch_converter = values[6]; + __pyx_v_output_sampler = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_2__init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumers, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":165 + * producer_batch_converter, + * output_sampler): + * self.opcounter = opcounters.OperationCounters( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/worker/operations.py":171 + * output_index, + * producer_type_hints=producer_type_hints, + * producer_batch_converter=producer_batch_converter) # <<<<<<<<<<<<<< + * # Used in repr. + * self.step_name = step_name +*/ + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_coder, __pyx_v_output_index}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_producer_type_hints, __pyx_v_producer_type_hints, __pyx_t_4, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 165, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_producer_batch_converter, __pyx_v_producer_batch_converter, __pyx_t_4, __pyx_callargs+5, 1) < (0)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":165 + * producer_batch_converter, + * output_sampler): + * self.opcounter = opcounters.OperationCounters( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->opcounter); + __Pyx_DECREF((PyObject *)__pyx_v_self->opcounter); + __pyx_v_self->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":173 + * producer_batch_converter=producer_batch_converter) + * # Used in repr. + * self.step_name = step_name # <<<<<<<<<<<<<< + * self.output_index = output_index + * self.coder = coder +*/ + __Pyx_INCREF(__pyx_v_step_name); + __Pyx_GIVEREF(__pyx_v_step_name); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = __pyx_v_step_name; + + /* "apache_beam/runners/worker/operations.py":174 + * # Used in repr. + * self.step_name = step_name + * self.output_index = output_index # <<<<<<<<<<<<<< + * self.coder = coder + * self.consumers = consumers +*/ + __Pyx_INCREF(__pyx_v_output_index); + __Pyx_GIVEREF(__pyx_v_output_index); + __Pyx_GOTREF(__pyx_v_self->output_index); + __Pyx_DECREF(__pyx_v_self->output_index); + __pyx_v_self->output_index = __pyx_v_output_index; + + /* "apache_beam/runners/worker/operations.py":175 + * self.step_name = step_name + * self.output_index = output_index + * self.coder = coder # <<<<<<<<<<<<<< + * self.consumers = consumers + * self.output_sampler = output_sampler +*/ + __Pyx_INCREF(__pyx_v_coder); + __Pyx_GIVEREF(__pyx_v_coder); + __Pyx_GOTREF(__pyx_v_self->coder); + __Pyx_DECREF(__pyx_v_self->coder); + __pyx_v_self->coder = __pyx_v_coder; + + /* "apache_beam/runners/worker/operations.py":176 + * self.output_index = output_index + * self.coder = coder + * self.consumers = consumers # <<<<<<<<<<<<<< + * self.output_sampler = output_sampler + * self.element_sampler = ( +*/ + __pyx_t_1 = __pyx_v_consumers; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->consumers); + __Pyx_DECREF(__pyx_v_self->consumers); + __pyx_v_self->consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":177 + * self.coder = coder + * self.consumers = consumers + * self.output_sampler = output_sampler # <<<<<<<<<<<<<< + * self.element_sampler = ( + * output_sampler.element_sampler if output_sampler else None) +*/ + __Pyx_INCREF(__pyx_v_output_sampler); + __Pyx_GIVEREF(__pyx_v_output_sampler); + __Pyx_GOTREF(__pyx_v_self->output_sampler); + __Pyx_DECREF(__pyx_v_self->output_sampler); + __pyx_v_self->output_sampler = __pyx_v_output_sampler; + + /* "apache_beam/runners/worker/operations.py":179 + * self.output_sampler = output_sampler + * self.element_sampler = ( + * output_sampler.element_sampler if output_sampler else None) # <<<<<<<<<<<<<< + * self.execution_context = None # type: Optional[ExecutionContext] + * +*/ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_output_sampler); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 179, __pyx_L1_error) + if (__pyx_t_5) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_sampler, __pyx_mstate_global->__pyx_n_u_element_sampler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + } + + /* "apache_beam/runners/worker/operations.py":178 + * self.consumers = consumers + * self.output_sampler = output_sampler + * self.element_sampler = ( # <<<<<<<<<<<<<< + * output_sampler.element_sampler if output_sampler else None) + * self.execution_context = None # type: Optional[ExecutionContext] +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->element_sampler); + __Pyx_DECREF(__pyx_v_self->element_sampler); + __pyx_v_self->element_sampler = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":180 + * self.element_sampler = ( + * output_sampler.element_sampler if output_sampler else None) + * self.execution_context = None # type: Optional[ExecutionContext] # <<<<<<<<<<<<<< + * + * def try_split(self, fraction_of_remainder): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = Py_None; + + /* "apache_beam/runners/worker/operations.py":155 + * output_sampler) + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":182 + * self.execution_context = None # type: Optional[ExecutionContext] + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * # TODO(SDF): Consider supporting splitting each consumer individually. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction_of_remainder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 182, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 182, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 182, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 182, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 182, __pyx_L3_error) + } + __pyx_v_fraction_of_remainder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 182, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_fraction_of_remainder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_4try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/worker/operations.py":189 + * # This would require dedicated delivery of the split results to each + * # of the consumers separately. + * return None # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":182 + * self.execution_context = None # type: Optional[ExecutionContext] + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * # TODO(SDF): Consider supporting splitting each consumer individually. +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":191 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress, "Returns the progress of the current element.\n\n This progress should be an instance of\n apache_beam.io.iobase.RestrictionProgress, or None if progress is unknown.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/worker/operations.py":201 + * # TODO(SDF): Could implement this as a weighted average, if it becomes + * # useful to split on. + * return None # <<<<<<<<<<<<<< + * + * def update_counters_start(self, windowed_value): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":191 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":203 + * return None + * + * def update_counters_start(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.opcounter.update_from(windowed_value) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_start", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_counters_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":205 + * def update_counters_start(self, windowed_value): + * # type: (WindowedValue) -> None + * self.opcounter.update_from(windowed_value) # <<<<<<<<<<<<<< + * + * if self.execution_context is not None: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_from(__pyx_v_self->opcounter, ((PyObject *)__pyx_v_windowed_value), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":207 + * self.opcounter.update_from(windowed_value) + * + * if self.execution_context is not None: # <<<<<<<<<<<<<< + * self.execution_context.output_sampler = self.output_sampler + * +*/ + __pyx_t_6 = (__pyx_v_self->execution_context != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":208 + * + * if self.execution_context is not None: + * self.execution_context.output_sampler = self.output_sampler # <<<<<<<<<<<<<< + * + * # The following code is optimized by inlining a function call. Because this +*/ + __pyx_t_1 = __pyx_v_self->output_sampler; + __Pyx_INCREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->execution_context, __pyx_mstate_global->__pyx_n_u_output_sampler, __pyx_t_1) < (0)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":207 + * self.opcounter.update_from(windowed_value) + * + * if self.execution_context is not None: # <<<<<<<<<<<<<< + * self.execution_context.output_sampler = self.output_sampler + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":216 + * # is that some samples might be dropped, but it is better than the + * # alternative which is double sampling the same element. + * if self.element_sampler is not None: # <<<<<<<<<<<<<< + * if not self.element_sampler.has_element: + * self.element_sampler.el = windowed_value +*/ + __pyx_t_6 = (__pyx_v_self->element_sampler != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":217 + * # alternative which is double sampling the same element. + * if self.element_sampler is not None: + * if not self.element_sampler.has_element: # <<<<<<<<<<<<<< + * self.element_sampler.el = windowed_value + * self.element_sampler.has_element = True +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->element_sampler, __pyx_mstate_global->__pyx_n_u_has_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (!__pyx_t_6); + if (__pyx_t_7) { + + /* "apache_beam/runners/worker/operations.py":218 + * if self.element_sampler is not None: + * if not self.element_sampler.has_element: + * self.element_sampler.el = windowed_value # <<<<<<<<<<<<<< + * self.element_sampler.has_element = True + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->element_sampler, __pyx_mstate_global->__pyx_n_u_el, ((PyObject *)__pyx_v_windowed_value)) < (0)) __PYX_ERR(0, 218, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":219 + * if not self.element_sampler.has_element: + * self.element_sampler.el = windowed_value + * self.element_sampler.has_element = True # <<<<<<<<<<<<<< + * + * def update_counters_finish(self): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->element_sampler, __pyx_mstate_global->__pyx_n_u_has_element, Py_True) < (0)) __PYX_ERR(0, 219, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":217 + * # alternative which is double sampling the same element. + * if self.element_sampler is not None: + * if not self.element_sampler.has_element: # <<<<<<<<<<<<<< + * self.element_sampler.el = windowed_value + * self.element_sampler.has_element = True +*/ + } + + /* "apache_beam/runners/worker/operations.py":216 + * # is that some samples might be dropped, but it is better than the + * # alternative which is double sampling the same element. + * if self.element_sampler is not None: # <<<<<<<<<<<<<< + * if not self.element_sampler.has_element: + * self.element_sampler.el = windowed_value +*/ + } + + /* "apache_beam/runners/worker/operations.py":203 + * return None + * + * def update_counters_start(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.opcounter.update_from(windowed_value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start = {"update_counters_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_counters_start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 203, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_counters_start", 0) < (0)) __PYX_ERR(0, 203, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_counters_start", 1, 1, 1, i); __PYX_ERR(0, 203, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 203, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_counters_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 203, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_8update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_8update_counters_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_start", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":221 + * self.element_sampler.has_element = True + * + * def update_counters_finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.opcounter.update_collect() +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_finish", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_counters_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":223 + * def update_counters_finish(self): + * # type: () -> None + * self.opcounter.update_collect() # <<<<<<<<<<<<<< + * + * def update_counters_batch(self, windowed_batch): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_collect(__pyx_v_self->opcounter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":221 + * self.element_sampler.has_element = True + * + * def update_counters_finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.opcounter.update_collect() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish = {"update_counters_finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_counters_finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("update_counters_finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("update_counters_finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_10update_counters_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_finish", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":225 + * self.opcounter.update_collect() + * + * def update_counters_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * self.opcounter.update_from_batch(windowed_batch) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_batch", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_counters_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":227 + * def update_counters_batch(self, windowed_batch): + * # type: (WindowedBatch) -> None + * self.opcounter.update_from_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_v_self->opcounter->__pyx_vtab)->update_from_batch(__pyx_v_self->opcounter, ((PyObject *)__pyx_v_windowed_batch), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":225 + * self.opcounter.update_collect() + * + * def update_counters_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * self.opcounter.update_from_batch(windowed_batch) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch = {"update_counters_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_counters_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 225, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 225, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_counters_batch", 0) < (0)) __PYX_ERR(0, 225, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_counters_batch", 1, 1, 1, i); __PYX_ERR(0, 225, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 225, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_counters_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 225, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12update_counters_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12update_counters_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_counters_batch", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.update_counters_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":229 + * self.opcounter.update_from_batch(windowed_batch) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( + * self.__class__.__name__, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7[10]; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/runners/worker/operations.py":230 + * + * def __repr__(self): + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, + * self.step_name, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/runners/worker/operations.py":231 + * def __repr__(self): + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( + * self.__class__.__name__, # <<<<<<<<<<<<<< + * self.step_name, + * self.output_index, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":232 + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( + * self.__class__.__name__, + * self.step_name, # <<<<<<<<<<<<<< + * self.output_index, + * self.coder, +*/ + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->step_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":233 + * self.__class__.__name__, + * self.step_name, + * self.output_index, # <<<<<<<<<<<<<< + * self.coder, + * len(self.consumers)) +*/ + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->output_index), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":234 + * self.step_name, + * self.output_index, + * self.coder, # <<<<<<<<<<<<<< + * len(self.consumers)) + * +*/ + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->coder), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":235 + * self.output_index, + * self.coder, + * len(self.consumers)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = __pyx_v_self->consumers; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_t_5 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 235, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7[0] = __pyx_t_1; + __pyx_t_7[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_7[2] = __pyx_t_2; + __pyx_t_7[3] = __pyx_mstate_global->__pyx_kp_u_out; + __pyx_t_7[4] = __pyx_t_3; + __pyx_t_7[5] = __pyx_mstate_global->__pyx_kp_u_coder_2; + __pyx_t_7[6] = __pyx_t_4; + __pyx_t_7[7] = __pyx_mstate_global->__pyx_kp_u_len_consumers; + __pyx_t_7[8] = __pyx_t_5; + __pyx_t_7[9] = __pyx_mstate_global->__pyx_kp_u__2; + + /* "apache_beam/runners/worker/operations.py":230 + * + * def __repr__(self): + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( # <<<<<<<<<<<<<< + * self.__class__.__name__, + * self.step_name, +*/ + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 10, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4)); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":229 + * self.opcounter.update_from_batch(windowed_batch) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '%s[%s.out%s, coder=%s, len(consumers)=%s]' % ( + * self.__class__.__name__, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":33 + * cdef class ConsumerSet(Receiver): + * cdef list consumers + * cdef readonly opcounters.OperationCounters opcounter # <<<<<<<<<<<<<< + * cdef public step_name + * cdef public output_index +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->opcounter); + __pyx_r = ((PyObject *)__pyx_v_self->opcounter); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":34 + * cdef list consumers + * cdef readonly opcounters.OperationCounters opcounter + * cdef public step_name # <<<<<<<<<<<<<< + * cdef public output_index + * cdef public coder +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->step_name); + __pyx_r = __pyx_v_self->step_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":35 + * cdef readonly opcounters.OperationCounters opcounter + * cdef public step_name + * cdef public output_index # <<<<<<<<<<<<<< + * cdef public coder + * cdef public object output_sampler +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->output_index); + __pyx_r = __pyx_v_self->output_index; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->output_index); + __Pyx_DECREF(__pyx_v_self->output_index); + __pyx_v_self->output_index = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->output_index); + __Pyx_DECREF(__pyx_v_self->output_index); + __pyx_v_self->output_index = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":36 + * cdef public step_name + * cdef public output_index + * cdef public coder # <<<<<<<<<<<<<< + * cdef public object output_sampler + * cdef public object element_sampler +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->coder); + __pyx_r = __pyx_v_self->coder; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->coder); + __Pyx_DECREF(__pyx_v_self->coder); + __pyx_v_self->coder = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->coder); + __Pyx_DECREF(__pyx_v_self->coder); + __pyx_v_self->coder = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":37 + * cdef public output_index + * cdef public coder + * cdef public object output_sampler # <<<<<<<<<<<<<< + * cdef public object element_sampler + * cdef public object execution_context +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->output_sampler); + __pyx_r = __pyx_v_self->output_sampler; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->output_sampler); + __Pyx_DECREF(__pyx_v_self->output_sampler); + __pyx_v_self->output_sampler = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->output_sampler); + __Pyx_DECREF(__pyx_v_self->output_sampler); + __pyx_v_self->output_sampler = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":38 + * cdef public coder + * cdef public object output_sampler + * cdef public object element_sampler # <<<<<<<<<<<<<< + * cdef public object execution_context + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->element_sampler); + __pyx_r = __pyx_v_self->element_sampler; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->element_sampler); + __Pyx_DECREF(__pyx_v_self->element_sampler); + __pyx_v_self->element_sampler = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->element_sampler); + __Pyx_DECREF(__pyx_v_self->element_sampler); + __pyx_v_self->element_sampler = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":39 + * cdef public object output_sampler + * cdef public object element_sampler + * cdef public object execution_context # <<<<<<<<<<<<<< + * + * cpdef update_counters_start(self, WindowedValue windowed_value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->execution_context); + __pyx_r = __pyx_v_self->execution_context; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_16__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_16__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->coder); + __Pyx_GIVEREF(__pyx_v_self->coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->coder) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->consumers); + __Pyx_GIVEREF(__pyx_v_self->consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->element_sampler); + __Pyx_GIVEREF(__pyx_v_self->element_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->element_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->execution_context); + __Pyx_GIVEREF(__pyx_v_self->execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->opcounter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->opcounter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->opcounter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->output_index); + __Pyx_GIVEREF(__pyx_v_self->output_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->output_index) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->output_sampler); + __Pyx_GIVEREF(__pyx_v_self->output_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->output_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->step_name); + __Pyx_GIVEREF(__pyx_v_self->step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.coder, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->coder != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->consumers != ((PyObject*)Py_None)); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->element_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->execution_context != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->opcounter) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->output_index != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->output_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->step_name != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_232423418); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_232423418); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_232423418) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, None), state + * else: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ConsumerSet); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_232423418); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_232423418); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_232423418) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_18__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11ConsumerSet_18__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":241 + * """ConsumerSet representing a single consumer that can only process elements + * (not batches).""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_output_index = 0; + PyObject *__pyx_v_consumer = 0; + PyObject *__pyx_v_coder = 0; + PyObject *__pyx_v_producer_type_hints = 0; + PyObject *__pyx_v_output_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_output_index,&__pyx_mstate_global->__pyx_n_u_consumer,&__pyx_mstate_global->__pyx_n_u_coder,&__pyx_mstate_global->__pyx_n_u_producer_type_hints,&__pyx_mstate_global->__pyx_n_u_output_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 241, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 241, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 241, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 7; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, i); __PYX_ERR(0, 241, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 7)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 241, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 241, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 241, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 241, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 241, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 241, __pyx_L3_error) + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 241, __pyx_L3_error) + } + __pyx_v_counter_factory = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_output_index = values[2]; + __pyx_v_consumer = values[3]; + __pyx_v_coder = values[4]; + __pyx_v_producer_type_hints = values[5]; + __pyx_v_output_sampler = values[6]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 241, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumer, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_output_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_consumer, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_output_sampler) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":250 + * producer_type_hints, + * output_sampler): + * super().__init__( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":253 + * counter_factory, + * step_name, + * output_index, [consumer], # <<<<<<<<<<<<<< + * coder, + * producer_type_hints, +*/ + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_consumer); + __Pyx_GIVEREF(__pyx_v_consumer); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_consumer) != (0)) __PYX_ERR(0, 253, __pyx_L1_error); + + /* "apache_beam/runners/worker/operations.py":257 + * producer_type_hints, + * None, + * output_sampler) # <<<<<<<<<<<<<< + * self.consumer = consumer + * +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[9] = {__pyx_t_2, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_t_4, __pyx_v_coder, __pyx_v_producer_type_hints, Py_None, __pyx_v_output_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":258 + * None, + * output_sampler) + * self.consumer = consumer # <<<<<<<<<<<<<< + * + * def receive(self, windowed_value): +*/ + __pyx_t_1 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation))))) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->consumer); + __Pyx_DECREF((PyObject *)__pyx_v_self->consumer); + __pyx_v_self->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":241 + * """ConsumerSet representing a single consumer that can only process elements + * (not batches).""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":260 + * self.consumer = consumer + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.update_counters_start(windowed_value) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":262 + * def receive(self, windowed_value): + * # type: (WindowedValue) -> None + * self.update_counters_start(windowed_value) # <<<<<<<<<<<<<< + * self.consumer.process(windowed_value) + * self.update_counters_finish() +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":263 + * # type: (WindowedValue) -> None + * self.update_counters_start(windowed_value) + * self.consumer.process(windowed_value) # <<<<<<<<<<<<<< + * self.update_counters_finish() + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->consumer->__pyx_vtab)->process(__pyx_v_self->consumer, __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":264 + * self.update_counters_start(windowed_value) + * self.consumer.process(windowed_value) + * self.update_counters_finish() # <<<<<<<<<<<<<< + * + * def receive_batch(self, windowed_batch): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":260 + * self.consumer = consumer + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.update_counters_start(windowed_value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive = {"receive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 260, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 260, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive", 0) < (0)) __PYX_ERR(0, 260, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, i); __PYX_ERR(0, 260, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 260, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 260, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_2receive(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":266 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * raise AssertionError( + * "SingletonElementConsumerSet.receive_batch is not implemented") +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":267 + * + * def receive_batch(self, windowed_batch): + * raise AssertionError( # <<<<<<<<<<<<<< + * "SingletonElementConsumerSet.receive_batch is not implemented") + * +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_SingletonElementConsumerSet_rece}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 267, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":266 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * raise AssertionError( + * "SingletonElementConsumerSet.receive_batch is not implemented") +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch = {"receive_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 266, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_batch", 0) < (0)) __PYX_ERR(0, 266, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, i); __PYX_ERR(0, 266, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 266, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":270 + * "SingletonElementConsumerSet.receive_batch is not implemented") + * + * def flush(self): # <<<<<<<<<<<<<< + * # SingletonElementConsumerSet has no buffer to flush + * pass +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":272 + * def flush(self): + * # SingletonElementConsumerSet has no buffer to flush + * pass # <<<<<<<<<<<<<< + * + * def try_split(self, fraction_of_remainder): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":270 + * "SingletonElementConsumerSet.receive_batch is not implemented") + * + * def flush(self): # <<<<<<<<<<<<<< + * # SingletonElementConsumerSet has no buffer to flush + * pass +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush = {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flush (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flush", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flush", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_6flush(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":274 + * pass + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return self.consumer.try_split(fraction_of_remainder) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction_of_remainder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction_of_remainder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 274, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 274, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 274, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + } + __pyx_v_fraction_of_remainder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 274, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v_fraction_of_remainder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_8try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/worker/operations.py":276 + * def try_split(self, fraction_of_remainder): + * # type: (...) -> Optional[Any] + * return self.consumer.try_split(fraction_of_remainder) # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self->consumer); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_fraction_of_remainder}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":274 + * pass + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return self.consumer.try_split(fraction_of_remainder) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":278 + * return self.consumer.try_split(fraction_of_remainder) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return self.consumer.current_element_progress() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_10current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/worker/operations.py":279 + * + * def current_element_progress(self): + * return self.consumer.current_element_progress() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self->consumer); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":278 + * return self.consumer.try_split(fraction_of_remainder) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return self.consumer.current_element_progress() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.coder); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.coder) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->consumer); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->consumer); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->consumer)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.element_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.element_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.element_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.opcounter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.opcounter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_v_self->__pyx_base.opcounter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.output_index); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->__pyx_base.output_index) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.output_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->__pyx_base.output_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.coder, self.consumer, self.consumers, self.element_sampler, self.execution_context, self.opcounter, self.output_index, self.output_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->__pyx_base.coder != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->consumer) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.consumers != ((PyObject*)Py_None)); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.element_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.opcounter) != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.output_index != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.output_sampler != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonElementC); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_13052437); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_13052437); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_13052437) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.coder is not None or self.consumer is not None or self.consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.output_index is not None or self.output_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, None), state + * else: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonElementC); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_13052437); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_13052437); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_13052437) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SingletonElementConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":287 + * MAX_BATCH_SIZE = 4096 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_output_index = 0; + PyObject *__pyx_v_coder = 0; + PyObject *__pyx_v_producer_type_hints = 0; + PyObject *__pyx_v_consumers = 0; + PyObject *__pyx_v_producer_batch_converter = 0; + PyObject *__pyx_v_output_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_output_index,&__pyx_mstate_global->__pyx_n_u_coder,&__pyx_mstate_global->__pyx_n_u_producer_type_hints,&__pyx_mstate_global->__pyx_n_u_consumers,&__pyx_mstate_global->__pyx_n_u_producer_batch_converter,&__pyx_mstate_global->__pyx_n_u_output_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 287, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 287, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 287, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 8; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, i); __PYX_ERR(0, 287, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 8)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 287, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 287, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 287, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 287, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 287, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 287, __pyx_L3_error) + values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 287, __pyx_L3_error) + values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 287, __pyx_L3_error) + } + __pyx_v_counter_factory = values[0]; + __pyx_v_step_name = values[1]; + __pyx_v_output_index = values[2]; + __pyx_v_coder = values[3]; + __pyx_v_producer_type_hints = values[4]; + __pyx_v_consumers = values[5]; + __pyx_v_producer_batch_converter = values[6]; + __pyx_v_output_sampler = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 287, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_consumers, __pyx_v_producer_batch_converter, __pyx_v_output_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":317 + * self.passthrough_batch_consumers: List[Operation] = [] + * other_batch_consumers: DefaultDict[ + * BatchConverter, List[Operation]] = collections.defaultdict(lambda: []) # <<<<<<<<<<<<<< + * + * for consumer in consumers: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda = {"lambda", (PyCFunction)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__init__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":287 + * MAX_BATCH_SIZE = 4096 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name, PyObject *__pyx_v_output_index, PyObject *__pyx_v_coder, PyObject *__pyx_v_producer_type_hints, PyObject *__pyx_v_consumers, PyObject *__pyx_v_producer_batch_converter, PyObject *__pyx_v_output_sampler) { + PyObject *__pyx_v_other_batch_consumers = NULL; + PyObject *__pyx_v_consumer = NULL; + PyObject *__pyx_v_consumer_batch_converter = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":297 + * producer_batch_converter, + * output_sampler): + * super().__init__( # <<<<<<<<<<<<<< + * counter_factory, + * step_name, +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":305 + * producer_type_hints, + * producer_batch_converter, + * output_sampler) # <<<<<<<<<<<<<< + * + * self.producer_batch_converter = producer_batch_converter +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[9] = {__pyx_t_2, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_output_index, __pyx_v_consumers, __pyx_v_coder, __pyx_v_producer_type_hints, __pyx_v_producer_batch_converter, __pyx_v_output_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":307 + * output_sampler) + * + * self.producer_batch_converter = producer_batch_converter # <<<<<<<<<<<<<< + * + * # Partition consumers into three groups: +*/ + __Pyx_INCREF(__pyx_v_producer_batch_converter); + __Pyx_GIVEREF(__pyx_v_producer_batch_converter); + __Pyx_GOTREF(__pyx_v_self->producer_batch_converter); + __Pyx_DECREF(__pyx_v_self->producer_batch_converter); + __pyx_v_self->producer_batch_converter = __pyx_v_producer_batch_converter; + + /* "apache_beam/runners/worker/operations.py":314 + * # matches the output of the producer) + * # - consumers that will be passed converted batches + * self.element_consumers: List[Operation] = [] # <<<<<<<<<<<<<< + * self.passthrough_batch_consumers: List[Operation] = [] + * other_batch_consumers: DefaultDict[ +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->element_consumers); + __Pyx_DECREF(__pyx_v_self->element_consumers); + __pyx_v_self->element_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":315 + * # - consumers that will be passed converted batches + * self.element_consumers: List[Operation] = [] + * self.passthrough_batch_consumers: List[Operation] = [] # <<<<<<<<<<<<<< + * other_batch_consumers: DefaultDict[ + * BatchConverter, List[Operation]] = collections.defaultdict(lambda: []) +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->passthrough_batch_consumers); + __Pyx_DECREF(__pyx_v_self->passthrough_batch_consumers); + __pyx_v_self->passthrough_batch_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":317 + * self.passthrough_batch_consumers: List[Operation] = [] + * other_batch_consumers: DefaultDict[ + * BatchConverter, List[Operation]] = collections.defaultdict(lambda: []) # <<<<<<<<<<<<<< + * + * for consumer in consumers: +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__init___lambda, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_other_batch_consumers = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":319 + * BatchConverter, List[Operation]] = collections.defaultdict(lambda: []) + * + * for consumer in consumers: # <<<<<<<<<<<<<< + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) +*/ + if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) { + __pyx_t_1 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 319, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 319, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 319, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 319, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":320 + * + * for consumer in consumers: + * if not consumer.get_batching_preference().supports_batches: # <<<<<<<<<<<<<< + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == +*/ + __pyx_t_2 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_batching_preference, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_supports_batches); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = (!__pyx_t_8); + if (__pyx_t_9) { + + /* "apache_beam/runners/worker/operations.py":321 + * for consumer in consumers: + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) # <<<<<<<<<<<<<< + * elif (consumer.get_input_batch_converter() == + * self.producer_batch_converter): +*/ + if (unlikely(__pyx_v_self->element_consumers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(0, 321, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->element_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 321, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":320 + * + * for consumer in consumers: + * if not consumer.get_batching_preference().supports_batches: # <<<<<<<<<<<<<< + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/operations.py":322 + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == # <<<<<<<<<<<<<< + * self.producer_batch_converter): + * self.passthrough_batch_consumers.append(consumer) +*/ + __pyx_t_4 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_input_batch_converter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":323 + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == + * self.producer_batch_converter): # <<<<<<<<<<<<<< + * self.passthrough_batch_consumers.append(consumer) + * else: +*/ + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_v_self->producer_batch_converter, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":322 + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == # <<<<<<<<<<<<<< + * self.producer_batch_converter): + * self.passthrough_batch_consumers.append(consumer) +*/ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_9) { + + /* "apache_beam/runners/worker/operations.py":324 + * elif (consumer.get_input_batch_converter() == + * self.producer_batch_converter): + * self.passthrough_batch_consumers.append(consumer) # <<<<<<<<<<<<<< + * else: + * # Batch consumer with a mismatched batch type +*/ + if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(0, 324, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->passthrough_batch_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":322 + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) + * elif (consumer.get_input_batch_converter() == # <<<<<<<<<<<<<< + * self.producer_batch_converter): + * self.passthrough_batch_consumers.append(consumer) +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/operations.py":327 + * else: + * # Batch consumer with a mismatched batch type + * if consumer.get_batching_preference().supports_elements: # <<<<<<<<<<<<<< + * # Pass it elements if we can + * self.element_consumers.append(consumer) +*/ + /*else*/ { + __pyx_t_2 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_batching_preference, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_supports_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_9) { + + /* "apache_beam/runners/worker/operations.py":329 + * if consumer.get_batching_preference().supports_elements: + * # Pass it elements if we can + * self.element_consumers.append(consumer) # <<<<<<<<<<<<<< + * else: + * # As a last resort, explode and rebatch +*/ + if (unlikely(__pyx_v_self->element_consumers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(0, 329, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->element_consumers, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 329, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":327 + * else: + * # Batch consumer with a mismatched batch type + * if consumer.get_batching_preference().supports_elements: # <<<<<<<<<<<<<< + * # Pass it elements if we can + * self.element_consumers.append(consumer) +*/ + goto __pyx_L6; + } + + /* "apache_beam/runners/worker/operations.py":332 + * else: + * # As a last resort, explode and rebatch + * consumer_batch_converter = consumer.get_input_batch_converter() # <<<<<<<<<<<<<< + * # This consumer supports batches, it must have a batch converter + * assert consumer_batch_converter is not None +*/ + /*else*/ { + __pyx_t_4 = __pyx_v_consumer; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_input_batch_converter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XDECREF_SET(__pyx_v_consumer_batch_converter, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":334 + * consumer_batch_converter = consumer.get_input_batch_converter() + * # This consumer supports batches, it must have a batch converter + * assert consumer_batch_converter is not None # <<<<<<<<<<<<<< + * other_batch_consumers[consumer_batch_converter].append(consumer) + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_9 = (__pyx_v_consumer_batch_converter != Py_None); + if (unlikely(!__pyx_t_9)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 334, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 334, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/operations.py":335 + * # This consumer supports batches, it must have a batch converter + * assert consumer_batch_converter is not None + * other_batch_consumers[consumer_batch_converter].append(consumer) # <<<<<<<<<<<<<< + * + * self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict( +*/ + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_other_batch_consumers, __pyx_v_consumer_batch_converter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_consumer); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L6:; + } + __pyx_L5:; + + /* "apache_beam/runners/worker/operations.py":319 + * BatchConverter, List[Operation]] = collections.defaultdict(lambda: []) + * + * for consumer in consumers: # <<<<<<<<<<<<<< + * if not consumer.get_batching_preference().supports_batches: + * self.element_consumers.append(consumer) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":337 + * other_batch_consumers[consumer_batch_converter].append(consumer) + * + * self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict( # <<<<<<<<<<<<<< + * other_batch_consumers) + * +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/worker/operations.py":338 + * + * self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict( + * other_batch_consumers) # <<<<<<<<<<<<<< + * + * self.has_batch_consumers = ( +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_other_batch_consumers}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyDict_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":337 + * other_batch_consumers[consumer_batch_converter].append(consumer) + * + * self.other_batch_consumers: Dict[BatchConverter, List[Operation]] = dict( # <<<<<<<<<<<<<< + * other_batch_consumers) + * +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->other_batch_consumers); + __Pyx_DECREF(__pyx_v_self->other_batch_consumers); + __pyx_v_self->other_batch_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":341 + * + * self.has_batch_consumers = ( + * self.passthrough_batch_consumers or self.other_batch_consumers) # <<<<<<<<<<<<<< + * self._batched_elements: List[Any] = [] + * +*/ + if (__pyx_v_self->passthrough_batch_consumers == Py_None) __pyx_t_8 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_self->passthrough_batch_consumers); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_8 = (__pyx_temp != 0); + } + + if (!__pyx_t_8) { + } else { + __pyx_t_9 = __pyx_t_8; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->other_batch_consumers); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + __pyx_L8_bool_binop_done:; + + /* "apache_beam/runners/worker/operations.py":340 + * other_batch_consumers) + * + * self.has_batch_consumers = ( # <<<<<<<<<<<<<< + * self.passthrough_batch_consumers or self.other_batch_consumers) + * self._batched_elements: List[Any] = [] +*/ + __pyx_v_self->has_batch_consumers = __pyx_t_9; + + /* "apache_beam/runners/worker/operations.py":342 + * self.has_batch_consumers = ( + * self.passthrough_batch_consumers or self.other_batch_consumers) + * self._batched_elements: List[Any] = [] # <<<<<<<<<<<<<< + * + * def receive(self, windowed_value): +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_batched_elements); + __Pyx_DECREF(__pyx_v_self->_batched_elements); + __pyx_v_self->_batched_elements = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":287 + * MAX_BATCH_SIZE = 4096 + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * counter_factory, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_other_batch_consumers); + __Pyx_XDECREF(__pyx_v_consumer); + __Pyx_XDECREF(__pyx_v_consumer_batch_converter); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":344 + * self._batched_elements: List[Any] = [] + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch) { + PyObject *__pyx_v_consumer = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":347 + * # type: (WindowedValue) -> None + * + * self.update_counters_start(windowed_value) # <<<<<<<<<<<<<< + * + * for consumer in self.element_consumers: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":349 + * self.update_counters_start(windowed_value) + * + * for consumer in self.element_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process(windowed_value) + * +*/ + if (unlikely(__pyx_v_self->element_consumers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 349, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->element_consumers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 349, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":350 + * + * for consumer in self.element_consumers: + * _cast_to_operation(consumer).process(windowed_value) # <<<<<<<<<<<<<< + * + * # TODO: Do this branching when contstructing ConsumerSet +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_consumer}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":349 + * self.update_counters_start(windowed_value) + * + * for consumer in self.element_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process(windowed_value) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":353 + * + * # TODO: Do this branching when contstructing ConsumerSet + * if self.has_batch_consumers: # <<<<<<<<<<<<<< + * self._batched_elements.append(windowed_value) + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: +*/ + if (__pyx_v_self->has_batch_consumers) { + + /* "apache_beam/runners/worker/operations.py":354 + * # TODO: Do this branching when contstructing ConsumerSet + * if self.has_batch_consumers: + * self._batched_elements.append(windowed_value) # <<<<<<<<<<<<<< + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: + * self.flush() +*/ + if (unlikely(__pyx_v_self->_batched_elements == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(0, 354, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_batched_elements, ((PyObject *)__pyx_v_windowed_value)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 354, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":355 + * if self.has_batch_consumers: + * self._batched_elements.append(windowed_value) + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: # <<<<<<<<<<<<<< + * self.flush() + * +*/ + __pyx_t_1 = __pyx_v_self->_batched_elements; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 355, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_MAX_BATCH_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_10) { + + /* "apache_beam/runners/worker/operations.py":356 + * self._batched_elements.append(windowed_value) + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: + * self.flush() # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/21655): Properly estimate +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.flush(((struct __pyx_obj_11apache_beam_7runners_6common_Receiver *)__pyx_v_self), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":355 + * if self.has_batch_consumers: + * self._batched_elements.append(windowed_value) + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: # <<<<<<<<<<<<<< + * self.flush() + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":353 + * + * # TODO: Do this branching when contstructing ConsumerSet + * if self.has_batch_consumers: # <<<<<<<<<<<<<< + * self._batched_elements.append(windowed_value) + * if len(self._batched_elements) >= self.MAX_BATCH_SIZE: +*/ + } + + /* "apache_beam/runners/worker/operations.py":360 + * # TODO(https://github.com/apache/beam/issues/21655): Properly estimate + * # sizes in the batch-consumer only case, this undercounts large iterables + * self.update_counters_finish() # <<<<<<<<<<<<<< + * + * def receive_batch(self, windowed_batch): +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":344 + * self._batched_elements: List[Any] = [] + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_consumer); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive = {"receive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 344, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive", 0) < (0)) __PYX_ERR(0, 344, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, i); __PYX_ERR(0, 344, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error) + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 344, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_2receive(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_2receive(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive(__pyx_v_self, __pyx_v_windowed_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":362 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch, int __pyx_skip_dispatch) { + PyObject *__pyx_v_wv = NULL; + PyObject *__pyx_v_consumer = NULL; + PyObject *__pyx_v_consumer_batch_converter = NULL; + PyObject *__pyx_v_consumers = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_t_14; + Py_ssize_t __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18[7]; + PyObject *__pyx_t_19 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receive_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":363 + * + * def receive_batch(self, windowed_batch): + * if self.element_consumers: # <<<<<<<<<<<<<< + * for wv in windowed_batch.as_windowed_values( + * self.producer_batch_converter.explode_batch): +*/ + if (__pyx_v_self->element_consumers == Py_None) __pyx_t_6 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_self->element_consumers); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_6 = (__pyx_temp != 0); + } + + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":364 + * def receive_batch(self, windowed_batch): + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( # <<<<<<<<<<<<<< + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_windowed_batch); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":365 + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( + * self.producer_batch_converter.explode_batch): # <<<<<<<<<<<<<< + * for consumer in self.element_consumers: + * _cast_to_operation(consumer).process(wv) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_mstate_global->__pyx_n_u_explode_batch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_windowed_values, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":364 + * def receive_batch(self, windowed_batch): + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( # <<<<<<<<<<<<<< + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: +*/ + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 364, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 364, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 364, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 364, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_wv, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":366 + * for wv in windowed_batch.as_windowed_values( + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process(wv) + * +*/ + if (unlikely(__pyx_v_self->element_consumers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 366, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->element_consumers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_9 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 366, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":367 + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: + * _cast_to_operation(consumer).process(wv) # <<<<<<<<<<<<<< + * + * for consumer in self.passthrough_batch_consumers: +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_consumer}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_3 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_wv}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":366 + * for wv in windowed_batch.as_windowed_values( + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process(wv) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":364 + * def receive_batch(self, windowed_batch): + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( # <<<<<<<<<<<<<< + * self.producer_batch_converter.explode_batch): + * for consumer in self.element_consumers: +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":363 + * + * def receive_batch(self, windowed_batch): + * if self.element_consumers: # <<<<<<<<<<<<<< + * for wv in windowed_batch.as_windowed_values( + * self.producer_batch_converter.explode_batch): +*/ + } + + /* "apache_beam/runners/worker/operations.py":369 + * _cast_to_operation(consumer).process(wv) + * + * for consumer in self.passthrough_batch_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch(windowed_batch) + * +*/ + if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 369, __pyx_L1_error) + } + __pyx_t_4 = __pyx_v_self->passthrough_batch_consumers; __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":370 + * + * for consumer in self.passthrough_batch_consumers: + * _cast_to_operation(consumer).process_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * for (consumer_batch_converter, +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_consumer}; + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_2 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":369 + * _cast_to_operation(consumer).process(wv) + * + * for consumer in self.passthrough_batch_consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch(windowed_batch) + * +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":372 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * for (consumer_batch_converter, # <<<<<<<<<<<<<< + * consumers) in self.other_batch_consumers.items(): + * # Explode and rebatch into the new batch type (ouch!) +*/ + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":373 + * + * for (consumer_batch_converter, + * consumers) in self.other_batch_consumers.items(): # <<<<<<<<<<<<<< + * # Explode and rebatch into the new batch type (ouch!) + * # TODO: Register direct conversions for equivalent batch types +*/ + if (unlikely(__pyx_v_self->other_batch_consumers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 373, __pyx_L1_error) + } + + /* "apache_beam/runners/worker/operations.py":372 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * for (consumer_batch_converter, # <<<<<<<<<<<<<< + * consumers) in self.other_batch_consumers.items(): + * # Explode and rebatch into the new batch type (ouch!) +*/ + __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_self->other_batch_consumers, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_9), (&__pyx_t_13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __pyx_t_4 = __pyx_t_1; + __pyx_t_1 = 0; + while (1) { + + /* "apache_beam/runners/worker/operations.py":373 + * + * for (consumer_batch_converter, + * consumers) in self.other_batch_consumers.items(): # <<<<<<<<<<<<<< + * # Explode and rebatch into the new batch type (ouch!) + * # TODO: Register direct conversions for equivalent batch types +*/ + __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_9, &__pyx_t_7, &__pyx_t_1, &__pyx_t_10, NULL, __pyx_t_13); + if (unlikely(__pyx_t_14 == 0)) break; + if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/runners/worker/operations.py":372 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * for (consumer_batch_converter, # <<<<<<<<<<<<<< + * consumers) in self.other_batch_consumers.items(): + * # Explode and rebatch into the new batch type (ouch!) +*/ + __Pyx_XDECREF_SET(__pyx_v_consumer_batch_converter, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_consumers, __pyx_t_10); + __pyx_t_10 = 0; + + /* "apache_beam/runners/worker/operations.py":377 + * # TODO: Register direct conversions for equivalent batch types + * + * for consumer in consumers: # <<<<<<<<<<<<<< + * warnings.warn( + * f"Input to operation {consumer} must be rebatched from type " +*/ + if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) { + __pyx_t_10 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_10); + __pyx_t_15 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 377, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_10))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 377, __pyx_L1_error) + #endif + if (__pyx_t_15 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_15; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 377, __pyx_L1_error) + #endif + if (__pyx_t_15 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_15); + #endif + ++__pyx_t_15; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_8(__pyx_t_10); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 377, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":378 + * + * for consumer in consumers: + * warnings.warn( # <<<<<<<<<<<<<< + * f"Input to operation {consumer} must be rebatched from type " + * f"{self.producer_batch_converter.batch_type!r} to " +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":379 + * for consumer in consumers: + * warnings.warn( + * f"Input to operation {consumer} must be rebatched from type " # <<<<<<<<<<<<<< + * f"{self.producer_batch_converter.batch_type!r} to " + * f"{consumer_batch_converter.batch_type!r}.\n" +*/ + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_consumer, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + + /* "apache_beam/runners/worker/operations.py":380 + * warnings.warn( + * f"Input to operation {consumer} must be rebatched from type " + * f"{self.producer_batch_converter.batch_type!r} to " # <<<<<<<<<<<<<< + * f"{consumer_batch_converter.batch_type!r}.\n" + * "This is very inefficient, consider re-structuring your pipeline " +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_mstate_global->__pyx_n_u_batch_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_11), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":381 + * f"Input to operation {consumer} must be rebatched from type " + * f"{self.producer_batch_converter.batch_type!r} to " + * f"{consumer_batch_converter.batch_type!r}.\n" # <<<<<<<<<<<<<< + * "This is very inefficient, consider re-structuring your pipeline " + * "or adding a DoFn to directly convert between these types.", +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_consumer_batch_converter, __pyx_mstate_global->__pyx_n_u_batch_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_17 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_11), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_18[0] = __pyx_mstate_global->__pyx_kp_u_Input_to_operation; + __pyx_t_18[1] = __pyx_t_12; + __pyx_t_18[2] = __pyx_mstate_global->__pyx_kp_u_must_be_rebatched_from_type; + __pyx_t_18[3] = __pyx_t_16; + __pyx_t_18[4] = __pyx_mstate_global->__pyx_kp_u_to; + __pyx_t_18[5] = __pyx_t_17; + __pyx_t_18[6] = __pyx_mstate_global->__pyx_kp_u_This_is_very_inefficient_consid; + + /* "apache_beam/runners/worker/operations.py":379 + * for consumer in consumers: + * warnings.warn( + * f"Input to operation {consumer} must be rebatched from type " # <<<<<<<<<<<<<< + * f"{self.producer_batch_converter.batch_type!r} to " + * f"{consumer_batch_converter.batch_type!r}.\n" +*/ + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_18, 7, 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 29 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 123, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17)); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "apache_beam/runners/worker/operations.py":384 + * "This is very inefficient, consider re-structuring your pipeline " + * "or adding a DoFn to directly convert between these types.", + * InefficientExecutionWarning) # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch( + * windowed_batch.with_values( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_11, __pyx_t_17}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":385 + * "or adding a DoFn to directly convert between these types.", + * InefficientExecutionWarning) + * _cast_to_operation(consumer).process_batch( # <<<<<<<<<<<<<< + * windowed_batch.with_values( + * consumer_batch_converter.produce_batch( +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_consumer}; + __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + } + __pyx_t_3 = __pyx_t_17; + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":387 + * _cast_to_operation(consumer).process_batch( + * windowed_batch.with_values( + * consumer_batch_converter.produce_batch( # <<<<<<<<<<<<<< + * self.producer_batch_converter.explode_batch( + * windowed_batch.values)))) +*/ + __pyx_t_11 = __pyx_v_consumer_batch_converter; + __Pyx_INCREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":388 + * windowed_batch.with_values( + * consumer_batch_converter.produce_batch( + * self.producer_batch_converter.explode_batch( # <<<<<<<<<<<<<< + * windowed_batch.values)))) + * +*/ + __pyx_t_12 = __pyx_v_self->producer_batch_converter; + __Pyx_INCREF(__pyx_t_12); + + /* "apache_beam/runners/worker/operations.py":389 + * consumer_batch_converter.produce_batch( + * self.producer_batch_converter.explode_batch( + * windowed_batch.values)))) # <<<<<<<<<<<<<< + * + * self.update_counters_batch(windowed_batch) +*/ + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_19}; + __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_explode_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_produce_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":386 + * InefficientExecutionWarning) + * _cast_to_operation(consumer).process_batch( + * windowed_batch.with_values( # <<<<<<<<<<<<<< + * consumer_batch_converter.produce_batch( + * self.producer_batch_converter.explode_batch( +*/ + __pyx_t_16 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_windowed_batch->__pyx_vtab)->with_values(__pyx_v_windowed_batch, __pyx_t_2, 0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_16}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":377 + * # TODO: Register direct conversions for equivalent batch types + * + * for consumer in consumers: # <<<<<<<<<<<<<< + * warnings.warn( + * f"Input to operation {consumer} must be rebatched from type " +*/ + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":391 + * windowed_batch.values)))) + * + * self.update_counters_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * def flush(self): +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.update_counters_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v_self), __pyx_v_windowed_batch, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":362 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wv); + __Pyx_XDECREF(__pyx_v_consumer); + __Pyx_XDECREF(__pyx_v_consumer_batch_converter); + __Pyx_XDECREF(__pyx_v_consumers); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch = {"receive_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("receive_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 362, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 362, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_batch", 0) < (0)) __PYX_ERR(0, 362, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, i); __PYX_ERR(0, 362, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 362, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("receive_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 362, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 1, "windowed_batch", 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_4receive_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("receive_batch", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch(__pyx_v_self, __pyx_v_windowed_batch, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":393 + * self.update_counters_batch(windowed_batch) + * + * def flush(self): # <<<<<<<<<<<<<< + * if not self.has_batch_consumers or not self._batched_elements: + * return +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_batch_converter = NULL; + PyObject *__pyx_v_consumers = NULL; + PyObject *__pyx_v_windowed_batch = NULL; + PyObject *__pyx_v_consumer = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + Py_ssize_t __pyx_t_14; + PyObject *(*__pyx_t_15)(PyObject *); + Py_ssize_t __pyx_t_16; + PyObject *(*__pyx_t_17)(PyObject *); + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":394 + * + * def flush(self): + * if not self.has_batch_consumers or not self._batched_elements: # <<<<<<<<<<<<<< + * return + * +*/ + __pyx_t_7 = (!__pyx_v_self->has_batch_consumers); + if (!__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + if (__pyx_v_self->_batched_elements == Py_None) __pyx_t_7 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_self->_batched_elements); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_7 = (__pyx_temp != 0); + } + + __pyx_t_8 = (!__pyx_t_7); + __pyx_t_6 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":395 + * def flush(self): + * if not self.has_batch_consumers or not self._batched_elements: + * return # <<<<<<<<<<<<<< + * + * for batch_converter, consumers in self.other_batch_consumers.items(): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":394 + * + * def flush(self): + * if not self.has_batch_consumers or not self._batched_elements: # <<<<<<<<<<<<<< + * return + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":397 + * return + * + * for batch_converter, consumers in self.other_batch_consumers.items(): # <<<<<<<<<<<<<< + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, produce_fn=batch_converter.produce_batch): +*/ + __pyx_t_9 = 0; + if (unlikely(__pyx_v_self->other_batch_consumers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 397, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->other_batch_consumers, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_10, &__pyx_t_9, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_11); + if (unlikely(__pyx_t_12 == 0)) break; + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_batch_converter, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_consumers, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":398 + * + * for batch_converter, consumers in self.other_batch_consumers.items(): + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: +*/ + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":399 + * for batch_converter, consumers in self.other_batch_consumers.items(): + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, produce_fn=batch_converter.produce_batch): # <<<<<<<<<<<<<< + * for consumer in consumers: + * _cast_to_operation(consumer).process_batch(windowed_batch) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_batch_converter, __pyx_mstate_global->__pyx_n_u_produce_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_self->_batched_elements}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_produce_fn, __pyx_t_3, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":398 + * + * for batch_converter, consumers in self.other_batch_consumers.items(): + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: +*/ + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_13 = __pyx_t_4; __Pyx_INCREF(__pyx_t_13); + __pyx_t_14 = 0; + __pyx_t_15 = NULL; + } else { + __pyx_t_14 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 398, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_15)) { + if (likely(PyList_CheckExact(__pyx_t_13))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 398, __pyx_L1_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_13, __pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_14; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 398, __pyx_L1_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_14)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); + #endif + ++__pyx_t_14; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_15(__pyx_t_13); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 398, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":400 + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch(windowed_batch) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_consumers)) || PyTuple_CheckExact(__pyx_v_consumers)) { + __pyx_t_4 = __pyx_v_consumers; __Pyx_INCREF(__pyx_t_4); + __pyx_t_16 = 0; + __pyx_t_17 = NULL; + } else { + __pyx_t_16 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_consumers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 400, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_17)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 400, __pyx_L1_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_16; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 400, __pyx_L1_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_16)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_16); + #endif + ++__pyx_t_16; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + } else { + __pyx_t_3 = __pyx_t_17(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 400, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":401 + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: + * _cast_to_operation(consumer).process_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * for consumer in self.passthrough_batch_consumers: +*/ + __pyx_t_19 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_20))) { + __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_20); + assert(__pyx_t_19); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20); + __Pyx_INCREF(__pyx_t_19); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_20, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_consumer}; + __pyx_t_18 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + } + __pyx_t_2 = __pyx_t_18; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_windowed_batch}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":400 + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch(windowed_batch) + * +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":398 + * + * for batch_converter, consumers in self.other_batch_consumers.items(): + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, produce_fn=batch_converter.produce_batch): + * for consumer in consumers: +*/ + } + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":403 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * for consumer in self.passthrough_batch_consumers: # <<<<<<<<<<<<<< + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, +*/ + if (unlikely(__pyx_v_self->passthrough_batch_consumers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 403, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->passthrough_batch_consumers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_10 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 403, __pyx_L1_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_10; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_XDECREF_SET(__pyx_v_consumer, __pyx_t_13); + __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":404 + * + * for consumer in self.passthrough_batch_consumers: + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, + * produce_fn=self.producer_batch_converter.produce_batch): +*/ + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":406 + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, + * produce_fn=self.producer_batch_converter.produce_batch): # <<<<<<<<<<<<<< + * _cast_to_operation(consumer).process_batch(windowed_batch) + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->producer_batch_converter, __pyx_mstate_global->__pyx_n_u_produce_batch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_self->_batched_elements}; + __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_produce_fn, __pyx_t_3, __pyx_t_18, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_13 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + + /* "apache_beam/runners/worker/operations.py":404 + * + * for consumer in self.passthrough_batch_consumers: + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, + * produce_fn=self.producer_batch_converter.produce_batch): +*/ + if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { + __pyx_t_18 = __pyx_t_13; __Pyx_INCREF(__pyx_t_18); + __pyx_t_9 = 0; + __pyx_t_15 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 404, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + for (;;) { + if (likely(!__pyx_t_15)) { + if (likely(PyList_CheckExact(__pyx_t_18))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_18); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 404, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(__pyx_t_18, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_18); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 404, __pyx_L1_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_13 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_9)); + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_18, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 404, __pyx_L1_error) + } else { + __pyx_t_13 = __pyx_t_15(__pyx_t_18); + if (unlikely(!__pyx_t_13)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 404, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_13); + __Pyx_XDECREF_SET(__pyx_v_windowed_batch, __pyx_t_13); + __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":407 + * self._batched_elements, + * produce_fn=self.producer_batch_converter.produce_batch): + * _cast_to_operation(consumer).process_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * self._batched_elements = [] +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_cast_to_operation); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_20))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_20); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_20, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_consumer}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_windowed_batch}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_batch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":404 + * + * for consumer in self.passthrough_batch_consumers: + * for windowed_batch in WindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * self._batched_elements, + * produce_fn=self.producer_batch_converter.produce_batch): +*/ + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "apache_beam/runners/worker/operations.py":403 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * for consumer in self.passthrough_batch_consumers: # <<<<<<<<<<<<<< + * for windowed_batch in WindowedBatch.from_windowed_values( + * self._batched_elements, +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":409 + * _cast_to_operation(consumer).process_batch(windowed_batch) + * + * self._batched_elements = [] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_batched_elements); + __Pyx_DECREF(__pyx_v_self->_batched_elements); + __pyx_v_self->_batched_elements = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":393 + * self.update_counters_batch(windowed_batch) + * + * def flush(self): # <<<<<<<<<<<<<< + * if not self.has_batch_consumers or not self._batched_elements: + * return +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_batch_converter); + __Pyx_XDECREF(__pyx_v_consumers); + __Pyx_XDECREF(__pyx_v_windowed_batch); + __Pyx_XDECREF(__pyx_v_consumer); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush = {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flush (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("flush", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("flush", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_6flush(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_6flush(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_8__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_batch_consumers); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(14); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->_batched_elements); + __Pyx_GIVEREF(__pyx_v_self->_batched_elements); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_batched_elements) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.coder); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.coder); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.coder) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->element_consumers); + __Pyx_GIVEREF(__pyx_v_self->element_consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->element_consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.element_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.element_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx_base.element_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.opcounter); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.opcounter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_v_self->__pyx_base.opcounter)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->other_batch_consumers); + __Pyx_GIVEREF(__pyx_v_self->other_batch_consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_v_self->other_batch_consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.output_index); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_index); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_v_self->__pyx_base.output_index) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.output_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.output_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_v_self->__pyx_base.output_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->passthrough_batch_consumers); + __Pyx_GIVEREF(__pyx_v_self->passthrough_batch_consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 11, __pyx_v_self->passthrough_batch_consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->producer_batch_converter); + __Pyx_GIVEREF(__pyx_v_self->producer_batch_converter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 12, __pyx_v_self->producer_batch_converter) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._batched_elements, self.coder, self.consumers, self.element_consumers, self.element_sampler, self.execution_context, self.has_batch_consumers, self.opcounter, self.other_batch_consumers, self.output_index, self.output_sampler, self.passthrough_batch_consumers, self.producer_batch_converter, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_batched_elements != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.coder != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.consumers != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->element_consumers != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.element_sampler != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.opcounter) != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->other_batch_consumers != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.output_index != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.output_sampler != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->passthrough_batch_consumers != ((PyObject*)Py_None)); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->producer_batch_converter != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GeneralPurposeCon); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_267513676); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_267513676); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_267513676) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._batched_elements is not None or self.coder is not None or self.consumers is not None or self.element_consumers is not None or self.element_sampler is not None or self.execution_context is not None or self.opcounter is not None or self.other_batch_consumers is not None or self.output_index is not None or self.output_sampler is not None or self.passthrough_batch_consumers is not None or self.producer_batch_converter is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, None), state + * else: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GeneralPurposeCon); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_267513676); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_267513676); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_267513676) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_10__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":418 + * one or more receiver operations that will take that as input. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * name_context, # type: common.NameContext +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation___init__, "Initializes a worker operation instance.\n\n Args:\n name_context: A NameContext instance, with the name information for this\n operation.\n spec: A operation_specs.Worker* instance.\n counter_factory: The CounterFactory to use for our counters.\n state_sampler: The StateSampler for the current operation.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__; +#endif +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 418, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 418, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 418, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 418, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 418, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 418, __pyx_L3_error) + } + __pyx_v_name_context = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_state_sampler = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 418, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":434 + * state_sampler: The StateSampler for the current operation. + * """ + * assert isinstance(name_context, common.NameContext) # <<<<<<<<<<<<<< + * self.name_context = name_context + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NameContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_name_context, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 434, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 434, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/operations.py":435 + * """ + * assert isinstance(name_context, common.NameContext) + * self.name_context = name_context # <<<<<<<<<<<<<< + * + * self.spec = spec +*/ + __Pyx_INCREF(__pyx_v_name_context); + __Pyx_GIVEREF(__pyx_v_name_context); + __Pyx_GOTREF(__pyx_v_self->name_context); + __Pyx_DECREF(__pyx_v_self->name_context); + __pyx_v_self->name_context = __pyx_v_name_context; + + /* "apache_beam/runners/worker/operations.py":437 + * self.name_context = name_context + * + * self.spec = spec # <<<<<<<<<<<<<< + * self.counter_factory = counter_factory + * self.execution_context = None # type: Optional[ExecutionContext] +*/ + __Pyx_INCREF(__pyx_v_spec); + __Pyx_GIVEREF(__pyx_v_spec); + __Pyx_GOTREF(__pyx_v_self->spec); + __Pyx_DECREF(__pyx_v_self->spec); + __pyx_v_self->spec = __pyx_v_spec; + + /* "apache_beam/runners/worker/operations.py":438 + * + * self.spec = spec + * self.counter_factory = counter_factory # <<<<<<<<<<<<<< + * self.execution_context = None # type: Optional[ExecutionContext] + * self.consumers = collections.defaultdict( +*/ + __Pyx_INCREF(__pyx_v_counter_factory); + __Pyx_GIVEREF(__pyx_v_counter_factory); + __Pyx_GOTREF(__pyx_v_self->counter_factory); + __Pyx_DECREF(__pyx_v_self->counter_factory); + __pyx_v_self->counter_factory = __pyx_v_counter_factory; + + /* "apache_beam/runners/worker/operations.py":439 + * self.spec = spec + * self.counter_factory = counter_factory + * self.execution_context = None # type: Optional[ExecutionContext] # <<<<<<<<<<<<<< + * self.consumers = collections.defaultdict( + * list) # type: DefaultDict[int, List[Operation]] +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = Py_None; + + /* "apache_beam/runners/worker/operations.py":440 + * self.counter_factory = counter_factory + * self.execution_context = None # type: Optional[ExecutionContext] + * self.consumers = collections.defaultdict( # <<<<<<<<<<<<<< + * list) # type: DefaultDict[int, List[Operation]] + * +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":441 + * self.execution_context = None # type: Optional[ExecutionContext] + * self.consumers = collections.defaultdict( + * list) # type: DefaultDict[int, List[Operation]] # <<<<<<<<<<<<<< + * + * # These are overwritten in the legacy harness. +*/ + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)(&PyList_Type))}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":440 + * self.counter_factory = counter_factory + * self.execution_context = None # type: Optional[ExecutionContext] + * self.consumers = collections.defaultdict( # <<<<<<<<<<<<<< + * list) # type: DefaultDict[int, List[Operation]] + * +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->consumers); + __Pyx_DECREF(__pyx_v_self->consumers); + __pyx_v_self->consumers = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":444 + * + * # These are overwritten in the legacy harness. + * self.metrics_container = MetricsContainer(self.name_context.metrics_name()) # <<<<<<<<<<<<<< + * + * self.state_sampler = state_sampler +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MetricsContainer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __pyx_v_self->name_context; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_metrics_name, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->metrics_container); + __Pyx_DECREF(__pyx_v_self->metrics_container); + __pyx_v_self->metrics_container = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":446 + * self.metrics_container = MetricsContainer(self.name_context.metrics_name()) + * + * self.state_sampler = state_sampler # <<<<<<<<<<<<<< + * self.scoped_start_state = self.state_sampler.scoped_state( + * self.name_context, 'start', metrics_container=self.metrics_container) +*/ + __Pyx_INCREF(__pyx_v_state_sampler); + __Pyx_GIVEREF(__pyx_v_state_sampler); + __Pyx_GOTREF(__pyx_v_self->state_sampler); + __Pyx_DECREF(__pyx_v_self->state_sampler); + __pyx_v_self->state_sampler = __pyx_v_state_sampler; + + /* "apache_beam/runners/worker/operations.py":447 + * + * self.state_sampler = state_sampler + * self.scoped_start_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'start', metrics_container=self.metrics_container) + * self.scoped_process_state = self.state_sampler.scoped_state( +*/ + __pyx_t_1 = __pyx_v_self->state_sampler; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/worker/operations.py":448 + * self.state_sampler = state_sampler + * self.scoped_start_state = self.state_sampler.scoped_state( + * self.name_context, 'start', metrics_container=self.metrics_container) # <<<<<<<<<<<<<< + * self.scoped_process_state = self.state_sampler.scoped_state( + * self.name_context, 'process', metrics_container=self.metrics_container) +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_self->name_context, __pyx_mstate_global->__pyx_n_u_start}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metrics_container, __pyx_v_self->metrics_container, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":447 + * + * self.state_sampler = state_sampler + * self.scoped_start_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'start', metrics_container=self.metrics_container) + * self.scoped_process_state = self.state_sampler.scoped_state( +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->scoped_start_state); + __Pyx_DECREF(__pyx_v_self->scoped_start_state); + __pyx_v_self->scoped_start_state = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":449 + * self.scoped_start_state = self.state_sampler.scoped_state( + * self.name_context, 'start', metrics_container=self.metrics_container) + * self.scoped_process_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'process', metrics_container=self.metrics_container) + * self.scoped_finish_state = self.state_sampler.scoped_state( +*/ + __pyx_t_4 = __pyx_v_self->state_sampler; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":450 + * self.name_context, 'start', metrics_container=self.metrics_container) + * self.scoped_process_state = self.state_sampler.scoped_state( + * self.name_context, 'process', metrics_container=self.metrics_container) # <<<<<<<<<<<<<< + * self.scoped_finish_state = self.state_sampler.scoped_state( + * self.name_context, 'finish', metrics_container=self.metrics_container) +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_self->name_context, __pyx_mstate_global->__pyx_n_u_process}; + __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metrics_container, __pyx_v_self->metrics_container, __pyx_t_1, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":449 + * self.scoped_start_state = self.state_sampler.scoped_state( + * self.name_context, 'start', metrics_container=self.metrics_container) + * self.scoped_process_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'process', metrics_container=self.metrics_container) + * self.scoped_finish_state = self.state_sampler.scoped_state( +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->scoped_process_state); + __Pyx_DECREF(__pyx_v_self->scoped_process_state); + __pyx_v_self->scoped_process_state = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":451 + * self.scoped_process_state = self.state_sampler.scoped_state( + * self.name_context, 'process', metrics_container=self.metrics_container) + * self.scoped_finish_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'finish', metrics_container=self.metrics_container) + * # TODO(ccy): the '-abort' state can be added when the abort is supported in +*/ + __pyx_t_1 = __pyx_v_self->state_sampler; + __Pyx_INCREF(__pyx_t_1); + + /* "apache_beam/runners/worker/operations.py":452 + * self.name_context, 'process', metrics_container=self.metrics_container) + * self.scoped_finish_state = self.state_sampler.scoped_state( + * self.name_context, 'finish', metrics_container=self.metrics_container) # <<<<<<<<<<<<<< + * # TODO(ccy): the '-abort' state can be added when the abort is supported in + * # Operations. +*/ + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_self->name_context, __pyx_mstate_global->__pyx_n_u_finish}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metrics_container, __pyx_v_self->metrics_container, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":451 + * self.scoped_process_state = self.state_sampler.scoped_state( + * self.name_context, 'process', metrics_container=self.metrics_container) + * self.scoped_finish_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, 'finish', metrics_container=self.metrics_container) + * # TODO(ccy): the '-abort' state can be added when the abort is supported in +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->scoped_finish_state); + __Pyx_DECREF(__pyx_v_self->scoped_finish_state); + __pyx_v_self->scoped_finish_state = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":455 + * # TODO(ccy): the '-abort' state can be added when the abort is supported in + * # Operations. + * self.receivers = [] # type: List[ConsumerSet] # <<<<<<<<<<<<<< + * # Legacy workers cannot call setup() until after setting additional state + * # on the operation. +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->receivers); + __Pyx_DECREF(__pyx_v_self->receivers); + __pyx_v_self->receivers = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":458 + * # Legacy workers cannot call setup() until after setting additional state + * # on the operation. + * self.setup_done = False # <<<<<<<<<<<<<< + * self.step_name = None # type: Optional[str] + * self.data_sampler: Optional[DataSampler] = None +*/ + __pyx_v_self->setup_done = 0; + + /* "apache_beam/runners/worker/operations.py":459 + * # on the operation. + * self.setup_done = False + * self.step_name = None # type: Optional[str] # <<<<<<<<<<<<<< + * self.data_sampler: Optional[DataSampler] = None + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = Py_None; + + /* "apache_beam/runners/worker/operations.py":460 + * self.setup_done = False + * self.step_name = None # type: Optional[str] + * self.data_sampler: Optional[DataSampler] = None # <<<<<<<<<<<<<< + * + * def setup(self, data_sampler=None): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->data_sampler); + __Pyx_DECREF(__pyx_v_self->data_sampler); + __pyx_v_self->data_sampler = Py_None; + + /* "apache_beam/runners/worker/operations.py":418 + * one or more receiver operations that will take that as input. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * name_context, # type: common.NameContext +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":462 + * self.data_sampler: Optional[DataSampler] = None + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup, "Set up operation.\n\n This must be called before any other methods of the operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3setup = {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 462, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 462, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setup", 0) < (0)) __PYX_ERR(0, 462, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 462, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_data_sampler = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 462, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_data_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":479 + * if getattr(self.spec, 'output_coders', None): + * + * def get_output_sampler(output_num): # <<<<<<<<<<<<<< + * if data_sampler is None: + * return None +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler = {"get_output_sampler", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_output_num = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_output_sampler (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_output_num,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 479, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 479, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_output_sampler", 0) < (0)) __PYX_ERR(0, 479, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_output_sampler", 1, 1, 1, i); __PYX_ERR(0, 479, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 479, __pyx_L3_error) + } + __pyx_v_output_num = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_output_sampler", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 479, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup.get_output_sampler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(__pyx_self, __pyx_v_output_num); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(PyObject *__pyx_self, PyObject *__pyx_v_output_num) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_output_sampler", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "apache_beam/runners/worker/operations.py":480 + * + * def get_output_sampler(output_num): + * if data_sampler is None: # <<<<<<<<<<<<<< + * return None + * return data_sampler.sampler_for_output(transform_id, output_num) +*/ + if (unlikely(!__pyx_cur_scope->__pyx_v_data_sampler)) { __Pyx_RaiseClosureNameError("data_sampler"); __PYX_ERR(0, 480, __pyx_L1_error) } + __pyx_t_1 = (__pyx_cur_scope->__pyx_v_data_sampler == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/runners/worker/operations.py":481 + * def get_output_sampler(output_num): + * if data_sampler is None: + * return None # <<<<<<<<<<<<<< + * return data_sampler.sampler_for_output(transform_id, output_num) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":480 + * + * def get_output_sampler(output_num): + * if data_sampler is None: # <<<<<<<<<<<<<< + * return None + * return data_sampler.sampler_for_output(transform_id, output_num) +*/ + } + + /* "apache_beam/runners/worker/operations.py":482 + * if data_sampler is None: + * return None + * return data_sampler.sampler_for_output(transform_id, output_num) # <<<<<<<<<<<<<< + * + * self.receivers = [ +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_data_sampler)) { __Pyx_RaiseClosureNameError("data_sampler"); __PYX_ERR(0, 482, __pyx_L1_error) } + __pyx_t_3 = __pyx_cur_scope->__pyx_v_data_sampler; + __Pyx_INCREF(__pyx_t_3); + if (unlikely(!__pyx_cur_scope->__pyx_v_transform_id)) { __Pyx_RaiseClosureNameError("transform_id"); __PYX_ERR(0, 482, __pyx_L1_error) } + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_transform_id, __pyx_v_output_num}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampler_for_output, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":479 + * if getattr(self.spec, 'output_coders', None): + * + * def get_output_sampler(output_num): # <<<<<<<<<<<<<< + * if data_sampler is None: + * return None +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup.get_output_sampler", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":462 + * self.data_sampler: Optional[DataSampler] = None + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_data_sampler) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *__pyx_cur_scope; + PyObject *__pyx_v_get_output_sampler = 0; + PyObject *__pyx_7genexpr__pyx_v_i = NULL; + PyObject *__pyx_7genexpr__pyx_v_coder = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; + PyObject *(*__pyx_t_14)(PyObject *); + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + int __pyx_t_20; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setup", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 462, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_data_sampler = __pyx_v_data_sampler; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data_sampler); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data_sampler); + + /* "apache_beam/runners/worker/operations.py":468 + * + * This must be called before any other methods of the operation.""" + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":469 + * This must be called before any other methods of the operation.""" + * with self.scoped_start_state: + * self.data_sampler = data_sampler # <<<<<<<<<<<<<< + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( + * logging.DEBUG) +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data_sampler); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data_sampler); + __Pyx_GOTREF(__pyx_v_self->data_sampler); + __Pyx_DECREF(__pyx_v_self->data_sampler); + __pyx_v_self->data_sampler = __pyx_cur_scope->__pyx_v_data_sampler; + + /* "apache_beam/runners/worker/operations.py":470 + * with self.scoped_start_state: + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( # <<<<<<<<<<<<<< + * logging.DEBUG) + * transform_id = self.name_context.transform_id +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":471 + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( + * logging.DEBUG) # <<<<<<<<<<<<<< + * transform_id = self.name_context.transform_id + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 471, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEBUG); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 471, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isEnabledFor, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":470 + * with self.scoped_start_state: + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( # <<<<<<<<<<<<<< + * logging.DEBUG) + * transform_id = self.name_context.transform_id +*/ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->debug_logging_enabled = __pyx_t_12; + + /* "apache_beam/runners/worker/operations.py":472 + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( + * logging.DEBUG) + * transform_id = self.name_context.transform_id # <<<<<<<<<<<<<< + * + * # Everything except WorkerSideInputSource, which is not a +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->name_context, __pyx_mstate_global->__pyx_n_u_transform_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_v_transform_id = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":477 + * # top-level operation, should have output_coders + * #TODO(pabloem): Define better what step name is used here. + * if getattr(self.spec, 'output_coders', None): # <<<<<<<<<<<<<< + * + * def get_output_sampler(output_num): +*/ + __pyx_t_2 = __pyx_v_self->spec; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_output_coders, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 477, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_12) { + + /* "apache_beam/runners/worker/operations.py":479 + * if getattr(self.spec, 'output_coders', None): + * + * def get_output_sampler(output_num): # <<<<<<<<<<<<<< + * if data_sampler is None: + * return None +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5setup_1get_output_sampler, 0, __pyx_mstate_global->__pyx_n_u_setup_locals_get_output_sampler, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_get_output_sampler = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":484 + * return data_sampler.sampler_for_output(transform_id, output_num) + * + * self.receivers = [ # <<<<<<<<<<<<<< + * ConsumerSet.create( + * self.counter_factory, +*/ + { /* enter inner scope */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/runners/worker/operations.py":494 + * self.get_output_batch_converter(), + * get_output_sampler(i)) + * for i, coder in enumerate(self.spec.output_coders) # <<<<<<<<<<<<<< + * ] + * self.setup_done = True +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->spec, __pyx_mstate_global->__pyx_n_u_output_coders); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_9); + if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { + __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4); + __pyx_t_13 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 494, __pyx_L16_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 494, __pyx_L16_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_13; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 494, __pyx_L16_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13)); + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_13); + #endif + ++__pyx_t_13; + } + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L16_error) + } else { + __pyx_t_9 = __pyx_t_14(__pyx_t_4); + if (unlikely(!__pyx_t_9)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 494, __pyx_L16_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_coder, __pyx_t_9); + __pyx_t_9 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_i, __pyx_t_2); + __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_9; + __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":485 + * + * self.receivers = [ + * ConsumerSet.create( # <<<<<<<<<<<<<< + * self.counter_factory, + * self.name_context.logging_name(), +*/ + __pyx_t_11 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + __Pyx_INCREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":487 + * ConsumerSet.create( + * self.counter_factory, + * self.name_context.logging_name(), # <<<<<<<<<<<<<< + * i, + * self.consumers[i], +*/ + __pyx_t_15 = __pyx_v_self->name_context; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 487, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_10); + } + + /* "apache_beam/runners/worker/operations.py":489 + * self.name_context.logging_name(), + * i, + * self.consumers[i], # <<<<<<<<<<<<<< + * coder, + * self._get_runtime_performance_hints(), +*/ + __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 489, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_15); + + /* "apache_beam/runners/worker/operations.py":491 + * self.consumers[i], + * coder, + * self._get_runtime_performance_hints(), # <<<<<<<<<<<<<< + * self.get_output_batch_converter(), + * get_output_sampler(i)) +*/ + __pyx_t_17 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_17); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL}; + __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_runtime_performance_hints, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 491, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_16); + } + + /* "apache_beam/runners/worker/operations.py":492 + * coder, + * self._get_runtime_performance_hints(), + * self.get_output_batch_converter(), # <<<<<<<<<<<<<< + * get_output_sampler(i)) + * for i, coder in enumerate(self.spec.output_coders) +*/ + __pyx_t_18 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_18); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_18, NULL}; + __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_output_batch_converter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 492, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_17); + } + + /* "apache_beam/runners/worker/operations.py":493 + * self._get_runtime_performance_hints(), + * self.get_output_batch_converter(), + * get_output_sampler(i)) # <<<<<<<<<<<<<< + * for i, coder in enumerate(self.spec.output_coders) + * ] +*/ + __pyx_t_18 = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_5setup_get_output_sampler(__pyx_v_get_output_sampler, __pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 493, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[9] = {__pyx_t_11, __pyx_v_self->counter_factory, __pyx_t_10, __pyx_7genexpr__pyx_v_i, __pyx_t_15, __pyx_7genexpr__pyx_v_coder, __pyx_t_16, __pyx_t_17, __pyx_t_18}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 485, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 484, __pyx_L16_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":494 + * self.get_output_batch_converter(), + * get_output_sampler(i)) + * for i, coder in enumerate(self.spec.output_coders) # <<<<<<<<<<<<<< + * ] + * self.setup_done = True +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder); __pyx_7genexpr__pyx_v_coder = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0; + goto __pyx_L20_exit_scope; + __pyx_L16_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder); __pyx_7genexpr__pyx_v_coder = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0; + goto __pyx_L7_error; + __pyx_L20_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/runners/worker/operations.py":484 + * return data_sampler.sampler_for_output(transform_id, output_num) + * + * self.receivers = [ # <<<<<<<<<<<<<< + * ConsumerSet.create( + * self.counter_factory, +*/ + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->receivers); + __Pyx_DECREF(__pyx_v_self->receivers); + __pyx_v_self->receivers = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":477 + * # top-level operation, should have output_coders + * #TODO(pabloem): Define better what step name is used here. + * if getattr(self.spec, 'output_coders', None): # <<<<<<<<<<<<<< + * + * def get_output_sampler(output_num): +*/ + } + + /* "apache_beam/runners/worker/operations.py":468 + * + * This must be called before any other methods of the operation.""" + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 468, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 468, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_19); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (__pyx_t_12 < (0)) __PYX_ERR(0, 468, __pyx_L9_except_error) + __pyx_t_20 = (!__pyx_t_12); + if (unlikely(__pyx_t_20)) { + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_4); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 468, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L24; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L24:; + } + + /* "apache_beam/runners/worker/operations.py":496 + * for i, coder in enumerate(self.spec.output_coders) + * ] + * self.setup_done = True # <<<<<<<<<<<<<< + * + * def start(self): +*/ + __pyx_v_self->setup_done = 1; + + /* "apache_beam/runners/worker/operations.py":462 + * self.data_sampler: Optional[DataSampler] = None + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_get_output_sampler); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_coder); + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":498 + * self.setup_done = True + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":502 + * + * """Start operation.""" + * if not self.setup_done: # <<<<<<<<<<<<<< + * # For legacy workers. + * self.setup(self.data_sampler) +*/ + __pyx_t_6 = (!__pyx_v_self->setup_done); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":504 + * if not self.setup_done: + * # For legacy workers. + * self.setup(self.data_sampler) # <<<<<<<<<<<<<< + * + * # The ExecutionContext is per instruction and so cannot be set at +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->data_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":502 + * + * """Start operation.""" + * if not self.setup_done: # <<<<<<<<<<<<<< + * # For legacy workers. + * self.setup(self.data_sampler) +*/ + } + + /* "apache_beam/runners/worker/operations.py":508 + * # The ExecutionContext is per instruction and so cannot be set at + * # initialization time. + * if self.data_sampler is not None: # <<<<<<<<<<<<<< + * for receiver in self.receivers: + * receiver.execution_context = self.execution_context +*/ + __pyx_t_6 = (__pyx_v_self->data_sampler != Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":509 + * # initialization time. + * if self.data_sampler is not None: + * for receiver in self.receivers: # <<<<<<<<<<<<<< + * receiver.execution_context = self.execution_context + * +*/ + if (unlikely(__pyx_v_self->receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 509, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 509, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":510 + * if self.data_sampler is not None: + * for receiver in self.receivers: + * receiver.execution_context = self.execution_context # <<<<<<<<<<<<<< + * + * def get_batching_preference(self): +*/ + __pyx_t_2 = __pyx_v_self->execution_context; + __Pyx_INCREF(__pyx_t_2); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_execution_context, __pyx_t_2) < (0)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":509 + * # initialization time. + * if self.data_sampler is not None: + * for receiver in self.receivers: # <<<<<<<<<<<<<< + * receiver.execution_context = self.execution_context + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":508 + * # The ExecutionContext is per instruction and so cannot be set at + * # initialization time. + * if self.data_sampler is not None: # <<<<<<<<<<<<<< + * for receiver in self.receivers: + * receiver.execution_context = self.execution_context +*/ + } + + /* "apache_beam/runners/worker/operations.py":498 + * self.setup_done = True + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4start, "Start operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_4start}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_5start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":512 + * receiver.execution_context = self.execution_context + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * # By default operations don't support batching, require Receiver to unbatch + * return common.BatchingPreference.BATCH_FORBIDDEN +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference = {"get_batching_preference", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_batching_preference (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_batching_preference", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_batching_preference", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_6get_batching_preference(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_batching_preference", 0); + + /* "apache_beam/runners/worker/operations.py":514 + * def get_batching_preference(self): + * # By default operations don't support batching, require Receiver to unbatch + * return common.BatchingPreference.BATCH_FORBIDDEN # <<<<<<<<<<<<<< + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_BatchingPreference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":512 + * receiver.execution_context = self.execution_context + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * # By default operations don't support batching, require Receiver to unbatch + * return common.BatchingPreference.BATCH_FORBIDDEN +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.get_batching_preference", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":516 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can accept a batch, + * otherwise None.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter, "Returns a batch type converter if this operation can accept a batch,\n otherwise None."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter = {"get_input_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_input_batch_converter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_input_batch_converter", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_input_batch_converter", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_input_batch_converter", 0); + + /* "apache_beam/runners/worker/operations.py":519 + * """Returns a batch type converter if this operation can accept a batch, + * otherwise None.""" + * return None # <<<<<<<<<<<<<< + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":516 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can accept a batch, + * otherwise None.""" +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":521 + * return None + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can produce a batch, + * otherwise None.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter, "Returns a batch type converter if this operation can produce a batch,\n otherwise None."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter = {"get_output_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_output_batch_converter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_output_batch_converter", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_output_batch_converter", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_output_batch_converter", 0); + + /* "apache_beam/runners/worker/operations.py":524 + * """Returns a batch type converter if this operation can produce a batch, + * otherwise None.""" + * return None # <<<<<<<<<<<<<< + * + * def process(self, o): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":521 + * return None + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can produce a batch, + * otherwise None.""" +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":526 + * return None + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_o)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":529 + * # type: (WindowedValue) -> None + * + * """Process element in operation.""" # <<<<<<<<<<<<<< + * pass + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":526 + * return None + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_12process, "Process element in operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_12process}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 526, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 526, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 526, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error) + } + __pyx_v_o = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 526, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_o); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":532 + * pass + * + * def process_batch(self, batch: WindowedBatch): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch = {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 532, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_batch", 0) < (0)) __PYX_ERR(0, 532, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, i); __PYX_ERR(0, 532, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) + } + __pyx_v_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 532, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 0, "batch", 0))) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14process_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14process_batch(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_batch", 0); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":535 + * pass + * + * def finalize_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * pass +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle = {"finalize_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_bundle (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize_bundle", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize_bundle", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_16finalize_bundle(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_bundle", 0); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":539 + * pass + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * return False + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization = {"needs_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("needs_finalization (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("needs_finalization", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("needs_finalization", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18needs_finalization(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("needs_finalization", 0); + + /* "apache_beam/runners/worker/operations.py":540 + * + * def needs_finalization(self): + * return False # <<<<<<<<<<<<<< + * + * def try_split(self, fraction_of_remainder): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":539 + * pass + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * return False + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":542 + * return False + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return None +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction_of_remainder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 542, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 542, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 542, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 542, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 542, __pyx_L3_error) + } + __pyx_v_fraction_of_remainder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 542, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_fraction_of_remainder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20try_split(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_fraction_of_remainder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/worker/operations.py":544 + * def try_split(self, fraction_of_remainder): + * # type: (...) -> Optional[Any] + * return None # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":542 + * return False + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return None +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":546 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_22current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_22current_element_progress(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/worker/operations.py":547 + * + * def current_element_progress(self): + * return None # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":546 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return None + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":549 + * return None + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":553 + * + * """Finish operation.""" + * for receiver in self.receivers: # <<<<<<<<<<<<<< + * _cast_to_receiver(receiver).flush() + * +*/ + if (unlikely(__pyx_v_self->receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 553, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 553, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":554 + * """Finish operation.""" + * for receiver in self.receivers: + * _cast_to_receiver(receiver).flush() # <<<<<<<<<<<<<< + * + * def teardown(self): +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cast_to_receiver); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_receiver}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":553 + * + * """Finish operation.""" + * for receiver in self.receivers: # <<<<<<<<<<<<<< + * _cast_to_receiver(receiver).flush() + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":549 + * return None + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_24finish, "Finish operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_25finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_24finish}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_25finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_24finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_24finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":556 + * _cast_to_receiver(receiver).flush() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":559 + * # type: () -> None + * + * """Tear down operation. # <<<<<<<<<<<<<< + * + * No other methods of this operation should be called after this.""" +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":556 + * _cast_to_receiver(receiver).flush() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_26teardown, "Tear down operation.\n\n No other methods of this operation should be called after this."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_27teardown = {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_26teardown}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_27teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_26teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_26teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":564 + * pass + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.metrics_container.reset() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_29reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_28reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/runners/worker/operations.py":566 + * def reset(self): + * # type: () -> None + * self.metrics_container.reset() # <<<<<<<<<<<<<< + * + * def output(self, windowed_value, output_index=0): +*/ + __pyx_t_2 = __pyx_v_self->metrics_container; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":564 + * pass + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.metrics_container.reset() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":568 + * self.metrics_container.reset() + * + * def output(self, windowed_value, output_index=0): # <<<<<<<<<<<<<< + * # type: (WindowedValue, int) -> None + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args) { + int __pyx_v_output_index = ((int)0); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("output", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_output_index = __pyx_optional_args->output_index; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_output_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_windowed_value), __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":570 + * def output(self, windowed_value, output_index=0): + * # type: (WindowedValue, int) -> None + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) # <<<<<<<<<<<<<< + * + * def add_receiver(self, operation, output_index=0): +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cast_to_receiver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_self->receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 570, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, __pyx_v_output_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_receive, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":568 + * self.metrics_container.reset() + * + * def output(self, windowed_value, output_index=0): # <<<<<<<<<<<<<< + * # type: (WindowedValue, int) -> None + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_31output = {"output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_31output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + int __pyx_v_output_index; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_value,&__pyx_mstate_global->__pyx_n_u_output_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 568, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 568, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 568, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "output", 0) < (0)) __PYX_ERR(0, 568, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("output", 0, 1, 2, i); __PYX_ERR(0, 568, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 568, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 568, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + if (values[1]) { + __pyx_v_output_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_output_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 568, __pyx_L3_error) + } else { + __pyx_v_output_index = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("output", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 568, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "windowed_value", 0))) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, __pyx_v_output_index); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_30output(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value, int __pyx_v_output_index) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("output", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.output_index = __pyx_v_output_index; + __pyx_t_1 = __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation->output(__pyx_v_self, __pyx_v_windowed_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":572 + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) + * + * def add_receiver(self, operation, output_index=0): # <<<<<<<<<<<<<< + * # type: (Operation, int) -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver, "Adds a receiver operation for the specified output."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver = {"add_receiver", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_operation = 0; + PyObject *__pyx_v_output_index = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_receiver (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_operation,&__pyx_mstate_global->__pyx_n_u_output_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 572, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 572, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 572, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_receiver", 0) < (0)) __PYX_ERR(0, 572, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_receiver", 0, 1, 2, i); __PYX_ERR(0, 572, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 572, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 572, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + } + __pyx_v_operation = values[0]; + __pyx_v_output_index = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_receiver", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 572, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.add_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_operation, __pyx_v_output_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_operation, PyObject *__pyx_v_output_index) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_receiver", 0); + + /* "apache_beam/runners/worker/operations.py":576 + * + * """Adds a receiver operation for the specified output.""" + * self.consumers[output_index].append(operation) # <<<<<<<<<<<<<< + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): +*/ + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->consumers, __pyx_v_output_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_operation); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 576, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":572 + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) + * + * def add_receiver(self, operation, output_index=0): # <<<<<<<<<<<<<< + * # type: (Operation, int) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.add_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":578 + * self.consumers[output_index].append(operation) + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) { + PyObject *__pyx_v_all_monitoring_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":582 + * + * """Returns the list of MonitoringInfos collected by this operation.""" + * all_monitoring_infos = self.execution_time_monitoring_infos(transform_id) # <<<<<<<<<<<<<< + * all_monitoring_infos.update( + * self.pcollection_count_monitoring_infos(tag_to_pcollection_id)) +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->execution_time_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_all_monitoring_infos = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":583 + * """Returns the list of MonitoringInfos collected by this operation.""" + * all_monitoring_infos = self.execution_time_monitoring_infos(transform_id) + * all_monitoring_infos.update( # <<<<<<<<<<<<<< + * self.pcollection_count_monitoring_infos(tag_to_pcollection_id)) + * all_monitoring_infos.update(self.user_monitoring_infos(transform_id)) +*/ + __pyx_t_2 = __pyx_v_all_monitoring_infos; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":584 + * all_monitoring_infos = self.execution_time_monitoring_infos(transform_id) + * all_monitoring_infos.update( + * self.pcollection_count_monitoring_infos(tag_to_pcollection_id)) # <<<<<<<<<<<<<< + * all_monitoring_infos.update(self.user_monitoring_infos(transform_id)) + * return all_monitoring_infos +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":585 + * all_monitoring_infos.update( + * self.pcollection_count_monitoring_infos(tag_to_pcollection_id)) + * all_monitoring_infos.update(self.user_monitoring_infos(transform_id)) # <<<<<<<<<<<<<< + * return all_monitoring_infos + * +*/ + __pyx_t_4 = __pyx_v_all_monitoring_infos; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self->__pyx_vtab)->user_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":586 + * self.pcollection_count_monitoring_infos(tag_to_pcollection_id)) + * all_monitoring_infos.update(self.user_monitoring_infos(transform_id)) + * return all_monitoring_infos # <<<<<<<<<<<<<< + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_all_monitoring_infos); + __pyx_r = __pyx_v_all_monitoring_infos; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":578 + * self.consumers[output_index].append(operation) + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_all_monitoring_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos, "Returns the list of MonitoringInfos collected by this operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos = {"monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_transform_id = 0; + PyObject *__pyx_v_tag_to_pcollection_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_transform_id,&__pyx_mstate_global->__pyx_n_u_tag_to_pcollection_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 578, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 578, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 578, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "monitoring_infos", 0) < (0)) __PYX_ERR(0, 578, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, i); __PYX_ERR(0, 578, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 578, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 578, __pyx_L3_error) + } + __pyx_v_transform_id = values[0]; + __pyx_v_tag_to_pcollection_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 578, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_34monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":588 + * return all_monitoring_infos + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) { + PyObject *__pyx_v_all_monitoring_infos = NULL; + PyObject *__pyx_v_pcollection_id = NULL; + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_v_elem_count_mi = NULL; + CYTHON_UNUSED PyObject *__pyx_v_unused_mean = NULL; + PyObject *__pyx_v_sum = NULL; + PyObject *__pyx_v_count = NULL; + PyObject *__pyx_v_min = NULL; + PyObject *__pyx_v_max = NULL; + PyObject *__pyx_v_sampled_byte_count = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pcollection_count_monitoring_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tag_to_pcollection_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":596 + * # since there is no way to provide a mapping from tag to pcollection id + * # within Operation. + * if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1: # <<<<<<<<<<<<<< + * return {} + * +*/ + __pyx_t_1 = __pyx_v_self->receivers; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 596, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 596, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = (__pyx_t_7 != 1); + if (!__pyx_t_8) { + } else { + __pyx_t_6 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_7 = PyObject_Length(__pyx_v_tag_to_pcollection_id); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_t_8 = (__pyx_t_7 != 1); + __pyx_t_6 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":597 + * # within Operation. + * if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1: + * return {} # <<<<<<<<<<<<<< + * + * all_monitoring_infos = {} +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":596 + * # since there is no way to provide a mapping from tag to pcollection id + * # within Operation. + * if len(self.receivers) != 1 or len(tag_to_pcollection_id) != 1: # <<<<<<<<<<<<<< + * return {} + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":599 + * return {} + * + * all_monitoring_infos = {} # <<<<<<<<<<<<<< + * pcollection_id = next(iter(tag_to_pcollection_id.values())) + * receiver = self.receivers[0] +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_all_monitoring_infos = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":600 + * + * all_monitoring_infos = {} + * pcollection_id = next(iter(tag_to_pcollection_id.values())) # <<<<<<<<<<<<<< + * receiver = self.receivers[0] + * elem_count_mi = monitoring_infos.int64_counter( +*/ + __pyx_t_2 = __pyx_v_tag_to_pcollection_id; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pcollection_id = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":601 + * all_monitoring_infos = {} + * pcollection_id = next(iter(tag_to_pcollection_id.values())) + * receiver = self.receivers[0] # <<<<<<<<<<<<<< + * elem_count_mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, +*/ + if (unlikely(__pyx_v_self->receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 601, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->receivers, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_receiver = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":602 + * pcollection_id = next(iter(tag_to_pcollection_id.values())) + * receiver = self.receivers[0] + * elem_count_mi = monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":603 + * receiver = self.receivers[0] + * elem_count_mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, # <<<<<<<<<<<<<< + * receiver.opcounter.element_counter.value(), + * pcollection=pcollection_id, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ELEMENT_COUNT_URN); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":604 + * elem_count_mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), # <<<<<<<<<<<<<< + * pcollection=pcollection_id, + * ) +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_element_counter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_10 = __pyx_t_12; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":605 + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), + * pcollection=pcollection_id, # <<<<<<<<<<<<<< + * ) + * +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_9, __pyx_t_4}; + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_pcollection, __pyx_v_pcollection_id, __pyx_t_12, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_elem_count_mi = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":609 + * + * (unused_mean, sum, count, min, max) = ( + * receiver.opcounter.mean_byte_counter.value()) # <<<<<<<<<<<<<< + * + * sampled_byte_count = monitoring_infos.int64_distribution( +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_mean_byte_counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 608, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_12); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 4); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_12,&__pyx_t_9,&__pyx_t_2}; + for (i=0; i < 5; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_12,&__pyx_t_9,&__pyx_t_2}; + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_13(__pyx_t_10); if (unlikely(!item)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_10), 5) < (0)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_13 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_13 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + + /* "apache_beam/runners/worker/operations.py":608 + * ) + * + * (unused_mean, sum, count, min, max) = ( # <<<<<<<<<<<<<< + * receiver.opcounter.mean_byte_counter.value()) + * +*/ + __pyx_v_unused_mean = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_sum = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_count = __pyx_t_12; + __pyx_t_12 = 0; + __pyx_v_min = __pyx_t_9; + __pyx_t_9 = 0; + __pyx_v_max = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":611 + * receiver.opcounter.mean_byte_counter.value()) + * + * sampled_byte_count = monitoring_infos.int64_distribution( # <<<<<<<<<<<<<< + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_int64_distribution); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":612 + * + * sampled_byte_count = monitoring_infos.int64_distribution( + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, # <<<<<<<<<<<<<< + * DistributionData(sum, count, min, max), + * pcollection=pcollection_id, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SAMPLED_BYTE_SIZE_URN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":613 + * sampled_byte_count = monitoring_infos.int64_distribution( + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), # <<<<<<<<<<<<<< + * pcollection=pcollection_id, + * ) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_DistributionData); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + + /* "apache_beam/runners/worker/operations.py":614 + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), + * pcollection=pcollection_id, # <<<<<<<<<<<<<< + * ) + * all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3, __pyx_t_9}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_pcollection, __pyx_v_pcollection_id, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_sampled_byte_count = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":616 + * pcollection=pcollection_id, + * ) + * all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi # <<<<<<<<<<<<<< + * all_monitoring_infos[monitoring_infos.to_key( + * sampled_byte_count)] = sampled_byte_count +*/ + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_12); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_elem_count_mi}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely((PyDict_SetItem(__pyx_v_all_monitoring_infos, __pyx_t_1, __pyx_v_elem_count_mi) < 0))) __PYX_ERR(0, 616, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":617 + * ) + * all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi + * all_monitoring_infos[monitoring_infos.to_key( # <<<<<<<<<<<<<< + * sampled_byte_count)] = sampled_byte_count + * +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":618 + * all_monitoring_infos[monitoring_infos.to_key(elem_count_mi)] = elem_count_mi + * all_monitoring_infos[monitoring_infos.to_key( + * sampled_byte_count)] = sampled_byte_count # <<<<<<<<<<<<<< + * + * return all_monitoring_infos +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_sampled_byte_count}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely((PyDict_SetItem(__pyx_v_all_monitoring_infos, __pyx_t_1, __pyx_v_sampled_byte_count) < 0))) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":620 + * sampled_byte_count)] = sampled_byte_count + * + * return all_monitoring_infos # <<<<<<<<<<<<<< + * + * def user_monitoring_infos(self, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_all_monitoring_infos); + __pyx_r = __pyx_v_all_monitoring_infos; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":588 + * return all_monitoring_infos + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_all_monitoring_infos); + __Pyx_XDECREF(__pyx_v_pcollection_id); + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XDECREF(__pyx_v_elem_count_mi); + __Pyx_XDECREF(__pyx_v_unused_mean); + __Pyx_XDECREF(__pyx_v_sum); + __Pyx_XDECREF(__pyx_v_count); + __Pyx_XDECREF(__pyx_v_min); + __Pyx_XDECREF(__pyx_v_max); + __Pyx_XDECREF(__pyx_v_sampled_byte_count); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos, "Returns the element count MonitoringInfo collected by this operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos = {"pcollection_count_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_tag_to_pcollection_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tag_to_pcollection_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 588, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 588, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pcollection_count_monitoring_infos", 0) < (0)) __PYX_ERR(0, 588, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pcollection_count_monitoring_infos", 1, 1, 1, i); __PYX_ERR(0, 588, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 588, __pyx_L3_error) + } + __pyx_v_tag_to_pcollection_id = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("pcollection_count_monitoring_infos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 588, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_tag_to_pcollection_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_36pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":622 + * return all_monitoring_infos + * + * def user_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("user_monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_user_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_transform_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":626 + * + * """Returns the user MonitoringInfos collected by this operation.""" + * return self.metrics_container.to_runner_api_monitoring_infos(transform_id) # <<<<<<<<<<<<<< + * + * def execution_time_monitoring_infos(self, transform_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->metrics_container; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_transform_id}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_runner_api_monitoring_infos, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":622 + * return all_monitoring_infos + * + * def user_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.user_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos, "Returns the user MonitoringInfos collected by this operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos = {"user_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("user_monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 622, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 622, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "user_monitoring_infos", 0) < (0)) __PYX_ERR(0, 622, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("user_monitoring_infos", 1, 1, 1, i); __PYX_ERR(0, 622, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 622, __pyx_L3_error) + } + __pyx_v_transform_id = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("user_monitoring_infos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 622, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.user_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_38user_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("user_monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.user_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":628 + * return self.metrics_container.to_runner_api_monitoring_infos(transform_id) + * + * def execution_time_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * total_time_spent_msecs = ( +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id, int __pyx_skip_dispatch) { + PyObject *__pyx_v_total_time_spent_msecs = NULL; + PyObject *__pyx_v_mis = NULL; + PyObject *__pyx_8genexpr1__pyx_v_mi = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("execution_time_monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_execution_time_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_transform_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":631 + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * total_time_spent_msecs = ( + * self.scoped_start_state.sampled_msecs_int() + # <<<<<<<<<<<<<< + * self.scoped_process_state.sampled_msecs_int() + + * self.scoped_finish_state.sampled_msecs_int()) +*/ + __pyx_t_2 = __pyx_v_self->scoped_start_state; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":632 + * total_time_spent_msecs = ( + * self.scoped_start_state.sampled_msecs_int() + + * self.scoped_process_state.sampled_msecs_int() + # <<<<<<<<<<<<<< + * self.scoped_finish_state.sampled_msecs_int()) + * mis = [ +*/ + __pyx_t_4 = __pyx_v_self->scoped_process_state; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":631 + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * total_time_spent_msecs = ( + * self.scoped_start_state.sampled_msecs_int() + # <<<<<<<<<<<<<< + * self.scoped_process_state.sampled_msecs_int() + + * self.scoped_finish_state.sampled_msecs_int()) +*/ + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":633 + * self.scoped_start_state.sampled_msecs_int() + + * self.scoped_process_state.sampled_msecs_int() + + * self.scoped_finish_state.sampled_msecs_int()) # <<<<<<<<<<<<<< + * mis = [ + * monitoring_infos.int64_counter( +*/ + __pyx_t_1 = __pyx_v_self->scoped_finish_state; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":632 + * total_time_spent_msecs = ( + * self.scoped_start_state.sampled_msecs_int() + + * self.scoped_process_state.sampled_msecs_int() + # <<<<<<<<<<<<<< + * self.scoped_finish_state.sampled_msecs_int()) + * mis = [ +*/ + __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_total_time_spent_msecs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":635 + * self.scoped_finish_state.sampled_msecs_int()) + * mis = [ + * monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.START_BUNDLE_MSECS_URN, + * self.scoped_start_state.sampled_msecs_int(), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":636 + * mis = [ + * monitoring_infos.int64_counter( + * monitoring_infos.START_BUNDLE_MSECS_URN, # <<<<<<<<<<<<<< + * self.scoped_start_state.sampled_msecs_int(), + * ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_START_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":637 + * monitoring_infos.int64_counter( + * monitoring_infos.START_BUNDLE_MSECS_URN, + * self.scoped_start_state.sampled_msecs_int(), # <<<<<<<<<<<<<< + * ptransform=transform_id), + * monitoring_infos.int64_counter( +*/ + __pyx_t_7 = __pyx_v_self->scoped_start_state; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":638 + * monitoring_infos.START_BUNDLE_MSECS_URN, + * self.scoped_start_state.sampled_msecs_int(), + * ptransform=transform_id), # <<<<<<<<<<<<<< + * monitoring_infos.int64_counter( + * monitoring_infos.PROCESS_BUNDLE_MSECS_URN, +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_6, __pyx_t_4}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_7, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":639 + * self.scoped_start_state.sampled_msecs_int(), + * ptransform=transform_id), + * monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.PROCESS_BUNDLE_MSECS_URN, + * self.scoped_process_state.sampled_msecs_int(), +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":640 + * ptransform=transform_id), + * monitoring_infos.int64_counter( + * monitoring_infos.PROCESS_BUNDLE_MSECS_URN, # <<<<<<<<<<<<<< + * self.scoped_process_state.sampled_msecs_int(), + * ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PROCESS_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":641 + * monitoring_infos.int64_counter( + * monitoring_infos.PROCESS_BUNDLE_MSECS_URN, + * self.scoped_process_state.sampled_msecs_int(), # <<<<<<<<<<<<<< + * ptransform=transform_id), + * monitoring_infos.int64_counter( +*/ + __pyx_t_8 = __pyx_v_self->scoped_process_state; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":642 + * monitoring_infos.PROCESS_BUNDLE_MSECS_URN, + * self.scoped_process_state.sampled_msecs_int(), + * ptransform=transform_id), # <<<<<<<<<<<<<< + * monitoring_infos.int64_counter( + * monitoring_infos.FINISH_BUNDLE_MSECS_URN, +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_2, __pyx_t_4}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_8, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/runners/worker/operations.py":643 + * self.scoped_process_state.sampled_msecs_int(), + * ptransform=transform_id), + * monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.FINISH_BUNDLE_MSECS_URN, + * self.scoped_finish_state.sampled_msecs_int(), +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":644 + * ptransform=transform_id), + * monitoring_infos.int64_counter( + * monitoring_infos.FINISH_BUNDLE_MSECS_URN, # <<<<<<<<<<<<<< + * self.scoped_finish_state.sampled_msecs_int(), + * ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FINISH_BUNDLE_MSECS_URN); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":645 + * monitoring_infos.int64_counter( + * monitoring_infos.FINISH_BUNDLE_MSECS_URN, + * self.scoped_finish_state.sampled_msecs_int(), # <<<<<<<<<<<<<< + * ptransform=transform_id), + * monitoring_infos.int64_counter( +*/ + __pyx_t_9 = __pyx_v_self->scoped_finish_state; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":646 + * monitoring_infos.FINISH_BUNDLE_MSECS_URN, + * self.scoped_finish_state.sampled_msecs_int(), + * ptransform=transform_id), # <<<<<<<<<<<<<< + * monitoring_infos.int64_counter( + * monitoring_infos.TOTAL_MSECS_URN, +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_7, __pyx_t_4}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_9, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + + /* "apache_beam/runners/worker/operations.py":647 + * self.scoped_finish_state.sampled_msecs_int(), + * ptransform=transform_id), + * monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.TOTAL_MSECS_URN, + * total_time_spent_msecs, +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":648 + * ptransform=transform_id), + * monitoring_infos.int64_counter( + * monitoring_infos.TOTAL_MSECS_URN, # <<<<<<<<<<<<<< + * total_time_spent_msecs, + * ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TOTAL_MSECS_URN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":650 + * monitoring_infos.TOTAL_MSECS_URN, + * total_time_spent_msecs, + * ptransform=transform_id), # <<<<<<<<<<<<<< + * ] + * return {monitoring_infos.to_key(mi): mi for mi in mis} +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_t_8, __pyx_v_total_time_spent_msecs}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":634 + * self.scoped_process_state.sampled_msecs_int() + + * self.scoped_finish_state.sampled_msecs_int()) + * mis = [ # <<<<<<<<<<<<<< + * monitoring_infos.int64_counter( + * monitoring_infos.START_BUNDLE_MSECS_URN, +*/ + __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 634, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 634, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 634, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_2) != (0)) __PYX_ERR(0, 634, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_t_2 = 0; + __pyx_v_mis = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":652 + * ptransform=transform_id), + * ] + * return {monitoring_infos.to_key(mi): mi for mi in mis} # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __pyx_v_mis; __Pyx_INCREF(__pyx_t_2); + __pyx_t_10 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 652, __pyx_L5_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_10; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_mi, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_8genexpr1__pyx_v_mi}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (unlikely(PyDict_SetItem(__pyx_t_7, (PyObject*)__pyx_t_6, (PyObject*)__pyx_8genexpr1__pyx_v_mi))) __PYX_ERR(0, 652, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi); __pyx_8genexpr1__pyx_v_mi = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi); __pyx_8genexpr1__pyx_v_mi = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":628 + * return self.metrics_container.to_runner_api_monitoring_infos(transform_id) + * + * def execution_time_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * total_time_spent_msecs = ( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_time_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_total_time_spent_msecs); + __Pyx_XDECREF(__pyx_v_mis); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_mi); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos = {"execution_time_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_transform_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("execution_time_monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_transform_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 628, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 628, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execution_time_monitoring_infos", 0) < (0)) __PYX_ERR(0, 628, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execution_time_monitoring_infos", 1, 1, 1, i); __PYX_ERR(0, 628, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 628, __pyx_L3_error) + } + __pyx_v_transform_id = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("execution_time_monitoring_infos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 628, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_time_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_transform_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_40execution_time_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_transform_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("execution_time_monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.execution_time_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":654 + * return {monitoring_infos.to_key(mi): mi for mi in mis} + * + * def __str__(self): # <<<<<<<<<<<<<< + * """Generates a useful string for this object. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__(PyObject *__pyx_v_self); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_42__str__, "Generates a useful string for this object.\n\n Compactly displays interesting fields. In particular, pickled\n fields are not displayed. Note that we collapse the fields of the\n contained Worker* object into this object, since there is a 1-1\n mapping between Operation and operation_specs.Worker*.\n\n Returns:\n Compact string representing this object.\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__; +#endif +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_42__str__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/runners/worker/operations.py":665 + * Compact string representing this object. + * """ + * return self.str_internal() # <<<<<<<<<<<<<< + * + * def str_internal(self, is_recursive=False): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str_internal, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":654 + * return {monitoring_infos.to_key(mi): mi for mi in mis} + * + * def __str__(self): # <<<<<<<<<<<<<< + * """Generates a useful string for this object. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":667 + * return self.str_internal() + * + * def str_internal(self, is_recursive=False): # <<<<<<<<<<<<<< + * """Internal helper for __str__ that supports recursion. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal, "Internal helper for __str__ that supports recursion.\n\n When recursing on receivers, keep the output short.\n Args:\n is_recursive: whether to omit some details, particularly receivers.\n Returns:\n Compact string representing this object.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal = {"str_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_is_recursive = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("str_internal (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_is_recursive,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 667, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "str_internal", 0) < (0)) __PYX_ERR(0, 667, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_is_recursive = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("str_internal", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 667, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_is_recursive); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_is_recursive) { + PyObject *__pyx_v_printable_name = NULL; + PyObject *__pyx_v_printable_fields = NULL; + PyObject *__pyx_8genexpr2__pyx_v_receiver = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("str_internal", 0); + + /* "apache_beam/runners/worker/operations.py":676 + * Compact string representing this object. + * """ + * printable_name = self.__class__.__name__ # <<<<<<<<<<<<<< + * if hasattr(self, 'step_name'): + * printable_name += ' %s' % self.name_context.logging_name() +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_printable_name = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":677 + * """ + * printable_name = self.__class__.__name__ + * if hasattr(self, 'step_name'): # <<<<<<<<<<<<<< + * printable_name += ' %s' % self.name_context.logging_name() + * if is_recursive: +*/ + __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 677, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/worker/operations.py":678 + * printable_name = self.__class__.__name__ + * if hasattr(self, 'step_name'): + * printable_name += ' %s' % self.name_context.logging_name() # <<<<<<<<<<<<<< + * if is_recursive: + * # If we have a step name, stop here, no more detail needed. +*/ + __pyx_t_1 = __pyx_v_self->name_context; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_printable_name, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_printable_name, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":679 + * if hasattr(self, 'step_name'): + * printable_name += ' %s' % self.name_context.logging_name() + * if is_recursive: # <<<<<<<<<<<<<< + * # If we have a step name, stop here, no more detail needed. + * return '<%s>' % printable_name +*/ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_is_recursive); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 679, __pyx_L1_error) + if (__pyx_t_3) { + + /* "apache_beam/runners/worker/operations.py":681 + * if is_recursive: + * # If we have a step name, stop here, no more detail needed. + * return '<%s>' % printable_name # <<<<<<<<<<<<<< + * + * if self.spec is None: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_s_2, __pyx_v_printable_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":679 + * if hasattr(self, 'step_name'): + * printable_name += ' %s' % self.name_context.logging_name() + * if is_recursive: # <<<<<<<<<<<<<< + * # If we have a step name, stop here, no more detail needed. + * return '<%s>' % printable_name +*/ + } + + /* "apache_beam/runners/worker/operations.py":677 + * """ + * printable_name = self.__class__.__name__ + * if hasattr(self, 'step_name'): # <<<<<<<<<<<<<< + * printable_name += ' %s' % self.name_context.logging_name() + * if is_recursive: +*/ + } + + /* "apache_beam/runners/worker/operations.py":683 + * return '<%s>' % printable_name + * + * if self.spec is None: # <<<<<<<<<<<<<< + * printable_fields = [] + * else: +*/ + __pyx_t_3 = (__pyx_v_self->spec == Py_None); + if (__pyx_t_3) { + + /* "apache_beam/runners/worker/operations.py":684 + * + * if self.spec is None: + * printable_fields = [] # <<<<<<<<<<<<<< + * else: + * printable_fields = operation_specs.worker_printable_fields(self.spec) +*/ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_printable_fields = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":683 + * return '<%s>' % printable_name + * + * if self.spec is None: # <<<<<<<<<<<<<< + * printable_fields = [] + * else: +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/operations.py":686 + * printable_fields = [] + * else: + * printable_fields = operation_specs.worker_printable_fields(self.spec) # <<<<<<<<<<<<<< + * + * if not is_recursive and getattr(self, 'receivers', []): +*/ + /*else*/ { + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_worker_printable_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_self->spec}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_printable_fields = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/worker/operations.py":688 + * printable_fields = operation_specs.worker_printable_fields(self.spec) + * + * if not is_recursive and getattr(self, 'receivers', []): # <<<<<<<<<<<<<< + * printable_fields.append( + * 'receivers=[%s]' % +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_recursive); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_receivers, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __pyx_t_8; + __pyx_L7_bool_binop_done:; + if (__pyx_t_3) { + + /* "apache_beam/runners/worker/operations.py":691 + * printable_fields.append( + * 'receivers=[%s]' % + * ', '.join([str(receiver) for receiver in self.receivers])) # <<<<<<<<<<<<<< + * + * return '<%s %s>' % (printable_name, ', '.join(printable_fields)) +*/ + { /* enter inner scope */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 691, __pyx_L11_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 691, __pyx_L11_error) + } + __pyx_t_2 = __pyx_v_self->receivers; __Pyx_INCREF(__pyx_t_2); + __pyx_t_9 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 691, __pyx_L11_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L11_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_receiver, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_8genexpr2__pyx_v_receiver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L11_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 691, __pyx_L11_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver); __pyx_8genexpr2__pyx_v_receiver = 0; + goto __pyx_L15_exit_scope; + __pyx_L11_error:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver); __pyx_8genexpr2__pyx_v_receiver = 0; + goto __pyx_L1_error; + __pyx_L15_exit_scope:; + } /* exit inner scope */ + __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":690 + * if not is_recursive and getattr(self, 'receivers', []): + * printable_fields.append( + * 'receivers=[%s]' % # <<<<<<<<<<<<<< + * ', '.join([str(receiver) for receiver in self.receivers])) + * +*/ + __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_receivers_s, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":689 + * + * if not is_recursive and getattr(self, 'receivers', []): + * printable_fields.append( # <<<<<<<<<<<<<< + * 'receivers=[%s]' % + * ', '.join([str(receiver) for receiver in self.receivers])) +*/ + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_printable_fields, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":688 + * printable_fields = operation_specs.worker_printable_fields(self.spec) + * + * if not is_recursive and getattr(self, 'receivers', []): # <<<<<<<<<<<<<< + * printable_fields.append( + * 'receivers=[%s]' % +*/ + } + + /* "apache_beam/runners/worker/operations.py":693 + * ', '.join([str(receiver) for receiver in self.receivers])) + * + * return '<%s %s>' % (printable_name, ', '.join(printable_fields)) # <<<<<<<<<<<<<< + * + * def _get_runtime_performance_hints(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_printable_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__3, __pyx_v_printable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_11[1] = __pyx_t_6; + __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_11[3] = __pyx_t_2; + __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__6; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":667 + * return self.str_internal() + * + * def str_internal(self, is_recursive=False): # <<<<<<<<<<<<<< + * """Internal helper for __str__ that supports recursion. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_printable_name); + __Pyx_XDECREF(__pyx_v_printable_fields); + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_receiver); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":695 + * return '<%s %s>' % (printable_name, ', '.join(printable_fields)) + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints, "Returns any type hints required for performance runtime\n type-checking."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints = {"_get_runtime_performance_hints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_runtime_performance_hints (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_get_runtime_performance_hints", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_get_runtime_performance_hints", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_runtime_performance_hints", 0); + + /* "apache_beam/runners/worker/operations.py":700 + * """Returns any type hints required for performance runtime + * type-checking.""" + * return None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":695 + * return '<%s %s>' % (printable_name, ', '.join(printable_fields)) + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]] + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":65 + * + * cdef class Operation(object): + * cdef readonly name_context # <<<<<<<<<<<<<< + * cdef readonly operation_name + * cdef readonly spec +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name_context); + __pyx_r = __pyx_v_self->name_context; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":66 + * cdef class Operation(object): + * cdef readonly name_context + * cdef readonly operation_name # <<<<<<<<<<<<<< + * cdef readonly spec + * cdef object consumers +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->operation_name); + __pyx_r = __pyx_v_self->operation_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":67 + * cdef readonly name_context + * cdef readonly operation_name + * cdef readonly spec # <<<<<<<<<<<<<< + * cdef object consumers + * cdef readonly counter_factory +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_4spec___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->spec); + __pyx_r = __pyx_v_self->spec; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":69 + * cdef readonly spec + * cdef object consumers + * cdef readonly counter_factory # <<<<<<<<<<<<<< + * cdef public metrics_container + * cdef public execution_context +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->counter_factory); + __pyx_r = __pyx_v_self->counter_factory; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":70 + * cdef object consumers + * cdef readonly counter_factory + * cdef public metrics_container # <<<<<<<<<<<<<< + * cdef public execution_context + * # Public for access by Fn harness operations. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->metrics_container); + __pyx_r = __pyx_v_self->metrics_container; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->metrics_container); + __Pyx_DECREF(__pyx_v_self->metrics_container); + __pyx_v_self->metrics_container = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->metrics_container); + __Pyx_DECREF(__pyx_v_self->metrics_container); + __pyx_v_self->metrics_container = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":71 + * cdef readonly counter_factory + * cdef public metrics_container + * cdef public execution_context # <<<<<<<<<<<<<< + * # Public for access by Fn harness operations. + * # TODO(robertwb): Cythonize FnHarness. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->execution_context); + __pyx_r = __pyx_v_self->execution_context; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->execution_context); + __Pyx_DECREF(__pyx_v_self->execution_context); + __pyx_v_self->execution_context = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":74 + * # Public for access by Fn harness operations. + * # TODO(robertwb): Cythonize FnHarness. + * cdef public list receivers # <<<<<<<<<<<<<< + * cdef readonly bint debug_logging_enabled + * # For legacy workers. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->receivers); + __pyx_r = __pyx_v_self->receivers; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(4, 74, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->receivers); + __Pyx_DECREF(__pyx_v_self->receivers); + __pyx_v_self->receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.receivers.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->receivers); + __Pyx_DECREF(__pyx_v_self->receivers); + __pyx_v_self->receivers = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":75 + * # TODO(robertwb): Cythonize FnHarness. + * cdef public list receivers + * cdef readonly bint debug_logging_enabled # <<<<<<<<<<<<<< + * # For legacy workers. + * cdef bint setup_done +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.debug_logging_enabled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":79 + * cdef bint setup_done + * + * cdef public step_name # initialized lazily # <<<<<<<<<<<<<< + * + * cdef readonly object state_sampler +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->step_name); + __pyx_r = __pyx_v_self->step_name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->step_name); + __Pyx_DECREF(__pyx_v_self->step_name); + __pyx_v_self->step_name = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":81 + * cdef public step_name # initialized lazily + * + * cdef readonly object state_sampler # <<<<<<<<<<<<<< + * + * cdef readonly object scoped_start_state +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->state_sampler); + __pyx_r = __pyx_v_self->state_sampler; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":83 + * cdef readonly object state_sampler + * + * cdef readonly object scoped_start_state # <<<<<<<<<<<<<< + * cdef readonly object scoped_process_state + * cdef readonly object scoped_finish_state +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->scoped_start_state); + __pyx_r = __pyx_v_self->scoped_start_state; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":84 + * + * cdef readonly object scoped_start_state + * cdef readonly object scoped_process_state # <<<<<<<<<<<<<< + * cdef readonly object scoped_finish_state + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->scoped_process_state); + __pyx_r = __pyx_v_self->scoped_process_state; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":85 + * cdef readonly object scoped_start_state + * cdef readonly object scoped_process_state + * cdef readonly object scoped_finish_state # <<<<<<<<<<<<<< + * + * cdef readonly object data_sampler +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->scoped_finish_state); + __pyx_r = __pyx_v_self->scoped_finish_state; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":87 + * cdef readonly object scoped_finish_state + * + * cdef readonly object data_sampler # <<<<<<<<<<<<<< + * + * cpdef start(self) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->data_sampler); + __pyx_r = __pyx_v_self->data_sampler; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_48__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_48__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->consumers); + __Pyx_GIVEREF(__pyx_v_self->consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->counter_factory); + __Pyx_GIVEREF(__pyx_v_self->counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->data_sampler); + __Pyx_GIVEREF(__pyx_v_self->data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->execution_context); + __Pyx_GIVEREF(__pyx_v_self->execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->metrics_container); + __Pyx_GIVEREF(__pyx_v_self->metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->name_context); + __Pyx_GIVEREF(__pyx_v_self->name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->operation_name); + __Pyx_GIVEREF(__pyx_v_self->operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->receivers); + __Pyx_GIVEREF(__pyx_v_self->receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->spec); + __Pyx_GIVEREF(__pyx_v_self->spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->state_sampler); + __Pyx_GIVEREF(__pyx_v_self->state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->step_name); + __Pyx_GIVEREF(__pyx_v_self->step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->step_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, None), state + * else: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Operation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Operation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_50__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_9Operation_50__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Operation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Operation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.Operation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":704 + * + * class ReadOperation(Operation): + * def start(self): # <<<<<<<<<<<<<< + * with self.scoped_start_state: + * super(ReadOperation, self).start() +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_range_tracker = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":705 + * class ReadOperation(Operation): + * def start(self): + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(ReadOperation, self).start() + * range_tracker = self.spec.source.source.get_range_tracker( +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":706 + * def start(self): + * with self.scoped_start_state: + * super(ReadOperation, self).start() # <<<<<<<<<<<<<< + * range_tracker = self.spec.source.source.get_range_tracker( + * self.spec.source.start_position, self.spec.source.stop_position) +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":707 + * with self.scoped_start_state: + * super(ReadOperation, self).start() + * range_tracker = self.spec.source.source.get_range_tracker( # <<<<<<<<<<<<<< + * self.spec.source.start_position, self.spec.source.stop_position) + * for value in self.spec.source.source.read(range_tracker): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":708 + * super(ReadOperation, self).start() + * range_tracker = self.spec.source.source.get_range_tracker( + * self.spec.source.start_position, self.spec.source.stop_position) # <<<<<<<<<<<<<< + * for value in self.spec.source.source.read(range_tracker): + * if isinstance(value, WindowedValue): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_start_position); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 708, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_stop_position); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 708, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_t_11}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_range_tracker, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_range_tracker = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":709 + * range_tracker = self.spec.source.source.get_range_tracker( + * self.spec.source.start_position, self.spec.source.stop_position) + * for value in self.spec.source.source.read(range_tracker): # <<<<<<<<<<<<<< + * if isinstance(value, WindowedValue): + * windowed_value = value +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 709, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_3 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_range_tracker}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 709, __pyx_L7_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_10))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 709, __pyx_L7_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_12; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 709, __pyx_L7_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_12); + #endif + ++__pyx_t_12; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L7_error) + } else { + __pyx_t_1 = __pyx_t_13(__pyx_t_10); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 709, __pyx_L7_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":710 + * self.spec.source.start_position, self.spec.source.stop_position) + * for value in self.spec.source.source.read(range_tracker): + * if isinstance(value, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = value + * else: +*/ + __pyx_t_14 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (__pyx_t_14) { + + /* "apache_beam/runners/worker/operations.py":711 + * for value in self.spec.source.source.read(range_tracker): + * if isinstance(value, WindowedValue): + * windowed_value = value # <<<<<<<<<<<<<< + * else: + * windowed_value = _globally_windowed_value.with_value(value) +*/ + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 711, __pyx_L7_error) + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":710 + * self.spec.source.start_position, self.spec.source.stop_position) + * for value in self.spec.source.source.read(range_tracker): + * if isinstance(value, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = value + * else: +*/ + goto __pyx_L15; + } + + /* "apache_beam/runners/worker/operations.py":713 + * windowed_value = value + * else: + * windowed_value = _globally_windowed_value.with_value(value) # <<<<<<<<<<<<<< + * self.output(windowed_value) + * +*/ + /*else*/ { + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_v_value, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1)); + __pyx_t_1 = 0; + } + __pyx_L15:; + + /* "apache_beam/runners/worker/operations.py":714 + * else: + * windowed_value = _globally_windowed_value.with_value(value) + * self.output(windowed_value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":709 + * range_tracker = self.spec.source.source.get_range_tracker( + * self.spec.source.start_position, self.spec.source.stop_position) + * for value in self.spec.source.source.read(range_tracker): # <<<<<<<<<<<<<< + * if isinstance(value, WindowedValue): + * windowed_value = value +*/ + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/worker/operations.py":705 + * class ReadOperation(Operation): + * def start(self): + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(ReadOperation, self).start() + * range_tracker = self.spec.source.source.get_range_tracker( +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 705, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_10, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 705, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 705, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_15); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (__pyx_t_14 < (0)) __PYX_ERR(0, 705, __pyx_L9_except_error) + __pyx_t_16 = (!__pyx_t_14); + if (unlikely(__pyx_t_16)) { + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_1, __pyx_t_3); + __pyx_t_10 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 705, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L20; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L20:; + } + + /* "apache_beam/runners/worker/operations.py":704 + * + * class ReadOperation(Operation): + * def start(self): # <<<<<<<<<<<<<< + * with self.scoped_start_state: + * super(ReadOperation, self).start() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF(__pyx_v_range_tracker); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_2__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, None), state + * else: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ReadOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ReadOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ReadOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_4__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13ReadOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ReadOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ReadOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":718 + * + * class ImpulseReadOperation(Operation): + * def __init__( # <<<<<<<<<<<<<< + * self, + * name_context, # type: common.NameContext +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + PyObject *__pyx_v_consumers = 0; + PyObject *__pyx_v_source = 0; + PyObject *__pyx_v_output_coder = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,&__pyx_mstate_global->__pyx_n_u_consumers,&__pyx_mstate_global->__pyx_n_u_source,&__pyx_mstate_global->__pyx_n_u_output_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 718, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 718, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 718, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, i); __PYX_ERR(0, 718, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 718, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 718, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 718, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 718, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 718, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 718, __pyx_L3_error) + } + __pyx_v_name_context = values[0]; + __pyx_v_counter_factory = values[1]; + __pyx_v_state_sampler = values[2]; + __pyx_v_consumers = values[3]; + __pyx_v_source = values[4]; + __pyx_v_output_coder = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 718, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_consumers, __pyx_v_source, __pyx_v_output_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_consumers, PyObject *__pyx_v_source, PyObject *__pyx_v_output_coder) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":726 + * source, # type: iobase.BoundedSource + * output_coder): + * super(ImpulseReadOperation, # <<<<<<<<<<<<<< + * self).__init__(name_context, None, counter_factory, state_sampler) + * self.source = source +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/runners/worker/operations.py":727 + * output_coder): + * super(ImpulseReadOperation, + * self).__init__(name_context, None, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * self.source = source + * +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, Py_None, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":728 + * super(ImpulseReadOperation, + * self).__init__(name_context, None, counter_factory, state_sampler) + * self.source = source # <<<<<<<<<<<<<< + * + * self.receivers = [ +*/ + __Pyx_INCREF(__pyx_v_source); + __Pyx_GIVEREF(__pyx_v_source); + __Pyx_GOTREF(__pyx_v_self->source); + __Pyx_DECREF(__pyx_v_self->source); + __pyx_v_self->source = __pyx_v_source; + + /* "apache_beam/runners/worker/operations.py":731 + * + * self.receivers = [ + * ConsumerSet.create( # <<<<<<<<<<<<<< + * self.counter_factory, + * self.name_context.step_name, +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":733 + * ConsumerSet.create( + * self.counter_factory, + * self.name_context.step_name, # <<<<<<<<<<<<<< + * 0, + * next(iter(consumers.values())), +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":735 + * self.name_context.step_name, + * 0, + * next(iter(consumers.values())), # <<<<<<<<<<<<<< + * output_coder, + * self._get_runtime_performance_hints(), +*/ + __pyx_t_6 = __pyx_v_consumers; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyIter_Next(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":737 + * next(iter(consumers.values())), + * output_coder, + * self._get_runtime_performance_hints(), # <<<<<<<<<<<<<< + * self.get_output_batch_converter()) + * ] +*/ + __pyx_t_7 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_runtime_performance_hints, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + + /* "apache_beam/runners/worker/operations.py":738 + * output_coder, + * self._get_runtime_performance_hints(), + * self.get_output_batch_converter()) # <<<<<<<<<<<<<< + * ] + * +*/ + __pyx_t_8 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_output_batch_converter, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_2, __pyx_mstate_global->__pyx_int_0, __pyx_t_4, __pyx_v_output_coder, __pyx_t_6, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":730 + * self.source = source + * + * self.receivers = [ # <<<<<<<<<<<<<< + * ConsumerSet.create( + * self.counter_factory, +*/ + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 730, __pyx_L1_error); + __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v_self->__pyx_base.receivers); + __pyx_v_self->__pyx_base.receivers = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":718 + * + * class ImpulseReadOperation(Operation): + * def __init__( # <<<<<<<<<<<<<< + * self, + * name_context, # type: common.NameContext +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":741 + * ] + * + * def process(self, unused_impulse): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + PyObject *__pyx_v_range_tracker = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_unused_impulse)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":743 + * def process(self, unused_impulse): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":744 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * range_tracker = self.source.get_range_tracker(None, None) # <<<<<<<<<<<<<< + * for value in self.source.read(range_tracker): + * if isinstance(value, WindowedValue): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->source, __pyx_mstate_global->__pyx_n_u_get_range_tracker); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_range_tracker = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":745 + * with self.scoped_process_state: + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): # <<<<<<<<<<<<<< + * if isinstance(value, WindowedValue): + * windowed_value = value +*/ + __pyx_t_1 = __pyx_v_self->source; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_range_tracker}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); + __pyx_t_10 = 0; + __pyx_t_11 = NULL; + } else { + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 745, __pyx_L7_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_11)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 745, __pyx_L7_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_10; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 745, __pyx_L7_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10); + #endif + ++__pyx_t_10; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L7_error) + } else { + __pyx_t_4 = __pyx_t_11(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 745, __pyx_L7_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":746 + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): + * if isinstance(value, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = value + * else: +*/ + __pyx_t_12 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (__pyx_t_12) { + + /* "apache_beam/runners/worker/operations.py":747 + * for value in self.source.read(range_tracker): + * if isinstance(value, WindowedValue): + * windowed_value = value # <<<<<<<<<<<<<< + * else: + * windowed_value = _globally_windowed_value.with_value(value) +*/ + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 747, __pyx_L7_error) + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":746 + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): + * if isinstance(value, WindowedValue): # <<<<<<<<<<<<<< + * windowed_value = value + * else: +*/ + goto __pyx_L15; + } + + /* "apache_beam/runners/worker/operations.py":749 + * windowed_value = value + * else: + * windowed_value = _globally_windowed_value.with_value(value) # <<<<<<<<<<<<<< + * self.output(windowed_value) + * +*/ + /*else*/ { + __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_v_value, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_4)); + __pyx_t_4 = 0; + } + __pyx_L15:; + + /* "apache_beam/runners/worker/operations.py":750 + * else: + * windowed_value = _globally_windowed_value.with_value(value) + * self.output(windowed_value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_windowed_value, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":745 + * with self.scoped_process_state: + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): # <<<<<<<<<<<<<< + * if isinstance(value, WindowedValue): + * windowed_value = value +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":743 + * def process(self, unused_impulse): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * range_tracker = self.source.get_range_tracker(None, None) + * for value in self.source.read(range_tracker): +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 743, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 743, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_12 < (0)) __PYX_ERR(0, 743, __pyx_L9_except_error) + __pyx_t_14 = (!__pyx_t_12); + if (unlikely(__pyx_t_14)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 743, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L20; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L20:; + } + + /* "apache_beam/runners/worker/operations.py":741 + * ] + * + * def process(self, unused_impulse): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF(__pyx_v_range_tracker); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_impulse,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 741, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 741, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 741, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 741, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 741, __pyx_L3_error) + } + __pyx_v_unused_impulse = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 741, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unused_impulse), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "unused_impulse", 0))) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_2process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), __pyx_v_unused_impulse); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_unused_impulse) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process(__pyx_v_self, __pyx_v_unused_impulse, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_4__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(17); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->source) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.source, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->source != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ImpulseReadOperat); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_157929342); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_157929342); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_157929342) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.source is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, None), state + * else: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ImpulseReadOperat); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_157929342); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_157929342); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_157929342) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_6__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.ImpulseReadOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":755 + * class InMemoryWriteOperation(Operation): + * """A write operation that will write to an in-memory sink.""" + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 755, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 755, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 755, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, i); __PYX_ERR(0, 755, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 755, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 755, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 755, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(__pyx_self, __pyx_v_self, __pyx_v_o); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + + /* "apache_beam/runners/worker/operations.py":757 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scoped_process_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":758 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.spec.output_buffer.append( +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 758, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "apache_beam/runners/worker/operations.py":759 + * with self.scoped_process_state: + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) # <<<<<<<<<<<<<< + * self.spec.output_buffer.append( + * o if self.spec.write_windowed_values else o.value) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Processing_s_in_s, __pyx_v_o, __pyx_v_self}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":758 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.spec.output_buffer.append( +*/ + } + + /* "apache_beam/runners/worker/operations.py":760 + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.spec.output_buffer.append( # <<<<<<<<<<<<<< + * o if self.spec.write_windowed_values else o.value) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_output_buffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":761 + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.spec.output_buffer.append( + * o if self.spec.write_windowed_values else o.value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_write_windowed_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 761, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_10) { + __Pyx_INCREF(__pyx_v_o); + __pyx_t_1 = __pyx_v_o; + } else { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + + /* "apache_beam/runners/worker/operations.py":760 + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.spec.output_buffer.append( # <<<<<<<<<<<<<< + * o if self.spec.write_windowed_values else o.value) + * +*/ + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 760, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":757 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 757, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 757, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_10 < (0)) __PYX_ERR(0, 757, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_10); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_5); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; + __PYX_ERR(0, 757, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/runners/worker/operations.py":755 + * class InMemoryWriteOperation(Operation): + * """A write operation that will write to an in-memory sink.""" + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.InMemoryWriteOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":765 + * + * class _TaggedReceivers(dict): + * def __init__(self, counter_factory, step_name): # <<<<<<<<<<<<<< + * self._counter_factory = counter_factory + * self._step_name = step_name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_step_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 765, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 765, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 765, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 765, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 765, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 765, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 765, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 765, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 765, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_counter_factory = values[1]; + __pyx_v_step_name = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 765, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(__pyx_self, __pyx_v_self, __pyx_v_counter_factory, __pyx_v_step_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_step_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":766 + * class _TaggedReceivers(dict): + * def __init__(self, counter_factory, step_name): + * self._counter_factory = counter_factory # <<<<<<<<<<<<<< + * self._step_name = step_name + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory_2, __pyx_v_counter_factory) < (0)) __PYX_ERR(0, 766, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":767 + * def __init__(self, counter_factory, step_name): + * self._counter_factory = counter_factory + * self._step_name = step_name # <<<<<<<<<<<<<< + * + * def __missing__(self, tag): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name_2, __pyx_v_step_name) < (0)) __PYX_ERR(0, 767, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":765 + * + * class _TaggedReceivers(dict): + * def __init__(self, counter_factory, step_name): # <<<<<<<<<<<<<< + * self._counter_factory = counter_factory + * self._step_name = step_name +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":769 + * self._step_name = step_name + * + * def __missing__(self, tag): # <<<<<<<<<<<<<< + * self[tag] = receiver = ConsumerSet.create( + * self._counter_factory, self._step_name, tag, [], None, None, None) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__ = {"__missing__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_tag = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__missing__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tag,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 769, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 769, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 769, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__missing__", 0) < (0)) __PYX_ERR(0, 769, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__missing__", 1, 2, 2, i); __PYX_ERR(0, 769, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 769, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 769, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_tag = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__missing__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 769, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__missing__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(__pyx_self, __pyx_v_self, __pyx_v_tag); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_2__missing__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) { + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__missing__", 0); + + /* "apache_beam/runners/worker/operations.py":770 + * + * def __missing__(self, tag): + * self[tag] = receiver = ConsumerSet.create( # <<<<<<<<<<<<<< + * self._counter_factory, self._step_name, tag, [], None, None, None) + * return receiver +*/ + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":771 + * def __missing__(self, tag): + * self[tag] = receiver = ConsumerSet.create( + * self._counter_factory, self._step_name, tag, [], None, None, None) # <<<<<<<<<<<<<< + * return receiver + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_v_tag, __pyx_t_5, Py_None, Py_None, Py_None}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":770 + * + * def __missing__(self, tag): + * self[tag] = receiver = ConsumerSet.create( # <<<<<<<<<<<<<< + * self._counter_factory, self._step_name, tag, [], None, None, None) + * return receiver +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self, __pyx_v_tag, __pyx_t_1) < 0))) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_INCREF(__pyx_t_1); + __pyx_v_receiver = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":772 + * self[tag] = receiver = ConsumerSet.create( + * self._counter_factory, self._step_name, tag, [], None, None, None) + * return receiver # <<<<<<<<<<<<<< + * + * def total_output_bytes(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_receiver); + __pyx_r = __pyx_v_receiver; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":769 + * self._step_name = step_name + * + * def __missing__(self, tag): # <<<<<<<<<<<<<< + * self[tag] = receiver = ConsumerSet.create( + * self._counter_factory, self._step_name, tag, [], None, None, None) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.__missing__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":774 + * return receiver + * + * def total_output_bytes(self): # <<<<<<<<<<<<<< + * # type: () -> int + * total = 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes = {"total_output_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("total_output_bytes (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 774, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 774, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "total_output_bytes", 0) < (0)) __PYX_ERR(0, 774, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("total_output_bytes", 1, 1, 1, i); __PYX_ERR(0, 774, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 774, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("total_output_bytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 774, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.total_output_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_4total_output_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_total = NULL; + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_v_elements = NULL; + PyObject *__pyx_v_mean = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("total_output_bytes", 0); + + /* "apache_beam/runners/worker/operations.py":776 + * def total_output_bytes(self): + * # type: () -> int + * total = 0 # <<<<<<<<<<<<<< + * for receiver in self.values(): + * elements = receiver.opcounter.element_counter.value() +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_total = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/runners/worker/operations.py":777 + * # type: () -> int + * total = 0 + * for receiver in self.values(): # <<<<<<<<<<<<<< + * elements = receiver.opcounter.element_counter.value() + * if elements > 0: +*/ + __pyx_t_2 = 0; + if (unlikely(__pyx_v_self == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 777, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); + if (unlikely(__pyx_t_6 == 0)) break; + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":778 + * total = 0 + * for receiver in self.values(): + * elements = receiver.opcounter.element_counter.value() # <<<<<<<<<<<<<< + * if elements > 0: + * mean = (receiver.opcounter.mean_byte_counter.value())[0] +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_element_counter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_7 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_elements, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":779 + * for receiver in self.values(): + * elements = receiver.opcounter.element_counter.value() + * if elements > 0: # <<<<<<<<<<<<<< + * mean = (receiver.opcounter.mean_byte_counter.value())[0] + * total += elements * mean +*/ + __pyx_t_5 = PyObject_RichCompare(__pyx_v_elements, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_11) { + + /* "apache_beam/runners/worker/operations.py":780 + * elements = receiver.opcounter.element_counter.value() + * if elements > 0: + * mean = (receiver.opcounter.mean_byte_counter.value())[0] # <<<<<<<<<<<<<< + * total += elements * mean + * return total +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_mean_byte_counter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_mean, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":781 + * if elements > 0: + * mean = (receiver.opcounter.mean_byte_counter.value())[0] + * total += elements * mean # <<<<<<<<<<<<<< + * return total + * +*/ + __pyx_t_8 = PyNumber_Multiply(__pyx_v_elements, __pyx_v_mean); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_total, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_total, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":779 + * for receiver in self.values(): + * elements = receiver.opcounter.element_counter.value() + * if elements > 0: # <<<<<<<<<<<<<< + * mean = (receiver.opcounter.mean_byte_counter.value())[0] + * total += elements * mean +*/ + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":782 + * mean = (receiver.opcounter.mean_byte_counter.value())[0] + * total += elements * mean + * return total # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_total); + __pyx_r = __pyx_v_total; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":774 + * return receiver + * + * def total_output_bytes(self): # <<<<<<<<<<<<<< + * # type: () -> int + * total = 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.worker.operations._TaggedReceivers.total_output_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_total); + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XDECREF(__pyx_v_elements); + __Pyx_XDECREF(__pyx_v_mean); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":797 + * class DoOperation(Operation): + * """A Do operation that will execute a custom DoFn for each input element.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * name, # type: common.NameContext +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_sampler = 0; + PyObject *__pyx_v_side_input_maps = 0; + PyObject *__pyx_v_user_state_context = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_2,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_sampler,&__pyx_mstate_global->__pyx_n_u_side_input_maps,&__pyx_mstate_global->__pyx_n_u_user_state_context,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 797, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 797, __pyx_L3_error) + + /* "apache_beam/runners/worker/operations.py":803 + * counter_factory, + * sampler, + * side_input_maps=None, # <<<<<<<<<<<<<< + * user_state_context=None, + * ): +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":804 + * sampler, + * side_input_maps=None, + * user_state_context=None, # <<<<<<<<<<<<<< + * ): + * super(DoOperation, self).__init__(name, spec, counter_factory, sampler) +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, i); __PYX_ERR(0, 797, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 797, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 797, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 797, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 797, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 797, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/worker/operations.py":803 + * counter_factory, + * sampler, + * side_input_maps=None, # <<<<<<<<<<<<<< + * user_state_context=None, + * ): +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":804 + * sampler, + * side_input_maps=None, + * user_state_context=None, # <<<<<<<<<<<<<< + * ): + * super(DoOperation, self).__init__(name, spec, counter_factory, sampler) +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_name = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_sampler = values[3]; + __pyx_v_side_input_maps = values[4]; + __pyx_v_user_state_context = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 797, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_sampler, __pyx_v_side_input_maps, __pyx_v_user_state_context); + + /* "apache_beam/runners/worker/operations.py":797 + * class DoOperation(Operation): + * """A Do operation that will execute a custom DoFn for each input element.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * name, # type: common.NameContext +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_sampler, PyObject *__pyx_v_side_input_maps, PyObject *__pyx_v_user_state_context) { + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":806 + * user_state_context=None, + * ): + * super(DoOperation, self).__init__(name, spec, counter_factory, sampler) # <<<<<<<<<<<<<< + * self.side_input_maps = side_input_maps + * self.user_state_context = user_state_context +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":807 + * ): + * super(DoOperation, self).__init__(name, spec, counter_factory, sampler) + * self.side_input_maps = side_input_maps # <<<<<<<<<<<<<< + * self.user_state_context = user_state_context + * self.tagged_receivers = None # type: Optional[_TaggedReceivers] +*/ + __Pyx_INCREF(__pyx_v_side_input_maps); + __Pyx_GIVEREF(__pyx_v_side_input_maps); + __Pyx_GOTREF(__pyx_v_self->side_input_maps); + __Pyx_DECREF(__pyx_v_self->side_input_maps); + __pyx_v_self->side_input_maps = __pyx_v_side_input_maps; + + /* "apache_beam/runners/worker/operations.py":808 + * super(DoOperation, self).__init__(name, spec, counter_factory, sampler) + * self.side_input_maps = side_input_maps + * self.user_state_context = user_state_context # <<<<<<<<<<<<<< + * self.tagged_receivers = None # type: Optional[_TaggedReceivers] + * # A mapping of timer tags to the input "PCollections" they come in on. +*/ + __Pyx_INCREF(__pyx_v_user_state_context); + __Pyx_GIVEREF(__pyx_v_user_state_context); + __Pyx_GOTREF(__pyx_v_self->user_state_context); + __Pyx_DECREF(__pyx_v_self->user_state_context); + __pyx_v_self->user_state_context = __pyx_v_user_state_context; + + /* "apache_beam/runners/worker/operations.py":809 + * self.side_input_maps = side_input_maps + * self.user_state_context = user_state_context + * self.tagged_receivers = None # type: Optional[_TaggedReceivers] # <<<<<<<<<<<<<< + * # A mapping of timer tags to the input "PCollections" they come in on. + * self.input_info = None # type: Optional[OpInputInfo] +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->tagged_receivers); + __Pyx_DECREF(__pyx_v_self->tagged_receivers); + __pyx_v_self->tagged_receivers = Py_None; + + /* "apache_beam/runners/worker/operations.py":811 + * self.tagged_receivers = None # type: Optional[_TaggedReceivers] + * # A mapping of timer tags to the input "PCollections" they come in on. + * self.input_info = None # type: Optional[OpInputInfo] # <<<<<<<<<<<<<< + * self.scoped_timer_processing_state = self.state_sampler.scoped_state( + * self.name_context, +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->input_info); + __Pyx_DECREF(__pyx_v_self->input_info); + __pyx_v_self->input_info = Py_None; + + /* "apache_beam/runners/worker/operations.py":812 + * # A mapping of timer tags to the input "PCollections" they come in on. + * self.input_info = None # type: Optional[OpInputInfo] + * self.scoped_timer_processing_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, + * 'process-timers', +*/ + __pyx_t_3 = __pyx_v_self->__pyx_base.state_sampler; + __Pyx_INCREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":815 + * self.name_context, + * 'process-timers', + * metrics_container=self.metrics_container) # <<<<<<<<<<<<<< + * # See fn_data in dataflow_runner.py + * # TODO: Store all the items from spec? +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_self->__pyx_base.name_context, __pyx_mstate_global->__pyx_kp_u_process_timers}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metrics_container, __pyx_v_self->__pyx_base.metrics_container, __pyx_t_2, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":812 + * # A mapping of timer tags to the input "PCollections" they come in on. + * self.input_info = None # type: Optional[OpInputInfo] + * self.scoped_timer_processing_state = self.state_sampler.scoped_state( # <<<<<<<<<<<<<< + * self.name_context, + * 'process-timers', +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->scoped_timer_processing_state); + __Pyx_DECREF(__pyx_v_self->scoped_timer_processing_state); + __pyx_v_self->scoped_timer_processing_state = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":818 + * # See fn_data in dataflow_runner.py + * # TODO: Store all the items from spec? + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) # <<<<<<<<<<<<<< + * + * def _read_side_inputs(self, tags_and_types): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pickler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_serialized_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 818, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); + __Pyx_INCREF(__pyx_t_7); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + } + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7}; + for (i=0; i < 5; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7}; + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 5) < (0)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->fn); + __Pyx_DECREF(__pyx_v_self->fn); + __pyx_v_self->fn = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v__ = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v__, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v__, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v__, __pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":797 + * class DoOperation(Operation): + * """A Do operation that will execute a custom DoFn for each input element.""" + * def __init__( # <<<<<<<<<<<<<< + * self, + * name, # type: common.NameContext +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/runners/worker/operations.py":820 + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) + * + * def _read_side_inputs(self, tags_and_types): # <<<<<<<<<<<<<< + * # type: (...) -> Iterator[apache_sideinputs.SideInputMap] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs, "Generator reading side inputs in the order prescribed by tags_and_types.\n\n Args:\n tags_and_types: List of tuples (tag, type). Each side input has a string\n tag that is specified in the worker instruction. The type is actually\n a boolean which is True for singleton input (read just first value)\n and False for collection input (read all values).\n\n Yields:\n With each iteration it yields the result of reading an entire side source\n either in singleton or collection mode according to the tags_and_types\n argument.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs = {"_read_side_inputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_tags_and_types = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_read_side_inputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tags_and_types,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 820, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 820, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_read_side_inputs", 0) < (0)) __PYX_ERR(0, 820, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_read_side_inputs", 1, 1, 1, i); __PYX_ERR(0, 820, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 820, __pyx_L3_error) + } + __pyx_v_tags_and_types = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_read_side_inputs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 820, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_tags_and_types); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":855 + * # the for loop. + * # pylint: disable=cell-var-from-loop + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): # <<<<<<<<<<<<<< + * if not isinstance(si, operation_specs.WorkerSideInputSource): + * raise NotImplementedError('Unknown side input type: %r' % si) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1 = {"lambda1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 855, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 855, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda1", 0) < (0)) __PYX_ERR(0, 855, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, i); __PYX_ERR(0, 855, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 855, __pyx_L3_error) + } + __pyx_v_o = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 855, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_o); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda1", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_mstate_global->__pyx_n_u_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(!__pyx_cur_scope->__pyx_v_side_tag)) { __Pyx_RaiseClosureNameError("side_tag"); __PYX_ERR(0, 855, __pyx_L1_error) } + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_side_tag, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":820 + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) + * + * def _read_side_inputs(self, tags_and_types): # <<<<<<<<<<<<<< + * # type: (...) -> Iterator[apache_sideinputs.SideInputMap] + * +*/ + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tags_and_types) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_read_side_inputs", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 820, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __pyx_cur_scope->__pyx_v_tags_and_types = __pyx_v_tags_and_types; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tags_and_types); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tags_and_types); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_read_side_inputs, __pyx_mstate_global->__pyx_n_u_DoOperation__read_side_inputs, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera); if (unlikely(!gen)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_7runners_6worker_10operations_11DoOperation_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *(*__pyx_t_11)(PyObject *); + size_t __pyx_t_12; + Py_ssize_t __pyx_t_13; + PyObject *(*__pyx_t_14)(PyObject *); + int __pyx_t_15; + int __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_read_side_inputs", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L12_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 820, __pyx_L1_error) + } + + /* "apache_beam/runners/worker/operations.py":838 + * # Only call this on the old path where side_input_maps was not + * # provided directly. + * assert self.side_input_maps is None # <<<<<<<<<<<<<< + * + * # We will read the side inputs in the order prescribed by the +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->side_input_maps == Py_None); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 838, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 838, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/operations.py":848 + * # specification. This can happen for instance if the source has been + * # sharded into several files. + * for i, (side_tag, view_class, view_options) in enumerate(tags_and_types): # <<<<<<<<<<<<<< + * sources = [] + * # Using the side_tag in the lambda below will trigger a pylint warning. +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_tags_and_types)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_tags_and_types)) { + __pyx_t_3 = __pyx_cur_scope->__pyx_v_tags_and_types; __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_tags_and_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_3); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 848, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 848, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_9); + } else { + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_9); + } + #else + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); + index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < (0)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_side_tag); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_side_tag, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_view_class); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_view_class, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_view_options); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_view_options, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":849 + * # sharded into several files. + * for i, (side_tag, view_class, view_options) in enumerate(tags_and_types): + * sources = [] # <<<<<<<<<<<<<< + * # Using the side_tag in the lambda below will trigger a pylint warning. + * # However in this case it is fine because the lambda is used right away +*/ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sources); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sources, ((PyObject*)__pyx_t_6)); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":855 + * # the for loop. + * # pylint: disable=cell-var-from-loop + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): # <<<<<<<<<<<<<< + * if not isinstance(si, operation_specs.WorkerSideInputSource): + * raise NotImplementedError('Unknown side input type: %r' % si) +*/ + __pyx_t_9 = NULL; + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_17_read_side_inputs_lambda1, 0, __pyx_mstate_global->__pyx_n_u_read_side_inputs_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_side_inputs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_7}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_filter, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); + __pyx_t_13 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 855, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_7))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 855, __pyx_L1_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_13; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 855, __pyx_L1_error) + #endif + if (__pyx_t_13 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_13); + #endif + ++__pyx_t_13; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_14(__pyx_t_7); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 855, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":856 + * # pylint: disable=cell-var-from-loop + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): + * if not isinstance(si, operation_specs.WorkerSideInputSource): # <<<<<<<<<<<<<< + * raise NotImplementedError('Unknown side input type: %r' % si) + * sources.append(si.source) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WorkerSideInputSource); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_si, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 856, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_15 = (!__pyx_t_1); + if (unlikely(__pyx_t_15)) { + + /* "apache_beam/runners/worker/operations.py":857 + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): + * if not isinstance(si, operation_specs.WorkerSideInputSource): + * raise NotImplementedError('Unknown side input type: %r' % si) # <<<<<<<<<<<<<< + * sources.append(si.source) + * si_counter = opcounters.SideInputReadCounter( +*/ + __pyx_t_6 = NULL; + __pyx_t_9 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unknown_side_input_type_r, __pyx_cur_scope->__pyx_v_si); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(0, 857, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":856 + * # pylint: disable=cell-var-from-loop + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): + * if not isinstance(si, operation_specs.WorkerSideInputSource): # <<<<<<<<<<<<<< + * raise NotImplementedError('Unknown side input type: %r' % si) + * sources.append(si.source) +*/ + } + + /* "apache_beam/runners/worker/operations.py":858 + * if not isinstance(si, operation_specs.WorkerSideInputSource): + * raise NotImplementedError('Unknown side input type: %r' % si) + * sources.append(si.source) # <<<<<<<<<<<<<< + * si_counter = opcounters.SideInputReadCounter( + * self.counter_factory, +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_si, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_sources, __pyx_t_8); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":855 + * # the for loop. + * # pylint: disable=cell-var-from-loop + * for si in filter(lambda o: o.tag == side_tag, self.spec.side_inputs): # <<<<<<<<<<<<<< + * if not isinstance(si, operation_specs.WorkerSideInputSource): + * raise NotImplementedError('Unknown side input type: %r' % si) +*/ + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":859 + * raise NotImplementedError('Unknown side input type: %r' % si) + * sources.append(si.source) + * si_counter = opcounters.SideInputReadCounter( # <<<<<<<<<<<<<< + * self.counter_factory, + * self.state_sampler, +*/ + __pyx_t_8 = NULL; + + /* "apache_beam/runners/worker/operations.py":862 + * self.counter_factory, + * self.state_sampler, + * declaring_step=self.name_context.step_name, # <<<<<<<<<<<<<< + * # Inputs are 1-indexed, so we add 1 to i in the side input id + * input_index=i + 1) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.name_context, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/worker/operations.py":864 + * declaring_step=self.name_context.step_name, + * # Inputs are 1-indexed, so we add 1 to i in the side input id + * input_index=i + 1) # <<<<<<<<<<<<<< + * element_counter = opcounters.OperationCounters( + * self.counter_factory, +*/ + __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory, __pyx_cur_scope->__pyx_v_self->__pyx_base.state_sampler}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_declaring_step, __pyx_t_9, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 859, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_index, __pyx_t_6, __pyx_t_10, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 859, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_si_counter); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_si_counter, ((PyObject *)__pyx_t_7)); + __Pyx_GIVEREF((PyObject *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":865 + * # Inputs are 1-indexed, so we add 1 to i in the side input id + * input_index=i + 1) + * element_counter = opcounters.OperationCounters( # <<<<<<<<<<<<<< + * self.counter_factory, + * self.name_context.step_name, +*/ + __pyx_t_10 = NULL; + + /* "apache_beam/runners/worker/operations.py":867 + * element_counter = opcounters.OperationCounters( + * self.counter_factory, + * self.name_context.step_name, # <<<<<<<<<<<<<< + * view_options['coder'], + * i, +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->__pyx_base.name_context, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/runners/worker/operations.py":868 + * self.counter_factory, + * self.name_context.step_name, + * view_options['coder'], # <<<<<<<<<<<<<< + * i, + * suffix='side-input') +*/ + __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_view_options, __pyx_mstate_global->__pyx_n_u_coder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/worker/operations.py":869 + * self.name_context.step_name, + * view_options['coder'], + * i, # <<<<<<<<<<<<<< + * suffix='side-input') + * iterator_fn = sideinputs.get_iterator_fn_for_sources( +*/ + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_cur_scope->__pyx_v_self->__pyx_base.counter_factory, __pyx_t_6, __pyx_t_9, __pyx_cur_scope->__pyx_v_i}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_suffix, __pyx_mstate_global->__pyx_kp_u_side_input, __pyx_t_8, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 865, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters, __pyx_callargs+__pyx_t_12, (5-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_element_counter); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_element_counter, ((PyObject *)__pyx_t_7)); + __Pyx_GIVEREF((PyObject *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":871 + * i, + * suffix='side-input') + * iterator_fn = sideinputs.get_iterator_fn_for_sources( # <<<<<<<<<<<<<< + * sources, read_counter=si_counter, element_counter=element_counter) + * yield apache_sideinputs.SideInputMap( +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sideinputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get_iterator_fn_for_sources); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":872 + * suffix='side-input') + * iterator_fn = sideinputs.get_iterator_fn_for_sources( + * sources, read_counter=si_counter, element_counter=element_counter) # <<<<<<<<<<<<<< + * yield apache_sideinputs.SideInputMap( + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) +*/ + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_sources}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_read_counter, __pyx_cur_scope->__pyx_v_si_counter, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 871, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_element_counter, __pyx_cur_scope->__pyx_v_element_counter, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_iterator_fn); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_iterator_fn, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":873 + * iterator_fn = sideinputs.get_iterator_fn_for_sources( + * sources, read_counter=si_counter, element_counter=element_counter) + * yield apache_sideinputs.SideInputMap( # <<<<<<<<<<<<<< + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) + * +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_apache_sideinputs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SideInputMap); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":874 + * sources, read_counter=si_counter, element_counter=element_counter) + * yield apache_sideinputs.SideInputMap( + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) # <<<<<<<<<<<<<< + * + * def setup(self, data_sampler=None): +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_sideinputs); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_EmulatedIterable); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_18))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_18); + assert(__pyx_t_10); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_18); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_18, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_cur_scope->__pyx_v_iterator_fn}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_view_class, __pyx_cur_scope->__pyx_v_view_options, __pyx_t_9}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + __Pyx_XGIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; + __Pyx_XGIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_5; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L12_resume_from_yield:; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_5 = __pyx_cur_scope->__pyx_t_3; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 873, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":848 + * # specification. This can happen for instance if the source has been + * # sharded into several files. + * for i, (side_tag, view_class, view_options) in enumerate(tags_and_types): # <<<<<<<<<<<<<< + * sources = [] + * # Using the side_tag in the lambda below will trigger a pylint warning. +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/runners/worker/operations.py":820 + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) + * + * def _read_side_inputs(self, tags_and_types): # <<<<<<<<<<<<<< + * # type: (...) -> Iterator[apache_sideinputs.SideInputMap] + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("_read_side_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":876 + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup = {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 876, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 876, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setup", 0) < (0)) __PYX_ERR(0, 876, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 876, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_data_sampler = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 876, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_data_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_5setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) { + PyObject *__pyx_v_fn = NULL; + PyObject *__pyx_v_args = NULL; + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_tags_and_types = NULL; + PyObject *__pyx_v_window_fn = NULL; + PyObject *__pyx_v_state = NULL; + PyObject *__pyx_v_index = NULL; + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_8genexpr3__pyx_v_spec = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *(*__pyx_t_13)(PyObject *); + Py_ssize_t __pyx_t_14; + int __pyx_t_15; + PyObject *(*__pyx_t_16)(PyObject *); + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setup", 0); + + /* "apache_beam/runners/worker/operations.py":878 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(DoOperation, self).setup(data_sampler) + * +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":879 + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: + * super(DoOperation, self).setup(data_sampler) # <<<<<<<<<<<<<< + * + * # See fn_data in dataflow_runner.py +*/ + __pyx_t_9 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_data_sampler}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":883 + * # See fn_data in dataflow_runner.py + * fn, args, kwargs, tags_and_types, window_fn = ( + * pickler.loads(self.spec.serialized_fn)) # <<<<<<<<<<<<<< + * + * state = common.DoFnState(self.counter_factory) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pickler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 883, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_serialized_fn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 882, __pyx_L7_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_9); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 4); + __Pyx_INCREF(__pyx_t_11); + } else { + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_11); + } + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_9,&__pyx_t_4,&__pyx_t_3,&__pyx_t_10,&__pyx_t_11}; + for (i=0; i < 5; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_9,&__pyx_t_4,&__pyx_t_3,&__pyx_t_10,&__pyx_t_11}; + __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 882, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_13(__pyx_t_12); if (unlikely(!item)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 5) < (0)) __PYX_ERR(0, 882, __pyx_L7_error) + __pyx_t_13 = NULL; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 882, __pyx_L7_error) + __pyx_L14_unpacking_done:; + } + + /* "apache_beam/runners/worker/operations.py":882 + * + * # See fn_data in dataflow_runner.py + * fn, args, kwargs, tags_and_types, window_fn = ( # <<<<<<<<<<<<<< + * pickler.loads(self.spec.serialized_fn)) + * +*/ + __pyx_v_fn = __pyx_t_9; + __pyx_t_9 = 0; + __pyx_v_args = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_kwargs = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_tags_and_types = __pyx_t_10; + __pyx_t_10 = 0; + __pyx_v_window_fn = __pyx_t_11; + __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":885 + * pickler.loads(self.spec.serialized_fn)) + * + * state = common.DoFnState(self.counter_factory) # <<<<<<<<<<<<<< + * state.step_name = self.name_context.logging_name() + * +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 885, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_DoFnState); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_self->__pyx_base.counter_factory}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_state = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":886 + * + * state = common.DoFnState(self.counter_factory) + * state.step_name = self.name_context.logging_name() # <<<<<<<<<<<<<< + * + * # Tag to output index map used to dispatch the output values emitted +*/ + __pyx_t_3 = __pyx_v_self->__pyx_base.name_context; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_state, __pyx_mstate_global->__pyx_n_u_step_name, __pyx_t_2) < (0)) __PYX_ERR(0, 886, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":892 + * # either the only output or the output tagged with 'None' and is + * # associated with its corresponding index. + * self.tagged_receivers = _TaggedReceivers( # <<<<<<<<<<<<<< + * self.counter_factory, self.name_context.logging_name()) + * +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_TaggedReceivers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 892, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":893 + * # associated with its corresponding index. + * self.tagged_receivers = _TaggedReceivers( + * self.counter_factory, self.name_context.logging_name()) # <<<<<<<<<<<<<< + * + * if len(self.spec.output_tags) == 1: +*/ + __pyx_t_4 = __pyx_v_self->__pyx_base.name_context; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 893, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self->__pyx_base.counter_factory, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + + /* "apache_beam/runners/worker/operations.py":892 + * # either the only output or the output tagged with 'None' and is + * # associated with its corresponding index. + * self.tagged_receivers = _TaggedReceivers( # <<<<<<<<<<<<<< + * self.counter_factory, self.name_context.logging_name()) + * +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->tagged_receivers); + __Pyx_DECREF(__pyx_v_self->tagged_receivers); + __pyx_v_self->tagged_receivers = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":895 + * self.counter_factory, self.name_context.logging_name()) + * + * if len(self.spec.output_tags) == 1: # <<<<<<<<<<<<<< + * self.tagged_receivers[None] = self.receivers[0] + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_output_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 895, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_15 = (__pyx_t_14 == 1); + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":896 + * + * if len(self.spec.output_tags) == 1: + * self.tagged_receivers[None] = self.receivers[0] # <<<<<<<<<<<<<< + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] + * else: +*/ + if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 896, __pyx_L7_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.receivers, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyObject_SetItem(__pyx_v_self->tagged_receivers, Py_None, __pyx_t_2) < 0))) __PYX_ERR(0, 896, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":897 + * if len(self.spec.output_tags) == 1: + * self.tagged_receivers[None] = self.receivers[0] + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] # <<<<<<<<<<<<<< + * else: + * for index, tag in enumerate(self.spec.output_tags): +*/ + if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 897, __pyx_L7_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.receivers, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_output_tags); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 897, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 897, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely((PyObject_SetItem(__pyx_v_self->tagged_receivers, __pyx_t_10, __pyx_t_2) < 0))) __PYX_ERR(0, 897, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":895 + * self.counter_factory, self.name_context.logging_name()) + * + * if len(self.spec.output_tags) == 1: # <<<<<<<<<<<<<< + * self.tagged_receivers[None] = self.receivers[0] + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] +*/ + goto __pyx_L15; + } + + /* "apache_beam/runners/worker/operations.py":899 + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] + * else: + * for index, tag in enumerate(self.spec.output_tags): # <<<<<<<<<<<<<< + * self.tagged_receivers[tag] = self.receivers[index] + * if tag == 'None': +*/ + /*else*/ { + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_output_tags); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 899, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { + __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); + __pyx_t_14 = 0; + __pyx_t_16 = NULL; + } else { + __pyx_t_14 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 899, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 899, __pyx_L7_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + for (;;) { + if (likely(!__pyx_t_16)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 899, __pyx_L7_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + __pyx_t_10 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_14; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 899, __pyx_L7_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_10 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_14)); + #else + __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_14); + #endif + ++__pyx_t_14; + } + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 899, __pyx_L7_error) + } else { + __pyx_t_10 = __pyx_t_16(__pyx_t_11); + if (unlikely(!__pyx_t_10)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 899, __pyx_L7_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_10); + __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2); + __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 899, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/runners/worker/operations.py":900 + * else: + * for index, tag in enumerate(self.spec.output_tags): + * self.tagged_receivers[tag] = self.receivers[index] # <<<<<<<<<<<<<< + * if tag == 'None': + * self.tagged_receivers[None] = self.receivers[index] +*/ + if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 900, __pyx_L7_error) + } + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.receivers, __pyx_v_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 900, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + if (unlikely((PyObject_SetItem(__pyx_v_self->tagged_receivers, __pyx_v_tag, __pyx_t_10) < 0))) __PYX_ERR(0, 900, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/worker/operations.py":901 + * for index, tag in enumerate(self.spec.output_tags): + * self.tagged_receivers[tag] = self.receivers[index] + * if tag == 'None': # <<<<<<<<<<<<<< + * self.tagged_receivers[None] = self.receivers[index] + * +*/ + __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_mstate_global->__pyx_n_u_None, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 901, __pyx_L7_error) + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":902 + * self.tagged_receivers[tag] = self.receivers[index] + * if tag == 'None': + * self.tagged_receivers[None] = self.receivers[index] # <<<<<<<<<<<<<< + * + * if self.user_state_context: +*/ + if (unlikely(__pyx_v_self->__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 902, __pyx_L7_error) + } + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.receivers, __pyx_v_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + if (unlikely((PyObject_SetItem(__pyx_v_self->tagged_receivers, Py_None, __pyx_t_10) < 0))) __PYX_ERR(0, 902, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/runners/worker/operations.py":901 + * for index, tag in enumerate(self.spec.output_tags): + * self.tagged_receivers[tag] = self.receivers[index] + * if tag == 'None': # <<<<<<<<<<<<<< + * self.tagged_receivers[None] = self.receivers[index] + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":899 + * self.tagged_receivers[self.spec.output_tags[0]] = self.receivers[0] + * else: + * for index, tag in enumerate(self.spec.output_tags): # <<<<<<<<<<<<<< + * self.tagged_receivers[tag] = self.receivers[index] + * if tag == 'None': +*/ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L15:; + + /* "apache_beam/runners/worker/operations.py":904 + * self.tagged_receivers[None] = self.receivers[index] + * + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.timer_specs = { + * spec.name: spec +*/ + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 904, __pyx_L7_error) + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":905 + * + * if self.user_state_context: + * self.timer_specs = { # <<<<<<<<<<<<<< + * spec.name: spec + * for spec in userstate.get_dofn_specs(fn)[1] +*/ + { /* enter inner scope */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":907 + * self.timer_specs = { + * spec.name: spec + * for spec in userstate.get_dofn_specs(fn)[1] # <<<<<<<<<<<<<< + * } # type: Dict[str, TimerSpec] + * +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_userstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_dofn_specs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_10); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_fn}; + __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 907, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); + __pyx_t_14 = 0; + __pyx_t_16 = NULL; + } else { + __pyx_t_14 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 907, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 907, __pyx_L23_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_16)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 907, __pyx_L23_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_14; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 907, __pyx_L23_error) + #endif + if (__pyx_t_14 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_14)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_14); + #endif + ++__pyx_t_14; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L23_error) + } else { + __pyx_t_4 = __pyx_t_16(__pyx_t_11); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 907, __pyx_L23_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_spec, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":906 + * if self.user_state_context: + * self.timer_specs = { + * spec.name: spec # <<<<<<<<<<<<<< + * for spec in userstate.get_dofn_specs(fn)[1] + * } # type: Dict[str, TimerSpec] +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_spec, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_t_4, (PyObject*)__pyx_8genexpr3__pyx_v_spec))) __PYX_ERR(0, 906, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":907 + * self.timer_specs = { + * spec.name: spec + * for spec in userstate.get_dofn_specs(fn)[1] # <<<<<<<<<<<<<< + * } # type: Dict[str, TimerSpec] + * +*/ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec); __pyx_8genexpr3__pyx_v_spec = 0; + goto __pyx_L27_exit_scope; + __pyx_L23_error:; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec); __pyx_8genexpr3__pyx_v_spec = 0; + goto __pyx_L7_error; + __pyx_L27_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/runners/worker/operations.py":905 + * + * if self.user_state_context: + * self.timer_specs = { # <<<<<<<<<<<<<< + * spec.name: spec + * for spec in userstate.get_dofn_specs(fn)[1] +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->timer_specs); + __Pyx_DECREF(__pyx_v_self->timer_specs); + __pyx_v_self->timer_specs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":904 + * self.tagged_receivers[None] = self.receivers[index] + * + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.timer_specs = { + * spec.name: spec +*/ + } + + /* "apache_beam/runners/worker/operations.py":910 + * } # type: Dict[str, TimerSpec] + * + * if self.side_input_maps is None: # <<<<<<<<<<<<<< + * if tags_and_types: + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) +*/ + __pyx_t_15 = (__pyx_v_self->side_input_maps == Py_None); + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":911 + * + * if self.side_input_maps is None: + * if tags_and_types: # <<<<<<<<<<<<<< + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) + * else: +*/ + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_tags_and_types); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 911, __pyx_L7_error) + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":912 + * if self.side_input_maps is None: + * if tags_and_types: + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) # <<<<<<<<<<<<<< + * else: + * self.side_input_maps = [] +*/ + __pyx_t_11 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_11); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_tags_and_types}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read_side_inputs, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 912, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_v_self->side_input_maps); + __Pyx_DECREF(__pyx_v_self->side_input_maps); + __pyx_v_self->side_input_maps = __pyx_t_11; + __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":911 + * + * if self.side_input_maps is None: + * if tags_and_types: # <<<<<<<<<<<<<< + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) + * else: +*/ + goto __pyx_L29; + } + + /* "apache_beam/runners/worker/operations.py":914 + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) + * else: + * self.side_input_maps = [] # <<<<<<<<<<<<<< + * + * self.dofn_runner = common.DoFnRunner( +*/ + /*else*/ { + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 914, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_v_self->side_input_maps); + __Pyx_DECREF(__pyx_v_self->side_input_maps); + __pyx_v_self->side_input_maps = __pyx_t_11; + __pyx_t_11 = 0; + } + __pyx_L29:; + + /* "apache_beam/runners/worker/operations.py":910 + * } # type: Dict[str, TimerSpec] + * + * if self.side_input_maps is None: # <<<<<<<<<<<<<< + * if tags_and_types: + * self.side_input_maps = list(self._read_side_inputs(tags_and_types)) +*/ + } + + /* "apache_beam/runners/worker/operations.py":916 + * self.side_input_maps = [] + * + * self.dofn_runner = common.DoFnRunner( # <<<<<<<<<<<<<< + * fn, + * args, +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DoFnRunner); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 916, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":923 + * window_fn, + * tagged_receivers=self.tagged_receivers, + * step_name=self.name_context.logging_name(), # <<<<<<<<<<<<<< + * state=state, + * user_state_context=self.user_state_context, +*/ + __pyx_t_3 = __pyx_v_self->__pyx_base.name_context; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_logging_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":926 + * state=state, + * user_state_context=self.user_state_context, + * transform_id=self.name_context.transform_id, # <<<<<<<<<<<<<< + * operation_name=self.name_context.metrics_name()) + * self.dofn_runner.setup() +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.name_context, __pyx_mstate_global->__pyx_n_u_transform_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":927 + * user_state_context=self.user_state_context, + * transform_id=self.name_context.transform_id, + * operation_name=self.name_context.metrics_name()) # <<<<<<<<<<<<<< + * self.dofn_runner.setup() + * +*/ + __pyx_t_12 = __pyx_v_self->__pyx_base.name_context; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_metrics_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 927, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[6 + ((CYTHON_VECTORCALL) ? 6 : 0)] = {__pyx_t_2, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs, __pyx_v_self->side_input_maps, __pyx_v_window_fn}; + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tagged_receivers, __pyx_v_self->tagged_receivers, __pyx_t_12, __pyx_callargs+6, 0) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_step_name, __pyx_t_4, __pyx_t_12, __pyx_callargs+6, 1) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_state, __pyx_v_state, __pyx_t_12, __pyx_callargs+6, 2) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_user_state_context, __pyx_v_self->user_state_context, __pyx_t_12, __pyx_callargs+6, 3) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_transform_id, __pyx_t_3, __pyx_t_12, __pyx_callargs+6, 4) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_operation_name, __pyx_t_9, __pyx_t_12, __pyx_callargs+6, 5) < (0)) __PYX_ERR(0, 916, __pyx_L7_error) + __pyx_t_11 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 916, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + } + + /* "apache_beam/runners/worker/operations.py":916 + * self.side_input_maps = [] + * + * self.dofn_runner = common.DoFnRunner( # <<<<<<<<<<<<<< + * fn, + * args, +*/ + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner))))) __PYX_ERR(0, 916, __pyx_L7_error) + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_DECREF((PyObject *)__pyx_v_self->dofn_runner); + __pyx_v_self->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":928 + * transform_id=self.name_context.transform_id, + * operation_name=self.name_context.metrics_name()) + * self.dofn_runner.setup() # <<<<<<<<<<<<<< + * + * def start(self): +*/ + __pyx_t_10 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 928, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":878 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(DoOperation, self).setup(data_sampler) + * +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_12) < 0) __PYX_ERR(0, 878, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_11, __pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 878, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 878, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_17); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (__pyx_t_15 < (0)) __PYX_ERR(0, 878, __pyx_L9_except_error) + __pyx_t_18 = (!__pyx_t_15); + if (unlikely(__pyx_t_18)) { + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_10, __pyx_t_12); + __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_12 = 0; + __PYX_ERR(0, 878, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L33; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L33:; + } + + /* "apache_beam/runners/worker/operations.py":876 + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_fn); + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_tags_and_types); + __Pyx_XDECREF(__pyx_v_window_fn); + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_spec); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":930 + * self.dofn_runner.setup() + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_start_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":932 + * def start(self): + * # type: () -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(DoOperation, self).start() + * self.dofn_runner.execution_context = self.execution_context +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":933 + * # type: () -> None + * with self.scoped_start_state: + * super(DoOperation, self).start() # <<<<<<<<<<<<<< + * self.dofn_runner.execution_context = self.execution_context + * self.dofn_runner.start() +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_4 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":934 + * with self.scoped_start_state: + * super(DoOperation, self).start() + * self.dofn_runner.execution_context = self.execution_context # <<<<<<<<<<<<<< + * self.dofn_runner.start() + * +*/ + __pyx_t_1 = __pyx_v_self->__pyx_base.execution_context; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->dofn_runner->execution_context); + __Pyx_DECREF(__pyx_v_self->dofn_runner->execution_context); + __pyx_v_self->dofn_runner->execution_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":935 + * super(DoOperation, self).start() + * self.dofn_runner.execution_context = self.execution_context + * self.dofn_runner.start() # <<<<<<<<<<<<<< + * + * def get_batching_preference(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":932 + * def start(self): + * # type: () -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * super(DoOperation, self).start() + * self.dofn_runner.execution_context = self.execution_context +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 932, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 932, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 932, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 932, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":930 + * self.dofn_runner.setup() + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_start_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_8start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7start(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_7start(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":937 + * self.dofn_runner.start() + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * if self.fn._process_batch_defined: + * if self.fn._process_defined: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference = {"get_batching_preference", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_batching_preference (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_batching_preference", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_batching_preference", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_9get_batching_preference(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_batching_preference", 0); + + /* "apache_beam/runners/worker/operations.py":938 + * + * def get_batching_preference(self): + * if self.fn._process_batch_defined: # <<<<<<<<<<<<<< + * if self.fn._process_defined: + * return common.BatchingPreference.DO_NOT_CARE +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fn, __pyx_mstate_global->__pyx_n_u_process_batch_defined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/worker/operations.py":939 + * def get_batching_preference(self): + * if self.fn._process_batch_defined: + * if self.fn._process_defined: # <<<<<<<<<<<<<< + * return common.BatchingPreference.DO_NOT_CARE + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fn, __pyx_mstate_global->__pyx_n_u_process_defined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 939, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/worker/operations.py":940 + * if self.fn._process_batch_defined: + * if self.fn._process_defined: + * return common.BatchingPreference.DO_NOT_CARE # <<<<<<<<<<<<<< + * else: + * return common.BatchingPreference.BATCH_REQUIRED +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DO_NOT_CARE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":939 + * def get_batching_preference(self): + * if self.fn._process_batch_defined: + * if self.fn._process_defined: # <<<<<<<<<<<<<< + * return common.BatchingPreference.DO_NOT_CARE + * else: +*/ + } + + /* "apache_beam/runners/worker/operations.py":942 + * return common.BatchingPreference.DO_NOT_CARE + * else: + * return common.BatchingPreference.BATCH_REQUIRED # <<<<<<<<<<<<<< + * else: + * return common.BatchingPreference.BATCH_FORBIDDEN +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BATCH_REQUIRED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/worker/operations.py":938 + * + * def get_batching_preference(self): + * if self.fn._process_batch_defined: # <<<<<<<<<<<<<< + * if self.fn._process_defined: + * return common.BatchingPreference.DO_NOT_CARE +*/ + } + + /* "apache_beam/runners/worker/operations.py":944 + * return common.BatchingPreference.BATCH_REQUIRED + * else: + * return common.BatchingPreference.BATCH_FORBIDDEN # <<<<<<<<<<<<<< + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_BatchingPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BATCH_FORBIDDEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/worker/operations.py":937 + * self.dofn_runner.start() + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * if self.fn._process_batch_defined: + * if self.fn._process_defined: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_batching_preference", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":946 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'input_batch_converter', None) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter = {"get_input_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_input_batch_converter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_input_batch_converter", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_input_batch_converter", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_11get_input_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_input_batch_converter", 0); + + /* "apache_beam/runners/worker/operations.py":947 + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: + * return getattr(self.fn, 'input_batch_converter', None) # <<<<<<<<<<<<<< + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->fn; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_input_batch_converter, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":946 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'input_batch_converter', None) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_input_batch_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":949 + * return getattr(self.fn, 'input_batch_converter', None) + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'output_batch_converter', None) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter = {"get_output_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_output_batch_converter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_output_batch_converter", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_output_batch_converter", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_13get_output_batch_converter(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_output_batch_converter", 0); + + /* "apache_beam/runners/worker/operations.py":950 + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: + * return getattr(self.fn, 'output_batch_converter', None) # <<<<<<<<<<<<<< + * + * def process(self, o): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->fn; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_output_batch_converter, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":949 + * return getattr(self.fn, 'input_batch_converter', None) + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'output_batch_converter', None) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.get_output_batch_converter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":952 + * return getattr(self.fn, 'output_batch_converter', None) + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) { + PyObject *__pyx_v_delayed_applications = NULL; + PyObject *__pyx_v_delayed_application = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_o)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":954 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * delayed_applications = self.dofn_runner.process(o) + * if delayed_applications: +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":955 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * delayed_applications = self.dofn_runner.process(o) # <<<<<<<<<<<<<< + * if delayed_applications: + * assert self.execution_context is not None +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner *)__pyx_v_self->dofn_runner->__pyx_vtab)->process(__pyx_v_self->dofn_runner, __pyx_v_o, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_delayed_applications = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":956 + * with self.scoped_process_state: + * delayed_applications = self.dofn_runner.process(o) + * if delayed_applications: # <<<<<<<<<<<<<< + * assert self.execution_context is not None + * for delayed_application in delayed_applications: +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_delayed_applications); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 956, __pyx_L7_error) + if (__pyx_t_10) { + + /* "apache_beam/runners/worker/operations.py":957 + * delayed_applications = self.dofn_runner.process(o) + * if delayed_applications: + * assert self.execution_context is not None # <<<<<<<<<<<<<< + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_10 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (unlikely(!__pyx_t_10)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 957, __pyx_L7_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 957, __pyx_L7_error) + #endif + + /* "apache_beam/runners/worker/operations.py":958 + * if delayed_applications: + * assert self.execution_context is not None + * for delayed_application in delayed_applications: # <<<<<<<<<<<<<< + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) +*/ + if (likely(PyList_CheckExact(__pyx_v_delayed_applications)) || PyTuple_CheckExact(__pyx_v_delayed_applications)) { + __pyx_t_1 = __pyx_v_delayed_applications; __Pyx_INCREF(__pyx_t_1); + __pyx_t_11 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_delayed_applications); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L7_error) + } + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 958, __pyx_L7_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_11; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 958, __pyx_L7_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); + #endif + ++__pyx_t_11; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L7_error) + } else { + __pyx_t_4 = __pyx_t_12(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 958, __pyx_L7_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_delayed_application, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":959 + * assert self.execution_context is not None + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( # <<<<<<<<<<<<<< + * (self, delayed_application)) + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.execution_context, __pyx_mstate_global->__pyx_n_u_delayed_applications); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":960 + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) # <<<<<<<<<<<<<< + * + * def process_batch(self, windowed_batch: WindowedBatch) -> None: +*/ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 960, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_delayed_application); + __Pyx_GIVEREF(__pyx_v_delayed_application); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_delayed_application) != (0)) __PYX_ERR(0, 960, __pyx_L7_error); + + /* "apache_beam/runners/worker/operations.py":959 + * assert self.execution_context is not None + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( # <<<<<<<<<<<<<< + * (self, delayed_application)) + * +*/ + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_2); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 959, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":958 + * if delayed_applications: + * assert self.execution_context is not None + * for delayed_application in delayed_applications: # <<<<<<<<<<<<<< + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":956 + * with self.scoped_process_state: + * delayed_applications = self.dofn_runner.process(o) + * if delayed_applications: # <<<<<<<<<<<<<< + * assert self.execution_context is not None + * for delayed_application in delayed_applications: +*/ + } + + /* "apache_beam/runners/worker/operations.py":954 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * delayed_applications = self.dofn_runner.process(o) + * if delayed_applications: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 954, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 954, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__pyx_t_10 < (0)) __PYX_ERR(0, 954, __pyx_L9_except_error) + __pyx_t_15 = (!__pyx_t_10); + if (unlikely(__pyx_t_15)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 954, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L20; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L20:; + } + + /* "apache_beam/runners/worker/operations.py":952 + * return getattr(self.fn, 'output_batch_converter', None) + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_delayed_applications); + __Pyx_XDECREF(__pyx_v_delayed_application); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_16process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 952, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 952, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 952, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) + } + __pyx_v_o = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 952, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_15process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_o); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_15process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":962 + * (self, delayed_application)) + * + * def process_batch(self, windowed_batch: WindowedBatch) -> None: # <<<<<<<<<<<<<< + * self.dofn_runner.process_batch(windowed_batch) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch = {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_batch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_batch,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 962, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 962, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_batch", 0) < (0)) __PYX_ERR(0, 962, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, i); __PYX_ERR(0, 962, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 962, __pyx_L3_error) + } + __pyx_v_windowed_batch = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_batch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 962, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_batch), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, 0, "windowed_batch", 0))) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_17process_batch(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_windowed_batch); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_17process_batch(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_windowed_batch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_batch", 0); + + /* "apache_beam/runners/worker/operations.py":963 + * + * def process_batch(self, windowed_batch: WindowedBatch) -> None: + * self.dofn_runner.process_batch(windowed_batch) # <<<<<<<<<<<<<< + * + * def finalize_bundle(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_windowed_batch)}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_batch, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":962 + * (self, delayed_application)) + * + * def process_batch(self, windowed_batch: WindowedBatch) -> None: # <<<<<<<<<<<<<< + * self.dofn_runner.process_batch(windowed_batch) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_batch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":965 + * self.dofn_runner.process_batch(windowed_batch) + * + * def finalize_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.dofn_runner.finalize() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle = {"finalize_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize_bundle (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize_bundle", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize_bundle", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_19finalize_bundle(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize_bundle", 0); + + /* "apache_beam/runners/worker/operations.py":967 + * def finalize_bundle(self): + * # type: () -> None + * self.dofn_runner.finalize() # <<<<<<<<<<<<<< + * + * def needs_finalization(self): +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":965 + * self.dofn_runner.process_batch(windowed_batch) + * + * def finalize_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.dofn_runner.finalize() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finalize_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":969 + * self.dofn_runner.finalize() + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization = {"needs_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("needs_finalization (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("needs_finalization", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("needs_finalization", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_21needs_finalization(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("needs_finalization", 0); + + /* "apache_beam/runners/worker/operations.py":971 + * def needs_finalization(self): + * # type: () -> bool + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() # <<<<<<<<<<<<<< + * + * def add_timer_info(self, timer_family_id, timer_info): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->dofn_runner->bundle_finalizer_param; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_has_callbacks, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":969 + * self.dofn_runner.finalize() + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.needs_finalization", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":973 + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() + * + * def add_timer_info(self, timer_family_id, timer_info): # <<<<<<<<<<<<<< + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info = {"add_timer_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_timer_family_id = 0; + PyObject *__pyx_v_timer_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_timer_info (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timer_family_id,&__pyx_mstate_global->__pyx_n_u_timer_info,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 973, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 973, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 973, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_timer_info", 0) < (0)) __PYX_ERR(0, 973, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_timer_info", 1, 2, 2, i); __PYX_ERR(0, 973, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 973, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 973, __pyx_L3_error) + } + __pyx_v_timer_family_id = values[0]; + __pyx_v_timer_info = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_timer_info", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 973, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.add_timer_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_timer_family_id, __pyx_v_timer_info); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_23add_timer_info(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_timer_family_id, PyObject *__pyx_v_timer_info) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_timer_info", 0); + + /* "apache_beam/runners/worker/operations.py":974 + * + * def add_timer_info(self, timer_family_id, timer_info): + * self.user_state_context.add_timer_info(timer_family_id, timer_info) # <<<<<<<<<<<<<< + * + * def process_timer(self, tag, timer_data): +*/ + __pyx_t_2 = __pyx_v_self->user_state_context; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_timer_family_id, __pyx_v_timer_info}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_timer_info, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":973 + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() + * + * def add_timer_info(self, timer_family_id, timer_info): # <<<<<<<<<<<<<< + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.add_timer_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":976 + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * + * def process_timer(self, tag, timer_data): # <<<<<<<<<<<<<< + * with self.scoped_timer_processing_state: + * timer_spec = self.timer_specs[tag] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer = {"process_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_tag = 0; + PyObject *__pyx_v_timer_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_timer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_timer_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 976, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 976, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_timer", 0) < (0)) __PYX_ERR(0, 976, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_timer", 1, 2, 2, i); __PYX_ERR(0, 976, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 976, __pyx_L3_error) + } + __pyx_v_tag = values[0]; + __pyx_v_timer_data = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_timer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 976, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_tag, __pyx_v_timer_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_25process_timer(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_timer_data) { + PyObject *__pyx_v_timer_spec = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_timer", 0); + + /* "apache_beam/runners/worker/operations.py":977 + * + * def process_timer(self, tag, timer_data): + * with self.scoped_timer_processing_state: # <<<<<<<<<<<<<< + * timer_spec = self.timer_specs[tag] + * self.dofn_runner.process_user_timer( +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_timer_processing_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->scoped_timer_processing_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":978 + * def process_timer(self, tag, timer_data): + * with self.scoped_timer_processing_state: + * timer_spec = self.timer_specs[tag] # <<<<<<<<<<<<<< + * self.dofn_runner.process_user_timer( + * timer_spec, +*/ + if (unlikely(__pyx_v_self->timer_specs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 978, __pyx_L7_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->timer_specs, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_timer_spec = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":979 + * with self.scoped_timer_processing_state: + * timer_spec = self.timer_specs[tag] + * self.dofn_runner.process_user_timer( # <<<<<<<<<<<<<< + * timer_spec, + * timer_data.user_key, +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":981 + * self.dofn_runner.process_user_timer( + * timer_spec, + * timer_data.user_key, # <<<<<<<<<<<<<< + * timer_data.windows[0], + * timer_data.fire_timestamp, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_mstate_global->__pyx_n_u_user_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":982 + * timer_spec, + * timer_data.user_key, + * timer_data.windows[0], # <<<<<<<<<<<<<< + * timer_data.fire_timestamp, + * timer_data.paneinfo, +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 982, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/runners/worker/operations.py":983 + * timer_data.user_key, + * timer_data.windows[0], + * timer_data.fire_timestamp, # <<<<<<<<<<<<<< + * timer_data.paneinfo, + * timer_data.dynamic_timer_tag) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_mstate_global->__pyx_n_u_fire_timestamp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 983, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/runners/worker/operations.py":984 + * timer_data.windows[0], + * timer_data.fire_timestamp, + * timer_data.paneinfo, # <<<<<<<<<<<<<< + * timer_data.dynamic_timer_tag) + * +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_mstate_global->__pyx_n_u_paneinfo); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 984, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":985 + * timer_data.fire_timestamp, + * timer_data.paneinfo, + * timer_data.dynamic_timer_tag) # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_data, __pyx_mstate_global->__pyx_n_u_dynamic_timer_tag); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 985, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_timer_spec, __pyx_t_3, __pyx_t_10, __pyx_t_9, __pyx_t_11, __pyx_t_12}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_user_timer, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":977 + * + * def process_timer(self, tag, timer_data): + * with self.scoped_timer_processing_state: # <<<<<<<<<<<<<< + * timer_spec = self.timer_specs[tag] + * self.dofn_runner.process_user_timer( +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_12, &__pyx_t_11) < 0) __PYX_ERR(0, 977, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_9 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 977, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 977, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (__pyx_t_14 < (0)) __PYX_ERR(0, 977, __pyx_L9_except_error) + __pyx_t_15 = (!__pyx_t_14); + if (unlikely(__pyx_t_15)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_12, __pyx_t_11); + __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; + __PYX_ERR(0, 977, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":976 + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * + * def process_timer(self, tag, timer_data): # <<<<<<<<<<<<<< + * with self.scoped_timer_processing_state: + * timer_spec = self.timer_specs[tag] +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.process_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_timer_spec); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":987 + * timer_data.dynamic_timer_tag) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).finish() +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":989 + * def finish(self): + * # type: () -> None + * super(DoOperation, self).finish() # <<<<<<<<<<<<<< + * with self.scoped_finish_state: + * self.dofn_runner.finish() +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":990 + * # type: () -> None + * super(DoOperation, self).finish() + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * self.dofn_runner.finish() + * if self.user_state_context: +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = NULL; + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":991 + * super(DoOperation, self).finish() + * with self.scoped_finish_state: + * self.dofn_runner.finish() # <<<<<<<<<<<<<< + * if self.user_state_context: + * self.user_state_context.commit() +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":992 + * with self.scoped_finish_state: + * self.dofn_runner.finish() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.commit() + * +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 992, __pyx_L7_error) + if (__pyx_t_10) { + + /* "apache_beam/runners/worker/operations.py":993 + * self.dofn_runner.finish() + * if self.user_state_context: + * self.user_state_context.commit() # <<<<<<<<<<<<<< + * + * def teardown(self): +*/ + __pyx_t_2 = __pyx_v_self->user_state_context; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_commit, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":992 + * with self.scoped_finish_state: + * self.dofn_runner.finish() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.commit() + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":990 + * # type: () -> None + * super(DoOperation, self).finish() + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * self.dofn_runner.finish() + * if self.user_state_context: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 990, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 990, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 990, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_10 < (0)) __PYX_ERR(0, 990, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_10); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 990, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/runners/worker/operations.py":987 + * timer_data.dynamic_timer_tag) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).finish() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_27finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_27finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":995 + * self.user_state_context.commit() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":997 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * self.dofn_runner.teardown() + * if self.user_state_context: +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":998 + * # type: () -> None + * with self.scoped_finish_state: + * self.dofn_runner.teardown() # <<<<<<<<<<<<<< + * if self.user_state_context: + * self.user_state_context.reset() +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_teardown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":997 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * self.dofn_runner.teardown() + * if self.user_state_context: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 997, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 997, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 997, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_2); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 997, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":999 + * with self.scoped_finish_state: + * self.dofn_runner.teardown() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.reset() + * +*/ + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 999, __pyx_L1_error) + if (__pyx_t_12) { + + /* "apache_beam/runners/worker/operations.py":1000 + * self.dofn_runner.teardown() + * if self.user_state_context: + * self.user_state_context.reset() # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_4 = __pyx_v_self->user_state_context; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":999 + * with self.scoped_finish_state: + * self.dofn_runner.teardown() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.reset() + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":995 + * self.user_state_context.commit() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown = {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_29teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_29teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1002 + * self.user_state_context.reset() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).reset() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_31reset(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_v_side_input_map = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/runners/worker/operations.py":1004 + * def reset(self): + * # type: () -> None + * super(DoOperation, self).reset() # <<<<<<<<<<<<<< + * for side_input_map in self.side_input_maps: + * side_input_map.reset() +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1005 + * # type: () -> None + * super(DoOperation, self).reset() + * for side_input_map in self.side_input_maps: # <<<<<<<<<<<<<< + * side_input_map.reset() + * if self.user_state_context: +*/ + if (likely(PyList_CheckExact(__pyx_v_self->side_input_maps)) || PyTuple_CheckExact(__pyx_v_self->side_input_maps)) { + __pyx_t_1 = __pyx_v_self->side_input_maps; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->side_input_maps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1005, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1005, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error) + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1005, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_side_input_map, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1006 + * super(DoOperation, self).reset() + * for side_input_map in self.side_input_maps: + * side_input_map.reset() # <<<<<<<<<<<<<< + * if self.user_state_context: + * self.user_state_context.reset() +*/ + __pyx_t_2 = __pyx_v_side_input_map; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1005 + * # type: () -> None + * super(DoOperation, self).reset() + * for side_input_map in self.side_input_maps: # <<<<<<<<<<<<<< + * side_input_map.reset() + * if self.user_state_context: +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1007 + * for side_input_map in self.side_input_maps: + * side_input_map.reset() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.reset() + * self.dofn_runner.bundle_finalizer_param.reset() +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->user_state_context); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1007, __pyx_L1_error) + if (__pyx_t_8) { + + /* "apache_beam/runners/worker/operations.py":1008 + * side_input_map.reset() + * if self.user_state_context: + * self.user_state_context.reset() # <<<<<<<<<<<<<< + * self.dofn_runner.bundle_finalizer_param.reset() + * +*/ + __pyx_t_3 = __pyx_v_self->user_state_context; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1007 + * for side_input_map in self.side_input_maps: + * side_input_map.reset() + * if self.user_state_context: # <<<<<<<<<<<<<< + * self.user_state_context.reset() + * self.dofn_runner.bundle_finalizer_param.reset() +*/ + } + + /* "apache_beam/runners/worker/operations.py":1009 + * if self.user_state_context: + * self.user_state_context.reset() + * self.dofn_runner.bundle_finalizer_param.reset() # <<<<<<<<<<<<<< + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): +*/ + __pyx_t_3 = __pyx_v_self->dofn_runner->bundle_finalizer_param; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1002 + * self.user_state_context.reset() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).reset() +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_side_input_map); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1011 + * self.dofn_runner.bundle_finalizer_param.reset() + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) { + PyObject *__pyx_v_infos = NULL; + PyObject *__pyx_v_tag = NULL; + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_v_pcollection_id = NULL; + PyObject *__pyx_v_mi = NULL; + CYTHON_UNUSED PyObject *__pyx_v_unused_mean = NULL; + PyObject *__pyx_v_sum = NULL; + PyObject *__pyx_v_count = NULL; + PyObject *__pyx_v_min = NULL; + PyObject *__pyx_v_max = NULL; + PyObject *__pyx_v_sampled_byte_count = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *(*__pyx_t_16)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pcollection_count_monitoring_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tag_to_pcollection_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1015 + * + * """Returns the element count MonitoringInfo collected by this operation.""" + * infos = super( # <<<<<<<<<<<<<< + * DoOperation, + * self).pcollection_count_monitoring_infos(tag_to_pcollection_id) +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/runners/worker/operations.py":1017 + * infos = super( + * DoOperation, + * self).pcollection_count_monitoring_infos(tag_to_pcollection_id) # <<<<<<<<<<<<<< + * + * if self.tagged_receivers: +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tag_to_pcollection_id}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pcollection_count_monitoring_inf, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_infos = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1019 + * self).pcollection_count_monitoring_infos(tag_to_pcollection_id) + * + * if self.tagged_receivers: # <<<<<<<<<<<<<< + * for tag, receiver in self.tagged_receivers.items(): + * if str(tag) not in tag_to_pcollection_id: +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->tagged_receivers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1019, __pyx_L1_error) + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1020 + * + * if self.tagged_receivers: + * for tag, receiver in self.tagged_receivers.items(): # <<<<<<<<<<<<<< + * if str(tag) not in tag_to_pcollection_id: + * continue +*/ + __pyx_t_7 = 0; + if (unlikely(__pyx_v_self->tagged_receivers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 1020, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_self->tagged_receivers, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_2, NULL, __pyx_t_9); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1021 + * if self.tagged_receivers: + * for tag, receiver in self.tagged_receivers.items(): + * if str(tag) not in tag_to_pcollection_id: # <<<<<<<<<<<<<< + * continue + * pcollection_id = tag_to_pcollection_id[str(tag)] +*/ + __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_tag_to_pcollection_id, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1021, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1022 + * for tag, receiver in self.tagged_receivers.items(): + * if str(tag) not in tag_to_pcollection_id: + * continue # <<<<<<<<<<<<<< + * pcollection_id = tag_to_pcollection_id[str(tag)] + * mi = monitoring_infos.int64_counter( +*/ + goto __pyx_L4_continue; + + /* "apache_beam/runners/worker/operations.py":1021 + * if self.tagged_receivers: + * for tag, receiver in self.tagged_receivers.items(): + * if str(tag) not in tag_to_pcollection_id: # <<<<<<<<<<<<<< + * continue + * pcollection_id = tag_to_pcollection_id[str(tag)] +*/ + } + + /* "apache_beam/runners/worker/operations.py":1023 + * if str(tag) not in tag_to_pcollection_id: + * continue + * pcollection_id = tag_to_pcollection_id[str(tag)] # <<<<<<<<<<<<<< + * mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, +*/ + __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_tag_to_pcollection_id, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_pcollection_id, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1024 + * continue + * pcollection_id = tag_to_pcollection_id[str(tag)] + * mi = monitoring_infos.int64_counter( # <<<<<<<<<<<<<< + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_int64_counter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1025 + * pcollection_id = tag_to_pcollection_id[str(tag)] + * mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, # <<<<<<<<<<<<<< + * receiver.opcounter.element_counter.value(), + * pcollection=pcollection_id) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ELEMENT_COUNT_URN); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1026 + * mi = monitoring_infos.int64_counter( + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), # <<<<<<<<<<<<<< + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(mi)] = mi +*/ + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_element_counter); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_13 = __pyx_t_15; + __Pyx_INCREF(__pyx_t_13); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/runners/worker/operations.py":1027 + * monitoring_infos.ELEMENT_COUNT_URN, + * receiver.opcounter.element_counter.value(), + * pcollection=pcollection_id) # <<<<<<<<<<<<<< + * infos[monitoring_infos.to_key(mi)] = mi + * (unused_mean, sum, count, min, max) = ( +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_12, __pyx_t_3}; + __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_pcollection, __pyx_v_pcollection_id, __pyx_t_15, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_mi, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1028 + * receiver.opcounter.element_counter.value(), + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(mi)] = mi # <<<<<<<<<<<<<< + * (unused_mean, sum, count, min, max) = ( + * receiver.opcounter.mean_byte_counter.value()) +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_mi}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (unlikely((PyObject_SetItem(__pyx_v_infos, __pyx_t_4, __pyx_v_mi) < 0))) __PYX_ERR(0, 1028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1030 + * infos[monitoring_infos.to_key(mi)] = mi + * (unused_mean, sum, count, min, max) = ( + * receiver.opcounter.mean_byte_counter.value()) # <<<<<<<<<<<<<< + * sampled_byte_count = monitoring_infos.int64_distribution( + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_mean_byte_counter); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_3 = __pyx_t_15; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_value, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 5)) { + if (size > 5) __Pyx_RaiseTooManyValuesError(5); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1029, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_15); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_11); + __pyx_t_12 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_12); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 4); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_15 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_15); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + { + Py_ssize_t i; + PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_3,&__pyx_t_11,&__pyx_t_12,&__pyx_t_2}; + for (i=0; i < 5; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_3,&__pyx_t_11,&__pyx_t_12,&__pyx_t_2}; + __pyx_t_13 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); + for (index=0; index < 5; index++) { + PyObject* item = __pyx_t_16(__pyx_t_13); if (unlikely(!item)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_13), 5) < (0)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_16 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_16 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + + /* "apache_beam/runners/worker/operations.py":1029 + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(mi)] = mi + * (unused_mean, sum, count, min, max) = ( # <<<<<<<<<<<<<< + * receiver.opcounter.mean_byte_counter.value()) + * sampled_byte_count = monitoring_infos.int64_distribution( +*/ + __Pyx_XDECREF_SET(__pyx_v_unused_mean, __pyx_t_15); + __pyx_t_15 = 0; + __Pyx_XDECREF_SET(__pyx_v_sum, __pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_11); + __pyx_t_11 = 0; + __Pyx_XDECREF_SET(__pyx_v_min, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_XDECREF_SET(__pyx_v_max, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1031 + * (unused_mean, sum, count, min, max) = ( + * receiver.opcounter.mean_byte_counter.value()) + * sampled_byte_count = monitoring_infos.int64_distribution( # <<<<<<<<<<<<<< + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_int64_distribution); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1032 + * receiver.opcounter.mean_byte_counter.value()) + * sampled_byte_count = monitoring_infos.int64_distribution( + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, # <<<<<<<<<<<<<< + * DistributionData(sum, count, min, max), + * pcollection=pcollection_id) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_SAMPLED_BYTE_SIZE_URN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1033 + * sampled_byte_count = monitoring_infos.int64_distribution( + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), # <<<<<<<<<<<<<< + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count +*/ + __pyx_t_15 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DistributionData); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_15); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_15, __pyx_v_sum, __pyx_v_count, __pyx_v_min, __pyx_v_max}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + + /* "apache_beam/runners/worker/operations.py":1034 + * monitoring_infos.SAMPLED_BYTE_SIZE_URN, + * DistributionData(sum, count, min, max), + * pcollection=pcollection_id) # <<<<<<<<<<<<<< + * infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count + * return infos +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3, __pyx_t_12}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_pcollection, __pyx_v_pcollection_id, __pyx_t_13, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_sampled_byte_count, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1035 + * DistributionData(sum, count, min, max), + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count # <<<<<<<<<<<<<< + * return infos + * +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_sampled_byte_count}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (unlikely((PyObject_SetItem(__pyx_v_infos, __pyx_t_4, __pyx_v_sampled_byte_count) < 0))) __PYX_ERR(0, 1035, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L4_continue:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1019 + * self).pcollection_count_monitoring_infos(tag_to_pcollection_id) + * + * if self.tagged_receivers: # <<<<<<<<<<<<<< + * for tag, receiver in self.tagged_receivers.items(): + * if str(tag) not in tag_to_pcollection_id: +*/ + } + + /* "apache_beam/runners/worker/operations.py":1036 + * pcollection=pcollection_id) + * infos[monitoring_infos.to_key(sampled_byte_count)] = sampled_byte_count + * return infos # <<<<<<<<<<<<<< + * + * def _get_runtime_performance_hints(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_infos); + __pyx_r = __pyx_v_infos; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1011 + * self.dofn_runner.bundle_finalizer_param.reset() + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_infos); + __Pyx_XDECREF(__pyx_v_tag); + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XDECREF(__pyx_v_pcollection_id); + __Pyx_XDECREF(__pyx_v_mi); + __Pyx_XDECREF(__pyx_v_unused_mean); + __Pyx_XDECREF(__pyx_v_sum); + __Pyx_XDECREF(__pyx_v_count); + __Pyx_XDECREF(__pyx_v_min); + __Pyx_XDECREF(__pyx_v_max); + __Pyx_XDECREF(__pyx_v_sampled_byte_count); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos, "Returns the element count MonitoringInfo collected by this operation."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos = {"pcollection_count_monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_tag_to_pcollection_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tag_to_pcollection_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1011, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1011, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pcollection_count_monitoring_infos", 0) < (0)) __PYX_ERR(0, 1011, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pcollection_count_monitoring_infos", 1, 1, 1, i); __PYX_ERR(0, 1011, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1011, __pyx_L3_error) + } + __pyx_v_tag_to_pcollection_id = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("pcollection_count_monitoring_infos", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1011, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v_tag_to_pcollection_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_33pcollection_count_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_tag_to_pcollection_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pcollection_count_monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos(__pyx_v_self, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.pcollection_count_monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1038 + * return infos + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints = {"_get_runtime_performance_hints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_runtime_performance_hints (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_get_runtime_performance_hints", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_get_runtime_performance_hints", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_35_get_runtime_performance_hints(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_v_fns = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_runtime_performance_hints", 0); + + /* "apache_beam/runners/worker/operations.py":1039 + * + * def _get_runtime_performance_hints(self): + * fns = pickler.loads(self.spec.serialized_fn) # <<<<<<<<<<<<<< + * if fns and hasattr(fns[0], '_runtime_output_constraints'): + * return fns[0]._runtime_output_constraints +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pickler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_serialized_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_fns = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1040 + * def _get_runtime_performance_hints(self): + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): # <<<<<<<<<<<<<< + * return fns[0]._runtime_output_constraints + * +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_fns); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1040, __pyx_L1_error) + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fns, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_HasAttr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_runtime_output_constraints); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1041 + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): + * return fns[0]._runtime_output_constraints # <<<<<<<<<<<<<< + * + * return {} +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fns, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_runtime_output_constraints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1040 + * def _get_runtime_performance_hints(self): + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): # <<<<<<<<<<<<<< + * return fns[0]._runtime_output_constraints + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":1043 + * return fns[0]._runtime_output_constraints + * + * return {} # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1038 + * return infos + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation._get_runtime_performance_hints", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_fns); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":116 + * cdef object side_input_maps + * cdef object user_state_context + * cdef public dict timer_inputs # <<<<<<<<<<<<<< + * cdef dict timer_specs + * cdef public object input_info +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->timer_inputs); + __pyx_r = __pyx_v_self->timer_inputs; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(4, 116, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->timer_inputs); + __Pyx_DECREF(__pyx_v_self->timer_inputs); + __pyx_v_self->timer_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.timer_inputs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timer_inputs); + __Pyx_DECREF(__pyx_v_self->timer_inputs); + __pyx_v_self->timer_inputs = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":118 + * cdef public dict timer_inputs + * cdef dict timer_specs + * cdef public object input_info # <<<<<<<<<<<<<< + * cdef object fn + * cdef object scoped_timer_processing_state +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->input_info); + __pyx_r = __pyx_v_self->input_info; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->input_info); + __Pyx_DECREF(__pyx_v_self->input_info); + __pyx_v_self->input_info = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->input_info); + __Pyx_DECREF(__pyx_v_self->input_info); + __pyx_v_self->input_info = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_37__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_37__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(25); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->dofn_runner); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->dofn_runner); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->dofn_runner)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->fn); + __Pyx_GIVEREF(__pyx_v_self->fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->fn) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->input_info); + __Pyx_GIVEREF(__pyx_v_self->input_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->input_info) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->scoped_timer_processing_state); + __Pyx_GIVEREF(__pyx_v_self->scoped_timer_processing_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->scoped_timer_processing_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->side_input_maps); + __Pyx_GIVEREF(__pyx_v_self->side_input_maps); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_v_self->side_input_maps) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->tagged_receivers); + __Pyx_GIVEREF(__pyx_v_self->tagged_receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->tagged_receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timer_inputs); + __Pyx_GIVEREF(__pyx_v_self->timer_inputs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->timer_inputs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timer_specs); + __Pyx_GIVEREF(__pyx_v_self->timer_specs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 23, __pyx_v_self->timer_specs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->user_state_context); + __Pyx_GIVEREF(__pyx_v_self->user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 24, __pyx_v_self->user_state_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->dofn_runner) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->fn != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->input_info != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->scoped_timer_processing_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->side_input_maps != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->tagged_receivers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->timer_inputs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->timer_specs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->user_state_context != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_332273); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_332273); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_332273) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, None), state + * else: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_332273); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_332273); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_332273) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_39__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_11DoOperation_39__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DoOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.DoOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1047 + * + * class SdfTruncateSizedRestrictions(DoOperation): + * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<< + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (__pyx_kwds_len > 0) { + if (unlikely(__Pyx_CheckKeywordStrings("__init__", __pyx_kwds) == -1)) return -1; + __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); + if (unlikely(!__pyx_v_kwargs)) return -1; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = PyDict_New(); + if (unlikely(!__pyx_v_kwargs)) return -1; + __Pyx_GOTREF(__pyx_v_kwargs); + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1048 + * class SdfTruncateSizedRestrictions(DoOperation): + * def __init__(self, *args, **kwargs): + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1047 + * + * class SdfTruncateSizedRestrictions(DoOperation): + * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<< + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1050 + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * return self.receivers[0].current_element_progress() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_2current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/worker/operations.py":1052 + * def current_element_progress(self): + * # type: () -> Optional[iobase.RestrictionProgress] + * return self.receivers[0].current_element_progress() # <<<<<<<<<<<<<< + * + * def try_split( +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1052, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.__pyx_base.receivers, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1050 + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * return self.receivers[0].current_element_progress() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1054 + * return self.receivers[0].current_element_progress() + * + * def try_split( # <<<<<<<<<<<<<< + * self, fraction_of_remainder + * ): # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction_of_remainder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction_of_remainder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1054, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1054, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 1054, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 1054, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1054, __pyx_L3_error) + } + __pyx_v_fraction_of_remainder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1054, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), __pyx_v_fraction_of_remainder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/worker/operations.py":1057 + * self, fraction_of_remainder + * ): # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * return self.receivers[0].try_split(fraction_of_remainder) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.receivers == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1057, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.__pyx_base.receivers, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_fraction_of_remainder}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1054 + * return self.receivers[0].current_element_progress() + * + * def try_split( # <<<<<<<<<<<<<< + * self, fraction_of_remainder + * ): # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_6__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(25); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.fn); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.fn) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.input_info); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.input_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.input_info) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_timer_processing_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_timer_processing_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.scoped_timer_processing_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.side_input_maps); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.side_input_maps); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_v_self->__pyx_base.side_input_maps) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_v_self->__pyx_base.__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->__pyx_base.__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.tagged_receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.tagged_receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->__pyx_base.tagged_receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_inputs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_inputs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->__pyx_base.timer_inputs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_specs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_specs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 23, __pyx_v_self->__pyx_base.timer_specs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 24, __pyx_v_self->__pyx_base.user_state_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.execution_context, self.fn, self.input_info, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.dofn_runner) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.fn != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.input_info != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_timer_processing_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.side_input_maps != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.step_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.timer_inputs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.timer_specs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfTruncateSizedR); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_332273); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_332273); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_332273) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, None), state + * else: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfTruncateSizedR); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_332273); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_332273); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_332273) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_8__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1061 + * + * class SdfProcessSizedElements(DoOperation): + * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<< + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) + * self.lock = threading.RLock() +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (__pyx_kwds_len > 0) { + if (unlikely(__Pyx_CheckKeywordStrings("__init__", __pyx_kwds) == -1)) return -1; + __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); + if (unlikely(!__pyx_v_kwargs)) return -1; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = PyDict_New(); + if (unlikely(!__pyx_v_kwargs)) return -1; + __Pyx_GOTREF(__pyx_v_kwargs); + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1062 + * class SdfProcessSizedElements(DoOperation): + * def __init__(self, *args, **kwargs): + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) # <<<<<<<<<<<<<< + * self.lock = threading.RLock() + * self.element_start_output_bytes = None # type: Optional[int] +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1063 + * def __init__(self, *args, **kwargs): + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) + * self.lock = threading.RLock() # <<<<<<<<<<<<<< + * self.element_start_output_bytes = None # type: Optional[int] + * +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RLock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->lock); + __Pyx_DECREF(__pyx_v_self->lock); + __pyx_v_self->lock = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1064 + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) + * self.lock = threading.RLock() + * self.element_start_output_bytes = None # type: Optional[int] # <<<<<<<<<<<<<< + * + * def process(self, o): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes); + __Pyx_DECREF(__pyx_v_self->element_start_output_bytes); + __pyx_v_self->element_start_output_bytes = Py_None; + + /* "apache_beam/runners/worker/operations.py":1061 + * + * class SdfProcessSizedElements(DoOperation): + * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<< + * super(SdfProcessSizedElements, self).__init__(*args, **kwargs) + * self.lock = threading.RLock() +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1066 + * self.element_start_output_bytes = None # type: Optional[int] + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) { + PyObject *__pyx_v_receiver = NULL; + PyObject *__pyx_v_delayed_applications = NULL; + PyObject *__pyx_v_delayed_application = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + Py_ssize_t __pyx_t_15; + Py_ssize_t __pyx_t_16; + int __pyx_t_17; + int __pyx_t_18; + PyObject *__pyx_t_19 = NULL; + int __pyx_t_20; + PyObject *(*__pyx_t_21)(PyObject *); + int __pyx_t_22; + char const *__pyx_t_23; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + PyObject *__pyx_t_27 = NULL; + PyObject *__pyx_t_28 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_o)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1068 + * def process(self, o): + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None # <<<<<<<<<<<<<< + * with self.scoped_process_state: + * try: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_6 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None); + if (unlikely(!__pyx_t_6)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1068, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1068, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1069 + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * try: + * with self.lock: +*/ + /*with:*/ { + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1070 + * assert self.tagged_receivers is not None + * with self.scoped_process_state: + * try: # <<<<<<<<<<<<<< + * with self.lock: + * self.element_start_output_bytes = \ +*/ + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1071 + * with self.scoped_process_state: + * try: + * with self.lock: # <<<<<<<<<<<<<< + * self.element_start_output_bytes = \ + * self.tagged_receivers.total_output_bytes() +*/ + /*with:*/ { + __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1071, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_4 = NULL; + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1073 + * with self.lock: + * self.element_start_output_bytes = \ + * self.tagged_receivers.total_output_bytes() # <<<<<<<<<<<<<< + * for receiver in self.tagged_receivers.values(): + * receiver.opcounter.restart_sampling() +*/ + __pyx_t_2 = __pyx_v_self->__pyx_base.tagged_receivers; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_output_bytes, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":1072 + * try: + * with self.lock: + * self.element_start_output_bytes = \ # <<<<<<<<<<<<<< + * self.tagged_receivers.total_output_bytes() + * for receiver in self.tagged_receivers.values(): +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes); + __Pyx_DECREF(__pyx_v_self->element_start_output_bytes); + __pyx_v_self->element_start_output_bytes = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1074 + * self.element_start_output_bytes = \ + * self.tagged_receivers.total_output_bytes() + * for receiver in self.tagged_receivers.values(): # <<<<<<<<<<<<<< + * receiver.opcounter.restart_sampling() + * # Actually processing the element can be expensive; do it without +*/ + __pyx_t_15 = 0; + if (unlikely(__pyx_v_self->__pyx_base.tagged_receivers == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 1074, __pyx_L20_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->__pyx_base.tagged_receivers, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_16), (&__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_16, &__pyx_t_15, NULL, &__pyx_t_2, NULL, __pyx_t_17); + if (unlikely(__pyx_t_18 == 0)) break; + if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 1074, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_receiver, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1075 + * self.tagged_receivers.total_output_bytes() + * for receiver in self.tagged_receivers.values(): + * receiver.opcounter.restart_sampling() # <<<<<<<<<<<<<< + * # Actually processing the element can be expensive; do it without + * # the lock. +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_receiver, __pyx_mstate_global->__pyx_n_u_opcounter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_restart_sampling, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1071 + * with self.scoped_process_state: + * try: + * with self.lock: # <<<<<<<<<<<<<< + * self.element_start_output_bytes = \ + * self.tagged_receivers.total_output_bytes() +*/ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L25_try_end; + __pyx_L20_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1071, __pyx_L22_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1071, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_19); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (__pyx_t_6 < (0)) __PYX_ERR(0, 1071, __pyx_L22_except_error) + __pyx_t_20 = (!__pyx_t_6); + if (unlikely(__pyx_t_20)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 1071, __pyx_L22_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L21_exception_handled; + } + __pyx_L22_except_error:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L14_error; + __pyx_L21_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L25_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_11) { + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1071, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + goto __pyx_L19; + } + __pyx_L19:; + } + goto __pyx_L31; + __pyx_L16_error:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L14_error; + __pyx_L31:; + } + + /* "apache_beam/runners/worker/operations.py":1078 + * # Actually processing the element can be expensive; do it without + * # the lock. + * delayed_applications = self.dofn_runner.process_with_sized_restriction( # <<<<<<<<<<<<<< + * o) + * if delayed_applications: +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":1079 + * # the lock. + * delayed_applications = self.dofn_runner.process_with_sized_restriction( + * o) # <<<<<<<<<<<<<< + * if delayed_applications: + * assert self.execution_context is not None +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_o)}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_process_with_sized_restriction, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_v_delayed_applications = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1080 + * delayed_applications = self.dofn_runner.process_with_sized_restriction( + * o) + * if delayed_applications: # <<<<<<<<<<<<<< + * assert self.execution_context is not None + * for delayed_application in delayed_applications: +*/ + __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_v_delayed_applications); if (unlikely((__pyx_t_20 < 0))) __PYX_ERR(0, 1080, __pyx_L14_error) + if (__pyx_t_20) { + + /* "apache_beam/runners/worker/operations.py":1081 + * o) + * if delayed_applications: + * assert self.execution_context is not None # <<<<<<<<<<<<<< + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_20 = (__pyx_v_self->__pyx_base.__pyx_base.execution_context != Py_None); + if (unlikely(!__pyx_t_20)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1081, __pyx_L14_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1081, __pyx_L14_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1082 + * if delayed_applications: + * assert self.execution_context is not None + * for delayed_application in delayed_applications: # <<<<<<<<<<<<<< + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) +*/ + if (likely(PyList_CheckExact(__pyx_v_delayed_applications)) || PyTuple_CheckExact(__pyx_v_delayed_applications)) { + __pyx_t_3 = __pyx_v_delayed_applications; __Pyx_INCREF(__pyx_t_3); + __pyx_t_16 = 0; + __pyx_t_21 = NULL; + } else { + __pyx_t_16 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_delayed_applications); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_21 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1082, __pyx_L14_error) + } + for (;;) { + if (likely(!__pyx_t_21)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1082, __pyx_L14_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_16; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1082, __pyx_L14_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_16)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_16); + #endif + ++__pyx_t_16; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L14_error) + } else { + __pyx_t_2 = __pyx_t_21(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1082, __pyx_L14_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_delayed_application, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1083 + * assert self.execution_context is not None + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( # <<<<<<<<<<<<<< + * (self, delayed_application)) + * finally: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.execution_context, __pyx_mstate_global->__pyx_n_u_delayed_applications); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":1084 + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) # <<<<<<<<<<<<<< + * finally: + * with self.lock: +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 1084, __pyx_L14_error); + __Pyx_INCREF(__pyx_v_delayed_application); + __Pyx_GIVEREF(__pyx_v_delayed_application); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_delayed_application) != (0)) __PYX_ERR(0, 1084, __pyx_L14_error); + + /* "apache_beam/runners/worker/operations.py":1083 + * assert self.execution_context is not None + * for delayed_application in delayed_applications: + * self.execution_context.delayed_applications.append( # <<<<<<<<<<<<<< + * (self, delayed_application)) + * finally: +*/ + __pyx_t_22 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_22 == ((int)-1))) __PYX_ERR(0, 1083, __pyx_L14_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1082 + * if delayed_applications: + * assert self.execution_context is not None + * for delayed_application in delayed_applications: # <<<<<<<<<<<<<< + * self.execution_context.delayed_applications.append( + * (self, delayed_application)) +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1080 + * delayed_applications = self.dofn_runner.process_with_sized_restriction( + * o) + * if delayed_applications: # <<<<<<<<<<<<<< + * assert self.execution_context is not None + * for delayed_application in delayed_applications: +*/ + } + } + + /* "apache_beam/runners/worker/operations.py":1086 + * (self, delayed_application)) + * finally: + * with self.lock: # <<<<<<<<<<<<<< + * self.element_start_output_bytes = None + * +*/ + /*finally:*/ { + /*normal exit:*/{ + /*with:*/ { + __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1086, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_1 = NULL; + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + (void)__pyx_t_14; (void)__pyx_t_13; (void)__pyx_t_12; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1087 + * finally: + * with self.lock: + * self.element_start_output_bytes = None # <<<<<<<<<<<<<< + * + * def try_split(self, fraction_of_remainder): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes); + __Pyx_DECREF(__pyx_v_self->element_start_output_bytes); + __pyx_v_self->element_start_output_bytes = Py_None; + + /* "apache_beam/runners/worker/operations.py":1086 + * (self, delayed_application)) + * finally: + * with self.lock: # <<<<<<<<<<<<<< + * self.element_start_output_bytes = None + * +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_11) { + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1086, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + goto __pyx_L39; + } + __pyx_L39:; + } + goto __pyx_L46; + __pyx_L36_error:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L7_error; + __pyx_L46:; + } + goto __pyx_L15; + } + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_19 = 0; __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_19, &__pyx_t_24); + if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_24); + __pyx_t_17 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_23 = __pyx_filename; + { + /*with:*/ { + __pyx_t_25 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1086, __pyx_L48_error) + __Pyx_GOTREF(__pyx_t_25); + __pyx_t_2 = NULL; + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /*try:*/ { + { + (void)__pyx_t_26; (void)__pyx_t_27; (void)__pyx_t_28; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1087 + * finally: + * with self.lock: + * self.element_start_output_bytes = None # <<<<<<<<<<<<<< + * + * def try_split(self, fraction_of_remainder): +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->element_start_output_bytes); + __Pyx_DECREF(__pyx_v_self->element_start_output_bytes); + __pyx_v_self->element_start_output_bytes = Py_None; + + /* "apache_beam/runners/worker/operations.py":1086 + * (self, delayed_application)) + * finally: + * with self.lock: # <<<<<<<<<<<<<< + * self.element_start_output_bytes = None + * +*/ + } + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_25) { + __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1086, __pyx_L48_error) + __Pyx_GOTREF(__pyx_t_28); + __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; + } + goto __pyx_L52; + } + __pyx_L52:; + } + goto __pyx_L59; + __pyx_L49_error:; + __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + goto __pyx_L48_error; + __pyx_L59:; + } + } + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_19, __pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_19 = 0; __pyx_t_24 = 0; + __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_23; + goto __pyx_L7_error; + __pyx_L48_error:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_19, __pyx_t_24); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = 0; __pyx_t_19 = 0; __pyx_t_24 = 0; + goto __pyx_L7_error; + } + __pyx_L15:; + } + + /* "apache_beam/runners/worker/operations.py":1069 + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * try: + * with self.lock: +*/ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1069, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1069, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_24); + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (__pyx_t_20 < (0)) __PYX_ERR(0, 1069, __pyx_L9_except_error) + __pyx_t_6 = (!__pyx_t_20); + if (unlikely(__pyx_t_6)) { + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2); + __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; + __PYX_ERR(0, 1069, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_7) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L63; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L1_error; + __pyx_L63:; + } + + /* "apache_beam/runners/worker/operations.py":1066 + * self.element_start_output_bytes = None # type: Optional[int] + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_receiver); + __Pyx_XDECREF(__pyx_v_delayed_applications); + __Pyx_XDECREF(__pyx_v_delayed_application); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1066, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1066, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1066, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 1066, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1066, __pyx_L3_error) + } + __pyx_v_o = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1066, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_2process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_o); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_2process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1089 + * self.element_start_output_bytes = None + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split = {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_fraction_of_remainder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("try_split (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fraction_of_remainder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1089, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1089, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_split", 0) < (0)) __PYX_ERR(0, 1089, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, i); __PYX_ERR(0, 1089, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1089, __pyx_L3_error) + } + __pyx_v_fraction_of_remainder = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("try_split", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1089, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_fraction_of_remainder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_4try_split(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_fraction_of_remainder) { + PyObject *__pyx_v_split = NULL; + PyObject *__pyx_v_primaries = NULL; + PyObject *__pyx_v_residuals = NULL; + PyObject *__pyx_8genexpr4__pyx_v_primary = NULL; + PyObject *__pyx_8genexpr5__pyx_v_residual = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("try_split", 0); + + /* "apache_beam/runners/worker/operations.py":1091 + * def try_split(self, fraction_of_remainder): + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) # <<<<<<<<<<<<<< + * if split: + * primaries, residuals = split +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_fraction_of_remainder}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_split, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_split = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1092 + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) + * if split: # <<<<<<<<<<<<<< + * primaries, residuals = split + * return [(self, primary) for primary in primaries +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_split); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1092, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1093 + * split = self.dofn_runner.try_split(fraction_of_remainder) + * if split: + * primaries, residuals = split # <<<<<<<<<<<<<< + * return [(self, primary) for primary in primaries + * ], [(self, residual) for residual in residuals] +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_split))) || (PyList_CheckExact(__pyx_v_split))) { + PyObject* sequence = __pyx_v_split; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1093, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_v_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_L5_unpacking_done:; + } + __pyx_v_primaries = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_residuals = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1094 + * if split: + * primaries, residuals = split + * return [(self, primary) for primary in primaries # <<<<<<<<<<<<<< + * ], [(self, residual) for residual in residuals] + * return None +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_v_primaries)) || PyTuple_CheckExact(__pyx_v_primaries)) { + __pyx_t_1 = __pyx_v_primaries; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_primaries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L8_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L8_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L8_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L8_error) + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1094, __pyx_L8_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_primary, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 1094, __pyx_L8_error); + __Pyx_INCREF(__pyx_8genexpr4__pyx_v_primary); + __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_primary); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_8genexpr4__pyx_v_primary) != (0)) __PYX_ERR(0, 1094, __pyx_L8_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1094, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary); __pyx_8genexpr4__pyx_v_primary = 0; + goto __pyx_L12_exit_scope; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary); __pyx_8genexpr4__pyx_v_primary = 0; + goto __pyx_L1_error; + __pyx_L12_exit_scope:; + } /* exit inner scope */ + { /* enter inner scope */ + + /* "apache_beam/runners/worker/operations.py":1095 + * primaries, residuals = split + * return [(self, primary) for primary in primaries + * ], [(self, residual) for residual in residuals] # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_v_residuals)) || PyTuple_CheckExact(__pyx_v_residuals)) { + __pyx_t_5 = __pyx_v_residuals; __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_residuals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L15_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1095, __pyx_L15_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1095, __pyx_L15_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7)); + #else + __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1095, __pyx_L15_error) + } else { + __pyx_t_9 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_9)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1095, __pyx_L15_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_residual, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1095, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF((PyObject *)__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_v_self); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 1095, __pyx_L15_error); + __Pyx_INCREF(__pyx_8genexpr5__pyx_v_residual); + __Pyx_GIVEREF(__pyx_8genexpr5__pyx_v_residual); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_8genexpr5__pyx_v_residual) != (0)) __PYX_ERR(0, 1095, __pyx_L15_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1095, __pyx_L15_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual); __pyx_8genexpr5__pyx_v_residual = 0; + goto __pyx_L19_exit_scope; + __pyx_L15_error:; + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual); __pyx_8genexpr5__pyx_v_residual = 0; + goto __pyx_L1_error; + __pyx_L19_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/runners/worker/operations.py":1094 + * if split: + * primaries, residuals = split + * return [(self, primary) for primary in primaries # <<<<<<<<<<<<<< + * ], [(self, residual) for residual in residuals] + * return None +*/ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1094, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1094, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1092 + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) + * if split: # <<<<<<<<<<<<<< + * primaries, residuals = split + * return [(self, primary) for primary in primaries +*/ + } + + /* "apache_beam/runners/worker/operations.py":1096 + * return [(self, primary) for primary in primaries + * ], [(self, residual) for residual in residuals] + * return None # <<<<<<<<<<<<<< + * + * def current_element_progress(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1089 + * self.element_start_output_bytes = None + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.try_split", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_split); + __Pyx_XDECREF(__pyx_v_primaries); + __Pyx_XDECREF(__pyx_v_residuals); + __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_primary); + __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_residual); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1098 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress = {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_element_progress (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_element_progress", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_element_progress", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_6current_element_progress(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self) { + PyObject *__pyx_v_progress = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_element_progress", 0); + + /* "apache_beam/runners/worker/operations.py":1100 + * def current_element_progress(self): + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: # <<<<<<<<<<<<<< + * if self.element_start_output_bytes is not None: + * progress = self.dofn_runner.current_element_progress() +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1101 + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: + * if self.element_start_output_bytes is not None: # <<<<<<<<<<<<<< + * progress = self.dofn_runner.current_element_progress() + * if progress is not None: +*/ + __pyx_t_9 = (__pyx_v_self->element_start_output_bytes != Py_None); + if (__pyx_t_9) { + + /* "apache_beam/runners/worker/operations.py":1102 + * with self.lock: + * if self.element_start_output_bytes is not None: + * progress = self.dofn_runner.current_element_progress() # <<<<<<<<<<<<<< + * if progress is not None: + * assert self.tagged_receivers is not None +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_progress = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1103 + * if self.element_start_output_bytes is not None: + * progress = self.dofn_runner.current_element_progress() + * if progress is not None: # <<<<<<<<<<<<<< + * assert self.tagged_receivers is not None + * return progress.with_completed( +*/ + __pyx_t_9 = (__pyx_v_progress != Py_None); + if (__pyx_t_9) { + + /* "apache_beam/runners/worker/operations.py":1104 + * progress = self.dofn_runner.current_element_progress() + * if progress is not None: + * assert self.tagged_receivers is not None # <<<<<<<<<<<<<< + * return progress.with_completed( + * self.tagged_receivers.total_output_bytes() - +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_9 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None); + if (unlikely(!__pyx_t_9)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1104, __pyx_L7_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1104, __pyx_L7_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1105 + * if progress is not None: + * assert self.tagged_receivers is not None + * return progress.with_completed( # <<<<<<<<<<<<<< + * self.tagged_receivers.total_output_bytes() - + * self.element_start_output_bytes) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_v_progress; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":1106 + * assert self.tagged_receivers is not None + * return progress.with_completed( + * self.tagged_receivers.total_output_bytes() - # <<<<<<<<<<<<<< + * self.element_start_output_bytes) + * return None +*/ + __pyx_t_10 = __pyx_v_self->__pyx_base.tagged_receivers; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_output_bytes, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1106, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/runners/worker/operations.py":1107 + * return progress.with_completed( + * self.tagged_receivers.total_output_bytes() - + * self.element_start_output_bytes) # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_10 = PyNumber_Subtract(__pyx_t_3, __pyx_v_self->element_start_output_bytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1106, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_completed, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/runners/worker/operations.py":1103 + * if self.element_start_output_bytes is not None: + * progress = self.dofn_runner.current_element_progress() + * if progress is not None: # <<<<<<<<<<<<<< + * assert self.tagged_receivers is not None + * return progress.with_completed( +*/ + } + + /* "apache_beam/runners/worker/operations.py":1101 + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: + * if self.element_start_output_bytes is not None: # <<<<<<<<<<<<<< + * progress = self.dofn_runner.current_element_progress() + * if progress is not None: +*/ + } + + /* "apache_beam/runners/worker/operations.py":1108 + * self.tagged_receivers.total_output_bytes() - + * self.element_start_output_bytes) + * return None # <<<<<<<<<<<<<< + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L11_try_return; + + /* "apache_beam/runners/worker/operations.py":1100 + * def current_element_progress(self): + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: # <<<<<<<<<<<<<< + * if self.element_start_output_bytes is not None: + * progress = self.dofn_runner.current_element_progress() +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_4) < 0) __PYX_ERR(0, 1100, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1100, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 1100, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_9); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_10, __pyx_t_4); + __pyx_t_2 = 0; __pyx_t_10 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1100, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_8 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_1) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L18; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "apache_beam/runners/worker/operations.py":1098 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.current_element_progress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_progress); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1110 + * return None + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id, int __pyx_skip_dispatch) { + PyObject *__pyx_v_progress_coder = NULL; + PyObject *__pyx_v_infos = NULL; + PyObject *__pyx_v_current_element_progress = NULL; + PyObject *__pyx_v_completed = NULL; + PyObject *__pyx_v_remaining = NULL; + PyObject *__pyx_v_completed_mi = NULL; + PyObject *__pyx_v_remaining_mi = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_t_17; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitoring_infos", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1113 + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * + * progress_coder = coders.IterableCoder(coders.FloatCoder()) # <<<<<<<<<<<<<< + * + * with self.lock: +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IterableCoder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FloatCoder); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_progress_coder = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1115 + * progress_coder = coders.IterableCoder(coders.FloatCoder()) + * + * with self.lock: # <<<<<<<<<<<<<< + * infos = super(SdfProcessSizedElements, + * self).monitoring_infos(transform_id, tag_to_pcollection_id) +*/ + /*with:*/ { + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1116 + * + * with self.lock: + * infos = super(SdfProcessSizedElements, # <<<<<<<<<<<<<< + * self).monitoring_infos(transform_id, tag_to_pcollection_id) + * current_element_progress = self.current_element_progress() +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/worker/operations.py":1117 + * with self.lock: + * infos = super(SdfProcessSizedElements, + * self).monitoring_infos(transform_id, tag_to_pcollection_id) # <<<<<<<<<<<<<< + * current_element_progress = self.current_element_progress() + * if current_element_progress: +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_monitoring_infos, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_infos = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1118 + * infos = super(SdfProcessSizedElements, + * self).monitoring_infos(transform_id, tag_to_pcollection_id) + * current_element_progress = self.current_element_progress() # <<<<<<<<<<<<<< + * if current_element_progress: + * if current_element_progress.completed_work: +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_current_element_progress = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1119 + * self).monitoring_infos(transform_id, tag_to_pcollection_id) + * current_element_progress = self.current_element_progress() + * if current_element_progress: # <<<<<<<<<<<<<< + * if current_element_progress.completed_work: + * completed = current_element_progress.completed_work +*/ + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_current_element_progress); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1119, __pyx_L7_error) + if (__pyx_t_13) { + + /* "apache_beam/runners/worker/operations.py":1120 + * current_element_progress = self.current_element_progress() + * if current_element_progress: + * if current_element_progress.completed_work: # <<<<<<<<<<<<<< + * completed = current_element_progress.completed_work + * remaining = current_element_progress.remaining_work +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_mstate_global->__pyx_n_u_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1120, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_13) { + + /* "apache_beam/runners/worker/operations.py":1121 + * if current_element_progress: + * if current_element_progress.completed_work: + * completed = current_element_progress.completed_work # <<<<<<<<<<<<<< + * remaining = current_element_progress.remaining_work + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_mstate_global->__pyx_n_u_completed_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_completed = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1122 + * if current_element_progress.completed_work: + * completed = current_element_progress.completed_work + * remaining = current_element_progress.remaining_work # <<<<<<<<<<<<<< + * else: + * completed = current_element_progress.fraction_completed +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_mstate_global->__pyx_n_u_remaining_work); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_remaining = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1120 + * current_element_progress = self.current_element_progress() + * if current_element_progress: + * if current_element_progress.completed_work: # <<<<<<<<<<<<<< + * completed = current_element_progress.completed_work + * remaining = current_element_progress.remaining_work +*/ + goto __pyx_L14; + } + + /* "apache_beam/runners/worker/operations.py":1124 + * remaining = current_element_progress.remaining_work + * else: + * completed = current_element_progress.fraction_completed # <<<<<<<<<<<<<< + * remaining = current_element_progress.fraction_remaining + * assert completed is not None +*/ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_mstate_global->__pyx_n_u_fraction_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_completed = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1125 + * else: + * completed = current_element_progress.fraction_completed + * remaining = current_element_progress.fraction_remaining # <<<<<<<<<<<<<< + * assert completed is not None + * assert remaining is not None +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_element_progress, __pyx_mstate_global->__pyx_n_u_fraction_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_remaining = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_L14:; + + /* "apache_beam/runners/worker/operations.py":1126 + * completed = current_element_progress.fraction_completed + * remaining = current_element_progress.fraction_remaining + * assert completed is not None # <<<<<<<<<<<<<< + * assert remaining is not None + * completed_mi = metrics_pb2.MonitoringInfo( +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_13 = (__pyx_v_completed != Py_None); + if (unlikely(!__pyx_t_13)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1126, __pyx_L7_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1126, __pyx_L7_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1127 + * remaining = current_element_progress.fraction_remaining + * assert completed is not None + * assert remaining is not None # <<<<<<<<<<<<<< + * completed_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_COMPLETED_URN, +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_13 = (__pyx_v_remaining != Py_None); + if (unlikely(!__pyx_t_13)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1127, __pyx_L7_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1127, __pyx_L7_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1128 + * assert completed is not None + * assert remaining is not None + * completed_mi = metrics_pb2.MonitoringInfo( # <<<<<<<<<<<<<< + * urn=monitoring_infos.WORK_COMPLETED_URN, + * type=monitoring_infos.PROGRESS_TYPE, +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_metrics_pb2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MonitoringInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1129 + * assert remaining is not None + * completed_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_COMPLETED_URN, # <<<<<<<<<<<<<< + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WORK_COMPLETED_URN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1130 + * completed_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_COMPLETED_URN, + * type=monitoring_infos.PROGRESS_TYPE, # <<<<<<<<<<<<<< + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([completed])) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PROGRESS_TYPE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1130, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1131 + * urn=monitoring_infos.WORK_COMPLETED_URN, + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), # <<<<<<<<<<<<<< + * payload=progress_coder.encode([completed])) + * remaining_mi = metrics_pb2.MonitoringInfo( +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1131, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_create_labels); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1131, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, NULL}; + __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1131, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1131, __pyx_L7_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":1132 + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([completed])) # <<<<<<<<<<<<<< + * remaining_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_REMAINING_URN, +*/ + __pyx_t_14 = __pyx_v_progress_coder; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_completed); + __Pyx_GIVEREF(__pyx_v_completed); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_completed) != (0)) __PYX_ERR(0, 1132, __pyx_L7_error); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_7}; + __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1132, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_3, NULL}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1128, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_urn, __pyx_t_8, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1128, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_6, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1128, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_labels, __pyx_t_4, __pyx_t_7, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1128, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_payload, __pyx_t_15, __pyx_t_7, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1128, __pyx_L7_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_completed_mi = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1133 + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([completed])) + * remaining_mi = metrics_pb2.MonitoringInfo( # <<<<<<<<<<<<<< + * urn=monitoring_infos.WORK_REMAINING_URN, + * type=monitoring_infos.PROGRESS_TYPE, +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_metrics_pb2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1133, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MonitoringInfo); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1133, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1134 + * payload=progress_coder.encode([completed])) + * remaining_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_REMAINING_URN, # <<<<<<<<<<<<<< + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_WORK_REMAINING_URN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1135 + * remaining_mi = metrics_pb2.MonitoringInfo( + * urn=monitoring_infos.WORK_REMAINING_URN, + * type=monitoring_infos.PROGRESS_TYPE, # <<<<<<<<<<<<<< + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([remaining])) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1135, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PROGRESS_TYPE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1135, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1136 + * urn=monitoring_infos.WORK_REMAINING_URN, + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), # <<<<<<<<<<<<<< + * payload=progress_coder.encode([remaining])) + * infos[monitoring_infos.to_key(completed_mi)] = completed_mi +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_create_labels); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1136, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_14); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, NULL}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ptransform, __pyx_v_transform_id, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1136, __pyx_L7_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1136, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + } + + /* "apache_beam/runners/worker/operations.py":1137 + * type=monitoring_infos.PROGRESS_TYPE, + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([remaining])) # <<<<<<<<<<<<<< + * infos[monitoring_infos.to_key(completed_mi)] = completed_mi + * infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi +*/ + __pyx_t_3 = __pyx_v_progress_coder; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1137, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_remaining); + __Pyx_GIVEREF(__pyx_v_remaining); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_remaining) != (0)) __PYX_ERR(0, 1137, __pyx_L7_error); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1137, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1133, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_urn, __pyx_t_4, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1133, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1133, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_labels, __pyx_t_7, __pyx_t_8, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1133, __pyx_L7_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_payload, __pyx_t_14, __pyx_t_8, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1133, __pyx_L7_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_remaining_mi = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1138 + * labels=monitoring_infos.create_labels(ptransform=transform_id), + * payload=progress_coder.encode([remaining])) + * infos[monitoring_infos.to_key(completed_mi)] = completed_mi # <<<<<<<<<<<<<< + * infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi + * return infos +*/ + __pyx_t_15 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1138, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1138, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); + assert(__pyx_t_15); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_completed_mi}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely((PyObject_SetItem(__pyx_v_infos, __pyx_t_1, __pyx_v_completed_mi) < 0))) __PYX_ERR(0, 1138, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1139 + * payload=progress_coder.encode([remaining])) + * infos[monitoring_infos.to_key(completed_mi)] = completed_mi + * infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi # <<<<<<<<<<<<<< + * return infos + * +*/ + __pyx_t_14 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_monitoring_infos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1139, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_to_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_14); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_remaining_mi}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (unlikely((PyObject_SetItem(__pyx_v_infos, __pyx_t_1, __pyx_v_remaining_mi) < 0))) __PYX_ERR(0, 1139, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1119 + * self).monitoring_infos(transform_id, tag_to_pcollection_id) + * current_element_progress = self.current_element_progress() + * if current_element_progress: # <<<<<<<<<<<<<< + * if current_element_progress.completed_work: + * completed = current_element_progress.completed_work +*/ + } + + /* "apache_beam/runners/worker/operations.py":1115 + * progress_coder = coders.IterableCoder(coders.FloatCoder()) + * + * with self.lock: # <<<<<<<<<<<<<< + * infos = super(SdfProcessSizedElements, + * self).monitoring_infos(transform_id, tag_to_pcollection_id) +*/ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_14) < 0) __PYX_ERR(0, 1115, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_15 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1115, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_15, NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1115, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_16); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (__pyx_t_13 < (0)) __PYX_ERR(0, 1115, __pyx_L9_except_error) + __pyx_t_17 = (!__pyx_t_13); + if (unlikely(__pyx_t_17)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_14); + __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_14 = 0; + __PYX_ERR(0, 1115, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_9) { + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L18; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "apache_beam/runners/worker/operations.py":1140 + * infos[monitoring_infos.to_key(completed_mi)] = completed_mi + * infos[monitoring_infos.to_key(remaining_mi)] = remaining_mi + * return infos # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_infos)) { __Pyx_RaiseUnboundLocalError("infos"); __PYX_ERR(0, 1140, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_infos); + __pyx_r = __pyx_v_infos; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1110 + * return None + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_progress_coder); + __Pyx_XDECREF(__pyx_v_infos); + __Pyx_XDECREF(__pyx_v_current_element_progress); + __Pyx_XDECREF(__pyx_v_completed); + __Pyx_XDECREF(__pyx_v_remaining); + __Pyx_XDECREF(__pyx_v_completed_mi); + __Pyx_XDECREF(__pyx_v_remaining_mi); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos = {"monitoring_infos", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_transform_id = 0; + PyObject *__pyx_v_tag_to_pcollection_id = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitoring_infos (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_transform_id,&__pyx_mstate_global->__pyx_n_u_tag_to_pcollection_id,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1110, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1110, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1110, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "monitoring_infos", 0) < (0)) __PYX_ERR(0, 1110, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, i); __PYX_ERR(0, 1110, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1110, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1110, __pyx_L3_error) + } + __pyx_v_transform_id = values[0]; + __pyx_v_tag_to_pcollection_id = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitoring_infos", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1110, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_8monitoring_infos(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v_transform_id, PyObject *__pyx_v_tag_to_pcollection_id) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitoring_infos", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos(__pyx_v_self, __pyx_v_transform_id, __pyx_v_tag_to_pcollection_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.monitoring_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(27); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->__pyx_base.dofn_runner); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.dofn_runner)) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->element_start_output_bytes); + __Pyx_GIVEREF(__pyx_v_self->element_start_output_bytes); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->element_start_output_bytes) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.fn); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.fn) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.input_info); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.input_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.input_info) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->lock); + __Pyx_GIVEREF(__pyx_v_self->lock); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->lock) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_timer_processing_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_timer_processing_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 17, __pyx_v_self->__pyx_base.scoped_timer_processing_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 18, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.side_input_maps); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.side_input_maps); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 19, __pyx_v_self->__pyx_base.side_input_maps) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 20, __pyx_v_self->__pyx_base.__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 21, __pyx_v_self->__pyx_base.__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 22, __pyx_v_self->__pyx_base.__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.tagged_receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.tagged_receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 23, __pyx_v_self->__pyx_base.tagged_receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_inputs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_inputs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 24, __pyx_v_self->__pyx_base.timer_inputs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.timer_specs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.timer_specs); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 25, __pyx_v_self->__pyx_base.timer_specs) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.user_state_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.user_state_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 26, __pyx_v_self->__pyx_base.user_state_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.dofn_runner, self.element_start_output_bytes, self.execution_context, self.fn, self.input_info, self.lock, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.scoped_timer_processing_state, self.setup_done, self.side_input_maps, self.spec, self.state_sampler, self.step_name, self.tagged_receivers, self.timer_inputs, self.timer_specs, self.user_state_context) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.dofn_runner) != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->element_start_output_bytes != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.fn != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.input_info != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->lock != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_timer_processing_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.side_input_maps != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.step_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.tagged_receivers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.timer_inputs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.timer_specs != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.user_state_context != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfProcessSizedEl); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_60572958); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_60572958); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_60572958) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.dofn_runner is not None or self.element_start_output_bytes is not None or self.execution_context is not None or self.fn is not None or self.input_info is not None or self.lock is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.scoped_timer_processing_state is not None or self.side_input_maps is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.tagged_receivers is not None or self.timer_inputs is not None or self.timer_specs is not None or self.user_state_context is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, None), state + * else: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfProcessSizedEl); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_60572958); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_60572958); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_60572958) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SdfProcessSizedElements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1145 + * class CombineOperation(Operation): + * """A Combine operation executing a CombineFn for each input element.""" + * def __init__(self, name_context, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * super(CombineOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1145, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1145, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1145, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1145, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1145, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1145, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 1145, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1145, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1145, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1145, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1145, __pyx_L3_error) + } + __pyx_v_name_context = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_state_sampler = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1145, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) { + PyObject *__pyx_v_fn = NULL; + PyObject *__pyx_v_args = NULL; + PyObject *__pyx_v_kwargs = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1146 + * """A Combine operation executing a CombineFn for each input element.""" + * def __init__(self, name_context, spec, counter_factory, state_sampler): + * super(CombineOperation, # <<<<<<<<<<<<<< + * self).__init__(name_context, spec, counter_factory, state_sampler) + * # Combiners do not accept deferred side-inputs (the ignored fourth argument) +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/runners/worker/operations.py":1147 + * def __init__(self, name_context, spec, counter_factory, state_sampler): + * super(CombineOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * # Combiners do not accept deferred side-inputs (the ignored fourth argument) + * # and therefore the code to handle the extra args/kwargs is simpler than for +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1151 + * # and therefore the code to handle the extra args/kwargs is simpler than for + * # the DoFn's of ParDo. + * fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3] # <<<<<<<<<<<<<< + * self.phased_combine_fn = ( + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_serialized_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1151, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); + index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_args = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_kwargs = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1153 + * fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3] + * self.phased_combine_fn = ( + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) # <<<<<<<<<<<<<< + * + * def setup(self, data_sampler=None): +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PhasedCombineFnExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_phase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_1, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/runners/worker/operations.py":1152 + * # the DoFn's of ParDo. + * fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3] + * self.phased_combine_fn = ( # <<<<<<<<<<<<<< + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) + * +*/ + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->phased_combine_fn); + __Pyx_DECREF(__pyx_v_self->phased_combine_fn); + __pyx_v_self->phased_combine_fn = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1145 + * class CombineOperation(Operation): + * """A Combine operation executing a CombineFn for each input element.""" + * def __init__(self, name_context, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * super(CombineOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_fn); + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1155 + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup = {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1155, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setup", 0) < (0)) __PYX_ERR(0, 1155, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1155, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_data_sampler = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1155, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v_data_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setup", 0); + + /* "apache_beam/runners/worker/operations.py":1157 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Setup called for %s', self) + * super(CombineOperation, self).setup(data_sampler) +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1158 + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: + * _LOGGER.debug('Setup called for %s', self) # <<<<<<<<<<<<<< + * super(CombineOperation, self).setup(data_sampler) + * self.phased_combine_fn.combine_fn.setup() +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1159 + * with self.scoped_start_state: + * _LOGGER.debug('Setup called for %s', self) + * super(CombineOperation, self).setup(data_sampler) # <<<<<<<<<<<<<< + * self.phased_combine_fn.combine_fn.setup() + * +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_9 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_data_sampler}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1159, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1160 + * _LOGGER.debug('Setup called for %s', self) + * super(CombineOperation, self).setup(data_sampler) + * self.phased_combine_fn.combine_fn.setup() # <<<<<<<<<<<<<< + * + * def process(self, o): +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1157 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Setup called for %s', self) + * super(CombineOperation, self).setup(data_sampler) +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_4) < 0) __PYX_ERR(0, 1157, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1157, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1157, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_9, __pyx_t_4); + __pyx_t_2 = 0; __pyx_t_9 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1157, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":1155 + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1162 + * self.phased_combine_fn.combine_fn.setup() + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) { + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_values = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_o)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1164 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1165 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * key, values = o.value +*/ + if (__pyx_v_self->__pyx_base.debug_logging_enabled) { + + /* "apache_beam/runners/worker/operations.py":1166 + * with self.scoped_process_state: + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) # <<<<<<<<<<<<<< + * key, values = o.value + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1165 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * key, values = o.value +*/ + } + + /* "apache_beam/runners/worker/operations.py":1167 + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) + * key, values = o.value # <<<<<<<<<<<<<< + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) + * +*/ + __pyx_t_1 = __pyx_v_o->value; + __Pyx_INCREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1167, __pyx_L7_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); + index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 1167, __pyx_L7_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L15_unpacking_done; + __pyx_L14_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1167, __pyx_L7_error) + __pyx_L15_unpacking_done:; + } + __pyx_v_key = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_values = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1168 + * _LOGGER.debug('Processing [%s] in %s', o, self) + * key, values = o.value + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __pyx_t_4 = __pyx_v_self->phased_combine_fn; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_values}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_apply, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_key); + __Pyx_GIVEREF(__pyx_v_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key) != (0)) __PYX_ERR(0, 1168, __pyx_L7_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1168, __pyx_L7_error); + __pyx_t_1 = 0; + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_o->__pyx_vtab)->with_value(__pyx_v_o, __pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1164 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 1164, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1164, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_12 < (0)) __PYX_ERR(0, 1164, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_12); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_3); + __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 1164, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L19; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L19:; + } + + /* "apache_beam/runners/worker/operations.py":1162 + * self.phased_combine_fn.combine_fn.setup() + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_values); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1162, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1162, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 1162, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1162, __pyx_L3_error) + } + __pyx_v_o = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1162, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_4process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v_o); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1170 + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * _LOGGER.debug('Finishing %s', self) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1172 + * def finish(self): + * # type: () -> None + * _LOGGER.debug('Finishing %s', self) # <<<<<<<<<<<<<< + * super(CombineOperation, self).finish() + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Finishing_s, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1173 + * # type: () -> None + * _LOGGER.debug('Finishing %s', self) + * super(CombineOperation, self).finish() # <<<<<<<<<<<<<< + * + * def teardown(self): +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_3 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1170 + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * _LOGGER.debug('Finishing %s', self) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_6finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1175 + * super(CombineOperation, self).finish() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1177 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Teardown called for %s', self) + * super(CombineOperation, self).teardown() +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1178 + * # type: () -> None + * with self.scoped_finish_state: + * _LOGGER.debug('Teardown called for %s', self) # <<<<<<<<<<<<<< + * super(CombineOperation, self).teardown() + * self.phased_combine_fn.combine_fn.teardown() +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1179 + * with self.scoped_finish_state: + * _LOGGER.debug('Teardown called for %s', self) + * super(CombineOperation, self).teardown() # <<<<<<<<<<<<<< + * self.phased_combine_fn.combine_fn.teardown() + * +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_teardown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1180 + * _LOGGER.debug('Teardown called for %s', self) + * super(CombineOperation, self).teardown() + * self.phased_combine_fn.combine_fn.teardown() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phased_combine_fn, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_teardown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1177 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Teardown called for %s', self) + * super(CombineOperation, self).teardown() +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1177, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1177, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1177, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1177, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":1175 + * super(CombineOperation, self).finish() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown = {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_8teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_8teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_10__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_10__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(17); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->phased_combine_fn); + __Pyx_GIVEREF(__pyx_v_self->phased_combine_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->phased_combine_fn) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 16, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.phased_combine_fn, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->phased_combine_fn != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136289111); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136289111); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_136289111) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.phased_combine_fn is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, None), state + * else: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CombineOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CombineOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136289111); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136289111); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_136289111) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CombineOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_12__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16CombineOperation_12__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CombineOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CombineOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.CombineOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1183 + * + * + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * if spec.combine_fn: + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_5create_pgbk_op = {"create_pgbk_op", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_5create_pgbk_op(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_pgbk_op (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1183, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1183, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1183, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1183, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1183, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_pgbk_op", 0) < (0)) __PYX_ERR(0, 1183, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, i); __PYX_ERR(0, 1183, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1183, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1183, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1183, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1183, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_state_sampler = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_pgbk_op", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1183, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_pgbk_op", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(__pyx_self, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_4create_pgbk_op(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_pgbk_op", 0); + + /* "apache_beam/runners/worker/operations.py":1184 + * + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): + * if spec.combine_fn: # <<<<<<<<<<<<<< + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/runners/worker/operations.py":1185 + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): + * if spec.combine_fn: + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * else: + * return PGBKOperation(step_name, spec, counter_factory, state_sampler) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1184 + * + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): + * if spec.combine_fn: # <<<<<<<<<<<<<< + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) + * else: +*/ + } + + /* "apache_beam/runners/worker/operations.py":1187 + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) + * else: + * return PGBKOperation(step_name, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PGBKOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_step_name, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/runners/worker/operations.py":1183 + * + * + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * if spec.combine_fn: + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_pgbk_op", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1197 + * values in this bundle, memory permitting. + * """ + * def __init__(self, name_context, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * super(PGBKOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1197, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1197, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1197, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 1197, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1197, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1197, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1197, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1197, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1197, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_name_context = values[1]; + __pyx_v_spec = values[2]; + __pyx_v_counter_factory = values[3]; + __pyx_v_state_sampler = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1197, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(__pyx_self, __pyx_v_self, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1198 + * """ + * def __init__(self, name_context, spec, counter_factory, state_sampler): + * super(PGBKOperation, # <<<<<<<<<<<<<< + * self).__init__(name_context, spec, counter_factory, state_sampler) + * assert not self.spec.combine_fn +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PGBKOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/runners/worker/operations.py":1199 + * def __init__(self, name_context, spec, counter_factory, state_sampler): + * super(PGBKOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * assert not self.spec.combine_fn + * self.table = collections.defaultdict(list) +*/ + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1200 + * super(PGBKOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) + * assert not self.spec.combine_fn # <<<<<<<<<<<<<< + * self.table = collections.defaultdict(list) + * self.size = 0 +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(!__pyx_t_8)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 1200, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 1200, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/operations.py":1201 + * self).__init__(name_context, spec, counter_factory, state_sampler) + * assert not self.spec.combine_fn + * self.table = collections.defaultdict(list) # <<<<<<<<<<<<<< + * self.size = 0 + * # TODO(robertwb) Make this configurable. +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)(&PyList_Type))}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table, __pyx_t_3) < (0)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1202 + * assert not self.spec.combine_fn + * self.table = collections.defaultdict(list) + * self.size = 0 # <<<<<<<<<<<<<< + * # TODO(robertwb) Make this configurable. + * self.max_size = 10 * 1000 +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_size, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1202, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1204 + * self.size = 0 + * # TODO(robertwb) Make this configurable. + * self.max_size = 10 * 1000 # <<<<<<<<<<<<<< + * + * def process(self, o): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_size, __pyx_mstate_global->__pyx_int_10000) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1197 + * values in this bundle, memory permitting. + * """ + * def __init__(self, name_context, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * super(PGBKOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1206 + * self.max_size = 10 * 1000 + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1206, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1206, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1206, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, i); __PYX_ERR(0, 1206, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1206, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1206, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_o = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1206, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(__pyx_self, __pyx_v_self, __pyx_v_o); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_2process(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_o) { + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + + /* "apache_beam/runners/worker/operations.py":1208 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * # TODO(robertwb): Structural (hashable) values. + * key = o.value[0], tuple(o.windows) +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scoped_process_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1210 + * with self.scoped_process_state: + * # TODO(robertwb): Structural (hashable) values. + * key = o.value[0], tuple(o.windows) # <<<<<<<<<<<<<< + * self.table[key].append(o) + * self.size += 1 +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1210, __pyx_L7_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 1210, __pyx_L7_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_v_key = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1211 + * # TODO(robertwb): Structural (hashable) values. + * key = o.value[0], tuple(o.windows) + * self.table[key].append(o) # <<<<<<<<<<<<<< + * self.size += 1 + * if self.size > self.max_size: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1211, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_o); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1211, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1212 + * key = o.value[0], tuple(o.windows) + * self.table[key].append(o) + * self.size += 1 # <<<<<<<<<<<<<< + * if self.size > self.max_size: + * self.flush(9 * self.max_size // 10) +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_1) < (0)) __PYX_ERR(0, 1212, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1213 + * self.table[key].append(o) + * self.size += 1 + * if self.size > self.max_size: # <<<<<<<<<<<<<< + * self.flush(9 * self.max_size // 10) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1213, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_11) { + + /* "apache_beam/runners/worker/operations.py":1214 + * self.size += 1 + * if self.size > self.max_size: + * self.flush(9 * self.max_size // 10) # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __pyx_t_5 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_9, __pyx_t_1, 9, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FloorDivideObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1213 + * self.table[key].append(o) + * self.size += 1 + * if self.size > self.max_size: # <<<<<<<<<<<<<< + * self.flush(9 * self.max_size // 10) + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":1208 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * # TODO(robertwb): Structural (hashable) values. + * key = o.value[0], tuple(o.windows) +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 1208, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1208, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1208, __pyx_L9_except_error) + __pyx_t_13 = (!__pyx_t_11); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_5); + __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; + __PYX_ERR(0, 1208, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/runners/worker/operations.py":1206 + * self.max_size = 10 * 1000 + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1216 + * self.flush(9 * self.max_size // 10) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.flush(0) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1216, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1216, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "finish", 0) < (0)) __PYX_ERR(0, 1216, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("finish", 1, 1, 1, i); __PYX_ERR(0, 1216, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1216, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("finish", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1216, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_4finish(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + + /* "apache_beam/runners/worker/operations.py":1218 + * def finish(self): + * # type: () -> None + * self.flush(0) # <<<<<<<<<<<<<< + * super().finish() + * +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1219 + * # type: () -> None + * self.flush(0) + * super().finish() # <<<<<<<<<<<<<< + * + * def flush(self, target): +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_6) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(0, 1219, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_self}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1216 + * self.flush(9 * self.max_size // 10) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.flush(0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1221 + * super().finish() + * + * def flush(self, target): # <<<<<<<<<<<<<< + * # type: (int) -> None + * limit = self.size - target +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush = {"flush", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_target = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flush (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_target,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1221, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flush", 0) < (0)) __PYX_ERR(0, 1221, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("flush", 1, 2, 2, i); __PYX_ERR(0, 1221, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_target = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("flush", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1221, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(__pyx_self, __pyx_v_self, __pyx_v_target); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_13PGBKOperation_6flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target) { + PyObject *__pyx_v_limit = NULL; + PyObject *__pyx_v_ix = NULL; + PyObject *__pyx_v_kw = NULL; + PyObject *__pyx_v_vs = NULL; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_windows = NULL; + PyObject *__pyx_v_output_value = NULL; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = NULL; + PyObject *__pyx_8genexpr6__pyx_v_v = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("flush", 0); + + /* "apache_beam/runners/worker/operations.py":1223 + * def flush(self, target): + * # type: (int) -> None + * limit = self.size - target # <<<<<<<<<<<<<< + * for ix, (kw, vs) in enumerate(list(self.table.items())): + * if ix >= limit: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_limit = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1224 + * # type: (int) -> None + * limit = self.size - target + * for ix, (kw, vs) in enumerate(list(self.table.items())): # <<<<<<<<<<<<<< + * if ix >= limit: + * break +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_t_2 = __pyx_mstate_global->__pyx_int_0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1224, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_7); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); + index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_kw, __pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_vs, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_INCREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_2); + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1225 + * limit = self.size - target + * for ix, (kw, vs) in enumerate(list(self.table.items())): + * if ix >= limit: # <<<<<<<<<<<<<< + * break + * del self.table[kw] +*/ + __pyx_t_4 = PyObject_RichCompare(__pyx_v_ix, __pyx_v_limit, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_10) { + + /* "apache_beam/runners/worker/operations.py":1226 + * for ix, (kw, vs) in enumerate(list(self.table.items())): + * if ix >= limit: + * break # <<<<<<<<<<<<<< + * del self.table[kw] + * key, windows = kw +*/ + goto __pyx_L4_break; + + /* "apache_beam/runners/worker/operations.py":1225 + * limit = self.size - target + * for ix, (kw, vs) in enumerate(list(self.table.items())): + * if ix >= limit: # <<<<<<<<<<<<<< + * break + * del self.table[kw] +*/ + } + + /* "apache_beam/runners/worker/operations.py":1227 + * if ix >= limit: + * break + * del self.table[kw] # <<<<<<<<<<<<<< + * key, windows = kw + * output_value = [v.value[1] for v in vs] +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_DelItem(__pyx_t_4, __pyx_v_kw) < 0))) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1228 + * break + * del self.table[kw] + * key, windows = kw # <<<<<<<<<<<<<< + * output_value = [v.value[1] for v in vs] + * windowed_value = WindowedValue((key, output_value), +*/ + if ((likely(PyTuple_CheckExact(__pyx_v_kw))) || (PyList_CheckExact(__pyx_v_kw))) { + PyObject* sequence = __pyx_v_kw; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1228, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_7); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_windows, __pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1229 + * del self.table[kw] + * key, windows = kw + * output_value = [v.value[1] for v in vs] # <<<<<<<<<<<<<< + * windowed_value = WindowedValue((key, output_value), + * vs[0].timestamp, +*/ + { /* enter inner scope */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_7); + if (likely(PyList_CheckExact(__pyx_v_vs)) || PyTuple_CheckExact(__pyx_v_vs)) { + __pyx_t_4 = __pyx_v_vs; __Pyx_INCREF(__pyx_t_4); + __pyx_t_11 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_vs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1229, __pyx_L12_error) + } + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1229, __pyx_L12_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_11; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1229, __pyx_L12_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11)); + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_11); + #endif + ++__pyx_t_11; + } + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L12_error) + } else { + __pyx_t_3 = __pyx_t_12(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1229, __pyx_L12_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_v, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_v, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1229, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1229, __pyx_L12_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0; + goto __pyx_L16_exit_scope; + __pyx_L12_error:; + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); __pyx_8genexpr6__pyx_v_v = 0; + goto __pyx_L1_error; + __pyx_L16_exit_scope:; + } /* exit inner scope */ + __Pyx_XDECREF_SET(__pyx_v_output_value, ((PyObject*)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1230 + * key, windows = kw + * output_value = [v.value[1] for v in vs] + * windowed_value = WindowedValue((key, output_value), # <<<<<<<<<<<<<< + * vs[0].timestamp, + * windows) +*/ + __pyx_t_4 = NULL; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_key); + __Pyx_GIVEREF(__pyx_v_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_key) != (0)) __PYX_ERR(0, 1230, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_output_value); + __Pyx_GIVEREF(__pyx_v_output_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_output_value) != (0)) __PYX_ERR(0, 1230, __pyx_L1_error); + + /* "apache_beam/runners/worker/operations.py":1231 + * output_value = [v.value[1] for v in vs] + * windowed_value = WindowedValue((key, output_value), + * vs[0].timestamp, # <<<<<<<<<<<<<< + * windows) + * self.output(windowed_value) +*/ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_vs, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1232 + * windowed_value = WindowedValue((key, output_value), + * vs[0].timestamp, + * windows) # <<<<<<<<<<<<<< + * self.output(windowed_value) + * +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_8, __pyx_t_13, __pyx_v_windows}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1230, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1233 + * vs[0].timestamp, + * windows) + * self.output(windowed_value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_13 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_13); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, ((PyObject *)__pyx_v_windowed_value)}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_output, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/runners/worker/operations.py":1224 + * # type: (int) -> None + * limit = self.size - target + * for ix, (kw, vs) in enumerate(list(self.table.items())): # <<<<<<<<<<<<<< + * if ix >= limit: + * break +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L17_for_end; + __pyx_L4_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L17_for_end; + __pyx_L17_for_end:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1221 + * super().finish() + * + * def flush(self, target): # <<<<<<<<<<<<<< + * # type: (int) -> None + * limit = self.size - target +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKOperation.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_limit); + __Pyx_XDECREF(__pyx_v_ix); + __Pyx_XDECREF(__pyx_v_kw); + __Pyx_XDECREF(__pyx_v_vs); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_windows); + __Pyx_XDECREF(__pyx_v_output_value); + __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value); + __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_v); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1249 + * """ + * + * def __init__(self, name_context, spec, counter_factory, state_sampler, windowing=None): # <<<<<<<<<<<<<< + * super(PGBKCVOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + PyObject *__pyx_v_windowing = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,&__pyx_mstate_global->__pyx_n_u_windowing,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1249, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1249, __pyx_L3_error) + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, i); __PYX_ERR(0, 1249, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1249, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1249, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1249, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1249, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_name_context = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_state_sampler = values[3]; + __pyx_v_windowing = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1249, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_windowing); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation___init__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_windowing) { + PyObject *__pyx_v_fn = NULL; + PyObject *__pyx_v_args = NULL; + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_tsc_type = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + long __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1250 + * + * def __init__(self, name_context, spec, counter_factory, state_sampler, windowing=None): + * super(PGBKCVOperation, # <<<<<<<<<<<<<< + * self).__init__(name_context, spec, counter_factory, state_sampler) + * # Combiners do not accept deferred side-inputs (the ignored fourth +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/runners/worker/operations.py":1251 + * def __init__(self, name_context, spec, counter_factory, state_sampler, windowing=None): + * super(PGBKCVOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * # Combiners do not accept deferred side-inputs (the ignored fourth + * # argument) and therefore the code to handle the extra args/kwargs is +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1255 + * # argument) and therefore the code to handle the extra args/kwargs is + * # simpler than for the DoFn's of ParDo. + * fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3] # <<<<<<<<<<<<<< + * self.combine_fn = curry_combine_fn(fn, args, kwargs) + * self.combine_fn_add_input = self.combine_fn.add_input +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pickler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.spec, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1255, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); + index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_args = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_kwargs = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1256 + * # simpler than for the DoFn's of ParDo. + * fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3] + * self.combine_fn = curry_combine_fn(fn, args, kwargs) # <<<<<<<<<<<<<< + * self.combine_fn_add_input = self.combine_fn.add_input + * if self.combine_fn.compact.__func__ is core.CombineFn.compact: +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_curry_combine_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->combine_fn); + __Pyx_DECREF(__pyx_v_self->combine_fn); + __pyx_v_self->combine_fn = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1257 + * fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3] + * self.combine_fn = curry_combine_fn(fn, args, kwargs) + * self.combine_fn_add_input = self.combine_fn.add_input # <<<<<<<<<<<<<< + * if self.combine_fn.compact.__func__ is core.CombineFn.compact: + * self.combine_fn_compact = None +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input); + __Pyx_DECREF(__pyx_v_self->combine_fn_add_input); + __pyx_v_self->combine_fn_add_input = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1258 + * self.combine_fn = curry_combine_fn(fn, args, kwargs) + * self.combine_fn_add_input = self.combine_fn.add_input + * if self.combine_fn.compact.__func__ is core.CombineFn.compact: # <<<<<<<<<<<<<< + * self.combine_fn_compact = None + * else: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_mstate_global->__pyx_n_u_compact); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CombineFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_compact); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = (__pyx_t_2 == __pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { + + /* "apache_beam/runners/worker/operations.py":1259 + * self.combine_fn_add_input = self.combine_fn.add_input + * if self.combine_fn.compact.__func__ is core.CombineFn.compact: + * self.combine_fn_compact = None # <<<<<<<<<<<<<< + * else: + * self.combine_fn_compact = self.combine_fn.compact +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->combine_fn_compact); + __Pyx_DECREF(__pyx_v_self->combine_fn_compact); + __pyx_v_self->combine_fn_compact = Py_None; + + /* "apache_beam/runners/worker/operations.py":1258 + * self.combine_fn = curry_combine_fn(fn, args, kwargs) + * self.combine_fn_add_input = self.combine_fn.add_input + * if self.combine_fn.compact.__func__ is core.CombineFn.compact: # <<<<<<<<<<<<<< + * self.combine_fn_compact = None + * else: +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/operations.py":1261 + * self.combine_fn_compact = None + * else: + * self.combine_fn_compact = self.combine_fn.compact # <<<<<<<<<<<<<< + * if windowing: + * self.is_default_windowing = windowing.is_default() +*/ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_mstate_global->__pyx_n_u_compact); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->combine_fn_compact); + __Pyx_DECREF(__pyx_v_self->combine_fn_compact); + __pyx_v_self->combine_fn_compact = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/worker/operations.py":1262 + * else: + * self.combine_fn_compact = self.combine_fn.compact + * if windowing: # <<<<<<<<<<<<<< + * self.is_default_windowing = windowing.is_default() + * tsc_type = windowing.timestamp_combiner +*/ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_windowing); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1262, __pyx_L1_error) + if (__pyx_t_8) { + + /* "apache_beam/runners/worker/operations.py":1263 + * self.combine_fn_compact = self.combine_fn.compact + * if windowing: + * self.is_default_windowing = windowing.is_default() # <<<<<<<<<<<<<< + * tsc_type = windowing.timestamp_combiner + * self.timestamp_combiner = ( +*/ + __pyx_t_2 = __pyx_v_windowing; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_default, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->is_default_windowing = __pyx_t_8; + + /* "apache_beam/runners/worker/operations.py":1264 + * if windowing: + * self.is_default_windowing = windowing.is_default() + * tsc_type = windowing.timestamp_combiner # <<<<<<<<<<<<<< + * self.timestamp_combiner = ( + * None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_mstate_global->__pyx_n_u_timestamp_combiner); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_tsc_type = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1266 + * tsc_type = windowing.timestamp_combiner + * self.timestamp_combiner = ( + * None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else # <<<<<<<<<<<<<< + * window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn)) + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TimestampCombiner); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OUTPUT_AT_EOW); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_tsc_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_8) { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } else { + + /* "apache_beam/runners/worker/operations.py":1267 + * self.timestamp_combiner = ( + * None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else + * window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn)) # <<<<<<<<<<<<<< + * else: + * self.is_default_windowing = False # unknown +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_TimestampCombiner); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_windowing, __pyx_mstate_global->__pyx_n_u_windowfn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_tsc_type, __pyx_t_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_impl, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "apache_beam/runners/worker/operations.py":1265 + * self.is_default_windowing = windowing.is_default() + * tsc_type = windowing.timestamp_combiner + * self.timestamp_combiner = ( # <<<<<<<<<<<<<< + * None if tsc_type == window.TimestampCombiner.OUTPUT_AT_EOW else + * window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn)) +*/ + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->timestamp_combiner); + __Pyx_DECREF(__pyx_v_self->timestamp_combiner); + __pyx_v_self->timestamp_combiner = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1262 + * else: + * self.combine_fn_compact = self.combine_fn.compact + * if windowing: # <<<<<<<<<<<<<< + * self.is_default_windowing = windowing.is_default() + * tsc_type = windowing.timestamp_combiner +*/ + goto __pyx_L6; + } + + /* "apache_beam/runners/worker/operations.py":1269 + * window.TimestampCombiner.get_impl(tsc_type, windowing.windowfn)) + * else: + * self.is_default_windowing = False # unknown # <<<<<<<<<<<<<< + * self.timestamp_combiner = None + * # Optimization for the (known tiny accumulator, often wide keyspace) +*/ + /*else*/ { + __pyx_v_self->is_default_windowing = 0; + + /* "apache_beam/runners/worker/operations.py":1270 + * else: + * self.is_default_windowing = False # unknown + * self.timestamp_combiner = None # <<<<<<<<<<<<<< + * # Optimization for the (known tiny accumulator, often wide keyspace) + * # combine functions. +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timestamp_combiner); + __Pyx_DECREF(__pyx_v_self->timestamp_combiner); + __pyx_v_self->timestamp_combiner = Py_None; + } + __pyx_L6:; + + /* "apache_beam/runners/worker/operations.py":1276 + * self.max_keys = ( + * 1000 * 1000 if + * isinstance(fn, (combiners.CountCombineFn, combiners.MeanCombineFn)) or # <<<<<<<<<<<<<< + * # TODO(b/36597732): Replace this 'or' part by adding the 'cy' optimized + * # combiners to the short list above. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_combiners); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CountCombineFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_combiners); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MeanCombineFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_11 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_3); + if (!__pyx_t_11) { + } else { + __pyx_t_10 = __pyx_t_11; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_11 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_6); + __pyx_t_10 = __pyx_t_11; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_10) { + } else { + __pyx_t_8 = __pyx_t_10; + goto __pyx_L7_bool_binop_done; + } + + /* "apache_beam/runners/worker/operations.py":1280 + * # combiners to the short list above. + * ( + * isinstance(fn, core.CallableWrapperCombineFn) and # <<<<<<<<<<<<<< + * fn._fn in (min, max, sum)) else 100 * 1000) # pylint: disable=protected-access + * self.key_count = 0 +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CallableWrapperCombineFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = PyObject_IsInstance(__pyx_v_fn, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_10) { + } else { + __pyx_t_8 = __pyx_t_10; + goto __pyx_L7_bool_binop_done; + } + + /* "apache_beam/runners/worker/operations.py":1281 + * ( + * isinstance(fn, core.CallableWrapperCombineFn) and + * fn._fn in (min, max, sum)) else 100 * 1000) # pylint: disable=protected-access # <<<<<<<<<<<<<< + * self.key_count = 0 + * self.table = {} +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fn, __pyx_mstate_global->__pyx_n_u_fn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_builtin_min, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_11) { + } else { + __pyx_t_10 = __pyx_t_11; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_builtin_max, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_11) { + } else { + __pyx_t_10 = __pyx_t_11; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_builtin_sum, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __pyx_t_11; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __pyx_t_10; + __pyx_t_8 = __pyx_t_11; + __pyx_L7_bool_binop_done:; + if (__pyx_t_8) { + __pyx_t_9 = 0xf4240; + } else { + __pyx_t_9 = 0x186a0; + } + + /* "apache_beam/runners/worker/operations.py":1274 + * # combine functions. + * # TODO(b/36567833): Bound by in-memory size rather than key count. + * self.max_keys = ( # <<<<<<<<<<<<<< + * 1000 * 1000 if + * isinstance(fn, (combiners.CountCombineFn, combiners.MeanCombineFn)) or +*/ + __pyx_v_self->max_keys = __pyx_t_9; + + /* "apache_beam/runners/worker/operations.py":1282 + * isinstance(fn, core.CallableWrapperCombineFn) and + * fn._fn in (min, max, sum)) else 100 * 1000) # pylint: disable=protected-access + * self.key_count = 0 # <<<<<<<<<<<<<< + * self.table = {} + * +*/ + __pyx_v_self->key_count = 0; + + /* "apache_beam/runners/worker/operations.py":1283 + * fn._fn in (min, max, sum)) else 100 * 1000) # pylint: disable=protected-access + * self.key_count = 0 + * self.table = {} # <<<<<<<<<<<<<< + * + * def setup(self, data_sampler=None): +*/ + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_v_self->table); + __Pyx_DECREF(__pyx_v_self->table); + __pyx_v_self->table = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1249 + * """ + * + * def __init__(self, name_context, spec, counter_factory, state_sampler, windowing=None): # <<<<<<<<<<<<<< + * super(PGBKCVOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_fn); + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_tsc_type); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1285 + * self.table = {} + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup = {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data_sampler = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setup (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data_sampler,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1285, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setup", 0) < (0)) __PYX_ERR(0, 1285, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_data_sampler = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setup", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1285, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_data_sampler); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_2setup(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_data_sampler) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setup", 0); + + /* "apache_beam/runners/worker/operations.py":1287 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Setup called for %s', self) + * super(PGBKCVOperation, self).setup(data_sampler) +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_start_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1288 + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: + * _LOGGER.debug('Setup called for %s', self) # <<<<<<<<<<<<<< + * super(PGBKCVOperation, self).setup(data_sampler) + * self.combine_fn.setup() +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1288, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Setup_called_for_s, ((PyObject *)__pyx_v_self)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1289 + * with self.scoped_start_state: + * _LOGGER.debug('Setup called for %s', self) + * super(PGBKCVOperation, self).setup(data_sampler) # <<<<<<<<<<<<<< + * self.combine_fn.setup() + * +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_9 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_data_sampler}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1290 + * _LOGGER.debug('Setup called for %s', self) + * super(PGBKCVOperation, self).setup(data_sampler) + * self.combine_fn.setup() # <<<<<<<<<<<<<< + * + * def process(self, wkv): +*/ + __pyx_t_4 = __pyx_v_self->combine_fn; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setup, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1287 + * def setup(self, data_sampler=None): + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Setup called for %s', self) + * super(PGBKCVOperation, self).setup(data_sampler) +*/ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 1287, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1287, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1287, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1287, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_9); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_9 = 0; + __PYX_ERR(0, 1287, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":1285 + * self.table = {} + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.setup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1292 + * self.combine_fn.setup() + * + * def process(self, wkv): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv, int __pyx_skip_dispatch) { + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_window = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_wkv)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1294 + * def process(self, wkv): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * key, value = wkv.value + * # pylint: disable=unidiomatic-typecheck +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1295 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * key, value = wkv.value # <<<<<<<<<<<<<< + * # pylint: disable=unidiomatic-typecheck + * # Optimization for the global window case. +*/ + __pyx_t_1 = __pyx_v_wkv->value; + __Pyx_INCREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1295, __pyx_L7_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L7_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 1295, __pyx_L7_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1295, __pyx_L7_error) + __pyx_L14_unpacking_done:; + } + __pyx_v_key = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_value = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1298 + * # pylint: disable=unidiomatic-typecheck + * # Optimization for the global window case. + * if self.is_default_windowing: # <<<<<<<<<<<<<< + * self.add_key_value(key, value, None) + * else: +*/ + if (__pyx_v_self->is_default_windowing) { + + /* "apache_beam/runners/worker/operations.py":1299 + * # Optimization for the global window case. + * if self.is_default_windowing: + * self.add_key_value(key, value, None) # <<<<<<<<<<<<<< + * else: + * for window in wkv.windows: +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_key_value(__pyx_v_self, __pyx_v_key, __pyx_v_value, Py_None, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1298 + * # pylint: disable=unidiomatic-typecheck + * # Optimization for the global window case. + * if self.is_default_windowing: # <<<<<<<<<<<<<< + * self.add_key_value(key, value, None) + * else: +*/ + goto __pyx_L15; + } + + /* "apache_beam/runners/worker/operations.py":1301 + * self.add_key_value(key, value, None) + * else: + * for window in wkv.windows: # <<<<<<<<<<<<<< + * self.add_key_value((window, key), + * value, +*/ + /*else*/ { + if (likely(PyList_CheckExact(__pyx_v_wkv->windows)) || PyTuple_CheckExact(__pyx_v_wkv->windows)) { + __pyx_t_1 = __pyx_v_wkv->windows; __Pyx_INCREF(__pyx_t_1); + __pyx_t_11 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_wkv->windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1301, __pyx_L7_error) + } + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1301, __pyx_L7_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_11; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1301, __pyx_L7_error) + #endif + if (__pyx_t_11 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); + #endif + ++__pyx_t_11; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L7_error) + } else { + __pyx_t_2 = __pyx_t_12(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1301, __pyx_L7_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_window, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1302 + * else: + * for window in wkv.windows: + * self.add_key_value((window, key), # <<<<<<<<<<<<<< + * value, + * wkv.timestamp if self.timestamp_combiner else None) +*/ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_window); + __Pyx_GIVEREF(__pyx_v_window); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_window) != (0)) __PYX_ERR(0, 1302, __pyx_L7_error); + __Pyx_INCREF(__pyx_v_key); + __Pyx_GIVEREF(__pyx_v_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key) != (0)) __PYX_ERR(0, 1302, __pyx_L7_error); + + /* "apache_beam/runners/worker/operations.py":1304 + * self.add_key_value((window, key), + * value, + * wkv.timestamp if self.timestamp_combiner else None) # <<<<<<<<<<<<<< + * + * def add_key_value(self, wkey, value, timestamp): +*/ + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_self->timestamp_combiner); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1304, __pyx_L7_error) + if (__pyx_t_13) { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_wkv), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } + + /* "apache_beam/runners/worker/operations.py":1302 + * else: + * for window in wkv.windows: + * self.add_key_value((window, key), # <<<<<<<<<<<<<< + * value, + * wkv.timestamp if self.timestamp_combiner else None) +*/ + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_key_value(__pyx_v_self, __pyx_t_2, __pyx_v_value, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1301 + * self.add_key_value(key, value, None) + * else: + * for window in wkv.windows: # <<<<<<<<<<<<<< + * self.add_key_value((window, key), + * value, +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L15:; + + /* "apache_beam/runners/worker/operations.py":1294 + * def process(self, wkv): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * key, value = wkv.value + * # pylint: disable=unidiomatic-typecheck +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1294, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1294, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__pyx_t_13 < (0)) __PYX_ERR(0, 1294, __pyx_L9_except_error) + __pyx_t_15 = (!__pyx_t_13); + if (unlikely(__pyx_t_15)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1294, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L22; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L22:; + } + + /* "apache_beam/runners/worker/operations.py":1292 + * self.combine_fn.setup() + * + * def process(self, wkv): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_window); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wkv,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1292, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1292, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1292, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 1292, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1292, __pyx_L3_error) + } + __pyx_v_wkv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1292, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wkv), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "wkv", 0))) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_4process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_wkv); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_4process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wkv) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process(__pyx_v_self, __pyx_v_wkv, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1306 + * wkv.timestamp if self.timestamp_combiner else None) + * + * def add_key_value(self, wkey, value, timestamp): # <<<<<<<<<<<<<< + * entry = self.table.get(wkey, None) + * if entry is None: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_add_key_value(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch) { + PyObject *__pyx_v_entry = NULL; + long __pyx_v_target; + PyObject *__pyx_v_old_wkeys = NULL; + PyObject *__pyx_v_old_wkey = NULL; + PyObject *__pyx_v_old_wvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_key_value", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_key_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_wkey, __pyx_v_value, __pyx_v_timestamp}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1307 + * + * def add_key_value(self, wkey, value, timestamp): + * entry = self.table.get(wkey, None) # <<<<<<<<<<<<<< + * if entry is None: + * if self.key_count >= self.max_keys: +*/ + if (unlikely(__pyx_v_self->table == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(0, 1307, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->table, __pyx_v_wkey, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_entry = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1308 + * def add_key_value(self, wkey, value, timestamp): + * entry = self.table.get(wkey, None) + * if entry is None: # <<<<<<<<<<<<<< + * if self.key_count >= self.max_keys: + * target = self.key_count * 9 // 10 +*/ + __pyx_t_6 = (__pyx_v_entry == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1309 + * entry = self.table.get(wkey, None) + * if entry is None: + * if self.key_count >= self.max_keys: # <<<<<<<<<<<<<< + * target = self.key_count * 9 // 10 + * old_wkeys = [] +*/ + __pyx_t_6 = (__pyx_v_self->key_count >= __pyx_v_self->max_keys); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1310 + * if entry is None: + * if self.key_count >= self.max_keys: + * target = self.key_count * 9 // 10 # <<<<<<<<<<<<<< + * old_wkeys = [] + * # TODO(robertwb): Use an LRU cache? +*/ + __pyx_v_target = __Pyx_div_long((__pyx_v_self->key_count * 9), 10, 1); + + /* "apache_beam/runners/worker/operations.py":1311 + * if self.key_count >= self.max_keys: + * target = self.key_count * 9 // 10 + * old_wkeys = [] # <<<<<<<<<<<<<< + * # TODO(robertwb): Use an LRU cache? + * for old_wkey, old_wvalue in self.table.items(): +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_old_wkeys = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1313 + * old_wkeys = [] + * # TODO(robertwb): Use an LRU cache? + * for old_wkey, old_wvalue in self.table.items(): # <<<<<<<<<<<<<< + * old_wkeys.append(old_wkey) # Can't mutate while iterating. + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) +*/ + __pyx_t_7 = 0; + if (unlikely(__pyx_v_self->table == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 1313, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->table, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_9); + if (unlikely(__pyx_t_10 == 0)) break; + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_old_wkey, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_old_wvalue, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1314 + * # TODO(robertwb): Use an LRU cache? + * for old_wkey, old_wvalue in self.table.items(): + * old_wkeys.append(old_wkey) # Can't mutate while iterating. # <<<<<<<<<<<<<< + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) + * self.key_count -= 1 +*/ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_old_wkeys, __pyx_v_old_wkey); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1314, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1315 + * for old_wkey, old_wvalue in self.table.items(): + * old_wkeys.append(old_wkey) # Can't mutate while iterating. + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) # <<<<<<<<<<<<<< + * self.key_count -= 1 + * if self.key_count <= target: +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_old_wvalue, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_old_wvalue, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, __pyx_v_old_wkey, __pyx_t_4, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1316 + * old_wkeys.append(old_wkey) # Can't mutate while iterating. + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) + * self.key_count -= 1 # <<<<<<<<<<<<<< + * if self.key_count <= target: + * break +*/ + __pyx_v_self->key_count = (__pyx_v_self->key_count - 1); + + /* "apache_beam/runners/worker/operations.py":1317 + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) + * self.key_count -= 1 + * if self.key_count <= target: # <<<<<<<<<<<<<< + * break + * for old_wkey in reversed(old_wkeys): +*/ + __pyx_t_6 = (__pyx_v_self->key_count <= __pyx_v_target); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1318 + * self.key_count -= 1 + * if self.key_count <= target: + * break # <<<<<<<<<<<<<< + * for old_wkey in reversed(old_wkeys): + * del self.table[old_wkey] +*/ + goto __pyx_L6_break; + + /* "apache_beam/runners/worker/operations.py":1317 + * self.output_key(old_wkey, old_wvalue[0], old_wvalue[1]) + * self.key_count -= 1 + * if self.key_count <= target: # <<<<<<<<<<<<<< + * break + * for old_wkey in reversed(old_wkeys): +*/ + } + } + __pyx_L6_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1319 + * if self.key_count <= target: + * break + * for old_wkey in reversed(old_wkeys): # <<<<<<<<<<<<<< + * del self.table[old_wkey] + * self.key_count += 1 +*/ + __pyx_t_1 = __pyx_v_old_wkeys; __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1319, __pyx_L1_error) + #endif + --__pyx_t_8; + for (;;) { + if (__pyx_t_8 < 0) break; + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1319, __pyx_L1_error) + #endif + if (__pyx_t_8 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); + --__pyx_t_8; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_old_wkey, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1320 + * break + * for old_wkey in reversed(old_wkeys): + * del self.table[old_wkey] # <<<<<<<<<<<<<< + * self.key_count += 1 + * # We save the accumulator as a one element list so we can efficiently +*/ + if (unlikely(__pyx_v_self->table == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1320, __pyx_L1_error) + } + if (unlikely((PyDict_DelItem(__pyx_v_self->table, __pyx_v_old_wkey) < 0))) __PYX_ERR(0, 1320, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1319 + * if self.key_count <= target: + * break + * for old_wkey in reversed(old_wkeys): # <<<<<<<<<<<<<< + * del self.table[old_wkey] + * self.key_count += 1 +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1309 + * entry = self.table.get(wkey, None) + * if entry is None: + * if self.key_count >= self.max_keys: # <<<<<<<<<<<<<< + * target = self.key_count * 9 // 10 + * old_wkeys = [] +*/ + } + + /* "apache_beam/runners/worker/operations.py":1321 + * for old_wkey in reversed(old_wkeys): + * del self.table[old_wkey] + * self.key_count += 1 # <<<<<<<<<<<<<< + * # We save the accumulator as a one element list so we can efficiently + * # mutate when new values are added without searching the cache again. +*/ + __pyx_v_self->key_count = (__pyx_v_self->key_count + 1); + + /* "apache_beam/runners/worker/operations.py":1325 + * # mutate when new values are added without searching the cache again. + * entry = self.table[wkey] = [ + * self.combine_fn.create_accumulator(), timestamp # <<<<<<<<<<<<<< + * ] + * entry[0] = self.combine_fn_add_input(entry[0], value) +*/ + __pyx_t_3 = __pyx_v_self->combine_fn; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":1324 + * # We save the accumulator as a one element list so we can efficiently + * # mutate when new values are added without searching the cache again. + * entry = self.table[wkey] = [ # <<<<<<<<<<<<<< + * self.combine_fn.create_accumulator(), timestamp + * ] +*/ + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_v_timestamp) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_entry, __pyx_t_3); + if (unlikely(__pyx_v_self->table == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1324, __pyx_L1_error) + } + if (unlikely((PyDict_SetItem(__pyx_v_self->table, __pyx_v_wkey, __pyx_t_3) < 0))) __PYX_ERR(0, 1324, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1308 + * def add_key_value(self, wkey, value, timestamp): + * entry = self.table.get(wkey, None) + * if entry is None: # <<<<<<<<<<<<<< + * if self.key_count >= self.max_keys: + * target = self.key_count * 9 // 10 +*/ + } + + /* "apache_beam/runners/worker/operations.py":1327 + * self.combine_fn.create_accumulator(), timestamp + * ] + * entry[0] = self.combine_fn_add_input(entry[0], value) # <<<<<<<<<<<<<< + * if not self.is_default_windowing and self.timestamp_combiner: + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_self->combine_fn_add_input); + __pyx_t_2 = __pyx_v_self->combine_fn_add_input; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_entry, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_4, __pyx_v_value}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely((__Pyx_SetItemInt(__pyx_v_entry, 0, __pyx_t_3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1328 + * ] + * entry[0] = self.combine_fn_add_input(entry[0], value) + * if not self.is_default_windowing and self.timestamp_combiner: # <<<<<<<<<<<<<< + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) + * +*/ + __pyx_t_12 = (!__pyx_v_self->is_default_windowing); + if (__pyx_t_12) { + } else { + __pyx_t_6 = __pyx_t_12; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->timestamp_combiner); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_6 = __pyx_t_12; + __pyx_L12_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1329 + * entry[0] = self.combine_fn_add_input(entry[0], value) + * if not self.is_default_windowing and self.timestamp_combiner: + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) # <<<<<<<<<<<<<< + * + * def finish(self): +*/ + __pyx_t_2 = __pyx_v_self->timestamp_combiner; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_entry, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_timestamp}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely((__Pyx_SetItemInt(__pyx_v_entry, 1, __pyx_t_3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1328 + * ] + * entry[0] = self.combine_fn_add_input(entry[0], value) + * if not self.is_default_windowing and self.timestamp_combiner: # <<<<<<<<<<<<<< + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":1306 + * wkv.timestamp if self.timestamp_combiner else None) + * + * def add_key_value(self, wkey, value, timestamp): # <<<<<<<<<<<<<< + * entry = self.table.get(wkey, None) + * if entry is None: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.add_key_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_entry); + __Pyx_XDECREF(__pyx_v_old_wkeys); + __Pyx_XDECREF(__pyx_v_old_wkey); + __Pyx_XDECREF(__pyx_v_old_wvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value = {"add_key_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_wkey = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_timestamp = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_key_value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wkey,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1306, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1306, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1306, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1306, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_key_value", 0) < (0)) __PYX_ERR(0, 1306, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_key_value", 1, 3, 3, i); __PYX_ERR(0, 1306, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1306, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1306, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1306, __pyx_L3_error) + } + __pyx_v_wkey = values[0]; + __pyx_v_value = values[1]; + __pyx_v_timestamp = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_key_value", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1306, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.add_key_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6add_key_value(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_wkey, __pyx_v_value, __pyx_v_timestamp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_6add_key_value(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_key_value", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_add_key_value(__pyx_v_self, __pyx_v_wkey, __pyx_v_value, __pyx_v_timestamp, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.add_key_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1331 + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * for wkey, value in self.table.items(): +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_wkey = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_finish); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1333 + * def finish(self): + * # type: () -> None + * for wkey, value in self.table.items(): # <<<<<<<<<<<<<< + * self.output_key(wkey, value[0], value[1]) + * self.table = {} +*/ + __pyx_t_6 = 0; + if (unlikely(__pyx_v_self->table == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 1333, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->table, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + while (1) { + __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_8); + if (unlikely(__pyx_t_9 == 0)) break; + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_wkey, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1334 + * # type: () -> None + * for wkey, value in self.table.items(): + * self.output_key(wkey, value[0], value[1]) # <<<<<<<<<<<<<< + * self.table = {} + * self.key_count = 0 +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->output_key(__pyx_v_self, __pyx_v_wkey, __pyx_t_4, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1335 + * for wkey, value in self.table.items(): + * self.output_key(wkey, value[0], value[1]) + * self.table = {} # <<<<<<<<<<<<<< + * self.key_count = 0 + * +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->table); + __Pyx_DECREF(__pyx_v_self->table); + __pyx_v_self->table = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1336 + * self.output_key(wkey, value[0], value[1]) + * self.table = {} + * self.key_count = 0 # <<<<<<<<<<<<<< + * + * def teardown(self): +*/ + __pyx_v_self->key_count = 0; + + /* "apache_beam/runners/worker/operations.py":1331 + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * for wkey, value in self.table.items(): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wkey); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish = {"finish", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finish (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finish", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finish", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8finish(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_8finish(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finish", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.finish", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1338 + * self.key_count = 0 + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_teardown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1340 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Teardown called for %s', self) + * super(PGBKCVOperation, self).teardown() +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_finish_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1341 + * # type: () -> None + * with self.scoped_finish_state: + * _LOGGER.debug('Teardown called for %s', self) # <<<<<<<<<<<<<< + * super(PGBKCVOperation, self).teardown() + * self.combine_fn.teardown() +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Teardown_called_for_s, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1342 + * with self.scoped_finish_state: + * _LOGGER.debug('Teardown called for %s', self) + * super(PGBKCVOperation, self).teardown() # <<<<<<<<<<<<<< + * self.combine_fn.teardown() + * +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1342, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_teardown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1343 + * _LOGGER.debug('Teardown called for %s', self) + * super(PGBKCVOperation, self).teardown() + * self.combine_fn.teardown() # <<<<<<<<<<<<<< + * + * def output_key(self, wkey, accumulator, timestamp): +*/ + __pyx_t_4 = __pyx_v_self->combine_fn; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_teardown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1340 + * def teardown(self): + * # type: () -> None + * with self.scoped_finish_state: # <<<<<<<<<<<<<< + * _LOGGER.debug('Teardown called for %s', self) + * super(PGBKCVOperation, self).teardown() +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1340, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1340, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1340, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 1340, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/runners/worker/operations.py":1338 + * self.key_count = 0 + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown = {"teardown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("teardown (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("teardown", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("teardown", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10teardown(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10teardown(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("teardown", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.teardown", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1345 + * self.combine_fn.teardown() + * + * def output_key(self, wkey, accumulator, timestamp): # <<<<<<<<<<<<<< + * if self.combine_fn_compact is None: + * value = accumulator +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp, int __pyx_skip_dispatch) { + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_window = NULL; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("output_key", 0); + __Pyx_INCREF(__pyx_v_timestamp); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_output_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1346 + * + * def output_key(self, wkey, accumulator, timestamp): + * if self.combine_fn_compact is None: # <<<<<<<<<<<<<< + * value = accumulator + * else: +*/ + __pyx_t_6 = (__pyx_v_self->combine_fn_compact == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1347 + * def output_key(self, wkey, accumulator, timestamp): + * if self.combine_fn_compact is None: + * value = accumulator # <<<<<<<<<<<<<< + * else: + * value = self.combine_fn_compact(accumulator) +*/ + __Pyx_INCREF(__pyx_v_accumulator); + __pyx_v_value = __pyx_v_accumulator; + + /* "apache_beam/runners/worker/operations.py":1346 + * + * def output_key(self, wkey, accumulator, timestamp): + * if self.combine_fn_compact is None: # <<<<<<<<<<<<<< + * value = accumulator + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/runners/worker/operations.py":1349 + * value = accumulator + * else: + * value = self.combine_fn_compact(accumulator) # <<<<<<<<<<<<<< + * + * if self.is_default_windowing: +*/ + /*else*/ { + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->combine_fn_compact); + __pyx_t_4 = __pyx_v_self->combine_fn_compact; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_accumulator}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_value = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/runners/worker/operations.py":1351 + * value = self.combine_fn_compact(accumulator) + * + * if self.is_default_windowing: # <<<<<<<<<<<<<< + * self.output(_globally_windowed_value.with_value((wkey, value))) + * else: +*/ + if (__pyx_v_self->is_default_windowing) { + + /* "apache_beam/runners/worker/operations.py":1352 + * + * if self.is_default_windowing: + * self.output(_globally_windowed_value.with_value((wkey, value))) # <<<<<<<<<<<<<< + * else: + * window, key = wkey +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_wkey); + __Pyx_GIVEREF(__pyx_v_wkey); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_wkey) != (0)) __PYX_ERR(0, 1352, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 1352, __pyx_L1_error); + __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->__pyx_vtab)->with_value(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, __pyx_t_1, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_4), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1351 + * value = self.combine_fn_compact(accumulator) + * + * if self.is_default_windowing: # <<<<<<<<<<<<<< + * self.output(_globally_windowed_value.with_value((wkey, value))) + * else: +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1354 + * self.output(_globally_windowed_value.with_value((wkey, value))) + * else: + * window, key = wkey # <<<<<<<<<<<<<< + * if self.timestamp_combiner is None: + * timestamp = window.max_timestamp() +*/ + /*else*/ { + if ((likely(PyTuple_CheckExact(__pyx_v_wkey))) || (PyList_CheckExact(__pyx_v_wkey))) { + PyObject* sequence = __pyx_v_wkey; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1354, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_v_wkey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); + index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __pyx_v_window = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_key = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1355 + * else: + * window, key = wkey + * if self.timestamp_combiner is None: # <<<<<<<<<<<<<< + * timestamp = window.max_timestamp() + * self.output(WindowedValue((key, value), timestamp, (window, ))) +*/ + __pyx_t_6 = (__pyx_v_self->timestamp_combiner == Py_None); + if (__pyx_t_6) { + + /* "apache_beam/runners/worker/operations.py":1356 + * window, key = wkey + * if self.timestamp_combiner is None: + * timestamp = window.max_timestamp() # <<<<<<<<<<<<<< + * self.output(WindowedValue((key, value), timestamp, (window, ))) + * +*/ + __pyx_t_1 = __pyx_v_window; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_max_timestamp, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1355 + * else: + * window, key = wkey + * if self.timestamp_combiner is None: # <<<<<<<<<<<<<< + * timestamp = window.max_timestamp() + * self.output(WindowedValue((key, value), timestamp, (window, ))) +*/ + } + + /* "apache_beam/runners/worker/operations.py":1357 + * if self.timestamp_combiner is None: + * timestamp = window.max_timestamp() + * self.output(WindowedValue((key, value), timestamp, (window, ))) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = NULL; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_key); + __Pyx_GIVEREF(__pyx_v_key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key) != (0)) __PYX_ERR(0, 1357, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 1357, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_window); + __Pyx_GIVEREF(__pyx_v_window); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_window) != (0)) __PYX_ERR(0, 1357, __pyx_L1_error); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_t_2, __pyx_v_timestamp, __pyx_t_3}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_4), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L4:; + + /* "apache_beam/runners/worker/operations.py":1345 + * self.combine_fn.teardown() + * + * def output_key(self, wkey, accumulator, timestamp): # <<<<<<<<<<<<<< + * if self.combine_fn_compact is None: + * value = accumulator +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_window); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_timestamp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key = {"output_key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_wkey = 0; + PyObject *__pyx_v_accumulator = 0; + PyObject *__pyx_v_timestamp = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("output_key (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wkey,&__pyx_mstate_global->__pyx_n_u_accumulator,&__pyx_mstate_global->__pyx_n_u_timestamp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1345, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1345, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1345, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1345, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "output_key", 0) < (0)) __PYX_ERR(0, 1345, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("output_key", 1, 3, 3, i); __PYX_ERR(0, 1345, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1345, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1345, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1345, __pyx_L3_error) + } + __pyx_v_wkey = values[0]; + __pyx_v_accumulator = values[1]; + __pyx_v_timestamp = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("output_key", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1345, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_12output_key(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_12output_key(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_wkey, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_timestamp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("output_key", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key(__pyx_v_self, __pyx_v_wkey, __pyx_v_accumulator, __pyx_v_timestamp, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.output_key", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":135 + * + * cdef class PGBKCVOperation(Operation): + * cdef public object combine_fn # <<<<<<<<<<<<<< + * cdef public object combine_fn_add_input + * cdef public object combine_fn_compact +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->combine_fn); + __pyx_r = __pyx_v_self->combine_fn; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->combine_fn); + __Pyx_DECREF(__pyx_v_self->combine_fn); + __pyx_v_self->combine_fn = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->combine_fn); + __Pyx_DECREF(__pyx_v_self->combine_fn); + __pyx_v_self->combine_fn = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":136 + * cdef class PGBKCVOperation(Operation): + * cdef public object combine_fn + * cdef public object combine_fn_add_input # <<<<<<<<<<<<<< + * cdef public object combine_fn_compact + * cdef public bint is_default_windowing +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->combine_fn_add_input); + __pyx_r = __pyx_v_self->combine_fn_add_input; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input); + __Pyx_DECREF(__pyx_v_self->combine_fn_add_input); + __pyx_v_self->combine_fn_add_input = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->combine_fn_add_input); + __Pyx_DECREF(__pyx_v_self->combine_fn_add_input); + __pyx_v_self->combine_fn_add_input = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":137 + * cdef public object combine_fn + * cdef public object combine_fn_add_input + * cdef public object combine_fn_compact # <<<<<<<<<<<<<< + * cdef public bint is_default_windowing + * cdef public object timestamp_combiner +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->combine_fn_compact); + __pyx_r = __pyx_v_self->combine_fn_compact; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->combine_fn_compact); + __Pyx_DECREF(__pyx_v_self->combine_fn_compact); + __pyx_v_self->combine_fn_compact = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->combine_fn_compact); + __Pyx_DECREF(__pyx_v_self->combine_fn_compact); + __pyx_v_self->combine_fn_compact = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":138 + * cdef public object combine_fn_add_input + * cdef public object combine_fn_compact + * cdef public bint is_default_windowing # <<<<<<<<<<<<<< + * cdef public object timestamp_combiner + * cdef dict table +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_default_windowing); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.is_default_windowing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 138, __pyx_L1_error) + __pyx_v_self->is_default_windowing = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.is_default_windowing.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.pxd":139 + * cdef public object combine_fn_compact + * cdef public bint is_default_windowing + * cdef public object timestamp_combiner # <<<<<<<<<<<<<< + * cdef dict table + * cdef long max_keys +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner___get__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->timestamp_combiner); + __pyx_r = __pyx_v_self->timestamp_combiner; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->timestamp_combiner); + __Pyx_DECREF(__pyx_v_self->timestamp_combiner); + __pyx_v_self->timestamp_combiner = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_4__del__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timestamp_combiner); + __Pyx_DECREF(__pyx_v_self->timestamp_combiner); + __pyx_v_self->timestamp_combiner = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_14__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_14__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->is_default_windowing); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_self->key_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_self->max_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(24); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_self->combine_fn); + __Pyx_GIVEREF(__pyx_v_self->combine_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->combine_fn) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->combine_fn_add_input); + __Pyx_GIVEREF(__pyx_v_self->combine_fn_add_input); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->combine_fn_add_input) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->combine_fn_compact); + __Pyx_GIVEREF(__pyx_v_self->combine_fn_compact); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->combine_fn_compact) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_3) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_t_4) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 11, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 12, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 13, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 14, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 15, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 16, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 17, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 18, __pyx_t_5) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 19, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 20, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 21, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->table); + __Pyx_GIVEREF(__pyx_v_self->table); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 22, __pyx_v_self->table) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->timestamp_combiner); + __Pyx_GIVEREF(__pyx_v_self->timestamp_combiner); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 23, __pyx_v_self->timestamp_combiner) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v__dict = __pyx_t_6; + __pyx_t_6 = 0; + + /* "(tree fragment)":7 + * state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_8 = (__pyx_v__dict != Py_None); + if (__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + __pyx_L4_bool_binop_done:; + if (__pyx_t_7) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.combine_fn, self.combine_fn_add_input, self.combine_fn_compact, self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.is_default_windowing, self.key_count, self.max_keys, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name, self.table, self.timestamp_combiner) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, None), state +*/ + /*else*/ { + __pyx_t_8 = (__pyx_v_self->combine_fn != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->combine_fn_add_input != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->combine_fn_compact != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->__pyx_base.step_name != Py_None); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->table != ((PyObject*)Py_None)); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->timestamp_combiner != Py_None); + __pyx_t_7 = __pyx_t_8; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_7; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None + * if use_setstate: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_106916135); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_106916135); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_mstate_global->__pyx_int_106916135) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.combine_fn is not None or self.combine_fn_add_input is not None or self.combine_fn_compact is not None or self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None or self.table is not None or self.timestamp_combiner is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, None), state + * else: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PGBKCVOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_106916135); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_106916135); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_mstate_global->__pyx_int_106916135) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_16__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_16__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.PGBKCVOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1366 + * with all the items. + * """ + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_o)}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/operations.py":1368 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + /*with:*/ { + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx_base.scoped_process_state, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":1369 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.output(o) +*/ + if (__pyx_v_self->__pyx_base.debug_logging_enabled) { + + /* "apache_beam/runners/worker/operations.py":1370 + * with self.scoped_process_state: + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) # <<<<<<<<<<<<<< + * self.output(o) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Processing_s_in_s, ((PyObject *)__pyx_v_o), ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1369 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * if self.debug_logging_enabled: # <<<<<<<<<<<<<< + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.output(o) +*/ + } + + /* "apache_beam/runners/worker/operations.py":1371 + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) + * self.output(o) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.output(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v_self), __pyx_v_o, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1368 + * def process(self, o): + * # type: (WindowedValue) -> None + * with self.scoped_process_state: # <<<<<<<<<<<<<< + * if self.debug_logging_enabled: + * _LOGGER.debug('Processing [%s] in %s', o, self) +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1368, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1368, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 1368, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 1368, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L17; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L17:; + } + + /* "apache_beam/runners/worker/operations.py":1366 + * with all the items. + * """ + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process = {"process", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_o,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1366, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1366, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process", 0) < (0)) __PYX_ERR(0, 1366, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, i); __PYX_ERR(0, 1366, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1366, __pyx_L3_error) + } + __pyx_v_o = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1366, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 1, "o", 0))) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self), __pyx_v_o); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process(__pyx_v_self, __pyx_v_o, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.process", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_2__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_2__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.debug_logging_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.setup_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.consumers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.consumers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.consumers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.counter_factory); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.counter_factory); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.counter_factory) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.data_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.data_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.data_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.execution_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.execution_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.execution_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.metrics_container); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.metrics_container) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name_context); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.name_context) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.operation_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.operation_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->__pyx_base.operation_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.receivers); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.receivers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->__pyx_base.receivers) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_finish_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_finish_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.scoped_finish_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_process_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_process_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.scoped_process_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.scoped_start_state); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.scoped_start_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.scoped_start_state) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_2) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.spec); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 13, __pyx_v_self->__pyx_base.spec) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.state_sampler); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.state_sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 14, __pyx_v_self->__pyx_base.state_sampler) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.step_name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.step_name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 15, __pyx_v_self->__pyx_base.step_name) != (0)) __PYX_ERR(3, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(3, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.consumers, self.counter_factory, self.data_sampler, self.debug_logging_enabled, self.execution_context, self.metrics_container, self.name_context, self.operation_name, self.receivers, self.scoped_finish_state, self.scoped_process_state, self.scoped_start_state, self.setup_done, self.spec, self.state_sampler, self.step_name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->__pyx_base.consumers != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.counter_factory != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.data_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.execution_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.metrics_container != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.name_context != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.operation_name != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.receivers != ((PyObject*)Py_None)); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_finish_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_process_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.scoped_start_state != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.spec != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.state_sampler != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.step_name != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.consumers is not None or self.counter_factory is not None or self.data_sampler is not None or self.execution_context is not None or self.metrics_container is not None or self.name_context is not None or self.operation_name is not None or self.receivers is not None or self.scoped_finish_state is not None or self.scoped_process_state is not None or self.scoped_start_state is not None or self.spec is not None or self.state_sampler is not None or self.step_name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, None), state + * else: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FlattenOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_54202627); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_54202627); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_54202627) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(3, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(3, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(3, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_4__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16FlattenOperation_4__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(3, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.FlattenOperation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1374 + * + * + * def create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_6create_operation, "Create Operation object for given operation specification."); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_7create_operation = {"create_operation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_6create_operation}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_7create_operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_spec = 0; + PyObject *__pyx_v_counter_factory = 0; + CYTHON_UNUSED PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_state_sampler = 0; + PyObject *__pyx_v_test_shuffle_source = 0; + PyObject *__pyx_v_test_shuffle_sink = 0; + PyObject *__pyx_v_is_streaming = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_operation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_spec,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_state_sampler,&__pyx_mstate_global->__pyx_n_u_test_shuffle_source,&__pyx_mstate_global->__pyx_n_u_test_shuffle_sink,&__pyx_mstate_global->__pyx_n_u_is_streaming,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1374, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_operation", 0) < (0)) __PYX_ERR(0, 1374, __pyx_L3_error) + + /* "apache_beam/runners/worker/operations.py":1378 + * spec, + * counter_factory, + * step_name=None, # <<<<<<<<<<<<<< + * state_sampler=None, + * test_shuffle_source=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1379 + * counter_factory, + * step_name=None, + * state_sampler=None, # <<<<<<<<<<<<<< + * test_shuffle_source=None, + * test_shuffle_sink=None, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1380 + * step_name=None, + * state_sampler=None, + * test_shuffle_source=None, # <<<<<<<<<<<<<< + * test_shuffle_sink=None, + * is_streaming=False): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1381 + * state_sampler=None, + * test_shuffle_source=None, + * test_shuffle_sink=None, # <<<<<<<<<<<<<< + * is_streaming=False): + * # type: (...) -> Operation +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1382 + * test_shuffle_source=None, + * test_shuffle_sink=None, + * is_streaming=False): # <<<<<<<<<<<<<< + * # type: (...) -> Operation + * +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_operation", 0, 3, 8, i); __PYX_ERR(0, 1374, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1374, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1374, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1374, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/worker/operations.py":1378 + * spec, + * counter_factory, + * step_name=None, # <<<<<<<<<<<<<< + * state_sampler=None, + * test_shuffle_source=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1379 + * counter_factory, + * step_name=None, + * state_sampler=None, # <<<<<<<<<<<<<< + * test_shuffle_source=None, + * test_shuffle_sink=None, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1380 + * step_name=None, + * state_sampler=None, + * test_shuffle_source=None, # <<<<<<<<<<<<<< + * test_shuffle_sink=None, + * is_streaming=False): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1381 + * state_sampler=None, + * test_shuffle_source=None, + * test_shuffle_sink=None, # <<<<<<<<<<<<<< + * is_streaming=False): + * # type: (...) -> Operation +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_name_context = values[0]; + __pyx_v_spec = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_step_name = values[3]; + __pyx_v_state_sampler = values[4]; + __pyx_v_test_shuffle_source = values[5]; + __pyx_v_test_shuffle_sink = values[6]; + __pyx_v_is_streaming = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_operation", 0, 3, 8, __pyx_nargs); __PYX_ERR(0, 1374, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_operation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(__pyx_self, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_step_name, __pyx_v_state_sampler, __pyx_v_test_shuffle_source, __pyx_v_test_shuffle_sink, __pyx_v_is_streaming); + + /* "apache_beam/runners/worker/operations.py":1374 + * + * + * def create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_6create_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name_context, PyObject *__pyx_v_spec, PyObject *__pyx_v_counter_factory, CYTHON_UNUSED PyObject *__pyx_v_step_name, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink, PyObject *__pyx_v_is_streaming) { + PyObject *__pyx_v_op = NULL; + PyObject *__pyx_v_NativeReadOperation = NULL; + PyObject *__pyx_v_NativeWriteOperation = NULL; + PyObject *__pyx_v_GroupedShuffleReadOperation = NULL; + PyObject *__pyx_v_UngroupedShuffleReadOperation = NULL; + PyObject *__pyx_v_ShuffleWriteOperation = NULL; + PyObject *__pyx_v_BatchGroupAlsoByWindowsOperation = NULL; + PyObject *__pyx_v_StreamingGroupAlsoByWindowsOperation = NULL; + PyObject *__pyx_v_ReifyTimestampAndWindowsOperation = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_operation", 0); + __Pyx_INCREF(__pyx_v_name_context); + + /* "apache_beam/runners/worker/operations.py":1388 + * + * # TODO(pabloem): Document arguments to this function call. + * if not isinstance(name_context, common.NameContext): # <<<<<<<<<<<<<< + * name_context = common.NameContext(step_name=name_context) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NameContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_name_context, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (!__pyx_t_3); + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1389 + * # TODO(pabloem): Document arguments to this function call. + * if not isinstance(name_context, common.NameContext): + * name_context = common.NameContext(step_name=name_context) # <<<<<<<<<<<<<< + * + * if isinstance(spec, operation_specs.WorkerRead): +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_common); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NameContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_step_name, __pyx_v_name_context, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF_SET(__pyx_v_name_context, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1388 + * + * # TODO(pabloem): Document arguments to this function call. + * if not isinstance(name_context, common.NameContext): # <<<<<<<<<<<<<< + * name_context = common.NameContext(step_name=name_context) + * +*/ + } + + /* "apache_beam/runners/worker/operations.py":1391 + * name_context = common.NameContext(step_name=name_context) + * + * if isinstance(spec, operation_specs.WorkerRead): # <<<<<<<<<<<<<< + * if isinstance(spec.source, iobase.SourceBundle): + * op = ReadOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WorkerRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1392 + * + * if isinstance(spec, operation_specs.WorkerRead): + * if isinstance(spec.source, iobase.SourceBundle): # <<<<<<<<<<<<<< + * op = ReadOperation( + * name_context, spec, counter_factory, state_sampler) # type: Operation +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_mstate_global->__pyx_n_u_source); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_iobase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SourceBundle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_t_6, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1393 + * if isinstance(spec, operation_specs.WorkerRead): + * if isinstance(spec.source, iobase.SourceBundle): + * op = ReadOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) # type: Operation + * else: +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/worker/operations.py":1394 + * if isinstance(spec.source, iobase.SourceBundle): + * op = ReadOperation( + * name_context, spec, counter_factory, state_sampler) # type: Operation # <<<<<<<<<<<<<< + * else: + * from dataflow_worker.native_operations import NativeReadOperation +*/ + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_v_op = ((PyObject *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1392 + * + * if isinstance(spec, operation_specs.WorkerRead): + * if isinstance(spec.source, iobase.SourceBundle): # <<<<<<<<<<<<<< + * op = ReadOperation( + * name_context, spec, counter_factory, state_sampler) # type: Operation +*/ + goto __pyx_L5; + } + + /* "apache_beam/runners/worker/operations.py":1396 + * name_context, spec, counter_factory, state_sampler) # type: Operation + * else: + * from dataflow_worker.native_operations import NativeReadOperation # <<<<<<<<<<<<<< + * op = NativeReadOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + /*else*/ { + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NativeReadOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_native_operation, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1396, __pyx_L1_error) + } + __pyx_t_5 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_5); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NativeReadOperation}; + __pyx_t_9 = 0; { + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_6); + __pyx_v_NativeReadOperation = __pyx_t_6; + break; + default:; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1397 + * else: + * from dataflow_worker.native_operations import NativeReadOperation + * op = NativeReadOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerWrite): +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_NativeReadOperation); + __pyx_t_2 = __pyx_v_NativeReadOperation; + + /* "apache_beam/runners/worker/operations.py":1398 + * from dataflow_worker.native_operations import NativeReadOperation + * op = NativeReadOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerWrite): + * from dataflow_worker.native_operations import NativeWriteOperation +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_op = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_L5:; + + /* "apache_beam/runners/worker/operations.py":1391 + * name_context = common.NameContext(step_name=name_context) + * + * if isinstance(spec, operation_specs.WorkerRead): # <<<<<<<<<<<<<< + * if isinstance(spec.source, iobase.SourceBundle): + * op = ReadOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1399 + * op = NativeReadOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerWrite): # <<<<<<<<<<<<<< + * from dataflow_worker.native_operations import NativeWriteOperation + * op = NativeWriteOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WorkerWrite); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1400 + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerWrite): + * from dataflow_worker.native_operations import NativeWriteOperation # <<<<<<<<<<<<<< + * op = NativeWriteOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NativeWriteOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_native_operation, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1400, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NativeWriteOperation}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __pyx_v_NativeWriteOperation = __pyx_t_5; + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1401 + * elif isinstance(spec, operation_specs.WorkerWrite): + * from dataflow_worker.native_operations import NativeWriteOperation + * op = NativeWriteOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerCombineFn): +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_NativeWriteOperation); + __pyx_t_6 = __pyx_v_NativeWriteOperation; + + /* "apache_beam/runners/worker/operations.py":1402 + * from dataflow_worker.native_operations import NativeWriteOperation + * op = NativeWriteOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerCombineFn): + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_op = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1399 + * op = NativeReadOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerWrite): # <<<<<<<<<<<<<< + * from dataflow_worker.native_operations import NativeWriteOperation + * op = NativeWriteOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1403 + * op = NativeWriteOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerCombineFn): # <<<<<<<<<<<<<< + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WorkerCombineFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1404 + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerCombineFn): + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_2 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1404, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_6); + } + __pyx_v_op = ((PyObject *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1403 + * op = NativeWriteOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerCombineFn): # <<<<<<<<<<<<<< + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1405 + * elif isinstance(spec, operation_specs.WorkerCombineFn): + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): # <<<<<<<<<<<<<< + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerDoFn): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WorkerPartialGroupByKey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1405, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1406 + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerDoFn): + * op = DoOperation(name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_create_pgbk_op); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_op = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1405 + * elif isinstance(spec, operation_specs.WorkerCombineFn): + * op = CombineOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): # <<<<<<<<<<<<<< + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerDoFn): +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1407 + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerDoFn): # <<<<<<<<<<<<<< + * op = DoOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WorkerDoFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1408 + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerDoFn): + * op = DoOperation(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): + * from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation +*/ + __pyx_t_2 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1408, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_v_op = ((PyObject *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1407 + * elif isinstance(spec, operation_specs.WorkerPartialGroupByKey): + * op = create_pgbk_op(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerDoFn): # <<<<<<<<<<<<<< + * op = DoOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1409 + * elif isinstance(spec, operation_specs.WorkerDoFn): + * op = DoOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation + * op = GroupedShuffleReadOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WorkerGroupingShuffleRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1410 + * op = DoOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): + * from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation # <<<<<<<<<<<<<< + * op = GroupedShuffleReadOperation( + * name_context, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GroupedShuffleReadOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1410, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GroupedShuffleReadOperation}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __pyx_v_GroupedShuffleReadOperation = __pyx_t_5; + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1411 + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): + * from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation + * op = GroupedShuffleReadOperation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_GroupedShuffleReadOperation); + __pyx_t_6 = __pyx_v_GroupedShuffleReadOperation; + + /* "apache_beam/runners/worker/operations.py":1416 + * counter_factory, + * state_sampler, + * shuffle_source=test_shuffle_source) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead): + * from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shuffle_source, __pyx_v_test_shuffle_source, __pyx_t_1, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_op = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1409 + * elif isinstance(spec, operation_specs.WorkerDoFn): + * op = DoOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerGroupingShuffleRead): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import GroupedShuffleReadOperation + * op = GroupedShuffleReadOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1417 + * state_sampler, + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation + * op = UngroupedShuffleReadOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_WorkerUngroupedShuffleRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1418 + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead): + * from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation # <<<<<<<<<<<<<< + * op = UngroupedShuffleReadOperation( + * name_context, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UngroupedShuffleReadOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1418, __pyx_L1_error) + } + __pyx_t_6 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_6); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UngroupedShuffleReadOperation}; + __pyx_t_9 = 0; { + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_2); + __pyx_v_UngroupedShuffleReadOperation = __pyx_t_2; + break; + default:; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1419 + * elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead): + * from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation + * op = UngroupedShuffleReadOperation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_UngroupedShuffleReadOperation); + __pyx_t_1 = __pyx_v_UngroupedShuffleReadOperation; + + /* "apache_beam/runners/worker/operations.py":1424 + * counter_factory, + * state_sampler, + * shuffle_source=test_shuffle_source) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerInMemoryWrite): + * op = InMemoryWriteOperation( +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shuffle_source, __pyx_v_test_shuffle_source, __pyx_t_5, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_v_op = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1417 + * state_sampler, + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerUngroupedShuffleRead): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import UngroupedShuffleReadOperation + * op = UngroupedShuffleReadOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1425 + * state_sampler, + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerInMemoryWrite): # <<<<<<<<<<<<<< + * op = InMemoryWriteOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WorkerInMemoryWrite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1426 + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerInMemoryWrite): + * op = InMemoryWriteOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/runners/worker/operations.py":1427 + * elif isinstance(spec, operation_specs.WorkerInMemoryWrite): + * op = InMemoryWriteOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): + * from dataflow_worker.shuffle_operations import ShuffleWriteOperation +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_op = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1425 + * state_sampler, + * shuffle_source=test_shuffle_source) + * elif isinstance(spec, operation_specs.WorkerInMemoryWrite): # <<<<<<<<<<<<<< + * op = InMemoryWriteOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1428 + * op = InMemoryWriteOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import ShuffleWriteOperation + * op = ShuffleWriteOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_WorkerShuffleWrite); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1429 + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): + * from dataflow_worker.shuffle_operations import ShuffleWriteOperation # <<<<<<<<<<<<<< + * op = ShuffleWriteOperation( + * name_context, +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ShuffleWriteOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1429, __pyx_L1_error) + } + __pyx_t_5 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_5); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ShuffleWriteOperation}; + __pyx_t_9 = 0; { + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_1); + __pyx_v_ShuffleWriteOperation = __pyx_t_1; + break; + default:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1430 + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): + * from dataflow_worker.shuffle_operations import ShuffleWriteOperation + * op = ShuffleWriteOperation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_ShuffleWriteOperation); + __pyx_t_6 = __pyx_v_ShuffleWriteOperation; + + /* "apache_beam/runners/worker/operations.py":1435 + * counter_factory, + * state_sampler, + * shuffle_sink=test_shuffle_sink) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerFlatten): + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_shuffle_sink, __pyx_v_test_shuffle_sink, __pyx_t_2, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_op = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1428 + * op = InMemoryWriteOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerShuffleWrite): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import ShuffleWriteOperation + * op = ShuffleWriteOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1436 + * state_sampler, + * shuffle_sink=test_shuffle_sink) + * elif isinstance(spec, operation_specs.WorkerFlatten): # <<<<<<<<<<<<<< + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerMergeWindows): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WorkerFlatten); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1437 + * shuffle_sink=test_shuffle_sink) + * elif isinstance(spec, operation_specs.WorkerFlatten): + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerMergeWindows): + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation +*/ + __pyx_t_5 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1437, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_6); + } + __pyx_v_op = ((PyObject *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1436 + * state_sampler, + * shuffle_sink=test_shuffle_sink) + * elif isinstance(spec, operation_specs.WorkerFlatten): # <<<<<<<<<<<<<< + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerMergeWindows): +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1438 + * elif isinstance(spec, operation_specs.WorkerFlatten): + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerMergeWindows): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WorkerMergeWindows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1438, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1439 + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerMergeWindows): + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation + * if is_streaming: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchGroupAlsoByWindowsOperation}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1439, __pyx_L1_error) + } + __pyx_t_5 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_5); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchGroupAlsoByWindowsOperation}; + __pyx_t_9 = 0; { + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_6); + __pyx_v_BatchGroupAlsoByWindowsOperation = __pyx_t_6; + break; + default:; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1440 + * elif isinstance(spec, operation_specs.WorkerMergeWindows): + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation # <<<<<<<<<<<<<< + * if is_streaming: + * op = StreamingGroupAlsoByWindowsOperation( +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StreamingGroupAlsoByWindowsOpera}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1440, __pyx_L1_error) + } + __pyx_t_5 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_5); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StreamingGroupAlsoByWindowsOpera}; + __pyx_t_9 = 0; { + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_5, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_6); + __pyx_v_StreamingGroupAlsoByWindowsOperation = __pyx_t_6; + break; + default:; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1441 + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation + * if is_streaming: # <<<<<<<<<<<<<< + * op = StreamingGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_streaming); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1441, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/operations.py":1442 + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation + * if is_streaming: + * op = StreamingGroupAlsoByWindowsOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * else: +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_StreamingGroupAlsoByWindowsOperation); + __pyx_t_2 = __pyx_v_StreamingGroupAlsoByWindowsOperation; + + /* "apache_beam/runners/worker/operations.py":1443 + * if is_streaming: + * op = StreamingGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * else: + * op = BatchGroupAlsoByWindowsOperation( +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_op = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1441 + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation + * if is_streaming: # <<<<<<<<<<<<<< + * op = StreamingGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + goto __pyx_L6; + } + + /* "apache_beam/runners/worker/operations.py":1445 + * name_context, spec, counter_factory, state_sampler) + * else: + * op = BatchGroupAlsoByWindowsOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): +*/ + /*else*/ { + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_BatchGroupAlsoByWindowsOperation); + __pyx_t_6 = __pyx_v_BatchGroupAlsoByWindowsOperation; + + /* "apache_beam/runners/worker/operations.py":1446 + * else: + * op = BatchGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_op = __pyx_t_5; + __pyx_t_5 = 0; + } + __pyx_L6:; + + /* "apache_beam/runners/worker/operations.py":1438 + * elif isinstance(spec, operation_specs.WorkerFlatten): + * op = FlattenOperation(name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerMergeWindows): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import BatchGroupAlsoByWindowsOperation + * from dataflow_worker.shuffle_operations import StreamingGroupAlsoByWindowsOperation +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1447 + * op = BatchGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation + * op = ReifyTimestampAndWindowsOperation( +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_operation_specs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WorkerReifyTimestampAndWindows); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_spec, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(__pyx_t_4)) { + + /* "apache_beam/runners/worker/operations.py":1448 + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation # <<<<<<<<<<<<<< + * op = ReifyTimestampAndWindowsOperation( + * name_context, spec, counter_factory, state_sampler) +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ReifyTimestampAndWindowsOperatio}; + __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_dataflow_worker_shuffle_operatio, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1448, __pyx_L1_error) + } + __pyx_t_6 = __pyx_t_8; + __Pyx_GOTREF(__pyx_t_6); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ReifyTimestampAndWindowsOperatio}; + __pyx_t_9 = 0; { + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_6, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + switch (__pyx_t_9) { + case 0: + __Pyx_INCREF(__pyx_t_5); + __pyx_v_ReifyTimestampAndWindowsOperation = __pyx_t_5; + break; + default:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1449 + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation + * op = ReifyTimestampAndWindowsOperation( # <<<<<<<<<<<<<< + * name_context, spec, counter_factory, state_sampler) + * else: +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_ReifyTimestampAndWindowsOperation); + __pyx_t_2 = __pyx_v_ReifyTimestampAndWindowsOperation; + + /* "apache_beam/runners/worker/operations.py":1450 + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation + * op = ReifyTimestampAndWindowsOperation( + * name_context, spec, counter_factory, state_sampler) # <<<<<<<<<<<<<< + * else: + * raise TypeError( +*/ + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_name_context, __pyx_v_spec, __pyx_v_counter_factory, __pyx_v_state_sampler}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_v_op = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/runners/worker/operations.py":1447 + * op = BatchGroupAlsoByWindowsOperation( + * name_context, spec, counter_factory, state_sampler) + * elif isinstance(spec, operation_specs.WorkerReifyTimestampAndWindows): # <<<<<<<<<<<<<< + * from dataflow_worker.shuffle_operations import ReifyTimestampAndWindowsOperation + * op = ReifyTimestampAndWindowsOperation( +*/ + goto __pyx_L4; + } + + /* "apache_beam/runners/worker/operations.py":1452 + * name_context, spec, counter_factory, state_sampler) + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * 'Expected an instance of operation_specs.Worker* class ' + * 'instead of %s' % (spec, )) +*/ + /*else*/ { + __pyx_t_2 = NULL; + + /* "apache_beam/runners/worker/operations.py":1454 + * raise TypeError( + * 'Expected an instance of operation_specs.Worker* class ' + * 'instead of %s' % (spec, )) # <<<<<<<<<<<<<< + * return op + * +*/ + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_spec), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/runners/worker/operations.py":1453 + * else: + * raise TypeError( + * 'Expected an instance of operation_specs.Worker* class ' # <<<<<<<<<<<<<< + * 'instead of %s' % (spec, )) + * return op +*/ + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_an_instance_of_operatio, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1452, __pyx_L1_error) + } + __pyx_L4:; + + /* "apache_beam/runners/worker/operations.py":1455 + * 'Expected an instance of operation_specs.Worker* class ' + * 'instead of %s' % (spec, )) + * return op # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_op); + __pyx_r = __pyx_v_op; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1374 + * + * + * def create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.create_operation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_op); + __Pyx_XDECREF(__pyx_v_NativeReadOperation); + __Pyx_XDECREF(__pyx_v_NativeWriteOperation); + __Pyx_XDECREF(__pyx_v_GroupedShuffleReadOperation); + __Pyx_XDECREF(__pyx_v_UngroupedShuffleReadOperation); + __Pyx_XDECREF(__pyx_v_ShuffleWriteOperation); + __Pyx_XDECREF(__pyx_v_BatchGroupAlsoByWindowsOperation); + __Pyx_XDECREF(__pyx_v_StreamingGroupAlsoByWindowsOperation); + __Pyx_XDECREF(__pyx_v_ReifyTimestampAndWindowsOperation); + __Pyx_XDECREF(__pyx_v_name_context); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1464 + * task. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * map_task, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__, "Initializes SimpleMapTaskExecutor.\n\n Args:\n map_task: The map task we are to run. The maptask contains a list of\n operations, and aligned lists for step_names, original_names,\n system_names of pipeline steps.\n counter_factory: The CounterFactory instance for the work item.\n state_sampler: The StateSampler tracking the execution step.\n test_shuffle_source: Used during tests for dependency injection into\n shuffle read operation objects.\n test_shuffle_sink: Used during tests for dependency injection into\n shuffle write operation objects.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_map_task = 0; + PyObject *__pyx_v_counter_factory = 0; + PyObject *__pyx_v_state_sampler = 0; + PyObject *__pyx_v_test_shuffle_source = 0; + PyObject *__pyx_v_test_shuffle_sink = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_map_task,&__pyx_mstate_global->__pyx_n_u_counter_factory,&__pyx_mstate_global->__pyx_n_u_state_sampler,&__pyx_mstate_global->__pyx_n_u_test_shuffle_source,&__pyx_mstate_global->__pyx_n_u_test_shuffle_sink,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1464, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1464, __pyx_L3_error) + + /* "apache_beam/runners/worker/operations.py":1469 + * counter_factory, + * state_sampler, + * test_shuffle_source=None, # <<<<<<<<<<<<<< + * test_shuffle_sink=None): + * """Initializes SimpleMapTaskExecutor. +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1470 + * state_sampler, + * test_shuffle_source=None, + * test_shuffle_sink=None): # <<<<<<<<<<<<<< + * """Initializes SimpleMapTaskExecutor. + * +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, i); __PYX_ERR(0, 1464, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1464, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1464, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1464, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1464, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1464, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/runners/worker/operations.py":1469 + * counter_factory, + * state_sampler, + * test_shuffle_source=None, # <<<<<<<<<<<<<< + * test_shuffle_sink=None): + * """Initializes SimpleMapTaskExecutor. +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/runners/worker/operations.py":1470 + * state_sampler, + * test_shuffle_source=None, + * test_shuffle_sink=None): # <<<<<<<<<<<<<< + * """Initializes SimpleMapTaskExecutor. + * +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_map_task = values[1]; + __pyx_v_counter_factory = values[2]; + __pyx_v_state_sampler = values[3]; + __pyx_v_test_shuffle_source = values[4]; + __pyx_v_test_shuffle_sink = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 1464, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(__pyx_self, __pyx_v_self, __pyx_v_map_task, __pyx_v_counter_factory, __pyx_v_state_sampler, __pyx_v_test_shuffle_source, __pyx_v_test_shuffle_sink); + + /* "apache_beam/runners/worker/operations.py":1464 + * task. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * map_task, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_map_task, PyObject *__pyx_v_counter_factory, PyObject *__pyx_v_state_sampler, PyObject *__pyx_v_test_shuffle_source, PyObject *__pyx_v_test_shuffle_sink) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/operations.py":1485 + * """ + * + * self._map_task = map_task # <<<<<<<<<<<<<< + * self._counter_factory = counter_factory + * self._ops = [] # type: List[Operation] +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_map_task_2, __pyx_v_map_task) < (0)) __PYX_ERR(0, 1485, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1486 + * + * self._map_task = map_task + * self._counter_factory = counter_factory # <<<<<<<<<<<<<< + * self._ops = [] # type: List[Operation] + * self._state_sampler = state_sampler +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory_2, __pyx_v_counter_factory) < (0)) __PYX_ERR(0, 1486, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1487 + * self._map_task = map_task + * self._counter_factory = counter_factory + * self._ops = [] # type: List[Operation] # <<<<<<<<<<<<<< + * self._state_sampler = state_sampler + * self._test_shuffle_source = test_shuffle_source +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops, __pyx_t_1) < (0)) __PYX_ERR(0, 1487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1488 + * self._counter_factory = counter_factory + * self._ops = [] # type: List[Operation] + * self._state_sampler = state_sampler # <<<<<<<<<<<<<< + * self._test_shuffle_source = test_shuffle_source + * self._test_shuffle_sink = test_shuffle_sink +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_state_sampler_2, __pyx_v_state_sampler) < (0)) __PYX_ERR(0, 1488, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1489 + * self._ops = [] # type: List[Operation] + * self._state_sampler = state_sampler + * self._test_shuffle_source = test_shuffle_source # <<<<<<<<<<<<<< + * self._test_shuffle_sink = test_shuffle_sink + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_test_shuffle_source_2, __pyx_v_test_shuffle_source) < (0)) __PYX_ERR(0, 1489, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1490 + * self._state_sampler = state_sampler + * self._test_shuffle_source = test_shuffle_source + * self._test_shuffle_sink = test_shuffle_sink # <<<<<<<<<<<<<< + * + * def operations(self): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_test_shuffle_sink_2, __pyx_v_test_shuffle_sink) < (0)) __PYX_ERR(0, 1490, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":1464 + * task. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * map_task, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1492 + * self._test_shuffle_sink = test_shuffle_sink + * + * def operations(self): # <<<<<<<<<<<<<< + * # type: () -> List[Operation] + * return self._ops[:] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations = {"operations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("operations (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1492, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1492, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "operations", 0) < (0)) __PYX_ERR(0, 1492, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("operations", 1, 1, 1, i); __PYX_ERR(0, 1492, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1492, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("operations", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1492, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.operations", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_2operations(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("operations", 0); + + /* "apache_beam/runners/worker/operations.py":1494 + * def operations(self): + * # type: () -> List[Operation] + * return self._ops[:] # <<<<<<<<<<<<<< + * + * def execute(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/operations.py":1492 + * self._test_shuffle_sink = test_shuffle_sink + * + * def operations(self): # <<<<<<<<<<<<<< + * # type: () -> List[Operation] + * return self._ops[:] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.operations", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/operations.py":1496 + * return self._ops[:] + * + * def execute(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute, "Executes all the operation_specs.Worker* instructions in a map task.\n\n We update the map_task with the execution status, expressed as counters.\n\n Raises:\n RuntimeError: if we find more than on read instruction in task spec.\n TypeError: if the spec parameter is not an instance of the recognized\n operation_specs.Worker* classes.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute = {"execute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("execute (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1496, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1496, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute", 0) < (0)) __PYX_ERR(0, 1496, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute", 1, 1, 1, i); __PYX_ERR(0, 1496, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1496, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("execute", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1496, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_4execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_name_context = NULL; + PyObject *__pyx_v_spec = NULL; + PyObject *__pyx_v_op = NULL; + PyObject *__pyx_v_producer = NULL; + PyObject *__pyx_v_output_index = NULL; + PyObject *__pyx_v_ix = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_t_15; + Py_ssize_t __pyx_t_16; + PyObject *(*__pyx_t_17)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("execute", 0); + + /* "apache_beam/runners/worker/operations.py":1512 + * # The order of the elements is important because the inputs use + * # list indexes as references. + * for name_context, spec in zip(self._map_task.name_contexts, # <<<<<<<<<<<<<< + * self._map_task.operations): + * # This is used for logging and assigning names to counters. +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_map_task_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_contexts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/operations.py":1513 + * # list indexes as references. + * for name_context, spec in zip(self._map_task.name_contexts, + * self._map_task.operations): # <<<<<<<<<<<<<< + * # This is used for logging and assigning names to counters. + * op = create_operation( +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_map_task_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_operations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/runners/worker/operations.py":1512 + * # The order of the elements is important because the inputs use + * # list indexes as references. + * for name_context, spec in zip(self._map_task.name_contexts, # <<<<<<<<<<<<<< + * self._map_task.operations): + * # This is used for logging and assigning names to counters. +*/ + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1512, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1512, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1512, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1512, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1512, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_name_context, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_spec, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":1515 + * self._map_task.operations): + * # This is used for logging and assigning names to counters. + * op = create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create_operation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":1518 + * name_context, + * spec, + * self._counter_factory, # <<<<<<<<<<<<<< + * None, + * self._state_sampler, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counter_factory_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/runners/worker/operations.py":1520 + * self._counter_factory, + * None, + * self._state_sampler, # <<<<<<<<<<<<<< + * test_shuffle_source=self._test_shuffle_source, + * test_shuffle_sink=self._test_shuffle_sink) +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_state_sampler_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1520, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/runners/worker/operations.py":1521 + * None, + * self._state_sampler, + * test_shuffle_source=self._test_shuffle_source, # <<<<<<<<<<<<<< + * test_shuffle_sink=self._test_shuffle_sink) + * self._ops.append(op) +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_test_shuffle_source_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":1522 + * self._state_sampler, + * test_shuffle_source=self._test_shuffle_source, + * test_shuffle_sink=self._test_shuffle_sink) # <<<<<<<<<<<<<< + * self._ops.append(op) + * +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_test_shuffle_sink_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[6 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_name_context, __pyx_v_spec, __pyx_t_3, Py_None, __pyx_t_10}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_test_shuffle_source, __pyx_t_11, __pyx_t_13, __pyx_callargs+6, 0) < (0)) __PYX_ERR(0, 1515, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_test_shuffle_sink, __pyx_t_12, __pyx_t_13, __pyx_callargs+6, 1) < (0)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1523 + * test_shuffle_source=self._test_shuffle_source, + * test_shuffle_sink=self._test_shuffle_sink) + * self._ops.append(op) # <<<<<<<<<<<<<< + * + * # Add receiver operations to the appropriate producers. +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_op); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1526 + * + * # Add receiver operations to the appropriate producers. + * if hasattr(op.spec, 'input'): # <<<<<<<<<<<<<< + * producer, output_index = op.spec.input + * self._ops[producer].add_receiver(op, output_index) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_15 = __Pyx_HasAttr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_input); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":1527 + * # Add receiver operations to the appropriate producers. + * if hasattr(op.spec, 'input'): + * producer, output_index = op.spec.input # <<<<<<<<<<<<<< + * self._ops[producer].add_receiver(op, output_index) + * # Flatten has 'inputs', not 'input' +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_input); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1527, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_13); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + } + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); + index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_13 = __pyx_t_9(__pyx_t_12); if (unlikely(!__pyx_t_13)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_13); + __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1528 + * if hasattr(op.spec, 'input'): + * producer, output_index = op.spec.input + * self._ops[producer].add_receiver(op, output_index) # <<<<<<<<<<<<<< + * # Flatten has 'inputs', not 'input' + * if hasattr(op.spec, 'inputs'): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_producer); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = __pyx_t_12; + __Pyx_INCREF(__pyx_t_13); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_op, __pyx_v_output_index}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_receiver, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1526 + * + * # Add receiver operations to the appropriate producers. + * if hasattr(op.spec, 'input'): # <<<<<<<<<<<<<< + * producer, output_index = op.spec.input + * self._ops[producer].add_receiver(op, output_index) +*/ + } + + /* "apache_beam/runners/worker/operations.py":1530 + * self._ops[producer].add_receiver(op, output_index) + * # Flatten has 'inputs', not 'input' + * if hasattr(op.spec, 'inputs'): # <<<<<<<<<<<<<< + * for producer, output_index in op.spec.inputs: + * self._ops[producer].add_receiver(op, output_index) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __Pyx_HasAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_inputs); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_15) { + + /* "apache_beam/runners/worker/operations.py":1531 + * # Flatten has 'inputs', not 'input' + * if hasattr(op.spec, 'inputs'): + * for producer, output_index in op.spec.inputs: # <<<<<<<<<<<<<< + * self._ops[producer].add_receiver(op, output_index) + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_op, __pyx_mstate_global->__pyx_n_u_spec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_inputs); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { + __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); + __pyx_t_16 = 0; + __pyx_t_17 = NULL; + } else { + __pyx_t_16 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1531, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + for (;;) { + if (likely(!__pyx_t_17)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1531, __pyx_L1_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_16; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1531, __pyx_L1_error) + #endif + if (__pyx_t_16 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_12 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_16)); + #else + __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_16); + #endif + ++__pyx_t_16; + } + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1531, __pyx_L1_error) + } else { + __pyx_t_12 = __pyx_t_17(__pyx_t_4); + if (unlikely(!__pyx_t_12)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1531, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_12); + if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) { + PyObject* sequence = __pyx_t_12; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1531, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_13); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + } + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_13 = __pyx_t_9(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_L14_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_producer, __pyx_t_13); + __pyx_t_13 = 0; + __Pyx_XDECREF_SET(__pyx_v_output_index, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/operations.py":1532 + * if hasattr(op.spec, 'inputs'): + * for producer, output_index in op.spec.inputs: + * self._ops[producer].add_receiver(op, output_index) # <<<<<<<<<<<<<< + * + * for ix, op in reversed(list(enumerate(self._ops))): +*/ + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_v_producer); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = __pyx_t_11; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_op, __pyx_v_output_index}; + __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_receiver, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1531 + * # Flatten has 'inputs', not 'input' + * if hasattr(op.spec, 'inputs'): + * for producer, output_index in op.spec.inputs: # <<<<<<<<<<<<<< + * self._ops[producer].add_receiver(op, output_index) + * +*/ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1530 + * self._ops[producer].add_receiver(op, output_index) + * # Flatten has 'inputs', not 'input' + * if hasattr(op.spec, 'inputs'): # <<<<<<<<<<<<<< + * for producer, output_index in op.spec.inputs: + * self._ops[producer].add_receiver(op, output_index) +*/ + } + + /* "apache_beam/runners/worker/operations.py":1512 + * # The order of the elements is important because the inputs use + * # list indexes as references. + * for name_context, spec in zip(self._map_task.name_contexts, # <<<<<<<<<<<<<< + * self._map_task.operations): + * # This is used for logging and assigning names to counters. +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1534 + * self._ops[producer].add_receiver(op, output_index) + * + * for ix, op in reversed(list(enumerate(self._ops))): # <<<<<<<<<<<<<< + * _LOGGER.debug('Starting op %d %s', ix, op) + * op.start() +*/ + __pyx_t_4 = NULL; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_enumerate, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_12 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_12; __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1534, __pyx_L1_error) + #endif + --__pyx_t_7; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + for (;;) { + if (__pyx_t_7 < 0) break; + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1534, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + --__pyx_t_7; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) { + PyObject* sequence = __pyx_t_12; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1534, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_11); + } else { + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_11); + } + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L19_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_11 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L19_unpacking_failed; + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L20_unpacking_done; + __pyx_L19_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_L20_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_ix, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_11); + __pyx_t_11 = 0; + + /* "apache_beam/runners/worker/operations.py":1535 + * + * for ix, op in reversed(list(enumerate(self._ops))): + * _LOGGER.debug('Starting op %d %s', ix, op) # <<<<<<<<<<<<<< + * op.start() + * for op in self._ops: +*/ + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LOGGER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_11); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Starting_op_d_s, __pyx_v_ix, __pyx_v_op}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1536 + * for ix, op in reversed(list(enumerate(self._ops))): + * _LOGGER.debug('Starting op %d %s', ix, op) + * op.start() # <<<<<<<<<<<<<< + * for op in self._ops: + * op.finish() +*/ + __pyx_t_1 = __pyx_v_op; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1534 + * self._ops[producer].add_receiver(op, output_index) + * + * for ix, op in reversed(list(enumerate(self._ops))): # <<<<<<<<<<<<<< + * _LOGGER.debug('Starting op %d %s', ix, op) + * op.start() +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1537 + * _LOGGER.debug('Starting op %d %s', ix, op) + * op.start() + * for op in self._ops: # <<<<<<<<<<<<<< + * op.finish() + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ops); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_12 = __pyx_t_5; __Pyx_INCREF(__pyx_t_12); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1537, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_12))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1537, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1537, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_7)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1537, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_12); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1537, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1538 + * op.start() + * for op in self._ops: + * op.finish() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_v_op; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/runners/worker/operations.py":1537 + * _LOGGER.debug('Starting op %d %s', ix, op) + * op.start() + * for op in self._ops: # <<<<<<<<<<<<<< + * op.finish() + * +*/ + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/runners/worker/operations.py":1496 + * return self._ops[:] + * + * def execute(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.SimpleMapTaskExecutor.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_name_context); + __Pyx_XDECREF(__pyx_v_spec); + __Pyx_XDECREF(__pyx_v_op); + __Pyx_XDECREF(__pyx_v_producer); + __Pyx_XDECREF(__pyx_v_output_index); + __Pyx_XDECREF(__pyx_v_ix); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet = {"__pyx_unpickle_ConsumerSet", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ConsumerSet (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ConsumerSet", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ConsumerSet", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ConsumerSet", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_8__pyx_unpickle_ConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ConsumerSet", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = ConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, __pyx_k_coder_consumers_element_sampler); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = ConsumerSet.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = ConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = ConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ConsumerSet__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->coder); + __Pyx_DECREF(__pyx_v___pyx_result->coder); + __pyx_v___pyx_result->coder = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->consumers); + __Pyx_DECREF(__pyx_v___pyx_result->consumers); + __pyx_v___pyx_result->consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->element_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->element_sampler); + __pyx_v___pyx_result->element_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->execution_context); + __pyx_v___pyx_result->execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->opcounter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->opcounter); + __pyx_v___pyx_result->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->output_index); + __Pyx_DECREF(__pyx_v___pyx_result->output_index); + __pyx_v___pyx_result->output_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->output_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->output_sampler); + __pyx_v___pyx_result->output_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->step_name); + __Pyx_DECREF(__pyx_v___pyx_result->step_name); + __pyx_v___pyx_result->step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ConsumerSet__set_state(ConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumers = __pyx_state[1]; __pyx_result.element_sampler = __pyx_state[2]; __pyx_result.execution_context = __pyx_state[3]; __pyx_result.opcounter = __pyx_state[4]; __pyx_result.output_index = __pyx_state[5]; __pyx_result.output_sampler = __pyx_state[6]; __pyx_result.step_name = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ConsumerSet__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SingletonElementConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet = {"__pyx_unpickle_SingletonElementConsumerSet", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonElementConsumerSet (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SingletonElementConsumerSet", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonElementConsumerSet", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonElementConsumerSet", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SingletonElementConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_10__pyx_unpickle_SingletonElementConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonElementConsumerSet", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SingletonElementConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, __pyx_k_coder_consumer_consumers_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') + * __pyx_result = SingletonElementConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SingletonElementConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0c72a15, 0x844e6c1, 0x98fe48c, b'coder, consumer, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SingletonElementConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 9) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SingletonElementConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonElementConsumerSet__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 9) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.coder); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.coder); + __pyx_v___pyx_result->__pyx_base.coder = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->consumer); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->consumer); + __pyx_v___pyx_result->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.element_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.element_sampler); + __pyx_v___pyx_result->__pyx_base.element_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter); + __pyx_v___pyx_result->__pyx_base.opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_index); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_index); + __pyx_v___pyx_result->__pyx_base.output_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_sampler); + __pyx_v___pyx_result->__pyx_base.output_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 9) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 9); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SingletonElementConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SingletonElementConsumerSet__set_state(SingletonElementConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.coder = __pyx_state[0]; __pyx_result.consumer = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_sampler = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.opcounter = __pyx_state[5]; __pyx_result.output_index = __pyx_state[6]; __pyx_result.output_sampler = __pyx_state[7]; __pyx_result.step_name = __pyx_state[8] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 9) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SingletonElementConsumerSet__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet = {"__pyx_unpickle_GeneralPurposeConsumerSet", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_GeneralPurposeConsumerSet (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_GeneralPurposeConsumerSet", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GeneralPurposeConsumerSet", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GeneralPurposeConsumerSet", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_12__pyx_unpickle_GeneralPurposeConsumerSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_GeneralPurposeConsumerSet", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') # <<<<<<<<<<<<<< + * __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, __pyx_k_batched_elements_coder_consumer); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') + * __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') + * __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') + * __pyx_result = GeneralPurposeConsumerSet.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_GeneralPurposeConsumerSet__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_GeneralPurposeConsumerSet__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_batched_elements); + __Pyx_DECREF(__pyx_v___pyx_result->_batched_elements); + __pyx_v___pyx_result->_batched_elements = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.coder); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.coder); + __pyx_v___pyx_result->__pyx_base.coder = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->element_consumers); + __Pyx_DECREF(__pyx_v___pyx_result->element_consumers); + __pyx_v___pyx_result->element_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.element_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.element_sampler); + __pyx_v___pyx_result->__pyx_base.element_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->has_batch_consumers = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.opcounter); + __pyx_v___pyx_result->__pyx_base.opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->other_batch_consumers); + __Pyx_DECREF(__pyx_v___pyx_result->other_batch_consumers); + __pyx_v___pyx_result->other_batch_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_index); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_index); + __pyx_v___pyx_result->__pyx_base.output_index = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.output_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.output_sampler); + __pyx_v___pyx_result->__pyx_base.output_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->passthrough_batch_consumers); + __Pyx_DECREF(__pyx_v___pyx_result->passthrough_batch_consumers); + __pyx_v___pyx_result->passthrough_batch_consumers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->producer_batch_converter); + __Pyx_DECREF(__pyx_v___pyx_result->producer_batch_converter); + __pyx_v___pyx_result->producer_batch_converter = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): + * __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 14); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_GeneralPurposeConsumerSet__set_state(GeneralPurposeConsumerSet __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._batched_elements = __pyx_state[0]; __pyx_result.coder = __pyx_state[1]; __pyx_result.consumers = __pyx_state[2]; __pyx_result.element_consumers = __pyx_state[3]; __pyx_result.element_sampler = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.has_batch_consumers = __pyx_state[6]; __pyx_result.opcounter = __pyx_state[7]; __pyx_result.other_batch_consumers = __pyx_state[8]; __pyx_result.output_index = __pyx_state[9]; __pyx_result.output_sampler = __pyx_state[10]; __pyx_result.passthrough_batch_consumers = __pyx_state[11]; __pyx_result.producer_batch_converter = __pyx_state[12]; __pyx_result.step_name = __pyx_state[13] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 14) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_GeneralPurposeConsumerSet__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation = {"__pyx_unpickle_Operation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Operation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Operation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Operation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Operation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_Operation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_14__pyx_unpickle_Operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Operation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = Operation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, __pyx_k_consumers_counter_factory_data_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = Operation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = Operation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = Operation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = Operation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Operation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_Operation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_Operation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Operation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->consumers); + __Pyx_DECREF(__pyx_v___pyx_result->consumers); + __pyx_v___pyx_result->consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->counter_factory); + __pyx_v___pyx_result->counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->data_sampler); + __pyx_v___pyx_result->data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->execution_context); + __pyx_v___pyx_result->execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->metrics_container); + __pyx_v___pyx_result->metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name_context); + __Pyx_DECREF(__pyx_v___pyx_result->name_context); + __pyx_v___pyx_result->name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->operation_name); + __pyx_v___pyx_result->operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->receivers); + __Pyx_DECREF(__pyx_v___pyx_result->receivers); + __pyx_v___pyx_result->receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->scoped_finish_state); + __pyx_v___pyx_result->scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->scoped_process_state); + __pyx_v___pyx_result->scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->scoped_start_state); + __pyx_v___pyx_result->scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->spec); + __Pyx_DECREF(__pyx_v___pyx_result->spec); + __pyx_v___pyx_result->spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->state_sampler); + __pyx_v___pyx_result->state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->step_name); + __Pyx_DECREF(__pyx_v___pyx_result->step_name); + __pyx_v___pyx_result->step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 16); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_Operation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Operation__set_state(Operation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_Operation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation = {"__pyx_unpickle_ReadOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ReadOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ReadOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ReadOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ReadOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_16__pyx_unpickle_ReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ReadOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = ReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, __pyx_k_consumers_counter_factory_data_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = ReadOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = ReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = ReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ReadOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 16); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ReadOperation__set_state(ReadOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ReadOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ImpulseReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation = {"__pyx_unpickle_ImpulseReadOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ImpulseReadOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ImpulseReadOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ImpulseReadOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ImpulseReadOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ImpulseReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_18__pyx_unpickle_ImpulseReadOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ImpulseReadOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ImpulseReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = ImpulseReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, __pyx_k_consumers_counter_factory_data_s_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') + * __pyx_result = ImpulseReadOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') + * __pyx_result = ImpulseReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ImpulseReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') + * __pyx_result = ImpulseReadOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ImpulseReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x969cf7e, 0x52d7a2f, 0x216a25a, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, source, spec, state_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ImpulseReadOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_ImpulseReadOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ImpulseReadOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->source); + __Pyx_DECREF(__pyx_v___pyx_result->source); + __pyx_v___pyx_result->source = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 17); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ImpulseReadOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ImpulseReadOperation__set_state(ImpulseReadOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.source = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_ImpulseReadOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation = {"__pyx_unpickle_DoOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DoOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DoOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DoOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_DoOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_20__pyx_unpickle_DoOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') # <<<<<<<<<<<<<< + * __pyx_result = DoOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, __pyx_k_consumers_counter_factory_data_s_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = DoOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = DoOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DoOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = DoOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_DoOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_DoOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DoOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->dofn_runner); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->dofn_runner); + __pyx_v___pyx_result->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->fn); + __Pyx_DECREF(__pyx_v___pyx_result->fn); + __pyx_v___pyx_result->fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->input_info); + __Pyx_DECREF(__pyx_v___pyx_result->input_info); + __pyx_v___pyx_result->input_info = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->scoped_timer_processing_state); + __Pyx_DECREF(__pyx_v___pyx_result->scoped_timer_processing_state); + __pyx_v___pyx_result->scoped_timer_processing_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->side_input_maps); + __Pyx_DECREF(__pyx_v___pyx_result->side_input_maps); + __pyx_v___pyx_result->side_input_maps = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->tagged_receivers); + __Pyx_DECREF(__pyx_v___pyx_result->tagged_receivers); + __pyx_v___pyx_result->tagged_receivers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timer_inputs); + __Pyx_DECREF(__pyx_v___pyx_result->timer_inputs); + __pyx_v___pyx_result->timer_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timer_specs); + __Pyx_DECREF(__pyx_v___pyx_result->timer_specs); + __pyx_v___pyx_result->timer_specs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->user_state_context); + __pyx_v___pyx_result->user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 25); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DoOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DoOperation__set_state(DoOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_DoOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SdfTruncateSizedRestrictions(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions = {"__pyx_unpickle_SdfTruncateSizedRestrictions", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfTruncateSizedRestrictions (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SdfTruncateSizedRestrictions", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfTruncateSizedRestrictions", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfTruncateSizedRestrictions", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_22__pyx_unpickle_SdfTruncateSizedRestrictions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfTruncateSizedRestrictions", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SdfTruncateSizedRestrictions(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') # <<<<<<<<<<<<<< + * __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, __pyx_k_consumers_counter_factory_data_s_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfTruncateSizedRestrictions.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SdfTruncateSizedRestrictions(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfTruncateSizedRestrictions__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfTruncateSizedRestrictions__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner); + __pyx_v___pyx_result->__pyx_base.dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fn); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fn); + __pyx_v___pyx_result->__pyx_base.fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.input_info); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.input_info); + __pyx_v___pyx_result->__pyx_base.input_info = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state); + __pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.side_input_maps); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.side_input_maps); + __pyx_v___pyx_result->__pyx_base.side_input_maps = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers); + __pyx_v___pyx_result->__pyx_base.tagged_receivers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_inputs); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_inputs); + __pyx_v___pyx_result->__pyx_base.timer_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_specs); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_specs); + __pyx_v___pyx_result->__pyx_base.timer_specs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 25); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(SdfTruncateSizedRestrictions __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.execution_context = __pyx_state[5]; __pyx_result.fn = __pyx_state[6]; __pyx_result.input_info = __pyx_state[7]; __pyx_result.metrics_container = __pyx_state[8]; __pyx_result.name_context = __pyx_state[9]; __pyx_result.operation_name = __pyx_state[10]; __pyx_result.receivers = __pyx_state[11]; __pyx_result.scoped_finish_state = __pyx_state[12]; __pyx_result.scoped_process_state = __pyx_state[13]; __pyx_result.scoped_start_state = __pyx_state[14]; __pyx_result.scoped_timer_processing_state = __pyx_state[15]; __pyx_result.setup_done = __pyx_state[16]; __pyx_result.side_input_maps = __pyx_state[17]; __pyx_result.spec = __pyx_state[18]; __pyx_result.state_sampler = __pyx_state[19]; __pyx_result.step_name = __pyx_state[20]; __pyx_result.tagged_receivers = __pyx_state[21]; __pyx_result.timer_inputs = __pyx_state[22]; __pyx_result.timer_specs = __pyx_state[23]; __pyx_result.user_state_context = __pyx_state[24] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 25) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfTruncateSizedRestrictions__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements = {"__pyx_unpickle_SdfProcessSizedElements", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfProcessSizedElements (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SdfProcessSizedElements", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfProcessSizedElements", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SdfProcessSizedElements", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfProcessSizedElements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_24__pyx_unpickle_SdfProcessSizedElements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfProcessSizedElements", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') # <<<<<<<<<<<<<< + * __pyx_result = SdfProcessSizedElements.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, __pyx_k_consumers_counter_factory_data_s_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfProcessSizedElements.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfProcessSizedElements.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SdfProcessSizedElements.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') + * __pyx_result = SdfProcessSizedElements.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.scoped_timer_processing_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.side_input_maps = __pyx_state[19]; __pyx_result.spec = __pyx_state[20]; __pyx_result.state_sampler = __pyx_state[21]; __pyx_result.step_name = __pyx_state[22]; __pyx_result.tagged_receivers = __pyx_state[23]; __pyx_result.timer_inputs = __pyx_state[24]; __pyx_result.timer_specs = __pyx_state[25]; __pyx_result.user_state_context = __pyx_state[26] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfProcessSizedElements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.scoped_timer_processing_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.side_input_maps = __pyx_state[19]; __pyx_result.spec = __pyx_state[20]; __pyx_result.state_sampler = __pyx_state[21]; __pyx_result.step_name = __pyx_state[22]; __pyx_result.tagged_receivers = __pyx_state[23]; __pyx_result.timer_inputs = __pyx_state[24]; __pyx_result.timer_specs = __pyx_state[25]; __pyx_result.user_state_context = __pyx_state[26] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 27) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_SdfProcessSizedElements__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SdfProcessSizedElements__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.scoped_timer_processing_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.side_input_maps = __pyx_state[19]; __pyx_result.spec = __pyx_state[20]; __pyx_result.state_sampler = __pyx_state[21]; __pyx_result.step_name = __pyx_state[22]; __pyx_result.tagged_receivers = __pyx_state[23]; __pyx_result.timer_inputs = __pyx_state[24]; __pyx_result.timer_specs = __pyx_state[25]; __pyx_result.user_state_context = __pyx_state[26] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 27) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner))))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->__pyx_base.dofn_runner); + __pyx_v___pyx_result->__pyx_base.dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->element_start_output_bytes); + __Pyx_DECREF(__pyx_v___pyx_result->element_start_output_bytes); + __pyx_v___pyx_result->element_start_output_bytes = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fn); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fn); + __pyx_v___pyx_result->__pyx_base.fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.input_info); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.input_info); + __pyx_v___pyx_result->__pyx_base.input_info = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->lock); + __Pyx_DECREF(__pyx_v___pyx_result->lock); + __pyx_v___pyx_result->lock = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state); + __pyx_v___pyx_result->__pyx_base.scoped_timer_processing_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.side_input_maps); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.side_input_maps); + __pyx_v___pyx_result->__pyx_base.side_input_maps = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.tagged_receivers); + __pyx_v___pyx_result->__pyx_base.tagged_receivers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 24, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_inputs); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_inputs); + __pyx_v___pyx_result->__pyx_base.timer_inputs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 25, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.timer_specs); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.timer_specs); + __pyx_v___pyx_result->__pyx_base.timer_specs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 26, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.user_state_context); + __pyx_v___pyx_result->__pyx_base.user_state_context = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.scoped_timer_processing_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.side_input_maps = __pyx_state[19]; __pyx_result.spec = __pyx_state[20]; __pyx_result.state_sampler = __pyx_state[21]; __pyx_result.step_name = __pyx_state[22]; __pyx_result.tagged_receivers = __pyx_state[23]; __pyx_result.timer_inputs = __pyx_state[24]; __pyx_result.timer_specs = __pyx_state[25]; __pyx_result.user_state_context = __pyx_state[26] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 27) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 27); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SdfProcessSizedElements__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SdfProcessSizedElements__set_state(SdfProcessSizedElements __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.dofn_runner = __pyx_state[4]; __pyx_result.element_start_output_bytes = __pyx_state[5]; __pyx_result.execution_context = __pyx_state[6]; __pyx_result.fn = __pyx_state[7]; __pyx_result.input_info = __pyx_state[8]; __pyx_result.lock = __pyx_state[9]; __pyx_result.metrics_container = __pyx_state[10]; __pyx_result.name_context = __pyx_state[11]; __pyx_result.operation_name = __pyx_state[12]; __pyx_result.receivers = __pyx_state[13]; __pyx_result.scoped_finish_state = __pyx_state[14]; __pyx_result.scoped_process_state = __pyx_state[15]; __pyx_result.scoped_start_state = __pyx_state[16]; __pyx_result.scoped_timer_processing_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.side_input_maps = __pyx_state[19]; __pyx_result.spec = __pyx_state[20]; __pyx_result.state_sampler = __pyx_state[21]; __pyx_result.step_name = __pyx_state[22]; __pyx_result.tagged_receivers = __pyx_state[23]; __pyx_result.timer_inputs = __pyx_state[24]; __pyx_result.timer_specs = __pyx_state[25]; __pyx_result.user_state_context = __pyx_state[26] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 27) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_SdfProcessSizedElements__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation = {"__pyx_unpickle_CombineOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CombineOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_CombineOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CombineOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CombineOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_CombineOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_26__pyx_unpickle_CombineOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CombineOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = CombineOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, __pyx_k_consumers_counter_factory_data_s_5); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = CombineOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = CombineOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = CombineOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = CombineOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CombineOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x81f9b57, 0xaa2ec96, 0xc1cd107, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, phased_combine_fn, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_CombineOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_CombineOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CombineOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->phased_combine_fn); + __Pyx_DECREF(__pyx_v___pyx_result->phased_combine_fn); + __pyx_v___pyx_result->phased_combine_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 17); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_CombineOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CombineOperation__set_state(CombineOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.phased_combine_fn = __pyx_state[8]; __pyx_result.receivers = __pyx_state[9]; __pyx_result.scoped_finish_state = __pyx_state[10]; __pyx_result.scoped_process_state = __pyx_state[11]; __pyx_result.scoped_start_state = __pyx_state[12]; __pyx_result.setup_done = __pyx_state[13]; __pyx_result.spec = __pyx_state[14]; __pyx_result.state_sampler = __pyx_state[15]; __pyx_result.step_name = __pyx_state[16] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 17) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_CombineOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation = {"__pyx_unpickle_PGBKCVOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_PGBKCVOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PGBKCVOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PGBKCVOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_PGBKCVOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_28__pyx_unpickle_PGBKCVOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') # <<<<<<<<<<<<<< + * __pyx_result = PGBKCVOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, __pyx_k_combine_fn_combine_fn_add_input); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') + * __pyx_result = PGBKCVOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') + * __pyx_result = PGBKCVOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = PGBKCVOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') + * __pyx_result = PGBKCVOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_PGBKCVOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_PGBKCVOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + long __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_PGBKCVOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn); + __Pyx_DECREF(__pyx_v___pyx_result->combine_fn); + __pyx_v___pyx_result->combine_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn_add_input); + __Pyx_DECREF(__pyx_v___pyx_result->combine_fn_add_input); + __pyx_v___pyx_result->combine_fn_add_input = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn_compact); + __Pyx_DECREF(__pyx_v___pyx_result->combine_fn_compact); + __pyx_v___pyx_result->combine_fn_compact = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->is_default_windowing = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->key_count = __pyx_t_3; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->max_keys = __pyx_t_3; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 18, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 19, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 20, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 21, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 22, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->table); + __Pyx_DECREF(__pyx_v___pyx_result->table); + __pyx_v___pyx_result->table = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 23, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->timestamp_combiner); + __Pyx_DECREF(__pyx_v___pyx_result->timestamp_combiner); + __pyx_v___pyx_result->timestamp_combiner = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 24); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_PGBKCVOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_PGBKCVOperation__set_state(PGBKCVOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.combine_fn = __pyx_state[0]; __pyx_result.combine_fn_add_input = __pyx_state[1]; __pyx_result.combine_fn_compact = __pyx_state[2]; __pyx_result.consumers = __pyx_state[3]; __pyx_result.counter_factory = __pyx_state[4]; __pyx_result.data_sampler = __pyx_state[5]; __pyx_result.debug_logging_enabled = __pyx_state[6]; __pyx_result.execution_context = __pyx_state[7]; __pyx_result.is_default_windowing = __pyx_state[8]; __pyx_result.key_count = __pyx_state[9]; __pyx_result.max_keys = __pyx_state[10]; __pyx_result.metrics_container = __pyx_state[11]; __pyx_result.name_context = __pyx_state[12]; __pyx_result.operation_name = __pyx_state[13]; __pyx_result.receivers = __pyx_state[14]; __pyx_result.scoped_finish_state = __pyx_state[15]; __pyx_result.scoped_process_state = __pyx_state[16]; __pyx_result.scoped_start_state = __pyx_state[17]; __pyx_result.setup_done = __pyx_state[18]; __pyx_result.spec = __pyx_state[19]; __pyx_result.state_sampler = __pyx_state[20]; __pyx_result.step_name = __pyx_state[21]; __pyx_result.table = __pyx_state[22]; __pyx_result.timestamp_combiner = __pyx_state[23] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 24) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_PGBKCVOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation = {"__pyx_unpickle_FlattenOperation", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_FlattenOperation (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_FlattenOperation", 0) < (0)) __PYX_ERR(3, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FlattenOperation", 1, 3, 3, i); __PYX_ERR(3, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(3, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FlattenOperation", 1, 3, 3, __pyx_nargs); __PYX_ERR(3, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_FlattenOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(3, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_10operations_30__pyx_unpickle_FlattenOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FlattenOperation", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') # <<<<<<<<<<<<<< + * __pyx_result = FlattenOperation.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, __pyx_k_consumers_counter_factory_data_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = FlattenOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = FlattenOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = FlattenOperation.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(3, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') + * __pyx_result = FlattenOperation.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_FlattenOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_FlattenOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_10operations___pyx_unpickle_FlattenOperation__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_FlattenOperation__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.consumers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.consumers); + __pyx_v___pyx_result->__pyx_base.consumers = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.counter_factory); + __pyx_v___pyx_result->__pyx_base.counter_factory = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.data_sampler); + __pyx_v___pyx_result->__pyx_base.data_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.debug_logging_enabled = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.execution_context); + __pyx_v___pyx_result->__pyx_base.execution_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.metrics_container); + __pyx_v___pyx_result->__pyx_base.metrics_container = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name_context); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name_context); + __pyx_v___pyx_result->__pyx_base.name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.operation_name); + __pyx_v___pyx_result->__pyx_base.operation_name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.receivers); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.receivers); + __pyx_v___pyx_result->__pyx_base.receivers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_finish_state); + __pyx_v___pyx_result->__pyx_base.scoped_finish_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_process_state); + __pyx_v___pyx_result->__pyx_base.scoped_process_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.scoped_start_state); + __pyx_v___pyx_result->__pyx_base.scoped_start_state = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->__pyx_base.setup_done = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.spec); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.spec); + __pyx_v___pyx_result->__pyx_base.spec = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.state_sampler); + __pyx_v___pyx_result->__pyx_base.state_sampler = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.step_name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.step_name); + __pyx_v___pyx_result->__pyx_base.step_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 16); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_FlattenOperation__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_FlattenOperation__set_state(FlattenOperation __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.consumers = __pyx_state[0]; __pyx_result.counter_factory = __pyx_state[1]; __pyx_result.data_sampler = __pyx_state[2]; __pyx_result.debug_logging_enabled = __pyx_state[3]; __pyx_result.execution_context = __pyx_state[4]; __pyx_result.metrics_container = __pyx_state[5]; __pyx_result.name_context = __pyx_state[6]; __pyx_result.operation_name = __pyx_state[7]; __pyx_result.receivers = __pyx_state[8]; __pyx_result.scoped_finish_state = __pyx_state[9]; __pyx_result.scoped_process_state = __pyx_state[10]; __pyx_result.scoped_start_state = __pyx_state[11]; __pyx_result.setup_done = __pyx_state[12]; __pyx_result.spec = __pyx_state[13]; __pyx_result.state_sampler = __pyx_state[14]; __pyx_result.step_name = __pyx_state[15] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 16) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.operations.__pyx_unpickle_FlattenOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p; + PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_new, newfunc)(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet; + p->consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)Py_None); Py_INCREF(Py_None); + p->step_name = Py_None; Py_INCREF(Py_None); + p->output_index = Py_None; Py_INCREF(Py_None); + p->coder = Py_None; Py_INCREF(Py_None); + p->output_sampler = Py_None; Py_INCREF(Py_None); + p->element_sampler = Py_None; Py_INCREF(Py_None); + p->execution_context = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->consumers); + Py_CLEAR(p->opcounter); + Py_CLEAR(p->step_name); + Py_CLEAR(p->output_index); + Py_CLEAR(p->coder); + Py_CLEAR(p->output_sampler); + Py_CLEAR(p->element_sampler); + Py_CLEAR(p->execution_context); + if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) PyObject_GC_Track(o); + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_dealloc, destructor)(o); else + #endif + __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->consumers) { + e = (*v)(p->consumers, a); if (e) return e; + } + if (p->opcounter) { + e = (*v)(((PyObject *)p->opcounter), a); if (e) return e; + } + if (p->step_name) { + e = (*v)(p->step_name, a); if (e) return e; + } + if (p->output_index) { + e = (*v)(p->output_index, a); if (e) return e; + } + if (p->coder) { + e = (*v)(p->coder, a); if (e) return e; + } + if (p->output_sampler) { + e = (*v)(p->output_sampler, a); if (e) return e; + } + if (p->element_sampler) { + e = (*v)(p->element_sampler, a); if (e) return e; + } + if (p->execution_context) { + e = (*v)(p->execution_context, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet); } + tmp = ((PyObject*)p->consumers); + p->consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->opcounter); + p->opcounter = ((struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->step_name); + p->step_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->output_index); + p->output_index = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->coder); + p->coder = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->output_sampler); + p->output_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->element_sampler); + p->element_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->execution_context); + p->execution_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_opcounter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9opcounter_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9step_name_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_12output_index_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5coder_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_14output_sampler_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15element_sampler_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17execution_context_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet[] = { + {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11ConsumerSet_6current_element_progress}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_ConsumerSet[] = { + {"opcounter", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_opcounter, 0, 0, 0}, + {"step_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_step_name, 0, 0}, + {"output_index", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_index, 0, 0}, + {"coder", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_coder, 0, 0}, + {"output_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_output_sampler, 0, 0}, + {"element_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_element_sampler, 0, 0}, + {"execution_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11ConsumerSet_execution_context, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__}, + {Py_tp_doc, (void *)PyDoc_STR("A ConsumerSet represents a graph edge between two Operation nodes.\n\n The ConsumerSet object collects information from the output of the\n Operation at one end of its edge and the input of the Operation at\n the other edge.\n ConsumerSet are attached to the outputting Operation.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet_spec = { + "apache_beam.runners.worker.operations.ConsumerSet", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""ConsumerSet", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A ConsumerSet represents a graph edge between two Operation nodes.\n\n The ConsumerSet object collects information from the output of the\n Operation at one end of its edge and the input of the Operation at\n the other edge.\n ConsumerSet are attached to the outputting Operation.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_3__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + p->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->consumer); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(o, v, a); if (e) return e; + if (p->consumer) { + e = (*v)(((PyObject *)p->consumer), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(o); + tmp = ((PyObject*)p->consumer); + p->consumer = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet[] = { + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet}, + {Py_tp_doc, (void *)PyDoc_STR("ConsumerSet representing a single consumer that can only process elements\n (not batches).")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet_spec = { + "apache_beam.runners.worker.operations.SingletonElementConsumerSet", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""SingletonElementConsumerSet", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("ConsumerSet representing a single consumer that can only process elements\n (not batches)."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ConsumerSet(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + p->element_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->passthrough_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->other_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_batched_elements = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->producer_batch_converter = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->element_consumers); + Py_CLEAR(p->passthrough_batch_consumers); + Py_CLEAR(p->other_batch_consumers); + Py_CLEAR(p->_batched_elements); + Py_CLEAR(p->producer_batch_converter); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ConsumerSet(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ConsumerSet(o, v, a); if (e) return e; + if (p->element_consumers) { + e = (*v)(p->element_consumers, a); if (e) return e; + } + if (p->passthrough_batch_consumers) { + e = (*v)(p->passthrough_batch_consumers, a); if (e) return e; + } + if (p->other_batch_consumers) { + e = (*v)(p->other_batch_consumers, a); if (e) return e; + } + if (p->_batched_elements) { + e = (*v)(p->_batched_elements, a); if (e) return e; + } + if (p->producer_batch_converter) { + e = (*v)(p->producer_batch_converter, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ConsumerSet(o); + tmp = ((PyObject*)p->element_consumers); + p->element_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->passthrough_batch_consumers); + p->passthrough_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->other_batch_consumers); + p->other_batch_consumers = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_batched_elements); + p->_batched_elements = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->producer_batch_converter); + p->producer_batch_converter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet}, + {Py_tp_doc, (void *)PyDoc_STR("ConsumerSet implementation that handles all combinations of possible edges.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet_spec = { + "apache_beam.runners.worker.operations.GeneralPurposeConsumerSet", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""GeneralPurposeConsumerSet", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_11ConsumerSet_15__repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("ConsumerSet implementation that handles all combinations of possible edges.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + p->name_context = Py_None; Py_INCREF(Py_None); + p->operation_name = Py_None; Py_INCREF(Py_None); + p->spec = Py_None; Py_INCREF(Py_None); + p->consumers = Py_None; Py_INCREF(Py_None); + p->counter_factory = Py_None; Py_INCREF(Py_None); + p->metrics_container = Py_None; Py_INCREF(Py_None); + p->execution_context = Py_None; Py_INCREF(Py_None); + p->receivers = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->step_name = Py_None; Py_INCREF(Py_None); + p->state_sampler = Py_None; Py_INCREF(Py_None); + p->scoped_start_state = Py_None; Py_INCREF(Py_None); + p->scoped_process_state = Py_None; Py_INCREF(Py_None); + p->scoped_finish_state = Py_None; Py_INCREF(Py_None); + p->data_sampler = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name_context); + Py_CLEAR(p->operation_name); + Py_CLEAR(p->spec); + Py_CLEAR(p->consumers); + Py_CLEAR(p->counter_factory); + Py_CLEAR(p->metrics_container); + Py_CLEAR(p->execution_context); + Py_CLEAR(p->receivers); + Py_CLEAR(p->step_name); + Py_CLEAR(p->state_sampler); + Py_CLEAR(p->scoped_start_state); + Py_CLEAR(p->scoped_process_state); + Py_CLEAR(p->scoped_finish_state); + Py_CLEAR(p->data_sampler); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->name_context) { + e = (*v)(p->name_context, a); if (e) return e; + } + if (p->operation_name) { + e = (*v)(p->operation_name, a); if (e) return e; + } + if (p->spec) { + e = (*v)(p->spec, a); if (e) return e; + } + if (p->consumers) { + e = (*v)(p->consumers, a); if (e) return e; + } + if (p->counter_factory) { + e = (*v)(p->counter_factory, a); if (e) return e; + } + if (p->metrics_container) { + e = (*v)(p->metrics_container, a); if (e) return e; + } + if (p->execution_context) { + e = (*v)(p->execution_context, a); if (e) return e; + } + if (p->receivers) { + e = (*v)(p->receivers, a); if (e) return e; + } + if (p->step_name) { + e = (*v)(p->step_name, a); if (e) return e; + } + if (p->state_sampler) { + e = (*v)(p->state_sampler, a); if (e) return e; + } + if (p->scoped_start_state) { + e = (*v)(p->scoped_start_state, a); if (e) return e; + } + if (p->scoped_process_state) { + e = (*v)(p->scoped_process_state, a); if (e) return e; + } + if (p->scoped_finish_state) { + e = (*v)(p->scoped_finish_state, a); if (e) return e; + } + if (p->data_sampler) { + e = (*v)(p->data_sampler, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *)o; + tmp = ((PyObject*)p->name_context); + p->name_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->operation_name); + p->operation_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->spec); + p->spec = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->consumers); + p->consumers = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->counter_factory); + p->counter_factory = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->metrics_container); + p->metrics_container = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->execution_context); + p->execution_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->receivers); + p->receivers = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->step_name); + p->step_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->state_sampler); + p->state_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->scoped_start_state); + p->scoped_start_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->scoped_process_state); + p->scoped_process_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->scoped_finish_state); + p->scoped_finish_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->data_sampler); + p->data_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_name_context(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12name_context_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_operation_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_14operation_name_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_spec(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_4spec_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_counter_factory(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15counter_factory_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17metrics_container_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17execution_context_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9receivers_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_debug_logging_enabled(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21debug_logging_enabled_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9step_name_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_state_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_13state_sampler_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_start_state(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_18scoped_start_state_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_process_state(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_20scoped_process_state_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_finish_state(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19scoped_finish_state_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_data_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_12data_sampler_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_Operation[] = { + {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_2setup}, + {"get_batching_preference", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_input_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_8get_input_batch_converter}, + {"get_output_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_10get_output_batch_converter}, + {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"needs_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_29reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"add_receiver", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_32add_receiver}, + {"str_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_44str_internal}, + {"_get_runtime_performance_hints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_46_get_runtime_performance_hints}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_Operation[] = { + {"name_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_name_context, 0, 0, 0}, + {"operation_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_operation_name, 0, 0, 0}, + {"spec", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_spec, 0, 0, 0}, + {"counter_factory", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_counter_factory, 0, 0, 0}, + {"metrics_container", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_metrics_container, 0, 0}, + {"execution_context", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_execution_context, 0, 0}, + {"receivers", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_receivers, 0, 0}, + {"debug_logging_enabled", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_debug_logging_enabled, 0, 0, 0}, + {"step_name", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name, __pyx_setprop_11apache_beam_7runners_6worker_10operations_9Operation_step_name, 0, 0}, + {"state_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_state_sampler, 0, 0, 0}, + {"scoped_start_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_start_state, 0, 0, 0}, + {"scoped_process_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_process_state, 0, 0, 0}, + {"scoped_finish_state", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_scoped_finish_state, 0, 0, 0}, + {"data_sampler", __pyx_getprop_11apache_beam_7runners_6worker_10operations_9Operation_data_sampler, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_Operation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_str, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__}, + {Py_tp_doc, (void *)PyDoc_STR("An operation representing the live version of a work item specification.\n\n An operation can have one or more outputs and for each output it can have\n one or more receiver operations that will take that as input.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_Operation_spec = { + "apache_beam.runners.worker.operations.Operation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_Operation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_Operation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""Operation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("An operation representing the live version of a work item specification.\n\n An operation can have one or more outputs and for each output it can have\n one or more receiver operations that will take that as input.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_Operation, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10operations_Operation, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ReadOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ReadOperation[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_ReadOperation}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation_spec = { + "apache_beam.runners.worker.operations.ReadOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""ReadOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ReadOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_ReadOperation, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ReadOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + p->source = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->source); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e; + if (p->source) { + e = (*v)(p->source, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o); + tmp = ((PyObject*)p->source); + p->source = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation_spec = { + "apache_beam.runners.worker.operations.ImpulseReadOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""ImpulseReadOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_DoOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation; + p->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)Py_None); Py_INCREF(Py_None); + p->tagged_receivers = Py_None; Py_INCREF(Py_None); + p->side_input_maps = Py_None; Py_INCREF(Py_None); + p->user_state_context = Py_None; Py_INCREF(Py_None); + p->timer_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->timer_specs = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->input_info = Py_None; Py_INCREF(Py_None); + p->fn = Py_None; Py_INCREF(Py_None); + p->scoped_timer_processing_state = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->dofn_runner); + Py_CLEAR(p->tagged_receivers); + Py_CLEAR(p->side_input_maps); + Py_CLEAR(p->user_state_context); + Py_CLEAR(p->timer_inputs); + Py_CLEAR(p->timer_specs); + Py_CLEAR(p->input_info); + Py_CLEAR(p->fn); + Py_CLEAR(p->scoped_timer_processing_state); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e; + if (p->dofn_runner) { + e = (*v)(((PyObject *)p->dofn_runner), a); if (e) return e; + } + if (p->tagged_receivers) { + e = (*v)(p->tagged_receivers, a); if (e) return e; + } + if (p->side_input_maps) { + e = (*v)(p->side_input_maps, a); if (e) return e; + } + if (p->user_state_context) { + e = (*v)(p->user_state_context, a); if (e) return e; + } + if (p->timer_inputs) { + e = (*v)(p->timer_inputs, a); if (e) return e; + } + if (p->timer_specs) { + e = (*v)(p->timer_specs, a); if (e) return e; + } + if (p->input_info) { + e = (*v)(p->input_info, a); if (e) return e; + } + if (p->fn) { + e = (*v)(p->fn, a); if (e) return e; + } + if (p->scoped_timer_processing_state) { + e = (*v)(p->scoped_timer_processing_state, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o); + tmp = ((PyObject*)p->dofn_runner); + p->dofn_runner = ((struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->tagged_receivers); + p->tagged_receivers = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->side_input_maps); + p->side_input_maps = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->user_state_context); + p->user_state_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timer_inputs); + p->timer_inputs = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timer_specs); + p->timer_specs = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->input_info); + p->input_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->fn); + p->fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->scoped_timer_processing_state); + p->scoped_timer_processing_state = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12timer_inputs_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10input_info_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_DoOperation[] = { + {"_read_side_inputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_10operations_11DoOperation_2_read_side_inputs}, + {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_batching_preference", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_input_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"get_output_batch_converter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"process_batch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"finalize_bundle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"needs_finalization", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"add_timer_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"process_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_get_runtime_performance_hints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_DoOperation[] = { + {"timer_inputs", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_timer_inputs, 0, 0}, + {"input_info", __pyx_getprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info, __pyx_setprop_11apache_beam_7runners_6worker_10operations_11DoOperation_input_info, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_doc, (void *)PyDoc_STR("A Do operation that will execute a custom DoFn for each input element.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation_spec = { + "apache_beam.runners.worker.operations.DoOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""DoOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_DoOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A Do operation that will execute a custom DoFn for each input element."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_11DoOperation_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + p->lock = Py_None; Py_INCREF(Py_None); + p->element_start_output_bytes = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->lock); + Py_CLEAR(p->element_start_output_bytes); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation(o, v, a); if (e) return e; + if (p->lock) { + e = (*v)(p->lock, a); if (e) return e; + } + if (p->element_start_output_bytes) { + e = (*v)(p->element_start_output_bytes, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation(o); + tmp = ((PyObject*)p->lock); + p->lock = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->element_start_output_bytes); + p->element_start_output_bytes = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements[] = { + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements_spec = { + "apache_beam.runners.worker.operations.SdfProcessSizedElements", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""SdfProcessSizedElements", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_DoOperation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions *)o); + p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions[] = { + {"current_element_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"try_split", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions_spec = { + "apache_beam.runners.worker.operations.SdfTruncateSizedRestrictions", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""SdfTruncateSizedRestrictions", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_DoOperation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_CombineOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation; + p->phased_combine_fn = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->phased_combine_fn); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e; + if (p->phased_combine_fn) { + e = (*v)(p->phased_combine_fn, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_CombineOperation(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o); + tmp = ((PyObject*)p->phased_combine_fn); + p->phased_combine_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_CombineOperation[] = { + {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation}, + {Py_tp_doc, (void *)PyDoc_STR("A Combine operation executing a CombineFn for each input element.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_CombineOperation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_CombineOperation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_CombineOperation}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation_spec = { + "apache_beam.runners.worker.operations.CombineOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""CombineOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_CombineOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A Combine operation executing a CombineFn for each input element."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_16CombineOperation_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_CombineOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_PGBKCVOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + p->combine_fn = Py_None; Py_INCREF(Py_None); + p->combine_fn_add_input = Py_None; Py_INCREF(Py_None); + p->combine_fn_compact = Py_None; Py_INCREF(Py_None); + p->timestamp_combiner = Py_None; Py_INCREF(Py_None); + p->table = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->combine_fn); + Py_CLEAR(p->combine_fn_add_input); + Py_CLEAR(p->combine_fn_compact); + Py_CLEAR(p->timestamp_combiner); + Py_CLEAR(p->table); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation(o); +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o; + e = __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation(o, v, a); if (e) return e; + if (p->combine_fn) { + e = (*v)(p->combine_fn, a); if (e) return e; + } + if (p->combine_fn_add_input) { + e = (*v)(p->combine_fn_add_input, a); if (e) return e; + } + if (p->combine_fn_compact) { + e = (*v)(p->combine_fn_compact, a); if (e) return e; + } + if (p->timestamp_combiner) { + e = (*v)(p->timestamp_combiner, a); if (e) return e; + } + if (p->table) { + e = (*v)(p->table, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_PGBKCVOperation(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *)o; + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation(o); + tmp = ((PyObject*)p->combine_fn); + p->combine_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->combine_fn_add_input); + p->combine_fn_add_input = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->combine_fn_compact); + p->combine_fn_compact = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timestamp_combiner); + p->timestamp_combiner = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->table); + p->table = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_10combine_fn_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20combine_fn_add_input_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18combine_fn_compact_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_20is_default_windowing_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_18timestamp_combiner_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation[] = { + {"setup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_10operations_PGBKCVOperation[] = { + {"combine_fn", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn, 0, 0}, + {"combine_fn_add_input", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_add_input, 0, 0}, + {"combine_fn_compact", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_combine_fn_compact, 0, 0}, + {"is_default_windowing", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_is_default_windowing, 0, 0}, + {"timestamp_combiner", __pyx_getprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner, __pyx_setprop_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_timestamp_combiner, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {Py_tp_doc, (void *)PyDoc_STR("PGBKCVOperation GroupByKey with CombineValues operation.\n\n Groups elements by key and performs \npartial aggregation\n of values to optimize data processing \nbefore final grouping.\n\n Used internally by Beam runners to improve \nefficiency \n in distributed execution.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation_spec = { + "apache_beam.runners.worker.operations.PGBKCVOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""PGBKCVOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("PGBKCVOperation GroupByKey with CombineValues operation.\n\n Groups elements by key and performs \npartial aggregation\n of values to optimize data processing \nbefore final grouping.\n\n Used internally by Beam runners to improve \nefficiency \n in distributed execution.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_FlattenOperation __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *p; + PyObject *o = __pyx_tp_new_11apache_beam_7runners_6worker_10operations_Operation(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10operations_Operation*)__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation; + return o; +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_10operations_FlattenOperation[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_doc, (void *)PyDoc_STR("Flatten operation.\n\n Receives one or more producer operations, outputs just one list\n with all the items.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_10operations_FlattenOperation}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation_spec = { + "apache_beam.runners.worker.operations.FlattenOperation", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""FlattenOperation", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_FlattenOperation), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations_Operation, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_43__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Flatten operation.\n\n Receives one or more producer operations, outputs just one list\n with all the items.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations_Operation, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations_Operation, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_10operations_FlattenOperation, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_7runners_6worker_10operations_9Operation_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations_FlattenOperation, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_data_sampler); + Py_CLEAR(p->__pyx_v_transform_id); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_data_sampler) { + e = (*v)(p->__pyx_v_data_sampler, a); if (e) return e; + } + if (p->__pyx_v_transform_id) { + e = (*v)(p->__pyx_v_transform_id, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup *)o; + tmp = ((PyObject*)p->__pyx_v_data_sampler); + p->__pyx_v_data_sampler = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_transform_id); + p->__pyx_v_transform_id = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup_spec = { + "apache_beam.runners.worker.operations.__pyx_scope_struct__setup", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""__pyx_scope_struct__setup", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[--__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_element_counter); + Py_CLEAR(p->__pyx_v_i); + Py_CLEAR(p->__pyx_v_iterator_fn); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_si); + Py_CLEAR(p->__pyx_v_si_counter); + Py_CLEAR(p->__pyx_v_side_tag); + Py_CLEAR(p->__pyx_v_sources); + Py_CLEAR(p->__pyx_v_tags_and_types); + Py_CLEAR(p->__pyx_v_view_class); + Py_CLEAR(p->__pyx_v_view_options); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_1); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs[__pyx_mstate_global->__pyx_freecount_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs++] = ((struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *p = (struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_element_counter) { + e = (*v)(p->__pyx_v_element_counter, a); if (e) return e; + } + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; + } + if (p->__pyx_v_iterator_fn) { + e = (*v)(p->__pyx_v_iterator_fn, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_si) { + e = (*v)(p->__pyx_v_si, a); if (e) return e; + } + if (p->__pyx_v_si_counter) { + e = (*v)(p->__pyx_v_si_counter, a); if (e) return e; + } + if (p->__pyx_v_side_tag) { + e = (*v)(p->__pyx_v_side_tag, a); if (e) return e; + } + if (p->__pyx_v_sources) { + e = (*v)(p->__pyx_v_sources, a); if (e) return e; + } + if (p->__pyx_v_tags_and_types) { + e = (*v)(p->__pyx_v_tags_and_types, a); if (e) return e; + } + if (p->__pyx_v_view_class) { + e = (*v)(p->__pyx_v_view_class, a); if (e) return e; + } + if (p->__pyx_v_view_options) { + e = (*v)(p->__pyx_v_view_options, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs_spec = { + "apache_beam.runners.worker.operations.__pyx_scope_struct_1__read_side_inputs", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.operations.""__pyx_scope_struct_1__read_side_inputs", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyTypeObject_struct___pyx_obj_11); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 86; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type, (void *)&__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.common"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "Receiver", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_Receiver), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_Receiver = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_Receiver*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_Receiver); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_Receiver)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6common_Receiver; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_start; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_finish; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ConsumerSet.update_counters_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_ConsumerSet *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11ConsumerSet_update_counters_batch; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet)) __PYX_ERR(0, 108, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_ConsumerSet; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6common_Receiver; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ConsumerSet, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.receive_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_receive_batch; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet.__pyx_base.__pyx_base.flush = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_flush; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ConsumerSet; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.receive_batch = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_receive_batch; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet.__pyx_base.__pyx_base.flush = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6common_Receiver *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_flush; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet)) __PYX_ERR(0, 282, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet = &__pyx_type_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_start; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_process; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_finish; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_teardown; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.output = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_7runners_6worker_10operations_9Operation_output *__pyx_optional_args))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_output; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.execution_time_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_execution_time_monitoring_infos; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.user_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_user_monitoring_infos; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.pcollection_count_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_pcollection_count_monitoring_infos; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_Operation.monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_9Operation_monitoring_infos; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_Operation_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation)) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_Operation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation = &__pyx_type_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__.doc = __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation___init__; + } + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__.doc = __pyx_doc_11apache_beam_7runners_6worker_10operations_9Operation_42__str__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_7runners_6worker_10operations_9Operation_42__str__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Operation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation) < (0)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ReadOperation.__pyx_base.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_13ReadOperation_start; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation)) __PYX_ERR(0, 703, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_ReadOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ReadOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_process; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation)) __PYX_ERR(0, 717, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ImpulseReadOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation) < (0)) __PYX_ERR(0, 717, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.start = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_start; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_process; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_finish; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_teardown; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_DoOperation.__pyx_base.pcollection_count_monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_11DoOperation_pcollection_count_monitoring_infos; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation)) __PYX_ERR(0, 795, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_DoOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DoOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation) < (0)) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_process; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements.__pyx_base.__pyx_base.monitoring_infos = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_monitoring_infos; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements = &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_DoOperation; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions)) __PYX_ERR(0, 1046, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions = &__pyx_type_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SdfTruncateSizedRestrictions, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_process; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_finish; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_CombineOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16CombineOperation_teardown; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_CombineOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CombineOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation) < (0)) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_process; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.finish = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_finish; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.__pyx_base.teardown = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_teardown; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.add_key_value = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_add_key_value; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_PGBKCVOperation.output_key = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_PGBKCVOperation *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_output_key; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_PGBKCVOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation) < (0)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation = &__pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation.__pyx_base = *__pyx_vtabptr_11apache_beam_7runners_6worker_10operations_Operation; + __pyx_vtable_11apache_beam_7runners_6worker_10operations_FlattenOperation.__pyx_base.process = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_10operations_Operation *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_10operations_16FlattenOperation_process; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation_spec, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation = &__pyx_type_11apache_beam_7runners_6worker_10operations_FlattenOperation; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation, __pyx_vtabptr_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FlattenOperation, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup)) __PYX_ERR(0, 462, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup) < (0)) __PYX_ERR(0, 462, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup) < (0)) __PYX_ERR(0, 462, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct__setup->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs)) __PYX_ERR(0, 820, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs) < (0)) __PYX_ERR(0, 820, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs = &__pyx_type_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs) < (0)) __PYX_ERR(0, 820, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10operations___pyx_scope_struct_1__read_side_inputs->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(5, 27, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(5, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(5, 46, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(5, 49, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) __PYX_ERR(5, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.transforms.cy_dataflow_distribution_counter"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.transforms.cy_dataflow_distribution_counter", "DataflowDistributionCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) __PYX_ERR(6, 32, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = (struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter)) __PYX_ERR(6, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.common"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "MethodWrapper", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_MethodWrapper), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_MethodWrapper) __PYX_ERR(7, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "DoFnSignature", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnSignature), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnSignature) __PYX_ERR(7, 55, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "DoFnInvoker", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnInvoker), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker) __PYX_ERR(7, 72, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnInvoker*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnInvoker); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnInvoker)) __PYX_ERR(7, 72, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "SimpleInvoker", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_SimpleInvoker), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker) __PYX_ERR(7, 90, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_SimpleInvoker*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_SimpleInvoker); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_SimpleInvoker)) __PYX_ERR(7, 90, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "PerWindowInvoker", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_PerWindowInvoker), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker) __PYX_ERR(7, 95, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_PerWindowInvoker*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_PerWindowInvoker); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_PerWindowInvoker)) __PYX_ERR(7, 95, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "DoFnRunner", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnRunner), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner) __PYX_ERR(7, 122, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnRunner*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnRunner); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnRunner)) __PYX_ERR(7, 122, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "OutputHandler", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_OutputHandler), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler) __PYX_ERR(7, 133, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_OutputHandler*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_OutputHandler); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_OutputHandler)) __PYX_ERR(7, 133, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "_OutputHandler", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__OutputHandler), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler) __PYX_ERR(7, 145, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler = (struct __pyx_vtabstruct_11apache_beam_7runners_6common__OutputHandler*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__OutputHandler); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common__OutputHandler)) __PYX_ERR(7, 145, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "DoFnContext", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common_DoFnContext), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext) __PYX_ERR(7, 175, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext = (struct __pyx_vtabstruct_11apache_beam_7runners_6common_DoFnContext*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common_DoFnContext); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common_DoFnContext)) __PYX_ERR(7, 175, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.common", "_ReceiverAdapter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6common__ReceiverAdapter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter) __PYX_ERR(7, 182, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter = (struct __pyx_vtabstruct_11apache_beam_7runners_6common__ReceiverAdapter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6common__ReceiverAdapter); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6common__ReceiverAdapter)) __PYX_ERR(7, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.counters"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.counters", "Counter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) __PYX_ERR(8, 20, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_8counters_Counter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_Counter)) __PYX_ERR(8, 20, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.utils.counters", "AccumulatorCombineFnCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) __PYX_ERR(8, 28, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter)) __PYX_ERR(8, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(9, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(10, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(11, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #else + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #else + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #else + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #else + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #else + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.cells"); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "MetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) __PYX_ERR(12, 23, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(12, 23, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "CounterCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) __PYX_ERR(12, 29, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(12, 29, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) __PYX_ERR(12, 37, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(12, 37, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "AbstractMetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) __PYX_ERR(12, 44, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell)) __PYX_ERR(12, 44, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "GaugeCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) __PYX_ERR(12, 50, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(12, 50, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "StringSetCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) __PYX_ERR(12, 54, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell)) __PYX_ERR(12, 54, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) __PYX_ERR(12, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell)) __PYX_ERR(12, 58, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) __PYX_ERR(12, 62, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "_BoundedTrieNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) __PYX_ERR(12, 69, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) __PYX_ERR(12, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "_TypedMetricName", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) __PYX_ERR(13, 26, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricUpdater", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) __PYX_ERR(13, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricsContainer", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) __PYX_ERR(13, 42, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer = (struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(13, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.worker.statesampler_fast"); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "StateSampler", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) __PYX_ERR(14, 25, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(14, 25, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.statesampler_fast", "ScopedState", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) __PYX_ERR(14, 52, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState)) __PYX_ERR(14, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.worker.opcounters"); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.opcounters", "TransformIOCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter) __PYX_ERR(15, 25, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_TransformIOCounter)) __PYX_ERR(15, 25, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.opcounters", "NoOpTransformIOCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter) __PYX_ERR(15, 38, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_NoOpTransformIOCounter)) __PYX_ERR(15, 38, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.opcounters", "SideInputReadCounter", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter) __PYX_ERR(15, 42, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SideInputReadCounter)) __PYX_ERR(15, 42, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.opcounters", "SumAccumulator", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_SumAccumulator), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator) __PYX_ERR(15, 47, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_SumAccumulator*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_SumAccumulator); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_SumAccumulator)) __PYX_ERR(15, 47, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.runners.worker.opcounters", "OperationCounters", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), + #else + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7runners_6worker_10opcounters_OperationCounters), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters) __PYX_ERR(15, 53, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters = (struct __pyx_vtabstruct_11apache_beam_7runners_6worker_10opcounters_OperationCounters*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_10opcounters_OperationCounters); if (unlikely(!__pyx_vtabptr_11apache_beam_7runners_6worker_10opcounters_OperationCounters)) __PYX_ERR(15, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 26; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.runners.common"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyTypeObject_TaggedOutput_Timest); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 16; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_7runners_6common_TaggedOutput, (void **)&__pyx_vp_11apache_beam_7runners_6common_TimestampedValue, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject__DEFAULT_get_current_tr); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 12; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT, (void **)&__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_operations(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_operations}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "operations", + __pyx_k_Worker_operations_executor, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_operations(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_operations(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_operations(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'operations' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "operations" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_operations", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__runners__worker__operations) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.runners.worker.operations")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.runners.worker.operations", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/runners/worker/operations.py":23 + * # pylint: disable=super-with-arguments + * + * import collections # <<<<<<<<<<<<<< + * import logging + * import threading +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_collections, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":24 + * + * import collections + * import logging # <<<<<<<<<<<<<< + * import threading + * import warnings +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":25 + * import collections + * import logging + * import threading # <<<<<<<<<<<<<< + * import warnings + * from typing import TYPE_CHECKING +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":26 + * import logging + * import threading + * import warnings # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":27 + * import threading + * import warnings + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import DefaultDict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":28 + * import warnings + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import DefaultDict + * from typing import Dict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":29 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import DefaultDict # <<<<<<<<<<<<<< + * from typing import Dict + * from typing import FrozenSet +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DefaultDict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DefaultDict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":30 + * from typing import Any + * from typing import DefaultDict + * from typing import Dict # <<<<<<<<<<<<<< + * from typing import FrozenSet + * from typing import Iterable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":31 + * from typing import DefaultDict + * from typing import Dict + * from typing import FrozenSet # <<<<<<<<<<<<<< + * from typing import Iterable + * from typing import Iterator +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FrozenSet}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FrozenSet}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":32 + * from typing import Dict + * from typing import FrozenSet + * from typing import Iterable # <<<<<<<<<<<<<< + * from typing import Iterator + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":33 + * from typing import FrozenSet + * from typing import Iterable + * from typing import Iterator # <<<<<<<<<<<<<< + * from typing import List + * from typing import Mapping +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterator}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":34 + * from typing import Iterable + * from typing import Iterator + * from typing import List # <<<<<<<<<<<<<< + * from typing import Mapping + * from typing import NamedTuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":35 + * from typing import Iterator + * from typing import List + * from typing import Mapping # <<<<<<<<<<<<<< + * from typing import NamedTuple + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":36 + * from typing import List + * from typing import Mapping + * from typing import NamedTuple # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Tuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NamedTuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_NamedTuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":37 + * from typing import Mapping + * from typing import NamedTuple + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Tuple + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":38 + * from typing import NamedTuple + * from typing import Optional + * from typing import Tuple # <<<<<<<<<<<<<< + * + * from apache_beam import coders +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":40 + * from typing import Tuple + * + * from apache_beam import coders # <<<<<<<<<<<<<< + * from apache_beam.internal import pickler + * from apache_beam.io import iobase +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":41 + * + * from apache_beam import coders + * from apache_beam.internal import pickler # <<<<<<<<<<<<<< + * from apache_beam.io import iobase + * from apache_beam.metrics import monitoring_infos +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_pickler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_internal, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_pickler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":42 + * from apache_beam import coders + * from apache_beam.internal import pickler + * from apache_beam.io import iobase # <<<<<<<<<<<<<< + * from apache_beam.metrics import monitoring_infos + * from apache_beam.metrics.cells import DistributionData +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_iobase}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_io, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_iobase}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":43 + * from apache_beam.internal import pickler + * from apache_beam.io import iobase + * from apache_beam.metrics import monitoring_infos # <<<<<<<<<<<<<< + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.execution import MetricsContainer +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_monitoring_infos}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":44 + * from apache_beam.io import iobase + * from apache_beam.metrics import monitoring_infos + * from apache_beam.metrics.cells import DistributionData # <<<<<<<<<<<<<< + * from apache_beam.metrics.execution import MetricsContainer + * from apache_beam.portability.api import metrics_pb2 +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionData}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_cells, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DistributionData}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":45 + * from apache_beam.metrics import monitoring_infos + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.execution import MetricsContainer # <<<<<<<<<<<<<< + * from apache_beam.portability.api import metrics_pb2 + * from apache_beam.runners import common +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricsContainer}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_metrics_execution, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MetricsContainer}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":46 + * from apache_beam.metrics.cells import DistributionData + * from apache_beam.metrics.execution import MetricsContainer + * from apache_beam.portability.api import metrics_pb2 # <<<<<<<<<<<<<< + * from apache_beam.runners import common + * from apache_beam.runners.common import Receiver +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_portability_api, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metrics_pb2}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":47 + * from apache_beam.metrics.execution import MetricsContainer + * from apache_beam.portability.api import metrics_pb2 + * from apache_beam.runners import common # <<<<<<<<<<<<<< + * from apache_beam.runners.common import Receiver + * from apache_beam.runners.worker import opcounters +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_common}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_common}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":48 + * from apache_beam.portability.api import metrics_pb2 + * from apache_beam.runners import common + * from apache_beam.runners.common import Receiver # <<<<<<<<<<<<<< + * from apache_beam.runners.worker import opcounters + * from apache_beam.runners.worker import operation_specs +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Receiver}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_common, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":49 + * from apache_beam.runners import common + * from apache_beam.runners.common import Receiver + * from apache_beam.runners.worker import opcounters # <<<<<<<<<<<<<< + * from apache_beam.runners.worker import operation_specs + * from apache_beam.runners.worker import sideinputs +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_opcounters}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_opcounters}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":50 + * from apache_beam.runners.common import Receiver + * from apache_beam.runners.worker import opcounters + * from apache_beam.runners.worker import operation_specs # <<<<<<<<<<<<<< + * from apache_beam.runners.worker import sideinputs + * from apache_beam.runners.worker.data_sampler import DataSampler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_operation_specs}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_operation_specs}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":51 + * from apache_beam.runners.worker import opcounters + * from apache_beam.runners.worker import operation_specs + * from apache_beam.runners.worker import sideinputs # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.data_sampler import DataSampler + * from apache_beam.transforms import combiners +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":52 + * from apache_beam.runners.worker import operation_specs + * from apache_beam.runners.worker import sideinputs + * from apache_beam.runners.worker.data_sampler import DataSampler # <<<<<<<<<<<<<< + * from apache_beam.transforms import combiners + * from apache_beam.transforms import core +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataSampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_data, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataSampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":53 + * from apache_beam.runners.worker import sideinputs + * from apache_beam.runners.worker.data_sampler import DataSampler + * from apache_beam.transforms import combiners # <<<<<<<<<<<<<< + * from apache_beam.transforms import core + * from apache_beam.transforms import sideinputs as apache_sideinputs +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_combiners}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_combiners}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":54 + * from apache_beam.runners.worker.data_sampler import DataSampler + * from apache_beam.transforms import combiners + * from apache_beam.transforms import core # <<<<<<<<<<<<<< + * from apache_beam.transforms import sideinputs as apache_sideinputs + * from apache_beam.transforms import userstate +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":55 + * from apache_beam.transforms import combiners + * from apache_beam.transforms import core + * from apache_beam.transforms import sideinputs as apache_sideinputs # <<<<<<<<<<<<<< + * from apache_beam.transforms import userstate + * from apache_beam.transforms import window +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_sideinputs}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_apache_sideinputs, __pyx_t_4) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":56 + * from apache_beam.transforms import core + * from apache_beam.transforms import sideinputs as apache_sideinputs + * from apache_beam.transforms import userstate # <<<<<<<<<<<<<< + * from apache_beam.transforms import window + * from apache_beam.transforms.combiners import PhasedCombineFnExecutor +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_userstate}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":57 + * from apache_beam.transforms import sideinputs as apache_sideinputs + * from apache_beam.transforms import userstate + * from apache_beam.transforms import window # <<<<<<<<<<<<<< + * from apache_beam.transforms.combiners import PhasedCombineFnExecutor + * from apache_beam.transforms.combiners import curry_combine_fn +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_window}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_window}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":58 + * from apache_beam.transforms import userstate + * from apache_beam.transforms import window + * from apache_beam.transforms.combiners import PhasedCombineFnExecutor # <<<<<<<<<<<<<< + * from apache_beam.transforms.combiners import curry_combine_fn + * from apache_beam.transforms.window import GlobalWindows +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PhasedCombineFnExecutor}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_combiners, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PhasedCombineFnExecutor}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":59 + * from apache_beam.transforms import window + * from apache_beam.transforms.combiners import PhasedCombineFnExecutor + * from apache_beam.transforms.combiners import curry_combine_fn # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.typehints.batch import BatchConverter +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_curry_combine_fn}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_combiners, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_curry_combine_fn}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":60 + * from apache_beam.transforms.combiners import PhasedCombineFnExecutor + * from apache_beam.transforms.combiners import curry_combine_fn + * from apache_beam.transforms.window import GlobalWindows # <<<<<<<<<<<<<< + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.windowed_value import WindowedBatch +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindows}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GlobalWindows}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":61 + * from apache_beam.transforms.combiners import curry_combine_fn + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.typehints.batch import BatchConverter # <<<<<<<<<<<<<< + * from apache_beam.utils.windowed_value import WindowedBatch + * from apache_beam.utils.windowed_value import WindowedValue +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_typehints_batch, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BatchConverter}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":62 + * from apache_beam.transforms.window import GlobalWindows + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.windowed_value import WindowedBatch # <<<<<<<<<<<<<< + * from apache_beam.utils.windowed_value import WindowedValue + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowedBatch}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":63 + * from apache_beam.typehints.batch import BatchConverter + * from apache_beam.utils.windowed_value import WindowedBatch + * from apache_beam.utils.windowed_value import WindowedValue # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WindowedValue}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":65 + * from apache_beam.utils.windowed_value import WindowedValue + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/runners/worker/operations.py":66 + * + * if TYPE_CHECKING: + * from apache_beam.runners.sdf_utils import SplitResultPrimary # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.worker.bundle_processor import ExecutionContext +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultPrimary}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultPrimary}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":67 + * if TYPE_CHECKING: + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.runners.worker.data_sampler import OutputSampler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultResidual}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_sdf_utils, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SplitResultResidual}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":68 + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.worker.bundle_processor import ExecutionContext # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.data_sampler import OutputSampler + * from apache_beam.runners.worker.statesampler import StateSampler +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecutionContext}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_bundl, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecutionContext}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":69 + * from apache_beam.runners.sdf_utils import SplitResultResidual + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.runners.worker.data_sampler import OutputSampler # <<<<<<<<<<<<<< + * from apache_beam.runners.worker.statesampler import StateSampler + * from apache_beam.transforms.userstate import TimerSpec +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputSampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_data, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OutputSampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":70 + * from apache_beam.runners.worker.bundle_processor import ExecutionContext + * from apache_beam.runners.worker.data_sampler import OutputSampler + * from apache_beam.runners.worker.statesampler import StateSampler # <<<<<<<<<<<<<< + * from apache_beam.transforms.userstate import TimerSpec + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StateSampler}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_StateSampler}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":71 + * from apache_beam.runners.worker.data_sampler import OutputSampler + * from apache_beam.runners.worker.statesampler import StateSampler + * from apache_beam.transforms.userstate import TimerSpec # <<<<<<<<<<<<<< + * + * # Allow some "pure mode" declarations. +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimerSpec}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_userstate, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimerSpec}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":65 + * from apache_beam.utils.windowed_value import WindowedValue + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.runners.sdf_utils import SplitResultPrimary + * from apache_beam.runners.sdf_utils import SplitResultResidual +*/ + } + + /* "apache_beam/runners/worker/operations.py":74 + * + * # Allow some "pure mode" declarations. + * try: # <<<<<<<<<<<<<< + * import cython + * except ImportError: +*/ + { + (void)__pyx_t_1; (void)__pyx_t_6; (void)__pyx_t_7; /* mark used */ + /*try:*/ { + + /* "apache_beam/runners/worker/operations.py":75 + * # Allow some "pure mode" declarations. + * try: + * import cython # <<<<<<<<<<<<<< + * except ImportError: + * +*/ + } + } + + /* "apache_beam/runners/worker/operations.py":83 + * globals()['cython'] = FakeCython() + * + * _globally_windowed_value = GlobalWindows.windowed_value(None) # <<<<<<<<<<<<<< + * _global_window_type = type(_globally_windowed_value.windows[0]) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_GlobalWindows); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_windowed_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, Py_None}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_XGOTREF((PyObject *)__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":84 + * + * _globally_windowed_value = GlobalWindows.windowed_value(None) + * _global_window_type = type(_globally_windowed_value.windows[0]) # <<<<<<<<<<<<<< + * + * _LOGGER = logging.getLogger(__name__) +*/ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_11apache_beam_7runners_6worker_10operations__globally_windowed_value->windows, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_2))); + __Pyx_XGOTREF((PyObject *)__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_7runners_6worker_10operations__global_window_type, ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_t_2)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_2))); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":86 + * _global_window_type = type(_globally_windowed_value.windows[0]) + * + * _LOGGER = logging.getLogger(__name__) # <<<<<<<<<<<<<< + * + * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary'] +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LOGGER, __pyx_t_2) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":88 + * _LOGGER = logging.getLogger(__name__) + * + * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary'] # <<<<<<<<<<<<<< + * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual'] + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SdfSplitResultsPrimary, __pyx_t_8) < (0)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":89 + * + * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary'] + * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual'] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SdfSplitResultsResidual, __pyx_t_2) < (0)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":93 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_operation(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Operation, value) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_1_cast_to_operation, 0, __pyx_mstate_global->__pyx_n_u_cast_to_operation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cast_to_operation, __pyx_t_2) < (0)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":101 + * + * # TODO(BEAM-9324) Remove these workarounds once upgraded to Cython 3 + * def _cast_to_receiver(value): # <<<<<<<<<<<<<< + * if cython.compiled: + * return cython.cast(Receiver, value) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_3_cast_to_receiver, 0, __pyx_mstate_global->__pyx_n_u_cast_to_receiver, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cast_to_receiver, __pyx_t_2) < (0)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":116 + * ConsumerSet are attached to the outputting Operation. + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def create( + * counter_factory, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_1create, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_create, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_2) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_create); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_2) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":182 + * self.execution_context = None # type: Optional[ExecutionContext] + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * # TODO(SDF): Consider supporting splitting each consumer individually. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_try_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_2) < (0)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":191 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_7current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_current_element_prog, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_2) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":203 + * return None + * + * def update_counters_start(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.opcounter.update_from(windowed_value) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_9update_counters_start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_update_counters_star, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_update_counters_start, __pyx_t_2) < (0)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":221 + * self.element_sampler.has_element = True + * + * def update_counters_finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.opcounter.update_collect() +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_11update_counters_finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_update_counters_fini, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_update_counters_finish, __pyx_t_2) < (0)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":225 + * self.opcounter.update_collect() + * + * def update_counters_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * # type: (WindowedBatch) -> None + * self.opcounter.update_from_batch(windowed_batch) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_13update_counters_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet_update_counters_batc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_update_counters_batch, __pyx_t_2) < (0)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ConsumerSet, (type(self), 0xdda7ffa, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ConsumerSet__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11ConsumerSet_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ConsumerSet___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ConsumerSet, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":260 + * self.consumer = consumer + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * self.update_counters_start(windowed_value) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet_rece_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_receive, __pyx_t_2) < (0)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":266 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * raise AssertionError( + * "SingletonElementConsumerSet.receive_batch is not implemented") +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_5receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet_rece_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_receive_batch, __pyx_t_2) < (0)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":270 + * "SingletonElementConsumerSet.receive_batch is not implemented") + * + * def flush(self): # <<<<<<<<<<<<<< + * # SingletonElementConsumerSet has no buffer to flush + * pass +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_7flush, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet_flus, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_2) < (0)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":274 + * pass + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return self.consumer.try_split(fraction_of_remainder) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_9try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet_try, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_2) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":278 + * return self.consumer.try_split(fraction_of_remainder) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return self.consumer.current_element_progress() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_11current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet_curr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_2) < (0)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet___re, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SingletonElementConsumerSet, (type(self), 0x0c72a15, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SingletonElementConsumerSet__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27SingletonElementConsumerSet_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SingletonElementConsumerSet___se, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SingletonElementConsumerSet, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":285 + * """ConsumerSet implementation that handles all combinations of possible edges. + * """ + * MAX_BATCH_SIZE = 4096 # <<<<<<<<<<<<<< + * + * def __init__( +*/ + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_MAX_BATCH_SIZE, __pyx_mstate_global->__pyx_int_4096) < (0)) __PYX_ERR(0, 285, __pyx_L1_error) + + /* "apache_beam/runners/worker/operations.py":344 + * self._batched_elements: List[Any] = [] + * + * def receive(self, windowed_value): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet_receiv, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_receive, __pyx_t_2) < (0)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":362 + * self.update_counters_finish() + * + * def receive_batch(self, windowed_batch): # <<<<<<<<<<<<<< + * if self.element_consumers: + * for wv in windowed_batch.as_windowed_values( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_5receive_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet_receiv_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_receive_batch, __pyx_t_2) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":393 + * self.update_counters_batch(windowed_batch) + * + * def flush(self): # <<<<<<<<<<<<<< + * if not self.has_batch_consumers or not self._batched_elements: + * return +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_7flush, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet_flush, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_2) < (0)) __PYX_ERR(0, 393, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet___redu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_GeneralPurposeConsumerSet, (type(self), 0xff1ef4c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_GeneralPurposeConsumerSet__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25GeneralPurposeConsumerSet_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GeneralPurposeConsumerSet___sets, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_GeneralPurposeConsumerSet, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":462 + * self.data_sampler: Optional[DataSampler] = None + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_setup, __pyx_t_2) < (0)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":498 + * self.setup_done = True + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_start, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_2) < (0)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":512 + * receiver.execution_context = self.execution_context + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * # By default operations don't support batching, require Receiver to unbatch + * return common.BatchingPreference.BATCH_FORBIDDEN +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_7get_batching_preference, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_get_batching_preferenc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_get_batching_preference, __pyx_t_2) < (0)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":516 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can accept a batch, + * otherwise None.""" +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_BatchConverter) < (0)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_9get_input_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_get_input_batch_conver, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_get_input_batch_converter, __pyx_t_4) < (0)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":521 + * return None + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * """Returns a batch type converter if this operation can produce a batch, + * otherwise None.""" +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_BatchConverter) < (0)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_11get_output_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_get_output_batch_conve, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_get_output_batch_converter, __pyx_t_2) < (0)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":526 + * return None + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_13process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_2) < (0)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":532 + * pass + * + * def process_batch(self, batch: WindowedBatch): # <<<<<<<<<<<<<< + * pass + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_batch, __pyx_mstate_global->__pyx_n_u_WindowedBatch) < (0)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_15process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_process_batch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_process_batch, __pyx_t_4) < (0)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":535 + * pass + * + * def finalize_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * pass +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_17finalize_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_finalize_bundle, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_finalize_bundle, __pyx_t_4) < (0)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":539 + * pass + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * return False + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_19needs_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_needs_finalization, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_needs_finalization, __pyx_t_4) < (0)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":542 + * return False + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Any] + * return None +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_21try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_try_split, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_4) < (0)) __PYX_ERR(0, 542, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":546 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * return None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_23current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_current_element_progre, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":549 + * return None + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_25finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(0, 549, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":556 + * _cast_to_receiver(receiver).flush() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_27teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_teardown, __pyx_t_4) < (0)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":564 + * pass + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.metrics_container.reset() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_29reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_4) < (0)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":568 + * self.metrics_container.reset() + * + * def output(self, windowed_value, output_index=0): # <<<<<<<<<<<<<< + * # type: (WindowedValue, int) -> None + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_31output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_output, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_output, __pyx_t_4) < (0)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":572 + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) + * + * def add_receiver(self, operation, output_index=0): # <<<<<<<<<<<<<< + * # type: (Operation, int) -> None + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_33add_receiver, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_add_receiver, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_add_receiver, __pyx_t_4) < (0)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":578 + * self.consumers[output_index].append(operation) + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_35monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_monitoring_infos, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_monitoring_infos, __pyx_t_4) < (0)) __PYX_ERR(0, 578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":588 + * return all_monitoring_infos + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_37pcollection_count_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_pcollection_count_moni, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_pcollection_count_monitoring_inf, __pyx_t_4) < (0)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":622 + * return all_monitoring_infos + * + * def user_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_39user_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_user_monitoring_infos, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_user_monitoring_infos, __pyx_t_4) < (0)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":628 + * return self.metrics_container.to_runner_api_monitoring_infos(transform_id) + * + * def execution_time_monitoring_infos(self, transform_id): # <<<<<<<<<<<<<< + * # type: (str) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * total_time_spent_msecs = ( +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_41execution_time_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_execution_time_monitor, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_execution_time_monitoring_infos, __pyx_t_4) < (0)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":667 + * return self.str_internal() + * + * def str_internal(self, is_recursive=False): # <<<<<<<<<<<<<< + * """Internal helper for __str__ that supports recursion. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_45str_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation_str_internal, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[6]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_str_internal, __pyx_t_4) < (0)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":695 + * return '<%s %s>' % (printable_name, ', '.join(printable_fields)) + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[Dict[Optional[str], Tuple[Optional[str], Any]]] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_47_get_runtime_performance_hints, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation__get_runtime_performan, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_get_runtime_performance_hints, __pyx_t_4) < (0)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_49__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Operation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Operation__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9Operation_51__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Operation___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":704 + * + * class ReadOperation(Operation): + * def start(self): # <<<<<<<<<<<<<< + * with self.scoped_start_state: + * super(ReadOperation, self).start() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ReadOperation_start, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_4) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ReadOperation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ReadOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ReadOperation__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13ReadOperation_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ReadOperation___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ReadOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":741 + * ] + * + * def process(self, unused_impulse): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImpulseReadOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_4) < (0)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImpulseReadOperation___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ImpulseReadOperation, (type(self), 0x969cf7e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ImpulseReadOperation__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_20ImpulseReadOperation_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImpulseReadOperation___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_ImpulseReadOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":753 + * + * + * class InMemoryWriteOperation(Operation): # <<<<<<<<<<<<<< + * """A write operation that will write to an in-memory sink.""" + * def process(self, o): +*/ + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_kp_u_A_write_operation_that_will_writ); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_2 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 753, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":755 + * class InMemoryWriteOperation(Operation): + * """A write operation that will write to an in-memory sink.""" + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_22InMemoryWriteOperation_1process, 0, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_4) < (0)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":753 + * + * + * class InMemoryWriteOperation(Operation): # <<<<<<<<<<<<<< + * """A write operation that will write to an in-memory sink.""" + * def process(self, o): +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation, __pyx_t_2, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InMemoryWriteOperation, __pyx_t_4) < (0)) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":764 + * + * + * class _TaggedReceivers(dict): # <<<<<<<<<<<<<< + * def __init__(self, counter_factory, step_name): + * self._counter_factory = counter_factory +*/ + __pyx_t_2 = PyTuple_Pack(1, ((PyObject *)(&PyDict_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_TaggedReceivers, __pyx_mstate_global->__pyx_n_u_TaggedReceivers, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_8 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 764, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":765 + * + * class _TaggedReceivers(dict): + * def __init__(self, counter_factory, step_name): # <<<<<<<<<<<<<< + * self._counter_factory = counter_factory + * self._step_name = step_name +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_1__init__, 0, __pyx_mstate_global->__pyx_n_u_TaggedReceivers___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 765, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":769 + * self._step_name = step_name + * + * def __missing__(self, tag): # <<<<<<<<<<<<<< + * self[tag] = receiver = ConsumerSet.create( + * self._counter_factory, self._step_name, tag, [], None, None, None) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_3__missing__, 0, __pyx_mstate_global->__pyx_n_u_TaggedReceivers___missing, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_missing, __pyx_t_2) < (0)) __PYX_ERR(0, 769, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":774 + * return receiver + * + * def total_output_bytes(self): # <<<<<<<<<<<<<< + * # type: () -> int + * total = 0 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16_TaggedReceivers_5total_output_bytes, 0, __pyx_mstate_global->__pyx_n_u_TaggedReceivers_total_output_by, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_total_output_bytes, __pyx_t_2) < (0)) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/operations.py":764 + * + * + * class _TaggedReceivers(dict): # <<<<<<<<<<<<<< + * def __init__(self, counter_factory, step_name): + * self._counter_factory = counter_factory +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_TaggedReceivers, __pyx_t_8, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TaggedReceivers, __pyx_t_2) < (0)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":785 + * + * + * OpInputInfo = NamedTuple( # <<<<<<<<<<<<<< + * 'OpInputInfo', + * [ +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NamedTuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":788 + * 'OpInputInfo', + * [ + * ('transform_id', str), # <<<<<<<<<<<<<< + * ('main_input_tag', str), + * ('main_input_coder', coders.WindowedValueCoder), +*/ + __pyx_t_2 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_transform_id, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/runners/worker/operations.py":789 + * [ + * ('transform_id', str), + * ('main_input_tag', str), # <<<<<<<<<<<<<< + * ('main_input_coder', coders.WindowedValueCoder), + * ('outputs', Iterable[str]), +*/ + __pyx_t_11 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_main_input_tag, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "apache_beam/runners/worker/operations.py":790 + * ('transform_id', str), + * ('main_input_tag', str), + * ('main_input_coder', coders.WindowedValueCoder), # <<<<<<<<<<<<<< + * ('outputs', Iterable[str]), + * ]) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_WindowedValueCoder); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_main_input_coder, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":791 + * ('main_input_tag', str), + * ('main_input_coder', coders.WindowedValueCoder), + * ('outputs', Iterable[str]), # <<<<<<<<<<<<<< + * ]) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Iterable); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_13, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_outputs, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/runners/worker/operations.py":787 + * OpInputInfo = NamedTuple( + * 'OpInputInfo', + * [ # <<<<<<<<<<<<<< + * ('transform_id', str), + * ('main_input_tag', str), +*/ + __pyx_t_14 = __Pyx_PyList_Pack(4, __pyx_t_2, __pyx_t_11, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_n_u_OpInputInfo, __pyx_t_14}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OpInputInfo, __pyx_t_8) < (0)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":820 + * self.fn, _, _, _, _ = (pickler.loads(self.spec.serialized_fn)) + * + * def _read_side_inputs(self, tags_and_types): # <<<<<<<<<<<<<< + * # type: (...) -> Iterator[apache_sideinputs.SideInputMap] + * +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_3_read_side_inputs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation__read_side_inputs, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_read_side_inputs, __pyx_t_8) < (0)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":876 + * view_class, view_options, sideinputs.EmulatedIterable(iterator_fn)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_6setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_setup, __pyx_t_8) < (0)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":930 + * self.dofn_runner.setup() + * + * def start(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_start_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_8start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_start, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_8) < (0)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":937 + * self.dofn_runner.start() + * + * def get_batching_preference(self): # <<<<<<<<<<<<<< + * if self.fn._process_batch_defined: + * if self.fn._process_defined: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_10get_batching_preference, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_get_batching_prefere, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_get_batching_preference, __pyx_t_8) < (0)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":946 + * return common.BatchingPreference.BATCH_FORBIDDEN + * + * def get_input_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'input_batch_converter', None) + * +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_BatchConverter) < (0)) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_12get_input_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_get_input_batch_conv, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_get_input_batch_converter, __pyx_t_4) < (0)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":949 + * return getattr(self.fn, 'input_batch_converter', None) + * + * def get_output_batch_converter(self) -> Optional[BatchConverter]: # <<<<<<<<<<<<<< + * return getattr(self.fn, 'output_batch_converter', None) + * +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_BatchConverter) < (0)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_14get_output_batch_converter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_get_output_batch_con, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_get_output_batch_converter, __pyx_t_8) < (0)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":952 + * return getattr(self.fn, 'output_batch_converter', None) + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_16process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_8) < (0)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":962 + * (self, delayed_application)) + * + * def process_batch(self, windowed_batch: WindowedBatch) -> None: # <<<<<<<<<<<<<< + * self.dofn_runner.process_batch(windowed_batch) + * +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_windowed_batch, __pyx_mstate_global->__pyx_n_u_WindowedBatch) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_18process_batch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_process_batch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_process_batch, __pyx_t_4) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":965 + * self.dofn_runner.process_batch(windowed_batch) + * + * def finalize_bundle(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.dofn_runner.finalize() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_20finalize_bundle, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_finalize_bundle, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_finalize_bundle, __pyx_t_4) < (0)) __PYX_ERR(0, 965, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":969 + * self.dofn_runner.finalize() + * + * def needs_finalization(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_22needs_finalization, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_needs_finalization, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_needs_finalization, __pyx_t_4) < (0)) __PYX_ERR(0, 969, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":973 + * return self.dofn_runner.bundle_finalizer_param.has_callbacks() + * + * def add_timer_info(self, timer_family_id, timer_info): # <<<<<<<<<<<<<< + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_24add_timer_info, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_add_timer_info, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_add_timer_info, __pyx_t_4) < (0)) __PYX_ERR(0, 973, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":976 + * self.user_state_context.add_timer_info(timer_family_id, timer_info) + * + * def process_timer(self, tag, timer_data): # <<<<<<<<<<<<<< + * with self.scoped_timer_processing_state: + * timer_spec = self.timer_specs[tag] +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_26process_timer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_process_timer, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_process_timer, __pyx_t_4) < (0)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":987 + * timer_data.dynamic_timer_tag) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).finish() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_28finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(0, 987, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":995 + * self.user_state_context.commit() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_30teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_teardown, __pyx_t_4) < (0)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1002 + * self.user_state_context.reset() + * + * def reset(self): # <<<<<<<<<<<<<< + * # type: () -> None + * super(DoOperation, self).reset() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_32reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_4) < (0)) __PYX_ERR(0, 1002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1011 + * self.dofn_runner.bundle_finalizer_param.reset() + * + * def pcollection_count_monitoring_infos(self, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_34pcollection_count_monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation_pcollection_count_mo, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_pcollection_count_monitoring_inf, __pyx_t_4) < (0)) __PYX_ERR(0, 1011, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1038 + * return infos + * + * def _get_runtime_performance_hints(self): # <<<<<<<<<<<<<< + * fns = pickler.loads(self.spec.serialized_fn) + * if fns and hasattr(fns[0], '_runtime_output_constraints'): +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_36_get_runtime_performance_hints, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation__get_runtime_perform, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_get_runtime_performance_hints, __pyx_t_4) < (0)) __PYX_ERR(0, 1038, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_38__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DoOperation, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DoOperation__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11DoOperation_40__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DoOperation___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_DoOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1050 + * super(SdfTruncateSizedRestrictions, self).__init__(*args, **kwargs) + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * return self.receivers[0].current_element_progress() +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_3current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfTruncateSizedRestrictions_cur, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 1050, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1054 + * return self.receivers[0].current_element_progress() + * + * def try_split( # <<<<<<<<<<<<<< + * self, fraction_of_remainder + * ): # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfTruncateSizedRestrictions_try, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_4) < (0)) __PYX_ERR(0, 1054, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfTruncateSizedRestrictions___r, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfTruncateSizedRestrictions, (type(self), 0x00511f1, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfTruncateSizedRestrictions__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_28SdfTruncateSizedRestrictions_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfTruncateSizedRestrictions___s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfTruncateSizedRestrictions, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1066 + * self.element_start_output_bytes = None # type: Optional[int] + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * assert self.tagged_receivers is not None +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_3process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_4) < (0)) __PYX_ERR(0, 1066, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1089 + * self.element_start_output_bytes = None + * + * def try_split(self, fraction_of_remainder): # <<<<<<<<<<<<<< + * # type: (...) -> Optional[Tuple[Iterable[SdfSplitResultsPrimary], Iterable[SdfSplitResultsResidual]]] + * split = self.dofn_runner.try_split(fraction_of_remainder) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_5try_split, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements_try_spli, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_try_split, __pyx_t_4) < (0)) __PYX_ERR(0, 1089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1098 + * return None + * + * def current_element_progress(self): # <<<<<<<<<<<<<< + * # type: () -> Optional[iobase.RestrictionProgress] + * with self.lock: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_7current_element_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements_current, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_current_element_progress, __pyx_t_4) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1110 + * return None + * + * def monitoring_infos(self, transform_id, tag_to_pcollection_id): # <<<<<<<<<<<<<< + * # type: (str, Dict[str, str]) -> Dict[FrozenSet, metrics_pb2.MonitoringInfo] + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_9monitoring_infos, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements_monitori, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_monitoring_infos, __pyx_t_4) < (0)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SdfProcessSizedElements, (type(self), 0x39c451e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SdfProcessSizedElements__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23SdfProcessSizedElements_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SdfProcessSizedElements___setsta, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_SdfProcessSizedElements, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1155 + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_setup, __pyx_t_4) < (0)) __PYX_ERR(0, 1155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1162 + * self.phased_combine_fn.combine_fn.setup() + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_5process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_4) < (0)) __PYX_ERR(0, 1162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1170 + * self.output(o.with_value((key, self.phased_combine_fn.apply(values)))) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * _LOGGER.debug('Finishing %s', self) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_7finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(0, 1170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1175 + * super(CombineOperation, self).finish() + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_9teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_teardown, __pyx_t_4) < (0)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CombineOperation, (type(self), 0x81f9b57, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CombineOperation__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16CombineOperation_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CombineOperation___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_CombineOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1183 + * + * + * def create_pgbk_op(step_name, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * if spec.combine_fn: + * return PGBKCVOperation(step_name, spec, counter_factory, state_sampler) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_5create_pgbk_op, 0, __pyx_mstate_global->__pyx_n_u_create_pgbk_op, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_pgbk_op, __pyx_t_4) < (0)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/operations.py":1190 + * + * + * class PGBKOperation(Operation): # <<<<<<<<<<<<<< + * """Partial group-by-key operation. + * +*/ + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_Operation)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_PGBKOperation, __pyx_mstate_global->__pyx_n_u_PGBKOperation, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_kp_u_Partial_group_by_key_operation_T); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/operations.py":1197 + * values in this bundle, memory permitting. + * """ + * def __init__(self, name_context, spec, counter_factory, state_sampler): # <<<<<<<<<<<<<< + * super(PGBKOperation, + * self).__init__(name_context, spec, counter_factory, state_sampler) +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_1__init__, 0, __pyx_mstate_global->__pyx_n_u_PGBKOperation___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_13) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1206 + * self.max_size = 10 * 1000 + * + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_3process, 0, __pyx_mstate_global->__pyx_n_u_PGBKOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_13) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1216 + * self.flush(9 * self.max_size // 10) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * self.flush(0) +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_5finish, 0, __pyx_mstate_global->__pyx_n_u_PGBKOperation_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + PyList_Append(__pyx_t_4, __pyx_t_13); + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_13) < (0)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1221 + * super().finish() + * + * def flush(self, target): # <<<<<<<<<<<<<< + * # type: (int) -> None + * limit = self.size - target +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13PGBKOperation_7flush, 0, __pyx_mstate_global->__pyx_n_u_PGBKOperation_flush, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_13) < (0)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1190 + * + * + * class PGBKOperation(Operation): # <<<<<<<<<<<<<< + * """Partial group-by-key operation. + * +*/ + __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PGBKOperation, __pyx_t_8, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_CyFunction_InitClassCell(__pyx_t_4, __pyx_t_13) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PGBKOperation, __pyx_t_13) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1285 + * self.table = {} + * + * def setup(self, data_sampler=None): # <<<<<<<<<<<<<< + * # type: (Optional[DataSampler]) -> None + * with self.scoped_start_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_3setup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_setup, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_setup, __pyx_t_8) < (0)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1292 + * self.combine_fn.setup() + * + * def process(self, wkv): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_5process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_8) < (0)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1306 + * wkv.timestamp if self.timestamp_combiner else None) + * + * def add_key_value(self, wkey, value, timestamp): # <<<<<<<<<<<<<< + * entry = self.table.get(wkey, None) + * if entry is None: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_7add_key_value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_add_key_value, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_add_key_value, __pyx_t_8) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1331 + * entry[1] = self.timestamp_combiner.combine(entry[1], timestamp) + * + * def finish(self): # <<<<<<<<<<<<<< + * # type: () -> None + * for wkey, value in self.table.items(): +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_9finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_finish, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_8) < (0)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1338 + * self.key_count = 0 + * + * def teardown(self): # <<<<<<<<<<<<<< + * # type: () -> None + * with self.scoped_finish_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_11teardown, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_teardown, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_teardown, __pyx_t_8) < (0)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1345 + * self.combine_fn.teardown() + * + * def output_key(self, wkey, accumulator, timestamp): # <<<<<<<<<<<<<< + * if self.combine_fn_compact is None: + * value = accumulator +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_13output_key, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation_output_key, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_output_key, __pyx_t_8) < (0)) __PYX_ERR(0, 1345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_PGBKCVOperation, (type(self), 0x65f6927, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_PGBKCVOperation__set_state(self, __pyx_state) +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15PGBKCVOperation_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGBKCVOperation___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_PGBKCVOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1366 + * with all the items. + * """ + * def process(self, o): # <<<<<<<<<<<<<< + * # type: (WindowedValue) -> None + * with self.scoped_process_state: +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_1process, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FlattenOperation_process, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation, __pyx_mstate_global->__pyx_n_u_process, __pyx_t_8) < (0)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FlattenOperation___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_8) < (0)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_FlattenOperation, (type(self), 0x33b1103, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_FlattenOperation__set_state(self, __pyx_state) +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_16FlattenOperation_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_FlattenOperation___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_10operations_FlattenOperation, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_8) < (0)) __PYX_ERR(3, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1374 + * + * + * def create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_7create_operation, 0, __pyx_mstate_global->__pyx_n_u_create_operation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[7]); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_operation, __pyx_t_8) < (0)) __PYX_ERR(0, 1374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1458 + * + * + * class SimpleMapTaskExecutor(object): # <<<<<<<<<<<<<< + * """An executor for map tasks. + * +*/ + __pyx_t_8 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[9]); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_kp_u_An_executor_for_map_tasks_Stores); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8 != __pyx_mstate_global->__pyx_tuple[9]) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[9]) < 0))) __PYX_ERR(0, 1458, __pyx_L1_error) + } + + /* "apache_beam/runners/worker/operations.py":1464 + * task. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * map_task, +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_1__init__, 0, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_mstate_global->__pyx_tuple[1]); + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_13) < (0)) __PYX_ERR(0, 1464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1492 + * self._test_shuffle_sink = test_shuffle_sink + * + * def operations(self): # <<<<<<<<<<<<<< + * # type: () -> List[Operation] + * return self._ops[:] +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_3operations, 0, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor_operations, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_operations, __pyx_t_13) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1496 + * return self._ops[:] + * + * def execute(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21SimpleMapTaskExecutor_5execute, 0, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor_execute, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_execute, __pyx_t_13) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/runners/worker/operations.py":1458 + * + * + * class SimpleMapTaskExecutor(object): # <<<<<<<<<<<<<< + * """An executor for map tasks. + * +*/ + __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor, __pyx_t_8, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SimpleMapTaskExecutor, __pyx_t_13) < (0)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/runners/worker/operations.py":1541 + * + * + * class InefficientExecutionWarning(RuntimeWarning): # <<<<<<<<<<<<<< + * """warning to indicate an inefficiency in a Beam pipeline.""" + * +*/ + __pyx_t_8 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_RuntimeWarning)))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_kp_u_warning_to_indicate_an_inefficie); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_14 != __pyx_t_8) { + if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 1541, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning, __pyx_t_14, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning, __pyx_t_8) < (0)) __PYX_ERR(0, 1541, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/runners/worker/operations.py":1546 + * + * # Don't ignore InefficientExecutionWarning, but only log them once + * warnings.simplefilter('once', InefficientExecutionWarning) # <<<<<<<<<<<<<< +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_simplefilter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_InefficientExecutionWarning); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_n_u_once, __pyx_t_13}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xdda7ffa, 0xb6f3513, 0x94398cf, b'coder, consumers, element_sampler, execution_context, opcounter, output_index, output_sampler, step_name') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_9__pyx_unpickle_ConsumerSet, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ConsumerSet, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ConsumerSet, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_11__pyx_unpickle_SingletonElementConsumerSet, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonElementC, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SingletonElementC, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_GeneralPurposeConsumerSet(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xff1ef4c, 0x2a2c1fd, 0x331df85, b'_batched_elements, coder, consumers, element_consumers, element_sampler, execution_context, has_batch_consumers, opcounter, other_batch_consumers, output_index, output_sampler, passthrough_batch_consumers, producer_batch_converter, step_name') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_13__pyx_unpickle_GeneralPurposeConsumerSet, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GeneralPurposeCon, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_GeneralPurposeCon, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_15__pyx_unpickle_Operation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Operation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Operation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ReadOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x33b1103, 0x0ef7c70, 0xb6b9d28, b'consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_17__pyx_unpickle_ReadOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ReadOperation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ReadOperation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_19__pyx_unpickle_ImpulseReadOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ImpulseReadOperat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ImpulseReadOperat, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DoOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x00511f1, 0xa0c1025, 0x1b6c4ec, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, execution_context, fn, input_info, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_21__pyx_unpickle_DoOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoOperation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DoOperation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_23__pyx_unpickle_SdfTruncateSizedRestrictions, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfTruncateSizedR, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfTruncateSizedR, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SdfProcessSizedElements(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x39c451e, 0xf7c99a5, 0x71489ac, b'consumers, counter_factory, data_sampler, debug_logging_enabled, dofn_runner, element_start_output_bytes, execution_context, fn, input_info, lock, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, scoped_timer_processing_state, setup_done, side_input_maps, spec, state_sampler, step_name, tagged_receivers, timer_inputs, timer_specs, user_state_context') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_25__pyx_unpickle_SdfProcessSizedElements, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfProcessSizedEl, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SdfProcessSizedEl, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_27__pyx_unpickle_CombineOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CombineOperation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CombineOperation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_PGBKCVOperation(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x65f6927, 0x6c7b164, 0xf08ce62, b'combine_fn, combine_fn_add_input, combine_fn_compact, consumers, counter_factory, data_sampler, debug_logging_enabled, execution_context, is_default_windowing, key_count, max_keys, metrics_container, name_context, operation_name, receivers, scoped_finish_state, scoped_process_state, scoped_start_state, setup_done, spec, state_sampler, step_name, table, timestamp_combiner') +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_29__pyx_unpickle_PGBKCVOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PGBKCVOperation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_PGBKCVOperation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_10operations_31__pyx_unpickle_FlattenOperation, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FlattenOperation, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_opera, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_FlattenOperation, __pyx_t_14) < (0)) __PYX_ERR(3, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/runners/worker/operations.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_14 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_14) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.runners.worker.operations", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.worker.operations"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_min); if (!__pyx_builtin_min) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1512, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/runners/worker/operations.py":468 + * + * This must be called before any other methods of the operation.""" + * with self.scoped_start_state: # <<<<<<<<<<<<<< + * self.data_sampler = data_sampler + * self.debug_logging_enabled = logging.getLogger().isEnabledFor( +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/runners/worker/operations.py":744 + * # type: (WindowedValue) -> None + * with self.scoped_process_state: + * range_tracker = self.source.get_range_tracker(None, None) # <<<<<<<<<<<<<< + * for value in self.source.read(range_tracker): + * if isinstance(value, WindowedValue): +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "apache_beam/runners/worker/operations.py":1151 + * # and therefore the code to handle the extra args/kwargs is simpler than for + * # the DoFn's of ParDo. + * fn, args, kwargs = pickler.loads(self.spec.serialized_fn)[:3] # <<<<<<<<<<<<<< + * self.phased_combine_fn = ( + * PhasedCombineFnExecutor(self.spec.phase, fn, args, kwargs)) +*/ + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_3, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + + /* "apache_beam/runners/worker/operations.py":1494 + * def operations(self): + * # type: () -> List[Operation] + * return self._ops[:] # <<<<<<<<<<<<<< + * + * def execute(self): +*/ + __pyx_mstate_global->__pyx_slice[1] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(0, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[1]); + + /* "apache_beam/runners/worker/operations.py":88 + * _LOGGER = logging.getLogger(__name__) + * + * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary'] # <<<<<<<<<<<<<< + * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual'] + * +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_DoOperation, __pyx_mstate_global->__pyx_n_u_SplitResultPrimary); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/runners/worker/operations.py":89 + * + * SdfSplitResultsPrimary = Tuple['DoOperation', 'SplitResultPrimary'] + * SdfSplitResultsResidual = Tuple['DoOperation', 'SplitResultResidual'] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_DoOperation, __pyx_mstate_global->__pyx_n_u_SplitResultResidual); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + + /* "apache_beam/runners/worker/operations.py":116 + * ConsumerSet are attached to the outputting Operation. + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def create( + * counter_factory, +*/ + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + + /* "apache_beam/runners/worker/operations.py":568 + * self.metrics_container.reset() + * + * def output(self, windowed_value, output_index=0): # <<<<<<<<<<<<<< + * # type: (WindowedValue, int) -> None + * _cast_to_receiver(self.receivers[output_index]).receive(windowed_value) +*/ + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + + /* "apache_beam/runners/worker/operations.py":667 + * return self.str_internal() + * + * def str_internal(self, is_recursive=False): # <<<<<<<<<<<<<< + * """Internal helper for __str__ that supports recursion. + * +*/ + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + + /* "apache_beam/runners/worker/operations.py":1374 + * + * + * def create_operation( # <<<<<<<<<<<<<< + * name_context, + * spec, +*/ + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(5, Py_None, Py_None, Py_None, Py_None, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 1374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + + /* "apache_beam/runners/worker/operations.py":1458 + * + * + * class SimpleMapTaskExecutor(object): # <<<<<<<<<<<<<< + * """An executor for map tasks. + * +*/ + __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); + __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<10; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 11; } index[] = {{1},{55},{117},{65},{12},{19},{179},{24},{208},{21},{19},{60},{17},{22},{123},{27},{1},{2},{1},{1},{1},{1},{1},{8},{40},{8},{7},{6},{2},{9},{17},{29},{4},{14},{14},{3},{4},{10},{14},{4},{55},{3},{15},{14},{14},{32},{18},{24},{9},{16},{34},{36},{23},{24},{22},{25},{11},{29},{31},{18},{36},{21},{33},{34},{33},{14},{5},{11},{11},{11},{4},{16},{10},{9},{11},{29},{31},{42},{29},{26},{27},{18},{35},{37},{38},{30},{46},{19},{25},{25},{17},{17},{17},{20},{17},{16},{16},{23},{16},{34},{36},{24},{10},{9},{25},{43},{45},{31},{33},{39},{13},{27},{20},{38},{40},{28},{22},{30},{27},{8},{13},{8},{7},{4},{14},{7},{13},{16},{14},{11},{10},{19},{20},{4},{13},{11},{9},{27},{29},{40},{22},{34},{41},{25},{16},{33},{35},{36},{26},{28},{16},{44},{17},{23},{15},{15},{15},{22},{18},{19},{31},{8},{13},{15},{33},{35},{29},{22},{26},{23},{21},{24},{13},{22},{20},{19},{21},{24},{13},{23},{20},{5},{13},{31},{33},{19},{8},{33},{21},{22},{23},{41},{43},{48},{40},{31},{33},{22},{23},{28},{46},{48},{53},{38},{21},{12},{21},{30},{29},{32},{27},{45},{47},{52},{33},{35},{41},{37},{12},{18},{19},{12},{36},{15},{13},{16},{25},{28},{35},{9},{17},{5},{29},{18},{18},{13},{13},{18},{15},{10},{13},{25},{19},{18},{23},{10},{30},{18},{21},{26},{11},{11},{9},{13},{12},{14},{11},{20},{14},{19},{25},{29},{27},{19},{26},{29},{26},{43},{39},{37},{39},{22},{32},{32},{29},{27},{32},{17},{6},{5},{4},{18},{18},{5},{10},{18},{17},{9},{17},{18},{5},{5},{6},{11},{7},{10},{9},{6},{6},{7},{14},{8},{24},{25},{9},{4},{15},{16},{6},{18},{13},{16},{14},{24},{16},{12},{33},{34},{5},{21},{14},{11},{20},{8},{5},{7},{17},{2},{15},{15},{8},{6},{9},{9},{7},{17},{31},{8},{13},{6},{8},{15},{6},{14},{5},{3},{2},{3},{18},{21},{18},{20},{8},{3},{9},{23},{14},{8},{25},{27},{26},{18},{17},{30},{12},{13},{11},{1},{5},{8},{26},{5},{21},{11},{6},{13},{18},{6},{12},{13},{10},{12},{12},{5},{11},{2},{3},{2},{6},{6},{8},{5},{5},{7},{12},{8},{16},{14},{8},{9},{3},{8},{13},{4},{17},{13},{17},{12},{11},{3},{11},{10},{16},{15},{8},{4},{12},{13},{18},{7},{4},{1},{6},{4},{2},{9},{10},{9},{14},{15},{10},{4},{6},{22},{13},{12},{13},{12},{10},{10},{14},{11},{12},{7},{8},{7},{11},{34},{5},{7},{3},{11},{9},{7},{16},{14},{7},{13},{22},{16},{13},{18},{30},{13},{10},{8},{24},{19},{8},{10},{12},{14},{12},{11},{10},{31},{26},{26},{31},{40},{35},{24},{30},{28},{38},{43},{42},{14},{12},{4},{12},{17},{35},{7},{13},{8},{9},{10},{17},{13},{14},{5},{8},{9},{16},{6},{8},{27},{17},{7},{18},{20},{12},{4},{4},{13},{12},{10},{12},{19},{5},{33},{12},{14},{2},{10},{14},{15},{11},{8},{10},{12},{4},{6},{7},{4},{5},{5},{14},{5},{13},{14},{12},{9},{10},{13},{12},{6},{3},{5},{16},{17},{5},{3},{21},{16},{14},{6},{8},{8},{17},{18},{19},{20},{9},{5},{10},{15},{10},{10},{9},{18},{6},{30},{5},{18},{12},{9},{4},{6},{14},{6},{21},{22},{21},{3},{12},{8},{21},{18},{9},{1},{5},{6},{10},{12},{2},{4},{8},{6},{9},{14},{14},{8},{9},{7},{14},{4},{3},{23},{21},{3},{54},{40},{45},{130},{24},{9},{11},{9},{12},{12},{7},{7},{9},{173},{22},{11},{19},{16},{140},{54},{11},{15},{14},{18},{21},{11},{11},{12},{28},{21},{21},{11},{4},{11},{17},{14},{73},{19},{17},{60},{119},{243},{24},{204},{11},{41},{110},{30},{60},{84},{73},{80},{58},{37},{63},{53},{63},{42},{45},{75},{33},{11},{551},{387},{1112},{1115},{1211},{671},{671},{721},{720},{671},{610},{973},{41},{337},{261},{10},{10},{11},{11},{12},{5},{12},{2},{156},{20},{92},{31},{84},{11},{42},{227},{52},{57},{59},{56},{58},{55},{59},{59},{55},{58},{59},{52},{399},{163},{47},{50},{11},{201},{141},{190},{50},{143},{56},{103},{61},{46},{63},{10}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (9862 bytes) */ +const char* const cstring = "(\265/\375`\311g\3453\001\2524ABH\340\314\314\0030\314c\215'\346\032NP<\326b6\317\363<\317\363<\326\220\356\255\264\335\033B\306\250\334\242\204\375lW\354\364*\024\000\360rY\000\003\216\2748HXX9\274\334\376k\037\354\243\325\235\353\006\005\260\r-\007\305\003\024\0043\004kL?\317\266{\266\347x\214\266?\324M\317\363D\327\037g{\232\246o\217=\334\323\\\316e\317\234\214\353\336\267\247\317eU\035.\367z\266\3438{\236\352\331\3418^[\365\364\276{\227Eu(\307u\364\334\235\347y\236n|\306\236\243\347\351cwE\333\337\351\271\317\301\374\307\246m\332O\375\375y\337r8\366'\217y\352\236'\366TS\277\333\271\353\313O\277\025\307c\330}Y\266\243\247\235{ZaWFQ\376\353%\277\220\236\203\373\313]\235\300\\\251\027\213\266b\231%\264\330-\327\332`\264\277\253\351{\374cy\354\306\353\316\247=\227\343\346)\002s\225\250X#\252\323$e\306L\336\341\270\026\322u\236\233\265\236\2565\223\345r\272\376`\276[a\231\367\235V\363iMMk&-e\326XfJ\310\271b\231\310^\251Z\332\246\336\235\371S\327N\243\351P\327\204\246v\032\354\214\371\261\322\356\371K\212I\023\251\325X\252\030Mf\343\363DU\022\"\"\203\273\227\373\033\273\305X\247\231:M\233\314\264\271\260\036\314L\373\216\303\\/\230{\336_/\177\261T\\\265\023%\365\212\375jBc\211\210\304L\316\333\355\325\272<+\277;W\312;\255\263\252*\277\324\322\316r\234\313\212\274x\231U\275\373\302\262\214m\273H\333e\\\270\245\212\271\313\266\332\036\267j*V\355u\262LV0[\3109Rs\301\\\2558\246\307-\313\225\262\362\216\005\243\331l1\030\353\3052a\305\335w\330\215\327\326\335\235\250\213\276\247G\317\367\304\235]fe\271\253\236\247\217\317\363\214{\316]\325h2\016]W1+s\265\257`^\3431O\251N3\006;c+\021[\010k\245\362\276\225\335\364\225W\366\007\307g?aX\3560\032{\325\307\335\237'zvTN;|\236\247\266\205\333\271\252\227\3037U\207\273\332aY\314\337~!\256gS\"+\026\315e\233\261h0\326j\345\n\241\305Z\347\210\312L\205\374B\320\036stma\356\003\321Q\037{\017\037 \374\206\207\017k\374q*w.\354\345]\371\301\303\243\017\332\316\226\022R\277\2429\026\307\375\232~\370\275'?\3017\301\303\275mex\302\216\367""\027\224\277\274\237!N J\017\245\204\026x\243\344\320\352Z[\367\275w_\214\272-w\225\246\274d\373\273\276%\014\3131*\303\261\377\350p\t\367tEK\t+\272\376D\247\026\346\335L7J\230\307\265\264\277\273\265\304\235\375\004\367\235\354\343\266\357:\313j\335\270\263,\313\321\262\327\374F\213\337X\361\276\243.,\213\343\376\226\022:\233\2662.V{\307\225|WJhY)E>\226]\337\331W\216K\217.\263\274WJx\260\226\036i\367\271i\273\372\036\350\370\213\371\353\272\217\037\356\343\225]8W\262|\215a.k\201{\257uU/h\314CVX\376\306N\335\263\274\325{+\274\246eG\354\266-\357\210\273/[\317\337\264\367\266\224\335_\251\272\312\223\357\357o\215\331U\306u\234\354K\017\223\202h\000\371\220\261de\013\257p\314v\334\312\366\264u_\342\237\252\307.,\226\337\326\3457\312\\\273\276\370\265][\336s\026-!\300]\007\273\267\223\367gG[\036\373\264\307h\177cX'\036{xU\375\232\362\016\227]uK\237s\341\267\364\275V\226\245Ht\362:\317\343\362\345;\265\204\335XF{L/\333\324I\327\256\276\374\301\356\256\357>\332\265ly\351\306,\273\372\312\230\277\304e\353\2561\207\373\353\226=^a_\231Z\t\025P\267\331b\346\314\0344'Q\363\t\3203D\335\224T\370\251]Q\227\031\302\005\031/tH\211F/\300f\">[\2305\230\346R\020\27518\370\016\006\374\001\025\014D\276\272c\203\203o\300\366\240\370\263\021\021\252\246!\300\013.\310\370\nf\002$\007t\013\007\230\232Q\263\010\017v\270-$\370\tDC\024\235@\224\233A\033v\006\217\240\310-#\370\031\346\376\361s\265\217\336\270\360x\352\013t,E\2533\317\006\261#\\|\t\251Z\245\013\320/\3325\013~\340\370\035\265\215\376\370\037\031?\203Wo\324\031\350>_\204r\365\254\316\321\013*>\010\203tr\2413P\376t\340\037\000\tG\"\034h\201\002\rjX\242@\361)@%\n^}\021\214o~\027\27097\210\005D\331\026\266Yo\304\250\0026\307~@\340\307\300\r\340\312\226p\340\3530\002|8\364\251Dsh\2169\25595\2106Q\321\t(\350\226\303\035\333\334&\251!\350P\031f\002\252\355\261Wu;\223\000I\240aj\266\250Uu\203Z\254Wf\020\272C\257\000-8s\r\330+\325\030h\023\235\232\346\322\334\301\261!vl\010Qv\257Cj\022\263\001\217\255\266\250QzF\367f\316\0018\232S\263""\n\324\000\212<\302\020P\005$\300\273/n\014v\254Q\227\352\020m`6\201$\207\306\315\236\233\246\006\251\021\320\030f\002%\341\314\216P\247t\312\334\003\322\200\024\264\002\023\237QH\232W|\256\200A\370\251\003s)8\013:\010\266n\220\006_D\203f\001s\203\371\0000\344\021Zp\360\021\320\030s\311\263\232I\302\024\2204\253\007|\021\020\024\364\020\341\233\354\020t\002\320\007q\004K\301\r7\032lx\320\023\224g\220\014,Z\201\350\227\200\241\272\301\200_\232S\265F\351c\300\220\n\2527\257\3465\tmB\301o@\227h\031\214_\233j\021\375K\3152*h\nr\320\370c}\363\350\017\215a\303\013\206`\360Ah\005)[BI\310\203\276;C\203\337`VoT|\236\375\261\037\024\370\026sI$\004\361\033\330\204\357\241\216\3512\304#\231-|\366\204\005_\203fS7\010\007V\210\204\245\271D!\374x\2043 EH\310\261\r\324\034\233\323]!\301\247\001\202\224l86\"\002|\020P)\210\341\346\330\274\372S\177\230M\263\010\030\"\001\200N\224n\224\370\371\355\271W6\001\233U\243j\221O\301o\014\032_\203wg\330\370\033\274\331\000I8\273/8\370\016\004|\001$a\212V@\022\362\272\202\306\000\tM@\321]\241\374%\277-\334\026L\337\224\272\t\334(\006\237\001\351\223@BRtb8\032\205&\223\r\301s\242d{\210\337\302t\267l\224\035a\024rL\240\200$\022@\305\t\223\211T\020\025\324p\273\324\251\032\002\235\316\263\271\3008\344\334\024\304\237;AP\347\205\023\205:K\000\000L\023[\252\305Z\235\000\000\304Z0\327\311\202\245dg\3144\1772\000\020\312\330O\366\2562gO\347\363y\357{\257\353\353k\317\367`y\225[\371tc\370\307\256;\256\372\334\227\370<\317\264\345\347\031\247\253\357p\177e\037\263\372\327M\373\016]\327\325\257,_\341\356\323\266{\225\355\257\213z\270\373\035o\323\336\341\026\226\343\016\303\334\303\247g\271\314\353\2652,\367\227\363\\_\216\276\260\372\022\257\276\264\247>e\373\373\343\273\265\303\374=u\350\372\276?\376\366\226\277\336{\377\272\257\333q\256\353\353\276\257\260\013\357\316\316\312i\005\334\313\317\226\367\235?c\370\356<}\312]ve}:\237.f\365\276\267\372\016\237~m\261\374\332=\307\271k\n\202\301\203\340)n\307Ax\227\365p\212Y\375y\366\\\313a\257\252n\nw\223S=""\317v\345\273\016\237\252\313a\325\307g\207\331Ue\3378\354\210\021\253UL\214\330\273\310\271\350\342\"\246\244\2104\032\t#_\257\361\367\033eyl\333q\024\321Y\327N\357\235X\254SR\002\003#\252\252x\273\361\206\267\223\357\273)\261\271\005S\3011\250\201\"\246\360\236\202e)PP(L\223b6\24301\241`Q\260H11\2448&\361x\244\336I\267\033\251V+)\201\341Q\333\216t\272\221\252\216\316sd\232#\231l\364z\245R\"\030\026\265\255H\247;OQJ\212\310f\023\321h\242\327K$j\205d9\304\343\205\3326\264\256!\034.\024R\201jj@44 \237\017\364\276 \026\026\020\n\212L\006r\271>\336\263\354'\227\373\214\030\261Z\305\304xv;\317\272r\356QQ\361\220\220xZ-\034\216li!ONH\225j\254\251\031ihF\237\017\006fTU\027\227\222\222QDd\\\255:55\235\230\230\367\355\354v\234w`\260\016\tIGD\244\023\022\302\202t:P.\007JI\001\331l\240V\013\004\n\321\351>\347\371YY\371\224\224|DD>\037\021\036\032\032\017\014\214GU=))\036\233\215\224e\222\307#YXH\024\0242\225\032I\220\030s\271\021E\307\333m\254\325\306\220\220N\211\022\267[\247V\353\230\230tFF\332\3266dY\371+\346Op\323a\006?\240\206\246\233\0146\243\240\201\233\304\222t:R\232\222d2\222\211\t\311\345\"\255H\253\021\t\022\243\367\035\261\354h]Gi:ji\031\305b\243\222\222\321\310\310h\244\022\321\320\210``D\252*BQ\221\213\213\350v\023\231\230\210FFD,\226H\204HD\350\367\013\301\300\204T5\204\242!\027\227\320\355\026\232\315B\257W\210\204$\024b\201J\224\000\355v\240u\005\251*\210s\020H\305\347\373\304\361\307u?//\037\323\374\310d\237\327\35332\362I\245<:\235'\227\363\244\251\007\305\343Q\22155$\r\r\351\363\221\357K\366NrN\272\270\220))$\215F\206\204\214%J\21433c\257\307\271\212\n\014\026\307\035\327\355\274\274tXX:((2Y\307\345\352\260X\235TJ,QB\374\375D\030^Y\021QP\304ZM41\341\224\220\3712\276\357\203?\254\373\272\224\237r\362Of\277\343\206d\3037o\007\267\255\003H\304\247\246\34633\363\331\355>\353\372QQ\371\234\234|>*OM\215\307{\217\353z\316\323\263\262\3421M\217\314##K\224 ed\310\335\216\\W\322\345\"Y$k|\337\221eG\233\25533\323\361\371::\335\311\211J%\326\324\210:\235\230\313\211**""\342\311\211\370\342\374b\342\037\343>\216\344\247657\210i\016WT\276J\355\217n\014\254\202\036\002\374\361\035]w|y\031[Z\306\224\224\361\344d\234\315\306\221\244##\323\351\365:\336w\332\266\223\313uRR:6[\207F\353\274^\235V\247%\316\314\210>\237\030\307\242\353\212//\242\315&\316f.\227\030\022\302\341\275\354g\327\277\246?m\371-\026n\272\215/\250r[\334h\006:\036\262\346\033\257%\320\255Q(\246\"\212\212\347)\302`\"\211H\302\231\001\000\340\204L\357\367`>\214\372U\332Oo`\036\376\0304\261G{\205\2660\201\025\242PA\202q\310\243\031\360\232#\244\341\3611\324.\t$|\2257/\000\236\276\307>\035P\360\325\371\202\316\010\375P\000\232\243\364\021\216\376\3103\364\320\030\364\207\272\247!3\253]\036P\305\004)\302(\2609j\030\002\240i\302\323\001@:A\216B\317\314\376\250O\350\214\265\323>\023\252\203s\377\352\222\224\275\241\356\364\002\036\301\366\310\260O\026\237\"\300\355\276P\376\022U;\340(q\024[Am\322\0317\306\2770\307\300\000\365\215.a\323\301\343\2335Y\343\350\016\363\204\213?\013\300\351\005ui\242\021pf\320l\246Xp\002\364\341\330\265\232\003\035\3174\323\334*\321\346\034&\333\327\033u\251\226\231ys\000\223\320\307\357\325\013~&_\351\306`\222\347\217 [\240\206\351\217\231\323J\325\004jSj\026\354\335\264;\202\r\241c\300OkO3\030\375R\nb6\344\201\016\374\226s6\360\370/n\343\261\021\221A\037\370\304\032\030B\014\213\n\373\201\000\004\244\r\264\260\202\"\300O\305\300\231\344\240\023\250\320\351\245N\031\027\374\212\3217q\013\302\216\337Q\361=>\206\311&\004\302\177P7\360\014\017t0p\241B\3751\347\361=\306\241\204\r\010\010\276\210s\303j\r\016#\010\203\317i\r\2724\226l\320 \210\216\317k\013u\307\002m\002z\023\334\366\314\354\036\006\024}\3021tuj{\202\305\347\225\354\214\372%@\310i_\211~\205@\242\014\332,\241lvwH\206\332A\313\201\017\263\200\273\245\246\240W\tL\366\014}AO\000\212\322zV/\240\370\004\030\324!\032\304\233?3\212\216\225\202\234 \314\003\016v\\\177\352\225\307\260t\303\271\201\241I!\330\351\214\324\316\005\346!_ \372\244\023\374\316\260_(N\223\314\352\220\003\032\211\250\232""\037/v\354g]\276K\210\037\344\3351\366\204\026\226\337\336\3002\374\230\272\303t\003\013\266u\007\035\210\317\273\371\375b\237r\036\376\210-\301\246\"h2BohmZ\026\276\006~Sa#\202\302/\201P\363\233\034\376\003\033B\215\366a6\253\n\237&D\007\n\345/\261hu\236aXy\300\217iN\205\036%;T\233\350\007\243\r\322B\273f6i\343j\216\213\037\362\0149\366\007\332c\346\330\027\352\001\003f\016o\346\234z\225\322\013F\034\r\204(\375R\236\260\351\005/\310\373C\035\323\014:\320\243\331\000\220\323C\3311S\3352\005\234P\360G_B)$L\325R)\320\203\372\000\006\217\016\r\360\230X\0170>\357\006\341\320\265\371\342\303n\2153\033\213\007\237\301\320C`\306\340\003f\334\257z\254q4\007\372\314\001'x\315!\376\232C\374!\217\t3\252\004\233\005#\334\245\033D\355\200\300'P\233J\277D*K\367\204z\206S\033\030^\374\213\321\037\005Al|\213\332\004\302\266@\241\202\243\233\303.\331 \350\223\371b\254\375~--\263\231HC#\313\342\373r|\376\373\367\277\351Ok?\276Q\335\3106\037\233\025[\356\347T?\266\260YP\301\016\020~\253N@\217\303\016!Hq\310o|6%\251{\274)\340p\242\225\025\221\210\210H\245\232\231\t\305qh\267\343<\244\242\022\212\305B%%\241\221\021\220i\202F@\240\224\252~8'A\202\307\363\270\\++\344\355F\232\346\310\210\367\2469\312d\343\353\325\2668\234\214\214\270\256--%%\242\210\210\270Z\241\037=\377\311\362Yd_\306\341\247\335\366\325\036>+\013K\232\222\220\310\310\364N\243\235gge\205ee2\232\230\037C\373\264\017\337\"\270\241\301O\351\014\3320\005\345\243\314\276\216\0075\202\034\324O\357\037\027\227O\255\366\211\305>&&8\\\255F\366z00$\212\302\260Nw\236\262\334\201\201\351\250\252\213KG\204\010\221\004\t\036O\0341Bda1\315\237\374\345\335\337\335\376\315\374\262\001\007A\333\235\263O\t\376H\303\271\330\353\341p\2428\302\361\356wY\337\302\206\005\243\3649C\336\315\347f%\230\263\270Q)\263\231\214L\232\266\264|PP>\263\331\210\021\236\226\226\331\214\234\231\211c\322u\311\227\027\262V#c1\322\304\204\024\021!E\210\300\341T\036oda\031QP\306T\252C\202\004\212\246\206f\355\213\334$\260\351\010\226\202\346}\001\004\003\275^6""\333\207Fk\265~?O\034\257\220**\255\326l\230\272\271\331D\010fH\355Si\310\321q[\303\206\000\303,,\237\224\024O\211\022\036\031\031\217\317\347\201\341\336]\\h4\030&u:\322f#g3\022\006\333\355\306u\345<\026\033\031\031U\252\016\rM\207\r\212\247\250\344\215\315C\225\036uJ\315\314H\002\000\000\323r\0200&\220Hd\303\351$\367\001D\346\324\211g%\232\214\303(\230b\316(\201\001\004 \200\000\000\002\200\t\000\002\002\000\000\177\224\240\032\235\205\026\024c\311\3139\201TW\327\275(Anq\177\243\321\0308\347\372\014M\312B{\026\201\325\344\003)\003\004^v\322\200\27199\246\013>E\302[u\335f\271\366\200l\276\024o\005\262\356\250#,&QM_f\374j@^6\005wFr\335,\321\336\324\355\306*m\365\260\310\251,\237\036&\210\353u\256 8v\303\023%\311\250L\235\215\260\266Qq\226gA\342\251\016\347\330\367{\244\032\240\3033\346K\006\252*\312\013\325\377{\rL'P\307\315\220\020\331}w\320\n\212\254\272\372\200V\242m\223\3548e-g\320\262\357{Ue\275!K'\r\210OH\324k\333`\272mc)\3620z\0247\3678\305\351\026\203\302\026\370\\'\314s\210\t\332\257\177\3425\035Gr*\312X?\016\001\221\236\315\220\017\000\252\341\366\323\033r\245\340C\254\214\275*\022\301\347\263\351\240\014\313]\300\032z\220\357\324M\031)O\027\034\032+\340\010\007\005\372\210\3523\2516g\253\020\360\\\213i\033\373\0238\331m_\223=\314\310\030\371\264C\253^\321\352*e\327\321p\330\257RH{\036\377&\320\357\304\tM\241\226\263C\\\323\315\325jr\355/\271@\255\376\325?'\306\350\037f\207p\245\031x\275\226\010\377\n8\325X0l\263,F\216\307\311\256o\010\362RL\303\320F>\230x\023%\306\003\327\217\201U8\364\305\364WK\220r1\352\240J\206\261\337\236\016\"\265~\214\\\322\305\323\344A\241\321O\313\332\315B'\255\321\303T\255\036\311r\000\\f%+\003\314O5\307\205\260fs\326!.?\216\2034Z3\214 ~W\314\232\000\206ed\253SX\307\037\306~EY41\036\253(\322y\234\300d\314\326\215P\322FR2\362\261\345%\353BPW\237x\\o\246\366\347\225}\004PF\271\017\345n\344\360\312C\206r\016.\331\006H@t\215\022\004g\246\316\010,\325\022\366\202\340$\360A\346\265,Z\303e\006\354\240\017}\3556\253\\\276\016\320\321G""\226Z\205t\375\275\370\357\3125k\241\255|uS\333\366\037\303\316\215\313\272\350\243\034\214\031M\322\001\256\345\310J\217\301\340\002\306\227\0047\203\025\231\t&U\252i%\350\216\274*\024\032\212\343{\244\001\370\337U\253\333\342a\036\341\002p\213\225\225\205\300\371\353\276\307.O\332\006\214v\232\255\265W\215\337\272\177@\236\277,t\232\211\n\232\376Y\232O\212\207|U\253\326\370\036\354\010v\373$w\002\204\t\373L\026\"f/0\224,\t\343c+U\001\261\374o\215\312\215\2245\226K\277\031j\204\206\037\222\370\252\217\355\333?\251j\177\361\005\267\304\200\254\244\r,\244(\332cf\2667\316\213\364\346\242\315\026i4\300n\261\357\216\322T\230S\023P\223\017r\253\234\303-h\014\006J\312\232]v]\200\252\242\ro\024\246\237\030Qs\305>\000\024o\275m\271\242\337\354\230\336\360\346o7\n\331y\225\213X\355\\\377T\326\212\262\255\271gX\006&\250\243\210\324\030\266\366\301j'V$\241+\370q=6\244\216\024^\270\225w\303\375.\375\253}F\340U\r*\260\000\n\360v\305\261\34552# x\354(FI\023\241\036W\3649\361\226\304\032\332\255j\300j\334\204\362o\250\023e\310\032\032\326R\024/\216\324\363\307\250a\357j\2657\316W\000\204\"\005\221\312\35149\226\367\343f,%fOS\343\2667\021\273H3\240\320\261'\265h\007\375\324\rS\352x\332TsJ\336D\345\t\242\266P\03656\264\357\331\352c\277|\342\031`@\350\351\303:]\221xS3<\376\270\027\276>\247\310\306\211\271\376\005\211e\204<\352\r\277Y\230\256\320\377p5\203\277Cl\215\251\317!)b\223\220n\024$<\226\250..\261T\304\261\221\177v\301\002n\031D\325cp\t\245\217(\324\342\n\310\"\240\234\300!<\321\211\365\336Iq\2752h\361\202\216\310s\247a\005 V\263\311\223\201\240\376W\222\223\334\034\002vG\342\222]\371u\360\223,\032\273\245\033\222p\327\3025\0239j\356.\355\307\341iv\374xr\307\325C\303\203\221d\271JcMj/'o\342\237\361\300mhZ\005\362Y\235\224eD\000\320@\260\377\r\343\3410y}\373I\004d\255\035\007f\004Ki\267\372\203Q\373\355\276\256\177Rv<\304\360\370\262>\256\270v\223\206g\323\265[P\024\027\313\336\035e\346\022\230\337\256-M)\303'P\367\370\2406\250l\252\334\032\246\005\336JXV1\364/*\007\323\3249\254U\376j:\\\333\365\264HI\234\3146\223X\300\254Y\222>\276\221Y\210\223\303\311\313&#s\220\264N\203.&\013O\207\240\245\361n9;nM\304\250\344\217\1772\346\323\024\034.\266\205\301kTZ\204>\344=i\222S\312$X{\224R\0054\"\240\237T\310$\302\314\nb*\317\350X\224\351*\225\324M\223\205O\322\333V\201\024\204xF$C]wQ\275\010\021.\226\234\246\014\252\331\351\224\230RM\206\250\246\006\231\345\342\337\361:\247z\367\005iu\245\no\301!\3311\325\212\2721L#\201\254\331\314\220E\267\035\334\370\235\026u\365\3353\004\266\354\302\337\315|Om\2313T\233\254\261\253\005\205E\230\226\3602S\257T\005\"\r=x\233Qh\nIr\302N\337\277\267\r\203VY\004\022\314\002=\023\320\3769\306\006\221\377\245\206\357l\257I\0320m\014G\266\312\202a~\220}!ap\363/\323\"\247\266\362A\333LO\213\302Z\333\036z^\266\276\030\321\323\340\255\273\241\325<\263Y\252\034\335\327`iq\273\177p\004\032\226\2009\370\224CI^y\275E\315\333\376\021\205\355\226\332\001\250\253\357\035\314\250]\013t\317\010\371\353@\26291\204\303\033a[,\275< \375\001\311\366\201^>\367\024\257%)\225l\362\353h\177{\300\370\007\230o\252(\0134\002$\335\201\250\004\264_M\006\305\0028tH\237\330\213\263\302\247s{\205a\327\375F\272\207\220`/\020\211\334_k`_\225\3218\355\342\2109\350B\352\317M\"~\207u\232J'\372\240\014\006_N\177`\235i`,\210;\356\017m\020\314\322+\271\351\003\243\377\260\217\375le%\030\315co\250\357\034NZ\353\030\252c\303\245\025+\325\325\342\361\004\317\253\305OQ +\374\371\377\363\275]`\013\225\272\027o\217i\276\3749p\227\254 \236\242\005>\317\366E_l\360\261\261#\353\221-s\304\360\022({\377&\304\331""\204~\273\277*\350z\024|\3567\0351e\304\205\230\274\260S\334\2463\005\230\261\263z\230\014\336\316\251\304\200\244\271\221S\036R>\352\006\327\014\375n\013O\257K\206\210\266\373e\030\316#'\231\2526\334W *\232\207v\325\310z\267\305\013\2128\200\027e\017\275\276\022\2538\340\260E\261\233\352\211M\361\312\213\016\306\030\266\223\261$\316\275\2754\024\035\216\315\024\312\254^X\013w\332\236\322\336\221\213\256\305\277\224\014\202o}\000\276(\206\272\324P\304\037\241\353W.\302e\275l\214\224M\214\373\300m9\245\370\233\360\021N\356\337\316K6E\354O\240\325\305\207\363\215\216\370`\247\351\216m\023\020\371u3\210\204\241\375g\274\351\357J\304t\262\023\315\323\023'\374>\355^\3029X\017\357\302\264h\263\372\217\346^\335\320\321Vt\374JJ\346o\224\245E\274\236\304\362\340\217\t\356\013P\3504\013H\252\200\"c\206X\201\251P\036\301Q>\370\031>\347\357\004aAT>x\210\367\333\275F\203i\"\255\177\334\032UG\355\256\333\235x\372f\277 \003\031\207\034U\237:\216\300*\350_o\021\255\002\002*C\264\254?\374\002\260\017 G\250X\332\223\211,\022\225L\241\212sx<\\\322\376\203/4\324Et\365x\261\032\020\267\344\340\366\365\233F8\240\373\244\201\202\034;&\214\224\014E8LC\254\374\207\r~\357\343\237\211\377\332zQ\035\"\215\277T\361\006\241\341\310\021\335V\212\346\257\206\307#F\013\272\374 \n*\021\t\214\337\301\266\037G\257l\271\275\203\346\277\020\037\215a\261\201\251Od\202A=\006\222jo\021\016H\257\253`\240\302ix\327\375\366,T+\361\317K\266\225m\230\217t\235@\216\311\010\023F""\014bo.4\210\244M\330\203\233G^\247`A;\010\242>8\355\265\325\010{\372\002\217d\202\217\177\\\307j\351\250\321I\177\023\303\247\032\2768\\m\253\334e\217:`\202}\251|.E(\253\\\027\324\257zJ\2428\227\t:>\301\317\205r#!D\227\247^,\206\021\377!A;\020\026\365\000\206'\362\364\312\0200R\234/\216\330={S\271\373f\212h\356\032\333^\203L\233Q\362(\254\316\212sC\244\r[\255\351\324\tr\002\342V\030\270\266.0\2143\320\357\336v\226\232Ib\002m\336$3u\273q\242\370c#\204f\n\271\277\353,xm\256\310\021\213\001*iB\244\237\353#\024\241\347\350\3117\2522\263t\357\232\024\016)\3356G\304\177\334m\230zA,SE\276\233^\272\220C\352\314I\266\327AI\2312\376\207v\234!W!:2C \034\016G\014\350\363\340'\326\310j\276\021Q\211\r\010\266l\364O\230@\337\313\225\370\362\221<\332\210\216\372\002\364f\351\300\373\235e\024\375\245 \341\003\223\357\242\213&\367T_\237S\346\271\253\234\034H46&|w\214:\3145\321\316=%\205\262o3\204\220\256\332\023\334\305\222@\332<\017'\263\252\272Tce\250\266Fe<\265\270DW\206\263\030X\037\214\373\365\241\213\257\317\306.t\333\255\252\346K\350\027~\252\201\210c\241<\342\3544\315\237.\242\230\366R\310\243)h\t\242\312!J\374yA\014]\323\177\334\017\355\302\250h|\000\352\363\263\206\003\236\336'\232\236\376\tJ\007\276\024P\177\213q!ZS\367\023\364\001:\245\233\227F\245\372*\326t\020p\321\301`\"\007F\2146=(\036bhAt\030!\275\334\264E\351hZ\253[xG\331P\333\301\350\316\310\342F\206\010B\306\027\366d\263O\003c\026?B*\243h\n\004\300r/X\334#\206\204P7]\222\003I\317\177\274\316\204\336\204\345`\320<\332MrJ \004\243\302\007\241b_\221\225\333\224\364\346\033*\322\337E+do\360\024b\014\323\263\224\025\306\334^\006(%\306\206\353\004M\034(\370\177\243\360I$,\300\010\231tD\265S:@\2779e\256\344\273\3176T\222p\3125\265\005\221\206&\350\371\361u\031Q*\t\311X\013\001\360>j\342EH\026\224\325\345\343pB\264n\306XU\\F\355\241s\003\311qXW#\31635+{\272\367Us\023i\252S\271\365=\363((\264\261n\373\n\037\215\223\346U\006o\360Ok\016\0073R\322\307\007\035\021\210E9O\373Q\234}\017\276;\356\301\"\004\350\")\\0\020\307H""\222\351\325\252\320B\242\177U/\177r=\177\201\203\376\017#\276\374\2261\004\327f\254\212W\300\346\245\0141\251\362.\221\277\226\330TK\006\353\250\006\225{\377L\366,\201\326\021\234x\227e\010b\263\247\240\035T\257\243\335\r^T\361]#\300\2151\000\304L'vg\274\377\335\374\002\251m3\005|\225DQX\255'kUd)\210\270\307\215Z7\214r\316\022h\335\272\310\332 \365\267\300\352\320\000\364\342\026o*O\225\227\306\2121Y\263\205\240Z@\0046Zw[\017@\207Q\362Md\021\250q\033uJ6\343mW\323|\\\005\02606V\360\233\375\004\277.w &\2217\323\242\224N\312\257\322{x\326\223\366\367\353\031\216B\311!U\253\340\354\343\177\010\230\216\233w2\027\202yo\243b\314!\005\372\232\233\374\\\230\224ii\234IIy\314\260]\242-bC\345\034\355\224\264\006S\326H\244\212\031[\210\330\340v\367|\332m[Q\273\360[\271\341\362}P\010\363\323\261\260t\024V\245\246\305\2070\302t\371<\253'\311\375\0307\232.\362\213\267K\346e\206\345\270\263\245pB\3533`#v\223;\t\214\020'II\237\202\001\337\033\271\00776\r\336\374H\314\000\337\221\373\365&\305\320\223\261%zV\334J\343\3112\237\"\363\217\206\375A\363P\367\\[\345\362_\354'\316\203\345k\\\000\010L\347\206X\312I\316\177T+\2728\372\370\240\177\354\320B\272\243<\342\2573\223Rf\302g\337\335\365\203~dM5.\355X\223\324D\007\272\037\231\225\224\005\240\352qf/\344\027T\347\253l\262\004\036\333\317\266l\202\027\353T\341\2415\270\254\353\323\364\007/-4>\346Q\225\314\225\357\201\005C@Q\335\353!\275z\366\222K\271\340\345\205\006%\030\335q\020\005\351\262\261v\214\244\272\274\t\0355G\364\364\177\223\356\2001\tw\021/p\022t\267KY\376\243/)$q\007~\177v\355_X\027\361iQ\\\r\364\310\3079\025\270\343[G7w\3011E\004\336|\017!\303d\211\263\276\266\313\224\315\014\272\326\334\005\331C\347\331\022\346!2\342\205\225\020\023\224Jh\006V\234\232K\355\310\001\001s\"\3465\362\010|MK_K@&\312\212\213\310\020\306\032;Sq\336\334\227\313\373\237\351 \001\360\\a\267\201\257h9a\337o\350\033\007Y\330\371\276\345$Q\\:\177\257\371-\340\211\343\256LM\312]jE\261\034\037\010\001\245\007\251Oa\0272\270\340\n\220\tgbp\\\255\366wwT""\244\017\303\205\211\020\350\270Z\"\203\265y\276\360=$\003-bt\021U\223(!\006ZF\217\236;CQ\356\266h\206\373\371s\274\266=e\265A\307@\0043\307\201\241@\331\364?\223u\253l\300$\273A\316\270\023O\2117\001\260_\254e\240\253=S\177\032\037\220\333p\241.}\242\024D\321E\270\2214\331\230\363\245\004\223\207\240\332SIR\010\336\316\233\037h\212\267K\005.\036\206}\345\3569Qz(\213\"#\\\376g\237\224\0002\250\214M\006\356_s\243OSg{\351\307\211\264\224\017\236\010%\343X\267\227\274,^Kzn\214\234\020\000T49\364\000k\2534\203\350\307Z\"\307\375\263l\341\204\316\375\276$p?\377|:\203\004\335Q!\251t\204\332\341\350\314\265jF\340b\351\315\035D\305I:](\371\365\306\345\3464\214V\304\230\022\204\275p\016R\n,\016\261\317Vy\254\254\356\376\355\177\030\373 R\023\3733\031\327P\016\027p\010\203\345\32230\021\330\250\340\221m\031G_\026\313\020\250 \312\343\310\211\376\256\274z}\213\340\215\036\332O\332\2362\212`\262\253\304\325F\200\031\330\374\210M){{#\217\016\320\022\017\335\366)\373\275#\232Wl\341\203\361|\026\004\265\210\031\204\325\32407\226\236\244\217\334K\230\361\234\324\265\223\332z\205\r:\375\034\255&\300\013a\252\317\360\036a\361\337\272\003\207:\271gD\3717n%\\\211.u}\214X\372\275\300\240\257\321}I@\350q\315\247\352p[\001\306\372q\357+;x9z\201\314\321S%\241\036\031\2512\010\344\336\336\224\031W\302\252\331*A\243\237%\224\317\335,\236\033\007\330\365\300\037\251n l\n\035\242c\314\026f\245\030\306\360i\224\204\006\221\023\230>\3100\375\204\227\010\374\200\357\372\310\336}M\205\307r!\245=?4\006\254qZ\"\300\000J\317b\352dP\340\206\343k\016\215L\300\257T\264\217\036\234S\221\272`\034\177\357\361k\036\375\236\211\205\267\036\227I\367C\214\235\036\225*\217\206\036\330\256\302~-\016%_\002\351\322!P\361W\356\355\323\232\231=\313}$\336\226\305\322d\275\340\204h=x\203d\210\301\236\230\233\205l\003R\003r\266\032\251L\366\341OX\001W\361\351\230?]9\333 \244\3003\377j\304\376\3527\277Q\024\277k\212\025K%\264\270z\nQ\347\317\301\341\370\007\232Fh)\213S\235\364J\373\326$8FCXm\241\330*\031\310\234-\230\356\376\004k>\220\025\275\017\342\212\234\273\233\313\366\300t\232BQ\374[<\036o1t\332ZA\220\236_\221|\007\202\030\250\373\0012\320*M\357!$'n\252\224\273\311\274\331U\274\226UU\306\264\345\200\032\377u\262\\\307\300\360\235)i\304\345\210u\275\330IB\261\307\200\211\272\377\n\346\261&;\230\340@\307R\333\250\300\034\311\016\235\364\224\370\277\272\357-\365\354\356\244\325\356\355\374/&\237\237Pb\206\206#$\022Mc\017G\205\304\335\027$\303\013\242\213]\t\220\360\037Co\3503\271\230\331$\304NT\242hE\2044\3201\264\244\334\264SP\006n\224\320o\217m\017\303\325yr\253u\016jR\244\310-\037\002\320\227\217\211g\014\277\265\r\370uBQ\001\312\362\350\007b\252\332\312W\206Y\031_\003y\273\016\303\365\214\337\304FC}\310X\261\352yf4\010\331\364\255\354b#\010\224h'\211\252\230\227s{\206\242\302\227>6\006\310M\354\277s\023e\005\204Pcv\344\221\377\255\372\022\215im\200\361\037\342\314:hf#\341\222\022\224s\244qM)""\026s\256\325\207\244\264\205\306\354=6?m\324\263\312n\327\375\223\352\255\300\007\302Ee\334\010\202|\226%2\023KA>\242k\222|\335\263\357\272_g\356\316\363\262\373\212#\277\210$\3412\376\313E\315\237\325\216\331\301;\025\024\274\262\317]\363\271=\224\230\226\275\311*\337\023$\260\344\322Q2\313\253\207\352\177\262'\252m\353\256y\265k\304,P/\035\325O\273;\330\037"; + PyObject *data = __Pyx_DecompressString(cstring, 9862, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (9978 bytes) */ +const char* const cstring = "BZh91AY&SY\034\333\354U\000\024z\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`*_{\347\311\340\034\366\000\350\003\247_m\257n\232\371\n\365\255\230>}\235\007\273\333kN\201^I\003\352\225\307\336\000q\2719\367\237w\273\241\316\207\333\025\337}\203\320\367\307\334=\337s\353\311\263v\335<]\367\273\276\373p\362\354d\236\275\353\276\363#\255\355\335\363\005}mf\220\n\001v}=\364\001@\000BI\020\220$\360\2234\236\215\023i\246\247\2463F\002\020\322i\243L\023F\023M\031\t'\232`\202O\001OB\017\r)\275H\022I\000d\322i\243FMSL\322\247\211\351\244zL\325=\251<\232\2324\365\0324i\206\232\201\240h\320dh\0000\200\320d\002H\004DCSEG\244\036\246\230\230\312m#M3\322&\233I\350i\251\352h\310\006\215=F\201\240\000\r\003@\001\243\324\022jB!\00214\246\364j\236\243\323Q\345\036\220\031\326\006\246\312\373MpkWZ\301\025T\326\213\207&^Gw\235\2643U\0316U>\014\302\032M\324\241\177\367\270\336\342\027\207\372\373\207\223\313\342\223}i\361w\376j\303\347\350\364\273\337V\266\261\255S\177\354\271\243\366\267~\357\274\013\224N\237M\374\237\316\221?L\257\325\375\272\211\324\314\340\353\353\353\246RS$\315\353dj\365\323\260voO\353\263_k\300;}\316\357\036w\274\254\244\250\311\277\337?\3125MS\3369\026\221\331\323\367\374SO4\323Md\314D\213<\313$VE \022\030v\203\375e{\240#T\201f\207\302\3030\226\307\223}x!\200V\347\210\301\177\000``\2308\216v\036\022=\014\315O\363V\227\216\353\346\232\376\316s\003\331\271\340\275\357\213\352\314\324z\377/\325\260\225F\252e\220\2364\3021\370*\261\251\226\275>\315\207\326\233\335\262\252l\236\302-_\031\274\325\306\266\321\366x\212o\257\250\353\333\253\377\357\267]\373~\033\315\335\315\327w\225\342\271\256\237\253\303\341\217'&[0\242\211\310O\006\220\224k&\257\376\336Y,\364F\312\355\237\324\3021\352\365{\307'_\252\355\340\254f\307^\335\017\037hr+\240\267g\013\340z\346H\322\335o\201a\213\230,3\351\301\301\276\212(y\214\032a\306x\034\371\014Sw\311\304\344NOk\271bJ\005}\232Dh\251\233\206w\221!\366:\0240c%,\274\376*vy;\277\217\267\223\255\326\201\374\235\035\305\372U\240^S\n\213\355yl\317\313\017/B\326\026'\327f\242'\030t0z\305\001u:0\322\375\016\265ZKb\254+B\257V\237\331\322\363%\367 Ak\367\370\342k\264R\371\232\265~\333 \207\233\313\350\336\005\236DV\025\353\200\314l\261^\335\256n\354\0273,\002\027k\313&\342\375\374\215\026\324/\217\004VKOO71\3746\357\300\232\255*\357\036\343\255{\344\322W\343\034F\337(\355g\236r\334\\,\361B\337\263he|\224\036\245A\362\013 q\2724\021\313/\342\033\016\325\025z}y\016\301\366+j\334\203-\243\006\216\205\025\276\212\024U(\241EQ6\355v|\274\030\261W-fK*M=\210U\361Bth.\201v9B\213\001(\n\032m\021 \234\244D\232\224\244\322\302gYql6\375-i8\345\363\351\345\345\311\247F\215\0353\243\206\007Z\347+\223F%\234\274\\\232\217r\235\3027\224\374\032_\324\362d\021\330\355M \314\211d\226D\260H&\024\341\332\302\315\026\350\014\347\314\2048X\013\021$\245\2269\314\210f\276\351\267\305X\351\212\247\310v\300j\310{\232\032^\331\2461\211\354{\023\0347y8o\321LJ_\025\357T.\223\220{\365\027\033~/\357\360\231\304DE\020\211\2546\357\267\273\235\250+\n\216\233\334?\306\311\265p""\031Q\327+\034TUqV\177\325\361:et\364\234\236$\365)o\366<\275U\233\312}\032\352\324O<\000\230\240\201D4}8v\352*UU\252\372\374\373Ki\244\244G\243\032'5\010\333\315\023\322s\006U\374\0172}\246\016\256\276\335\301p\362\213\267z\003\3126VihzI\323=\346\330ux.3~\312\364\277\212R\243\304s\014\217\350\206:c\006\330q\016VVo\355\177\324\376\"X)\226\nl\0260F\301m\335\317_'\315\335\366\277\374)?\005_d\306\307\347\354\367g\226\216Vr\3125&\024\"\200\251*\024\251n\231H\242\226QM\254a\275^\367\266/f\362\306*\202\316,\031\273\276\343\276\357\240o\200\236A\263\377_\017\343\371$\276\207\243\352\351\315\301\336\222^\227|\350tr3~\023\034dc\241\261\330>pc4c\274}\014f\037\350|\313$\014?\230Gv\017{8\362K\216$\353?w\331\226s\212\253r\210\212\245Qp\231\031^\330\252\305\355\202\374\316\2273\2318z\335-\356\213'\0048\n#\301\010Y\316h_\005\227\371\360b\345\347\\\324\224<\330\316\207\223\312e6L\347>\215\016\222\232\t\312\306\227\025\367Mg\245\324\352\025\305\\\367|FH\306H\307`c\2607\007K\355\244-}5\335\016C\240\376\320O\213\332S\267\333\025\372(\337%l\265lG\240\n6i\344\373\201N\375kX-a\257^c\223\256\017\001\371\337\235\247\260\217\217\257\213\006\236\"\364\022}\030\272q\241\215\344\2365\214K\031\217\031\353_\212K\366\260\261\023r1\220\301\2107'\nK\335\352yF\323v'62I!\366\275\234\362\311%\224\312.3\327\177\326\370\332Y\022m\255\331\010\334\3673(\327\255uv5r\346\312x\032\324\232\016\025\250P\337\013;O\2177\217'\361|\233\245x\351\351\254m\362r={c\331\312\272h\247)\227\006\266q\345\210y^\266j;\200\345,\226N\237\374\002sU\026\355\302\006\026\321\t[I\256D\355\263h\365j\021\265\243\300\361\342=\307\273\350,\"\350]\213\254\346\031tg@\313\203\375^\357K\361\\\275\0358\r\371\326\036\262\332\276\231xy\330_\006+\353Z\203\3163H\361=8n>.\374\001>`\243\177\231s7\211n\307\274g\t\3101\343\201\214\214\000\325\r\313N\357\222\314\027\270&\231\307F\255W\320\336=\367\205\353\251\360\373?\363\255\333\3006\003F\3045\221=\217[5\030\276'\327g\351>?T\370\364y\250\227`\312\275q\311\243\301\376(\234\347\036\356\236a\243\316""\376\223\273c\264\350\217\224\322\3265\357#\337[\317\021w\273\2067O\253\177WSS\362\257\212\335\334\341\014\321|M\323;\325\307L{\366_\217~z\237r~\027\303s\336\r\261\255\207t\033Fv\017k^\245\311\177\257\374LR2g\344\311\243M5:H\371\212wl\362\376\033\027=5n\373\300^\324\225\313\245\2147\347\375RZS\322\3234\3024\241\267\241\350gX\374\261$y\231\007\342|\177\211\353\371\376\007\301\251!\320\310\224Y)y\306\260\265JX\230\214\253\307\nwY.\023\023\002\206f\272\206\203\035\331\225!:`\266\262\256\212\245\023\252\034C\225T\332\025\356\204@_\006_\210/\214\030;\357\313\313\307\313\214\371\246b\325\357\003\3428\353f\2373\262\333_\006C\326\371{\201\310\346\211\t\205u\376\016L\332>\374\304c\003:4(\036x\3203@\333\320\373\270;\003N#9\331}|\017 \3738\363e\2605\\O\302r\037dY\320\222.0\243A\332\354N\206Uk\321D\212\374\035\021\022`HS)\213|\245\233<\035\325l[<\307\307\362g5\217S\324\317h\321\255\017\301\373_\207\237_R\333\3551h\354\330\243lK\005\231\330v\352\r\201^\276\334\361\250\377\n\315b\327\252\205\203\357\232\322\355\303\204x\256\223\250\326\327X\025\326\007\016\375\272\004w\354\014A\003\020C\025#\225\234\243\311\366;\371!j\344\001\372\272r\373\375\370\3263\334\006I\334\014G\255\302\306\231\214fq\014\343LLHm\302m\227l`)\204\014v\r\243\033XZKa\34438\375\235]9\356\251KF\177\016\376|Nq\247\222\302\224\372i\224H\207!\215\321\214\027\037\036\225\316yOV\235\277\026E\2453H\3151\032Z9\320\315\2039\307\337\247\241\363o\370R+F.\301bZ\220\264\211j@\264%\244\305\230n\214\2446F\320\330\201\341\364\330\013\240\305pN\343.\r\\M\\\202:\272\362>\362\252&\031\377\353\332\216~+s\005\273\014\301\203\303\350\027\0255 \240x\256>t@\314\322\022\300\320\314D&\036]$C*rre\372\364k_;\255\374\371\334mH\210\205\027\305\376\354\213\2648\205\351\367o\206\350i\261\230Px\307\345\266\330\322r\221\314A\267~\367\356\316\304>\233\321\033\002\374<{\272S\233;\222\033A\013T5\270Q\303Q#wEkG\323\261\301\245\251\342<\223\032\312\361\342\271\334\301\227\345\276zio\266/\222K\235j\344'\247S\305\273\215Gq\230*\0206\374ro\206*\020\277%\273\347\302\337k\217\2448;bI\331\302T\007L~X\332\177(\272\025\003\345\367D\356[\274\344\362O&l\367O\272\347\216[M>5\335\234d\202\337n\372f\341\221E\3745[\252)\266p|;\362u\264u\241\3654u!\242hd\306.\2615\336\232)C\245\257\024\3746\207\n\302\030\007\221D\006E}\306\034\364\350\001}\350\035\022\222\314R$F\272;\242n|\022\330\335!\346C\026\220c)\215\307\t$\276\243\206X*\244\303\334\350K\344T\361V3\341\377\212\214&\310\023zwr\221I\273s8\266s&\004\343\223Z\230\222\365!\216:\347\373\356\024\347\211\014\255y\215\256i\323\215\254U'%\262}\272]\266\334\352\2522\360ZR+\257\345\266m.\36010\2751\224\313I\026\340ixA\246\235d\233fyM\3170\344CQ\304\"\213 ,\231\362u\212#)\301\030J\214un\226\013\241RH\037\355\221dY\nC$=\351\276\353\000\364C\310\237\267\263\370\307\315\371\247\305\366\002\024%!)Q\355\"\236\356\342\234\024\373\177\2356\326\325:U\214\326C\353'\006r\231\241\213}5\023\200\324\367.\235\014QV\206&\214\240j\032\206\241\250i\233_\027\245\315\370\3035 \312\316\313\212\004\022\032}\025fi#\336z$P\202T!\026\276d?)\211Wd\254\202\333\262~\321\0131\251f\353\377\225\354h\311\245\232Fi\036\226h\031\241^\303\315{\213\0015\nS\023\302G0\324\332\240Q\245T/\250l\351[[|VI\272\021\274\003e\024\261\275\207-J\023ps\250\353\352\020|\314\3435GF\367\210\367s\017\341\221\021\337-&\233G\037\265\246\360\302CLt\241t526\266\214j\371W\327\005\210\033u\016Ce\303\0068I\204\016^r\302,\332\263JKm\251\210Z\215K\234\347\351\243\027&M\021\334\260\344\020\345\220\347\035\034""\260\331\231e\025\2420\022\205\032\022\032l\214cP\234\022\200-\250\304\363b\273\215+\000V\362\206\241\245\256\253z\353\260\251%\311\025\242\333\006\275\340\026-\312\262\2736\354\237n\215%B\201\210.\t\201M\206\324G\243\201\360\245D\230\223C\253\271jF\245\326kS\224\211k\357\003\274\375ly4\213h\230\216\261\017\255\207(0\345\007\312\367xtY\327-}\022\323=\362\371\037-\215V6X\256yW\222i\221\361\246\245\360\\p@\243i\223\333\333&M\263aZgb\210a9?\002\014\232b\230\0234N\333\211nc\230\037J\361\372\244\217Ug\231\230\031*\252\252\252\252\252\256\223`\240\305i&22}\274\004;\035x\201M\357\236\272O\364\300\030;\230\371>\t!\317[\203\013\363\272(\\7'gK\226\006L\314wO\177l\255j\231}$1\330T@\336\310\225\311\307\301\371\220\333\373`\"\374\310\201r\243\311\2047\341\265k]\367\272\250\264\267\215\234.\251(\200\252\203\267\255\344X\214_\023:P\347\217M\231GW\367V\220q_\014\360\343\324\024\314\315T\357)\310\320P\243P\222\324\262Sa\256i\021;B\311\251\251\022\333c\274\364\255\202\013\2022.j\220]\236f\243\016\214r-\326\002\253Z\333;\265s*\311\206i\362\321r\241\255!0\321Qmv\304\337,@\331n\266\236b%\336\245f%\230g\217\000\tb\342^\264\357\353!\354/\313\346\222\372\271]2\021\251\263\203\255s\014hf\023(\025AmU4\252gen\020\261\272\317~[M\2635rr\247Mr\235\023cx\242\267\235\026\241Ab\242@Po\307\021\336\203\232\210g\330\014\307'_\200$3\036.\340\342\035\220g|5)[\211\010\234\314\014\"lI\323\002\261n\335\271\273TE\333\204\357\341\364\344\035O\216\030Y\2405\030\277c\035\033\214\224\201,\241*\226LL\341Y\023YaY\025\227+*o\310\362\230\361\330\361\331\306\325Oo\301\003>\001T\332\265!\275\313\243\005\234Z\231\235S\205\250\215\214\2110\210\236\272jh^%K\226u\026\332\330\306\373\241\026\002F\363\200\030Z\240\024\\\235=\035V\225\207\3164n[\226\343j\361\222\345>\217G\346\365\240\3449\306\216t3\234g0\371\2376T%\265\243[\325\266y\347\230T\276\255\245\026k\3253M\020J!\351\023\263d[B\322\226\226\"\221\321@\021\250d\252n!\266\263\006\221gH\323\244#>\313\346q\201\234\007\235\235\003\014\341\333\215\2665EA7\331\nJW\225n\036""\014L1!\021.!\315\310'\356\030%6\337h\251JM\341\302\257\230xK\303\013\300\305xM^L\3265|\032\326\231\3263\250\303u\3363\306\310;\274\322\314\250B\246\224\275j\225\000Vd\030\214\251\205g\032\240\365\031\313<\375p\252:.\363X\n\022\324\3040m\253\327\003\207}\321\252\036\373,\235\264\243\256E\034!\366\001\210be\242\350\003u\224q\271fO\243\263\002\374\016\276n\353\364\274\236\204LL\343a\367\364\220\322\236\213\361\0216\211\246\256\253\255.K\317l\364\005\241y\347H\264\265\214\036\026Z\273\356u\0053\204\275\226\300\031\243\301-\360\020 \357^]\250j\254ff#\006\245\247}h#\264\3658\247\332\202t_=\342\037\215\217\304bzAT\346(\213304\316B\232\351\205\220\223B\314O\031\207\321F\202\030\320\031\032\010m\006\320c8b\223-,\\\3225\037sw\235~\\\030\\\007q\242\342\032.!\207h>\327u\366\263\3461\345a\271\341\224\265\2006&\3177Q\363\233W+[\252B\263c5\226\004\2476\350>Z5\373\007\357\005\263\340\007G\327\303\245\243J\031\244y\363\301\230y\223\373\231\271\332\003\037\034\277IO\214\017j\365\013\242\226a\326\331\336\210\336\016%#\345\005\025\265*\030\252\002E,s\212\274$\020.\320\t\346ZCK\0143|\206)z\324lX'_h\005\217\224&&m\355\307\317\177\235\003Z~\022l\216\004!l\\\235\203I&\301}\201\303\205*jB(^\014\027k\275n.\007\371^y\270 n\002\032Dt\230\342c\211\232\231y\354H\273\347\300\347\224\211\246\266\031\247S.\207e[hV\020\206\225\002}\230\340\263\333\025\211&S\300\220\233\032Lc\030\210\265\247\336E\312\245A\367g\005\007\272\271\367/\031(\323\014\310\3329\3321\215\2030\302N\235\327\320C\337\274\344\037U\371\231w\277n\313\276\206j\032Z\222y\337\251\366\361`\301\036\236y)\227\247\004Q\324\341\311\004\013b\253\025L\244\205!\313\225FJ\267J)\263f\230\225P&B\007!\306tK7\020\246S\215\324\336\260\336G{cr\262\370TO\211Y\227\215.\n\223L\235\021\301\"&q\016'\300\212\204\304)0)b\\v\016\231\027\354F\266:\322\210@\303\200\264E#@*X\227\354\r\027\206>\216$\300\255\311b\272\2445u\343\217{6\t\267\256Xd\302\016dK\202b\256\254\200k\321\235\020\030\201R\305\026%\243\002\304\265\003,\202*\250\232s\276!+#k\312;\007c\342\365""\270\274\216z\034\360g>'`\316\301\243\261\032R\303\234\342\370\201\260Cw\350F\242\232 #\036/T\325I/#{T\366\230\234\232\323}\270L\213,\261\272\005\361\205\202\321\220L\234\210\201\r\202\010\005@\210\n@\326\263^{\305i\n\200d\216r\t\242\"\030\320\3306*x;\342\354Z\271IJ#|m\226\017\273\321\016D\331e_.\300z\216>7\014\205\352{\014\223!2\241\0227r\354\213 \010K\013!w\335\241<.~|\026D\030\020K\207\3401H\300_V\245\003\034\347\353\252w]4\230%\2071|h\013\254\025M\364|\272\367\275\355o\006o\037\273\262\017\003\177\242l\215C\014\336\253\016\352J\211\244\274t\202\024\230K\204\330b`\354%OJ\215\2507V\0314\312\024\023\304\342$F\204\222C\002\202\264\246\200\246Z\264+AFw\322\352\212\202A\220\0140J\324\221\006De\227+.\224\221(\221Ec\205T\"3\326\221)2/VJ\345\336i\221\305@\253\265o\205\354\273|\2352\025\313\"c\033UAb\304ADD\025M\255[\314\003\313\347X\340Nh\335&\320j[U\254\311kg^w\020;5\017OS\253\244P\010|\016h\035\023\322\037\003A\021\036\334\214\367\224\314\370\306\031x\t\341\261VC4M\304\323\2730\32592\232\312\001R\2319\323;!t\035\326+\242j\352k\326\262\307\223\363I\032\267*EY\t\024\236\026\206A\030p\025QE\201S\344KZ\312\370T\032U\r8\210\267\220\215S@qM\35576;\231\220i\rz\teo\202\217\033\226[ 8J\363\320\362\002\017&L\212R\226\230\034\226\362y\240F\261\334\257H\325\034\310\025\255\262<\255\200\227\306F'T\345\221r\220\227b\2503)\230\372\352\021`\006!\264\227\031M\263\340\014v\t\006?lZI\241\200\304\223a\221\212\213bp\n\023\202\013\207\344\212\366$\274\\\007z\n\353+\032\343v\004\345\315\203(\031\375\217\231\233\306oE\230\371\370\013\343\344\202!\321\022$\356D\255r\312\227\272\222Z\333r\2719NpD\210\211\233&*\242\032\213\005U\027\345i\354e\323\322iN\344&v\341\251\231\334\007\346\3077\305U\343\352a\346\275\026\240\227\363t\350TW\337+&\3155e\024\354\261\235\243\3209`\266Y\322\266\375\361}+%K\234\242\233\024\034tO\205&\214\361g\206V\"\236\033Z\247J.\263\200\335Y\3046\205\203o\320\016\321rW\321j{&X8\246\233\230\225\245!\324\232\023(\215\256\310\004\241\252^3\345\363\034P\336P8\362\353\304\257\036""\227\245\310\325\035\332\225m\313#M\256*\333|sl\311!\206C2)\234\342\010\360\031\023\342\371.\211*a\007\203s\342\252\032\030a\220\235\352\\\252\221\372I}\331DN\316\320\227\320\363{\022xR1X\000=\270\256`\271TS\371X\363_\331\212\277I\335\273\267\2704\\\321\220\355a\314\017\265\234\303\\\311\373\037\263\242\306\364_ys7\3039a\244\226i!\014\224\242L\r\254\253U\202\211O\357 \323m\341\242\265\247\247\200\246)\237N\206\032e6P\020\231-8\302g\030\030\035;\2625\002phQ \343\020\373\t\364eU\335\232wit\262\232\215\227\025\010\017\026J\221\310\222B\261CB\016\033\226\035\311\316\207\003\007\300\305\003G\213\001A\\Q\314\034\362\260\370m(\262\354\024\212\302\252\360\253O4.\225Um\032$\"\322[c\201\321\224\2529\265\216U\206`\224\272\242\360Z+\252\352\262@=\363\203\016\010\\\372\340\277z\311k\014Y\022@\306\200m\006)\nD\241\314\252[ADQNI|\366\261\211\212\333\333\223S\326\232DO>\270\"\266`\330\360S\233,\242\200I\207\246\213L\024\271\3542\210\033\254\27474jp\002\352\031\264Z\221vZ\021\266\306\250\006\311(Pp\022\311]\372h\267p^#m\nfK\272\"\360\334b\343q\270\315[\255\326\351r\344k3A\264\031\026\220\325\333?/\250~\254uF\004t\216\252A\263\005(NV\224[\305\266\224\323\00074\336\342\375\241X_m\237jB5\002\272\220@ul\220\332a\273k\274\334Mp?aI!\310C^)\\At\252\307U|\022\257\020gf\252\031\005}\353\326\225\327\261\211 \322\256L\221R\202n\364\r\007G\223C\026\035\276(b#\211\230\267y\234\310\024\206\326jC|\251T\333#^{]z{-\3429\251\177\263\263\037ge$\3773\001\214a\214\032\306\232\014h\032\367&\275\311\375{\347#a\203\036L\223B\346s\366e\337\364W\372\222\232\363\273tv[\264\350\360\363\334\241)\331\033o\353n\211],R\203j\r\272V\325\264\324m[v\256~~p:xu\001\275'\275\206\340\177\026]#\016\242\244\224wF\014\023\247z\263d\016^\346\347W\2435\241\262;,\351\307i=\247\205\273\370!\222\217C\356-\363\372}\214\242\262\351%2sE\206( \214R}\031w\0272^\023\004\275k\312\300#u\267\002\206\201\206q\263L1\302\303\t\027Mb\3117?\000\013\221\260\351\211rX\034\235\265\314\310\341G\221\004\027\000\301p0\\\017\211\242\352\036\333GT""\253iV\223\254ec/\214\360\031\363\234B8\213X\345Wg#]\327u\335d\363\214\350\310L\206e\0206\000fq6\r[\236\021n(\330\014\262Y\033\030\026\004s\031\221\244\007#\343\354s\336\205\315\345^\317B\201y\205\030\377\t\277?S\274\317b\017F\371\314\255\313;\034\357\"\034\311\227\211x%\312w\311\313f\242T[\325;\263^d[\344cv\354\335\204\274\006L\311\231\0142\021\315\t\256\202\310\242\244\332@\340`,Mj\262y%\366Qa\314I\026J\031\325\264\202!\021'\306#\021\024\247i*\305/\264\201t\262/\262`P\363\366\350\337a\013X\241\240\236\322\023\370\021\016\215V\347+\005\230\027\2756\205\234\004\252\336\307\247\317\253Z\211O\252\303\326K0\337\374\334\336\247l\321>\265\354\332<\372/z\020F\227\277\356\237\264|\233\037\350\354}c\337\272\266.c\367\227\303\367\311\037B?\271\276\014\313\036\232\257M\324)\213\207\266\034\032\252\001S\325\373i]>\037*\023\037\313\037\017\005H]\311r\373\247\322=J\t_\325\350\373L\010\244\203\373\302\361\241%\031D{\204``Ar+\347\263\032\361\312}\372\316\377\227E\375\342Np\316\260S_\224#`\216\2355\213\326\204-j:\236\334\376\177\274\353\313\366\013[\0373?\345\271\177\366soC\343\337\311\371g\256\377\343\363=j\367?\266+\241\246q\335;9\250\365\373\263?\027E?\253#\264\302]\223}\306\253\002\372\216\322\205\356\355v^\177\325\371\347\265\365\245\276\304\375\020\232\n\261\227\251\343\324Zi\356\326\206\255\242\327\256'\365z\036\277{\210\366{\375\373\032p\310i\271\3548\364\362\247&\371\204\273G\203\267\365S\271^:\261\336\243\273k{x\301\336\357\245\013\350\324\017\023\203\177\336\360\177\214\024\3668>\277+\304\352\316\206\001\334,\234\3168J\3340\025\242r\374\377n\016\035\367\237\216\375o\020K\332\363\334\261\200\033\263\335\243#S\177\251\375\223\305\336\360\332\2747lz\034~.?\343\214\327V\266\202\347\030\301\317\367g\340\376\347\033\341Hq\334\265\306\357\343\274\2648\332\365\3537\353\375\236.\374]\375\344\343\207\210v\373\274\\L\3674\036\013\213\347\340\341\337\201\373\360?{{}\352+\367\0217\343\201\177\024""\005o\01477\375\016\334n\027w\367~\226[\314\377e\372h\016.(\260!\254\350=\346\346)\303\301\277\274\363\303\023\267\341wp\276\360\270\254zb\377\272\320\217\276\034j\234<\037\277\250t\003\275|\177\347\307\217\024Oc\212\377\210\343\211\267\264w\267\270xY~q;\212\263\374N\016;\350\275\261kox\217\016'\213\214\027\035g\372\302\010\270!\343a\317g\337V\360\337q\027\325\234\006\027\217\216\376\030\240\341\337\343\372\207\236\304\210\037\3432\"{\237\024\037\307,_\263>\267\224\340\366\362{1<^\236W\373y\037\004>w\030\030\016\363y\274\360\266\001\n\342\3068\370\266}~a\314\307\221\253?\367k\345\002\203\223\311\203\341\033\331{\304\320x\207x[\310\312\n\336?\033\340fs\335\177\311\353\376\274\037a\344\346\270p\317\3613\370\240s\016\035{t\334\357<\\\016\201\343\235\267\3516\2066\226\331\204\370\032\0007`\331\331\316\326\332wlE8R\375\312\241\235\273\371\332o3\323\177c\322\355=\241<\324\256\033\332S\022\315#v~\317v\026\247oH \355^M|\337\271\014.cY\356!a\035\234\253\332\203\2142\360\346dzOS\353@\340\2743\255\317r\367\321\367i\014\236\236\353\256\212\035@/\210\270>\206\267m\310{\234\315q\356\001\354\305\330^y\372\377/g\313\247\244B\346\210\207\236\366o\263O\307\337\367r\273\262\r\000\314i\270\325\371\200\325|$K.\345\355'\350\273\240\316\323\202\366\243\242\205\020\234\272\2337\233\307\334\034d>\017\276\010\000\321\323\3328\235\250\016\304\332\360\014\355'h\334t?wX\245\232\207\016\241b\236i1]7\320}\316{\204Z\345\264\323\014\177\r\352a\212l\342\354)F\236\323\210\\J\030g|\263\324Q\330s5\207\272\037?\032\320\031\315_\362\200\333\357\373\315\3227\036v\374\253\306W#\177\232\030\036y\212\366\330\354\0371\374\270\306\3141r\362\365\035\247\325\377@uN\260\206\233\321\310\335\023GE\303,|s\277l\345\002\335\376\357\267\037i\333\272y<4h\344\234\ru\371\257\227\351vwo\346''?FC5Y'\255\360\020:\013\332R'R\310\300\213\255\211\233\000\316\003\205=\020\312\372\320z\250eo\243\300\241O\307/\336\177\205}\377\013\231\231\226/5sXr\2621\231\3514\203\236\2625\275\037\323\213\343?\002\353c\363\343o\204\362\3277U\237W""\333!\262\375\216\206\2207a\273\035\217Vs\273\202?2\344\230\3401\317\305\316\3747N\206'\007\26771Yv\236\316\217o\332:\276\013\275\206\366\260\336sx\256\373\274'\327\340\354tA\372\357\002Iq\347\2064r\311@\037\343\231#\244\003k|\260\227\271Z\376\327%\247cli\240\231z\017\271\007\223u`q\036\301\036\277\227\355\021\311\360\231\240\276O\323\210\350\210\371\316_\303\367\375\020\177\\\225\223g\244\203\333\375\204\254k\311\366+\022ro\310\356\337\201\333\352<\327\237\030\363\266\331\3768(\363\2251\365|\036\2521\262\361\252\\\311x\263\031\330R\207L4\333D'\374\232wY\243\373coF\273t\332#\202\251\360\266\377\260\300\261#\006\016<|\3428\202\001t\362\355\371\265\326\244#\014\251\353\355\3256\264\377\301\031R\355\025\221PQ\242\236\256ouE8<3<1\025\223\225\026\341-\022\317-\016\361\224\304[\\\2750\303;\255\333\270\257\006qc-?\241Td\263>\032w\275\225O,w\353\"t\333v\343t\247\031\254\023df\352\254\024SK\336\252j\006\005\226=\323\261\352\277\323\335\300\206\3077\304Cb\271cy$4\225\233x\313zy\032\244\255\024\265o+5\250\242\233L\363\206,\310\323fi\365]\021\214\357d\331\027\267Z\036H\232\221\335\365UZw\rk;d]\355\2461\346q\212\216\221\371\232\343n\373\250\336\212C\270\355\034F[\313\031\217\226\316\224?0\255r\365\0025\250\307\227!\345\344\323\275e\303a\031G\310\365|\376\257M\000\253Cc\031m\253v$O\3522#\t\304\033\024\324\324\346d\305\226\232i\002\210!\021\357C\017@\336\315\351-\n\327\275Pl\321\243\320\222N3\225|X\270\302\302\252\251*\245{\303\225\255,A\274\344\2528\273\331E \244\270S\263V\213\321g\005\034\332\263x\030.N\r\361\243F\215!\301\320\353Ye\226_*\315\227\312\305\230\266\215k[9\320\264\0324h5\315\201e\331w\305\225TR8\347\214\332\320h4kG\030\030\260\302\311\024\251'\222\316mYe\355\0326q\202\304\261\030b03x\026+\262\325\256-h\273/UF\213\262\303Wv\225\335\362X\256\354\260\275\23303-\027Z\273ER!\020X\264\251\025\265\27433+we\227E\017kF\316M\213b7\201\201\227b\273\025*\341p\270\\h\3224h\326\250\240+\202\202I\t\024\253)Z\331\243H\321\244kVl\262\302\355\026\215\206\363|\033\3326e\025\315\024""\034\034,\\.x\303\022\216y\252\n[6m\025T\250\336\036\245\321Z\343\245\005P\251p\271\3377E\035>\026\3547e\256y\273\3322\246IS\004\004(A\213\027_K\022\312\r\372JI\332\256\017\251T\250\345+\\\372v\005\205\205\3225T\225Q\207C\300\374\254\314\276\304\222J\320\024\264}\224\225\202\273\265HZU~\366.3[5e\315\231\353\201\321*`$\t\315\224`\340\211\315C-\277\377\027rE8P\220\034\333\354U"; + PyObject *data = __Pyx_DecompressString(cstring, 9978, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (10091 bytes) */ +const char* const cstring = "x\332\355{\311[\033G\367\256\321\214\000'\330\216\355\304\223\260\215\247\3308\304\216\235\311\216\305\214\031\205\2041\306\270\323H-\220\321\204\272\205\000c;K-\265\354\245\226Zj\251%K\226\275d\311\237\220?\341w\336\0324\002\361\375\236{\357w\237\373$\301z\273\253\252k8u\316\251S\247N-\371}\271L\314\320|\251\264\226Q\215X*\3513\326T\303\227\213\305\343\"\307H\371\324\244/\226|\220\320\022\251\314\266O\217%\327\373\374I\237\266\245\205\263F*\343\213\322\277\204\232\366\031\252\276\256\367y\275>\237/H\351\232\356KgR\253\204\272/\025\245j5_FS#\315-\305t\226\025\215et\243.\217\276PQ+jC\305}\3640\274\225\326\302\206\026\341\375\321\r5\031\326P\260\372\225\242S\001\275o!\225Y\3272\367|\341\270Jm\243$k7\352\033\211%c\372Z,\271\352\353\325\307\223\351\254\201\301\325\332\234Na\270\350\324\340\266\261F\t\324\267\210\026\217\255\240\200\026\247\241\033\231\030u \203BI\337\354\360\354\203\307\077\077\246\336Dhd\357\251k\272O\317\256\260V56\346\225l,n\304h\240\333iM\357\363\215G}\333\251\254/\251\321\020\250\3414zW\367\001\221!\351\3235\203\321\343\266\232L\246\014>*\372\234\372|\333\027\211e\250\221\330&\233\223\0215\256k}3i\224P\343K\003\252\021^\033L%7\265\014upyV\315\03015\356[\315\244\262\351\007+\333\017\326\265\355\332H\331$\205\326@zu\235Z\276\223\213%#\251\234\026\271K\324\002Y\356P\361\373\276M5\236\325\356\372\214l:N\2050\314T\326\240l\235\276\346%\226X\221eY\346\276\217Z vH\200\304\252oE\243)\325\242\224`4v\204R\250\n\366-\346\207\006L]Y\311&#q\355\276O\260\031\325\224\210\031D\275UL\375l&\025&FB\275K\275\3722>\352\325\203\0325\353\013\253\3618\021\024\\HIT\"\256\031\251\344p\\KhI\203(\242g\023Z\206\212\366\021\3614\"\236\262\002Ran\211\300\276X\"\315Kj\221\240\001\242Q\013\251\264\2577B\225\20545CdI66\321\347e\224\243?\242\3656\365\204F\030\013\307\250\212\373\27605\027\213\020\203d\264\007\304,\331\260\221\315\240F\232\366\214/\035K\0233%\211e3>5\022\3414\032J\215$1\235|n\211\307\302|\016\211xFN\323@\033M\327\004\007\315'\327\223\350\017\332\0203\205\214_}\275""\231\345\373\276\337}\317\373\376\240\212\025\032\227\246\246\325\360\032\215US\023\0173\331dR\313\350\017sL.\036V\331@\357Ko\243\317\324\341g\221\230\256\256\304\251A\374\256\206c:\177\212\334\367\305\265\344\235\260 \243~\367\231/\221\325\321;\032\"#$\350\222I%XG|}`\020>U\017\214\030>\020D\317\350\317\330\274\365\352\277\367\352\317\321\377\007\254\377\277C\244\222\253:\321'\254=\007!rj&\t\322\320#1e,L\222\307\345]\2229\014\232\023\345\006hhU\232\222B\332\036\360\207\006\307\224\221\231\271\201\361\241\241\341i\376:7\034\230\037\237\033\036j\224\017\3666\n\226\364\307\365\324\300\366\002\343\177}FR\206\345S/f3ZT\313P\233\332 \261\000\010\262\220Q\323Tj0\225X\241fG\222\315\017\325*\232\337\373\024%\243E\262aM\t3\345\242(G\224 \351'\265f\234P&\312TXK\262 zK\272\016\021iI5\004c\327IG\275\240\034\321\323\372\314#:Y\313\016\223\2167\264\206\224l\206(h(\032\2273E.\n\365e\214\3146\351\356x\254\241\033\331t\204\265\222\312\222tft.\267'\025\220\2649\276\204\016\021\037\304[u\336\206\206\007\346G\207f\224\351\231\2202\350'NQ\r5\250B+d\206\264\250\232\215\033C\244\363\371?0\353J\026$D)\210\356\034\023-<\005A\222\241T\225\310u\217\255\004m\314l!hC\366\252f($\301\020'E\250W,|\n\361\247\2417\224\304\362\252@\266\024&[\r\231\320\013L\")/\232\252\317!\252\251\361\330\016\351\n\246\200\233\262\210\240\365)\350\314\212\020\016\232I)\035\315EX\373\274\240\022\226B\327\\\210/&'\225\302J\311\246\025\035l\241j:\234\"\265\034fK$\233a%\221J\306\310\362@\3370\312\006\002\010\t9\"\211\367\340\250\014F\260\372\014\342[\315\250O`\362\325\220\000\016\253O\220\2626<9<5\262\234\230\220\361\344\024\263\217\026`\233\327\332?2\265\366M\325D\2512\331\002_f%\363IdS\315^H\216\224\311\231\321\321\341\271I\322{S\376\327\n_P\203\343o\206\247h\r\244\217\2474\265\266\376Mi0\216\241\325\r\225\0222SUY\034'Q\234V\023\232\340kP\301\371\034\344[\307\213\230\343""\030\350\263U\265h\004\366\375\036OQi\3759=\250\211\225\210\372\234\r\353\310\261\361DV\r\327g\324\364\223\307\222\263\370K\244\356L F\376C]\213\351\303\234\273G\210\0241\352\233\324m\364,X\234\236H\336\263\031\235D)\206C\ta\326Am\351u\324\214m\321\262\275\236[\317A{r\t\227\275\216\307H'\221o6\242\013\231\222\242E\002AD\001/\210_>\n\246\357\352\336IVh\225Wp\262\256\310\207\204\272E\177\244\277w4`\225/\023\344\346\303?f\334U\365\222BK\271*T\257X\325\231\2640\347\237L@o\344sz\345\307\004\353U\325\222$9\212d\343\350n\213<%2)\010g&\2461\315\316G\205_\366$\244\262\376YouE\321\007Z\016?[F*\265\202\363y\322\210Z*M\232\220\217\241\372\240W\265Um\235A\345M\201\0055\235F\352M\347\034|4\207\313T\322\205\325\0276\005\365\317\242\006\316a5\017\215x\"\225\324(#\342\215fN~\310\204[\034\311\247U\3420\242]Z\335\006[\3249\333\376\331\357\226\206/%\035\013\257S+D\035\005\352 \255\222j\242\007\354Kh\022\370\303v\032l\017\356&Bk\361\210^{\007\271\204\251\324\340\253S\032\337\"\320|\244\227d\252xo8p\221/\314\351\326\220\222\213\031k\214?a\303V7\313\224\3136\226\254\005\371\022\225\311\031\211\315sTMg\206\006\323+rELW\315\"\"\001\371\223\302d\215\202\r\331\363\232F\212&+r2l\263\306\237\205B\302#\253\222=e\223\234\260-'\271-\331\325\335bSN\335aRSN\363\241MS\366\261\347\036M\345\216:nh*r\\z\223\207\260)\367\244\032\217\361\374\264\226:\326E\322\\\364\370\3557/\271\311\031\225\376\333\240}5\327(81e\247\246R\2535\037\241\266$\264. \322\020\255\367\005\310\264j\364C\325\373\241\264\370A\252\tX\255\252\3138\263\247\230{;#<\001\022u\260>\3555\271^\240\242\031\362\325f\222\031\r\355@2\304\252YU5\024\377\224Q\301\336\\\221D\224\004\031\301:\\\341B\263\010`\213\267P'a\322u5)\345{\022\236\306\237\265x\224\214\250\010Ih\214\2315\021,\376p\332\010UMOb\261\253s\345(G\270u\230\243\231\375\324(\333j\037H\253\022\261g\325gnf\304\364X\365|\277:MX\323\232\336\352\346\220=B\217Vw*:\363yq\213\r\372E\324\315\177\231\356\207g\206\221\235\323\236$*\306\270\220Q\203\215HR\261\341\r/\2610-\201k\251\010\214\\N\236""\352\223n\220\272\255\325U;\237\320i\214\261-b`\235\366\372\031\372\301\336X(Q\352\221|\227\366,cm\032\021\375aoT\257\362c\021\2039l\252\033&\035#W(\232\213i)\014\207\350-]\373\212\202\341\210\337z\252\267\2464&0R)G\244\031k\020!bSzH\345\270\245\216M\003\177\212\222\341\023\337F'\253~\010\376\004\242W-\220\352\203\334\245dh\220\264Tb\033\310v\317\n\024t\363\262\306\034S\255\336\251\232n\247V\245_\016\244\340av\331d\026R\024\343J\221\007\220\034\031\211rt\364\311\221\021'$\236Ti\225\371\331\302F\335?\362T\211%\n\031\341\246Mu\343\276\311\026|n\322o\306\310\266a\346\027{J\261\263(}SG\370\224\010\241\322\371.\200\377\222|V7\005\254\373\215[\004\376&\313\320\307\374Ag+nu\013\222\243N\347\3267\371VOi6\006X\270h\363\326c'\226\236\335\236a\326\227\357\336\251\331\355\020\021\272\372\312\017AB3\312\254\177zX\031\237\036\2319U\365\217\325}uJ\031\032\036\361\317O\206NA3\310m\254\330)4Uy\212\273'\371\231\\\2556\341\022l*\314C\364||} \023Q\351\357\257sr(?1/\207\322\377\270qLJ\203\227\021\303Xe\241\003b\350L\254d\032\361v\343\307\226\355\207r\333\241\343\233B\240\0201\357\025\375\305w\345\237+\375\025\377_=\177\237>\345\354\314\367\377\325v\340\370\276\324_\032)\367P\3329\226f\331\356\226\272\377v\211\347{\245\036\361\374W\317\201\243\003p\310\341o\257H>t8\017<\235V\3475\353Z\177\371l\331\317^z\254\236G\345Ge\225\275\370,\337\217e\372\334\233\3579\360\\4O\027\325\203\316\313\246\377\240\363k\353\353\033\326\215\237\312\201\203\316\013\205\215\226\274^\253\367iy\343\350\274\233\326\315'T}k^\027Kc\235\264(e\264\330_\034.\235-\r\225]e\325\262\365\227\273\377\366\234r\266\347\275\205\236\302\263\242\273\270Qj\003\025\250\177\345'\225n\032\226\007\303zl}E#x\261\327\266\327\315\007\3748\277k]\372\261\334\267\327&\336\251@\361B\251\355\240\275+\0378p\271\017\272\272\013\335\007\336\323y\225\365\216>~L\224\240\367\270y\323\272\372\260\224C_\317\025^\342y\203(\332\3563\215\342\357\326\303\351}\025]\366Po\017\274\335\205s\3267wJ\356\322\006}i\235\356-\006Xe\327\255\353O\313\271\212z\320""\215\201\211\206\254\323\367K~\336\335\313\346c\353\332\037\225\215=\032\307E\323mn0\242S;e\231PtX7\177\255\364T\372\353\246\360q>[\360\313\307m\323[\354)\2129\246W\353\"\021Jf\356\230\335\346u\3532M\323_\202\031D\232\371\262\250\0267@>\312+G\211\261\350\021\355<\221d{bu\337,\212V\236\024\272\2553\327\213\324D{\276\333\362^6\207A@\306nh\365)M\310\343B\226\265\303\370\256!\221\346\032\225\023;T\\\025u\357\347}\306\273\277T\272+\2670%\007\016\217\345\271d\376Q\352\261\276\377\275\302\032\364\344\275\326\031j\274\030\300[g\336Oe\362\235\205!F Ww\341\242\371\235u\343\021&\375\300\325\236\377\266p\275@\234\373u\301cz\255\353\217\313#\225\033\225\000\221\334\323]\370\226\006\352g\204\243nY\367\250z^\323\264\244\0305\r\316\243\304\323\005\22576T\350\344\3049p\270\377b\315]6\211M\272\362s\371\315\302\242\031)~_\n\034t\237-<1\277+>.\356\226k\023\203o]\205\025\263\r\3659\363\241\302\005\263\275\330]\274I\225\031\245'\345\363$\017\324\335\263\371\301\t3\2515\342\242|o\336\260\316\336)\265\225\276a\315\364\243\347\006\204\263\267\030*\235+1\242\364\347\207\271\\y\312m\345o\312j\331\250\364s\301ig\374\320\006\372l\020\225\317\023/\263\364.\372\242\033\324\365tY]\244B\313\335\207\254\336~t\2537\277\013y\373\001\372\004r\373(\257\222$\215b\314\035\007\236o\255o\373\250+:\251\223~\366\371\025\363\035\221\235\253&&\377}\214P\235\027\251]\017\351\016\353\364Us\265\030(\256Rg\333\317\0274\363i\261\227\210\313\313\212F\256XW\036X\017H\033\211z\350\307\234/\336""\306\240[*\262n=\253\004\252\334\004>\0357!\001\\O\201\032S\3467f\264\350\307X\356[\347\277/=&u\203\347B\324$\3019\250\025\2341\177*\272H\257\272\316\023c\364\232\271\342\252\365\200\324\014fA+<\265\276\303\247\331\362h\205\221\345.\344\224\264\355\323R/S<\036\306\215\205Ub{\357%\263\377\320{\311\272\364\250\374[E\255@=\345G\013\375\005\177\276\r\274\260l\336\240B\235g\013L\003^\266\256\200\342W+\033\325\276\234\245\252wI\215\313.Ca\020\255\275\304\177\370\031#j\004\252o\374\247:`\342_\253\353n\351\002z\304\352\261n@\200\251w\277\3609c:\367v1G\244\364B)\\#\235~\372\214u\206\326\245'\3450)\207\323g\n=\220\334z\"\376\\xTP\301\234^\022\217\000\3063M\\\377\023\226\023.\021a\263\233s\373\200\271F\024\274r\365\340\212\257x\272\024\261~\234\330\357\027\025\035\272H)\345_\021!\206L'I\253j\262y\270Uh#1[`\203bt\355\347R\370\252\360c!D\325R\375#\244\025\177,\314\025\014\363\327b\220\326/\254\305n\017\255B\177_\005Sw\221\026\250SJ\236B\033{\375\316\344\272\312W\344\357WM\265\236L\030\307W\244\235\002\326\371\207\340\337:\365pR!\020\222i\037Q\272\360\233\271Rt\026C\326\335\337\260\014\354\365\374S\033\275\371O\346\002\315\255\367\253\274Q\370\311\272H\353f\271F\353+f\250x\271\364\232\226\027\0255t\343{\022\371[L^\260\314\335(\366\263\325\220l\214\237\312\0134\265_\221\376\253~\336\005\372Z\347H$\031K[\235WHp\356\226\030\307~O\212X=\276\344US+\376R\002\317a\255\232(n\227\333\252\205!\020\267a\341\364\323B\321#\331?G_\200K\277\204\365\253UA\360b\346\306AU\301X\336+\346\253\"[\336\036\224\002P\026\177\265A)\271\016\310\316\222\177\177w\236\262\273\376\n\345\277\243\272\246\213\267\210g\035XL.\223\"yO\272\321\346\374\353M~\203\024z\212L\010\252y\207f\346&5\263Yd\354\373\214T\206\367\242\351b\306\310\241\253\303\352\200\261\002$\236\250\345\034\270\311\324 \335\373\025\226\261v\253\235\331p\204Wh`\236\363\205\250u\231:\330\\\350[\322\372}%\227\325\007M\321\220\227\277JZ\366t1j\335\207\206j\314\272D<\364\256\370\304\272K\326Cs\215\217\240\326\to\202\264\355u\1770\375\216){\213\204""\356\237\312^\303\222v\3340dE HCE\304]_>\344Z=\217\370\332\264\301\250\014\3326\322\237\214\360\343\351.\353\200MT\355\360\241\203\353\006\352\323\245\313\0076\022\r\316&\247im\275h\2363\227J\216\322d\305a\375>\275\037\261\346\242V\364\275\365~\323\332\334\371\373\324\251\017m/m\004/m\323\200i\233\002Pla@\330\026\261\301\032\000\223\216\230\367\211\214\314\026X(\014S\2354\355P\206 \346!\375\030\264Va\021\n\227\317\225\337Tr{\332\376#\264\265l-G\254H\314\212\305\255x\232\252\334h\033@\315\003\266q\300\270l5\000\010\330\346\001\363\2665\300\232-\005H\331\014\200a\313\001r\266\017\200\017\266\021;\301\210}\n0e\237\003\314\331\347\001\363\366E\300\242}\025\260jO\002\222v\035\240\3337\001\233\366\035\300\216\375\245\003Cw\004\000\001\307+\300+\307\"`\321\261\014Xv\254\001\326\034)@\312\221v\360\211\363|e}\365{e\210\266\004\027\366;\254\340\033\353\315\322aSZ\2506\005\227\315\020\364\303\343\362\347\275\210\365r\305Z\241\0310,c\213\252\334n\233\302\200\246$\005^\001^\331\336\000\336\330V\001\253\266u\300\272\3553\340\263m\020}\037\224c~\005x%\007\273\016X\267\347\0009\373\007\300\007\273\030\336<`\336\021\007\304i$\004i\307\260\223`\3309\016\030w\306\0001g\002\220p\356\000v\234\237\000\237\234\263.\202YW\010\020r-\001\226\\\n@q\245\000)\227\016\320]\237\001\237]\203n\364\323\375\n\360\312\375\006\360\306\035\003\304\334\t@\302\375\001\360\301\375\031\360\331\375\302\363\345\314\366\033\351\374\371\362\215r\310\372\345\345\376m+\360\312z\265h-\022\267\255[\353\031+\223\263r;\326\316'T\3336\t\262M\332\202\200\240\3555\340\265m\t\260$\271=\003\310\330\266\001\333\266O\200O6?\250\347\267\017\003\206\355\343\200q\373,`Vr\332k\300k\373[\300[\373\032`\315\236\002\244\354\006\300h\232\212iP}ZN\305\033\300\033\311i*@\225\234\266\t\330t|\000|p|\002|r\014`*\006\234s\2009\347\"`\321\371\016\360\316\251\002T\247\006\320\234i@\332\231\003\344\234\273\200]\347g\300g\347 \346g\320\365\032\360ZNa\004\020q\255\002V]\353\200u\227\037\023\343w\217\001\306\334S\200)\367,`\326\035\002\204\334k""\2005w\n\220r\033\000\303\235\003\344\344\364\276\361`\230\036\025\240z\242\200\250'\006\210y\022\200\204\347\023\340\223g\270\035\264n\177\tx\331>\005\230j\017\000\002\355\013\200\205\366w\200w\355a@\270=\n\210\266\277\007\274o\337\006l\267\277\360\022\274\360\016\003\206\275c\2001\357$`\322\273\000X\360\276\003\274\363\206\001ao\024\020\365\276\007\274\367\356\002v\275\203\035\240R\307\030`\254c\0020\3211\003\230\351X\006,wD\000\221\216\030 \326\021\007\304;\322\200t\307G\300\307\216\241N\202\241\316q\300x\347$`\262s\0260\333\031\001D:\327\001\353\235\361\316\232ja\233\232\362\205J\307\336\323\375\236\303\306\224\376\177\365\312\277z\345_\275\362\257^\371\017\364\312\263J\210va\267\367/Y\241%k\351\355aS\332\374\027\252\226Fe\222\004$%\2577\232ic`\3171\373$`\322\036\004\004\355\013\200\005\251S\004[\177\002|\262\017\200!\007\034A@\320\261\000Xp\204\001a\307*`\325\361\021\360\321\341\007\323\371\235\257\001\257\235o\001o\235\033\200\rg\026\220u\316\203\333\346]\213\200EW\024\020u\275\007\274w\355\002v]/\300J/\334\243\200Q\367\004`\302\275\004Xr+\000\305\275\016X\227\2348\000\216\032\360\214\000F<\363\200y\317\"`\321\263\nX\365\254\003\326=\361\377\232\332\021\304\037\000I\007\354\243\200Q\373K\300K\3734`\332\256\002T\251Z\022\200\204=\rHK\r\263\005\330\262\177\006|\266\017\201\352C\216Q\300\250c\0020!\347\347\035\340\235\234\246( \352x\017x/\327\203\034 \347\330\005\354:>\003>;\0061M\203\316W\200W\316e\300\262s\005\260\"\365\215X9\204\276\021K\206P4#\200\021\327K\300K\327\033\300\033\227\nP\345d\307\0001W\002\220pm\001\266\344:2\204\t\035j\232\372?\001\177\272W\001\253\3568 .\247^\007\350\356qL\357\270g\0260+9\3405\340\265\347-\340\255'\rH{r\200\234g\027\260\353\371\014\370\354\031\2042\031l_\001\254\264\307\000\261\366$ \331\276\001\330h\317\002\262\355#P\030#\336)\300\224w\0160\347\235\007\314{\027\001\213^\005\240HE\263\016X\367&\001Io\006\220\361\372\2410\374R\337L\001\246:f\001\263\035!@\250C\001(\035Q@\264c\035\260\336\221\004$;2\200\214\3247\023\200\t\251h""\202\200`\347\002`\241S\003h\244o@\263\316\r\300F\247\0010:\267\000[\235\303]P\235]\223\200\311\256\000 \320\025\002\204\272^\003^w\305\001\361.\035\240w\031]5\345\365s\305Q\361W\026\366&\366s\326\253\205\303\306\244\215\223UWUz\204\330,\000\026lQ@\324\366\036\360^\212\2150\207&\300\367\023\366\031\300\214]\003h\366\030 f\177\001\376}\341\0202\321\270a\024|\237\004$\035Y@\326\261\r\330v\010sh\n0\345\234v\376\037Q\020s\350\377\234m\021\260h{\007xgS\001\252M\003h\266-\300\226\034\351\020\0065$\365\204\030\267\330D\377\t\370S\016_\250\2138 n\337\005\354\332\0071\266A\307\030`Lj\206\031\300\214\264D\204\t\"4C\014\020s$\000\ti{\010\322L\003\246\235\001@\3009\017\230w\256\003\326\235\031@F\352\202F+r\0162='U\375;\300;\251\0134\200&m\217\014 \343\312\001r\256\035\300\216\353\023\340\223KX\"\302\004Y\004,\272\337\002\336J\315 V\203\014 C*\241\306\237\367J7\311\331\237+\257\323\376\277\355\2601\245\373_\366\374\227=\377\273\354\331W\212\3209\324\323\312\367{\013\373\376\303\306\224\300\377\243\354)\254\006\261Y\021S1\002\030\221V\303\033\300\033\347\322\277\314\372\177\223Y\205Ae\000\014\3276`\273\311\244\036\001\214\310\315\335\034`\316=\017\230\227\254\373\005{/w\227\277\24780\nt\235\246\251\350\246\346\373\377\263o\352c_q]\240%\201\005\303R\3000\325E\341\347\342\211j\025Q\342\205\207\364H\001tw\031uX09\013>\246\320*\313&\213!|\362V\2212-\033\305\226\375}\006\004\rQ\3606\213\352\312Q\010\360&b )\202\213\242\037\035\305\251\362\025A@\232\214|\016\341\334<\202\370I\341,\321\333E\021c\207\364s\315\272\203+\006\347\366\002<\367\231\351`\367\025FJ\017\020\346}\276\032B\310Cni\252\nA\222\024\0362\376\270\314.9<\263.\336\241P\257a\"M\017\037\220\213z\303\202\352\316 |\236\317~;\013\36747\016E\014|\033\372\332f~[\274\003\032\242\204\247\032~\310\357L\370y\230\271\237\333wAj\302/BOY\344\264\345\241\3609A\031V3\"M\333Id\273E\224\251\314&\372\336\347-\323\010\021`\270\212\030D4c]f\336\250\277\277f\215[\035\254]\036&\032\342\263\216\370\316\313\346\010]\031\340O3%\026\026\211\000\353M\304\210\242\315\266\374\205B\007\333L\360x\320kt\257\342Y\331In\201\363\225\315=\031\t\375\267\017\201\261\247\013k\024\023\217`z\n\222<\270~\213\305J\"\374\356\022\217\336\306\037npT\361*E\352\367\034\020E\206\210\027Y\254j\216B\3537x\344\357\005\n\324=\203pw\250\226\207\3053\305\237(\014\223HD\261\343\205\273\3463\nJ\247\000\364C\032O]A\212\r\266\316\337*\256\224\234\324]1\251\343\3462M\002Ea\203Z\016\242\360\035\322\216\024o_l'\206\274\211xT\021\233z\227G\264\263\031>`\023\035Ah\262'\357\316o\310\251\217\221j{\202Hv\036\341\032\240\240\356a6b\n\376/\371\371$u\003(H\030\222@\323d\371~ \235\360\0333\271\020F\372\007g\n0\366.\3575\335\005\261~\034\332\233\266\346\202Uaj\375\320:{\257t\207\305\275\327\276\244\013\032\326\257!+D\006[\370\204O\351&\216\207\350\325]\367%\305AZ?\274\330;M\367cNj\362F\361g>\260\352\207\024\245j=\032\331K\322\331\366I-\376b\216\341nH\335\207\270\0105Y9\275wr\203\367Kc\010P\256\373\216\326,\353w2`\311\"]=""\361\323\276\322\032\335>\330\250\373\224\226?\3539\031a\024\233\271~Rg\177C\024y\261\376K\204\006'+\323\373='\266x\273\270\305o\001U\277\243{4\326\323\351\375\244\365v\371\304/\037\226\266\350\252M\375\227\264$X\177\274\263\336QTgBH\025\024\345\355\302y\n\353u\200\313\304\345\013&#:\347a\360n\220\261\177?\277\221e\243\306Z\357\"\024\003\020\251\016\212}\367@\235\265!\024\277Z\355!\255S\321\302KR\"\006\364C\007S\223S\245+e\225\242\240\335\035\226\367*.U\250<\n\\*\337C\251\275\n\337\320\365\024v]\245\023\321\337\001\242d\244t\217M\241L\211\320\215\213]\026\312}\263\362~\277m\277\373\220Ei?5\357\222\036\034\022\242j\235\246\236S\200\277Q\372\225\005\243\263K,P\346\354\272\027\211\330\035\222\325\367\225\266J\367\241\214t\357\244\033\024t\365\343\353\202\233\202\217;q\265\250\275x\215V\345\263h]\334\036\260\272\256B%\211\013`\324\n-\277\024\304\035a\367\214\3108\342IT\2477\377\320\257T}tG\201\007\"{\332)\221\246t\212.'\320\325\273\034EL\177\215{\030\3643U\274B\023\363u7\236_\262U\202=[\347\020\322\014D\264\363\327\327q\221\n\004\262\223T\216c\364\270Cr\310\357S\325s\214\320\203\010\226\256E\363\337b\212\203i\273Wf\377\211\305\021\322\377\004fC5\250\177\263\024\300\212\202KQ\256\022]\006\340\213\221\236\357\301\205?\363\021-\346\366\342\243\242j\335~^\t\357u\263k \207\016\254\026\016\320\243\333\274i\252\326\265\307\354\016\214\003\367\027~\305=\216\003\007\215\354fq\272\314n;\266\341V\231\327\372\356\036\214\013vi\212\246\236\356\264\364\362\373\002\"\367>\356`\036:\310\020\273k\335e7T\330\227X\244\277\241%\023\267\270\330}+\272\317\327Fep\241\305\352\037\244\331\251K8\300\242+og\2369u\376\002_\3271\232\337\330\215\024\027.\263\321\355\254C\327\365\342\035\353\336\300^\017\314\275\213\326]T\204\233d\326\351\333\326m\322\331\007\304\000\217\330}1\366\240""\212\303\316\036v\273\262\371\217Z\264:Z\202\363k\177\320\023\325\333S\267\n\247\255\253\264\2360^\277\315\304\222\256\1779p+\014\267\232\026\213k\264\270\267\232)}\374\022\026,\322v\346\271\351\307M8\262DHi\334/\250 \242\223\014\260N\010\"\365\222\004\003\267D\350\206${\266\276\242\226\210\030]\247\017p\013\306\374\205\315M\347wl\223\360\365\235\322i\222\347s\027q\347\221\256\035\035\\$\003\257f\327\310\336\3235/n\233\340Z\034.\261\340F\031\316|\345\023\330\r\027ST\371\005\335B\273I\232\307\340\027\254\334\254\312oI\206H\266_\354\271h\231\341L8e\335}^\341\332\353:]\013T*~N\2236I\221$\324E\035E\032\277\202\n ^\264\276\305\355\214\332\350\312\375\254\275+\270\373\005\203\315\3034\363\306a\365\202Q@\246>g\326:\323\010\021\350y\334\273%\177^\267\030\206\325q\315\324\211\246\244\204Uh\342\210u\206\356\245\202B\3259\275\215\213\235\367J\337\227\347\312\233\244\262\230\272\366\213\253W=\305\263\340\214s\264#\353+\265\311[B\017\314L\361\033\232\352x\205\331\254\270\311\367\200n\217\301\322\343\2466\311\325\201\013\037\365\264\\\214a\227/!\325O\370\rU\3711\214\307\332\225\032X\316U=\014\2530\307'\006\245{p\327h\233\370\352jq\323z\0002\262k\256t\373\210\337\272l\247\313\211\223\334\034a\267\247@\373\257\n\033\205\035b\256\336\242^\352\371\037\233]\007v"; + PyObject *data = __Pyx_DecompressString(cstring, 10091, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (26825 bytes) */ +const char* const bytes = "[A write operation that will write to an in-memory sink.An executor for map tasks.\n\n Stores progress of the read operation that is the first operation of a map\n task.\n Expected an instance of operation_specs.Worker* class instead of Finishing %sInput to operation Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Optional[BatchConverter]Partial group-by-key operation.\n\n This takes (windowed) input (key, value) tuples and outputs\n (key, [value]) tuples, performing a best effort group-by-key for\n values in this bundle, memory permitting.\n Processing [%s] in %sSetup called for %sSingletonElementConsumerSet.receive_batch is not implementedStarting op %d %sTeardown called for %s.\nThis is very inefficient, consider re-structuring your pipeline or adding a DoFn to directly convert between these types.Unknown side input type: %r], < >.?add_noteapache_beam/runners/worker/operations.py, coder=disableenablegcisenabled, len(consumers)= must be rebatched from type .outprocess-timersreceivers=[%s] %s<%s>side-input to warning to indicate an inefficiency in a Beam pipeline.AnyBATCH_FORBIDDENBATCH_REQUIREDBatchConverterBatchGroupAlsoByWindowsOperationBatchingPreferenceCallableWrapperCombineFnCombineFnCombineOperationCombineOperation.__reduce_cython__CombineOperation.__setstate_cython__CombineOperation.finishCombineOperation.processCombineOperation.setupCombineOperation.teardownConsumerSetConsumerSet.__reduce_cython__ConsumerSet.__setstate_cython__ConsumerSet.createConsumerSet.current_element_progressConsumerSet.try_splitConsumerSet.update_counters_batchConsumerSet.update_counters_finishConsumerSet.update_counters_startCountCombineFnDEBUGDO_NOT_CAREDataSamplerDefaultDictDictDistributionDataDoFnRunnerDoFnStateDoOperationDoOperation.__reduce_cython__DoOperation.__setstate_cython__DoOperation._get_runtime_performance_hintsDoOper""ation._read_side_inputsDoOperation.add_timer_infoDoOperation.finalize_bundleDoOperation.finishDoOperation.get_batching_preferenceDoOperation.get_input_batch_converterDoOperation.get_output_batch_converterDoOperation.needs_finalizationDoOperation.pcollection_count_monitoring_infosDoOperation.processDoOperation.process_batchDoOperation.process_timerDoOperation.resetDoOperation.setupDoOperation.startDoOperation.teardownELEMENT_COUNT_URNEmulatedIterableExecutionContextFINISH_BUNDLE_MSECS_URNFlattenOperationFlattenOperation.__reduce_cython__FlattenOperation.__setstate_cython__FlattenOperation.processFloatCoderFrozenSetGeneralPurposeConsumerSetGeneralPurposeConsumerSet.__reduce_cython__GeneralPurposeConsumerSet.__setstate_cython__GeneralPurposeConsumerSet.flushGeneralPurposeConsumerSet.receiveGeneralPurposeConsumerSet.receive_batchGlobalWindowsGroupedShuffleReadOperationImpulseReadOperationImpulseReadOperation.__reduce_cython__ImpulseReadOperation.__setstate_cython__ImpulseReadOperation.processInMemoryWriteOperationInMemoryWriteOperation.processInefficientExecutionWarningIterableIterableCoderIterator_LOGGERListMAX_BATCH_SIZEMappingMeanCombineFnMetricsContainerMonitoringInfoNameContextNamedTupleNativeReadOperationNativeWriteOperationNoneOUTPUT_AT_EOWOpInputInfoOperationOperation.__reduce_cython__Operation.__setstate_cython__Operation._get_runtime_performance_hintsOperation.add_receiverOperation.current_element_progressOperation.execution_time_monitoring_infosOperation.finalize_bundleOperation.finishOperation.get_batching_preferenceOperation.get_input_batch_converterOperation.get_output_batch_converterOperation.monitoring_infosOperation.needs_finalizationOperation.outputOperation.pcollection_count_monitoring_infosOperation.processOperation.process_batchOperation.resetOperation.setupOperation.startOperation.str_internalOperation.teardownOperation.try_splitOperation.user_monitoring_infosOptionalOutputSamplerPGBKCVOperationPGBKCVOperation.__reduce_cython__PGBKCVOperation.__set""state_cython__PGBKCVOperation.add_key_valuePGBKCVOperation.finishPGBKCVOperation.output_keyPGBKCVOperation.processPGBKCVOperation.setupPGBKCVOperation.teardownPGBKOperationPGBKOperation.__init__PGBKOperation.finishPGBKOperation.flushPGBKOperation.processPROCESS_BUNDLE_MSECS_URNPROGRESS_TYPEPhasedCombineFnExecutor__Pyx_PyDict_NextRefRLockReadOperationReadOperation.__reduce_cython__ReadOperation.__setstate_cython__ReadOperation.startReceiverReifyTimestampAndWindowsOperationSAMPLED_BYTE_SIZE_URNSTART_BUNDLE_MSECS_URNSdfProcessSizedElementsSdfProcessSizedElements.__reduce_cython__SdfProcessSizedElements.__setstate_cython__SdfProcessSizedElements.current_element_progressSdfProcessSizedElements.monitoring_infosSdfProcessSizedElements.processSdfProcessSizedElements.try_splitSdfSplitResultsPrimarySdfSplitResultsResidualSdfTruncateSizedRestrictionsSdfTruncateSizedRestrictions.__reduce_cython__SdfTruncateSizedRestrictions.__setstate_cython__SdfTruncateSizedRestrictions.current_element_progressSdfTruncateSizedRestrictions.try_splitShuffleWriteOperationSideInputMapSimpleMapTaskExecutorSimpleMapTaskExecutor.__init__SimpleMapTaskExecutor.executeSimpleMapTaskExecutor.operationsSingletonElementConsumerSetSingletonElementConsumerSet.__reduce_cython__SingletonElementConsumerSet.__setstate_cython__SingletonElementConsumerSet.current_element_progressSingletonElementConsumerSet.flushSingletonElementConsumerSet.receiveSingletonElementConsumerSet.receive_batchSingletonElementConsumerSet.try_splitSourceBundleSplitResultPrimarySplitResultResidualStateSamplerStreamingGroupAlsoByWindowsOperationTOTAL_MSECS_URNTYPE_CHECKING_TaggedReceivers_TaggedReceivers.__init___TaggedReceivers.__missing___TaggedReceivers.total_output_bytesTimerSpecTimestampCombinerTupleUngroupedShuffleReadOperationWORK_COMPLETED_URNWORK_REMAINING_URNWindowedBatchWindowedValueWindowedValueCoderWorkerCombineFnWorkerDoFnWorkerFlattenWorkerGroupingShuffleReadWorkerInMemoryWriteWorkerMergeWindowsWorkerPartialGroupByKeyWorkerRead""WorkerReifyTimestampAndWindowsWorkerShuffleWriteWorkerSideInputSourceWorkerUngroupedShuffleReadWorkerWriteaccumulatoradd_inputadd_key_valueadd_receiveradd_timer_infoapache_beamapache_beam.internalapache_beam.ioapache_beam.metricsapache_beam.metrics.cellsapache_beam.metrics.executionapache_beam.portability.apiapache_beam.runnersapache_beam.runners.commonapache_beam.runners.sdf_utilsapache_beam.runners.workerapache_beam.runners.worker.bundle_processorapache_beam.runners.worker.data_samplerapache_beam.runners.worker.operationsapache_beam.runners.worker.statesamplerapache_beam.transformsapache_beam.transforms.combinersapache_beam.transforms.userstateapache_beam.transforms.windowapache_beam.typehints.batchapache_beam.utils.windowed_valueapache_sideinputsappendapplyargsas_windowed_valuesasyncio.coroutinesbatchbatch_type_cast_to_operation_cast_to_receiver__class____class_getitem__cline_in_tracebackclosecodercoderscollectionscombinecombine_fncombinerscommitcommoncompactcompleted_workconsumerconsumer_batch_converterconsumer_batch_preferenceconsumerscorecounter_factory_counter_factorycreatecreate_accumulatorcreate_labelscreate_operationcreate_pgbk_opcurrent_element_progresscurry_combine_fndata_samplerdataflow_worker.native_operationsdataflow_worker.shuffle_operationsdebugdebug_logging_enableddeclaring_stepdefaultdictdelayed_applications__dict___dict__doc__dynamic_timer_tagelelement_counterelement_samplerelementsencode__enter__enumerateexecuteexecution_contextexecution_time_monitoring_infos__exit__explode_batchfilterfinalizefinalize_bundlefinishfire_timestampflush_fnfnfnsfraction_completedfraction_of_remainderfraction_remainingfrom_windowed_values__func__getgetLoggerget_batching_preferenceget_dofn_specsget_implget_input_batch_converterget_iterator_fn_for_sourcesget_output_batch_converterget_output_samplerget_range_tracker_get_runtime_performance_hints__getstate__has_callbackshas_elementiindex__init____init__..inputinput_batch_converterinput_indexinputsint64_cou""nterint64_distributioniobaseisEnabledFor_is_coroutineis_defaultis_recursiveis_streamingitemsiterator_fnixkeykwkwargslabelslimitloadslogginglogging_name__main__main_input_codermain_input_tagmap_task_map_taskmaxmax_sizemax_timestampmeanmean_byte_counter__metaclass__metrics_containermetrics_namemetrics_pb2min__missing____module__monitoring_infos__mro_entries____name__namename_contextname_contextsneeds_finalization__new__nextoobjectonceopopcounteropcountersoperationoperation_nameoperation_specsoperations_opsoutputoutput_batch_converteroutput_bufferoutput_coderoutput_codersoutput_indexoutput_keyoutput_numoutput_sampleroutput_tagsoutput_valueoutputspaneinfopayloadpcollectionpcollection_count_monitoring_infosphasepicklerpop__prepare__primariesprimaryprintable_fieldsprintable_nameprocessprocess_batch_process_batch_defined_process_definedprocess_timerprocess_user_timerprocess_with_sized_restrictionproduce_batchproduce_fnproducerproducer_batch_converterproducer_type_hintsprogressptransform__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_CombineOperation__pyx_unpickle_ConsumerSet__pyx_unpickle_DoOperation__pyx_unpickle_FlattenOperation__pyx_unpickle_GeneralPurposeConsumerSet__pyx_unpickle_ImpulseReadOperation__pyx_unpickle_Operation__pyx_unpickle_PGBKCVOperation__pyx_unpickle_ReadOperation__pyx_unpickle_SdfProcessSizedElements__pyx_unpickle_SdfTruncateSizedRestrictions__pyx_unpickle_SingletonElementConsumerSet__pyx_vtable____qualname__readread_counter_read_side_inputs_read_side_inputs..receivereceive_batchreceiverreceivers__reduce____reduce_cython____reduce_ex__remaining_workresetresidualresidualsrestart_samplingreturnreversed_runtime_output_constraintssampled_msecs_intsamplersampler_for_outputscoped_process_statescoped_stateselfsendserialized_fn__set_name__setdefault__setstate____setstate_cython__setupsetup..get_output_samplershuffle_sinkshuffle_sourcesisi_counterside_input_mapside_input_mapsside_inputsside_tagsideinput""ssimplefiltersizesourcesourcesspecsplitstartstart_positionstatestate_sampler_state_samplerstaticmethodstep_name_step_namestop_positionstr_internalsuffixsumsupersupports_batchessupports_elementstabletagtag_to_pcollection_idtagged_receiverstags_and_typestargetteardown__test__test_shuffle_sink_test_shuffle_sinktest_shuffle_source_test_shuffle_sourcethreadingthrowtimer_datatimer_family_idtimer_infotimer_spectimestamptimestamp_combinerto_keyto_runner_api_monitoring_infostotaltotal_output_bytestransform_idtry_splittypetypingunused_impulseupdateupdate_counters_batchupdate_counters_finishupdate_counters_starturnuse_setstateuser_keyuser_monitoring_infosuser_state_contextuserstatevvaluevaluesview_classview_optionsvswarnwarningswindowwindow_fnwindowed_batchwindowed_valuewindowfnwindowingwindowswith_completedwkeywkvworker_printable_fieldswrite_windowed_valueszipPyObject *\000PyTypeObject *\000_BYTE_TO_PANE_INFO\000TimestampPyObject *\000\000_DEFAULT\000get_current_trackerPyTypeObject *\000\000TaggedOutput\000TimestampedValuePyTypeObject *\000struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *\000_global_window_type\000_globally_windowed_value\320\0020\260\001\340\004\025\220Q\220d\230*\240A\240^\2608\2701\270A\200!\360\016\000\005\014\2101\200\001\330\004+\2501\250F\260!\200!\360\024\000\005\014\2101\320\002)\250\021\360\006\000\005\014\2101\320\002*\250!\360\006\000\005\014\2101\200!\330\004\013\2101\200!\340\004\013\2101\200!\360\n\000\005\014\2101\200!\340\004\005\330\010\014\320\014\037\320\0371\260\023\260A\330\010\014\320\014!\320!3\2603\260a\330\010\014\320\014 \320 2\260!\330\004\n\210!\330\010\030\230\016\240a\330\014\034\230A\330\014\020\320\020#\320#5\260Q\330\014\027\220q\330\010\030\230\016\240a\330\014\034\230A\330\014\020\320\020%\320%7\260q\330\014\027\220q\330\010\030\230\016\240a\330\014\034\230A\330\014\020\320\020$\320$6\260a\330\014\027\220q\330\010\030\230\016\240a\330\014\034\230A\330\014\r\330\014\027\220q\340\004\013\2101\320\014\034""\230G\2401\240E\250\023\250D\260\006\260a\320\0021\260\021\360\010\000\005\t\210\n\220!\220=\240\007\240q\250\001\200\001\330\0042\260!\2606\270\021\200!\360\010\000\005\014\2104\320\017!\320!@\300\001\300\021\200!\340\004\013\2104\210|\320\0332\260.\300\001\200!\340\004\013\2104\320\017!\240\027\250\001\330\t\r\210Q\330\006\007\330\r\021\220\021\330\n\016\210a\330\014\020\320\020!\320!4\260A\330\n\016\210l\230$\320\036/\250w\260a\330\014\024\220J\320\036/\250q\360\006\000\t \230t\240<\320/N\310a\330\014\r\330\010\013\2101\330\n\021\220\024\320\025(\250\007\250q\330\n\016\320\016%\240Q\330\014\020\320\020\"\320\"7\260w\270a\330\021\027\220q\340\r\021\220\021\330\n\016\320\016,\250A\200!\360\010\000\005\034\2304\320\037?\270q\300\001\330\004\030\230\007\230q\330\010\014\320\014/\250q\260\001\330\004\030\230\007\230q\240\004\320$:\270!\2701\330\004\013\2101\200!\340\004\013\2104\210u\220A\200!\340\004\013\2104\210y\230\n\240!\2401\200!\330\004\013\2104\210y\320\0301\260\021\200!\340\004\013\2104\210z\230\021\230\"\320\0345\260Q\200!\360\006\000\005\014\2104\210z\230\021\230\"\230J\240a\240q\200\001\330\0045\260Q\260f\270A\200\001\330\004:\270!\2706\300\021\200!\340\004\013\2106\320\021$\240A\200!\340\004\013\2106\220\021\320\022\"\240!\330\004\t\210\021\320\n\034\230E\240\027\250\001\320\002)\250\021\330\004\013\2107\220!\2204\220u\320\0345\260Q\320\002*\250!\330\004\013\2107\220!\2204\220u\320\0346\260a\200\001\330\0047\260q\270\006\270a\3008\3101\200\001\330\0049\270\021\270&\300\001\200!\330\004\010\320\010\033\230?\250!\320+<\270A\200!\340\004\010\210\n\320\022$\240A\240Q\200!\340\004\014\210A\330\004\010\210\014\220D\230\007\230q\330\006\021\220\030\230\032\320#3\2606\270\021\330\006\t\210\031\220\"\220A\330\010\020\220\010\230\n\320\"4\260F\270#\270Q\270a\330\010\021\220\031\230\"\230A\330\004\013\2101\320\002*\320*<\270A\330\004\010\210\014\220N\240!\2401\200!\330\004\010\320\010\034\230A\330\004\010\210\016\220a\200!\340\004\014\210D\220\014\230J\240a\240q""\330\004\007\200q\330\006\021\220\034\230Q\330\006\r\210R\210v\220Y\230d\240+\250Q\330\021\023\2206\230\032\2404\240|\2601\330\004\013\2101\200!\340\004\014\210D\220\006\220b\230\001\330\004\010\210\005\210T\220\027\230\t\240\021\240$\240a\240t\2506\260\026\260q\330\006\t\210\023\210C\210q\330\010\t\330\006\n\210$\210f\220A\220Q\330\006\013\210:\220Q\330\006\025\220Q\220a\220v\230Q\230c\240\024\240U\250!\330\006\027\220}\240B\240e\2501\330%'\240q\250\002\250!\330%&\330\006\n\210'\220\021\220!\200!\330\004\014\210D\220\006\220d\230!\2306\240\021\330\004\007\200v\210S\220\001\330\006\t\210\024\210[\230\003\2304\230q\330\010\021\220\024\220[\240\002\240\"\240C\240q\330\010\024\220A\340\010\014\210J\220n\240D\250\006\250f\260A\330\n\023\2207\230!\2301\330\n\016\210k\230\021\230*\240J\250a\250t\260:\270Q\270a\330\n\016\210n\230A\330\n\r\210T\220\033\230C\230q\330\014\r\330\010\014\210L\230\010\240\001\240\021\330\n\016\210d\220&\230\001\230\021\330\006\n\210.\230\001\360\006\000\007\017\210d\220&\230\001\230\030\240\021\330\n\016\210k\320\031,\250D\260\001\340\004\t\210\021\210%\210t\320\023(\250\001\250\025\250a\250t\2601\330\004\007\200t\2104\320\017%\240T\250\024\250Q\330\006\013\2101\210E\220\024\320\025(\250\010\260\001\260\025\260a\260t\2701\200!\360\010\000\005\t\210\014\220D\230\001\330\006\027\220q\230\t\240\026\240q\200!\360\010\000\005\r\210E\220\021\330\010\t\330\010\r\320\r0\260\001\260\021\340\004\007\200t\2101\330\006\n\210%\210|\2304\320\0370\260\006\260a\330\010\013\2103\210a\210u\220G\2301\330\n\013\330\010\031\320\031.\250a\250s\260!\2601\330\010\r\320\r\035\230^\2501\330\014\034\230A\330\014\024\220J\320\036.\250f\260A\330\014\030\230\001\330\010\r\210Q\320\016\036\230g\240Q\240g\250Q\330\t\026\220e\2307\240%\240q\330\014\024\220J\320\0360\260\006\260a\330\010\035\320\035-\320-@\300\001\330\014\034\230A\330\014\034\230A\230U\240'\250\025\250a\330\014\030\230\001\330\010\r\210Q\320\016\036\230g\240Q\320&=\270Q\330\004\013\2101\200!\340\004\010\210\014""\220I\230Q\200!\340\t\r\210Q\330\006\013\2101\210M\230\025\230f\240A\330\006\n\210,\320\026+\2504\250q\330\006\n\210,\220f\230A\200!\330\t\r\210Q\330\006\013\2101\210O\2305\240\006\240a\330\006\026\220d\230%\230w\240g\320-?\270q\330\n\016\210e\2207\320\032+\2504\250u\260G\2701\330\006\n\210)\2204\220u\230G\2407\250%\250q\260\001\330\010\013\210:\220Q\220g\230Q\330\n\033\2301\340\n\033\320\0333\260;\270a\270q\330\010\014\210G\2201\220A\210\001\330\n\r\210]\230#\230Q\330\014\023\2201\330\n\021\220\034\320\0350\260\001\260\036\270q\200!\330\t\r\210Q\330\006\023\2204\220|\2401\240A\330\006\n\210,\320\026)\250\021\330\n\013\330\n\024\220A\330\n\024\220H\230A\230Q\330\n\024\220A\330\n\024\220A\330\n\024\220A\200!\340\t\r\210Q\330\006\t\210\024\320\r)\250\027\260\001\330\010\023\2204\220|\320#<\270A\330\010\013\2109\220G\2301\330\n\021\220\024\320\025'\240w\250a\330\n\021\220\030\230\037\250\001\330\016\022\320\022#\320#6\260c\270\021\330\016\022\220!\330\006\r\210Q\200!\340\t\r\210Q\330\006\013\2108\2203\220a\360\006\000\007\n\210\024\210Q\330\010\014\210N\230!\2305\240\007\240q\340\010\014\210J\220c\230\021\330\n\016\210n\230B\230h\240a\330\035\036\330\035 \240\016\250d\3202K\3101\200!\340\t\r\210Q\340\006\014\210A\210V\2201\220D\230\005\230Q\230a\230q\330\006\n\210&\220\001\220\024\220W\230A\230Q\330\006\n\210)\2201\330\006\t\210\024\210V\2202\220T\230\021\330\010\014\210F\220!\2202\220R\220t\230:\240S\250\001\200!\360\n\000\007\010\330\006\007\360\036\000\005\t\210\r\220Q\330\004\010\320\010\034\230A\330\004\010\210\010\220\001\330\004\010\320\010\032\230!\330\004\010\320\010 \240\001\330\004\010\320\010\036\230a\200!\340\t\r\210Q\330\006\t\210\024\210Q\330\010\017\210v\220Q\320\026/\250s\260!\330\006\n\210'\220\021\220!\200!\340\t\r\210Q\330\006\t\210\024\210Q\330\010\017\210v\220Q\320\026/\250s\260!\330\006\013\2109\220A\220Q\330\006\n\210'\220\021\220!\220;\230b\240\005\240T\320);\2706\300\021\300!\200!\340\t\r\210Q\330\006\t\210\024\210Q\330\010\017\210v\220Q\320""\026/\250s\260!\330\006\n\210%\210~\230W\240A\330\n\017\210t\2205\320\0304\260A\260Q\200!\340\t\r\210Q\330\006\035\230T\240\034\250X\260Q\260a\330\006\t\210\021\330\010\017\210t\320\023&\240g\250Q\330\010\014\320\014#\2401\330\n\016\320\016 \320 5\260W\270A\330\017\025\220Q\200!\340\t\r\210Q\330\006\r\210V\2201\320\024.\250a\330\006\013\2101\320\014\035\230U\240)\2501\330\006\n\210+\220Y\230a\200!\340\t\r\210Q\330\006\r\210V\2201\320\024.\250a\330\006\013\2101\320\014\036\230e\2409\250A\330\006\n\320\n\034\230K\240y\260\001\200!\340\t\r\210Q\330\006\026\220d\230'\320!3\2601\260F\270!\330\006\n\210)\2204\220w\230e\2401\240A\330\010\013\210:\220Q\220g\230Q\330\n\033\2301\340\n\033\320\0333\260;\270a\270q\330\010\014\210G\2201\220A\200!\340\t\r\210Q\330\006\n\210,\220i\230q\330\004\007\200t\2101\330\006\n\320\n\035\230V\2401\200\001\330\004-\250Q\250f\260A\200\001\360\010\000\005\006\330\004\005\330\004\005\330\004\005\330\004\005\360\014\000\003\006\200T\210\032\2201\220N\240&\250\001\330\004\023\2206\230\034\240Q\240j\260\001\340\002\005\200Z\210q\220\006\220o\240Q\330\004\007\200z\220\021\220$\220i\230v\240Q\330\006\013\210=\230\001\330\n\030\230\006\320\036/\250q\340\006\013\320\0134\260A\330\006\013\320\013\036\230a\330\n\030\230\006\320\036/\250q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t2\260!\330\004\t\320\t\035\230Q\330\010\026\220f\320\034-\250Q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t\031\230\021\230.\250\006\320.?\270q\330\007\021\220\021\220&\230\017\240q\330\004\t\210\036\220q\230\016\240f\320,=\270Q\330\007\021\220\021\220&\230\017\240q\330\004\t\210\033\220A\220^\2406\320):\270!\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t3\2601\330\004\t\320\t$\240A\330\010\t\330\010\t\330\010\t\330\010\t\330\010\027\220q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t3\2601\330\004\t\320\t&\240a\330\010\t\330\010\t\330\010\t\330\010\t\330\010\027\220q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t\037\230q\330\010\026\220f""\320\034-\250Q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t3\2601\330\004\t\320\t\036\230a\330\010\t\330\010\t\330\010\t\330\010\t\330\010\025\220Q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t\031\230\021\230.\250\006\320.?\270q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t3\2601\330\004\t\320\t3\2601\330\004\007\200q\330\006\013\320\013/\250q\330\n\030\230\006\320\036/\250q\340\006\013\320\013+\2501\330\n\030\230\006\320\036/\250q\330\007\021\220\021\220&\230\017\240q\330\004\t\320\t3\2601\330\004\t\320\t*\250!\330\010\026\220f\320\034-\250Q\340\004\n\210)\2201\330\010\t\330\033\034\330\002\t\210\021\200\001\360\010\000\005\016\210T\220\030\230\024\230[\250\004\250L\270\004\320\250\021\250&\260\013\2701\340\t\r\210Q\330\006\016\210e\2201\220A\330\024\031\320\031*\250!\250>\270\021\330\006!\240\024\320%>\270a\330\006\t\210\021\330\010\013\320\013#\2401\330\n\026\320\026.\250a\330\n\026\320\026.\250a\340\n\026\320\026.\250a\330\n\026\320\026.\250a\330\010\017\210z\230\027\240\001\330\010\017\210z\230\027\240\001\330\010\027\220{\240/\260\021\330\014\020\320\020 \240\001\330\014\021\320\021!\240\021\330\014\023\320\023#\240>\260\021\260+\270Q\330\014\024\220N\240'\250\021\250!\2501\330\010\027\220{\240/\260\021\330\014\020\320\020 \240\001\330\014\021\320\021!\240\021\330\014\023\320\023#\240>\260\021\260+\270Q\330\014\024\220N\240'\250\021\250!\2501\330\010\r\210Q\320\016\036\230g\240Q\320&7\260q\330\010\r\210Q\320\016\036\230g\240Q\320&7\260q\330\004\013\2101\200\001\340\004\021\320\021\"\240!\200\001\340\004\021\320\021!\240\021\200!\340\004\010\210\n\220/\240\021\200\001\330\004)\250\021\250&""\260\001\200!\330\004\n\210.\230\001\330\010\t\320\002!\240\021\200!\340\004\010\320\010\032\230&\240\001\200!\320\002&\240a\360\022\000\005\026\220T\230\032\2401\330\004\007\200w\210a\210v\220Q\330\006\030\230\006\230b\240\004\240M\260\035\270a\330\006\t\210\021\340\010\017\210w\220b\230\001\340\004\007\200t\2106\220\023\220A\330\006\031\230\021\340\006\031\230\037\320(@\300\001\300\024\300Q\340\004\007\200t\210=\230\004\230G\2401\240F\250-\260q\330\006\026\220g\230Q\330\n\033\2301\330\n\016\210e\2201\220A\220S\230\001\230\032\2404\240|\2604\260q\340\004\013\210=\320\030(\250\004\250E\260\021\260!\200!\340\004\010\210\006\210a\210q\330\004\t\210\022\2107\220!\200!\360\006\000\005\t\320\010\036\230a\230q\340\004\010\210\014\220D\230\001\330\006\030\230\001\230\031\240(\250!\2501\360\006\000\005\010\200t\2101\330\006\n\320\n\034\230G\2401\240A\330\006\t\210\023\210A\210T\320\021%\240S\250\004\250A\330\010\014\210F\220!\360\010\000\005\t\320\010\037\230q\200!\340\004\010\320\010\036\230a\230q\330\004\010\210\t\220\030\230\021\230!\330\004\010\320\010\037\230q\200!\340\004\010\210\n\220,\230a\230q\340\004\007\200t\320\013\036\230g\240Q\330\006\n\320\n\034\320\034.\250d\260!\360\020\000\005\010\200t\320\013\034\230G\2401\330\006\t\210\024\210T\320\021!\240\021\330\010\014\320\014\034\230F\240!\330\010\014\320\014\034\230O\2501\200\001\330\004.\250a\250v\260Q\200!\330\004\010\210\001\210\027\220\013\230;\240g\250Q\330\010\014\320\014\037\230t\240=\260\005\260T\270\026\270v\300Q\330\004\013\2101\200!\360 \000\005\t\210\016\220h\230c\240\021\240$\240j\260\001\330\"&\240j\260\001\340\006\013\320\013\033\2301\330\n\013\330\n\013\330\n\016\210a\330\n\013\330\n\016\210a\330\n\036\230d\240!\330\n\034\230D\240\001\330\006\n\210%\210w\220a\220q\360\006\000\007\n\210\027\220\001\220\022\2207\230!\330\010\022\220/\240\022\2405\250\001\330\010\014\210E\220\021\220)\230=\250\001\250\024\250Q\340\006\t\210\027\220\001\220\022\2207\230!\330\010\014\210J\320\026&\240b\250\005\250Q\330""\n\016\210e\2201\220I\230]\250!\2504\250q\340\004\010\210\004\210F\220(\230!\2304\230q\240\t\250\021\250$\250a\330\006\r\210V\2201\320\024)\250\024\250Q\330\006\010\210\006\210a\330\004\010\210\006\210d\220!\330\006\010\210\007\210q\200!\340\004\010\210\006\210i\220t\2306\240\026\240q\330\006\n\210+\220Q\220f\230E\240\021\240$\240e\2501\250A\330\004\010\210\t\220\021\330\004\010\210\r\220Q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220?\240(\250!\2501\330\004\007\200|\2207\230!\330\0101\260\021\3202D\300N\320RS\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023*\250(\260!\2601\330\004\007\200|\2207\230!\330\0109\270\021\320:T\320Tb\320bc\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023#\2408\2501\250A\330\004\007\200|\2207\230!\330\0102\260!\3203F\300n\320TU\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2209\230H\240A\240Q\330\004\007\200|\2207\230!\330\010+\2501\250L\270\016\300a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023,\250H\260A\260Q\330\004\007\200|\2207\230!\330\010;\2701\320\\\320\\j\320jk\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220;\230h\240a\240q\330\004\007\200|\2207\230!\330\010-\250Q\250n\270N\310!\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023'\240x\250q\260\001\330\004\007\200|\2207\230!\330\0106\260a\3207N\310n\320\\]\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023/\250x\260q\270\001\330\004""\007\200|\2207\230!\330\010>\270a\320?^\320^l\320lm\330\004\013\2101\200!\330\004\n\210'\220\026\220q\230\004\230E\240\021\330\004\007\200t\2104\210w\220a\220s\230!\2304\230q\330\006\r\210S\220\001\220\022\2201\340\004\013\2101\320\002\037\230q\340\t\r\210Q\330\006\013\2101\210M\230\025\230f\240A\240Q\360\006\000\007\013\210&\220\010\320\030(\250\001\330\n\021\220\026\220q\230\004\230E\240\021\340\006\016\210f\220J\230a\230t\2401\330\006\013\210=\230\004\230M\250\035\260a\360\014\000\007\013\320\n\036\320\036.\250a\330\n\016\320\016 \240\004\240M\260\035\270a\340\006\t\210\023\210A\210T\220\025\220n\240C\240q\330\010\014\320\014\035\230Q\230h\240d\250*\260A\260Q\330\010\014\320\014\035\230Q\230d\240%\240|\2601\260F\270$\270j\310\001\310\021\340\010\014\210G\2207\230)\2401\240D\250\005\250Q\330\n\016\320\016\037\230q\240\007\240t\250:\260Q\260a\330\n\r\210T\220\023\220A\330\014\020\320\020!\240\021\240(\250$\250j\270\001\270\021\340\006\t\210\024\210Q\330\010\014\210O\2301\330\014\020\220\007\220q\330\014\020\220\010\230\t\240\037\260\001\260\023\260A\260Q\360\006\000\007\n\210\024\320\r\036\230c\240\021\330\010\013\2101\330\n\016\320\016!\240\024\240Q\240d\320*<\270A\270Q\340\n\016\320\016!\240\021\340\006\n\210/\230\026\230{\250!\330\n\013\330\n\013\330\n\013\330\n\016\210a\330\n\013\330\n\033\2304\230q\330\n\024\220D\230\r\240]\260!\330\n\020\220\001\330\n\035\230T\240\021\330\n\027\220t\230=\250\001\330\n\031\230\024\230]\250-\260q\330\006\n\210,\220f\230A\320\002\037\230q\360\014\000\n\016\210Q\330\006\n\320\n\032\230!\330\006\n\320\n#\2407\250*\260B\260m\3001\330\n\021\220\021\330\006\025\220T\230\035\240a\360\n\000\007\n\210\027\220\001\220\024\220W\320\034-\250Q\340\010\t\360\n\000\t\r\210M\230\021\330\014\027\220w\230a\330\020\024\220A\330\020\024\220M\240\035\250a\330\020\021\330\020\024\220J\230a\230q\330\020\021\330\020\024\320\0243\2601\330\020\024\320\024/\250q\330\020\"\240!\2401\330\014\020\220\003\2209\230I\240Q\240d\250%\250q\340\004\010\210\016""\220a\320\002\037\230q\340\t\r\210Q\330\006\r\210V\2201\320\024+\2501\330\006\013\2101\320\014\035\230U\240&\250\001\250\021\330\006\n\210+\220V\2301\320\002\037\230q\340\t\r\210Q\330\006\r\210V\2201\320\024+\2501\330\006\013\2101\320\014\036\230e\2406\250\021\250!\330\006\n\320\n\034\230K\240v\250Q\200\001\330\004'\240q\250\006\250a\200!\360\020\000\005\010\200s\210!\2104\210|\2303\230b\240\003\2403\240a\320'>\270c\300\021\330\006\r\210Q\340\004\033\2301\330\004\025\220T\230\021\230$\230a\320\0374\260G\2701\330\004\017\210t\220:\230Q\230a\330\004\024\320\024$\240N\260!\330\010\030\230\001\330\010\020\220\n\320\032*\250&\260\001\330\010\024\220A\360\006\000\006\023\220%\220w\230e\2401\330\010\020\220\n\320\032,\250F\260!\340\004\031\320\031)\320)<\270A\330\010\030\230\001\330\010\030\230\001\230\025\230g\240U\250!\330\010\024\220A\340\004\030\230\001\320\031)\250\027\260\001\3201C\3001\330\004\030\230\001\320\031)\250\027\260\001\330\010\037\230q\340\004\013\2101\200!\360\022\000\026\027\360\006\000\005\010\200s\210!\210;\220c\230\021\330\006\021\220\031\230!\2301\340\006\"\240(\320*B\300!\330\006!\240\030\320)C\3001\330\006\n\210$\320\016'\320'9\270\021\330\n#\2403\240e\2501\330\n#\2403\240a\330\010\017\320\017*\250!\330\014\r\330\014\r\330\014\r\330\014\r\330\014\r\330\014\r\330\014\r\340\004\013\320\013$\240A\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\200!\330\004\007\200t\2101\330\006\n\210&\220\016\320\0361\260\021\330\n\016\320\016'\240q\330\010\014\210L\230\004\230A\330\n\034\230A\230Y\240h\250a\250q\340\004\010\210\014\220D\230\001\330\006\030\230\001\230\031\240.\260\001\260\021\340\004\t\210\021\330\t\027\220t\320\0331\260\026\260q\360\010\000\007\013\210,\220a\330\010\020\220\005\220Q\330\014!\240\021\240!\330\014\016\210a\210t\320\023,\250A\330\014\016\210a\320\017'\240q\360\006\000\r\016\330\010\032\230!\2309\240N\260!\330\014\032\230,\240a\330\020(\250\016\260a\330\024\030\320\0301\260\036\270q\330\030&\240a\340""\004\010\320\010\036\230a\230q\200!\330\004\007\200t\2103\210a\330\006\t\210\024\210S\220\001\330\010\017\210v\320\025(\250\001\340\010\017\210v\320\025(\250\001\340\006\r\210V\320\023&\240a\200!\330\004\007\200t\2104\320\017$\240C\240t\2504\250q\330\006\007\340\004\010\320\010\031\230\035\240d\320*@\300\006\300a\330\006\n\320\n\034\230M\320)>\270a\330\n\016\320\016\"\240+\250_\270A\330\010\014\210L\230\001\330\n\034\230A\230Y\240n\260A\260Q\340\004\010\210\014\220D\230\001\330\006\n\320\n\034\230M\320)>\270a\330\n\016\210a\330\n\025\220T\320\0312\260!\330\010\032\230!\2309\240N\260!\2601\340\004\010\320\010\035\230Q\200!\360\010\000\005\010\200t\2104\210q\340\006\n\210&\220\001\220\024\220Q\360\010\000\005\010\200t\210>\230\027\240\001\330\006\n\210,\220d\230!\330\010\020\320\020%\240T\250\021\200!\330\004\007\200t\320\013\037\230s\240!\330\006\016\210a\340\006\016\210d\320\022%\240Q\240a\340\004\007\200t\2101\330\006\n\210'\220\021\320\022*\250+\260R\260v\270Q\340\006\016\210f\220A\330\006\t\210\024\320\r!\240\023\240A\330\010\024\220F\230.\250\001\330\006\n\210'\220\021\220-\230r\240\025\240h\250l\270!\200!\340\004\t\210\021\210-\220u\230F\240!\330\004\010\320\010\032\230$\230a\330\006\024\220F\230!\330\004\007\200t\2101\330\006\n\320\n\035\230V\2401\330\004\010\210\014\320\024+\2506\260\021\200!\340\004\t\210\021\210-\220u\230G\2401\330\t\r\210Q\330\006\n\210,\220g\230Q\330\006\t\210\024\210Q\330\010\014\320\014\037\230w\240a\200!\330\004\t\210\021\210!\330\n\017\210y\230\001\230\036\240v\320->\270a\330\004\013\2104\210t\2205\230\001\330\004\010\210\t\220\033\230L\250\001\250\021\330\004\010\210\010\220\001\340\004\010\210\017\220q\220z\240\021\240%\240s\250!"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 612; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 41) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 612; i < 733; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 733; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 612; + for (Py_ssize_t i=0; i<121; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,1,3,9,10}; + int16_t const cint_constants_2[] = {4096,10000}; + int32_t const cint_constants_4[] = {332273L,13052437L,54202627L,60572958L,106916135L,136289111L,157929342L,232423418L,267513676L}; + for (int i = 0; i < 16; i++) { + numbertab[i] = PyLong_FromLong((i < 5 ? cint_constants_1[i - 0] : (i < 7 ? cint_constants_2[i - 5] : cint_constants_4[i - 7]))); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<16; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 4; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 5; + unsigned int flags : 10; + unsigned int first_line : 11; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 317}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 479}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_output_num}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_output_sampler, __pyx_mstate->__pyx_kp_b_iso88591_Q_1_0_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 820}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tags_and_types, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_side_tag, __pyx_mstate->__pyx_n_u_view_class, __pyx_mstate->__pyx_n_u_view_options, __pyx_mstate->__pyx_n_u_sources, __pyx_mstate->__pyx_n_u_si, __pyx_mstate->__pyx_n_u_si_counter, __pyx_mstate->__pyx_n_u_element_counter, __pyx_mstate->__pyx_n_u_iterator_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_read_side_inputs, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 855}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_z_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_cast_to_operation, __pyx_mstate->__pyx_kp_b_iso88591__10, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 101}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_cast_to_receiver, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 116}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_output_index, __pyx_mstate->__pyx_n_u_consumers, __pyx_mstate->__pyx_n_u_coder, __pyx_mstate->__pyx_n_u_producer_type_hints, __pyx_mstate->__pyx_n_u_producer_batch_converter, __pyx_mstate->__pyx_n_u_output_sampler, __pyx_mstate->__pyx_n_u_consumer, __pyx_mstate->__pyx_n_u_consumer_batch_preference, __pyx_mstate->__pyx_n_u_consumer_batch_converter}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_create, __pyx_mstate->__pyx_kp_b_iso88591_s_c_1_B_C1_9_3e1_3a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 182}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction_of_remainder}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 191}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 203}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_update_counters_start, __pyx_mstate->__pyx_kp_b_iso88591_aq_t_gQ_d_t_G1_T_F_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 221}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_update_counters_finish, __pyx_mstate->__pyx_kp_b_iso88591__12, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 225}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_update_counters_batch, __pyx_mstate->__pyx_kp_b_iso88591_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_tCWW_ggkkzz_P_P_T_T_U_G1F_a_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 260}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_receive, __pyx_mstate->__pyx_kp_b_iso88591_aq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_receive_batch, __pyx_mstate->__pyx_kp_b_iso88591__14, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 270}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 274}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction_of_remainder}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_4y_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 278}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_4y_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_L_NdRffjjvvz_J_J_N_N_____c_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 344}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_receive, __pyx_mstate->__pyx_kp_b_iso88591_aq_D_1_t1_G1A_AT_S_A_F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 362}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_receive_batch, __pyx_mstate->__pyx_kp_b_iso88591_t1_1_q_L_A_AYhaq_D_t_1_q_a_Q_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 393}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591_t4_Ct4q_d_a_M_a__A_L_AYnAQ_D_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_EYY_oos_t_H_H_L_L_b_b_f_f_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_7q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 462}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data_sampler, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_get_output_sampler, __pyx_mstate->__pyx_n_u_get_output_sampler, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_coder}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_setup, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_7_Bm1_T_a_W_Q_M_wa_A_M_a_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 498}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_t4q_Q_t_d_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 512}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_batching_preference, __pyx_mstate->__pyx_kp_b_iso88591_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 516}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_input_batch_converter, __pyx_mstate->__pyx_kp_b_iso88591_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 521}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_output_batch_converter, __pyx_mstate->__pyx_kp_b_iso88591_1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 526}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 532}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process_batch, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 535}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finalize_bundle, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 539}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_needs_finalization, __pyx_mstate->__pyx_kp_b_iso88591_1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 542}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction_of_remainder}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 546}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 549}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_D_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 556}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_teardown, __pyx_mstate->__pyx_kp_b_iso88591__9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 564}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591__16, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 568}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_output_index}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_output, __pyx_mstate->__pyx_kp_b_iso88591_0_Qd_A_81A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 572}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_operation, __pyx_mstate->__pyx_n_u_output_index}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_add_receiver, __pyx_mstate->__pyx_kp_b_iso88591_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 578}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_tag_to_pcollection_id}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_monitoring_infos, __pyx_mstate->__pyx_kp_b_iso88591_4_q_q_q_q_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 588}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag_to_pcollection_id}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_pcollection_count_monitoring_inf, __pyx_mstate->__pyx_kp_b_iso88591_s_4_3b_3a_c_Q_1_T_a_4G1_t_Qa_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 622}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_user_monitoring_infos, __pyx_mstate->__pyx_kp_b_iso88591_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 628}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_transform_id}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_execution_time_monitoring_infos, __pyx_mstate->__pyx_kp_b_iso88591_1_A_33a_2_a_A_5Q_q_a_A_7q_q_a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 667}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_is_recursive, __pyx_mstate->__pyx_n_u_printable_name, __pyx_mstate->__pyx_n_u_printable_fields, __pyx_mstate->__pyx_n_u_receiver}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_str_internal, __pyx_mstate->__pyx_kp_b_iso88591_a_T_1_wavQ_b_M_a_wb_t6_A_Q_t_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 695}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_runtime_performance_hints, __pyx_mstate->__pyx_kp_b_iso88591_1_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 704}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_Q_1O5_a_d_wg_q_e7_4uG1_4uG7_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 741}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_impulse}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_d_31F_4we1A_QgQ_1_3_aq_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 755}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_vQ_s_WA_t5_4AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 765}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_step_name}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 769}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_receiver}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_kp_b_iso88591_gQ_t_T_vQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 774}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total, __pyx_mstate->__pyx_n_u_receiver, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_mean}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_total_output_bytes, __pyx_mstate->__pyx_kp_b_iso88591_A_D_q_36_A_4F_Qa_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 876}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data_sampler, __pyx_mstate->__pyx_n_u_fn_2, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_tags_and_types, __pyx_mstate->__pyx_n_u_window_fn, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_spec}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_setup, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_1M_fAQ_q_E_fJat1_M_a_a_M_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 930}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_Q_1M_fA_4q_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 937}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_batching_preference, __pyx_mstate->__pyx_kp_b_iso88591_t3a_S_v_v_V_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 946}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_input_batch_converter, __pyx_mstate->__pyx_kp_b_iso88591_7_4u_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 949}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_output_batch_converter, __pyx_mstate->__pyx_kp_b_iso88591_7_4u_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 952}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_T_XQa_t_gQ_1_5WA_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 962}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_windowed_batch}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process_batch, __pyx_mstate->__pyx_kp_b_iso88591_A_N_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 965}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finalize_bundle, __pyx_mstate->__pyx_kp_b_iso88591_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 969}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_needs_finalization, __pyx_mstate->__pyx_kp_b_iso88591_4_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 973}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timer_family_id, __pyx_mstate->__pyx_n_u_timer_info}; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_add_timer_info, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 976}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_timer_data, __pyx_mstate->__pyx_n_u_timer_spec}; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process_timer, __pyx_mstate->__pyx_kp_b_iso88591_Q_4_1A_A_HAQ_A_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 987}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_uG1_Q_gQ_Q_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 995}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_teardown, __pyx_mstate->__pyx_kp_b_iso88591_Q_iq_t1_V1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1002}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_side_input_map}; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_uF_a_F_t1_V1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1011}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag_to_pcollection_id}; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_pcollection_count_monitoring_inf, __pyx_mstate->__pyx_kp_b_iso88591_E_0_t1_4_0_a_3auG1_as_1_1_A_J_f, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1038}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fns}; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_get_runtime_performance_hints, __pyx_mstate->__pyx_kp_b_iso88591_q_E_t4was_4q_S_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_M_M_Q_Q_V_V, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1050}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_4z_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1054}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction_of_remainder}; + __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_4z_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_M_M_Q_Q_V_V_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1066}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_4_Q_a_4A_l_wa_J_q_t_Na_1_q_Q_7w, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1089}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fraction_of_remainder, __pyx_mstate->__pyx_n_u_split, __pyx_mstate->__pyx_n_u_primaries, __pyx_mstate->__pyx_n_u_residuals, __pyx_mstate->__pyx_n_u_primary, __pyx_mstate->__pyx_n_u_residual}; + __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_try_split, __pyx_mstate->__pyx_kp_b_iso88591_D_Jaq_q_Q_RvYd_Q_6_4_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1098}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_progress}; + __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_current_element_progress, __pyx_mstate->__pyx_kp_b_iso88591_Q_4_A_9G1_wa_6c_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1110}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_transform_id, __pyx_mstate->__pyx_n_u_tag_to_pcollection_id}; + __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_monitoring_infos, __pyx_mstate->__pyx_kp_b_iso88591_V_1_Q_e1A_a_1_a_a_a_a_z_z_Q_N_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffttx_y_V_V_Z_Z_n_n, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_5QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1155}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_setup, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_V1_1_1_e6_KvQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1162}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_vQ_s_9AQ_b_T_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1170}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_6_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1175}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_teardown, __pyx_mstate->__pyx_kp_b_iso88591_Q_V1_a_1_e9A_Ky, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1183}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_spec, __pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_state_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_create_pgbk_op, __pyx_mstate->__pyx_kp_b_iso88591_T_f_Q_F_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1197}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name_context, __pyx_mstate->__pyx_n_u_spec, __pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_state_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_y_v_a_4t5_L_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1206}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_key}; + __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_AV1D_Qaq_WAQ_1_V2T_F_2Rt_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1216}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_aq_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1221}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target, __pyx_mstate->__pyx_n_u_limit, __pyx_mstate->__pyx_n_u_ix, __pyx_mstate->__pyx_n_u_kw, __pyx_mstate->__pyx_n_u_vs, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_windows, __pyx_mstate->__pyx_n_u_output_value, __pyx_mstate->__pyx_n_u_windowed_value, __pyx_mstate->__pyx_n_u_v}; + __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591_D_b_T_at6_q_Cq_fAQ_Q_QavQc_U_Be, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1285}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data_sampler}; + __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_setup, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_V1_1_1_U_V1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1292}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_wkv}; + __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_83a_Q_N_5_q_Jc_nBha_d2K1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1306}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_wkey, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_add_key_value, __pyx_mstate->__pyx_kp_b_iso88591_D_d_6_vS_4q_Cq_A_JnD_fA_7_1_k_J, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1331}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_it6_q_QfE_e1A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1338}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_teardown, __pyx_mstate->__pyx_kp_b_iso88591_Q_V1_a_1_U_1_Ya, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1345}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_wkey, __pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_timestamp}; + __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_output_key, __pyx_mstate->__pyx_kp_b_iso88591_t_s_a_d_Qa_t1_RvQ_fA_A_F_r_hl, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_9_RRVVbbffxx_L_L_P_P_h_h_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1366}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_o}; + __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_process, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_vQ_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_T_34_dJbbffzz_S_S_W_W_f_f_j_j_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1374}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name_context, __pyx_mstate->__pyx_n_u_spec, __pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_state_sampler, __pyx_mstate->__pyx_n_u_test_shuffle_source, __pyx_mstate->__pyx_n_u_test_shuffle_sink, __pyx_mstate->__pyx_n_u_is_streaming, __pyx_mstate->__pyx_n_u_op, __pyx_mstate->__pyx_n_u_NativeReadOperation, __pyx_mstate->__pyx_n_u_NativeWriteOperation, __pyx_mstate->__pyx_n_u_GroupedShuffleReadOperation, __pyx_mstate->__pyx_n_u_UngroupedShuffleReadOperation, __pyx_mstate->__pyx_n_u_ShuffleWriteOperation, __pyx_mstate->__pyx_n_u_BatchGroupAlsoByWindowsOperation, __pyx_mstate->__pyx_n_u_StreamingGroupAlsoByWindowsOpera, __pyx_mstate->__pyx_n_u_ReifyTimestampAndWindowsOperatio}; + __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_create_operation, __pyx_mstate->__pyx_kp_b_iso88591_T_1N_6_Qj_Zq_oQ_z_ivQ_q_4A_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1464}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_map_task, __pyx_mstate->__pyx_n_u_counter_factory, __pyx_mstate->__pyx_n_u_state_sampler, __pyx_mstate->__pyx_n_u_test_shuffle_source, __pyx_mstate->__pyx_n_u_test_shuffle_sink}; + __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1492}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_operations, __pyx_mstate->__pyx_kp_b_iso88591_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1496}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name_context, __pyx_mstate->__pyx_n_u_spec, __pyx_mstate->__pyx_n_u_op, __pyx_mstate->__pyx_n_u_producer, __pyx_mstate->__pyx_n_u_output_index, __pyx_mstate->__pyx_n_u_ix}; + __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_opera_2, __pyx_mstate->__pyx_n_u_execute, __pyx_mstate->__pyx_kp_b_iso88591_hc_j_j_1_a_a_d_D_waq_7_5_E_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ConsumerSet, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SingletonElementC, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_GeneralPurposeCon, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_HAQ_7_1_XXffg_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Operation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ReadOperation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ImpulseReadOperat, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DoOperation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SdfTruncateSizedR, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_a_llm_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SdfProcessSizedEl, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_9_TTbbc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_CombineOperation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_PGBKCVOperation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_FlattenOperation, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* CIntToDigits (used by CIntToPyUnicode) */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode (used by COrdinalToPyUnicode) */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode (used by CIntToPyUnicode) */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + Py_ssize_t padding_length = ulength - 1; + if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) padding_length); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= padding_length; + memset(cpos, padding_char, (size_t) padding_length); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, padding_length); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(Py_ssize_t)*3+2]; + char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + Py_ssize_t remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (Py_ssize_t) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (Py_ssize_t) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (Py_ssize_t) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectCall2Args (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* RaiseClosureNameError */ +static void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* IterNextPlain (used by IterNext) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* IterNext */ +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(defval); + return defval; + } + if (defval) { + Py_INCREF(defval); + return defval; + } + __Pyx_PyErr_SetNone(PyExc_StopIteration); + return NULL; +} +static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { + __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator)); + PyErr_Format(PyExc_TypeError, + __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name); + __Pyx_DECREF_TypeName(iterator_type_name); +} +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { + PyObject* next; +#if !CYTHON_COMPILING_IN_LIMITED_API + iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc); + if (likely(iternext)) { + next = iternext(iterator); + if (likely(next)) + return next; + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + if (unlikely(iternext == &_PyObject_NextNotImplemented)) + return NULL; + #endif + } else if (CYTHON_USE_TYPE_SLOTS) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else +#endif + if (unlikely(!PyIter_Check(iterator))) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else { + next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator); + if (likely(next)) + return next; + } + return __Pyx_PyIter_Next2Default(defval); +} + +/* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + const char* function_name, + PyObject *kw) +{ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments) + CYTHON_UNUSED_VAR(function_name); + CYTHON_UNUSED_VAR(kw); + return 0; +#else + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { +#if PY_VERSION_HEX >= 0x03090000 + CYTHON_UNUSED_VAR(function_name); +#else + Py_ssize_t kwsize; + #if CYTHON_ASSUME_SAFE_SIZE + kwsize = PyTuple_GET_SIZE(kw); + #else + kwsize = PyTuple_Size(kw); + if (unlikely(kwsize < 0)) return -1; + #endif + for (Py_ssize_t pos = 0; pos < kwsize; pos++) { + PyObject* key = NULL; + #if CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kw, pos); + #else + key = PyTuple_GetItem(kw, pos); + if (unlikely(!key)) return -1; + #endif + if (unlikely(!PyUnicode_Check(key))) { + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return -1; + } + } +#endif + } else { + if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1; + } + return 0; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2); + } + calculate_long: + { + long q, r; + q = a / b; + r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return PyLong_FromLong(q); + } + calculate_long_long: + { + PY_LONG_LONG q, r; + q = lla / llb; + r = lla - q*llb; + q -= ((r != 0) & ((r ^ llb) < 0)); + return PyLong_FromLongLong(q); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(op1, op2, inplace); +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + long b; + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb; + if (unlikely(__Pyx_PyLong_IsZero(op2))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op2); + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2); + if (likely(size == 1)) { + b = (long) digits[0]; + if (!is_positive) b *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_multiply(op1, op2); + } + calculate_long: + CYTHON_UNUSED_VAR(a); + CYTHON_UNUSED_VAR(b); + llb = b; + goto calculate_long_long; + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyCObj(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + double b = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) * (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + return __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op2)) { + return __Pyx_Float___Pyx_PyLong_MultiplyCObj(op2, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(op1, op2, inplace); +} +#endif + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return __Pyx_CallCFunction(cfunc, self, arg); + } else if (flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); + } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); + } + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); + } +#endif + PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + } else +#endif + { + result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); + } + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* DivInt[long] */ +static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) { + long q = a / b; + long r = a - q*b; + long adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* SetItemInt */ +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (unlikely(!j)) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) { + Py_INCREF(v); + return PyList_SetItem(o, n, v); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old; + Py_INCREF(v); + old = PyList_GET_ITEM(o, n); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 0; + } + } else +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_ass_subscript) { + int r; + PyObject *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return -1; + r = mm->mp_ass_subscript(o, key, v); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return sm->sq_ass_item(o, i, v); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_SetItem(o, i, v); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v); +} + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__7); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* CallNextTpDealloc */ +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { + PyTypeObject* type = Py_TYPE(obj); + destructor tp_dealloc = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type) + tp_dealloc(obj); +} + +/* CallNextTpTraverse */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + traverseproc tp_traverse = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_traverse) + return tp_traverse(obj, v, a); + return 0; +} + +/* CallNextTpClear */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + inquiry tp_clear = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_clear) + tp_clear(obj); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* GetVTable */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* GetNameInClass */ +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + PyObject *dict; + assert(PyType_Check(nmspace)); +#if CYTHON_USE_TYPE_SLOTS + dict = ((PyTypeObject*)nmspace)->tp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__8); + } + goto done; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* ReturnWithStopIteration (used by CoroutineBase) */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase (used by Generator) */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; +#endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/runners/worker/operations.cp314-win_amd64.pyd b/sdks/python/apache_beam/runners/worker/operations.cp314-win_amd64.pyd new file mode 100644 index 000000000000..248855cbe19e Binary files /dev/null and b/sdks/python/apache_beam/runners/worker/operations.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/runners/worker/statesampler_fast.c b/sdks/python/apache_beam/runners/worker/statesampler_fast.c new file mode 100644 index 000000000000..bfbd00559e04 --- /dev/null +++ b/sdks/python/apache_beam/runners/worker/statesampler_fast.c @@ -0,0 +1,19333 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "apache_beam\\runners\\worker\\crossplatform_time.h", + "apache_beam\\runners\\worker\\crossplatform_unistd.h" + ], + "include_dirs": [ + "apache_beam\\runners\\worker" + ], + "name": "apache_beam.runners.worker.statesampler_fast", + "sources": [ + "apache_beam\\runners\\worker\\statesampler_fast.pyx" + ] + }, + "module_name": "apache_beam.runners.worker.statesampler_fast" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__runners__worker__statesampler_fast +#define __PYX_HAVE_API__apache_beam__runners__worker__statesampler_fast +/* Early includes */ +#include +#include +#include + + #if CYTHON_COMPILING_IN_LIMITED_API + #ifdef _MSC_VER + #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.") + #else + #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API. + #endif + #endif + +#include "datetime.h" + + #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->DateTimeType) + #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType) + + #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC + #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name) + + /* Backport for Python < 3.10 */ + #if PY_VERSION_HEX < 0x030a00a1 + #ifndef PyDateTime_TIME_GET_TZINFO + #define PyDateTime_TIME_GET_TZINFO(o) ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None) + #endif + #ifndef PyDateTime_DATE_GET_TZINFO + #define PyDateTime_DATE_GET_TZINFO(o) ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None) + #endif + #endif + + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE PyObject * + __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index) + { + PyObject *item = PyList_GetItem(list, index); + Py_XINCREF(item); + return item; + } + #else + #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef + #endif + + #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable) + { + return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable); + } + + static CYTHON_INLINE int + __Pyx_CAPI_PyList_Clear(PyObject *list) + { + return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL); + } + #else + #define __Pyx_CAPI_PyList_Extend PyList_Extend + #define __Pyx_CAPI_PyList_Clear PyList_Clear + #endif + + + #if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) + #else + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) + #endif + +#include + + #if PY_MAJOR_VERSION <= 2 + #define PyDict_GetItemWithError _PyDict_GetItemWithError + #endif + + #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) + { + int res; + PyObject *key_obj = PyUnicode_FromString(key); + if (key_obj == NULL) { + *result = NULL; + return -1; + } + res = __Pyx_PyDict_GetItemRef(mp, key_obj, result); + Py_DECREF(key_obj); + return res; + } + #else + #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef + #endif + #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000) + static CYTHON_INLINE int + __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value, + PyObject **result) + { + PyObject *value; + if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) { + // get error + if (result) { + *result = NULL; + } + return -1; + } + if (value != NULL) { + // present + if (result) { + *result = value; + } + else { + Py_DECREF(value); + } + return 1; + } + + // missing: set the item + if (PyDict_SetItem(d, key, default_value) < 0) { + // set error + if (result) { + *result = NULL; + } + return -1; + } + if (result) { + Py_INCREF(default_value); + *result = default_value; + } + return 0; + } + #else + #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef + #endif + + + #if PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj) + { + PyObject *obj = PyWeakref_GetObject(ref); + if (obj == NULL) { + // SystemError if ref is NULL + *pobj = NULL; + return -1; + } + if (obj == Py_None) { + *pobj = NULL; + return 0; + } + Py_INCREF(obj); + *pobj = obj; + return 1; + } + #else + #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef + #endif + +#include "pythread.h" + + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get) + #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) + #endif + +#include +#include "crossplatform_unistd.h" +#include "crossplatform_time.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/runners/worker/statesampler_fast.pyx", + "cpython/datetime.pxd", + "cpython/contextvars.pxd", + "apache_beam/runners/worker/statesampler_fast.pxd", + "", + "cpython/type.pxd", + "cpython/bool.pxd", + "cpython/complex.pxd", + "apache_beam/metrics/cells.pxd", + "apache_beam/metrics/execution.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell; +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData; +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode; +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData; +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater; +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; +struct __pyx_opt_args_7cpython_11contextvars_get_value; +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; + +/* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value { + int __pyx_n; + PyObject *default_value; +}; + +/* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { + int __pyx_n; + PyObject *default_value; +}; +struct __pyx_opt_args_7cpython_8datetime_time_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_new; +struct __pyx_opt_args_7cpython_8datetime_timezone_new; +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp; + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_time_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_new { + int __pyx_n; + int fold; +}; + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ +struct __pyx_opt_args_7cpython_8datetime_timezone_new { + int __pyx_n; + PyObject *name; +}; + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ +struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp { + int __pyx_n; + PyObject *tz; +}; + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtab; + PyObject *_lock; + PyDateTime_DateTime *_start_time; +}; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int64_t value; +}; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData *data; +}; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + PyObject *data_class; + PyObject *data; +}; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; + + +/* "apache_beam/metrics/cells.pxd":62 + * + * + * cdef class DistributionData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t sum + * cdef readonly libc.stdint.int64_t count +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData { + PyObject_HEAD + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/metrics/cells.pxd":69 + * + * + * cdef class _BoundedTrieNode(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _size + * cdef readonly dict _children +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode { + PyObject_HEAD + int64_t _size; + PyObject *_children; + int _truncated; +}; + + +/* "apache_beam/metrics/cells.pxd":74 + * cdef readonly bint _truncated + * + * cdef class BoundedTrieData(object): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t _bound + * cdef readonly object _singleton +*/ +struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData { + PyObject_HEAD + int64_t _bound; + PyObject *_singleton; + struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode *_root; +}; + + +/* "apache_beam/metrics/execution.pxd":26 + * + * + * cdef class _TypedMetricName(object): # <<<<<<<<<<<<<< + * cdef readonly object cell_type + * cdef readonly object metric_name +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName { + PyObject_HEAD + PyObject *cell_type; + PyObject *metric_name; + PyObject *fast_name; + int64_t _hash; +}; + + +/* "apache_beam/metrics/execution.pxd":36 + * + * + * cdef class MetricUpdater(object): # <<<<<<<<<<<<<< + * cdef _TypedMetricName typed_metric_name + * cdef object default_value +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater { + PyObject_HEAD + struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName *typed_metric_name; + PyObject *default_value; + int process_wide; +}; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ +struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtab; + PyObject *step_name; + PyObject *lock; + PyObject *metrics; +}; + + +/* "apache_beam/runners/worker/statesampler_fast.pxd":25 + * from libc.stdint cimport int32_t, int64_t + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * cdef int _sampling_period_ms +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtab; + int _sampling_period_ms; + int _sampling_period_ms_start; + double _sampling_period_ratio; + PyObject *scoped_states_by_index; + int started; + int finished; + PyObject *sampling_thread; + PyThread_type_lock lock; + int64_t state_transition_count; + int64_t time_since_transition; + int32_t current_state_index; +}; + + +/* "apache_beam/runners/worker/statesampler_fast.pxd":52 + * self, counter_name, name_context, output_counter, metrics_container) + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ +struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtab; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *sampler; + int32_t state_index; + PyObject *counter; + PyObject *name; + PyObject *name_context; + int64_t _nsecs; + int32_t old_state_index; + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *metrics_container; +}; + + + +/* "apache_beam/metrics/cells.pxd":23 + * + * + * cdef class MetricCell(object): # <<<<<<<<<<<<<< + * cdef object _lock + * cpdef bint update(self, value) except -1 +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell { + int (*update)(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell; + + +/* "apache_beam/metrics/cells.pxd":29 + * + * + * cdef class CounterCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly libc.stdint.int64_t value + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell; + + +/* "apache_beam/metrics/cells.pxd":37 + * + * # Not using AbstractMetricCell so that data can be typed. + * cdef class DistributionCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly DistributionData data + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update)(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell; + + +/* "apache_beam/metrics/cells.pxd":44 + * + * + * cdef class AbstractMetricCell(MetricCell): # <<<<<<<<<<<<<< + * cdef readonly object data_class + * cdef public object data +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell __pyx_base; + int (*_update_locked)(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell *, PyObject *); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell; + + +/* "apache_beam/metrics/cells.pxd":50 + * + * + * cdef class GaugeCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell; + + +/* "apache_beam/metrics/cells.pxd":54 + * + * + * cdef class StringSetCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell; + + +/* "apache_beam/metrics/cells.pxd":58 + * + * + * cdef class BoundedTrieCell(AbstractMetricCell): # <<<<<<<<<<<<<< + * pass + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell { + struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell *__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell; + + +/* "apache_beam/metrics/execution.pxd":42 + * + * + * cdef class MetricsContainer(object): # <<<<<<<<<<<<<< + * cdef object step_name + * cdef object lock +*/ + +struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer { + struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *(*get_metric_cell)(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer; + + +/* "apache_beam/runners/worker/statesampler_fast.pyx":70 + * + * + * cdef class StateSampler(object): # <<<<<<<<<<<<<< + * """Tracks time spent in states during pipeline execution.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, int __pyx_skip_dispatch); + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*current_state_c)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *); + PyObject *(*_scoped_state)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; +static CYTHON_INLINE struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *); + + +/* "apache_beam/runners/worker/statesampler_fast.pyx":201 + * + * + * cdef class ScopedState(object): # <<<<<<<<<<<<<< + * """Context manager class managing transitions for a given sampler state.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState { + PyObject *(*__pyx___enter__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, int __pyx_skip_dispatch); + PyObject *(*__pyx___exit__)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2)) +#endif + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto (used by GetModuleGlobalName) */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/ +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/ +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +static struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static CYTHON_INLINE struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler__scoped_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_counter_name, PyObject *__pyx_v_name_context, PyObject *__pyx_v_output_counter, PyObject *__pyx_v_metrics_container, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___enter__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___exit__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_exc_type, CYTHON_UNUSED PyObject *__pyx_v_unused_exc_value, CYTHON_UNUSED PyObject *__pyx_v_unused_traceback, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "cpython.exc" */ + +/* Module declarations from "cpython.module" */ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython.list" */ + +/* Module declarations from "cpython.sequence" */ + +/* Module declarations from "cpython.mapping" */ + +/* Module declarations from "cpython.iterator" */ + +/* Module declarations from "cpython.number" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.bool" */ + +/* Module declarations from "cpython.long" */ + +/* Module declarations from "cpython.float" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.complex" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "cpython.unicode" */ + +/* Module declarations from "cpython.pyport" */ + +/* Module declarations from "cpython.dict" */ + +/* Module declarations from "cpython.instance" */ + +/* Module declarations from "cpython.function" */ + +/* Module declarations from "cpython.method" */ + +/* Module declarations from "cpython.weakref" */ + +/* Module declarations from "cpython.getargs" */ + +/* Module declarations from "cpython.pythread" */ + +/* Module declarations from "cpython.pystate" */ + +/* Module declarations from "cpython.set" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cpython.pycapsule" */ + +/* Module declarations from "cpython.contextvars" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "datetime" */ + +/* Module declarations from "cpython.datetime" */ + +/* Module declarations from "apache_beam.metrics.cells" */ + +/* Module declarations from "apache_beam.metrics.execution" */ +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker = 0; +#define __pyx_v_11apache_beam_7metrics_9execution_get_current_tracker (*__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker) +static PyObject **__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT = 0; +#define __pyx_v_11apache_beam_7metrics_9execution__DEFAULT (*__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT) + +/* Module declarations from "libc.math" */ + +/* Module declarations from "apache_beam.runners.worker.statesampler_fast" */ +static CYTHON_INLINE int64_t __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_get_nsec_time(void); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.runners.worker.statesampler_fast" +extern int __pyx_module_is_main_apache_beam__runners__worker__statesampler_fast; +int __pyx_module_is_main_apache_beam__runners__worker__statesampler_fast = 0; + +/* Implementation of "apache_beam.runners.worker.statesampler_fast" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_State_sampler_for_tracking_time[] = "State sampler for tracking time spent in execution steps.\n\nThe state sampler profiles the time spent in each step of a pipeline.\nOperations (defined in executor.py) which are executed as part of a MapTask are\ninstrumented with context managers provided by StateSampler.scoped_state().\nThese context managers change the internal state of the StateSampler during each\nrelevant Operation's .start(), .process() and .finish() methods. State is\nsampled by a raw C thread, not holding the Python Global Interpreter Lock, which\nqueries the StateSampler's internal state at a defined sampling frequency. In a\ncommon example, a ReadOperation during its .start() method reads an element and\ncalls a DoOperation's .process() method, which can call a WriteOperation's\n.process() method. Each element processed causes the current state to\ntransition between these states of different Operations. Each time the sampling\nthread queries the current state, the time spent since the previous sample is\nattributed to that state and accumulated. Over time, this allows a granular\nruntime profile to be produced.\n"; +static const char __pyx_k_nsecs_counter_metrics_container[] = "_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index"; +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler___init__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_sampling_period_ms, PyObject *__pyx_v_sampling_period_ms_start, PyObject *__pyx_v_sampling_period_ratio); /* proto */ +static void __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_2__dealloc__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_4run(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_6start(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8stop(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_10reset(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_12current_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_14_scoped_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_counter_name, PyObject *__pyx_v_name_context, PyObject *__pyx_v_output_counter, PyObject *__pyx_v_metrics_container); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_16update_metric(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_typed_metric_name, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___init__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v_sampler, PyObject *__pyx_v_name, PyObject *__pyx_v_step_name_context, PyObject *__pyx_v_state_index, PyObject *__pyx_v_counter, PyObject *__pyx_v_metrics_container); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_2sampled_seconds(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4sampled_msecs_int(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_8__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_10__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v_unused_exc_type, PyObject *__pyx_v_unused_exc_value, PyObject *__pyx_v_unused_traceback); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_4bool_bool; + PyTypeObject *__pyx_ptype_7cpython_7complex_complex; + PyTypeObject *__pyx_ptype_7cpython_8datetime_date; + PyTypeObject *__pyx_ptype_7cpython_8datetime_time; + PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime; + PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta; + PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater; + PyTypeObject *__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer; + PyObject *__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + PyObject *__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + PyTypeObject *__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_codeobj_tab[16]; + PyObject *__pyx_string_tab[124]; + PyObject *__pyx_number_tab[5]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Address_of_StateSampler_current __pyx_string_tab[1] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[2] +#define __pyx_kp_u_ScopedState __pyx_string_tab[3] +#define __pyx_kp_u__2 __pyx_string_tab[4] +#define __pyx_kp_u__3 __pyx_string_tab[5] +#define __pyx_kp_u__4 __pyx_string_tab[6] +#define __pyx_kp_u_add_note __pyx_string_tab[7] +#define __pyx_kp_u_apache_beam_runners_worker_state_2 __pyx_string_tab[8] +#define __pyx_kp_u_disable __pyx_string_tab[9] +#define __pyx_kp_u_enable __pyx_string_tab[10] +#define __pyx_kp_u_gc __pyx_string_tab[11] +#define __pyx_kp_u_isenabled __pyx_string_tab[12] +#define __pyx_kp_u_self_lock_cannot_be_converted_to __pyx_string_tab[13] +#define __pyx_kp_u_stringsource __pyx_string_tab[14] +#define __pyx_n_u_CounterName __pyx_string_tab[15] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[16] +#define __pyx_n_u_ScopedState_2 __pyx_string_tab[17] +#define __pyx_n_u_ScopedState___enter __pyx_string_tab[18] +#define __pyx_n_u_ScopedState___exit __pyx_string_tab[19] +#define __pyx_n_u_ScopedState___reduce_cython __pyx_string_tab[20] +#define __pyx_n_u_ScopedState___setstate_cython __pyx_string_tab[21] +#define __pyx_n_u_ScopedState_sampled_msecs_int __pyx_string_tab[22] +#define __pyx_n_u_ScopedState_sampled_seconds __pyx_string_tab[23] +#define __pyx_n_u_StateSampler __pyx_string_tab[24] +#define __pyx_n_u_StateSampler___reduce_cython __pyx_string_tab[25] +#define __pyx_n_u_StateSampler___setstate_cython __pyx_string_tab[26] +#define __pyx_n_u_StateSampler__scoped_state __pyx_string_tab[27] +#define __pyx_n_u_StateSampler_current_state __pyx_string_tab[28] +#define __pyx_n_u_StateSampler_reset __pyx_string_tab[29] +#define __pyx_n_u_StateSampler_run __pyx_string_tab[30] +#define __pyx_n_u_StateSampler_start __pyx_string_tab[31] +#define __pyx_n_u_StateSampler_stop __pyx_string_tab[32] +#define __pyx_n_u_StateSampler_update_metric __pyx_string_tab[33] +#define __pyx_n_u_Thread __pyx_string_tab[34] +#define __pyx_n_u_apache_beam_runners_worker_state __pyx_string_tab[35] +#define __pyx_n_u_apache_beam_utils_counters __pyx_string_tab[36] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[37] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[38] +#define __pyx_n_u_counter __pyx_string_tab[39] +#define __pyx_n_u_counter_name __pyx_string_tab[40] +#define __pyx_n_u_current_state __pyx_string_tab[41] +#define __pyx_n_u_dict __pyx_string_tab[42] +#define __pyx_n_u_dict_2 __pyx_string_tab[43] +#define __pyx_n_u_elapsed_nsecs __pyx_string_tab[44] +#define __pyx_n_u_enter __pyx_string_tab[45] +#define __pyx_n_u_exit __pyx_string_tab[46] +#define __pyx_n_u_func __pyx_string_tab[47] +#define __pyx_n_u_getstate __pyx_string_tab[48] +#define __pyx_n_u_is_coroutine __pyx_string_tab[49] +#define __pyx_n_u_items __pyx_string_tab[50] +#define __pyx_n_u_join __pyx_string_tab[51] +#define __pyx_n_u_last_nsecs __pyx_string_tab[52] +#define __pyx_n_u_latest_transition_count __pyx_string_tab[53] +#define __pyx_n_u_main __pyx_string_tab[54] +#define __pyx_n_u_metrics_container __pyx_string_tab[55] +#define __pyx_n_u_module __pyx_string_tab[56] +#define __pyx_n_u_name __pyx_string_tab[57] +#define __pyx_n_u_name_2 __pyx_string_tab[58] +#define __pyx_n_u_name_context __pyx_string_tab[59] +#define __pyx_n_u_new __pyx_string_tab[60] +#define __pyx_n_u_nsecs __pyx_string_tab[61] +#define __pyx_n_u_nsecs_ptr __pyx_string_tab[62] +#define __pyx_n_u_output_counter __pyx_string_tab[63] +#define __pyx_n_u_pop __pyx_string_tab[64] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[65] +#define __pyx_n_u_pyx_result __pyx_string_tab[66] +#define __pyx_n_u_pyx_state __pyx_string_tab[67] +#define __pyx_n_u_pyx_type __pyx_string_tab[68] +#define __pyx_n_u_pyx_unpickle_ScopedState __pyx_string_tab[69] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[70] +#define __pyx_n_u_qualname __pyx_string_tab[71] +#define __pyx_n_u_reduce __pyx_string_tab[72] +#define __pyx_n_u_reduce_cython __pyx_string_tab[73] +#define __pyx_n_u_reduce_ex __pyx_string_tab[74] +#define __pyx_n_u_reset __pyx_string_tab[75] +#define __pyx_n_u_run __pyx_string_tab[76] +#define __pyx_n_u_sampled_msecs_int __pyx_string_tab[77] +#define __pyx_n_u_sampled_seconds __pyx_string_tab[78] +#define __pyx_n_u_sampler __pyx_string_tab[79] +#define __pyx_n_u_sampling_period_ms __pyx_string_tab[80] +#define __pyx_n_u_sampling_period_ms_start __pyx_string_tab[81] +#define __pyx_n_u_sampling_period_ratio __pyx_string_tab[82] +#define __pyx_n_u_sampling_period_us __pyx_string_tab[83] +#define __pyx_n_u_scoped_state __pyx_string_tab[84] +#define __pyx_n_u_self __pyx_string_tab[85] +#define __pyx_n_u_set_name __pyx_string_tab[86] +#define __pyx_n_u_setdefault __pyx_string_tab[87] +#define __pyx_n_u_setstate __pyx_string_tab[88] +#define __pyx_n_u_setstate_cython __pyx_string_tab[89] +#define __pyx_n_u_start __pyx_string_tab[90] +#define __pyx_n_u_state __pyx_string_tab[91] +#define __pyx_n_u_state_index __pyx_string_tab[92] +#define __pyx_n_u_step_name_context __pyx_string_tab[93] +#define __pyx_n_u_stop __pyx_string_tab[94] +#define __pyx_n_u_target __pyx_string_tab[95] +#define __pyx_n_u_test __pyx_string_tab[96] +#define __pyx_n_u_threading __pyx_string_tab[97] +#define __pyx_n_u_typed_metric_name __pyx_string_tab[98] +#define __pyx_n_u_unknown __pyx_string_tab[99] +#define __pyx_n_u_unused_exc_type __pyx_string_tab[100] +#define __pyx_n_u_unused_exc_value __pyx_string_tab[101] +#define __pyx_n_u_unused_traceback __pyx_string_tab[102] +#define __pyx_n_u_update __pyx_string_tab[103] +#define __pyx_n_u_update_metric __pyx_string_tab[104] +#define __pyx_n_u_use_setstate __pyx_string_tab[105] +#define __pyx_n_u_value __pyx_string_tab[106] +#define __pyx_n_u_values __pyx_string_tab[107] +#define __pyx_kp_b_PyObject__DEFAULT_get_current_tr __pyx_string_tab[108] +#define __pyx_kp_b_iso88591_3auBd __pyx_string_tab[109] +#define __pyx_kp_b_iso88591_4_q __pyx_string_tab[110] +#define __pyx_kp_b_iso88591_4t1_4_a_A_4q_Q __pyx_string_tab[111] +#define __pyx_kp_b_iso88591_4t1_9G1G4q_a __pyx_string_tab[112] +#define __pyx_kp_b_iso88591_4x_a_t1_1_4xq __pyx_string_tab[113] +#define __pyx_kp_b_iso88591_4xq_4x_a_t1_1_4xq __pyx_string_tab[114] +#define __pyx_kp_b_iso88591_5_a __pyx_string_tab[115] +#define __pyx_kp_b_iso88591_Ba_q __pyx_string_tab[116] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[117] +#define __pyx_kp_b_iso88591_Q_F_A_4_1 __pyx_string_tab[118] +#define __pyx_kp_b_iso88591_T_j_G4_bbttx_y_C_C_G_G_H_G1F_a __pyx_string_tab[119] +#define __pyx_kp_b_iso88591__5 __pyx_string_tab[120] +#define __pyx_kp_b_iso88591_c_a_aq_4_a_waq_4q_1 __pyx_string_tab[121] +#define __pyx_kp_b_iso88591_m1_4q_d_ERq_auA_q_r_Q_Rq_at_T_s __pyx_string_tab[122] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1 __pyx_string_tab[123] +#define __pyx_float_1_2 __pyx_number_tab[0] +#define __pyx_float_1eneg_6 __pyx_number_tab[1] +#define __pyx_float_1eneg_9 __pyx_number_tab[2] +#define __pyx_int_100 __pyx_number_tab[3] +#define __pyx_int_121030918 __pyx_number_tab[4] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<124; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<124; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":46 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":44 + * + * ctypedef extern class datetime.date[object PyDateTime_Date]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":50 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":48 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":54 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":52 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":59 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":57 + * + * ctypedef extern class datetime.time[object PyDateTime_Time]: + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_TIME_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":63 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":61 + * return PyDateTime_TIME_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_TIME_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":67 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":65 + * return PyDateTime_TIME_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_TIME_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":71 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":69 + * return PyDateTime_TIME_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":75 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":73 + * return PyDateTime_TIME_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_TIME_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":80 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":77 + * return PyDateTime_TIME_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":85 + * @property + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":83 + * + * ctypedef extern class datetime.datetime[object PyDateTime_DateTime]: + * @property # <<<<<<<<<<<<<< + * cdef inline int year(self) noexcept: + * return PyDateTime_GET_YEAR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":89 + * @property + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":87 + * return PyDateTime_GET_YEAR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int month(self) noexcept: + * return PyDateTime_GET_MONTH(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":93 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":91 + * return PyDateTime_GET_MONTH(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_GET_DAY(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":97 + * @property + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":95 + * return PyDateTime_GET_DAY(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int hour(self) noexcept: + * return PyDateTime_DATE_GET_HOUR(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":101 + * @property + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":99 + * return PyDateTime_DATE_GET_HOUR(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int minute(self) noexcept: + * return PyDateTime_DATE_GET_MINUTE(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":105 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":103 + * return PyDateTime_DATE_GET_MINUTE(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DATE_GET_SECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":109 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":107 + * return PyDateTime_DATE_GET_SECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("tzinfo", 0); + + /* "cpython/datetime.pxd":113 + * @property + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self)); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":111 + * return PyDateTime_DATE_GET_MICROSECOND(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline object tzinfo(self): + * return PyDateTime_DATE_GET_TZINFO(self) +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":118 + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":115 + * return PyDateTime_DATE_GET_TZINFO(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int fold(self) noexcept: + * # For Python < 3.6 this returns 0 no matter what +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":123 + * @property + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":121 + * + * ctypedef extern class datetime.timedelta[object PyDateTime_Delta]: + * @property # <<<<<<<<<<<<<< + * cdef inline int day(self) noexcept: + * return PyDateTime_DELTA_GET_DAYS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":127 + * @property + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":125 + * return PyDateTime_DELTA_GET_DAYS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int second(self) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) { + int __pyx_r; + + /* "cpython/datetime.pxd":131 + * @property + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) # <<<<<<<<<<<<<< + * + * ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":129 + * return PyDateTime_DELTA_GET_SECONDS(self) + * + * @property # <<<<<<<<<<<<<< + * cdef inline int microsecond(self) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(self) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + +static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) { + + /* "cpython/datetime.pxd":256 + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: + * PyDateTime_IMPORT # <<<<<<<<<<<<<< + * + * # Create date object using DateTime CAPI factory function. +*/ + (void)(PyDateTime_IMPORT); + + /* "cpython/datetime.pxd":255 + * # Datetime C API initialization function. + * # You have to call it before any usage of DateTime CAPI functions. + * cdef inline void import_datetime() noexcept: # <<<<<<<<<<<<<< + * PyDateTime_IMPORT + * +*/ + + /* function exit code */ +} + +/* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_new", 0); + + /* "cpython/datetime.pxd":261 + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) # <<<<<<<<<<<<<< + * + * # Create time object using DateTime CAPI factory function +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Date *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":260 + * # Create date object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline date date_new(int year, int month, int day): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_Time *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("time_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":266 + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create datetime object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) + __pyx_r = ((PyDateTime_Time *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":265 + * # Create time object using DateTime CAPI factory function + * # Note, there are no range checks for any of the arguments. + * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, PyObject *__pyx_v_tz, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) { + int __pyx_v_fold = ((int)0); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_fold = __pyx_optional_args->fold; + } + } + + /* "cpython/datetime.pxd":271 + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":270 + * # Create datetime object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0): # <<<<<<<<<<<<<< + * return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.datetime_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + +static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) { + PyDateTime_Delta *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timedelta_new", 0); + + /* "cpython/datetime.pxd":276 + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) # <<<<<<<<<<<<<< + * + * # Create timedelta object using DateTime CAPI factory function. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":275 + * # Create timedelta object using DateTime CAPI factory function. + * # Note, there are no range checks for any of the arguments. + * cdef inline timedelta timedelta_new(int days, int seconds, int useconds): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.datetime.timedelta_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) { + PyObject *__pyx_v_name = ((PyObject *)Py_None); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("timezone_new", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_name = __pyx_optional_args->name; + } + } + + /* "cpython/datetime.pxd":280 + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) # <<<<<<<<<<<<<< + * + * # Create datetime object using DB API constructor. +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_name != Py_None); + if (__pyx_t_2) { + __pyx_t_1 = ((PyObject *)__pyx_v_name); + } else { + __pyx_t_1 = NULL; + } + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":279 + * + * # Create timedelta object using DateTime CAPI factory function. + * cdef inline object timezone_new(object offset, object name=None): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_FromOffsetAndName(offset, name if name is not None else NULL) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + +static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) { + PyObject *__pyx_v_tz = ((PyObject *)Py_None); + PyDateTime_DateTime *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("datetime_from_timestamp", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_tz = __pyx_optional_args->tz; + } + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "cpython/datetime.pxd":285 + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) # <<<<<<<<<<<<<< + * + * # Create date object using DB API constructor. +*/ + __pyx_t_2 = (__pyx_v_tz != Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_tz); + __Pyx_GIVEREF(__pyx_v_tz); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + + /* "cpython/datetime.pxd":284 + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): + * return PyDateTimeAPI.DateTime_FromTimestamp( # <<<<<<<<<<<<<< + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) + * +*/ + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":283 + * + * # Create datetime object using DB API constructor. + * cdef inline datetime datetime_from_timestamp(timestamp, tz=None): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.DateTime_FromTimestamp( + * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + +static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) { + PyDateTime_Date *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("date_from_timestamp", 0); + + /* "cpython/datetime.pxd":289 + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) # <<<<<<<<<<<<<< + * + * # More recognizable getters for date/time/datetime/timedelta. +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_timestamp); + __Pyx_GIVEREF(__pyx_v_timestamp); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((PyDateTime_Date *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cpython/datetime.pxd":288 + * + * # Create date object using DB API constructor. + * cdef inline date date_from_timestamp(timestamp): # <<<<<<<<<<<<<< + * return PyDateTimeAPI.Date_FromTimestamp(PyDateTimeAPI.DateType, (timestamp,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_utc", 0); + + /* "cpython/datetime.pxd":298 + * # Get UTC singleton + * cdef inline object get_utc(): + * return __Pyx_TimeZone_UTC # <<<<<<<<<<<<<< + * + * # Get tzinfo of time +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC)); + __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC); + goto __pyx_L0; + + /* "cpython/datetime.pxd":297 + * + * # Get UTC singleton + * cdef inline object get_utc(): # <<<<<<<<<<<<<< + * return __Pyx_TimeZone_UTC + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("time_tzinfo", 0); + + /* "cpython/datetime.pxd":302 + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): + * return PyDateTime_TIME_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get tzinfo of datetime +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":301 + * + * # Get tzinfo of time + * cdef inline object time_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + +static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1; + __Pyx_RefNannySetupContext("datetime_tzinfo", 0); + + /* "cpython/datetime.pxd":306 + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): + * return PyDateTime_DATE_GET_TZINFO(o) # <<<<<<<<<<<<<< + * + * # Get year of date +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + goto __pyx_L0; + + /* "cpython/datetime.pxd":305 + * + * # Get tzinfo of datetime + * cdef inline object datetime_tzinfo(object o): # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_TZINFO(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":310 + * # Get year of date + * cdef inline int date_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of date +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":309 + * + * # Get year of date + * cdef inline int date_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":314 + * # Get month of date + * cdef inline int date_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of date +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":313 + * + * # Get month of date + * cdef inline int date_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":318 + * # Get day of date + * cdef inline int date_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get year of datetime +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":317 + * + * # Get day of date + * cdef inline int date_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":322 + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: + * return PyDateTime_GET_YEAR(o) # <<<<<<<<<<<<<< + * + * # Get month of datetime +*/ + __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":321 + * + * # Get year of datetime + * cdef inline int datetime_year(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_YEAR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":326 + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: + * return PyDateTime_GET_MONTH(o) # <<<<<<<<<<<<<< + * + * # Get day of datetime +*/ + __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":325 + * + * # Get month of datetime + * cdef inline int datetime_month(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_MONTH(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":330 + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: + * return PyDateTime_GET_DAY(o) # <<<<<<<<<<<<<< + * + * # Get hour of time +*/ + __pyx_r = PyDateTime_GET_DAY(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":329 + * + * # Get day of datetime + * cdef inline int datetime_day(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_GET_DAY(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":334 + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: + * return PyDateTime_TIME_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of time +*/ + __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":333 + * + * # Get hour of time + * cdef inline int time_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":338 + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: + * return PyDateTime_TIME_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of time +*/ + __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":337 + * + * # Get minute of time + * cdef inline int time_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":342 + * # Get second of time + * cdef inline int time_second(object o) noexcept: + * return PyDateTime_TIME_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of time +*/ + __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":341 + * + * # Get second of time + * cdef inline int time_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":346 + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: + * return PyDateTime_TIME_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of time +*/ + __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":345 + * + * # Get microsecond of time + * cdef inline int time_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_TIME_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":351 + * cdef inline int time_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get hour of datetime +*/ + __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":349 + * + * # Get fold of time + * cdef inline int time_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_TIME_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":355 + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: + * return PyDateTime_DATE_GET_HOUR(o) # <<<<<<<<<<<<<< + * + * # Get minute of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":354 + * + * # Get hour of datetime + * cdef inline int datetime_hour(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_HOUR(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":359 + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: + * return PyDateTime_DATE_GET_MINUTE(o) # <<<<<<<<<<<<<< + * + * # Get second of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":358 + * + * # Get minute of datetime + * cdef inline int datetime_minute(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MINUTE(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":363 + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: + * return PyDateTime_DATE_GET_SECOND(o) # <<<<<<<<<<<<<< + * + * # Get microsecond of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":362 + * + * # Get second of datetime + * cdef inline int datetime_second(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_SECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":367 + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: + * return PyDateTime_DATE_GET_MICROSECOND(o) # <<<<<<<<<<<<<< + * + * # Get fold of datetime +*/ + __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":366 + * + * # Get microsecond of datetime + * cdef inline int datetime_microsecond(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DATE_GET_MICROSECOND(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":372 + * cdef inline int datetime_fold(object o) noexcept: + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) # <<<<<<<<<<<<<< + * + * # Get days of timedelta +*/ + __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":370 + * + * # Get fold of datetime + * cdef inline int datetime_fold(object o) noexcept: # <<<<<<<<<<<<<< + * # For Python < 3.6 this returns 0 no matter what + * return PyDateTime_DATE_GET_FOLD(o) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":376 + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< + * + * # Get seconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":375 + * + * # Get days of timedelta + * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":380 + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< + * + * # Get microseconds of timedelta +*/ + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":379 + * + * # Get seconds of timedelta + * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + +static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) { + int __pyx_r; + + /* "cpython/datetime.pxd":384 + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< + * + * cdef inline double total_seconds(timedelta obj) noexcept: +*/ + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); + goto __pyx_L0; + + /* "cpython/datetime.pxd":383 + * + * # Get microseconds of timedelta + * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + +static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) { + double __pyx_v_days; + double __pyx_v_seconds; + double __pyx_v_micros; + double __pyx_r; + + /* "cpython/datetime.pxd":392 + * cdef: + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) # <<<<<<<<<<<<<< + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) +*/ + __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":393 + * double days, seconds, micros + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) # <<<<<<<<<<<<<< + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":394 + * days = PyDateTime_DELTA_GET_DAYS(obj) + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) # <<<<<<<<<<<<<< + * return days * 24 * 3600 + seconds + micros / 1_000_000 +*/ + __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj))); + + /* "cpython/datetime.pxd":395 + * seconds = PyDateTime_DELTA_GET_SECONDS(obj) + * micros = PyDateTime_DELTA_GET_MICROSECONDS(obj) + * return days * 24 * 3600 + seconds + micros / 1_000_000 # <<<<<<<<<<<<<< +*/ + __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0)); + goto __pyx_L0; + + /* "cpython/datetime.pxd":386 + * return PyDateTime_DELTA_GET_MICROSECONDS(o) + * + * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< + * # Mirrors the "timedelta.total_seconds()" method. + * # Note that this implementation is not guaranteed to give *exactly* the same +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":23 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: + * return self.cval.real # <<<<<<<<<<<<<< + * + * # unavailable in limited API +*/ + __pyx_r = __pyx_v_self->cval.real; + goto __pyx_L0; + + /* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":29 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: + * return self.cval.imag # <<<<<<<<<<<<<< + * + * # PyTypeObject PyComplex_Type +*/ + __pyx_r = __pyx_v_self->cval.imag; + goto __pyx_L0; + + /* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":121 + * or None if no such value or default was found. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":122 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< + * if value is NULL: + * # context variable does not have a default +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error) + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + __pyx_t_2 = (__pyx_v_value == NULL); + if (__pyx_t_2) { + + /* "cpython/contextvars.pxd":125 + * if value is NULL: + * # context variable does not have a default + * pyvalue = default_value # <<<<<<<<<<<<<< + * else: + * # value or default value of context variable +*/ + __Pyx_INCREF(__pyx_v_default_value); + __pyx_v_pyvalue = __pyx_v_default_value; + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + goto __pyx_L3; + } + + /* "cpython/contextvars.pxd":128 + * else: + * # value or default value of context variable + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_pyvalue = __pyx_t_3; + __pyx_t_3 = 0; + + /* "cpython/contextvars.pxd":129 + * # value or default value of context variable + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue + * +*/ + Py_XDECREF(__pyx_v_value); + } + __pyx_L3:; + + /* "cpython/contextvars.pxd":130 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value_no_default", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":140 + * Ignores the default value of the context variable, if any. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":141 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< + * # value of context variable or 'default_value' + * pyvalue = value +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error) + + /* "cpython/contextvars.pxd":143 + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_pyvalue = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cpython/contextvars.pxd":144 + * # value of context variable or 'default_value' + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue +*/ + Py_XDECREF(__pyx_v_value); + + /* "cpython/contextvars.pxd":145 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "apache_beam/runners/worker/statesampler_fast.pyx":60 + * int clock_gettime(int clock_id, timespec *result) + * + * cdef inline int64_t get_nsec_time() noexcept nogil: # <<<<<<<<<<<<<< + * """Get current time as microseconds since Unix epoch.""" + * cdef timespec current_time +*/ + +static CYTHON_INLINE int64_t __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_get_nsec_time(void) { + struct timespec __pyx_v_current_time; + int64_t __pyx_r; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":64 + * cdef timespec current_time + * # First argument value of 0 corresponds to CLOCK_REALTIME. + * clock_gettime(0, ¤t_time) # <<<<<<<<<<<<<< + * return ( + * ( current_time.tv_sec) * 1000000000 + # second to nanoseconds +*/ + (void)(clock_gettime(0, (&__pyx_v_current_time))); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":66 + * clock_gettime(0, ¤t_time) + * return ( + * ( current_time.tv_sec) * 1000000000 + # second to nanoseconds # <<<<<<<<<<<<<< + * current_time.tv_nsec) + * +*/ + __pyx_r = ((((int64_t)__pyx_v_current_time.tv_sec) * 0x3B9ACA00) + __pyx_v_current_time.tv_nsec); + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":60 + * int clock_gettime(int clock_id, timespec *result) + * + * cdef inline int64_t get_nsec_time() noexcept nogil: # <<<<<<<<<<<<<< + * """Get current time as microseconds since Unix epoch.""" + * cdef timespec current_time +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":73 + * """Tracks time spent in states during pipeline execution.""" + * + * def __init__(self, # <<<<<<<<<<<<<< + * sampling_period_ms, + * sampling_period_ms_start=None, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_sampling_period_ms = 0; + PyObject *__pyx_v_sampling_period_ms_start = 0; + PyObject *__pyx_v_sampling_period_ratio = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sampling_period_ms,&__pyx_mstate_global->__pyx_n_u_sampling_period_ms_start,&__pyx_mstate_global->__pyx_n_u_sampling_period_ratio,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 73, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 73, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 73, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 73, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 73, __pyx_L3_error) + + /* "apache_beam/runners/worker/statesampler_fast.pyx":75 + * def __init__(self, + * sampling_period_ms, + * sampling_period_ms_start=None, # <<<<<<<<<<<<<< + * sampling_period_ratio=1.2): + * self._sampling_period_ms = sampling_period_ms +*/ + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_1_2)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 73, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 73, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 73, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 73, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_1_2)); + } + __pyx_v_sampling_period_ms = values[0]; + __pyx_v_sampling_period_ms_start = values[1]; + __pyx_v_sampling_period_ratio = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), __pyx_v_sampling_period_ms, __pyx_v_sampling_period_ms_start, __pyx_v_sampling_period_ratio); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":73 + * """Tracks time spent in states during pipeline execution.""" + * + * def __init__(self, # <<<<<<<<<<<<<< + * sampling_period_ms, + * sampling_period_ms_start=None, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler___init__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_sampling_period_ms, PyObject *__pyx_v_sampling_period_ms_start, PyObject *__pyx_v_sampling_period_ratio) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_unknown_state = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + long __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + double __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + int64_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":77 + * sampling_period_ms_start=None, + * sampling_period_ratio=1.2): + * self._sampling_period_ms = sampling_period_ms # <<<<<<<<<<<<<< + * # Slowly ramp up to avoid excessive waiting for short stages, as well + * # as more precise information in that case. +*/ + __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_sampling_period_ms); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_v_self->_sampling_period_ms = __pyx_t_1; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":81 + * # as more precise information in that case. + * self._sampling_period_ms_start = ( + * sampling_period_ms_start or max(1, sampling_period_ms // 100)) # <<<<<<<<<<<<<< + * self._sampling_period_ratio = sampling_period_ratio + * self.started = False +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_sampling_period_ms_start); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 81, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_v_sampling_period_ms_start); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = __pyx_t_3; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyLong_FloorDivideObjC(__pyx_v_sampling_period_ms, __pyx_mstate_global->__pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = __pyx_t_4; + } else { + __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_t_8; + __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":80 + * # Slowly ramp up to avoid excessive waiting for short stages, as well + * # as more precise information in that case. + * self._sampling_period_ms_start = ( # <<<<<<<<<<<<<< + * sampling_period_ms_start or max(1, sampling_period_ms // 100)) + * self._sampling_period_ratio = sampling_period_ratio +*/ + __pyx_v_self->_sampling_period_ms_start = __pyx_t_1; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":82 + * self._sampling_period_ms_start = ( + * sampling_period_ms_start or max(1, sampling_period_ms // 100)) + * self._sampling_period_ratio = sampling_period_ratio # <<<<<<<<<<<<<< + * self.started = False + * self.finished = False +*/ + __pyx_t_9 = __Pyx_PyFloat_AsDouble(__pyx_v_sampling_period_ratio); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_v_self->_sampling_period_ratio = __pyx_t_9; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":83 + * sampling_period_ms_start or max(1, sampling_period_ms // 100)) + * self._sampling_period_ratio = sampling_period_ratio + * self.started = False # <<<<<<<<<<<<<< + * self.finished = False + * +*/ + __pyx_v_self->started = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":84 + * self._sampling_period_ratio = sampling_period_ratio + * self.started = False + * self.finished = False # <<<<<<<<<<<<<< + * + * self.lock = pythread.PyThread_allocate_lock() +*/ + __pyx_v_self->finished = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":86 + * self.finished = False + * + * self.lock = pythread.PyThread_allocate_lock() # <<<<<<<<<<<<<< + * + * self.current_state_index = 0 +*/ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":88 + * self.lock = pythread.PyThread_allocate_lock() + * + * self.current_state_index = 0 # <<<<<<<<<<<<<< + * self.time_since_transition = 0 + * self.state_transition_count = 0 +*/ + __pyx_v_self->current_state_index = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":89 + * + * self.current_state_index = 0 + * self.time_since_transition = 0 # <<<<<<<<<<<<<< + * self.state_transition_count = 0 + * unknown_state = ScopedState(self, +*/ + __pyx_v_self->time_since_transition = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":90 + * self.current_state_index = 0 + * self.time_since_transition = 0 + * self.state_transition_count = 0 # <<<<<<<<<<<<<< + * unknown_state = ScopedState(self, + * CounterName('unknown'), +*/ + __pyx_v_self->state_transition_count = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":91 + * self.time_since_transition = 0 + * self.state_transition_count = 0 + * unknown_state = ScopedState(self, # <<<<<<<<<<<<<< + * CounterName('unknown'), + * None, +*/ + __pyx_t_6 = NULL; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":92 + * self.state_transition_count = 0 + * unknown_state = ScopedState(self, + * CounterName('unknown'), # <<<<<<<<<<<<<< + * None, + * self.current_state_index, +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); + __pyx_t_11 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_unknown}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":94 + * CounterName('unknown'), + * None, + * self.current_state_index, # <<<<<<<<<<<<<< + * None, + * None) +*/ + __pyx_t_10 = __Pyx_PyLong_From_int32_t(__pyx_v_self->current_state_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":96 + * self.current_state_index, + * None, + * None) # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.scoped_states_by_index = [unknown_state] +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[7] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_t_8, Py_None, __pyx_t_10, Py_None, Py_None}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_callargs+__pyx_t_11, (7-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_v_unknown_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":97 + * None, + * None) + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * self.scoped_states_by_index = [unknown_state] + * pythread.PyThread_release_lock(self.lock) +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":98 + * None) + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.scoped_states_by_index = [unknown_state] # <<<<<<<<<<<<<< + * pythread.PyThread_release_lock(self.lock) + * +*/ + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF((PyObject *)__pyx_v_unknown_state); + __Pyx_GIVEREF((PyObject *)__pyx_v_unknown_state); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_unknown_state)) != (0)) __PYX_ERR(0, 98, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->scoped_states_by_index); + __Pyx_DECREF(__pyx_v_self->scoped_states_by_index); + __pyx_v_self->scoped_states_by_index = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":99 + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.scoped_states_by_index = [unknown_state] + * pythread.PyThread_release_lock(self.lock) # <<<<<<<<<<<<<< + * + * # Assert that the compiler correctly aligned the current_state field. This +*/ + PyThread_release_lock(__pyx_v_self->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":106 + * # States are referenced via an index rather than, say, a pointer because + * # of better support for 32-bit atomic reads and writes. + * assert ( &self.current_state_index) % sizeof(int32_t) == 0, ( # <<<<<<<<<<<<<< + * 'Address of StateSampler.current_state_index is not word-aligned.') + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_12 = ((int64_t)(&__pyx_v_self->current_state_index)); + __pyx_t_11 = (sizeof(int32_t)); + if (unlikely(__pyx_t_11 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_t_2 = ((__pyx_t_12 % __pyx_t_11) == 0); + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Address_of_StateSampler_current, 0, 0); + __PYX_ERR(0, 106, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 106, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/statesampler_fast.pyx":73 + * """Tracks time spent in states during pipeline execution.""" + * + * def __init__(self, # <<<<<<<<<<<<<< + * sampling_period_ms, + * sampling_period_ms_start=None, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_unknown_state); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":109 + * 'Address of StateSampler.current_state_index is not word-aligned.') + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pythread.PyThread_free_lock(self.lock) + * +*/ + +/* Python wrapper */ +static void __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_2__dealloc__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_2__dealloc__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":110 + * + * def __dealloc__(self): + * pythread.PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * def run(self): +*/ + PyThread_free_lock(__pyx_v_self->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":109 + * 'Address of StateSampler.current_state_index is not word-aligned.') + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pythread.PyThread_free_lock(self.lock) + * +*/ + + /* function exit code */ +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":112 + * pythread.PyThread_free_lock(self.lock) + * + * def run(self): # <<<<<<<<<<<<<< + * cdef int64_t last_nsecs = get_nsec_time() + * cdef int64_t elapsed_nsecs +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run = {"run", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("run (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("run", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("run", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_4run(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_4run(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + int64_t __pyx_v_last_nsecs; + int64_t __pyx_v_elapsed_nsecs; + int64_t __pyx_v_latest_transition_count; + int64_t __pyx_v_sampling_period_us; + int64_t *__pyx_v_nsecs_ptr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + void *__pyx_t_2; + long __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("run", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":113 + * + * def run(self): + * cdef int64_t last_nsecs = get_nsec_time() # <<<<<<<<<<<<<< + * cdef int64_t elapsed_nsecs + * cdef int64_t latest_transition_count = self.state_transition_count +*/ + __pyx_v_last_nsecs = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_get_nsec_time(); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":115 + * cdef int64_t last_nsecs = get_nsec_time() + * cdef int64_t elapsed_nsecs + * cdef int64_t latest_transition_count = self.state_transition_count # <<<<<<<<<<<<<< + * cdef int64_t sampling_period_us = self._sampling_period_ms_start * 1000 + * with nogil: +*/ + __pyx_t_1 = __pyx_v_self->state_transition_count; + __pyx_v_latest_transition_count = __pyx_t_1; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":116 + * cdef int64_t elapsed_nsecs + * cdef int64_t latest_transition_count = self.state_transition_count + * cdef int64_t sampling_period_us = self._sampling_period_ms_start * 1000 # <<<<<<<<<<<<<< + * with nogil: + * while True: +*/ + __pyx_v_sampling_period_us = (__pyx_v_self->_sampling_period_ms_start * 0x3E8); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":117 + * cdef int64_t latest_transition_count = self.state_transition_count + * cdef int64_t sampling_period_us = self._sampling_period_ms_start * 1000 + * with nogil: # <<<<<<<<<<<<<< + * while True: + * usleep(sampling_period_us) +*/ + { + PyThreadState * _save; + _save = PyEval_SaveThread(); + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":118 + * cdef int64_t sampling_period_us = self._sampling_period_ms_start * 1000 + * with nogil: + * while True: # <<<<<<<<<<<<<< + * usleep(sampling_period_us) + * sampling_period_us = math.fmin( +*/ + while (1) { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":119 + * with nogil: + * while True: + * usleep(sampling_period_us) # <<<<<<<<<<<<<< + * sampling_period_us = math.fmin( + * sampling_period_us * self._sampling_period_ratio, +*/ + usleep(((int)__pyx_v_sampling_period_us)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":120 + * while True: + * usleep(sampling_period_us) + * sampling_period_us = math.fmin( # <<<<<<<<<<<<<< + * sampling_period_us * self._sampling_period_ratio, + * self._sampling_period_ms * 1000) +*/ + __pyx_v_sampling_period_us = ((int64_t)fmin((__pyx_v_sampling_period_us * __pyx_v_self->_sampling_period_ratio), (__pyx_v_self->_sampling_period_ms * 0x3E8))); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":123 + * sampling_period_us * self._sampling_period_ratio, + * self._sampling_period_ms * 1000) + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * try: + * if self.finished: +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":124 + * self._sampling_period_ms * 1000) + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * try: # <<<<<<<<<<<<<< + * if self.finished: + * break +*/ + /*try:*/ { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":125 + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * try: + * if self.finished: # <<<<<<<<<<<<<< + * break + * elapsed_nsecs = get_nsec_time() - last_nsecs +*/ + if (__pyx_v_self->finished) { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":126 + * try: + * if self.finished: + * break # <<<<<<<<<<<<<< + * elapsed_nsecs = get_nsec_time() - last_nsecs + * # Take an address as we can't create a reference to the scope +*/ + goto __pyx_L9_break; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":125 + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * try: + * if self.finished: # <<<<<<<<<<<<<< + * break + * elapsed_nsecs = get_nsec_time() - last_nsecs +*/ + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":127 + * if self.finished: + * break + * elapsed_nsecs = get_nsec_time() - last_nsecs # <<<<<<<<<<<<<< + * # Take an address as we can't create a reference to the scope + * # without the GIL. +*/ + __pyx_v_elapsed_nsecs = (__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_get_nsec_time() - __pyx_v_last_nsecs); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":130 + * # Take an address as we can't create a reference to the scope + * # without the GIL. + * nsecs_ptr = &(PyList_GET_ITEM( # <<<<<<<<<<<<<< + * self.scoped_states_by_index, self.current_state_index))._nsecs + * nsecs_ptr[0] += elapsed_nsecs +*/ + __pyx_t_2 = PyList_GET_ITEM(__pyx_v_self->scoped_states_by_index, __pyx_v_self->current_state_index); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":131 + * # without the GIL. + * nsecs_ptr = &(PyList_GET_ITEM( + * self.scoped_states_by_index, self.current_state_index))._nsecs # <<<<<<<<<<<<<< + * nsecs_ptr[0] += elapsed_nsecs + * if latest_transition_count != self.state_transition_count: +*/ + __pyx_v_nsecs_ptr = (&((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_2)->_nsecs); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":132 + * nsecs_ptr = &(PyList_GET_ITEM( + * self.scoped_states_by_index, self.current_state_index))._nsecs + * nsecs_ptr[0] += elapsed_nsecs # <<<<<<<<<<<<<< + * if latest_transition_count != self.state_transition_count: + * self.time_since_transition = 0 +*/ + __pyx_t_3 = 0; + (__pyx_v_nsecs_ptr[__pyx_t_3]) = ((__pyx_v_nsecs_ptr[__pyx_t_3]) + __pyx_v_elapsed_nsecs); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":133 + * self.scoped_states_by_index, self.current_state_index))._nsecs + * nsecs_ptr[0] += elapsed_nsecs + * if latest_transition_count != self.state_transition_count: # <<<<<<<<<<<<<< + * self.time_since_transition = 0 + * latest_transition_count = self.state_transition_count +*/ + __pyx_t_4 = (__pyx_v_latest_transition_count != __pyx_v_self->state_transition_count); + if (__pyx_t_4) { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":134 + * nsecs_ptr[0] += elapsed_nsecs + * if latest_transition_count != self.state_transition_count: + * self.time_since_transition = 0 # <<<<<<<<<<<<<< + * latest_transition_count = self.state_transition_count + * self.time_since_transition += elapsed_nsecs +*/ + __pyx_v_self->time_since_transition = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":135 + * if latest_transition_count != self.state_transition_count: + * self.time_since_transition = 0 + * latest_transition_count = self.state_transition_count # <<<<<<<<<<<<<< + * self.time_since_transition += elapsed_nsecs + * last_nsecs += elapsed_nsecs +*/ + __pyx_t_1 = __pyx_v_self->state_transition_count; + __pyx_v_latest_transition_count = __pyx_t_1; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":133 + * self.scoped_states_by_index, self.current_state_index))._nsecs + * nsecs_ptr[0] += elapsed_nsecs + * if latest_transition_count != self.state_transition_count: # <<<<<<<<<<<<<< + * self.time_since_transition = 0 + * latest_transition_count = self.state_transition_count +*/ + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":136 + * self.time_since_transition = 0 + * latest_transition_count = self.state_transition_count + * self.time_since_transition += elapsed_nsecs # <<<<<<<<<<<<<< + * last_nsecs += elapsed_nsecs + * finally: +*/ + __pyx_v_self->time_since_transition = (__pyx_v_self->time_since_transition + __pyx_v_elapsed_nsecs); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":137 + * latest_transition_count = self.state_transition_count + * self.time_since_transition += elapsed_nsecs + * last_nsecs += elapsed_nsecs # <<<<<<<<<<<<<< + * finally: + * pythread.PyThread_release_lock(self.lock) +*/ + __pyx_v_last_nsecs = (__pyx_v_last_nsecs + __pyx_v_elapsed_nsecs); + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":139 + * last_nsecs += elapsed_nsecs + * finally: + * pythread.PyThread_release_lock(self.lock) # <<<<<<<<<<<<<< + * + * def start(self): +*/ + /*finally:*/ { + /*normal exit:*/{ + PyThread_release_lock(__pyx_v_self->lock); + goto __pyx_L12; + } + __pyx_L9_break: { + PyThread_release_lock(__pyx_v_self->lock); + goto __pyx_L7_break; + } + __pyx_L12:; + } + } + __pyx_L7_break:; + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":117 + * cdef int64_t latest_transition_count = self.state_transition_count + * cdef int64_t sampling_period_us = self._sampling_period_ms_start * 1000 + * with nogil: # <<<<<<<<<<<<<< + * while True: + * usleep(sampling_period_us) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + PyEval_RestoreThread(_save); + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":112 + * pythread.PyThread_free_lock(self.lock) + * + * def run(self): # <<<<<<<<<<<<<< + * cdef int64_t last_nsecs = get_nsec_time() + * cdef int64_t elapsed_nsecs +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":141 + * pythread.PyThread_release_lock(self.lock) + * + * def start(self): # <<<<<<<<<<<<<< + * assert not self.started + * self.sampling_thread = threading.Thread(target=self.run) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("start (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_6start(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_6start(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("start", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":142 + * + * def start(self): + * assert not self.started # <<<<<<<<<<<<<< + * self.sampling_thread = threading.Thread(target=self.run) + * self.sampling_thread.start() +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (!__pyx_v_self->started); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 142, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 142, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/statesampler_fast.pyx":143 + * def start(self): + * assert not self.started + * self.sampling_thread = threading.Thread(target=self.run) # <<<<<<<<<<<<<< + * self.sampling_thread.start() + * +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Thread); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target, __pyx_t_4, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->sampling_thread); + __Pyx_DECREF(__pyx_v_self->sampling_thread); + __pyx_v_self->sampling_thread = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":144 + * assert not self.started + * self.sampling_thread = threading.Thread(target=self.run) + * self.sampling_thread.start() # <<<<<<<<<<<<<< + * + * def stop(self): +*/ + __pyx_t_5 = __pyx_v_self->sampling_thread; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":141 + * pythread.PyThread_release_lock(self.lock) + * + * def start(self): # <<<<<<<<<<<<<< + * assert not self.started + * self.sampling_thread = threading.Thread(target=self.run) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":146 + * self.sampling_thread.start() + * + * def stop(self): # <<<<<<<<<<<<<< + * assert not self.finished + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop = {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("stop (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("stop", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("stop", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8stop(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8stop(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("stop", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":147 + * + * def stop(self): + * assert not self.finished # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.finished = True +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (!__pyx_v_self->finished); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 147, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 147, __pyx_L1_error) + #endif + + /* "apache_beam/runners/worker/statesampler_fast.pyx":148 + * def stop(self): + * assert not self.finished + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * self.finished = True + * pythread.PyThread_release_lock(self.lock) +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":149 + * assert not self.finished + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.finished = True # <<<<<<<<<<<<<< + * pythread.PyThread_release_lock(self.lock) + * # May have to wait up to sampling_period_ms, but the platform-independent +*/ + __pyx_v_self->finished = 1; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":150 + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.finished = True + * pythread.PyThread_release_lock(self.lock) # <<<<<<<<<<<<<< + * # May have to wait up to sampling_period_ms, but the platform-independent + * # pythread doesn't support conditions. +*/ + PyThread_release_lock(__pyx_v_self->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":153 + * # May have to wait up to sampling_period_ms, but the platform-independent + * # pythread doesn't support conditions. + * self.sampling_thread.join() # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_3 = __pyx_v_self->sampling_thread; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":146 + * self.sampling_thread.start() + * + * def stop(self): # <<<<<<<<<<<<<< + * assert not self.finished + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":155 + * self.sampling_thread.join() + * + * def reset(self): # <<<<<<<<<<<<<< + * for state in self.scoped_states_by_index: + * (state)._nsecs = 0 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_10reset(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_10reset(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_v_state = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":156 + * + * def reset(self): + * for state in self.scoped_states_by_index: # <<<<<<<<<<<<<< + * (state)._nsecs = 0 + * self.started = self.finished = False +*/ + if (unlikely(__pyx_v_self->scoped_states_by_index == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 156, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->scoped_states_by_index; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 156, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_state, __pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":157 + * def reset(self): + * for state in self.scoped_states_by_index: + * (state)._nsecs = 0 # <<<<<<<<<<<<<< + * self.started = self.finished = False + * +*/ + ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_state)->_nsecs = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":156 + * + * def reset(self): + * for state in self.scoped_states_by_index: # <<<<<<<<<<<<<< + * (state)._nsecs = 0 + * self.started = self.finished = False +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":158 + * for state in self.scoped_states_by_index: + * (state)._nsecs = 0 + * self.started = self.finished = False # <<<<<<<<<<<<<< + * + * cpdef ScopedState current_state(self): +*/ + __pyx_v_self->started = 0; + __pyx_v_self->finished = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":155 + * self.sampling_thread.join() + * + * def reset(self): # <<<<<<<<<<<<<< + * for state in self.scoped_states_by_index: + * (state)._nsecs = 0 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":160 + * self.started = self.finished = False + * + * cpdef ScopedState current_state(self): # <<<<<<<<<<<<<< + * return self.current_state_c() + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_state", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_current_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state)) { + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState))))) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":161 + * + * cpdef ScopedState current_state(self): + * return self.current_state_c() # <<<<<<<<<<<<<< + * + * cdef inline ScopedState current_state_c(self): +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":160 + * self.started = self.finished = False + * + * cpdef ScopedState current_state(self): # <<<<<<<<<<<<<< + * return self.current_state_c() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.current_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state = {"current_state", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("current_state (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("current_state", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("current_state", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_12current_state(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_12current_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_state", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.current_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":163 + * return self.current_state_c() + * + * cdef inline ScopedState current_state_c(self): # <<<<<<<<<<<<<< + * # Faster than cpdef due to self always being a Python subclass. + * return self.scoped_states_by_index[self.current_state_index] +*/ + +static CYTHON_INLINE struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("current_state_c", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":165 + * cdef inline ScopedState current_state_c(self): + * # Faster than cpdef due to self always being a Python subclass. + * return self.scoped_states_by_index[self.current_state_index] # <<<<<<<<<<<<<< + * + * cpdef _scoped_state(self, counter_name, name_context, output_counter, +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + if (unlikely(__pyx_v_self->scoped_states_by_index == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 165, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->scoped_states_by_index, __pyx_v_self->current_state_index, int32_t, 1, __Pyx_PyLong_From_int32_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1)); + __pyx_r = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":163 + * return self.current_state_c() + * + * cdef inline ScopedState current_state_c(self): # <<<<<<<<<<<<<< + * # Faster than cpdef due to self always being a Python subclass. + * return self.scoped_states_by_index[self.current_state_index] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.current_state_c", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":167 + * return self.scoped_states_by_index[self.current_state_index] + * + * cpdef _scoped_state(self, counter_name, name_context, output_counter, # <<<<<<<<<<<<<< + * metrics_container): + * """Returns a context manager managing transitions for a given state. +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler__scoped_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_counter_name, PyObject *__pyx_v_name_context, PyObject *__pyx_v_output_counter, PyObject *__pyx_v_metrics_container, int __pyx_skip_dispatch) { + Py_ssize_t __pyx_v_new_state_index; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_scoped_state = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_scoped_state", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_scoped_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_counter_name, __pyx_v_name_context, __pyx_v_output_counter, __pyx_v_metrics_container}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":179 + * A ScopedState for the set of step-state-io_target. + * """ + * new_state_index = len(self.scoped_states_by_index) # <<<<<<<<<<<<<< + * scoped_state = ScopedState(self, + * counter_name, +*/ + __pyx_t_1 = __pyx_v_self->scoped_states_by_index; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 179, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_new_state_index = __pyx_t_6; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":180 + * """ + * new_state_index = len(self.scoped_states_by_index) + * scoped_state = ScopedState(self, # <<<<<<<<<<<<<< + * counter_name, + * name_context, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":183 + * counter_name, + * name_context, + * new_state_index, # <<<<<<<<<<<<<< + * output_counter, + * metrics_container) +*/ + __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_new_state_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":185 + * new_state_index, + * output_counter, + * metrics_container) # <<<<<<<<<<<<<< + * # Both scoped_states_by_index and scoped_state.nsecs are accessed + * # by the sampling thread; initialize them under the lock. +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[7] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_counter_name, __pyx_v_name_context, __pyx_t_4, __pyx_v_output_counter, __pyx_v_metrics_container}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_scoped_state = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":188 + * # Both scoped_states_by_index and scoped_state.nsecs are accessed + * # by the sampling thread; initialize them under the lock. + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * self.scoped_states_by_index.append(scoped_state) + * scoped_state._nsecs = 0 +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":189 + * # by the sampling thread; initialize them under the lock. + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.scoped_states_by_index.append(scoped_state) # <<<<<<<<<<<<<< + * scoped_state._nsecs = 0 + * pythread.PyThread_release_lock(self.lock) +*/ + if (unlikely(__pyx_v_self->scoped_states_by_index == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(0, 189, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->scoped_states_by_index, ((PyObject *)__pyx_v_scoped_state)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + + /* "apache_beam/runners/worker/statesampler_fast.pyx":190 + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) + * self.scoped_states_by_index.append(scoped_state) + * scoped_state._nsecs = 0 # <<<<<<<<<<<<<< + * pythread.PyThread_release_lock(self.lock) + * return scoped_state +*/ + __pyx_v_scoped_state->_nsecs = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":191 + * self.scoped_states_by_index.append(scoped_state) + * scoped_state._nsecs = 0 + * pythread.PyThread_release_lock(self.lock) # <<<<<<<<<<<<<< + * return scoped_state + * +*/ + PyThread_release_lock(__pyx_v_self->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":192 + * scoped_state._nsecs = 0 + * pythread.PyThread_release_lock(self.lock) + * return scoped_state # <<<<<<<<<<<<<< + * + * def update_metric(self, typed_metric_name, value): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_scoped_state); + __pyx_r = ((PyObject *)__pyx_v_scoped_state); + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":167 + * return self.scoped_states_by_index[self.current_state_index] + * + * cpdef _scoped_state(self, counter_name, name_context, output_counter, # <<<<<<<<<<<<<< + * metrics_container): + * """Returns a context manager managing transitions for a given state. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler._scoped_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_scoped_state); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_14_scoped_state, "Returns a context manager managing transitions for a given state.\n Args:\n counter_name: A CounterName object with information about the execution\n state.\n output_counter: A Beam Counter to which msecs are committed for reporting.\n metrics_container: A MetricsContainer for the current step.\n\n Returns:\n A ScopedState for the set of step-state-io_target.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state = {"_scoped_state", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_14_scoped_state}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_counter_name = 0; + PyObject *__pyx_v_name_context = 0; + PyObject *__pyx_v_output_counter = 0; + PyObject *__pyx_v_metrics_container = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_scoped_state (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_counter_name,&__pyx_mstate_global->__pyx_n_u_name_context,&__pyx_mstate_global->__pyx_n_u_output_counter,&__pyx_mstate_global->__pyx_n_u_metrics_container,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 167, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_scoped_state", 0) < (0)) __PYX_ERR(0, 167, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_scoped_state", 1, 4, 4, i); __PYX_ERR(0, 167, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 167, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 167, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 167, __pyx_L3_error) + } + __pyx_v_counter_name = values[0]; + __pyx_v_name_context = values[1]; + __pyx_v_output_counter = values[2]; + __pyx_v_metrics_container = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_scoped_state", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler._scoped_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_14_scoped_state(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), __pyx_v_counter_name, __pyx_v_name_context, __pyx_v_output_counter, __pyx_v_metrics_container); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_14_scoped_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_counter_name, PyObject *__pyx_v_name_context, PyObject *__pyx_v_output_counter, PyObject *__pyx_v_metrics_container) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_scoped_state", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler__scoped_state(__pyx_v_self, __pyx_v_counter_name, __pyx_v_name_context, __pyx_v_output_counter, __pyx_v_metrics_container, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler._scoped_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":194 + * return scoped_state + * + * def update_metric(self, typed_metric_name, value): # <<<<<<<<<<<<<< + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric = {"update_metric", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_typed_metric_name = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_metric (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_typed_metric_name,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 194, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_metric", 0) < (0)) __PYX_ERR(0, 194, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_metric", 1, 2, 2, i); __PYX_ERR(0, 194, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 194, __pyx_L3_error) + } + __pyx_v_typed_metric_name = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_metric", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.update_metric", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_16update_metric(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), __pyx_v_typed_metric_name, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_16update_metric(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_typed_metric_name, PyObject *__pyx_v_value) { + struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *__pyx_v_metrics_container = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_metric", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":196 + * def update_metric(self, typed_metric_name, value): + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container # <<<<<<<<<<<<<< + * if metrics_container is not None: + * metrics_container.get_metric_cell(typed_metric_name).update(value) +*/ + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((PyObject *)((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_t_1)->metrics_container); + __Pyx_INCREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":197 + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container + * if metrics_container is not None: # <<<<<<<<<<<<<< + * metrics_container.get_metric_cell(typed_metric_name).update(value) + * +*/ + __pyx_t_3 = (((PyObject *)__pyx_v_metrics_container) != Py_None); + if (__pyx_t_3) { + + /* "apache_beam/runners/worker/statesampler_fast.pyx":198 + * metrics_container = self.current_state_c().metrics_container + * if metrics_container is not None: + * metrics_container.get_metric_cell(typed_metric_name).update(value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_v_metrics_container->__pyx_vtab)->get_metric_cell(__pyx_v_metrics_container, __pyx_v_typed_metric_name, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell *)((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_t_2)->__pyx_vtab)->update(((struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell *)__pyx_t_2), __pyx_v_value, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":197 + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container + * if metrics_container is not None: # <<<<<<<<<<<<<< + * metrics_container.get_metric_cell(typed_metric_name).update(value) + * +*/ + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":194 + * return scoped_state + * + * def update_metric(self, typed_metric_name, value): # <<<<<<<<<<<<<< + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.update_metric", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_metrics_container); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":33 + * cdef list scoped_states_by_index + * + * cdef public bint started # <<<<<<<<<<<<<< + * cdef public bint finished + * cdef object sampling_thread +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->started); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.started.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 33, __pyx_L1_error) + __pyx_v_self->started = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.started.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":34 + * + * cdef public bint started + * cdef public bint finished # <<<<<<<<<<<<<< + * cdef object sampling_thread + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->finished); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.finished.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 34, __pyx_L1_error) + __pyx_v_self->finished = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.finished.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":41 + * cdef pythread.PyThread_type_lock lock + * + * cdef public int64_t state_transition_count # <<<<<<<<<<<<<< + * cdef public int64_t time_since_transition + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->state_transition_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.state_transition_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 41, __pyx_L1_error) + __pyx_v_self->state_transition_count = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.state_transition_count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":42 + * + * cdef public int64_t state_transition_count + * cdef public int64_t time_since_transition # <<<<<<<<<<<<<< + * + * cdef int32_t current_state_index +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->time_since_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.time_since_transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_2__set__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_2__set__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 42, __pyx_L1_error) + __pyx_v_self->time_since_transition = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.time_since_transition.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_18__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_lock_cannot_be_converted_to, 0, 0); + __PYX_ERR(4, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(4, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(4, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_20__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_lock_cannot_be_converted_to, 0, 0); + __PYX_ERR(4, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.StateSampler.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":204 + * """Context manager class managing transitions for a given sampler state.""" + * + * def __init__(self, # <<<<<<<<<<<<<< + * sampler, + * name, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_sampler = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_step_name_context = 0; + PyObject *__pyx_v_state_index = 0; + PyObject *__pyx_v_counter = 0; + PyObject *__pyx_v_metrics_container = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sampler,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_step_name_context,&__pyx_mstate_global->__pyx_n_u_state_index,&__pyx_mstate_global->__pyx_n_u_counter,&__pyx_mstate_global->__pyx_n_u_metrics_container,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 204, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 204, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 204, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, i); __PYX_ERR(0, 204, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 6)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 204, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 204, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 204, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 204, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 204, __pyx_L3_error) + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 204, __pyx_L3_error) + } + __pyx_v_sampler = values[0]; + __pyx_v_name = values[1]; + __pyx_v_step_name_context = values[2]; + __pyx_v_state_index = values[3]; + __pyx_v_counter = values[4]; + __pyx_v_metrics_container = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 204, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___init__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self), __pyx_v_sampler, __pyx_v_name, __pyx_v_step_name_context, __pyx_v_state_index, __pyx_v_counter, __pyx_v_metrics_container); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___init__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v_sampler, PyObject *__pyx_v_name, PyObject *__pyx_v_step_name_context, PyObject *__pyx_v_state_index, PyObject *__pyx_v_counter, PyObject *__pyx_v_metrics_container) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int32_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":211 + * counter, + * metrics_container): + * self.sampler = sampler # <<<<<<<<<<<<<< + * self.name = name + * self.name_context = step_name_context +*/ + __pyx_t_1 = __pyx_v_sampler; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler))))) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->sampler); + __Pyx_DECREF((PyObject *)__pyx_v_self->sampler); + __pyx_v_self->sampler = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":212 + * metrics_container): + * self.sampler = sampler + * self.name = name # <<<<<<<<<<<<<< + * self.name_context = step_name_context + * self.state_index = state_index +*/ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":213 + * self.sampler = sampler + * self.name = name + * self.name_context = step_name_context # <<<<<<<<<<<<<< + * self.state_index = state_index + * self.counter = counter +*/ + __Pyx_INCREF(__pyx_v_step_name_context); + __Pyx_GIVEREF(__pyx_v_step_name_context); + __Pyx_GOTREF(__pyx_v_self->name_context); + __Pyx_DECREF(__pyx_v_self->name_context); + __pyx_v_self->name_context = __pyx_v_step_name_context; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":214 + * self.name = name + * self.name_context = step_name_context + * self.state_index = state_index # <<<<<<<<<<<<<< + * self.counter = counter + * self.metrics_container = metrics_container +*/ + __pyx_t_2 = __Pyx_PyLong_As_int32_t(__pyx_v_state_index); if (unlikely((__pyx_t_2 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_v_self->state_index = __pyx_t_2; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":215 + * self.name_context = step_name_context + * self.state_index = state_index + * self.counter = counter # <<<<<<<<<<<<<< + * self.metrics_container = metrics_container + * +*/ + __Pyx_INCREF(__pyx_v_counter); + __Pyx_GIVEREF(__pyx_v_counter); + __Pyx_GOTREF(__pyx_v_self->counter); + __Pyx_DECREF(__pyx_v_self->counter); + __pyx_v_self->counter = __pyx_v_counter; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":216 + * self.state_index = state_index + * self.counter = counter + * self.metrics_container = metrics_container # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_t_1 = __pyx_v_metrics_container; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer))))) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->metrics_container); + __Pyx_DECREF((PyObject *)__pyx_v_self->metrics_container); + __pyx_v_self->metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":204 + * """Context manager class managing transitions for a given sampler state.""" + * + * def __init__(self, # <<<<<<<<<<<<<< + * sampler, + * name, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":218 + * self.metrics_container = metrics_container + * + * @property # <<<<<<<<<<<<<< + * def nsecs(self): + * return self._nsecs +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":220 + * @property + * def nsecs(self): + * return self._nsecs # <<<<<<<<<<<<<< + * + * def sampled_seconds(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_nsecs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":218 + * self.metrics_container = metrics_container + * + * @property # <<<<<<<<<<<<<< + * def nsecs(self): + * return self._nsecs +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.nsecs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":222 + * return self._nsecs + * + * def sampled_seconds(self): # <<<<<<<<<<<<<< + * return 1e-9 * self.nsecs + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds = {"sampled_seconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sampled_seconds (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sampled_seconds", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("sampled_seconds", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_2sampled_seconds(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_2sampled_seconds(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sampled_seconds", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":223 + * + * def sampled_seconds(self): + * return 1e-9 * self.nsecs # <<<<<<<<<<<<<< + * + * def sampled_msecs_int(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nsecs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Multiply(__pyx_mstate_global->__pyx_float_1eneg_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":222 + * return self._nsecs + * + * def sampled_seconds(self): # <<<<<<<<<<<<<< + * return 1e-9 * self.nsecs + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.sampled_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":225 + * return 1e-9 * self.nsecs + * + * def sampled_msecs_int(self): # <<<<<<<<<<<<<< + * return int(1e-6 * self.nsecs) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int = {"sampled_msecs_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sampled_msecs_int (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("sampled_msecs_int", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("sampled_msecs_int", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4sampled_msecs_int(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4sampled_msecs_int(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sampled_msecs_int", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":226 + * + * def sampled_msecs_int(self): + * return int(1e-6 * self.nsecs) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nsecs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Multiply(__pyx_mstate_global->__pyx_float_1eneg_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":225 + * return 1e-9 * self.nsecs + * + * def sampled_msecs_int(self): # <<<<<<<<<<<<<< + * return int(1e-6 * self.nsecs) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.sampled_msecs_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":228 + * return int(1e-6 * self.nsecs) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6__repr__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6__repr__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":229 + * + * def __repr__(self): + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) # <<<<<<<<<<<<<< + * + * cpdef __enter__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nsecs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_ScopedState; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_4[3] = __pyx_t_3; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":228 + * return int(1e-6 * self.nsecs) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":231 + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) + * + * cpdef __enter__(self): # <<<<<<<<<<<<<< + * self.old_state_index = self.sampler.current_state_index + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___enter__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":232 + * + * cpdef __enter__(self): + * self.old_state_index = self.sampler.current_state_index # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.state_index +*/ + __pyx_t_6 = __pyx_v_self->sampler->current_state_index; + __pyx_v_self->old_state_index = __pyx_t_6; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":233 + * cpdef __enter__(self): + * self.old_state_index = self.sampler.current_state_index + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * self.sampler.current_state_index = self.state_index + * self.sampler.state_transition_count += 1 +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->sampler->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":234 + * self.old_state_index = self.sampler.current_state_index + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.state_index # <<<<<<<<<<<<<< + * self.sampler.state_transition_count += 1 + * pythread.PyThread_release_lock(self.sampler.lock) +*/ + __pyx_t_6 = __pyx_v_self->state_index; + __pyx_v_self->sampler->current_state_index = __pyx_t_6; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":235 + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.state_index + * self.sampler.state_transition_count += 1 # <<<<<<<<<<<<<< + * pythread.PyThread_release_lock(self.sampler.lock) + * +*/ + __pyx_v_self->sampler->state_transition_count = (__pyx_v_self->sampler->state_transition_count + 1); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":236 + * self.sampler.current_state_index = self.state_index + * self.sampler.state_transition_count += 1 + * pythread.PyThread_release_lock(self.sampler.lock) # <<<<<<<<<<<<<< + * + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): +*/ + PyThread_release_lock(__pyx_v_self->sampler->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":231 + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) + * + * cpdef __enter__(self): # <<<<<<<<<<<<<< + * self.old_state_index = self.sampler.current_state_index + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__enter__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_8__enter__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_8__enter__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__enter__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___enter__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pyx":238 + * pythread.PyThread_release_lock(self.sampler.lock) + * + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.old_state_index +*/ + +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___exit__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_exc_type, CYTHON_UNUSED PyObject *__pyx_v_unused_exc_value, CYTHON_UNUSED PyObject *__pyx_v_unused_traceback, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_unused_exc_type, __pyx_v_unused_exc_value, __pyx_v_unused_traceback}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/runners/worker/statesampler_fast.pyx":239 + * + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) # <<<<<<<<<<<<<< + * self.sampler.current_state_index = self.old_state_index + * self.sampler.state_transition_count += 1 +*/ + (void)(PyThread_acquire_lock(__pyx_v_self->sampler->lock, WAIT_LOCK)); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":240 + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.old_state_index # <<<<<<<<<<<<<< + * self.sampler.state_transition_count += 1 + * pythread.PyThread_release_lock(self.sampler.lock) +*/ + __pyx_t_6 = __pyx_v_self->old_state_index; + __pyx_v_self->sampler->current_state_index = __pyx_t_6; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":241 + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.old_state_index + * self.sampler.state_transition_count += 1 # <<<<<<<<<<<<<< + * pythread.PyThread_release_lock(self.sampler.lock) +*/ + __pyx_v_self->sampler->state_transition_count = (__pyx_v_self->sampler->state_transition_count + 1); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":242 + * self.sampler.current_state_index = self.old_state_index + * self.sampler.state_transition_count += 1 + * pythread.PyThread_release_lock(self.sampler.lock) # <<<<<<<<<<<<<< +*/ + PyThread_release_lock(__pyx_v_self->sampler->lock); + + /* "apache_beam/runners/worker/statesampler_fast.pyx":238 + * pythread.PyThread_release_lock(self.sampler.lock) + * + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.old_state_index +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_exc_type = 0; + PyObject *__pyx_v_unused_exc_value = 0; + PyObject *__pyx_v_unused_traceback = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_exc_type,&__pyx_mstate_global->__pyx_n_u_unused_exc_value,&__pyx_mstate_global->__pyx_n_u_unused_traceback,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 238, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 238, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 238, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 238, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(0, 238, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 238, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 238, __pyx_L3_error) + } + __pyx_v_unused_exc_type = values[0]; + __pyx_v_unused_exc_value = values[1]; + __pyx_v_unused_traceback = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 238, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_10__exit__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self), __pyx_v_unused_exc_type, __pyx_v_unused_exc_value, __pyx_v_unused_traceback); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_10__exit__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v_unused_exc_type, PyObject *__pyx_v_unused_exc_value, PyObject *__pyx_v_unused_traceback) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__exit__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___exit__(__pyx_v_self, __pyx_v_unused_exc_type, __pyx_v_unused_exc_value, __pyx_v_unused_traceback, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":55 + * """Context manager class managing transitions for a given sampler state.""" + * + * cdef readonly StateSampler sampler # <<<<<<<<<<<<<< + * cdef readonly int32_t state_index + * cdef readonly object counter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->sampler); + __pyx_r = ((PyObject *)__pyx_v_self->sampler); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":56 + * + * cdef readonly StateSampler sampler + * cdef readonly int32_t state_index # <<<<<<<<<<<<<< + * cdef readonly object counter + * cdef readonly object name +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_self->state_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.state_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":57 + * cdef readonly StateSampler sampler + * cdef readonly int32_t state_index + * cdef readonly object counter # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object name_context +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->counter); + __pyx_r = __pyx_v_self->counter; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":58 + * cdef readonly int32_t state_index + * cdef readonly object counter + * cdef readonly object name # <<<<<<<<<<<<<< + * cdef readonly object name_context + * cdef readonly int64_t _nsecs +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":59 + * cdef readonly object counter + * cdef readonly object name + * cdef readonly object name_context # <<<<<<<<<<<<<< + * cdef readonly int64_t _nsecs + * cdef int32_t old_state_index +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name_context); + __pyx_r = __pyx_v_self->name_context; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":60 + * cdef readonly object name + * cdef readonly object name_context + * cdef readonly int64_t _nsecs # <<<<<<<<<<<<<< + * cdef int32_t old_state_index + * cdef readonly MetricsContainer metrics_container +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_nsecs); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState._nsecs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/runners/worker/statesampler_fast.pxd":62 + * cdef readonly int64_t _nsecs + * cdef int32_t old_state_index + * cdef readonly MetricsContainer metrics_container # <<<<<<<<<<<<<< + * + * cpdef __enter__(self) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container___get__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container___get__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->metrics_container); + __pyx_r = ((PyObject *)__pyx_v_self->metrics_container); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12__reduce_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12__reduce_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._nsecs, self.counter, self.metrics_container, self.name, self.name_context, self.old_state_index, self.sampler, self.state_index) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_nsecs); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int32_t(__pyx_v_self->old_state_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int32_t(__pyx_v_self->state_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->counter); + __Pyx_GIVEREF(__pyx_v_self->counter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->counter) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->metrics_container); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->metrics_container); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->metrics_container)) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->name) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->name_context); + __Pyx_GIVEREF(__pyx_v_self->name_context); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->name_context) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_2) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->sampler); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->sampler); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, ((PyObject *)__pyx_v_self->sampler)) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_3) != (0)) __PYX_ERR(4, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._nsecs, self.counter, self.metrics_container, self.name, self.name_context, self.old_state_index, self.sampler, self.state_index) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v__dict = __pyx_t_4; + __pyx_t_4 = 0; + + /* "(tree fragment)":7 + * state = (self._nsecs, self.counter, self.metrics_container, self.name, self.name_context, self.old_state_index, self.sampler, self.state_index) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_6 = (__pyx_v__dict != Py_None); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 7, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict) != (0)) __PYX_ERR(4, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.counter is not None or self.metrics_container is not None or self.name is not None or self.name_context is not None or self.sampler is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._nsecs, self.counter, self.metrics_container, self.name, self.name_context, self.old_state_index, self.sampler, self.state_index) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.counter is not None or self.metrics_container is not None or self.name is not None or self.name_context is not None or self.sampler is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, None), state +*/ + /*else*/ { + __pyx_t_6 = (__pyx_v_self->counter != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (((PyObject *)__pyx_v_self->metrics_container) != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->name != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->name_context != Py_None); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = (((PyObject *)__pyx_v_self->sampler) != Py_None); + __pyx_t_5 = __pyx_t_6; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.counter is not None or self.metrics_container is not None or self.name is not None or self.name_context is not None or self.sampler is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self.counter is not None or self.metrics_container is not None or self.name is not None or self.name_context is not None or self.sampler is not None + * if use_setstate: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ScopedState); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_121030918); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_121030918); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_121030918) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(4, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.counter is not None or self.metrics_container is not None or self.name is not None or self.name_context is not None or self.sampler is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, None), state + * else: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ScopedState__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ScopedState); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(4, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_121030918); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_121030918); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_121030918) != (0)) __PYX_ERR(4, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(4, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(4, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(4, 15, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ScopedState__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(4, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(4, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_14__setstate_cython__(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_14__setstate_cython__(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_ScopedState__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(4, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(4, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ScopedState__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.ScopedState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ScopedState(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_1__pyx_unpickle_ScopedState(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_1__pyx_unpickle_ScopedState = {"__pyx_unpickle_ScopedState", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_1__pyx_unpickle_ScopedState, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_1__pyx_unpickle_ScopedState(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_ScopedState (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_ScopedState", 0) < (0)) __PYX_ERR(4, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ScopedState", 1, 3, 3, i); __PYX_ERR(4, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(4, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(4, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(4, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ScopedState", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.__pyx_unpickle_ScopedState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(4, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ScopedState", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_ScopedState(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') # <<<<<<<<<<<<<< + * __pyx_result = ScopedState.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, __pyx_k_nsecs_counter_metrics_container); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(4, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') + * __pyx_result = ScopedState.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') + * __pyx_result = ScopedState.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = ScopedState.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(4, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState__set_state(((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') + * __pyx_result = ScopedState.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): + * __pyx_result._nsecs = __pyx_state[0]; __pyx_result.counter = __pyx_state[1]; __pyx_result.metrics_container = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.old_state_index = __pyx_state[5]; __pyx_result.sampler = __pyx_state[6]; __pyx_result.state_index = __pyx_state[7] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ScopedState(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.__pyx_unpickle_ScopedState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._nsecs = __pyx_state[0]; __pyx_result.counter = __pyx_state[1]; __pyx_result.metrics_container = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.old_state_index = __pyx_state[5]; __pyx_result.sampler = __pyx_state[6]; __pyx_result.state_index = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + +static PyObject *__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast___pyx_unpickle_ScopedState__set_state(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int32_t __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_ScopedState__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): + * __pyx_result._nsecs = __pyx_state[0]; __pyx_result.counter = __pyx_state[1]; __pyx_result.metrics_container = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.old_state_index = __pyx_state[5]; __pyx_result.sampler = __pyx_state[6]; __pyx_result.state_index = __pyx_state[7] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_nsecs = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->counter); + __Pyx_DECREF(__pyx_v___pyx_result->counter); + __pyx_v___pyx_result->counter = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer))))) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->metrics_container); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->metrics_container); + __pyx_v___pyx_result->metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name_context); + __Pyx_DECREF(__pyx_v___pyx_result->name_context); + __pyx_v___pyx_result->name_context = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->old_state_index = __pyx_t_3; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler))))) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->sampler); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->sampler); + __pyx_v___pyx_result->sampler = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(4, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->state_index = __pyx_t_3; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): + * __pyx_result._nsecs = __pyx_state[0]; __pyx_result.counter = __pyx_state[1]; __pyx_result.metrics_container = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.old_state_index = __pyx_state[5]; __pyx_result.sampler = __pyx_state[6]; __pyx_result.state_index = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 8); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_ScopedState__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_ScopedState__set_state(ScopedState __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._nsecs = __pyx_state[0]; __pyx_result.counter = __pyx_state[1]; __pyx_result.metrics_container = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.name_context = __pyx_state[4]; __pyx_result.old_state_index = __pyx_state[5]; __pyx_result.sampler = __pyx_state[6]; __pyx_result.state_index = __pyx_state[7] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.runners.worker.statesampler_fast.__pyx_unpickle_ScopedState__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + p->scoped_states_by_index = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->sampling_thread = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->scoped_states_by_index); + Py_CLEAR(p->sampling_thread); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->scoped_states_by_index) { + e = (*v)(p->scoped_states_by_index, a); if (e) return e; + } + if (p->sampling_thread) { + e = (*v)(p->sampling_thread, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)o; + tmp = ((PyObject*)p->scoped_states_by_index); + p->scoped_states_by_index = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->sampling_thread); + p->sampling_thread = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_started(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_started(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7started_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_finished(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_finished(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_8finished_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_state_transition_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_state_transition_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_22state_transition_count_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_time_since_transition(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_time_since_transition(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21time_since_transition_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler[] = { + {"run", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"update_metric", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler[] = { + {"started", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_started, __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_started, 0, 0}, + {"finished", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_finished, __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_finished, 0, 0}, + {"state_transition_count", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_state_transition_count, __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_state_transition_count, 0, 0}, + {"time_since_transition", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_time_since_transition, __pyx_setprop_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_time_since_transition, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {Py_tp_doc, (void *)PyDoc_STR("Tracks time spent in states during pipeline execution.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler_spec = { + "apache_beam.runners.worker.statesampler_fast.StateSampler", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.statesampler_fast.""StateSampler", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Tracks time spent in states during pipeline execution."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + +static PyObject *__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + p->sampler = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)Py_None); Py_INCREF(Py_None); + p->counter = Py_None; Py_INCREF(Py_None); + p->name = Py_None; Py_INCREF(Py_None); + p->name_context = Py_None; Py_INCREF(Py_None); + p->metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState(PyObject *o) { + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->sampler); + Py_CLEAR(p->counter); + Py_CLEAR(p->name); + Py_CLEAR(p->name_context); + Py_CLEAR(p->metrics_container); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->sampler) { + e = (*v)(((PyObject *)p->sampler), a); if (e) return e; + } + if (p->counter) { + e = (*v)(p->counter, a); if (e) return e; + } + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + if (p->name_context) { + e = (*v)(p->name_context, a); if (e) return e; + } + if (p->metrics_container) { + e = (*v)(((PyObject *)p->metrics_container), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *p = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *)o; + tmp = ((PyObject*)p->sampler); + p->sampler = ((struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->counter); + p->counter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->name_context); + p->name_context = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->metrics_container); + p->metrics_container = ((struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_nsecs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5nsecs_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_sampler(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7sampler_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_state_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11state_index_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_counter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7counter_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_4name_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_name_context(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_12name_context_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState__nsecs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_6_nsecs_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_metrics_container(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_17metrics_container_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState[] = { + {"sampled_seconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"sampled_msecs_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState[] = { + {"nsecs", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_nsecs, 0, 0, 0}, + {"sampler", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_sampler, 0, 0, 0}, + {"state_index", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_state_index, 0, 0, 0}, + {"counter", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_counter, 0, 0, 0}, + {"name", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_name, 0, 0, 0}, + {"name_context", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_name_context, 0, 0, 0}, + {"_nsecs", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState__nsecs, 0, 0, 0}, + {"metrics_container", __pyx_getprop_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_metrics_container, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7__repr__}, + {Py_tp_doc, (void *)PyDoc_STR("Context manager class managing transitions for a given sampler state.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState_spec = { + "apache_beam.runners.worker.statesampler_fast.ScopedState", + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.runners.worker.statesampler_fast.""ScopedState", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_7__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Context manager class managing transitions for a given sampler state."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = &__pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler.current_state = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state; + __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler.current_state_c = (struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *))__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_current_state_c; + __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler._scoped_state = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler__scoped_state; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler)) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler = &__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_StateSampler, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = &__pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState.__pyx___enter__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___enter__; + __pyx_vtable_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState.__pyx___exit__ = (PyObject *(*)(struct __pyx_obj_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState___exit__; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState)) __PYX_ERR(0, 201, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState = &__pyx_type_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_vtabptr_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ScopedState_2, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(6, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(7, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #else + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #else + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #else + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #else + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #else + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.cells"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "MetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_MetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell) __PYX_ERR(8, 23, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_MetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_MetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_MetricCell)) __PYX_ERR(8, 23, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "CounterCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_CounterCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell) __PYX_ERR(8, 29, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_CounterCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_CounterCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_CounterCell)) __PYX_ERR(8, 29, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell) __PYX_ERR(8, 37, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_DistributionCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_DistributionCell)) __PYX_ERR(8, 37, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "AbstractMetricCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_AbstractMetricCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell) __PYX_ERR(8, 44, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_AbstractMetricCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_AbstractMetricCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_AbstractMetricCell)) __PYX_ERR(8, 44, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "GaugeCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_GaugeCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell) __PYX_ERR(8, 50, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_GaugeCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_GaugeCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_GaugeCell)) __PYX_ERR(8, 50, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "StringSetCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_StringSetCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell) __PYX_ERR(8, 54, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_StringSetCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_StringSetCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_StringSetCell)) __PYX_ERR(8, 54, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieCell", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieCell), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell) __PYX_ERR(8, 58, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell = (struct __pyx_vtabstruct_11apache_beam_7metrics_5cells_BoundedTrieCell*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieCell); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_5cells_BoundedTrieCell)) __PYX_ERR(8, 58, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "DistributionData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_DistributionData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_DistributionData) __PYX_ERR(8, 62, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "_BoundedTrieNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells__BoundedTrieNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells__BoundedTrieNode) __PYX_ERR(8, 69, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.cells", "BoundedTrieData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_5cells_BoundedTrieData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_5cells_BoundedTrieData) __PYX_ERR(8, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "_TypedMetricName", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution__TypedMetricName), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution__TypedMetricName) __PYX_ERR(9, 26, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricUpdater", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricUpdater), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricUpdater) __PYX_ERR(9, 36, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer = __Pyx_ImportType_3_2_4(__pyx_t_1, "apache_beam.metrics.execution", "MetricsContainer", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #else + sizeof(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_11apache_beam_7metrics_9execution_MetricsContainer), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer) __PYX_ERR(9, 42, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer = (struct __pyx_vtabstruct_11apache_beam_7metrics_9execution_MetricsContainer*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7metrics_9execution_MetricsContainer); if (unlikely(!__pyx_vtabptr_11apache_beam_7metrics_9execution_MetricsContainer)) __PYX_ERR(9, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + { + __pyx_t_1 = PyImport_ImportModule("apache_beam.metrics.execution"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject__DEFAULT_get_current_tr); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 12; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_11apache_beam_7metrics_9execution__DEFAULT, (void **)&__pyx_vp_11apache_beam_7metrics_9execution_get_current_tracker, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_statesampler_fast(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_statesampler_fast}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "statesampler_fast", + __pyx_k_State_sampler_for_tracking_time, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_statesampler_fast(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_statesampler_fast(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_statesampler_fast(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'statesampler_fast' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "statesampler_fast" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_statesampler_fast", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__runners__worker__statesampler_fast) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.runners.worker.statesampler_fast")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.runners.worker.statesampler_fast", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/runners/worker/statesampler_fast.pyx":35 + * runtime profile to be produced. + * """ + * import threading # <<<<<<<<<<<<<< + * + * from apache_beam.utils.counters import CounterName +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":37 + * import threading + * + * from apache_beam.utils.counters import CounterName # <<<<<<<<<<<<<< + * from apache_beam.metrics.execution cimport MetricsContainer + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CounterName}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":112 + * pythread.PyThread_free_lock(self.lock) + * + * def run(self): # <<<<<<<<<<<<<< + * cdef int64_t last_nsecs = get_nsec_time() + * cdef int64_t elapsed_nsecs +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_5run, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_run, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_run, __pyx_t_2) < (0)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":141 + * pythread.PyThread_release_lock(self.lock) + * + * def start(self): # <<<<<<<<<<<<<< + * assert not self.started + * self.sampling_thread = threading.Thread(target=self.run) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_7start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_start, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_2) < (0)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":146 + * self.sampling_thread.start() + * + * def stop(self): # <<<<<<<<<<<<<< + * assert not self.finished + * pythread.PyThread_acquire_lock(self.lock, pythread.WAIT_LOCK) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_9stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_stop, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_2) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":155 + * self.sampling_thread.join() + * + * def reset(self): # <<<<<<<<<<<<<< + * for state in self.scoped_states_by_index: + * (state)._nsecs = 0 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_11reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":160 + * self.started = self.finished = False + * + * cpdef ScopedState current_state(self): # <<<<<<<<<<<<<< + * return self.current_state_c() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_13current_state, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_current_state, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_current_state, __pyx_t_2) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":167 + * return self.scoped_states_by_index[self.current_state_index] + * + * cpdef _scoped_state(self, counter_name, name_context, output_counter, # <<<<<<<<<<<<<< + * metrics_container): + * """Returns a context manager managing transitions for a given state. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_15_scoped_state, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler__scoped_state, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_scoped_state, __pyx_t_2) < (0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":194 + * return scoped_state + * + * def update_metric(self, typed_metric_name, value): # <<<<<<<<<<<<<< + * # Each of these is a cdef lookup. + * metrics_container = self.current_state_c().metrics_container +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_17update_metric, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler_update_metric, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_StateSampler, __pyx_mstate_global->__pyx_n_u_update_metric, __pyx_t_2) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(4, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.lock cannot be converted to a Python object for pickling" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_12StateSampler_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_StateSampler___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(4, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":222 + * return self._nsecs + * + * def sampled_seconds(self): # <<<<<<<<<<<<<< + * return 1e-9 * self.nsecs + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_3sampled_seconds, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState_sampled_seconds, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_sampled_seconds, __pyx_t_2) < (0)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":225 + * return 1e-9 * self.nsecs + * + * def sampled_msecs_int(self): # <<<<<<<<<<<<<< + * return int(1e-6 * self.nsecs) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_5sampled_msecs_int, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState_sampled_msecs_int, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_sampled_msecs_int, __pyx_t_2) < (0)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":231 + * return "ScopedState[%s, %s]" % (self.name, self.nsecs) + * + * cpdef __enter__(self): # <<<<<<<<<<<<<< + * self.old_state_index = self.sampler.current_state_index + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_9__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState___enter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_2) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":238 + * pythread.PyThread_release_lock(self.sampler.lock) + * + * cpdef __exit__(self, unused_exc_type, unused_exc_value, unused_traceback): # <<<<<<<<<<<<<< + * pythread.PyThread_acquire_lock(self.sampler.lock, pythread.WAIT_LOCK) + * self.sampler.current_state_index = self.old_state_index +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_11__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState___exit, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_2) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(4, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_ScopedState, (type(self), 0x736c906, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_ScopedState__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_11ScopedState_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ScopedState___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7runners_6worker_17statesampler_fast_ScopedState, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(4, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_ScopedState(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x736c906, 0xd99269c, 0xe7dadb8, b'_nsecs, counter, metrics_container, name, name_context, old_state_index, sampler, state_index') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7runners_6worker_17statesampler_fast_1__pyx_unpickle_ScopedState, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ScopedState, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_runners_worker_state, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_ScopedState, __pyx_t_2) < (0)) __PYX_ERR(4, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/runners/worker/statesampler_fast.pyx":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.runners.worker.statesampler_fast", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.runners.worker.statesampler_fast"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 8; } index[] = {{2},{64},{179},{12},{1},{1},{1},{8},{48},{7},{6},{2},{9},{61},{14},{11},{20},{11},{21},{20},{29},{31},{29},{27},{12},{30},{32},{26},{26},{18},{16},{18},{17},{26},{6},{44},{26},{18},{18},{7},{12},{13},{8},{5},{13},{9},{8},{8},{12},{13},{5},{4},{10},{23},{8},{17},{10},{4},{8},{12},{7},{5},{9},{14},{3},{14},{12},{11},{10},{26},{14},{12},{10},{17},{13},{5},{3},{17},{15},{7},{18},{24},{21},{18},{13},{4},{12},{10},{12},{19},{5},{5},{11},{17},{4},{6},{8},{9},{17},{7},{15},{16},{16},{6},{13},{12},{5},{6},{40},{17},{12},{50},{39},{48},{60},{13},{41},{9},{31},{233},{11},{85},{190},{55}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (1463 bytes) */ +const char* const cstring = "(\265/\375`S\tm-\000\332E\330\016;\000\227s\374\377\227_C\235\356\335\277\272\022\372\325\257~\365[\351\207\356\213Dd{S\354\006\325\237KJ\215\222`\r\370\234x\203\354\230\323c\234\224\034\031\027\371f!u\341h\336\263\304\335[\271s3\077\077\266\316\361ts\322g@\000\240\t\207\342\245\257V\013K\031Z\255MuPki\320/\251i\r\221\2454?\003V\273\252Y\321\320\254bV1*_*\025\325\343\235\337\372\315\2503=\315\236h\202\254\340KHg\261Hj\206\n\221\372\374\020\002R\255(U\223l]Jgi\001m\375PgR\207\201\326\226:\244\004)\310\317\305jUM\260\340B\220\303I\245\243\363V\216W\177\t\264\252\365\245B\014\364\001\026\206\r\231\350,\365\201\005\225f\244\253\324\204\267\366\324\031\210\214\345+\207Bo91\261\275\254\n\360\2003 \r+ci\326\024U\242\325mj\200\372\320\352\004\001)\201(\036-5\370\265Xm\0062\255\263\025\266^\030\264\262\224\377x\252EB\237\301T1\205I\321_\376\225\374\nX-\254)\345\203\363C\233\251\311""\340T\352C\307\267\263Q2'\341\262_\001\253\205=\3458i\326\306\212\250'\351R\216\307\326u\301\025\247\002 \311\355,(U\223\215u`\031\240T\352\203\253U\261\035\010\035\2015hi,\213\355Y5\016:\254\301\325\332\202\265\221\316\320\031\020Z\032\020\257\007\352-}\025\320\330\013v\257\"j\204\253=0h\027\016\\-\201\223\013\3137\024xV\r\205\256`\320\332V\207\365T-X\r\266H\245h!\264\332\001\201\326E\320\362\202<\301\332G\027\327\rv\306\202\260\240d\354N\255\220\301TW\252\260\346UI\265hu\214\203k\321\362\324\254\256\244\r\013j\230\276\002R\017Q\260&\025p\203]`=dP\260\247\223`\201\323\013\250\002\312\260!\t=\241\325\362V\343*\227[\345\274\022\022Z\371\370\254l\266\025\016\316\252VS)%\235\375,{\211\324\221\302\036\026\365\242\241>\004\324\201\002\200\351\250q\035S\214\214\214\310\210$I\n\3510\204 \245\310\312\003\002\")\017\022D\030\252\231\222\244\320\376g\226i\206\230\276 \032\230\323,\365\222s\014J\257\317\035_\304\256K\312G\247\247\337\330\356|S\364\024\363|\017\356\031\350}\264\255JM|Y\313\216\3321\210(\267@_8\324\033\244\033\030\377\254\345\336FaCV\337\375|N\034q\307\031WHD\230\206\322.o\004\222 \336\250@u\031\014GS\325\227\3057\325\352\357\030>\262\264m\365\251\242\217\341\327\364\252\362%1\250\241\333``Z\010\3137\215\027i\016\246\356\247\177\335\322\216\336\213\354\2554\272\373\227XQ\270\003\337\311xvb\033(\3134\233\301}\245\211\360\214df\344\2505\023h\221ql\3027\016/0\246\246\r!\267]!)\200R\036\222z\202:+\213-\366u\n\017z\337\320\264\324X\234\233(\364\275\356\020\273}}\027\274\337\240\016\246\257\037\376\232\3207\\\370z\002\021\351M\000\206:\310\250\337\270\023;\206\276\212\325y\007\214j\212'\033\377A\244\300wX\037a!\037\001\027\331\255;`\034\021\245""\202\213O\034\354\327dX/\250a\202,\253\267\002\223\315\277\245\206H\343K\020\200\213%\034\ts2\347\316\243H\353\210\t\202\033\273\251\327\013=\276|\000\2100\333\314\021\252\351\241\353\377\304\230\362\021\337\317\320R\207,\363\007"; + PyObject *data = __Pyx_DecompressString(cstring, 1463, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (1546 bytes) */ +const char* const cstring = "BZh91AY&SY[X%\232\000\000\301\177\377\377\377\374\377\377\377\356\375\377\365\377\353\277\377\377\344\300@@@@@@@@@@@@\000@\000P\005k\326\023\024\000\005P\301a\251\240P\324\324\3657\242a'\223e5\017Q\352z\206OF\240\036Dz\206M\246\246\3124\330I\246\322\017$mO\024=\250\237\251\243(4 #Sjbj\237\225\037\225\032=#@\320\3204\323C@\006\200\000\000\000\032\032\032\006CM\020`\000\230\000\t\200\000\000\000\000\000\000\000\000\000\000\000\0100\000L\000\004\300\000\000\000\000\000\000\000\000\000\000\000\001)\242&\201\000\010\004\332\247\210\3110\206\232\000\r\003@\320\000\000\000\000\006\206!\224\306\230@=b1\302\214\005q\270G#\002\030p:\351\007\003\250;\245\263\267N\256\354\013\\7\035\343\355BXB\020\204!?\370\210\026\241\231\203\243N\224\254\222\342hC\324\302\005\314X\220\310\330\003\2456c\264\016\2709P4\266x\257\206jb\377J\003JS\267\231\211rRX0N\031\304\263!#C\250\246\372N\3511\341(\333>\\2\311\267\277\000\334\002\272\346\231\242i\226\241\003e$7\007\204\233\316\274\330;\233N5\2055\226\217\353\016\323S\356\214jA\0061\270\235U\004\260\371\007XZ_\354\230vZ\353\2005FR\006\3564\241,\222\024R\014d\320Z\305\024$\352i\034\324\375k\017\337\350\322\3570\267\252\352i\244)\345\205\257k\266/GL\3118\222\320\r\221\tJ8i\263\216u\203\200u@:\021\235\234\333ghh\030\210\021\037\206\321\302a,\000\275M\005\241\007<\007\214M|,$7*\027}\215/\314&_(\247D<\276\177\255\331\271\r\rnv\306O'K\235\005\223\372wN/Z\267z\034\257\256-6[U\371Y\212\211,\272\361\0321\021\022z6F\231\270\200\024\000f\316\225mAT\201\263\233\262\217\371\201\3457B\252\264\256\037\0330EUK\367\305\327\215]w\316\005y|hb\2640\264\313@H\010\214si\250D\365hO)\322\246\217_Ws\022j\313\266\242R,r\032w8\245\"\006\270\026\310\367\220\325\020<\235\323\202&\256\253\004L\233\363\202\267\032I\255\272R$\305\260\361B\244\360 \212\013\221h\265%\263\327s\337)\304_-$8\374\317\003\367\274\254\2152i~/\000&\003D\210L\336\266=\035\\\232\261]\331p\316\346\342W]6fj\025\273T\241\021V\377\037\010\373a\311\316:d\261\033\006m\366\367\177\257\017\321\016:\261v)\270""\271d\363\336\305\214_N;\257\231i\205\370\215\270,k\371L\022#\215a\353P\311.\025\232\361\256\013\201\336\360A#0\341\306f\271\224>\"\325\265\020a\210H\353C\214\243\254Tn8<@J\253\310\272\004\320B\313\204\320kXi\202\3634X$\331\325\226\3438*\321t\335\241%\226\260\312!2^\251jX\306RM\242a\330\322[\024\261\030\224\302\205\330\332\201\255\226\006\272\264\010\300\017\035\023V\233\2420! Hb\372\226\006\000X/\214\025E\214\322l\350\034\310\035\260\022\303\211\026P\256\215a:\005\355\taz\256\276\030K\036\345{W9\3229Z\033\223?k\031\274\306\206\233\306u\217\233\221\314\n\321\262\310\335[r\320\024U6\232M\262\225\321lR8\256\327Uzm\337\355\247\272\220\310Hg\330\rvlu\r7M\216Ih\031hf\311\271q\313:\277\177[\\\213F1\316\222KC\331d\325\014k<\0065{\025\364\211\317x\314\034\266h\361\025\235~?\264\241\233\221#\311\004\262F\344.c\342\372\016\222\020\357\001Bm\254\032\334\033\322\260)\003\017\354g\376\240\377/\364C\"\305|v\210D\2139\303\033\226V\240\003\361\214f\377\204\355\355\367o\220\271\005\222\257\304\213\252\n@6\001\277o\234z&T\2713\307,N\026\310!\030""\233\210i\362!\317\330\317\021$\234G\373\217N8\241\234\177,\2432h\277\323J\332\306IrT#\321\023\346rke\204\315m\272\300N\252\247EU\002!\271\236\317\300i\235\350\273\025\314S\244T\251\342\273J~\355\006H\323\316\247\351\022\211G>$\230\251\345\301(\237\246\272r\3278\213TkrUk\344\212R\247\300<<\326\241\347\001\217j-Q ;\374\005\275\355w\374]\311\024\341BAm`\226h"; + PyObject *data = __Pyx_DecompressString(cstring, 1546, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1443 bytes) */ +const char* const cstring = "x\332\225TKS\033G\020\226\024\001\342i\300T\201\363b\345\330\306\261AD\025\271\234\304\2518\n\306$)\027A@\034\273Rdj\264;B\013\253Yig\026\244*W\231\243\216{\334\343\036\367\250#G\0359\316q\217\374\004~Bzf\005\226\3009\244J\332\356\351\351\356\371\246\373\353Y\326\212\206\341\020\3064\273\242\355p\314\311\016\256\325-\342\344t\327q\010\345\210I#2\251A\232\232\3114js\355\330v\214\025l\231\373\224\030\271M\233\023\215W1\327\326Z\274jS\351d\020\313,\023\007\002\255\226\306\270c\352\2348\322\211j[\353[+\205\357\n\032\246\206\346\220\003\242s\2461\267\254[\2301\242P\224]\323\342&\325x\253NXN\373\255\242\265lW\243\204\030\032\267\265:\370\365\007\360*\241\032#\\*\332\022\246\200\017s\323\246\010\302M\272\277\244\031\246\003\207\230GDF\277\304\026#\271\035\335\256\023C\335\366\357\275\334sl\030\010\302\010\256c\275JP\231\340\332\252\343RJ\034\266\nW=$\316\252*\002\213+\203*\230\361\\\275\3254L\206\313\026!T~\367u\223\305\232\301\210U\311Y\266~\250\351\n\217V&\232n\323#\342\360\370\016X\333\212Ke\227e\001\264\212\355huS?\264\000\360\217\262\\t\237\331\256\243\223\237\326l\227B\3516q\215 \264\325j\302\377\005\024\023m\222&\337&\225\276\213\364\2519\204\210\214B\350\232\261i\362\3536\207\030\256N\220\256\360\\\337\204\262\306\335\377\330v\\\r\003\325\030\321\031\360\203\177l\023\366lj\260~b\r\220\354&\200\301\335\233\010\006\366\231:2\246\350\177\223w`\007\270N\370\240\305\245\003k\210q\3705\213]\0370\270uC\202\252\021I\355\335\252C\260\321G\236\\\217<\271\230<\271\033\344\351\367u\271i\261\234\036\367\231a\326\242\272i\303\332\261a\207\022\246\003)\344\370!\356`\235\224\261~\330\363\355\tD\201\033\203\263\212\014I\221X\020\013\327\031\224\210\252.]\362\342\222\013\010U\\\252K\271\177Yh\204L\206\256\21679\251\261\003\333\2440m@dX\221c\024g\217q\326\271<\277\356r\324\273e\335\256#\004#\207\240n\372!sk\361\n\232\351Z<\326{\360\245*_\216Xs\251\232+\322\317\334x\347\210\313Y\225Wo\270\330\212A""]\261\021\335\340\345\225\2014\245\n\034\202&\337\030\201k\264\357\365\\\t\230iT'\216iK\367\233\026\244Xw\335\356\310\247\354\272\321e\003\274\227\257\215\032\224^eA3H\005\253\272\260\017]\2759J\361\211*\305\207'\236qR\037h\216\344>8\002?\020R\215G\\\361\035\000\3112\033\275\206\253\030\227\036R\373\230\272\324\225\224#M]u\242oy\204-\367r}\305\347x\230\006F\n\034\256\360\252\030\365a[\255?\342\007\363Q\"\201^\254\277,\376\371j7!\221]\362_\346\204\211;\311F\351\361\366\267m\334v\275_<\303\317\306\206\202\270\265\3507zz\233{\371h\342n\220\r\n\301\373\016\216\322\231\366\204W\274\2644.\206\023C\243\"\263\340\017\371\245\376\210tFd>\363\277\0176\302|\270\321)t\032\312\262\340\017\373\030\334z\321\315\360\375\251\312\230\021\323K\001\017\363=\375q\230\377\340\242\200\250l\005\277\0314\376\177\354x\373\211\227\362\356yp\360yz\301O\213\317\227\303_B\210\035\021#w\374\371 \031\r\317\213\371\245\240!\036\376p\272\324\235\351fO\222Qz\254\375\330S7\312\264G\2759\257\024\215\314y/\375GAQZ\306\275\202\367.\310\237$/2\211\241\251\366\256w\307\277\347\037\204i\261\374s7\335\3358+\234\275\027\377\224E\231\013\336\274H$Z\311\265\024\210\265\324\206\024\033\251_SQz\242\275\341\345!\343r \221\234\034\265\377\362\326\3759\277\024ef\275l\224\231\367\032\347\360\341\252\204O:\237t\n\342\351\357gK\242\364Z\274~+\336\356\211=]\350\007\342\300\026\266#\234#H{\234\\\227\331\327S\257\244x\225*IQJ\355J\261\233z#\305\233\024\226\002\247\252RTSfJ\036\335\2102\267\304\255\345\360E'\331\231?\035\357>=\313\236\017Z\362\262 _\2073\341\203N\362${\261\220\030\232\367t\177\006\356\014\330o{\317|\3547\242E\255\377\007\274\230\374\252\2174\"\263\350\037\007\030\372\227\236\366\306\374+\n4d\177\362\262\316_\372\2650\177\236~\034\026B0>\010\014\361h\275\273\335mD\243c\321\360H\224\231R4-F\231/\374\275\360>\370L,\372N0\027\224\242\211i1}?\330\206\\\323\017\340\010\036>?\205\n\216Fc\223\320\231\231hb2\032\373\324_\tXx7,\002\256\361y\257\354O\006\250S\214\246f\305,\034(V\327\273\245h\354\266jH\026\342\304""\344\375`'L\207E\225\033n\036M\000\240\020\266\246\304\324\3030\031\215-\370\311\363Y\320\302\271\260t\222__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 108; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 15) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 108; i < 124; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 124; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 108; + for (Py_ssize_t i=0; i<16; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {1.2,1e-6,1e-9}; + for (int i = 0; i < 3; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 3; + int8_t const cint_constants_1[] = {100}; + int32_t const cint_constants_4[] = {121030918L}; + for (int i = 0; i < 2; i++) { + numbertab[i] = PyLong_FromLong((i < 1 ? cint_constants_1[i - 0] : cint_constants_4[i - 1])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<5; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 8; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 112}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_last_nsecs, __pyx_mstate->__pyx_n_u_elapsed_nsecs, __pyx_mstate->__pyx_n_u_latest_transition_count, __pyx_mstate->__pyx_n_u_sampling_period_us, __pyx_mstate->__pyx_n_u_nsecs_ptr}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_run, __pyx_mstate->__pyx_kp_b_iso88591_m1_4q_d_ERq_auA_q_r_Q_Rq_at_T_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 141}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_4t1_9G1G4q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 146}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_kp_b_iso88591_4t1_4_a_A_4q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 155}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_Q_F_A_4_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 160}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_current_state, __pyx_mstate->__pyx_kp_b_iso88591_4_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 167}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counter_name, __pyx_mstate->__pyx_n_u_name_context, __pyx_mstate->__pyx_n_u_output_counter, __pyx_mstate->__pyx_n_u_metrics_container}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_scoped_state, __pyx_mstate->__pyx_kp_b_iso88591_c_a_aq_4_a_waq_4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_typed_metric_name, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_metrics_container}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_update_metric, __pyx_mstate->__pyx_kp_b_iso88591_Ba_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 222}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_sampled_seconds, __pyx_mstate->__pyx_kp_b_iso88591_5_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 225}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_sampled_msecs_int, __pyx_mstate->__pyx_kp_b_iso88591_3auBd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 231}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_4xq_4x_a_t1_1_4xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_exc_type, __pyx_mstate->__pyx_n_u_unused_exc_value, __pyx_mstate->__pyx_n_u_unused_traceback}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_runners_worker_state_2, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_4x_a_t1_1_4xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_j_G4_bbttx_y_C_C_G_G_H_G1F_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_ScopedState, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_QnN_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2); + } + calculate_long: + { + long q, r; + q = a / b; + r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return PyLong_FromLong(q); + } + calculate_long_long: + { + PY_LONG_LONG q, r; + q = lla / llb; + r = lla - q*llb; + q -= ((r != 0) & ((r ^ llb) < 0)); + return PyLong_FromLongLong(q); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_FloorDivideObjC(op1, op2, inplace); +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName (used by GetModuleGlobalName) */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} +#endif + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int32_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int32_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int32_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int32_t) -1; + val = __Pyx_PyLong_As_int32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) { + return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) { + return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) { + return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int32_t"); + return (int32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int32_t"); + return (int32_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/runners/worker/statesampler_fast.cp314-win_amd64.pyd b/sdks/python/apache_beam/runners/worker/statesampler_fast.cp314-win_amd64.pyd new file mode 100644 index 000000000000..f9e93a4016c0 Binary files /dev/null and b/sdks/python/apache_beam/runners/worker/statesampler_fast.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/testing/fast_test_utils.c b/sdks/python/apache_beam/testing/fast_test_utils.c new file mode 100644 index 000000000000..27b861699e0c --- /dev/null +++ b/sdks/python/apache_beam/testing/fast_test_utils.c @@ -0,0 +1,11602 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.testing.fast_test_utils", + "sources": [ + "apache_beam\\testing\\fast_test_utils.pyx" + ] + }, + "module_name": "apache_beam.testing.fast_test_utils" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__testing__fast_test_utils +#define __PYX_HAVE_API__apache_beam__testing__fast_test_utils +/* Early includes */ +#include +#include +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/testing/fast_test_utils.pyx", + "", + "cpython/type.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator; + +/* "apache_beam/testing/fast_test_utils.pxd":21 + * cimport libc.stdint + * + * cdef class LCGenerator(object): # <<<<<<<<<<<<<< + * cdef libc.stdint.uint64_t _a + * cdef libc.stdint.uint64_t _c +*/ +struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_vtab; + uint64_t _a; + uint64_t _c; + int32_t _bits; + uint64_t _mask; + uint64_t _seed; +}; + + + +/* "apache_beam/testing/fast_test_utils.pyx":24 + * + * + * cdef class LCGenerator(object): # <<<<<<<<<<<<<< + * + * def __cinit__(self): +*/ + +struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator { + void (*seed)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, uint64_t, int __pyx_skip_dispatch); + void (*seed_jdk)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, uint64_t, int __pyx_skip_dispatch); + int32_t (*next_int)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch); + uint32_t (*next_uint)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch); + PyObject *(*randbytes)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int, int __pyx_skip_dispatch); + double (*random_sample)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_vtabptr_11apache_beam_7testing_15fast_test_utils_LCGenerator; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* DivInt[long].proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by SetupReduce) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); +#endif + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static void __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed, int __pyx_skip_dispatch); /* proto*/ +static void __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed_jdk(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed, int __pyx_skip_dispatch); /* proto*/ +static int32_t __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_int(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static uint32_t __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_uint(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_randbytes(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_v_length, int __pyx_skip_dispatch); /* proto*/ +static double __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_random_sample(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "apache_beam.testing.fast_test_utils" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.testing.fast_test_utils" +extern int __pyx_module_is_main_apache_beam__testing__fast_test_utils; +int __pyx_module_is_main_apache_beam__testing__fast_test_utils = 0; + +/* Implementation of "apache_beam.testing.fast_test_utils" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator___cinit__(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_2seed(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_4seed_jdk(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_6next_int(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_8next_uint(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_10randbytes(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_v_length); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_12random_sample(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_7testing_15fast_test_utils_LCGenerator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyObject *__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator; + PyTypeObject *__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_codeobj_tab[8]; + PyObject *__pyx_string_tab[56]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_apache_beam_testing_fast_test_ut_2 __pyx_string_tab[1] +#define __pyx_kp_u_disable __pyx_string_tab[2] +#define __pyx_kp_u_enable __pyx_string_tab[3] +#define __pyx_kp_u_gc __pyx_string_tab[4] +#define __pyx_kp_u_isenabled __pyx_string_tab[5] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[6] +#define __pyx_kp_u_stringsource __pyx_string_tab[7] +#define __pyx_n_u_LCGenerator __pyx_string_tab[8] +#define __pyx_n_u_LCGenerator___reduce_cython __pyx_string_tab[9] +#define __pyx_n_u_LCGenerator___setstate_cython __pyx_string_tab[10] +#define __pyx_n_u_LCGenerator_next_int __pyx_string_tab[11] +#define __pyx_n_u_LCGenerator_next_uint __pyx_string_tab[12] +#define __pyx_n_u_LCGenerator_randbytes __pyx_string_tab[13] +#define __pyx_n_u_LCGenerator_random_sample __pyx_string_tab[14] +#define __pyx_n_u_LCGenerator_seed __pyx_string_tab[15] +#define __pyx_n_u_LCGenerator_seed_jdk __pyx_string_tab[16] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[17] +#define __pyx_n_u_apache_beam_testing_fast_test_ut __pyx_string_tab[18] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[19] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[20] +#define __pyx_n_u_func __pyx_string_tab[21] +#define __pyx_n_u_getstate __pyx_string_tab[22] +#define __pyx_n_u_is_coroutine __pyx_string_tab[23] +#define __pyx_n_u_items __pyx_string_tab[24] +#define __pyx_n_u_length __pyx_string_tab[25] +#define __pyx_n_u_main __pyx_string_tab[26] +#define __pyx_n_u_module __pyx_string_tab[27] +#define __pyx_n_u_name __pyx_string_tab[28] +#define __pyx_n_u_next_int __pyx_string_tab[29] +#define __pyx_n_u_next_uint __pyx_string_tab[30] +#define __pyx_n_u_pop __pyx_string_tab[31] +#define __pyx_n_u_pyx_state __pyx_string_tab[32] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[33] +#define __pyx_n_u_qualname __pyx_string_tab[34] +#define __pyx_n_u_randbytes __pyx_string_tab[35] +#define __pyx_n_u_random_sample __pyx_string_tab[36] +#define __pyx_n_u_reduce __pyx_string_tab[37] +#define __pyx_n_u_reduce_cython __pyx_string_tab[38] +#define __pyx_n_u_reduce_ex __pyx_string_tab[39] +#define __pyx_n_u_seed __pyx_string_tab[40] +#define __pyx_n_u_seed_jdk __pyx_string_tab[41] +#define __pyx_n_u_self __pyx_string_tab[42] +#define __pyx_n_u_set_name __pyx_string_tab[43] +#define __pyx_n_u_setdefault __pyx_string_tab[44] +#define __pyx_n_u_setstate __pyx_string_tab[45] +#define __pyx_n_u_setstate_cython __pyx_string_tab[46] +#define __pyx_n_u_test __pyx_string_tab[47] +#define __pyx_n_u_values __pyx_string_tab[48] +#define __pyx_kp_b_iso88591_9D_S_2 __pyx_string_tab[49] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[50] +#define __pyx_kp_b_iso88591_Qd_WD_G2Q __pyx_string_tab[51] +#define __pyx_kp_b_iso88591_Qd_gT_WBa __pyx_string_tab[52] +#define __pyx_kp_b_iso88591_WBc_A_q_Rq_U_3fA_d_A_b_D_avQ_AQ __pyx_string_tab[53] +#define __pyx_kp_b_iso88591_r_T_4uBd __pyx_string_tab[54] +#define __pyx_kp_b_iso88591_r_U_D __pyx_string_tab[55] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator); + for (int i=0; i<8; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<56; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator); + for (int i=0; i<8; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<56; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/testing/fast_test_utils.pyx":26 + * cdef class LCGenerator(object): + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self._a = 0x5DEECE66Dull + * self._c = 0xBull +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator___cinit__(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator___cinit__(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":27 + * + * def __cinit__(self): + * self._a = 0x5DEECE66Dull # <<<<<<<<<<<<<< + * self._c = 0xBull + * self._bits = 48 +*/ + __pyx_v_self->_a = 0x5DEECE66DULL; + + /* "apache_beam/testing/fast_test_utils.pyx":28 + * def __cinit__(self): + * self._a = 0x5DEECE66Dull + * self._c = 0xBull # <<<<<<<<<<<<<< + * self._bits = 48 + * self._mask = (1ull << self._bits) - 1 +*/ + __pyx_v_self->_c = 0xBULL; + + /* "apache_beam/testing/fast_test_utils.pyx":29 + * self._a = 0x5DEECE66Dull + * self._c = 0xBull + * self._bits = 48 # <<<<<<<<<<<<<< + * self._mask = (1ull << self._bits) - 1 + * self.seed(0) +*/ + __pyx_v_self->_bits = 48; + + /* "apache_beam/testing/fast_test_utils.pyx":30 + * self._c = 0xBull + * self._bits = 48 + * self._mask = (1ull << self._bits) - 1 # <<<<<<<<<<<<<< + * self.seed(0) + * +*/ + __pyx_v_self->_mask = ((1ULL << __pyx_v_self->_bits) - 1); + + /* "apache_beam/testing/fast_test_utils.pyx":31 + * self._bits = 48 + * self._mask = (1ull << self._bits) - 1 + * self.seed(0) # <<<<<<<<<<<<<< + * + * cpdef void seed(self, libc.stdint.uint64_t seed): +*/ + ((struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self->__pyx_vtab)->seed(__pyx_v_self, 0, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L1_error) + + /* "apache_beam/testing/fast_test_utils.pyx":26 + * cdef class LCGenerator(object): + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self._a = 0x5DEECE66Dull + * self._c = 0xBull +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":33 + * self.seed(0) + * + * cpdef void seed(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed * self._a + self._c) & self._mask + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static void __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed, int __pyx_skip_dispatch) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("seed", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_seed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_uint64_t(__pyx_v_seed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":34 + * + * cpdef void seed(self, libc.stdint.uint64_t seed): + * self._seed = (seed * self._a + self._c) & self._mask # <<<<<<<<<<<<<< + * + * cpdef void seed_jdk(self, libc.stdint.uint64_t seed): +*/ + __pyx_v_self->_seed = (((__pyx_v_seed * __pyx_v_self->_a) + __pyx_v_self->_c) & __pyx_v_self->_mask); + + /* "apache_beam/testing/fast_test_utils.pyx":33 + * self.seed(0) + * + * cpdef void seed(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed * self._a + self._c) & self._mask + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed = {"seed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + uint64_t __pyx_v_seed; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("seed (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_seed,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 33, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 33, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "seed", 0) < (0)) __PYX_ERR(0, 33, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("seed", 1, 1, 1, i); __PYX_ERR(0, 33, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 33, __pyx_L3_error) + } + __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("seed", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 33, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_2seed(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self), __pyx_v_seed); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_2seed(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("seed", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed(__pyx_v_self, __pyx_v_seed, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":36 + * self._seed = (seed * self._a + self._c) & self._mask + * + * cpdef void seed_jdk(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed ^ self._a) & self._mask + * +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static void __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed_jdk(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed, int __pyx_skip_dispatch) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("seed_jdk", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_seed_jdk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_uint64_t(__pyx_v_seed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":37 + * + * cpdef void seed_jdk(self, libc.stdint.uint64_t seed): + * self._seed = (seed ^ self._a) & self._mask # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.int32_t next_int(self): +*/ + __pyx_v_self->_seed = ((__pyx_v_seed ^ __pyx_v_self->_a) & __pyx_v_self->_mask); + + /* "apache_beam/testing/fast_test_utils.pyx":36 + * self._seed = (seed * self._a + self._c) & self._mask + * + * cpdef void seed_jdk(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed ^ self._a) & self._mask + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed_jdk", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk = {"seed_jdk", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + uint64_t __pyx_v_seed; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("seed_jdk (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_seed,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 36, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 36, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "seed_jdk", 0) < (0)) __PYX_ERR(0, 36, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("seed_jdk", 1, 1, 1, i); __PYX_ERR(0, 36, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 36, __pyx_L3_error) + } + __pyx_v_seed = __Pyx_PyLong_As_uint64_t(values[0]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("seed_jdk", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 36, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed_jdk", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_4seed_jdk(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self), __pyx_v_seed); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_4seed_jdk(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, uint64_t __pyx_v_seed) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("seed_jdk", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed_jdk(__pyx_v_self, __pyx_v_seed, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.seed_jdk", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":39 + * self._seed = (seed ^ self._a) & self._mask + * + * cpdef libc.stdint.int32_t next_int(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int32_t __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_int(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch) { + int32_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("next_int", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_next_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int32_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":40 + * + * cpdef libc.stdint.int32_t next_int(self): + * self.seed(self._seed) # <<<<<<<<<<<<<< + * return (self._seed >> (self._bits - 32)) + * +*/ + ((struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self->__pyx_vtab)->seed(__pyx_v_self, __pyx_v_self->_seed, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L1_error) + + /* "apache_beam/testing/fast_test_utils.pyx":41 + * cpdef libc.stdint.int32_t next_int(self): + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) # <<<<<<<<<<<<<< + * + * cpdef libc.stdint.uint32_t next_uint(self): +*/ + __pyx_r = ((int32_t)(__pyx_v_self->_seed >> (__pyx_v_self->_bits - 32))); + goto __pyx_L0; + + /* "apache_beam/testing/fast_test_utils.pyx":39 + * self._seed = (seed ^ self._a) & self._mask + * + * cpdef libc.stdint.int32_t next_int(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.next_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int = {"next_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("next_int (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("next_int", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("next_int", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_6next_int(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_6next_int(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int32_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("next_int", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_int(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.next_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":43 + * return (self._seed >> (self._bits - 32)) + * + * cpdef libc.stdint.uint32_t next_uint(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static uint32_t __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_uint(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch) { + uint32_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + uint32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("next_uint", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_next_uint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":44 + * + * cpdef libc.stdint.uint32_t next_uint(self): + * self.seed(self._seed) # <<<<<<<<<<<<<< + * return (self._seed >> (self._bits - 32)) + * +*/ + ((struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self->__pyx_vtab)->seed(__pyx_v_self, __pyx_v_self->_seed, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 44, __pyx_L1_error) + + /* "apache_beam/testing/fast_test_utils.pyx":45 + * cpdef libc.stdint.uint32_t next_uint(self): + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) # <<<<<<<<<<<<<< + * + * cpdef bytes randbytes(self, int length): +*/ + __pyx_r = ((uint32_t)(__pyx_v_self->_seed >> (__pyx_v_self->_bits - 32))); + goto __pyx_L0; + + /* "apache_beam/testing/fast_test_utils.pyx":43 + * return (self._seed >> (self._bits - 32)) + * + * cpdef libc.stdint.uint32_t next_uint(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.next_uint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint = {"next_uint", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("next_uint (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("next_uint", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("next_uint", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_8next_uint(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_8next_uint(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + uint32_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("next_uint", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_uint(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_uint32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.next_uint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":47 + * return (self._seed >> (self._bits - 32)) + * + * cpdef bytes randbytes(self, int length): # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t ints = (length + 3) // 4 + * cdef char* data = libc.stdlib.malloc(ints * 4) +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_randbytes(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_v_length, int __pyx_skip_dispatch) { + int32_t __pyx_v_ints; + char *__pyx_v_data; + uint32_t __pyx_v_value; + int32_t __pyx_v_i; + PyObject *__pyx_v_retval = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int32_t __pyx_t_7; + int32_t __pyx_t_8; + int32_t __pyx_t_9; + uint32_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("randbytes", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_randbytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":48 + * + * cpdef bytes randbytes(self, int length): + * cdef libc.stdint.int32_t ints = (length + 3) // 4 # <<<<<<<<<<<<<< + * cdef char* data = libc.stdlib.malloc(ints * 4) + * cdef libc.stdint.uint32_t value +*/ + __pyx_v_ints = __Pyx_div_long((__pyx_v_length + 3), 4, 1); + + /* "apache_beam/testing/fast_test_utils.pyx":49 + * cpdef bytes randbytes(self, int length): + * cdef libc.stdint.int32_t ints = (length + 3) // 4 + * cdef char* data = libc.stdlib.malloc(ints * 4) # <<<<<<<<<<<<<< + * cdef libc.stdint.uint32_t value + * cdef libc.stdint.int32_t i +*/ + __pyx_v_data = ((char *)malloc((__pyx_v_ints * 4))); + + /* "apache_beam/testing/fast_test_utils.pyx":52 + * cdef libc.stdint.uint32_t value + * cdef libc.stdint.int32_t i + * for i in range(0, ints, 1): # <<<<<<<<<<<<<< + * value = self.next_uint() + * libc.string.memcpy((data + i * 4), (& value), 4) +*/ + __pyx_t_7 = __pyx_v_ints; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "apache_beam/testing/fast_test_utils.pyx":53 + * cdef libc.stdint.int32_t i + * for i in range(0, ints, 1): + * value = self.next_uint() # <<<<<<<<<<<<<< + * libc.string.memcpy((data + i * 4), (& value), 4) + * retval = PyBytes_FromStringAndSize(data, length) +*/ + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self->__pyx_vtab)->next_uint(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_v_value = __pyx_t_10; + + /* "apache_beam/testing/fast_test_utils.pyx":54 + * for i in range(0, ints, 1): + * value = self.next_uint() + * libc.string.memcpy((data + i * 4), (& value), 4) # <<<<<<<<<<<<<< + * retval = PyBytes_FromStringAndSize(data, length) + * libc.stdlib.free(data) +*/ + (void)(memcpy(((void *)(__pyx_v_data + (__pyx_v_i * 4))), ((void *)(&__pyx_v_value)), 4)); + } + + /* "apache_beam/testing/fast_test_utils.pyx":55 + * value = self.next_uint() + * libc.string.memcpy((data + i * 4), (& value), 4) + * retval = PyBytes_FromStringAndSize(data, length) # <<<<<<<<<<<<<< + * libc.stdlib.free(data) + * return retval +*/ + __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_data, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_retval = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":56 + * libc.string.memcpy((data + i * 4), (& value), 4) + * retval = PyBytes_FromStringAndSize(data, length) + * libc.stdlib.free(data) # <<<<<<<<<<<<<< + * return retval + * +*/ + free(__pyx_v_data); + + /* "apache_beam/testing/fast_test_utils.pyx":57 + * retval = PyBytes_FromStringAndSize(data, length) + * libc.stdlib.free(data) + * return retval # <<<<<<<<<<<<<< + * + * cpdef double random_sample(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_retval); + __pyx_r = __pyx_v_retval; + goto __pyx_L0; + + /* "apache_beam/testing/fast_test_utils.pyx":47 + * return (self._seed >> (self._bits - 32)) + * + * cpdef bytes randbytes(self, int length): # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t ints = (length + 3) // 4 + * cdef char* data = libc.stdlib.malloc(ints * 4) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.randbytes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_retval); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes = {"randbytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_length; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("randbytes (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_length,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 47, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 47, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "randbytes", 0) < (0)) __PYX_ERR(0, 47, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("randbytes", 1, 1, 1, i); __PYX_ERR(0, 47, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 47, __pyx_L3_error) + } + __pyx_v_length = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("randbytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 47, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.randbytes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_10randbytes(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self), __pyx_v_length); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_10randbytes(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_v_length) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("randbytes", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_randbytes(__pyx_v_self, __pyx_v_length, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.randbytes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/testing/fast_test_utils.pyx":59 + * return retval + * + * cpdef double random_sample(self): # <<<<<<<<<<<<<< + * return (self.next_uint() >> 8) / (1 << 24) +*/ + +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static double __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_random_sample(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, int __pyx_skip_dispatch) { + double __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + double __pyx_t_6; + uint32_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("random_sample", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_random_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/testing/fast_test_utils.pyx":60 + * + * cpdef double random_sample(self): + * return (self.next_uint() >> 8) / (1 << 24) # <<<<<<<<<<<<<< +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self->__pyx_vtab)->next_uint(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_r = (((double)(__pyx_t_7 >> 8)) / ((double)0x1000000)); + goto __pyx_L0; + + /* "apache_beam/testing/fast_test_utils.pyx":59 + * return retval + * + * cpdef double random_sample(self): # <<<<<<<<<<<<<< + * return (self.next_uint() >> 8) / (1 << 24) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample = {"random_sample", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("random_sample (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("random_sample", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("random_sample", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_12random_sample(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_12random_sample(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("random_sample", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_random_sample(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_14__reduce_cython__(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_16__setstate_cython__(((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_7testing_15fast_test_utils_11LCGenerator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.testing.fast_test_utils.LCGenerator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_7testing_15fast_test_utils_LCGenerator __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator; + +static PyObject *__pyx_tp_new_11apache_beam_7testing_15fast_test_utils_LCGenerator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_7testing_15fast_test_utils_LCGenerator; + if (unlikely(__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_11apache_beam_7testing_15fast_test_utils_LCGenerator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_7testing_15fast_test_utils_LCGenerator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_7testing_15fast_test_utils_LCGenerator[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_7testing_15fast_test_utils_LCGenerator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_7testing_15fast_test_utils_LCGenerator}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_7testing_15fast_test_utils_LCGenerator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator_spec = { + "apache_beam.testing.fast_test_utils.LCGenerator", + sizeof(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.testing.fast_test_utils.""LCGenerator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_7testing_15fast_test_utils_LCGenerator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_7testing_15fast_test_utils_LCGenerator, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_7testing_15fast_test_utils_LCGenerator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_7testing_15fast_test_utils_LCGenerator = &__pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.seed = (void (*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, uint64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.seed_jdk = (void (*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, uint64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_seed_jdk; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.next_int = (int32_t (*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_int; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.next_uint = (uint32_t (*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_next_uint; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.randbytes = (PyObject *(*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_randbytes; + __pyx_vtable_11apache_beam_7testing_15fast_test_utils_LCGenerator.random_sample = (double (*)(struct __pyx_obj_11apache_beam_7testing_15fast_test_utils_LCGenerator *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_7testing_15fast_test_utils_11LCGenerator_random_sample; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator)) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator = &__pyx_type_11apache_beam_7testing_15fast_test_utils_LCGenerator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_vtabptr_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LCGenerator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_fast_test_utils(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_fast_test_utils}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "fast_test_utils", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_fast_test_utils(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_fast_test_utils(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_fast_test_utils(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'fast_test_utils' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "fast_test_utils" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_fast_test_utils", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__testing__fast_test_utils) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.testing.fast_test_utils")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.testing.fast_test_utils", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/testing/fast_test_utils.pyx":33 + * self.seed(0) + * + * cpdef void seed(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed * self._a + self._c) & self._mask + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_3seed, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_seed, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_seed, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":36 + * self._seed = (seed * self._a + self._c) & self._mask + * + * cpdef void seed_jdk(self, libc.stdint.uint64_t seed): # <<<<<<<<<<<<<< + * self._seed = (seed ^ self._a) & self._mask + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_5seed_jdk, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_seed_jdk, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_seed_jdk, __pyx_t_2) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":39 + * self._seed = (seed ^ self._a) & self._mask + * + * cpdef libc.stdint.int32_t next_int(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_7next_int, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_next_int, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_next_int, __pyx_t_2) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":43 + * return (self._seed >> (self._bits - 32)) + * + * cpdef libc.stdint.uint32_t next_uint(self): # <<<<<<<<<<<<<< + * self.seed(self._seed) + * return (self._seed >> (self._bits - 32)) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_9next_uint, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_next_uint, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_next_uint, __pyx_t_2) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":47 + * return (self._seed >> (self._bits - 32)) + * + * cpdef bytes randbytes(self, int length): # <<<<<<<<<<<<<< + * cdef libc.stdint.int32_t ints = (length + 3) // 4 + * cdef char* data = libc.stdlib.malloc(ints * 4) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_11randbytes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_randbytes, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_randbytes, __pyx_t_2) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":59 + * return retval + * + * cpdef double random_sample(self): # <<<<<<<<<<<<<< + * return (self.next_uint() >> 8) / (1 << 24) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_13random_sample, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator_random_sample, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_7testing_15fast_test_utils_LCGenerator, __pyx_mstate_global->__pyx_n_u_random_sample, __pyx_t_2) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_7testing_15fast_test_utils_11LCGenerator_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LCGenerator___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_testing_fast_test_ut, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/testing/fast_test_utils.pyx":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.testing.fast_test_utils", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.testing.fast_test_utils"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 7; } index[] = {{1},{39},{7},{6},{2},{9},{50},{14},{11},{29},{31},{20},{21},{21},{25},{16},{20},{20},{35},{18},{18},{8},{12},{13},{5},{6},{8},{10},{8},{8},{9},{3},{11},{14},{12},{9},{13},{10},{17},{13},{4},{8},{4},{12},{10},{12},{19},{8},{6},{23},{9},{33},{33},{106},{27},{21}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (563 bytes) */ +const char* const cstring = "(\265/\375`\251\002M\021\000\366\335f80\221s\300\300@\007\224\030G\240.\024\250\200\200^t \332\373;\205\315\212lcbm'\221\345M\220\364\310\324U\335\016\013\235.\242\037\354\037\251c\352\346\255\350uC\001P\000N\000Y\000\0379\257N2R\002\342\222\353\354\345\376~t?\255Tv_Z\244)\312=F\265\365\262\177y7\257n\227\335t\256\373z\255\213\231\317\313\326y\251,Uw\r\213\227N\325\352\024\272\032\375\256\373o\3142J\225\376\365\317\330\242c\355&\031O1$\227v\227\272\273e\355\262\356\027\0311\227\221\373\256\264\275RM^\257\226\2632d\251\254\253\033C\241\314Q^\345&\375\222\216T\253\223\356\227\351\322\323\375\272v\332\342\355\315^\377\0256k\344\272\257\264_\345\365\343\337\367\333]\255\351W2\304\331\240p#$\0017\340(\263`\017\376\034\310x\223EbqX\005$\357\202\325\331\26440\232\260%od\201\234\202#p\347\033y\036\254\203M\353\003s\275\323b\252\273?\323\374v\253\\\213\035\n\213\237\352\356\223=u\373\026\253k\335\264\335\225\306\255\333\364\245\352\332\335\374i\007\232<\302 \274\362\001g\207;0\003V\371<\037\347Mx\035\r\222'\362<\n-RN\341\210)\020d\020b*\302\200\260\000\224\0032\206\0350\304\247\371 \026,\022\006Z\242/\3638\274\217\267b\300\001\030\230A\201( \007De\202\\\361 \363\260i\211\300\006Pf\221\211\030\212\204,\240\007T\311%,\201\0039(0\002\302\030\263\335\021\265\000\"\304\304D\342\024\253\001\256\303\356\254\216XD\2465\361\302>\345\272\016I\014\343\025\270\276+\262\200\313\361c\222\232Q\331\356\357\371\227\310\021\240a\260\200\267D:\261\300\010&\252\001\324&P\277\016\027\035\214\374\200\357\004K\362\020,\272\327G=\310\303\304U*\365\225p\201<\320\023\241\037\nH\340\305\222\247\355\316\350\023n~\356\017?\335\223\342\"\225\001\023~6\343m\017\245ws\236\021\204\356\341\001"; + PyObject *data = __Pyx_DecompressString(cstring, 563, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (650 bytes) */ +const char* const cstring = "BZh91AY&SY\360\377\035l\000\000>\177\376\377\373\277@\177[\274%\274\205~\210\277\377\377`@@@@@@@@@\000@@@\000@\002\034\334\325\2518EOH\r4\321\220\032\000\00042\r4\000\000\000\030!\351\002T)\3424\023S\306\251\2201\001\240\000\0004\000\000\006\200\000\323DQ\352\217$h<\240\310i\240\006\200\014\2004d\000\00012\tB&)\251\264\322\237\244jy\rOQ\350@d\304`\203A\201\031\000\036\236\220\311\017h\025\365\327\215\316\\\240\235\222\310\215\231\363Z\007\322\320'\3148\025h\221\226W\3429\313\030\350\315\372\257\375q~\323\345\301u\00633\255g\2511k\016\265\367\335\307\220\247\370\307Z\205nXP\347J\272i\264\307\327\034;\235\001\374\330\330s !\232B\374\236\255\336F\":\263\212\221\321\313x\271\212\301\316\200\t2\362\240\021\264\242\333\200\037l\364$\235\347\277\365\327\010y\257\177i\242qQ\t\025\002\226\013 *Q(\002\202\014'\020\031\225\246\234h\305\250[\273zp\202_\026\002\237\302\216\262\203\320\034i^\225\263\264*\037\235*\020\231 \374N\262\374\373l\027\354\244\004\263\345\272\036\360B\077\077-!\203GX\220b\031\004\261\242\034\342LT\002\306\223L\210.\003\253\2744\237ac\377@\232d\t\225D\242\tyM\014p\010\330\373\337b\032\260\035\276\242\304\264\t\014Oe\026\242\226\240^\300\272\022\225)\352\216V\260c\022\354hk\251({\240n\031\021\223\001;%JE\351\005\025\207\323\010\371\244\021\"\200\272\020^\363\221\353N\026\n\230\253\014\027`)j\002r\207\224\314D6bjl\333\205\000\32651P\200z\320\341\244\006\001Z\007\220\025*D=v\332\240\212k0\223\211%\032\221E\325\252J\346=i\027J\3100\302\230\025\007I\010i\024\320U\206\334\301t')\323\316@k\017\374\320\031\273\342U\001\244yt^)\211\256+S:\242\241]\030\213\300\357\022l\344?\2752\267\306r)\313\354>m\t\r\2438\034\000\212\342\302\276\330P<%t!\315\\\240\031n\2141O\"U\351+\254\277\311P(\017\342\3542\220\214\302\230\331\001\226\230\221\223I\225O\215\313\362\020\271\3014\330\210\202\313T\000>\331\000\010\010D\010\357\342\356H\247\n\022\036\037\343\255\200"; + PyObject *data = __Pyx_DecompressString(cstring, 650, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (548 bytes) */ +const char* const cstring = "x\332mR=o\0231\030&%)%UA@\250:&\201\242\212\212T\024\026$\004J\211\324\005!RZu`x\345\330o.\206;;9\373\242d\353\230\361\306\033=\336x\343\215\374\204\214\371\031\374\004|\344\243I\032K\347{\375>\357\227\237\307\237I\227\320\016B\013\211w\242Qi.\234\2236Q\032\262\003\004\232\273\252\326\035\016\030W\244\345\"\212lw(WS\213\tYf\330&\201\253\313\000>\262\200\"@\231\005X\326\262,\244x\243}\336\347\304\265(\345\202k\200\217\312\272\204\243d\340S\374\364\365\3139\n\364\211\226\376\222Y[\324\242C\335\221\002`\025T\250\225&z3,p\240\201\013}\307\027\2549}\"Xkh\357\271\356\224\036(\342u]\\\006\024\"[?\303/\366\033\340\373p`\277\006\247\032\276\331>\027\226\217[Rk3Rkk\244\0225\024\224\313\032\225\276\264\016\201\212\272v\267\203\203\366\t\305\026\241\266t;\020\024\354r\346\027\006\340\n\0269\\\243\247\\\024\216\356\000x\304\346\332\345I\026\270Y$\010\342\331\377\234\217\005\007]\331\005\260\232\302\254df\366u&g\226\324\013\210;M\\\360\263\302\311\255\314wDZ8p\220i\204l\316\221B\267\375_\265\331H\326\232\275\232%-a\203\2560e\014\372\304\rP\335T&\371\335\321\207\260\021\025\315\013\363#\276\037\237\306?\323\334Mn\222/\216\216\303f\206\357\214\n\243\346\210\205Y\350x\267bJ\346:n$\371\344<=M7\004T\315K\343\304\227I)\271N\317R\222\005\034\332\214\263\230&\317\222\372$\277?\336?\212\037\304\275\244\220\\$\275\277\333\367\n\017m\376UX\t\337\205\355\250>\331~dK\275\266\306\223\203(\027\035\230\347\246\025o\305U\333r'\335J\217\376\330z{\343\275W\206\230~\334\234<.\205\365\260\231]\342\355t\224bx\030\372Q)\2724O\315{\023\330\276,\251\254BW\246j\032q\356\037\265\355q\342"; + PyObject *data = __Pyx_DecompressString(cstring, 548, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (937 bytes) */ +const char* const bytes = "?apache_beam/testing/fast_test_utils.pyxdisableenablegcisenabledno default __reduce__ due to non-trivial __cinit__LCGeneratorLCGenerator.__reduce_cython__LCGenerator.__setstate_cython__LCGenerator.next_intLCGenerator.next_uintLCGenerator.randbytesLCGenerator.random_sampleLCGenerator.seedLCGenerator.seed_jdk__Pyx_PyDict_NextRefapache_beam.testing.fast_test_utilsasyncio.coroutinescline_in_traceback__func____getstate___is_coroutineitemslength__main____module____name__next_intnext_uintpop__pyx_state__pyx_vtable____qualname__randbytesrandom_sample__reduce____reduce_cython____reduce_ex__seedseed_jdkself__set_name__setdefault__setstate____setstate_cython____test__values\200!\330\004\013\2109\220D\230\n\240#\240S\250\003\2502\250[\270\001\200\001\330\004\n\210+\220Q\200!\330\004\010\210\005\210Q\210d\220!\330\004\013\320\013!\240\024\240W\250D\260\004\260G\2702\270Q\200!\330\004\010\210\005\210Q\210d\220!\330\004\013\320\013\"\240$\240g\250T\260\024\260W\270B\270a\200!\330\004%\240W\250B\250c\260\023\260A\330\004\026\320\026(\250\007\250q\260\005\260R\260q\360\006\000\005\t\210\005\210U\220!\2203\220f\230A\330\006\016\210d\220*\230A\330\021\030\230\001\230\030\240\025\240b\250\002\250\"\250D\260\010\270\002\270(\300!\330\004\r\320\r&\240a\240v\250Q\330\017\024\220A\220Q\330\004\013\2101\200!\330\004\010\210\n\220%\220r\230\024\230T\240\022\2404\240u\250B\250d\260!\200!\330\004\010\210\n\220%\220r\230\024\230U\240\"\240D\250\001"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 49; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 8) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 49; i < 56; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 56; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 49; + for (Py_ssize_t i=0; i<7; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 2; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 2; + unsigned int flags : 10; + unsigned int first_line : 6; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 33}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seed}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_seed, __pyx_mstate->__pyx_kp_b_iso88591_r_T_4uBd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 36}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seed}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_seed_jdk, __pyx_mstate->__pyx_kp_b_iso88591_r_U_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 39}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_next_int, __pyx_mstate->__pyx_kp_b_iso88591_Qd_WD_G2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_next_uint, __pyx_mstate->__pyx_kp_b_iso88591_Qd_gT_WBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 47}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_length}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_randbytes, __pyx_mstate->__pyx_kp_b_iso88591_WBc_A_q_Rq_U_3fA_d_A_b_D_avQ_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 59}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_testing_fast_test_ut_2, __pyx_mstate->__pyx_n_u_random_sample, __pyx_mstate->__pyx_kp_b_iso88591_9D_S_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* DivInt[long] */ +static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) { + long q = a / b; + long r = a - q*b; + long adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* PyErrFetchRestore (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyObjectGetAttrStrNoError (used by SetupReduce) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE uint64_t __Pyx_PyLong_As_uint64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + uint64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (uint64_t) -1; + val = __Pyx_PyLong_As_uint64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT)) { + return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT)) { + return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT)) { + return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(uint64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(uint64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(uint64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(uint64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(uint64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(uint64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + uint64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (uint64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (uint64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (uint64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (uint64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(uint64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((uint64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(uint64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((uint64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((uint64_t) 1) << (sizeof(uint64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (uint64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to uint64_t"); + return (uint64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to uint64_t"); + return (uint64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(uint64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(uint64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(uint64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int32_t) -1; + val = __Pyx_PyLong_As_int32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) { + return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) { + return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) { + return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int32_t"); + return (int32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int32_t"); + return (int32_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int32_t(int32_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int32_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int32_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int32_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + uint32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (uint32_t) -1; + val = __Pyx_PyLong_As_uint32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) { + return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) { + return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) { + return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(uint32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(uint32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x)) + } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + uint32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (uint32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (uint32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (uint32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (uint32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((uint32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((uint32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (uint32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to uint32_t"); + return (uint32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to uint32_t"); + return (uint32_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint32_t(uint32_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(uint32_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(uint32_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(uint32_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint32_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/testing/fast_test_utils.cp314-win_amd64.pyd b/sdks/python/apache_beam/testing/fast_test_utils.cp314-win_amd64.pyd new file mode 100644 index 000000000000..b91a949dedcb Binary files /dev/null and b/sdks/python/apache_beam/testing/fast_test_utils.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/transforms/cy_combiners.c b/sdks/python/apache_beam/transforms/cy_combiners.c new file mode 100644 index 000000000000..b42e562affdc --- /dev/null +++ b/sdks/python/apache_beam/transforms/cy_combiners.c @@ -0,0 +1,37810 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.transforms.cy_combiners", + "sources": [ + "apache_beam/transforms/cy_combiners.py" + ] + }, + "module_name": "apache_beam.transforms.cy_combiners" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__transforms__cy_combiners +#define __PYX_HAVE_API__apache_beam__transforms__cy_combiners +/* Early includes */ +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/transforms/cy_combiners.py", + "apache_beam/transforms/cy_combiners.pxd", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue; + +/* "apache_beam/transforms/cy_combiners.pxd":24 + * + * + * cdef class CountAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t value + * cpdef add_input(self, unused_element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_vtab; + int64_t value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":31 + * + * + * cdef class SumInt64Accumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t value + * cpdef add_input(self, int64_t element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_vtab; + int64_t value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":37 + * cpdef merge(self, accumulators) + * + * cdef class MinInt64Accumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t value + * cpdef add_input(self, int64_t element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_vtab; + int64_t value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":44 + * + * + * cdef class MaxInt64Accumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t value + * cpdef add_input(self, int64_t element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_vtab; + int64_t value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":51 + * + * + * cdef class MeanInt64Accumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t sum + * cdef readonly int64_t count +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_vtab; + int64_t sum; + int64_t count; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":59 + * + * + * cdef class DistributionInt64Accumulator(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t sum + * cdef readonly int64_t count +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_vtab; + int64_t sum; + int64_t count; + int64_t min; + int64_t max; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":69 + * + * + * cdef class SumDoubleAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly double value + * cpdef add_input(self, double element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_vtab; + double value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":76 + * + * + * cdef class MinDoubleAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly double value + * cpdef add_input(self, double element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_vtab; + double value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":83 + * + * + * cdef class MaxDoubleAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly double value + * cpdef add_input(self, double element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_vtab; + double value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":90 + * + * + * cdef class MeanDoubleAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly double sum + * cdef readonly int64_t count +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_vtab; + double sum; + int64_t count; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":98 + * + * + * cdef class AllAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly bint value + * cpdef add_input(self, bint element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_vtab; + int value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":105 + * + * + * cdef class AnyAccumulator(object): # <<<<<<<<<<<<<< + * cdef readonly bint value + * cpdef add_input(self, bint element) +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_vtab; + int value; +}; + + +/* "apache_beam/transforms/cy_combiners.pxd":112 + * + * + * cdef class ComparableValue(object): # <<<<<<<<<<<<<< + * cdef readonly object value, _less_than_fn, _comparable_value + * cdef readonly bint requires_hydration +*/ +struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_vtab; + PyObject *value; + PyObject *_less_than_fn; + PyObject *_comparable_value; + int requires_hydration; +}; + + + +/* "apache_beam/transforms/cy_combiners.py":68 + * + * + * class CountAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_CountAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":86 + * + * + * class SumInt64Accumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *, int64_t, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + + +/* "apache_beam/transforms/cy_combiners.py":116 + * + * + * class MinInt64Accumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = INT64_MAX +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *, int64_t, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + + +/* "apache_beam/transforms/cy_combiners.py":139 + * + * + * class MaxInt64Accumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = INT64_MIN +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *, int64_t, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + + +/* "apache_beam/transforms/cy_combiners.py":162 + * + * + * class MeanInt64Accumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.sum = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *, int64_t, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + + +/* "apache_beam/transforms/cy_combiners.py":194 + * + * + * class DistributionInt64Accumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.sum = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *, int64_t, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + + +/* "apache_beam/transforms/cy_combiners.py":264 + * + * + * class SumDoubleAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *, double, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":280 + * + * + * class MinDoubleAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = _POS_INF +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *, double, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":298 + * + * + * class MaxDoubleAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = _NEG_INF +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *, double, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":316 + * + * + * class MeanDoubleAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.sum = 0 +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *, double, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":351 + * + * + * class AllAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = True +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AllAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *, int, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":366 + * + * + * class AnyAccumulator(object): # <<<<<<<<<<<<<< + * def __init__(self): + * self.value = False +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AnyAccumulator { + PyObject *(*add_input)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *, int, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + + +/* "apache_beam/transforms/cy_combiners.py":402 + * + * + * class ComparableValue(object): # <<<<<<<<<<<<<< + * """A way to allow comparing elements in a rich fashion.""" + * +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_ComparableValue { + PyObject *(*hydrate)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *, PyObject *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_ComparableValue; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyOverflowError_Check.proto */ +#define __Pyx_PyExc_OverflowError_Check(obj) __Pyx_TypeCheck(obj, PyExc_OverflowError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* DivInt[int64_t].proto */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t, int64_t, int b_is_constant); + +/* UnaryNegOverflows.proto */ +#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyImportError_Check.proto */ +#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError) + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* PyNumberPow2.proto */ +#define __Pyx_PyNumber_InPlacePowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 1) +#define __Pyx_PyNumber_PowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 0) +static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace); + +/* GetAttr.proto (used by Globals) */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* Globals.proto */ +static PyObject* __Pyx_Globals(void); + +/* pybytes_as_double.proto (used by pyunicode_as_double) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj); +static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); +static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(obj); + size = PyBytes_GET_SIZE(obj); +#else + if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { + return (double)-1; + } +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} +static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyByteArray_AS_STRING(obj); + size = PyByteArray_GET_SIZE(obj); +#else + as_c_string = PyByteArray_AsString(obj); + if (as_c_string == NULL) { + return (double)-1; + } + size = PyByteArray_Size(obj); +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} + +/* pyunicode_as_double.proto */ +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS +static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { + int last_was_punctuation; + Py_ssize_t i; + last_was_punctuation = 1; + for (i=start; i <= end; i++) { + Py_UCS4 chr = PyUnicode_READ(kind, data, i); + int is_punctuation = (chr == '_') | (chr == '.'); + *buffer = (char)chr; + buffer += (chr != '_'); + if (unlikely(chr > 127)) goto parse_failure; + if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; + last_was_punctuation = is_punctuation; + } + if (unlikely(last_was_punctuation)) goto parse_failure; + *buffer = '\0'; + return buffer; +parse_failure: + return NULL; +} +static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { + int matches = 1; + Py_UCS4 chr; + Py_UCS4 sign = PyUnicode_READ(kind, data, start); + int is_signed = (sign == '-') | (sign == '+'); + start += is_signed; + length -= is_signed; + switch (PyUnicode_READ(kind, data, start)) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'a') | (chr == 'A'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'n') | (chr == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'f') | (chr == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+3); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+4); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+5); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+6); + matches &= (chr == 't') | (chr == 'T'); + chr = PyUnicode_READ(kind, data, start+7); + matches &= (chr == 'y') | (chr == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { + double value; + const char *last; + char *end; + Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); + const int kind = PyUnicode_KIND(obj); + const void* data = PyUnicode_DATA(obj); + start = 0; + while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) + start++; + while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) + length--; + length -= start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + if (length < 40) { + char number[40]; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} +#endif +static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS + if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) + return (double)-1; + if (likely(PyUnicode_IS_ASCII(obj))) { + const char *s; + Py_ssize_t length; + s = PyUnicode_AsUTF8AndSize(obj, &length); + return __Pyx__PyBytes_AsDouble(obj, s, length); + } + return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); +#else + return __Pyx_SlowPyString_AsDouble(obj); +#endif +} + +/* FloatExceptionCheck.proto */ +#define __PYX_CHECK_FLOAT_EXCEPTION(value, error_value)\ + ((error_value) == (error_value) ?\ + (value) == (error_value) :\ + (value) != (value)) + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, int __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, int __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_15ComparableValue_hydrate(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "apache_beam.transforms.cy_combiners" */ +static double __pyx_v_11apache_beam_10transforms_12cy_combiners__NEG_INF; +static double __pyx_v_11apache_beam_10transforms_12cy_combiners__POS_INF; +static double __pyx_v_11apache_beam_10transforms_12cy_combiners__NAN; +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_DistributionInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AllAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AnyAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.transforms.cy_combiners" +extern int __pyx_module_is_main_apache_beam__transforms__cy_combiners; +int __pyx_module_is_main_apache_beam__transforms__cy_combiners = 0; + +/* Implementation of "apache_beam.transforms.cy_combiners" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_staticmethod; +/* #### Code section: string_decls ### */ +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_count_sum[] = "count, sum"; +static const char __pyx_k_count_max_min_sum[] = "count, max, min, sum"; +static const char __pyx_k_A_library_of_basic_cythonized_Co[] = "A library of basic cythonized CombineFn subclasses.\n\nFor internal use only; no backwards-compatibility guarantees.\n"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_2add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_4merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_6extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_8__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_10__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_unused_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_element, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_unused_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_unused_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, double __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, double __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, double __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, double __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, int __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, int __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn, PyObject *__pyx_v__requires_hydration); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_2hydrate(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_4__lt__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_6__repr__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_8__reduce__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_2__pyx_unpickle_SumInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_4__pyx_unpickle_MinInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_6__pyx_unpickle_MaxInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_8__pyx_unpickle_MeanInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_10__pyx_unpickle_DistributionInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_12__pyx_unpickle_SumDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14__pyx_unpickle_MinDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16__pyx_unpickle_MaxDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_18__pyx_unpickle_MeanDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20__pyx_unpickle_AllAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_22__pyx_unpickle_AnyAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_CountAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AllAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AnyAccumulator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + PyObject *__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[86]; + PyObject *__pyx_string_tab[255]; + PyObject *__pyx_number_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_A_subclass_of_cy_combiners_Accum __pyx_string_tab[1] +#define __pyx_kp_u_ComparableValue_s __pyx_string_tab[2] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[3] +#define __pyx_kp_u__2 __pyx_string_tab[4] +#define __pyx_kp_u_add_note __pyx_string_tab[5] +#define __pyx_kp_u_apache_beam_transforms_cy_combin_2 __pyx_string_tab[6] +#define __pyx_kp_u_disable __pyx_string_tab[7] +#define __pyx_kp_u_enable __pyx_string_tab[8] +#define __pyx_kp_u_gc __pyx_string_tab[9] +#define __pyx_kp_u_inf_2 __pyx_string_tab[10] +#define __pyx_kp_u_isenabled __pyx_string_tab[11] +#define __pyx_kp_u_stringsource __pyx_string_tab[12] +#define __pyx_n_u_63 __pyx_string_tab[13] +#define __pyx_n_u_AccumulatorCombineFn __pyx_string_tab[14] +#define __pyx_n_u_AccumulatorCombineFn___eq __pyx_string_tab[15] +#define __pyx_n_u_AccumulatorCombineFn___hash __pyx_string_tab[16] +#define __pyx_n_u_AccumulatorCombineFn_add_input __pyx_string_tab[17] +#define __pyx_n_u_AccumulatorCombineFn_create_accu __pyx_string_tab[18] +#define __pyx_n_u_AccumulatorCombineFn_extract_out __pyx_string_tab[19] +#define __pyx_n_u_AccumulatorCombineFn_merge_accum __pyx_string_tab[20] +#define __pyx_n_u_AllAccumulator __pyx_string_tab[21] +#define __pyx_n_u_AllAccumulator___reduce_cython __pyx_string_tab[22] +#define __pyx_n_u_AllAccumulator___setstate_cython __pyx_string_tab[23] +#define __pyx_n_u_AllAccumulator_add_input __pyx_string_tab[24] +#define __pyx_n_u_AllAccumulator_extract_output __pyx_string_tab[25] +#define __pyx_n_u_AllAccumulator_merge __pyx_string_tab[26] +#define __pyx_n_u_AllCombineFn __pyx_string_tab[27] +#define __pyx_n_u_AnyAccumulator __pyx_string_tab[28] +#define __pyx_n_u_AnyAccumulator___reduce_cython __pyx_string_tab[29] +#define __pyx_n_u_AnyAccumulator___setstate_cython __pyx_string_tab[30] +#define __pyx_n_u_AnyAccumulator_add_input __pyx_string_tab[31] +#define __pyx_n_u_AnyAccumulator_extract_output __pyx_string_tab[32] +#define __pyx_n_u_AnyAccumulator_merge __pyx_string_tab[33] +#define __pyx_n_u_AnyCombineFn __pyx_string_tab[34] +#define __pyx_n_u_CombineFn __pyx_string_tab[35] +#define __pyx_n_u_ComparableValue __pyx_string_tab[36] +#define __pyx_n_u_ComparableValue___reduce __pyx_string_tab[37] +#define __pyx_n_u_ComparableValue_hydrate __pyx_string_tab[38] +#define __pyx_n_u_CountAccumulator __pyx_string_tab[39] +#define __pyx_n_u_CountAccumulator___reduce_cython __pyx_string_tab[40] +#define __pyx_n_u_CountAccumulator___setstate_cyth __pyx_string_tab[41] +#define __pyx_n_u_CountAccumulator_add_input __pyx_string_tab[42] +#define __pyx_n_u_CountAccumulator_add_input_n __pyx_string_tab[43] +#define __pyx_n_u_CountAccumulator_extract_output __pyx_string_tab[44] +#define __pyx_n_u_CountAccumulator_merge __pyx_string_tab[45] +#define __pyx_n_u_CountCombineFn __pyx_string_tab[46] +#define __pyx_n_u_DataflowDistributionCounter __pyx_string_tab[47] +#define __pyx_n_u_DataflowDistributionCounterFn __pyx_string_tab[48] +#define __pyx_n_u_DistributionInt64Accumulator __pyx_string_tab[49] +#define __pyx_n_u_DistributionInt64Accumulator___r __pyx_string_tab[50] +#define __pyx_n_u_DistributionInt64Accumulator___s __pyx_string_tab[51] +#define __pyx_n_u_DistributionInt64Accumulator_add __pyx_string_tab[52] +#define __pyx_n_u_DistributionInt64Accumulator_add_2 __pyx_string_tab[53] +#define __pyx_n_u_DistributionInt64Accumulator_ext __pyx_string_tab[54] +#define __pyx_n_u_DistributionInt64Accumulator_mer __pyx_string_tab[55] +#define __pyx_n_u_DistributionInt64Fn __pyx_string_tab[56] +#define __pyx_n_u_INT64_MAX __pyx_string_tab[57] +#define __pyx_n_u_INT64_MIN __pyx_string_tab[58] +#define __pyx_n_u_MaxDoubleAccumulator __pyx_string_tab[59] +#define __pyx_n_u_MaxDoubleAccumulator___reduce_cy __pyx_string_tab[60] +#define __pyx_n_u_MaxDoubleAccumulator___setstate __pyx_string_tab[61] +#define __pyx_n_u_MaxDoubleAccumulator_add_input __pyx_string_tab[62] +#define __pyx_n_u_MaxDoubleAccumulator_extract_out __pyx_string_tab[63] +#define __pyx_n_u_MaxDoubleAccumulator_merge __pyx_string_tab[64] +#define __pyx_n_u_MaxFloatFn __pyx_string_tab[65] +#define __pyx_n_u_MaxInt64Accumulator __pyx_string_tab[66] +#define __pyx_n_u_MaxInt64Accumulator___reduce_cyt __pyx_string_tab[67] +#define __pyx_n_u_MaxInt64Accumulator___setstate_c __pyx_string_tab[68] +#define __pyx_n_u_MaxInt64Accumulator_add_input __pyx_string_tab[69] +#define __pyx_n_u_MaxInt64Accumulator_add_input_n __pyx_string_tab[70] +#define __pyx_n_u_MaxInt64Accumulator_extract_outp __pyx_string_tab[71] +#define __pyx_n_u_MaxInt64Accumulator_merge __pyx_string_tab[72] +#define __pyx_n_u_MaxInt64Fn __pyx_string_tab[73] +#define __pyx_n_u_MeanDoubleAccumulator __pyx_string_tab[74] +#define __pyx_n_u_MeanDoubleAccumulator___reduce_c __pyx_string_tab[75] +#define __pyx_n_u_MeanDoubleAccumulator___setstate __pyx_string_tab[76] +#define __pyx_n_u_MeanDoubleAccumulator_add_input __pyx_string_tab[77] +#define __pyx_n_u_MeanDoubleAccumulator_extract_ou __pyx_string_tab[78] +#define __pyx_n_u_MeanDoubleAccumulator_merge __pyx_string_tab[79] +#define __pyx_n_u_MeanFloatFn __pyx_string_tab[80] +#define __pyx_n_u_MeanInt64Accumulator __pyx_string_tab[81] +#define __pyx_n_u_MeanInt64Accumulator___reduce_cy __pyx_string_tab[82] +#define __pyx_n_u_MeanInt64Accumulator___setstate __pyx_string_tab[83] +#define __pyx_n_u_MeanInt64Accumulator_add_input __pyx_string_tab[84] +#define __pyx_n_u_MeanInt64Accumulator_add_input_n __pyx_string_tab[85] +#define __pyx_n_u_MeanInt64Accumulator_extract_out __pyx_string_tab[86] +#define __pyx_n_u_MeanInt64Accumulator_merge __pyx_string_tab[87] +#define __pyx_n_u_MeanInt64Fn __pyx_string_tab[88] +#define __pyx_n_u_MinDoubleAccumulator __pyx_string_tab[89] +#define __pyx_n_u_MinDoubleAccumulator___reduce_cy __pyx_string_tab[90] +#define __pyx_n_u_MinDoubleAccumulator___setstate __pyx_string_tab[91] +#define __pyx_n_u_MinDoubleAccumulator_add_input __pyx_string_tab[92] +#define __pyx_n_u_MinDoubleAccumulator_extract_out __pyx_string_tab[93] +#define __pyx_n_u_MinDoubleAccumulator_merge __pyx_string_tab[94] +#define __pyx_n_u_MinFloatFn __pyx_string_tab[95] +#define __pyx_n_u_MinInt64Accumulator __pyx_string_tab[96] +#define __pyx_n_u_MinInt64Accumulator___reduce_cyt __pyx_string_tab[97] +#define __pyx_n_u_MinInt64Accumulator___setstate_c __pyx_string_tab[98] +#define __pyx_n_u_MinInt64Accumulator_add_input __pyx_string_tab[99] +#define __pyx_n_u_MinInt64Accumulator_add_input_n __pyx_string_tab[100] +#define __pyx_n_u_MinInt64Accumulator_extract_outp __pyx_string_tab[101] +#define __pyx_n_u_MinInt64Accumulator_merge __pyx_string_tab[102] +#define __pyx_n_u_MinInt64Fn __pyx_string_tab[103] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[104] +#define __pyx_n_u_SumDoubleAccumulator __pyx_string_tab[105] +#define __pyx_n_u_SumDoubleAccumulator___reduce_cy __pyx_string_tab[106] +#define __pyx_n_u_SumDoubleAccumulator___setstate __pyx_string_tab[107] +#define __pyx_n_u_SumDoubleAccumulator_add_input __pyx_string_tab[108] +#define __pyx_n_u_SumDoubleAccumulator_extract_out __pyx_string_tab[109] +#define __pyx_n_u_SumDoubleAccumulator_merge __pyx_string_tab[110] +#define __pyx_n_u_SumFloatFn __pyx_string_tab[111] +#define __pyx_n_u_SumInt64Accumulator __pyx_string_tab[112] +#define __pyx_n_u_SumInt64Accumulator___reduce_cyt __pyx_string_tab[113] +#define __pyx_n_u_SumInt64Accumulator___setstate_c __pyx_string_tab[114] +#define __pyx_n_u_SumInt64Accumulator_add_input __pyx_string_tab[115] +#define __pyx_n_u_SumInt64Accumulator_add_input_n __pyx_string_tab[116] +#define __pyx_n_u_SumInt64Accumulator_extract_outp __pyx_string_tab[117] +#define __pyx_n_u_SumInt64Accumulator_merge __pyx_string_tab[118] +#define __pyx_n_u_SumInt64Fn __pyx_string_tab[119] +#define __pyx_n_u_accumulator __pyx_string_tab[120] +#define __pyx_n_u_accumulator_type __pyx_string_tab[121] +#define __pyx_n_u_accumulators __pyx_string_tab[122] +#define __pyx_n_u_add_input __pyx_string_tab[123] +#define __pyx_n_u_add_input_n __pyx_string_tab[124] +#define __pyx_n_u_apache_beam_transforms __pyx_string_tab[125] +#define __pyx_n_u_apache_beam_transforms_cy_combin __pyx_string_tab[126] +#define __pyx_n_u_apache_beam_transforms_cy_datafl __pyx_string_tab[127] +#define __pyx_n_u_apache_beam_transforms_py_datafl __pyx_string_tab[128] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[129] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[130] +#define __pyx_n_u_comparable_value __pyx_string_tab[131] +#define __pyx_n_u_core __pyx_string_tab[132] +#define __pyx_n_u_create_accumulator __pyx_string_tab[133] +#define __pyx_n_u_dict __pyx_string_tab[134] +#define __pyx_n_u_dict_2 __pyx_string_tab[135] +#define __pyx_n_u_doc __pyx_string_tab[136] +#define __pyx_n_u_element __pyx_string_tab[137] +#define __pyx_n_u_eq __pyx_string_tab[138] +#define __pyx_n_u_extract_output __pyx_string_tab[139] +#define __pyx_n_u_func __pyx_string_tab[140] +#define __pyx_n_u_getstate __pyx_string_tab[141] +#define __pyx_n_u_hash __pyx_string_tab[142] +#define __pyx_n_u_hydrate __pyx_string_tab[143] +#define __pyx_n_u_inf __pyx_string_tab[144] +#define __pyx_n_u_is_coroutine __pyx_string_tab[145] +#define __pyx_n_u_items __pyx_string_tab[146] +#define __pyx_n_u_key_fn __pyx_string_tab[147] +#define __pyx_n_u_less_than_fn __pyx_string_tab[148] +#define __pyx_n_u_less_than_fn_2 __pyx_string_tab[149] +#define __pyx_n_u_lt __pyx_string_tab[150] +#define __pyx_n_u_main __pyx_string_tab[151] +#define __pyx_n_u_mean __pyx_string_tab[152] +#define __pyx_n_u_merge __pyx_string_tab[153] +#define __pyx_n_u_merge_accumulators __pyx_string_tab[154] +#define __pyx_n_u_metaclass __pyx_string_tab[155] +#define __pyx_n_u_module __pyx_string_tab[156] +#define __pyx_n_u_mro_entries __pyx_string_tab[157] +#define __pyx_n_u_n __pyx_string_tab[158] +#define __pyx_n_u_name __pyx_string_tab[159] +#define __pyx_n_u_nan __pyx_string_tab[160] +#define __pyx_n_u_new __pyx_string_tab[161] +#define __pyx_n_u_operator __pyx_string_tab[162] +#define __pyx_n_u_other __pyx_string_tab[163] +#define __pyx_n_u_pop __pyx_string_tab[164] +#define __pyx_n_u_prepare __pyx_string_tab[165] +#define __pyx_n_u_pyx_capi __pyx_string_tab[166] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[167] +#define __pyx_n_u_pyx_result __pyx_string_tab[168] +#define __pyx_n_u_pyx_state __pyx_string_tab[169] +#define __pyx_n_u_pyx_type __pyx_string_tab[170] +#define __pyx_n_u_pyx_unpickle_AllAccumulator __pyx_string_tab[171] +#define __pyx_n_u_pyx_unpickle_AnyAccumulator __pyx_string_tab[172] +#define __pyx_n_u_pyx_unpickle_CountAccumulator __pyx_string_tab[173] +#define __pyx_n_u_pyx_unpickle_DistributionInt64 __pyx_string_tab[174] +#define __pyx_n_u_pyx_unpickle_MaxDoubleAccumula __pyx_string_tab[175] +#define __pyx_n_u_pyx_unpickle_MaxInt64Accumulat __pyx_string_tab[176] +#define __pyx_n_u_pyx_unpickle_MeanDoubleAccumul __pyx_string_tab[177] +#define __pyx_n_u_pyx_unpickle_MeanInt64Accumula __pyx_string_tab[178] +#define __pyx_n_u_pyx_unpickle_MinDoubleAccumula __pyx_string_tab[179] +#define __pyx_n_u_pyx_unpickle_MinInt64Accumulat __pyx_string_tab[180] +#define __pyx_n_u_pyx_unpickle_SumDoubleAccumula __pyx_string_tab[181] +#define __pyx_n_u_pyx_unpickle_SumInt64Accumulat __pyx_string_tab[182] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[183] +#define __pyx_n_u_qualname __pyx_string_tab[184] +#define __pyx_n_u_reduce __pyx_string_tab[185] +#define __pyx_n_u_reduce_cython __pyx_string_tab[186] +#define __pyx_n_u_reduce_ex __pyx_string_tab[187] +#define __pyx_n_u_requires_hydration __pyx_string_tab[188] +#define __pyx_n_u_requires_hydration_2 __pyx_string_tab[189] +#define __pyx_n_u_self __pyx_string_tab[190] +#define __pyx_n_u_set_name __pyx_string_tab[191] +#define __pyx_n_u_setdefault __pyx_string_tab[192] +#define __pyx_n_u_setstate __pyx_string_tab[193] +#define __pyx_n_u_setstate_cython __pyx_string_tab[194] +#define __pyx_n_u_slots __pyx_string_tab[195] +#define __pyx_n_u_state __pyx_string_tab[196] +#define __pyx_n_u_staticmethod __pyx_string_tab[197] +#define __pyx_n_u_test __pyx_string_tab[198] +#define __pyx_n_u_unused_element __pyx_string_tab[199] +#define __pyx_n_u_unused_n __pyx_string_tab[200] +#define __pyx_n_u_update __pyx_string_tab[201] +#define __pyx_n_u_use_setstate __pyx_string_tab[202] +#define __pyx_n_u_value __pyx_string_tab[203] +#define __pyx_n_u_values __pyx_string_tab[204] +#define __pyx_kp_b_double__NAN__NEG_INF__POS_INF __pyx_string_tab[205] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[206] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[207] +#define __pyx_kp_b_iso88591_2_6 __pyx_string_tab[208] +#define __pyx_kp_b_iso88591_31F __pyx_string_tab[209] +#define __pyx_kp_b_iso88591_4 __pyx_string_tab[210] +#define __pyx_kp_b_iso88591_4q __pyx_string_tab[211] +#define __pyx_kp_b_iso88591_4q_A __pyx_string_tab[212] +#define __pyx_kp_b_iso88591_4uCt_T_Q __pyx_string_tab[213] +#define __pyx_kp_b_iso88591_6 __pyx_string_tab[214] +#define __pyx_kp_b_iso88591_7_0_s_q __pyx_string_tab[215] +#define __pyx_kp_b_iso88591_81_V1D_t1_a __pyx_string_tab[216] +#define __pyx_kp_b_iso88591_AV1 __pyx_string_tab[217] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg __pyx_string_tab[218] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1 __pyx_string_tab[219] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_5T_GST_5T_A __pyx_string_tab[220] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G __pyx_string_tab[221] +#define __pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_q_q_5T_GST_5T __pyx_string_tab[222] +#define __pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_q_q_6d_7_WTU __pyx_string_tab[223] +#define __pyx_kp_b_iso88591_T_V4vT_G1F_a_vWE_Q_q_q_q_T_T_T __pyx_string_tab[224] +#define __pyx_kp_b_iso88591_T_vQ __pyx_string_tab[225] +#define __pyx_kp_b_iso88591__3 __pyx_string_tab[226] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[227] +#define __pyx_kp_b_iso88591_c_t_S_1_M __pyx_string_tab[228] +#define __pyx_kp_b_iso88591_c_t_S_1_M_2 __pyx_string_tab[229] +#define __pyx_kp_b_iso88591_c_t_S_1_M_3 __pyx_string_tab[230] +#define __pyx_kp_b_iso88591_c_t_S_1_M_4vQ_4vQ __pyx_string_tab[231] +#define __pyx_kp_b_iso88591_c_t_S_1_M_4vQ_4vQ_2 __pyx_string_tab[232] +#define __pyx_kp_b_iso88591_c_t_S_1_M_A __pyx_string_tab[233] +#define __pyx_kp_b_iso88591_c_t_S_1_M_xr_Q_1 __pyx_string_tab[234] +#define __pyx_kp_b_iso88591_d __pyx_string_tab[235] +#define __pyx_kp_b_iso88591_e1A __pyx_string_tab[236] +#define __pyx_kp_b_iso88591_e1A_2 __pyx_string_tab[237] +#define __pyx_kp_b_iso88591_e1A_xr_Q_1 __pyx_string_tab[238] +#define __pyx_kp_b_iso88591_oQ __pyx_string_tab[239] +#define __pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1 __pyx_string_tab[240] +#define __pyx_kp_b_iso88591_q_0_kQR_7_7q8PP___1 __pyx_string_tab[241] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1 __pyx_string_tab[242] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1 __pyx_string_tab[243] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1 __pyx_string_tab[244] +#define __pyx_kp_b_iso88591_q_0_kQR_xq_7_a_llm_1 __pyx_string_tab[245] +#define __pyx_kp_b_iso88591_q_G2T_I __pyx_string_tab[246] +#define __pyx_kp_b_iso88591_q_Kq __pyx_string_tab[247] +#define __pyx_kp_b_iso88591_q_Q_Kq __pyx_string_tab[248] +#define __pyx_kp_b_iso88591_q_Q_Kq_AT_AT __pyx_string_tab[249] +#define __pyx_kp_b_iso88591_t_S_HA_1_U_Q_IQ_4uCt_T_Q __pyx_string_tab[250] +#define __pyx_kp_b_iso88591_t_S_HA_1_U_Q_IQ_4uCt_T_Q_6_V4xt __pyx_string_tab[251] +#define __pyx_kp_b_iso88591_t_S_Ja_Q_WCq_Kq_4q __pyx_string_tab[252] +#define __pyx_kp_b_iso88591_vQa_1 __pyx_string_tab[253] +#define __pyx_kp_b_iso88591_z_1 __pyx_string_tab[254] +#define __pyx_int_1 __pyx_number_tab[0] +#define __pyx_int_2 __pyx_number_tab[1] +#define __pyx_int_63 __pyx_number_tab[2] +#define __pyx_int_17678593 __pyx_number_tab[3] +#define __pyx_int_24876416 __pyx_number_tab[4] +#define __pyx_int_215229444 __pyx_number_tab[5] +#define __pyx_int_0x10000000000000000 __pyx_number_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<86; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<255; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<86; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<255; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/transforms/cy_combiners.py":37 + * class AccumulatorCombineFn(core.CombineFn): + * # singleton? + * def create_accumulator(self): # <<<<<<<<<<<<<< + * return self._accumulator_type() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_1create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_1create_accumulator = {"create_accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_1create_accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_1create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 37, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 37, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_accumulator", 0) < (0)) __PYX_ERR(0, 37, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_accumulator", 1, 1, 1, i); __PYX_ERR(0, 37, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 37, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_accumulator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 37, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_create_accumulator(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_accumulator", 0); + + /* "apache_beam/transforms/cy_combiners.py":38 + * # singleton? + * def create_accumulator(self): + * return self._accumulator_type() # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_accumulator_type, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":37 + * class AccumulatorCombineFn(core.CombineFn): + * # singleton? + * def create_accumulator(self): # <<<<<<<<<<<<<< + * return self._accumulator_type() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":40 + * return self._accumulator_type() + * + * @staticmethod # <<<<<<<<<<<<<< + * def add_input(accumulator, element): + * accumulator.add_input(element) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_3add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_3add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulator = 0; + PyObject *__pyx_v_element = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulator,&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 40, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 40, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 40, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 2, 2, i); __PYX_ERR(0, 40, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 40, __pyx_L3_error) + } + __pyx_v_accumulator = values[0]; + __pyx_v_element = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 40, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_2add_input(__pyx_self, __pyx_v_accumulator, __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_2add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + + /* "apache_beam/transforms/cy_combiners.py":42 + * @staticmethod + * def add_input(accumulator, element): + * accumulator.add_input(element) # <<<<<<<<<<<<<< + * return accumulator + * +*/ + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_element}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_input, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":43 + * def add_input(accumulator, element): + * accumulator.add_input(element) + * return accumulator # <<<<<<<<<<<<<< + * + * def merge_accumulators(self, accumulators): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_accumulator); + __pyx_r = __pyx_v_accumulator; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":40 + * return self._accumulator_type() + * + * @staticmethod # <<<<<<<<<<<<<< + * def add_input(accumulator, element): + * accumulator.add_input(element) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":45 + * return accumulator + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * accumulator = self._accumulator_type() + * accumulator.merge(accumulators) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_5merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_5merge_accumulators = {"merge_accumulators", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_5merge_accumulators, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_5merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge_accumulators (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 45, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 45, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 45, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge_accumulators", 0) < (0)) __PYX_ERR(0, 45, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge_accumulators", 1, 2, 2, i); __PYX_ERR(0, 45, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 45, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 45, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_accumulators = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge_accumulators", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 45, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_4merge_accumulators(__pyx_self, __pyx_v_self, __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_4merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_v_accumulator = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge_accumulators", 0); + + /* "apache_beam/transforms/cy_combiners.py":46 + * + * def merge_accumulators(self, accumulators): + * accumulator = self._accumulator_type() # <<<<<<<<<<<<<< + * accumulator.merge(accumulators) + * return accumulator +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_accumulator_type, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":47 + * def merge_accumulators(self, accumulators): + * accumulator = self._accumulator_type() + * accumulator.merge(accumulators) # <<<<<<<<<<<<<< + * return accumulator + * +*/ + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_accumulators}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_merge, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":48 + * accumulator = self._accumulator_type() + * accumulator.merge(accumulators) + * return accumulator # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_accumulator); + __pyx_r = __pyx_v_accumulator; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":45 + * return accumulator + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * accumulator = self._accumulator_type() + * accumulator.merge(accumulators) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":50 + * return accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.extract_output() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_7extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_7extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 50, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extract_output", 0) < (0)) __PYX_ERR(0, 50, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 1, 1, i); __PYX_ERR(0, 50, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + } + __pyx_v_accumulator = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("extract_output", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_6extract_output(__pyx_self, __pyx_v_accumulator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_6extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":52 + * @staticmethod + * def extract_output(accumulator): + * return accumulator.extract_output() # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extract_output, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":50 + * return accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.extract_output() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":54 + * return accumulator.extract_output() + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, AccumulatorCombineFn) and +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_9__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_9__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_9__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_9__eq__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_other = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 54, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 54, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 54, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 54, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 54, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 54, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 54, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_other = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 54, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_8__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_8__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/transforms/cy_combiners.py":55 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * isinstance(other, AccumulatorCombineFn) and + * self._accumulator_type is other._accumulator_type) +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/cy_combiners.py":56 + * def __eq__(self, other): + * return ( + * isinstance(other, AccumulatorCombineFn) and # <<<<<<<<<<<<<< + * self._accumulator_type is other._accumulator_type) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_IsInstance(__pyx_v_other, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "apache_beam/transforms/cy_combiners.py":57 + * return ( + * isinstance(other, AccumulatorCombineFn) and + * self._accumulator_type is other._accumulator_type) # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_accumulator_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_accumulator_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 == __pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":54 + * return accumulator.extract_output() + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, AccumulatorCombineFn) and +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":59 + * self._accumulator_type is other._accumulator_type) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._accumulator_type) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_11__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_11__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_11__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_11__hash__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 59, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 59, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 59, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 59, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 59, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 59, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_10__hash__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_10__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/transforms/cy_combiners.py":60 + * + * def __hash__(self): + * return hash(self._accumulator_type) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_accumulator_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":59 + * self._accumulator_type is other._accumulator_type) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._accumulator_type) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AccumulatorCombineFn.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":69 + * + * class CountAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":70 + * class CountAccumulator(object): + * def __init__(self): + * self.value = 0 # <<<<<<<<<<<<<< + * + * def add_input(self, unused_element): +*/ + __pyx_v_self->value = 0; + + /* "apache_beam/transforms/cy_combiners.py":69 + * + * class CountAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":72 + * self.value = 0 + * + * def add_input(self, unused_element): # <<<<<<<<<<<<<< + * self.value += 1 + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unused_element}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":73 + * + * def add_input(self, unused_element): + * self.value += 1 # <<<<<<<<<<<<<< + * + * def add_input_n(self, unused_element, n): +*/ + __pyx_v_self->value = (__pyx_v_self->value + 1); + + /* "apache_beam/transforms/cy_combiners.py":72 + * self.value = 0 + * + * def add_input(self, unused_element): # <<<<<<<<<<<<<< + * self.value += 1 + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_unused_element = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 72, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 72, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 72, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 72, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 72, __pyx_L3_error) + } + __pyx_v_unused_element = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 72, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self), __pyx_v_unused_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_unused_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_add_input(__pyx_v_self, __pyx_v_unused_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":75 + * self.value += 1 + * + * def add_input_n(self, unused_element, n): # <<<<<<<<<<<<<< + * self.value += n + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_unused_element = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unused_element,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 75, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 75, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 75, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + } + __pyx_v_unused_element = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self), __pyx_v_unused_element, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_element, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int64_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + + /* "apache_beam/transforms/cy_combiners.py":76 + * + * def add_input_n(self, unused_element, n): + * self.value += n # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->value = __pyx_t_3; + + /* "apache_beam/transforms/cy_combiners.py":75 + * self.value += 1 + * + * def add_input_n(self, unused_element, n): # <<<<<<<<<<<<<< + * self.value += n + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":78 + * self.value += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":79 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 79, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 79, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 79, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 79, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator))))) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":80 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.value += accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_accumulator->value); + + /* "apache_beam/transforms/cy_combiners.py":79 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":78 + * self.value += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 78, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 78, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 78, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 78, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 78, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 78, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":82 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":83 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":82 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":25 + * + * cdef class CountAccumulator(object): + * cdef readonly int64_t value # <<<<<<<<<<<<<< + * cpdef add_input(self, unused_element) + * @cython.locals(accumulator=CountAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CountAccumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CountAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CountAccumulator); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CountAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CountAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CountAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.CountAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":87 + * + * class SumInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":88 + * class SumInt64Accumulator(object): + * def __init__(self): + * self.value = 0 # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = 0; + + /* "apache_beam/transforms/cy_combiners.py":87 + * + * class SumInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":90 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":93 + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.value += element +*/ + __pyx_t_7 = (INT64_MIN <= __pyx_v_element); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_element <= INT64_MAX); + } + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_combiners.py":94 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.value += element + * +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 94, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":93 + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.value += element +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":95 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.value += element # <<<<<<<<<<<<<< + * + * def add_input_n(self, element, n): +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":90 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 90, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 90, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 90, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 90, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 90, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":97 + * self.value += element + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 97, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 97, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 97, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self), __pyx_v_element, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + __Pyx_INCREF(__pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":99 + * def add_input_n(self, element, n): + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) # <<<<<<<<<<<<<< + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) +*/ + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_element, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":100 + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.value += element * n +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(INT64_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_element, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + if (__Pyx_PyObject_IsTrue(__pyx_t_2)) { + __Pyx_DECREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(INT64_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_element, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "apache_beam/transforms/cy_combiners.py":101 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.value += element * n + * +*/ + __pyx_t_1 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_element}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 101, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":100 + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.value += element * n +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":102 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.value += element * n # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Multiply(__pyx_v_element, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->value = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":97 + * self.value += element + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":104 + * self.value += element * n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":105 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 105, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 105, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 105, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator))))) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":106 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.value += accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_accumulator->value); + + /* "apache_beam/transforms/cy_combiners.py":105 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":104 + * self.value += element * n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 104, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 104, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 104, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":108 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int64_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":109 + * + * def extract_output(self): + * if not INT64_MIN <= self.value <= INT64_MAX: # <<<<<<<<<<<<<< + * self.value %= 2**64 + * if self.value >= INT64_MAX: +*/ + __pyx_t_1 = (INT64_MIN <= __pyx_v_self->value); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_self->value <= INT64_MAX); + } + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":110 + * def extract_output(self): + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 # <<<<<<<<<<<<<< + * if self.value >= INT64_MAX: + * self.value -= 2**64 +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_InPlaceRemainder(__pyx_t_3, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->value = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":111 + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 + * if self.value >= INT64_MAX: # <<<<<<<<<<<<<< + * self.value -= 2**64 + * return self.value +*/ + __pyx_t_2 = (__pyx_v_self->value >= INT64_MAX); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":112 + * self.value %= 2**64 + * if self.value >= INT64_MAX: + * self.value -= 2**64 # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->value = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":111 + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 + * if self.value >= INT64_MAX: # <<<<<<<<<<<<<< + * self.value -= 2**64 + * return self.value +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":109 + * + * def extract_output(self): + * if not INT64_MIN <= self.value <= INT64_MAX: # <<<<<<<<<<<<<< + * self.value %= 2**64 + * if self.value >= INT64_MAX: +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":113 + * if self.value >= INT64_MAX: + * self.value -= 2**64 + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":108 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":32 + * + * cdef class SumInt64Accumulator(object): + * cdef readonly int64_t value # <<<<<<<<<<<<<< + * cpdef add_input(self, int64_t element) + * @cython.locals(accumulator=SumInt64Accumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumInt64Accumulat); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumInt64Accumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumInt64Accumulat); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumInt64Accumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumInt64Accumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumInt64Accumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumInt64Accumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":117 + * + * class MinInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = INT64_MAX + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":118 + * class MinInt64Accumulator(object): + * def __init__(self): + * self.value = INT64_MAX # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = INT64_MAX; + + /* "apache_beam/transforms/cy_combiners.py":117 + * + * class MinInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = INT64_MAX + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":120 + * self.value = INT64_MAX + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":122 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * if element < self.value: +*/ + __pyx_t_7 = (INT64_MIN <= __pyx_v_element); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_element <= INT64_MAX); + } + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_combiners.py":123 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * if element < self.value: + * self.value = element +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 123, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":122 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * if element < self.value: +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":124 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * if element < self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + __pyx_t_8 = (__pyx_v_element < __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":125 + * raise OverflowError(element) + * if element < self.value: + * self.value = element # <<<<<<<<<<<<<< + * + * def add_input_n(self, element, unused_n): +*/ + __pyx_v_self->value = __pyx_v_element; + + /* "apache_beam/transforms/cy_combiners.py":124 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * if element < self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":120 + * self.value = INT64_MAX + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 120, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 120, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 120, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 120, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 120, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":127 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + CYTHON_UNUSED PyObject *__pyx_v_unused_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_unused_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 127, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 127, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 127, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 127, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_unused_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self), __pyx_v_element, __pyx_v_unused_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_unused_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + + /* "apache_beam/transforms/cy_combiners.py":128 + * + * def add_input_n(self, element, unused_n): + * self.add_input(element) # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_element); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self->__pyx_vtab)->add_input(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":127 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":130 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":131 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value < self.value: + * self.value = accumulator.value +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 131, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 131, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 131, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator))))) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":132 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value < self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + __pyx_t_8 = (__pyx_v_accumulator->value < __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":133 + * for accumulator in accumulators: + * if accumulator.value < self.value: + * self.value = accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_t_9 = __pyx_v_accumulator->value; + __pyx_v_self->value = __pyx_t_9; + + /* "apache_beam/transforms/cy_combiners.py":132 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value < self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":131 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value < self.value: + * self.value = accumulator.value +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":130 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 130, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 130, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 130, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":135 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":136 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":135 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":38 + * + * cdef class MinInt64Accumulator(object): + * cdef readonly int64_t value # <<<<<<<<<<<<<< + * cpdef add_input(self, int64_t element) + * @cython.locals(accumulator=MinInt64Accumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinInt64Accumulat); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MinInt64Accumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinInt64Accumulat); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinInt64Accumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MinInt64Accumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinInt64Accumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinInt64Accumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":140 + * + * class MaxInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = INT64_MIN + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":141 + * class MaxInt64Accumulator(object): + * def __init__(self): + * self.value = INT64_MIN # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = INT64_MIN; + + /* "apache_beam/transforms/cy_combiners.py":140 + * + * class MaxInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = INT64_MIN + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":143 + * self.value = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":145 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * if element > self.value: +*/ + __pyx_t_7 = (INT64_MIN <= __pyx_v_element); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_element <= INT64_MAX); + } + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_combiners.py":146 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * if element > self.value: + * self.value = element +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 146, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":145 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * if element > self.value: +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":147 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * if element > self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + __pyx_t_8 = (__pyx_v_element > __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":148 + * raise OverflowError(element) + * if element > self.value: + * self.value = element # <<<<<<<<<<<<<< + * + * def add_input_n(self, element, unused_n): +*/ + __pyx_v_self->value = __pyx_v_element; + + /* "apache_beam/transforms/cy_combiners.py":147 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * if element > self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":143 + * self.value = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 143, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 143, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 143, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 143, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 143, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 143, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":150 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + CYTHON_UNUSED PyObject *__pyx_v_unused_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_unused_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 150, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 150, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 150, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_unused_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 150, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self), __pyx_v_element, __pyx_v_unused_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_unused_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + + /* "apache_beam/transforms/cy_combiners.py":151 + * + * def add_input_n(self, element, unused_n): + * self.add_input(element) # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_element); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self->__pyx_vtab)->add_input(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":150 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":153 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":154 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value > self.value: + * self.value = accumulator.value +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 154, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 154, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 154, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator))))) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":155 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value > self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + __pyx_t_8 = (__pyx_v_accumulator->value > __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":156 + * for accumulator in accumulators: + * if accumulator.value > self.value: + * self.value = accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_t_9 = __pyx_v_accumulator->value; + __pyx_v_self->value = __pyx_t_9; + + /* "apache_beam/transforms/cy_combiners.py":155 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value > self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":154 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value > self.value: + * self.value = accumulator.value +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":153 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 153, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 153, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 153, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 153, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 153, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 153, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":158 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":159 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":158 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":45 + * + * cdef class MaxInt64Accumulator(object): + * cdef readonly int64_t value # <<<<<<<<<<<<<< + * cpdef add_input(self, int64_t element) + * @cython.locals(accumulator=MaxInt64Accumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxInt64Accumulat); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MaxInt64Accumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxInt64Accumulat); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxInt64Accumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MaxInt64Accumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxInt64Accumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxInt64Accumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":163 + * + * class MeanInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":164 + * class MeanInt64Accumulator(object): + * def __init__(self): + * self.sum = 0 # <<<<<<<<<<<<<< + * self.count = 0 + * +*/ + __pyx_v_self->sum = 0; + + /* "apache_beam/transforms/cy_combiners.py":165 + * def __init__(self): + * self.sum = 0 + * self.count = 0 # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->count = 0; + + /* "apache_beam/transforms/cy_combiners.py":163 + * + * class MeanInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":167 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":169 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element +*/ + __pyx_t_7 = (INT64_MIN <= __pyx_v_element); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_element <= INT64_MAX); + } + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_combiners.py":170 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.sum += element + * self.count += 1 +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 170, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":169 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":171 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.sum += element # <<<<<<<<<<<<<< + * self.count += 1 + * +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":172 + * raise OverflowError(element) + * self.sum += element + * self.count += 1 # <<<<<<<<<<<<<< + * + * def add_input_n(self, element, n): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 1); + + /* "apache_beam/transforms/cy_combiners.py":167 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 167, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 167, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 167, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":174 + * self.count += 1 + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 174, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 174, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 174, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 174, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 174, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 174, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 174, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 174, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self), __pyx_v_element, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + __Pyx_INCREF(__pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":175 + * + * def add_input_n(self, element, n): + * element = int(element) # <<<<<<<<<<<<<< + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) +*/ + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_element, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":176 + * def add_input_n(self, element, n): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element * n +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(INT64_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_element, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) + if (__Pyx_PyObject_IsTrue(__pyx_t_2)) { + __Pyx_DECREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(INT64_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_element, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "apache_beam/transforms/cy_combiners.py":177 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.sum += element * n + * self.count += n +*/ + __pyx_t_1 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_element}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 177, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":176 + * def add_input_n(self, element, n): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element * n +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":178 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.sum += element * n # <<<<<<<<<<<<<< + * self.count += n + * +*/ + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Multiply(__pyx_v_element, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->sum = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":179 + * raise OverflowError(element) + * self.sum += element * n + * self.count += n # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->count = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":174 + * self.count += 1 + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":181 + * self.count += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":182 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 182, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 182, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 182, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 182, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator))))) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":183 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.sum += accumulator.sum # <<<<<<<<<<<<<< + * self.count += accumulator.count + * +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_accumulator->sum); + + /* "apache_beam/transforms/cy_combiners.py":184 + * for accumulator in accumulators: + * self.sum += accumulator.sum + * self.count += accumulator.count # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->count = (__pyx_v_self->count + __pyx_v_accumulator->count); + + /* "apache_beam/transforms/cy_combiners.py":182 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":181 + * self.count += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 181, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 181, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 181, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 181, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":186 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int64_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":187 + * + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: +*/ + __pyx_t_1 = (INT64_MIN <= __pyx_v_self->sum); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_self->sum <= INT64_MAX); + } + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":188 + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 # <<<<<<<<<<<<<< + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_InPlaceRemainder(__pyx_t_3, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->sum = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":189 + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum -= 2**64 + * return self.sum // self.count if self.count else _NAN +*/ + __pyx_t_2 = (__pyx_v_self->sum >= INT64_MAX); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":190 + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 # <<<<<<<<<<<<<< + * return self.sum // self.count if self.count else _NAN + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->sum = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":189 + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum -= 2**64 + * return self.sum // self.count if self.count else _NAN +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":187 + * + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":191 + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 + * return self.sum // self.count if self.count else _NAN # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_self->count != 0); + if (__pyx_t_2) { + if (unlikely(__pyx_v_self->count == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 191, __pyx_L1_error) + } + else if (sizeof(int64_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(__pyx_v_self->count == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->sum))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(0, 191, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__Pyx_div_int64_t(__pyx_v_self->sum, __pyx_v_self->count, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_11apache_beam_10transforms_12cy_combiners__NAN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":186 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":52 + * + * cdef class MeanInt64Accumulator(object): + * cdef readonly int64_t sum # <<<<<<<<<<<<<< + * cdef readonly int64_t count + * cpdef add_input(self, int64_t element) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.sum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":53 + * cdef class MeanInt64Accumulator(object): + * cdef readonly int64_t sum + * cdef readonly int64_t count # <<<<<<<<<<<<<< + * cpdef add_input(self, int64_t element) + * @cython.locals(accumulator=MeanInt64Accumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.count, self.sum) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanInt64Accumula); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24876416); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24876416); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_24876416) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, None), state + * else: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MeanInt64Accumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanInt64Accumula); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24876416); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24876416); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_24876416) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanInt64Accumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MeanInt64Accumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanInt64Accumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanInt64Accumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":195 + * + * class DistributionInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":196 + * class DistributionInt64Accumulator(object): + * def __init__(self): + * self.sum = 0 # <<<<<<<<<<<<<< + * self.count = 0 + * self.min = INT64_MAX +*/ + __pyx_v_self->sum = 0; + + /* "apache_beam/transforms/cy_combiners.py":197 + * def __init__(self): + * self.sum = 0 + * self.count = 0 # <<<<<<<<<<<<<< + * self.min = INT64_MAX + * self.max = INT64_MIN +*/ + __pyx_v_self->count = 0; + + /* "apache_beam/transforms/cy_combiners.py":198 + * self.sum = 0 + * self.count = 0 + * self.min = INT64_MAX # <<<<<<<<<<<<<< + * self.max = INT64_MIN + * +*/ + __pyx_v_self->min = INT64_MAX; + + /* "apache_beam/transforms/cy_combiners.py":199 + * self.count = 0 + * self.min = INT64_MAX + * self.max = INT64_MIN # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->max = INT64_MIN; + + /* "apache_beam/transforms/cy_combiners.py":195 + * + * class DistributionInt64Accumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":201 + * self.max = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int64_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":203 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element +*/ + __pyx_t_7 = (INT64_MIN <= __pyx_v_element); + if (__pyx_t_7) { + __pyx_t_7 = (__pyx_v_element <= INT64_MAX); + } + __pyx_t_8 = (!__pyx_t_7); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_combiners.py":204 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.sum += element + * self.count += 1 +*/ + __pyx_t_2 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 204, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":203 + * def add_input(self, element): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":205 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.sum += element # <<<<<<<<<<<<<< + * self.count += 1 + * self.min = min(self.min, element) +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":206 + * raise OverflowError(element) + * self.sum += element + * self.count += 1 # <<<<<<<<<<<<<< + * self.min = min(self.min, element) + * self.max = max(self.max, element) +*/ + __pyx_v_self->count = (__pyx_v_self->count + 1); + + /* "apache_beam/transforms/cy_combiners.py":207 + * self.sum += element + * self.count += 1 + * self.min = min(self.min, element) # <<<<<<<<<<<<<< + * self.max = max(self.max, element) + * +*/ + __pyx_t_9 = __pyx_v_element; + __pyx_t_10 = __pyx_v_self->min; + __pyx_t_8 = (__pyx_t_9 < __pyx_t_10); + if (__pyx_t_8) { + __pyx_t_11 = __pyx_t_9; + } else { + __pyx_t_11 = __pyx_t_10; + } + __pyx_v_self->min = __pyx_t_11; + + /* "apache_beam/transforms/cy_combiners.py":208 + * self.count += 1 + * self.min = min(self.min, element) + * self.max = max(self.max, element) # <<<<<<<<<<<<<< + * + * def add_input_n(self, element, n): +*/ + __pyx_t_11 = __pyx_v_element; + __pyx_t_9 = __pyx_v_self->max; + __pyx_t_8 = (__pyx_t_11 > __pyx_t_9); + if (__pyx_t_8) { + __pyx_t_10 = __pyx_t_11; + } else { + __pyx_t_10 = __pyx_t_9; + } + __pyx_v_self->max = __pyx_t_10; + + /* "apache_beam/transforms/cy_combiners.py":201 + * self.max = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 201, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 201, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 201, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 201, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 201, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 201, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":210 + * self.max = max(self.max, element) + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_element = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 210, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 210, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 210, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 210, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 210, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 210, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 210, __pyx_L3_error) + } + __pyx_v_element = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 210, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_4add_input_n(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self), __pyx_v_element, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_4add_input_n(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_element, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + int64_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + __Pyx_INCREF(__pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":211 + * + * def add_input_n(self, element, n): + * element = int(element) # <<<<<<<<<<<<<< + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) +*/ + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_element, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":212 + * def add_input_n(self, element, n): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element * n +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(INT64_MIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_element, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + if (__Pyx_PyObject_IsTrue(__pyx_t_2)) { + __Pyx_DECREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(INT64_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_element, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "apache_beam/transforms/cy_combiners.py":213 + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) # <<<<<<<<<<<<<< + * self.sum += element * n + * self.count += n +*/ + __pyx_t_1 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_element}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 213, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":212 + * def add_input_n(self, element, n): + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: # <<<<<<<<<<<<<< + * raise OverflowError(element) + * self.sum += element * n +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":214 + * if not INT64_MIN <= element <= INT64_MAX: + * raise OverflowError(element) + * self.sum += element * n # <<<<<<<<<<<<<< + * self.count += n + * self.min = min(self.min, element) +*/ + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Multiply(__pyx_v_element, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->sum = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":215 + * raise OverflowError(element) + * self.sum += element * n + * self.count += n # <<<<<<<<<<<<<< + * self.min = min(self.min, element) + * self.max = max(self.max, element) +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->count = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":216 + * self.sum += element * n + * self.count += n + * self.min = min(self.min, element) # <<<<<<<<<<<<<< + * self.max = max(self.max, element) + * +*/ + __Pyx_INCREF(__pyx_v_element); + __pyx_t_1 = __pyx_v_element; + __pyx_t_7 = __pyx_v_self->min; + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_5) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; + } else { + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __pyx_t_8; + __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->min = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":217 + * self.count += n + * self.min = min(self.min, element) + * self.max = max(self.max, element) # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __Pyx_INCREF(__pyx_v_element); + __pyx_t_3 = __pyx_v_element; + __pyx_t_7 = __pyx_v_self->max; + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + } else { + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->max = __pyx_t_7; + + /* "apache_beam/transforms/cy_combiners.py":210 + * self.max = max(self.max, element) + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_element); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":219 + * self.max = max(self.max, element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int64_t __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":220 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 220, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 220, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 220, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator))))) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":221 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.sum += accumulator.sum # <<<<<<<<<<<<<< + * self.count += accumulator.count + * self.min = min(self.min, accumulator.min) +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_accumulator->sum); + + /* "apache_beam/transforms/cy_combiners.py":222 + * for accumulator in accumulators: + * self.sum += accumulator.sum + * self.count += accumulator.count # <<<<<<<<<<<<<< + * self.min = min(self.min, accumulator.min) + * self.max = max(self.max, accumulator.max) +*/ + __pyx_v_self->count = (__pyx_v_self->count + __pyx_v_accumulator->count); + + /* "apache_beam/transforms/cy_combiners.py":223 + * self.sum += accumulator.sum + * self.count += accumulator.count + * self.min = min(self.min, accumulator.min) # <<<<<<<<<<<<<< + * self.max = max(self.max, accumulator.max) + * +*/ + __pyx_t_8 = __pyx_v_accumulator->min; + __pyx_t_9 = __pyx_v_self->min; + __pyx_t_11 = (__pyx_t_8 < __pyx_t_9); + if (__pyx_t_11) { + __pyx_t_10 = __pyx_t_8; + } else { + __pyx_t_10 = __pyx_t_9; + } + __pyx_v_self->min = __pyx_t_10; + + /* "apache_beam/transforms/cy_combiners.py":224 + * self.count += accumulator.count + * self.min = min(self.min, accumulator.min) + * self.max = max(self.max, accumulator.max) # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_t_10 = __pyx_v_accumulator->max; + __pyx_t_8 = __pyx_v_self->max; + __pyx_t_11 = (__pyx_t_10 > __pyx_t_8); + if (__pyx_t_11) { + __pyx_t_9 = __pyx_t_10; + } else { + __pyx_t_9 = __pyx_t_8; + } + __pyx_v_self->max = __pyx_t_9; + + /* "apache_beam/transforms/cy_combiners.py":220 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":219 + * self.max = max(self.max, element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 219, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 219, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 219, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 219, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 219, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 219, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_6merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_6merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":226 + * self.max = max(self.max, accumulator.max) + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_8extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_8extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + double __pyx_v_mean; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int64_t __pyx_t_5; + double __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":227 + * + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: +*/ + __pyx_t_1 = (INT64_MIN <= __pyx_v_self->sum); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_self->sum <= INT64_MAX); + } + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":228 + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 # <<<<<<<<<<<<<< + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyNumber_InPlaceRemainder(__pyx_t_3, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->sum = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":229 + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum -= 2**64 + * mean = self.sum // self.count if self.count else _NAN +*/ + __pyx_t_2 = (__pyx_v_self->sum >= INT64_MAX); + if (__pyx_t_2) { + + /* "apache_beam/transforms/cy_combiners.py":230 + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 # <<<<<<<<<<<<<< + * mean = self.sum // self.count if self.count else _NAN + * return mean, self.sum, self.count, self.min, self.max +*/ + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_mstate_global->__pyx_int_0x10000000000000000); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->sum = __pyx_t_5; + + /* "apache_beam/transforms/cy_combiners.py":229 + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum -= 2**64 + * mean = self.sum // self.count if self.count else _NAN +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":227 + * + * def extract_output(self): + * if not INT64_MIN <= self.sum <= INT64_MAX: # <<<<<<<<<<<<<< + * self.sum %= 2**64 + * if self.sum >= INT64_MAX: +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":231 + * if self.sum >= INT64_MAX: + * self.sum -= 2**64 + * mean = self.sum // self.count if self.count else _NAN # <<<<<<<<<<<<<< + * return mean, self.sum, self.count, self.min, self.max + * +*/ + __pyx_t_2 = (__pyx_v_self->count != 0); + if (__pyx_t_2) { + if (unlikely(__pyx_v_self->count == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 231, __pyx_L1_error) + } + else if (sizeof(int64_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(__pyx_v_self->count == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->sum))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(0, 231, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_div_int64_t(__pyx_v_self->sum, __pyx_v_self->count, 0); + } else { + __pyx_t_6 = __pyx_v_11apache_beam_10transforms_12cy_combiners__NAN; + } + __pyx_v_mean = __pyx_t_6; + + /* "apache_beam/transforms/cy_combiners.py":232 + * self.sum -= 2**64 + * mean = self.sum // self.count if self.count else _NAN + * return mean, self.sum, self.count, self.min, self.max # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mean); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_7) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_8) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_9) != (0)) __PYX_ERR(0, 232, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":226 + * self.max = max(self.max, accumulator.max) + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":60 + * + * cdef class DistributionInt64Accumulator(object): + * cdef readonly int64_t sum # <<<<<<<<<<<<<< + * cdef readonly int64_t count + * cdef readonly int64_t min +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.sum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":61 + * cdef class DistributionInt64Accumulator(object): + * cdef readonly int64_t sum + * cdef readonly int64_t count # <<<<<<<<<<<<<< + * cdef readonly int64_t min + * cdef readonly int64_t max +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":62 + * cdef readonly int64_t sum + * cdef readonly int64_t count + * cdef readonly int64_t min # <<<<<<<<<<<<<< + * cdef readonly int64_t max + * cpdef add_input(self, int64_t element) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":63 + * cdef readonly int64_t count + * cdef readonly int64_t min + * cdef readonly int64_t max # <<<<<<<<<<<<<< + * cpdef add_input(self, int64_t element) + * @cython.locals(accumulator=DistributionInt64Accumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_10__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_10__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.count, self.max, self.min, self.sum) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__dict = __pyx_t_5; + __pyx_t_5 = 0; + + /* "(tree fragment)":7 + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_7 = (__pyx_v__dict != Py_None); + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_6 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.count, self.max, self.min, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionInt64); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_17678593); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_17678593); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_int_17678593) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, None), state + * else: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DistributionInt64Accumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionInt64); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_17678593); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_17678593); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_int_17678593) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionInt64Accumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_12__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_12__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_DistributionInt64Accumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_DistributionInt64Accumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionInt64Accumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.DistributionInt64Accumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":265 + * + * class SumDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":266 + * class SumDoubleAccumulator(object): + * def __init__(self): + * self.value = 0 # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = 0.0; + + /* "apache_beam/transforms/cy_combiners.py":265 + * + * class SumDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = 0 + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":268 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.value += element +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":270 + * def add_input(self, element): + * element = float(element) + * self.value += element # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":268 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.value += element +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + double __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 268, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 268, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 268, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 268, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 268, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 268, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 268, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, double __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":272 + * self.value += element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":273 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 273, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 273, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 273, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator))))) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":274 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.value += accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->value = (__pyx_v_self->value + __pyx_v_accumulator->value); + + /* "apache_beam/transforms/cy_combiners.py":273 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value += accumulator.value + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":272 + * self.value += element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 272, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 272, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 272, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 272, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":276 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":277 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":276 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":70 + * + * cdef class SumDoubleAccumulator(object): + * cdef readonly double value # <<<<<<<<<<<<<< + * cpdef add_input(self, double element) + * @cython.locals(accumulator=SumDoubleAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumDoubleAccumula); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumDoubleAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumDoubleAccumula); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumDoubleAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_SumDoubleAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumDoubleAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumDoubleAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.SumDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":281 + * + * class MinDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = _POS_INF + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":282 + * class MinDoubleAccumulator(object): + * def __init__(self): + * self.value = _POS_INF # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = __pyx_v_11apache_beam_10transforms_12cy_combiners__POS_INF; + + /* "apache_beam/transforms/cy_combiners.py":281 + * + * class MinDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = _POS_INF + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":284 + * self.value = _POS_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element < self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":286 + * def add_input(self, element): + * element = float(element) + * if element < self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + __pyx_t_7 = (__pyx_v_element < __pyx_v_self->value); + if (__pyx_t_7) { + + /* "apache_beam/transforms/cy_combiners.py":287 + * element = float(element) + * if element < self.value: + * self.value = element # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->value = __pyx_v_element; + + /* "apache_beam/transforms/cy_combiners.py":286 + * def add_input(self, element): + * element = float(element) + * if element < self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":284 + * self.value = _POS_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element < self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + double __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 284, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 284, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 284, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 284, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 284, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 284, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, double __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":289 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + double __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":290 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value < self.value: + * self.value = accumulator.value +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 290, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 290, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 290, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator))))) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":291 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value < self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + __pyx_t_8 = (__pyx_v_accumulator->value < __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":292 + * for accumulator in accumulators: + * if accumulator.value < self.value: + * self.value = accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_t_9 = __pyx_v_accumulator->value; + __pyx_v_self->value = __pyx_t_9; + + /* "apache_beam/transforms/cy_combiners.py":291 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value < self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":290 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value < self.value: + * self.value = accumulator.value +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":289 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 289, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 289, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 289, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 289, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 289, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 289, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":294 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":295 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":294 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":77 + * + * cdef class MinDoubleAccumulator(object): + * cdef readonly double value # <<<<<<<<<<<<<< + * cpdef add_input(self, double element) + * @cython.locals(accumulator=MinDoubleAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinDoubleAccumula); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MinDoubleAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinDoubleAccumula); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinDoubleAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MinDoubleAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinDoubleAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinDoubleAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MinDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":299 + * + * class MaxDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = _NEG_INF + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":300 + * class MaxDoubleAccumulator(object): + * def __init__(self): + * self.value = _NEG_INF # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = __pyx_v_11apache_beam_10transforms_12cy_combiners__NEG_INF; + + /* "apache_beam/transforms/cy_combiners.py":299 + * + * class MaxDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = _NEG_INF + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":302 + * self.value = _NEG_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element > self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":304 + * def add_input(self, element): + * element = float(element) + * if element > self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + __pyx_t_7 = (__pyx_v_element > __pyx_v_self->value); + if (__pyx_t_7) { + + /* "apache_beam/transforms/cy_combiners.py":305 + * element = float(element) + * if element > self.value: + * self.value = element # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->value = __pyx_v_element; + + /* "apache_beam/transforms/cy_combiners.py":304 + * def add_input(self, element): + * element = float(element) + * if element > self.value: # <<<<<<<<<<<<<< + * self.value = element + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":302 + * self.value = _NEG_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element > self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + double __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 302, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 302, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 302, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 302, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 302, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 302, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, double __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":307 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + double __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":308 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value > self.value: + * self.value = accumulator.value +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 308, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 308, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 308, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 308, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator))))) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":309 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value > self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + __pyx_t_8 = (__pyx_v_accumulator->value > __pyx_v_self->value); + if (__pyx_t_8) { + + /* "apache_beam/transforms/cy_combiners.py":310 + * for accumulator in accumulators: + * if accumulator.value > self.value: + * self.value = accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_t_9 = __pyx_v_accumulator->value; + __pyx_v_self->value = __pyx_t_9; + + /* "apache_beam/transforms/cy_combiners.py":309 + * def merge(self, accumulators): + * for accumulator in accumulators: + * if accumulator.value > self.value: # <<<<<<<<<<<<<< + * self.value = accumulator.value + * +*/ + } + + /* "apache_beam/transforms/cy_combiners.py":308 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.value > self.value: + * self.value = accumulator.value +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":307 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 307, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 307, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 307, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 307, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":312 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":313 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":312 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":84 + * + * cdef class MaxDoubleAccumulator(object): + * cdef readonly double value # <<<<<<<<<<<<<< + * cpdef add_input(self, double element) + * @cython.locals(accumulator=MaxDoubleAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxDoubleAccumula); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MaxDoubleAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxDoubleAccumula); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxDoubleAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MaxDoubleAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxDoubleAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxDoubleAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MaxDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":317 + * + * class MeanDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":318 + * class MeanDoubleAccumulator(object): + * def __init__(self): + * self.sum = 0 # <<<<<<<<<<<<<< + * self.count = 0 + * +*/ + __pyx_v_self->sum = 0.0; + + /* "apache_beam/transforms/cy_combiners.py":319 + * def __init__(self): + * self.sum = 0 + * self.count = 0 # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->count = 0; + + /* "apache_beam/transforms/cy_combiners.py":317 + * + * class MeanDoubleAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.sum = 0 + * self.count = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":321 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.sum += element +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, double __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":323 + * def add_input(self, element): + * element = float(element) + * self.sum += element # <<<<<<<<<<<<<< + * self.count += 1 + * +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_element); + + /* "apache_beam/transforms/cy_combiners.py":324 + * element = float(element) + * self.sum += element + * self.count += 1 # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->count = (__pyx_v_self->count + 1); + + /* "apache_beam/transforms/cy_combiners.py":321 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.sum += element +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + double __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 321, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 321, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 321, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 321, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 321, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_element == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 321, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, double __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":326 + * self.count += 1 + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":327 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 327, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 327, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 327, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator))))) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":328 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.sum += accumulator.sum # <<<<<<<<<<<<<< + * self.count += accumulator.count + * +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_accumulator->sum); + + /* "apache_beam/transforms/cy_combiners.py":329 + * for accumulator in accumulators: + * self.sum += accumulator.sum + * self.count += accumulator.count # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->count = (__pyx_v_self->count + __pyx_v_accumulator->count); + + /* "apache_beam/transforms/cy_combiners.py":327 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.sum += accumulator.sum + * self.count += accumulator.count +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":326 + * self.count += 1 + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 326, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 326, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 326, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 326, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 326, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 326, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":331 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.sum // self.count if self.count else _NAN + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":332 + * + * def extract_output(self): + * return self.sum // self.count if self.count else _NAN # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = (__pyx_v_self->count != 0); + if (__pyx_t_2) { + if (unlikely(__pyx_v_self->count == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 332, __pyx_L1_error) + } + __pyx_t_3 = PyFloat_FromDouble(floor(__pyx_v_self->sum / __pyx_v_self->count)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_11apache_beam_10transforms_12cy_combiners__NAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":331 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.sum // self.count if self.count else _NAN + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":91 + * + * cdef class MeanDoubleAccumulator(object): + * cdef readonly double sum # <<<<<<<<<<<<<< + * cdef readonly int64_t count + * cpdef add_input(self, double element) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.sum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":92 + * cdef class MeanDoubleAccumulator(object): + * cdef readonly double sum + * cdef readonly int64_t count # <<<<<<<<<<<<<< + * cpdef add_input(self, double element) + * @cython.locals(accumulator=MeanDoubleAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.count, self.sum) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.count, self.sum) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanDoubleAccumul); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24876416); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24876416); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_24876416) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, None), state + * else: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MeanDoubleAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanDoubleAccumul); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_24876416); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_24876416); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_24876416) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanDoubleAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_MeanDoubleAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanDoubleAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanDoubleAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.MeanDoubleAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":352 + * + * class AllAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = True + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":353 + * class AllAccumulator(object): + * def __init__(self): + * self.value = True # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = 1; + + /* "apache_beam/transforms/cy_combiners.py":352 + * + * class AllAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = True + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":355 + * self.value = True + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value &= not not element + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, int __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":356 + * + * def add_input(self, element): + * self.value &= not not element # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->value = (__pyx_v_self->value & (!(!__pyx_v_element))); + + /* "apache_beam/transforms/cy_combiners.py":355 + * self.value = True + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value &= not not element + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 355, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 355, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 355, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, int __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":358 + * self.value &= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value &= accumulator.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":359 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value &= accumulator.value + * +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 359, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 359, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator))))) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":360 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.value &= accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->value = (__pyx_v_self->value & __pyx_v_accumulator->value); + + /* "apache_beam/transforms/cy_combiners.py":359 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value &= accumulator.value + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":358 + * self.value &= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value &= accumulator.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 358, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 358, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 358, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 358, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 358, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 358, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":362 + * self.value &= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":363 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":362 + * self.value &= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":99 + * + * cdef class AllAccumulator(object): + * cdef readonly bint value # <<<<<<<<<<<<<< + * cpdef add_input(self, bint element) + * @cython.locals(accumulator=AllAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AllAccumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AllAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AllAccumulator); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AllAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AllAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AllAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AllAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AllAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":367 + * + * class AnyAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = False + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_combiners.py":368 + * class AnyAccumulator(object): + * def __init__(self): + * self.value = False # <<<<<<<<<<<<<< + * + * def add_input(self, element): +*/ + __pyx_v_self->value = 0; + + /* "apache_beam/transforms/cy_combiners.py":367 + * + * class AnyAccumulator(object): + * def __init__(self): # <<<<<<<<<<<<<< + * self.value = False + * +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":370 + * self.value = False + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value |= not not element + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, int __pyx_v_element, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":371 + * + * def add_input(self, element): + * self.value |= not not element # <<<<<<<<<<<<<< + * + * def merge(self, accumulators): +*/ + __pyx_v_self->value = (__pyx_v_self->value | (!(!__pyx_v_element))); + + /* "apache_beam/transforms/cy_combiners.py":370 + * self.value = False + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value |= not not element + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 370, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 370, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 370, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 370, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 370, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 370, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 370, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_2add_input(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_2add_input(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, int __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":373 + * self.value |= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value |= accumulator.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_accumulator = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":374 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value |= accumulator.value + * +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 374, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 374, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 374, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator))))) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_accumulator, ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":375 + * def merge(self, accumulators): + * for accumulator in accumulators: + * self.value |= accumulator.value # <<<<<<<<<<<<<< + * + * def extract_output(self): +*/ + __pyx_v_self->value = (__pyx_v_self->value | __pyx_v_accumulator->value); + + /* "apache_beam/transforms/cy_combiners.py":374 + * + * def merge(self, accumulators): + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * self.value |= accumulator.value + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":373 + * self.value |= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value |= accumulator.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 373, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 373, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 373, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 373, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 373, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 373, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_4merge(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_4merge(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":377 + * self.value |= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_6extract_output(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_6extract_output(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/cy_combiners.py":378 + * + * def extract_output(self): + * return self.value # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":377 + * self.value |= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":106 + * + * cdef class AnyAccumulator(object): + * cdef readonly bint value # <<<<<<<<<<<<<< + * cpdef add_input(self, bint element) + * @cython.locals(accumulator=AnyAccumulator) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_8__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_8__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.value,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__dict = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_4 = (__pyx_v__dict != Py_None); + if (__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.value,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AnyAccumulator); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, None), state + * else: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AnyAccumulator__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AnyAccumulator); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_215229444); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_215229444); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_215229444) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AnyAccumulator__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_10__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_10__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AnyAccumulator__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AnyAccumulator__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AnyAccumulator__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.AnyAccumulator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":408 + * 'value', '_less_than_fn', '_comparable_value', 'requires_hydration') + * + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): # <<<<<<<<<<<<<< + * self.value = value + * self.hydrate(less_than_fn, key_fn) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_less_than_fn = 0; + PyObject *__pyx_v_key_fn = 0; + PyObject *__pyx_v__requires_hydration = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_less_than_fn,&__pyx_mstate_global->__pyx_n_u_key_fn,&__pyx_mstate_global->__pyx_n_u_requires_hydration,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 408, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 408, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 408, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 408, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 408, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 408, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 408, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 408, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 408, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 408, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 408, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_value = values[0]; + __pyx_v_less_than_fn = values[1]; + __pyx_v_key_fn = values[2]; + __pyx_v__requires_hydration = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 408, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue___init__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self), __pyx_v_value, __pyx_v_less_than_fn, __pyx_v_key_fn, __pyx_v__requires_hydration); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue___init__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn, PyObject *__pyx_v__requires_hydration) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/cy_combiners.py":409 + * + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): + * self.value = value # <<<<<<<<<<<<<< + * self.hydrate(less_than_fn, key_fn) + * self.requires_hydration = _requires_hydration +*/ + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = __pyx_v_value; + + /* "apache_beam/transforms/cy_combiners.py":410 + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): + * self.value = value + * self.hydrate(less_than_fn, key_fn) # <<<<<<<<<<<<<< + * self.requires_hydration = _requires_hydration + * +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self->__pyx_vtab)->hydrate(__pyx_v_self, __pyx_v_less_than_fn, __pyx_v_key_fn, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":411 + * self.value = value + * self.hydrate(less_than_fn, key_fn) + * self.requires_hydration = _requires_hydration # <<<<<<<<<<<<<< + * + * def hydrate(self, less_than_fn, key_fn): +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__requires_hydration); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_v_self->requires_hydration = __pyx_t_2; + + /* "apache_beam/transforms/cy_combiners.py":408 + * 'value', '_less_than_fn', '_comparable_value', 'requires_hydration') + * + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): # <<<<<<<<<<<<<< + * self.value = value + * self.hydrate(less_than_fn, key_fn) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":413 + * self.requires_hydration = _requires_hydration + * + * def hydrate(self, less_than_fn, key_fn): # <<<<<<<<<<<<<< + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt + * self._comparable_value = key_fn(self.value) if key_fn else self.value +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners_15ComparableValue_hydrate(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("hydrate", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_hydrate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_less_than_fn, __pyx_v_key_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_combiners.py":414 + * + * def hydrate(self, less_than_fn, key_fn): + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt # <<<<<<<<<<<<<< + * self._comparable_value = key_fn(self.value) if key_fn else self.value + * self.requires_hydration = False +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_less_than_fn); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 414, __pyx_L1_error) + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_v_less_than_fn); + __pyx_t_1 = __pyx_v_less_than_fn; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_operator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_less_than_fn); + __Pyx_DECREF(__pyx_v_self->_less_than_fn); + __pyx_v_self->_less_than_fn = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":415 + * def hydrate(self, less_than_fn, key_fn): + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt + * self._comparable_value = key_fn(self.value) if key_fn else self.value # <<<<<<<<<<<<<< + * self.requires_hydration = False + * +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_key_fn); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 415, __pyx_L1_error) + if (__pyx_t_6) { + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_key_fn); + __pyx_t_3 = __pyx_v_key_fn; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->value}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_v_self->value); + __pyx_t_1 = __pyx_v_self->value; + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_comparable_value); + __Pyx_DECREF(__pyx_v_self->_comparable_value); + __pyx_v_self->_comparable_value = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_combiners.py":416 + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt + * self._comparable_value = key_fn(self.value) if key_fn else self.value + * self.requires_hydration = False # <<<<<<<<<<<<<< + * + * def __lt__(self, other): +*/ + __pyx_v_self->requires_hydration = 0; + + /* "apache_beam/transforms/cy_combiners.py":413 + * self.requires_hydration = _requires_hydration + * + * def hydrate(self, less_than_fn, key_fn): # <<<<<<<<<<<<<< + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt + * self._comparable_value = key_fn(self.value) if key_fn else self.value +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.hydrate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate = {"hydrate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_less_than_fn = 0; + PyObject *__pyx_v_key_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("hydrate (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_less_than_fn,&__pyx_mstate_global->__pyx_n_u_key_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 413, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "hydrate", 0) < (0)) __PYX_ERR(0, 413, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("hydrate", 1, 2, 2, i); __PYX_ERR(0, 413, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error) + } + __pyx_v_less_than_fn = values[0]; + __pyx_v_key_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("hydrate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 413, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.hydrate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_2hydrate(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self), __pyx_v_less_than_fn, __pyx_v_key_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_2hydrate(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_less_than_fn, PyObject *__pyx_v_key_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("hydrate", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_12cy_combiners_15ComparableValue_hydrate(__pyx_v_self, __pyx_v_less_than_fn, __pyx_v_key_fn, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.hydrate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":418 + * self.requires_hydration = False + * + * def __lt__(self, other): # <<<<<<<<<<<<<< + * assert not self.requires_hydration + * assert self._less_than_fn is other._less_than_fn +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__lt__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_4__lt__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_4__lt__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__lt__", 0); + + /* "apache_beam/transforms/cy_combiners.py":419 + * + * def __lt__(self, other): + * assert not self.requires_hydration # <<<<<<<<<<<<<< + * assert self._less_than_fn is other._less_than_fn + * return self._less_than_fn(self._comparable_value, other._comparable_value) +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (!__pyx_v_self->requires_hydration); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 419, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 419, __pyx_L1_error) + #endif + + /* "apache_beam/transforms/cy_combiners.py":420 + * def __lt__(self, other): + * assert not self.requires_hydration + * assert self._less_than_fn is other._less_than_fn # <<<<<<<<<<<<<< + * return self._less_than_fn(self._comparable_value, other._comparable_value) + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_less_than_fn_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = (__pyx_v_self->_less_than_fn == __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 420, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 420, __pyx_L1_error) + #endif + + /* "apache_beam/transforms/cy_combiners.py":421 + * assert not self.requires_hydration + * assert self._less_than_fn is other._less_than_fn + * return self._less_than_fn(self._comparable_value, other._comparable_value) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->_less_than_fn); + __pyx_t_4 = __pyx_v_self->_less_than_fn; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_comparable_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self->_comparable_value, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":418 + * self.requires_hydration = False + * + * def __lt__(self, other): # <<<<<<<<<<<<<< + * assert not self.requires_hydration + * assert self._less_than_fn is other._less_than_fn +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":423 + * return self._less_than_fn(self._comparable_value, other._comparable_value) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'ComparableValue[%s]' % str(self.value) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_7__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_6__repr__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_6__repr__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/transforms/cy_combiners.py":424 + * + * def __repr__(self): + * return 'ComparableValue[%s]' % str(self.value) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_ComparableValue_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":423 + * return self._less_than_fn(self._comparable_value, other._comparable_value) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return 'ComparableValue[%s]' % str(self.value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.py":426 + * return 'ComparableValue[%s]' % str(self.value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * # Since we can't pickle the Compare and Key Fn we pass None and we signify + * # that this object _requires_hydration. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_8__reduce__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_8__reduce__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/transforms/cy_combiners.py":429 + * # Since we can't pickle the Compare and Key Fn we pass None and we signify + * # that this object _requires_hydration. + * return ComparableValue, (self.value, None, None, True) # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->value); + __Pyx_GIVEREF(__pyx_v_self->value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->value) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_True) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue); + __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue)) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 429, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_combiners.py":426 + * return 'ComparableValue[%s]' % str(self.value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * # Since we can't pickle the Compare and Key Fn we pass None and we signify + * # that this object _requires_hydration. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":113 + * + * cdef class ComparableValue(object): + * cdef readonly object value, _less_than_fn, _comparable_value # <<<<<<<<<<<<<< + * cdef readonly bint requires_hydration + * cpdef hydrate(self, object less_than_fn, object key_fn) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_less_than_fn); + __pyx_r = __pyx_v_self->_less_than_fn; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_comparable_value); + __pyx_r = __pyx_v_self->_comparable_value; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_combiners.pxd":114 + * cdef class ComparableValue(object): + * cdef readonly object value, _less_than_fn, _comparable_value + * cdef readonly bint requires_hydration # <<<<<<<<<<<<<< + * cpdef hydrate(self, object less_than_fn, object key_fn) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration___get__(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration___get__(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->requires_hydration); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.ComparableValue.requires_hydration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CountAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_1__pyx_unpickle_CountAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_1__pyx_unpickle_CountAccumulator = {"__pyx_unpickle_CountAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_1__pyx_unpickle_CountAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_1__pyx_unpickle_CountAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CountAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_CountAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CountAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CountAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_CountAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CountAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_CountAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = CountAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = CountAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = CountAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = CountAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = CountAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CountAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_CountAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_CountAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_CountAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_CountAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CountAccumulator__set_state(CountAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_CountAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_3__pyx_unpickle_SumInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_3__pyx_unpickle_SumInt64Accumulator = {"__pyx_unpickle_SumInt64Accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_3__pyx_unpickle_SumInt64Accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_3__pyx_unpickle_SumInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SumInt64Accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SumInt64Accumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumInt64Accumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumInt64Accumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_2__pyx_unpickle_SumInt64Accumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_2__pyx_unpickle_SumInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumInt64Accumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SumInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = SumInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumInt64Accumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SumInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumInt64Accumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumInt64Accumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SumInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumInt64Accumulator__set_state(SumInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumInt64Accumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MinInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_5__pyx_unpickle_MinInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_5__pyx_unpickle_MinInt64Accumulator = {"__pyx_unpickle_MinInt64Accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_5__pyx_unpickle_MinInt64Accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_5__pyx_unpickle_MinInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MinInt64Accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MinInt64Accumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MinInt64Accumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MinInt64Accumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_4__pyx_unpickle_MinInt64Accumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_4__pyx_unpickle_MinInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MinInt64Accumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MinInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = MinInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinInt64Accumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MinInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinInt64Accumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MinInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MinInt64Accumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MinInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MinInt64Accumulator__set_state(MinInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinInt64Accumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MaxInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_7__pyx_unpickle_MaxInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_7__pyx_unpickle_MaxInt64Accumulator = {"__pyx_unpickle_MaxInt64Accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_7__pyx_unpickle_MaxInt64Accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_7__pyx_unpickle_MaxInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxInt64Accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MaxInt64Accumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MaxInt64Accumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MaxInt64Accumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_6__pyx_unpickle_MaxInt64Accumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_6__pyx_unpickle_MaxInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxInt64Accumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MaxInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = MaxInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxInt64Accumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MaxInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxInt64Accumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MaxInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxInt64Accumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MaxInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MaxInt64Accumulator__set_state(MaxInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxInt64Accumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MeanInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_9__pyx_unpickle_MeanInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_9__pyx_unpickle_MeanInt64Accumulator = {"__pyx_unpickle_MeanInt64Accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_9__pyx_unpickle_MeanInt64Accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_9__pyx_unpickle_MeanInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanInt64Accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MeanInt64Accumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MeanInt64Accumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MeanInt64Accumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_8__pyx_unpickle_MeanInt64Accumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_8__pyx_unpickle_MeanInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanInt64Accumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MeanInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') # <<<<<<<<<<<<<< + * __pyx_result = MeanInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, __pyx_k_count_sum); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanInt64Accumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MeanInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanInt64Accumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MeanInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanInt64Accumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->count = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->sum = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MeanInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MeanInt64Accumulator__set_state(MeanInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanInt64Accumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DistributionInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_11__pyx_unpickle_DistributionInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_11__pyx_unpickle_DistributionInt64Accumulator = {"__pyx_unpickle_DistributionInt64Accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_11__pyx_unpickle_DistributionInt64Accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_11__pyx_unpickle_DistributionInt64Accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionInt64Accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_DistributionInt64Accumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DistributionInt64Accumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DistributionInt64Accumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_DistributionInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_10__pyx_unpickle_DistributionInt64Accumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_10__pyx_unpickle_DistributionInt64Accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionInt64Accumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_DistributionInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') # <<<<<<<<<<<<<< + * __pyx_result = DistributionInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, __pyx_k_count_max_min_sum); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionInt64Accumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = DistributionInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_DistributionInt64Accumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') + * __pyx_result = DistributionInt64Accumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_DistributionInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x10dc101, 0xaa19fd0, 0x19e1f6a, b'count, max, min, sum') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_DistributionInt64Accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_DistributionInt64Accumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_DistributionInt64Accumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->count = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->max = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->min = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->sum = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_DistributionInt64Accumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_DistributionInt64Accumulator__set_state(DistributionInt64Accumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.max = __pyx_state[1]; __pyx_result.min = __pyx_state[2]; __pyx_result.sum = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_DistributionInt64Accumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_13__pyx_unpickle_SumDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_13__pyx_unpickle_SumDoubleAccumulator = {"__pyx_unpickle_SumDoubleAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_13__pyx_unpickle_SumDoubleAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_13__pyx_unpickle_SumDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_SumDoubleAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_SumDoubleAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumDoubleAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SumDoubleAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_12__pyx_unpickle_SumDoubleAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_12__pyx_unpickle_SumDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumDoubleAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_SumDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = SumDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumDoubleAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = SumDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumDoubleAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = SumDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_SumDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + double __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_SumDoubleAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_SumDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_SumDoubleAccumulator__set_state(SumDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_SumDoubleAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MinDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15__pyx_unpickle_MinDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_15__pyx_unpickle_MinDoubleAccumulator = {"__pyx_unpickle_MinDoubleAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15__pyx_unpickle_MinDoubleAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_15__pyx_unpickle_MinDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MinDoubleAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MinDoubleAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MinDoubleAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MinDoubleAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_14__pyx_unpickle_MinDoubleAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_14__pyx_unpickle_MinDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MinDoubleAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MinDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = MinDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinDoubleAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MinDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinDoubleAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MinDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MinDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MinDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + double __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MinDoubleAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MinDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MinDoubleAccumulator__set_state(MinDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MinDoubleAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MaxDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_17__pyx_unpickle_MaxDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_17__pyx_unpickle_MaxDoubleAccumulator = {"__pyx_unpickle_MaxDoubleAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_17__pyx_unpickle_MaxDoubleAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_17__pyx_unpickle_MaxDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxDoubleAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MaxDoubleAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MaxDoubleAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MaxDoubleAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_16__pyx_unpickle_MaxDoubleAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_16__pyx_unpickle_MaxDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxDoubleAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MaxDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = MaxDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxDoubleAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MaxDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxDoubleAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = MaxDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MaxDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MaxDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + double __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MaxDoubleAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MaxDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MaxDoubleAccumulator__set_state(MaxDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MaxDoubleAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MeanDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19__pyx_unpickle_MeanDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_19__pyx_unpickle_MeanDoubleAccumulator = {"__pyx_unpickle_MeanDoubleAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19__pyx_unpickle_MeanDoubleAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_19__pyx_unpickle_MeanDoubleAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanDoubleAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_MeanDoubleAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MeanDoubleAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MeanDoubleAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_18__pyx_unpickle_MeanDoubleAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_18__pyx_unpickle_MeanDoubleAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanDoubleAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_MeanDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') # <<<<<<<<<<<<<< + * __pyx_result = MeanDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, __pyx_k_count_sum); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanDoubleAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = MeanDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanDoubleAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') + * __pyx_result = MeanDoubleAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MeanDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanDoubleAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_MeanDoubleAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + double __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_MeanDoubleAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->count = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->sum = __pyx_t_3; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_MeanDoubleAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_MeanDoubleAccumulator__set_state(MeanDoubleAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.count = __pyx_state[0]; __pyx_result.sum = __pyx_state[1] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_MeanDoubleAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AllAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21__pyx_unpickle_AllAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_21__pyx_unpickle_AllAccumulator = {"__pyx_unpickle_AllAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21__pyx_unpickle_AllAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_21__pyx_unpickle_AllAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_AllAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_AllAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AllAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AllAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AllAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_20__pyx_unpickle_AllAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_20__pyx_unpickle_AllAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AllAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_AllAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = AllAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AllAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AllAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = AllAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AllAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AllAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AllAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AllAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AllAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AllAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_AllAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AllAccumulator__set_state(AllAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AllAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AnyAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_23__pyx_unpickle_AnyAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_12cy_combiners_23__pyx_unpickle_AnyAccumulator = {"__pyx_unpickle_AnyAccumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_23__pyx_unpickle_AnyAccumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_12cy_combiners_23__pyx_unpickle_AnyAccumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_AnyAccumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_AnyAccumulator", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyAccumulator", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyAccumulator", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AnyAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_12cy_combiners_22__pyx_unpickle_AnyAccumulator(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_12cy_combiners_22__pyx_unpickle_AnyAccumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AnyAccumulator", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_AnyAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') # <<<<<<<<<<<<<< + * __pyx_result = AnyAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, __pyx_k_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AnyAccumulator.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AnyAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = AnyAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AnyAccumulator__set_state(((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') + * __pyx_result = AnyAccumulator.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AnyAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AnyAccumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_12cy_combiners___pyx_unpickle_AnyAccumulator__set_state(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AnyAccumulator__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->value = __pyx_t_2; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_AnyAccumulator__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AnyAccumulator__set_state(AnyAccumulator __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result.value = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners.__pyx_unpickle_AnyAccumulator__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_CountAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_CountAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_CountAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_CountAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_CountAccumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_CountAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_CountAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_CountAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_CountAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_CountAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator_spec = { + "apache_beam.transforms.cy_combiners.CountAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""CountAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_CountAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_CountAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_CountAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_CountAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator_spec = { + "apache_beam.transforms.cy_combiners.SumInt64Accumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""SumInt64Accumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator_spec = { + "apache_beam.transforms.cy_combiners.MinInt64Accumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MinInt64Accumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator_spec = { + "apache_beam.transforms.cy_combiners.MaxInt64Accumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MaxInt64Accumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_sum(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3sum_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5count_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator[] = { + {"sum", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_sum, 0, 0, 0}, + {"count", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_count, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator_spec = { + "apache_beam.transforms.cy_combiners.MeanInt64Accumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MeanInt64Accumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_sum(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3sum_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5count_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_min(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3min_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_max(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3max_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator[] = { + {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator[] = { + {"sum", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_sum, 0, 0, 0}, + {"count", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_count, 0, 0, 0}, + {"min", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_min, 0, 0, 0}, + {"max", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_max, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator_spec = { + "apache_beam.transforms.cy_combiners.DistributionInt64Accumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""DistributionInt64Accumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator_spec = { + "apache_beam.transforms.cy_combiners.SumDoubleAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""SumDoubleAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator_spec = { + "apache_beam.transforms.cy_combiners.MinDoubleAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MinDoubleAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator_spec = { + "apache_beam.transforms.cy_combiners.MaxDoubleAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MaxDoubleAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_sum(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3sum_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5count_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator[] = { + {"sum", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_sum, 0, 0, 0}, + {"count", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_count, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator_spec = { + "apache_beam.transforms.cy_combiners.MeanDoubleAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""MeanDoubleAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AllAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AllAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AllAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AllAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_AllAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_AllAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AllAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_AllAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_AllAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AllAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator_spec = { + "apache_beam.transforms.cy_combiners.AllAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""AllAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AllAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_AllAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_AllAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AllAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_AnyAccumulator __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AnyAccumulator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AnyAccumulator(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5value_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_AnyAccumulator[] = { + {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_AnyAccumulator[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_value, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AnyAccumulator}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_AnyAccumulator}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_AnyAccumulator}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AnyAccumulator}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator_spec = { + "apache_beam.transforms.cy_combiners.AnyAccumulator", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""AnyAccumulator", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_12cy_combiners_ComparableValue __pyx_vtable_11apache_beam_10transforms_12cy_combiners_ComparableValue; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_ComparableValue; + p->value = Py_None; Py_INCREF(Py_None); + p->_less_than_fn = Py_None; Py_INCREF(Py_None); + p->_comparable_value = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *p = (struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_ComparableValue) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->value); + Py_CLEAR(p->_less_than_fn); + Py_CLEAR(p->_comparable_value); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *p = (struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + if (p->_less_than_fn) { + e = (*v)(p->_less_than_fn, a); if (e) return e; + } + if (p->_comparable_value) { + e = (*v)(p->_comparable_value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *p = (struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *)o; + tmp = ((PyObject*)p->value); + p->value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_less_than_fn); + p->_less_than_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_comparable_value); + p->_comparable_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_10transforms_12cy_combiners_ComparableValue(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_LT: { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5__lt__(o1, o2); + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_5value_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue__less_than_fn(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_13_less_than_fn_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue__comparable_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_17_comparable_value_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue_requires_hydration(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_18requires_hydration_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_12cy_combiners_ComparableValue[] = { + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_12cy_combiners_ComparableValue[] = { + {"value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue_value, 0, 0, 0}, + {"_less_than_fn", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue__less_than_fn, 0, 0, 0}, + {"_comparable_value", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue__comparable_value, 0, 0, 0}, + {"requires_hydration", __pyx_getprop_11apache_beam_10transforms_12cy_combiners_15ComparableValue_requires_hydration, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_7__repr__}, + {Py_tp_doc, (void *)PyDoc_STR("A way to allow comparing elements in a rich fashion.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_12cy_combiners_ComparableValue}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue_spec = { + "apache_beam.transforms.cy_combiners.ComparableValue", + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_combiners.""ComparableValue", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_7__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A way to allow comparing elements in a rich fashion."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_12cy_combiners_15ComparableValue_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_12cy_combiners_ComparableValue, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_double__NAN__NEG_INF__POS_INF); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 9; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_10transforms_12cy_combiners__NAN, (void *)&__pyx_v_11apache_beam_10transforms_12cy_combiners__NEG_INF, (void *)&__pyx_v_11apache_beam_10transforms_12cy_combiners__POS_INF, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_CountAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_CountAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_CountAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_CountAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator)) __PYX_ERR(0, 68, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_CountAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CountAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator)) __PYX_ERR(0, 86, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator)) __PYX_ERR(0, 116, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator) < (0)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator)) __PYX_ERR(0, 139, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator)) __PYX_ERR(0, 162, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *, double, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator)) __PYX_ERR(0, 264, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *, double, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator)) __PYX_ERR(0, 280, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator) < (0)) __PYX_ERR(0, 280, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *, double, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator)) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *, double, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator)) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AllAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AllAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AllAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AllAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator)) __PYX_ERR(0, 351, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_AllAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AllAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AnyAccumulator = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AnyAccumulator.add_input = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_add_input; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_AnyAccumulator.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_AnyAccumulator *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator)) __PYX_ERR(0, 366, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator = &__pyx_type_11apache_beam_10transforms_12cy_combiners_AnyAccumulator; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AnyAccumulator, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_ComparableValue = &__pyx_vtable_11apache_beam_10transforms_12cy_combiners_ComparableValue; + __pyx_vtable_11apache_beam_10transforms_12cy_combiners_ComparableValue.hydrate = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_12cy_combiners_ComparableValue *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_12cy_combiners_15ComparableValue_hydrate; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue)) __PYX_ERR(0, 402, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue) < (0)) __PYX_ERR(0, 402, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue = &__pyx_type_11apache_beam_10transforms_12cy_combiners_ComparableValue; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue) < (0)) __PYX_ERR(0, 402, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue, __pyx_vtabptr_11apache_beam_10transforms_12cy_combiners_ComparableValue) < (0)) __PYX_ERR(0, 402, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue) < (0)) __PYX_ERR(0, 402, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ComparableValue, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue) < (0)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cy_combiners(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cy_combiners}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cy_combiners", + __pyx_k_A_library_of_basic_cythonized_Co, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cy_combiners(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cy_combiners(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cy_combiners(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + size_t __pyx_t_13; + double __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cy_combiners' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cy_combiners" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_cy_combiners", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__transforms__cy_combiners) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.transforms.cy_combiners")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.transforms.cy_combiners", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/transforms/cy_combiners.py":25 + * # pytype: skip-file + * + * import operator # <<<<<<<<<<<<<< + * + * from apache_beam.transforms import core +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_operator, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_operator, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":27 + * import operator + * + * from apache_beam.transforms import core # <<<<<<<<<<<<<< + * + * try: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":29 + * from apache_beam.transforms import core + * + * try: # <<<<<<<<<<<<<< + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter + * except ImportError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "apache_beam/transforms/cy_combiners.py":30 + * + * try: + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter # <<<<<<<<<<<<<< + * except ImportError: + * from apache_beam.transforms.py_dataflow_distribution_counter import DataflowDistributionCounter +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter}; + __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30, __pyx_L2_error) + } + __pyx_t_2 = __pyx_t_7; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L2_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":29 + * from apache_beam.transforms import core + * + * try: # <<<<<<<<<<<<<< + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter + * except ImportError: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":31 + * try: + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter + * except ImportError: # <<<<<<<<<<<<<< + * from apache_beam.transforms.py_dataflow_distribution_counter import DataflowDistributionCounter + * +*/ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); + if (__pyx_t_8) { + __Pyx_AddTraceback("apache_beam.transforms.cy_combiners", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 31, __pyx_L4_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_9); + + /* "apache_beam/transforms/cy_combiners.py":32 + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter + * except ImportError: + * from apache_beam.transforms.py_dataflow_distribution_counter import DataflowDistributionCounter # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter}; + __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_py_datafl, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32, __pyx_L4_except_error) + } + __pyx_t_10 = __pyx_t_7; + __Pyx_GOTREF(__pyx_t_10); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter}; + __pyx_t_3 = 0; { + __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_10, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 32, __pyx_L4_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_11) < (0)) __PYX_ERR(0, 32, __pyx_L4_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L3_exception_handled; + } + goto __pyx_L4_except_error; + + /* "apache_beam/transforms/cy_combiners.py":29 + * from apache_beam.transforms import core + * + * try: # <<<<<<<<<<<<<< + * from apache_beam.transforms.cy_dataflow_distribution_counter import DataflowDistributionCounter + * except ImportError: +*/ + __pyx_L4_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); + goto __pyx_L1_error; + __pyx_L3_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); + __pyx_L7_try_end:; + } + + /* "apache_beam/transforms/cy_combiners.py":35 + * + * + * class AccumulatorCombineFn(core.CombineFn): # <<<<<<<<<<<<<< + * # singleton? + * def create_accumulator(self): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_core); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 35, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":37 + * class AccumulatorCombineFn(core.CombineFn): + * # singleton? + * def create_accumulator(self): # <<<<<<<<<<<<<< + * return self._accumulator_type() + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_1create_accumulator, 0, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn_create_accu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_t_9) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":40 + * return self._accumulator_type() + * + * @staticmethod # <<<<<<<<<<<<<< + * def add_input(accumulator, element): + * accumulator.add_input(element) +*/ + __pyx_t_11 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_3add_input, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":45 + * return accumulator + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * accumulator = self._accumulator_type() + * accumulator.merge(accumulators) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_5merge_accumulators, 0, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn_merge_accum, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_merge_accumulators, __pyx_t_9) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":50 + * return accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.extract_output() +*/ + __pyx_t_12 = NULL; + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_7extract_output, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn_extract_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); + #endif + __pyx_t_13 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_9) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":54 + * return accumulator.extract_output() + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, AccumulatorCombineFn) and +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_9__eq__, 0, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn___eq, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_9) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":59 + * self._accumulator_type is other._accumulator_type) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._accumulator_type) + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20AccumulatorCombineFn_11__hash__, 0, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn___hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_9) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":35 + * + * + * class AccumulatorCombineFn(core.CombineFn): # <<<<<<<<<<<<<< + * # singleton? + * def create_accumulator(self): +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn, __pyx_t_9) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":63 + * + * + * _63 = 63 # Avoid large literals in C source code. # <<<<<<<<<<<<<< + * globals()['INT64_MAX'] = 2**_63 - 1 + * globals()['INT64_MIN'] = -2**_63 +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_63, __pyx_mstate_global->__pyx_int_63) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":64 + * + * _63 = 63 # Avoid large literals in C source code. + * globals()['INT64_MAX'] = 2**_63 - 1 # <<<<<<<<<<<<<< + * globals()['INT64_MIN'] = -2**_63 + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_63); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyNumber_PowerOf2(__pyx_mstate_global->__pyx_int_2, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_INT64_MAX, __pyx_t_4) < 0))) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":65 + * _63 = 63 # Avoid large literals in C source code. + * globals()['INT64_MAX'] = 2**_63 - 1 + * globals()['INT64_MIN'] = -2**_63 # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_63); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyNumber_PowerOf2(__pyx_mstate_global->__pyx_int_2, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_INT64_MIN, __pyx_t_4) < 0))) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":72 + * self.value = 0 + * + * def add_input(self, unused_element): # <<<<<<<<<<<<<< + * self.value += 1 + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":75 + * self.value += 1 + * + * def add_input_n(self, unused_element, n): # <<<<<<<<<<<<<< + * self.value += n + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator_add_input_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":78 + * self.value += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":82 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator_extract_output, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CountAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CountAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_16CountAccumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CountAccumulator___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":90 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":97 + * self.value += element + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * global INT64_MAX, INT64_MIN # pylint: disable=global-variable-not-assigned + * element = int(element) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator_add_input_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":104 + * self.value += element * n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":108 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.value <= INT64_MAX: + * self.value %= 2**64 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator_extract_outp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumInt64Accumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19SumInt64Accumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumInt64Accumulator___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":120 + * self.value = INT64_MAX + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":127 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator_add_input_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":130 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":135 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator_extract_outp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinInt64Accumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MinInt64Accumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinInt64Accumulator___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":143 + * self.value = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":150 + * self.value = element + * + * def add_input_n(self, element, unused_n): # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator_add_input_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":153 + * self.add_input(element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":158 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator_extract_outp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxInt64Accumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxInt64Accumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19MaxInt64Accumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxInt64Accumulator___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":167 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":174 + * self.count += 1 + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator_add_input_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":181 + * self.count += n + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":186 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator_extract_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanInt64Accumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanInt64Accumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MeanInt64Accumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanInt64Accumulator___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":201 + * self.max = INT64_MIN + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":210 + * self.max = max(self.max, element) + * + * def add_input_n(self, element, n): # <<<<<<<<<<<<<< + * element = int(element) + * if not INT64_MIN <= element <= INT64_MAX: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_5add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator_add_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_4) < (0)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":219 + * self.max = max(self.max, element) + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_7merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator_mer, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":226 + * self.max = max(self.max, accumulator.max) + * + * def extract_output(self): # <<<<<<<<<<<<<< + * if not INT64_MIN <= self.sum <= INT64_MAX: + * self.sum %= 2**64 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_9extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator_ext, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator___r, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_DistributionInt64Accumulator, (type(self), 0x10dc101, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_DistributionInt64Accumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_28DistributionInt64Accumulator_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DistributionInt64Accumulator___s, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":235 + * + * + * class CountCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = CountAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_CountCombineFn, __pyx_mstate_global->__pyx_n_u_CountCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 235, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":236 + * + * class CountCombineFn(AccumulatorCombineFn): + * _accumulator_type = CountAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_CountAccumulator)) < (0)) __PYX_ERR(0, 236, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":235 + * + * + * class CountCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = CountAccumulator + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CountCombineFn, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CountCombineFn, __pyx_t_2) < (0)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":239 + * + * + * class SumInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = SumInt64Accumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_SumInt64Fn, __pyx_mstate_global->__pyx_n_u_SumInt64Fn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 239, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/transforms/cy_combiners.py":240 + * + * class SumInt64Fn(AccumulatorCombineFn): + * _accumulator_type = SumInt64Accumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumInt64Accumulator)) < (0)) __PYX_ERR(0, 240, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":239 + * + * + * class SumInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = SumInt64Accumulator + * +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SumInt64Fn, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SumInt64Fn, __pyx_t_10) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":243 + * + * + * class MinInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MinInt64Accumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MinInt64Fn, __pyx_mstate_global->__pyx_n_u_MinInt64Fn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 243, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":244 + * + * class MinInt64Fn(AccumulatorCombineFn): + * _accumulator_type = MinInt64Accumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinInt64Accumulator)) < (0)) __PYX_ERR(0, 244, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":243 + * + * + * class MinInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MinInt64Accumulator + * +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinInt64Fn, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinInt64Fn, __pyx_t_9) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":247 + * + * + * class MaxInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MaxInt64Accumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxInt64Fn, __pyx_mstate_global->__pyx_n_u_MaxInt64Fn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 247, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":248 + * + * class MaxInt64Fn(AccumulatorCombineFn): + * _accumulator_type = MaxInt64Accumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxInt64Accumulator)) < (0)) __PYX_ERR(0, 248, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":247 + * + * + * class MaxInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MaxInt64Accumulator + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_MaxInt64Fn, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxInt64Fn, __pyx_t_2) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":251 + * + * + * class MeanInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MeanInt64Accumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MeanInt64Fn, __pyx_mstate_global->__pyx_n_u_MeanInt64Fn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 251, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/transforms/cy_combiners.py":252 + * + * class MeanInt64Fn(AccumulatorCombineFn): + * _accumulator_type = MeanInt64Accumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanInt64Accumulator)) < (0)) __PYX_ERR(0, 252, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":251 + * + * + * class MeanInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MeanInt64Accumulator + * +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_MeanInt64Fn, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MeanInt64Fn, __pyx_t_10) < (0)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":255 + * + * + * class DistributionInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = DistributionInt64Accumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_DistributionInt64Fn, __pyx_mstate_global->__pyx_n_u_DistributionInt64Fn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 255, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":256 + * + * class DistributionInt64Fn(AccumulatorCombineFn): + * _accumulator_type = DistributionInt64Accumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_DistributionInt64Accumulator)) < (0)) __PYX_ERR(0, 256, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":255 + * + * + * class DistributionInt64Fn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = DistributionInt64Accumulator + * +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DistributionInt64Fn, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DistributionInt64Fn, __pyx_t_9) < (0)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":259 + * + * + * _POS_INF = float('inf') # <<<<<<<<<<<<<< + * _NEG_INF = float('-inf') + * _NAN = float('nan') +*/ + __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_mstate_global->__pyx_n_u_inf); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_14, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_v_11apache_beam_10transforms_12cy_combiners__POS_INF = __pyx_t_14; + + /* "apache_beam/transforms/cy_combiners.py":260 + * + * _POS_INF = float('inf') + * _NEG_INF = float('-inf') # <<<<<<<<<<<<<< + * _NAN = float('nan') + * +*/ + __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_mstate_global->__pyx_kp_u_inf_2); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_14, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_v_11apache_beam_10transforms_12cy_combiners__NEG_INF = __pyx_t_14; + + /* "apache_beam/transforms/cy_combiners.py":261 + * _POS_INF = float('inf') + * _NEG_INF = float('-inf') + * _NAN = float('nan') # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_mstate_global->__pyx_n_u_nan); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_14, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_v_11apache_beam_10transforms_12cy_combiners__NAN = __pyx_t_14; + + /* "apache_beam/transforms/cy_combiners.py":268 + * self.value = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.value += element +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":272 + * self.value += element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value += accumulator.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":276 + * self.value += accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator_extract_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_SumDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_SumDoubleAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20SumDoubleAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_SumDoubleAccumulator___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":284 + * self.value = _POS_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element < self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":289 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value < self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":294 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator_extract_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MinDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MinDoubleAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MinDoubleAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MinDoubleAccumulator___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":302 + * self.value = _NEG_INF + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * if element > self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 302, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":307 + * self.value = element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.value > self.value: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":312 + * self.value = accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator_extract_out, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MaxDoubleAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MaxDoubleAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_20MaxDoubleAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MaxDoubleAccumulator___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":321 + * self.count = 0 + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * element = float(element) + * self.sum += element +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":326 + * self.count += 1 + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.sum += accumulator.sum +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":331 + * self.count += accumulator.count + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.sum // self.count if self.count else _NAN + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator_extract_ou, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator___reduce_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_MeanDoubleAccumulator, (type(self), 0x17b9580, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_MeanDoubleAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21MeanDoubleAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MeanDoubleAccumulator___setstate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":335 + * + * + * class SumFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = SumDoubleAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_SumFloatFn, __pyx_mstate_global->__pyx_n_u_SumFloatFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 335, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":336 + * + * class SumFloatFn(AccumulatorCombineFn): + * _accumulator_type = SumDoubleAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_SumDoubleAccumulator)) < (0)) __PYX_ERR(0, 336, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":335 + * + * + * class SumFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = SumDoubleAccumulator + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_SumFloatFn, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SumFloatFn, __pyx_t_2) < (0)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":339 + * + * + * class MinFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MinDoubleAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MinFloatFn, __pyx_mstate_global->__pyx_n_u_MinFloatFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 339, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/transforms/cy_combiners.py":340 + * + * class MinFloatFn(AccumulatorCombineFn): + * _accumulator_type = MinDoubleAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MinDoubleAccumulator)) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":339 + * + * + * class MinFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MinDoubleAccumulator + * +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_MinFloatFn, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinFloatFn, __pyx_t_10) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":343 + * + * + * class MaxFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MaxDoubleAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxFloatFn, __pyx_mstate_global->__pyx_n_u_MaxFloatFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 343, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":344 + * + * class MaxFloatFn(AccumulatorCombineFn): + * _accumulator_type = MaxDoubleAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MaxDoubleAccumulator)) < (0)) __PYX_ERR(0, 344, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":343 + * + * + * class MaxFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MaxDoubleAccumulator + * +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxFloatFn, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxFloatFn, __pyx_t_9) < (0)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":347 + * + * + * class MeanFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MeanDoubleAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MeanFloatFn, __pyx_mstate_global->__pyx_n_u_MeanFloatFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":348 + * + * class MeanFloatFn(AccumulatorCombineFn): + * _accumulator_type = MeanDoubleAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_MeanDoubleAccumulator)) < (0)) __PYX_ERR(0, 348, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":347 + * + * + * class MeanFloatFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = MeanDoubleAccumulator + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_MeanFloatFn, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MeanFloatFn, __pyx_t_2) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":355 + * self.value = True + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value &= not not element + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":358 + * self.value &= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value &= accumulator.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":362 + * self.value &= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllAccumulator_extract_output, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllAccumulator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AllAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AllAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AllAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AllAccumulator___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":370 + * self.value = False + * + * def add_input(self, element): # <<<<<<<<<<<<<< + * self.value |= not not element + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_3add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AnyAccumulator_add_input, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":373 + * self.value |= not not element + * + * def merge(self, accumulators): # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * self.value |= accumulator.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_5merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AnyAccumulator_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_4) < (0)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":377 + * self.value |= accumulator.value + * + * def extract_output(self): # <<<<<<<<<<<<<< + * return self.value + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_7extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AnyAccumulator_extract_output, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AnyAccumulator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AnyAccumulator, (type(self), 0xcd42404, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AnyAccumulator__set_state(self, __pyx_state) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_14AnyAccumulator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AnyAccumulator___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":381 + * + * + * class AnyCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = AnyAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_AnyCombineFn, __pyx_mstate_global->__pyx_n_u_AnyCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 381, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "apache_beam/transforms/cy_combiners.py":382 + * + * class AnyCombineFn(AccumulatorCombineFn): + * _accumulator_type = AnyAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AnyAccumulator)) < (0)) __PYX_ERR(0, 382, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":381 + * + * + * class AnyCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = AnyAccumulator + * +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_AnyCombineFn, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AnyCombineFn, __pyx_t_10) < (0)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":385 + * + * + * class AllCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = AllAccumulator + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_AllCombineFn, __pyx_mstate_global->__pyx_n_u_AllCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_4 != __pyx_t_9) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 385, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/transforms/cy_combiners.py":386 + * + * class AllCombineFn(AccumulatorCombineFn): + * _accumulator_type = AllAccumulator # <<<<<<<<<<<<<< + * + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_accumulator_type, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_AllAccumulator)) < (0)) __PYX_ERR(0, 386, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":385 + * + * + * class AllCombineFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * _accumulator_type = AllAccumulator + * +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_AllCombineFn, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AllCombineFn, __pyx_t_9) < (0)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":389 + * + * + * class DataflowDistributionCounterFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * """A subclass of cy_combiners.AccumulatorCombineFn. + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounterFn, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounterFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_kp_u_A_subclass_of_cy_combiners_Accum); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_4 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 389, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":399 + * version. + * """ + * _accumulator_type = DataflowDistributionCounter # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_accumulator_type, __pyx_t_2) < (0)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_combiners.py":389 + * + * + * class DataflowDistributionCounterFn(AccumulatorCombineFn): # <<<<<<<<<<<<<< + * """A subclass of cy_combiners.AccumulatorCombineFn. + * +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounterFn, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounterFn, __pyx_t_2) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":406 + * + * __slots__ = ( + * 'value', '_less_than_fn', '_comparable_value', 'requires_hydration') # <<<<<<<<<<<<<< + * + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): +*/ + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_tuple[0]) < (0)) __PYX_ERR(0, 405, __pyx_L1_error) + + /* "apache_beam/transforms/cy_combiners.py":413 + * self.requires_hydration = _requires_hydration + * + * def hydrate(self, less_than_fn, key_fn): # <<<<<<<<<<<<<< + * self._less_than_fn = less_than_fn if less_than_fn else operator.lt + * self._comparable_value = key_fn(self.value) if key_fn else self.value +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_15ComparableValue_3hydrate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComparableValue_hydrate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue, __pyx_mstate_global->__pyx_n_u_hydrate, __pyx_t_4) < (0)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":426 + * return 'ComparableValue[%s]' % str(self.value) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * # Since we can't pickle the Compare and Key Fn we pass None and we signify + * # that this object _requires_hydration. +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_15ComparableValue_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComparableValue___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_12cy_combiners_ComparableValue, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_CountAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_1__pyx_unpickle_CountAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CountAccumulator, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_CountAccumulator, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_3__pyx_unpickle_SumInt64Accumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumInt64Accumulat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumInt64Accumulat, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MinInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_5__pyx_unpickle_MinInt64Accumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinInt64Accumulat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinInt64Accumulat, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_7__pyx_unpickle_MaxInt64Accumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxInt64Accumulat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxInt64Accumulat, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MeanInt64Accumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x17b9580, 0xa7f18ab, 0xa3f5598, b'count, sum') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_9__pyx_unpickle_MeanInt64Accumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanInt64Accumula, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanInt64Accumula, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_11__pyx_unpickle_DistributionInt64Accumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionInt64, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_DistributionInt64, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_SumDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_13__pyx_unpickle_SumDoubleAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumDoubleAccumula, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_SumDoubleAccumula, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_15__pyx_unpickle_MinDoubleAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinDoubleAccumula, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MinDoubleAccumula, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_MaxDoubleAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_17__pyx_unpickle_MaxDoubleAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxDoubleAccumula, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MaxDoubleAccumula, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_19__pyx_unpickle_MeanDoubleAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanDoubleAccumul, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_MeanDoubleAccumul, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AllAccumulator(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xcd42404, 0xf32b67c, 0x2063c16, b'value') +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_21__pyx_unpickle_AllAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AllAccumulator, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AllAccumulator, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_12cy_combiners_23__pyx_unpickle_AnyAccumulator, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AnyAccumulator, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_combin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AnyAccumulator, __pyx_t_4) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/cy_combiners.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.transforms.cy_combiners", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.transforms.cy_combiners"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 40, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/transforms/cy_combiners.py":406 + * + * __slots__ = ( + * 'value', '_less_than_fn', '_comparable_value', 'requires_hydration') # <<<<<<<<<<<<<< + * + * def __init__(self, value, less_than_fn, key_fn, _requires_hydration=False): +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_less_than_fn_2, __pyx_mstate_global->__pyx_n_u_comparable_value, __pyx_mstate_global->__pyx_n_u_requires_hydration_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 9; } index[] = {{1},{293},{19},{179},{1},{8},{38},{7},{6},{2},{4},{9},{14},{3},{20},{27},{29},{30},{39},{35},{39},{14},{32},{34},{24},{29},{20},{12},{14},{32},{34},{24},{29},{20},{12},{9},{15},{26},{23},{16},{34},{36},{26},{28},{31},{22},{14},{27},{29},{28},{46},{48},{38},{40},{43},{34},{19},{9},{9},{20},{38},{40},{30},{35},{26},{10},{19},{37},{39},{29},{31},{34},{25},{10},{21},{39},{41},{31},{36},{27},{11},{20},{38},{40},{30},{32},{35},{26},{11},{20},{38},{40},{30},{35},{26},{10},{19},{37},{39},{29},{31},{34},{25},{10},{20},{20},{38},{40},{30},{35},{26},{10},{19},{37},{39},{29},{31},{34},{25},{10},{11},{17},{12},{9},{11},{22},{35},{55},{55},{18},{18},{17},{4},{18},{8},{5},{7},{7},{6},{14},{8},{12},{8},{7},{3},{13},{5},{6},{12},{13},{2},{8},{4},{5},{18},{13},{10},{15},{1},{8},{3},{7},{8},{5},{3},{11},{12},{14},{12},{11},{10},{29},{29},{31},{43},{35},{34},{36},{35},{35},{34},{35},{34},{14},{12},{10},{17},{13},{19},{18},{4},{12},{10},{12},{19},{9},{5},{12},{8},{14},{8},{6},{12},{5},{6},{31},{11},{11},{11},{11},{12},{9},{13},{21},{11},{29},{46},{11},{91},{92},{92},{91},{96},{96},{106},{20},{9},{11},{43},{47},{51},{73},{77},{47},{51},{13},{18},{25},{29},{11},{57},{59},{58},{58},{58},{59},{31},{18},{27},{57},{61},{82},{49},{26},{16}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2016 bytes) */ +const char* const cstring = "(\265/\375`\001\032\265>\000JL(\020G\000\2218\007\374?\225\250\004u\274\377=\372\325\257~\365\253_\352\370\232_>3lDd\367\026\331\241\211\241N\022\022\236C%\354\261\305\2524&\033\241\213\177E\315\267\035q\266J\336Q\347\037\326\270.\033(\215NeQ\333\000\331\000\002\001\035\230S\032[p\227t\366Q\365U\232\365\354\327m\263$@\2579[Z]\360ntD\006\337jw\306\330\216\320\375zk\353m\377\230\206\271ES+\024\244\337km\212\357\346n\210z\275\265\237\361 \335\260\245\242\023\221\206\026\023-\024k\264\305\375\266\340\243.\367\033\325\227\242\320mU\233\376\316\246\030\232B\314\207\234}\001\255\327\2014\370+O_\032\360U;\207[\356T\373\322P\212;\232\201\273v\225\361\3664.\316\252\215_\005\323\322l\311\336\025}\355\256\300\327t\203\331{\220\346M\237CY\n\376\306aF\301\371\356\020u\301\255o\nM\346Rv\333\024\3723\226\205R\017\017\020.\241\200y[.\354BM#\2014\370\370\242\272\254\325\226FS\231jm9\r\025jJ\002\0056\374Pv\257Z\370\271\031\355z8\334\\\250\037\354B=\243\275\352zV\363\036\364j\365\262\007\276\227k\245\371\357,\376\013n\3745\203vc\373\370\332\216\253\330\252v\325\3729\234\252\255\237\321\335\357[\365\255)|\253L\325p\230\332\370\273\347\276V-o\365?\344\354\252juF\263\250\257\234\246\037g0k\240|5\334\322\336V7\020HW\333\205.\251ga\272)\254VK\351\336\213\355\343\322\266\231+=\207\ns\n\313\262\230V\\\220X\252ht2\255\340R\025\2156^\301uk\251j\013o\273u\255\365\265p{\220\343HZ\006\374n\207\271\202\233\365\266\376\266\017j;\364\360Ui\253\252\365\373Z;\214\352\210\327\3000\353\020\233\276)|5h2\370\365\335Z^\211\016+R\224\2658u\230\027\006\227\311f\216\022\330X\366\222q\2018UvYB\212\235\\\272\312\213\201k\344\364\234'\323C\314\205E7y}\270\020\234\2333\305\024m^\002^1\247\214\231\231\"f(\244\207t`_\354\343\010:\260l\024\031Mp\030qU#\200\003\263d\206\261\304C\\E\004\341\300<\374$\022\010\300\321\271a\276\224\2442\203\035\037\3543\204\371Q\246\220!\362et\020r\235\234 ,t\013\n\272\202N\377H\n\244\036!\200t\220\016lcnX\320M\nt`\001\\\243\363s~\310\314\006\345\211\3740n\216\302C\022\347\360O\364\220""\237\220.\022?>g\311\014\231\035<\347\310\374\230\034B\374\303=\304\016\007\366\251\331\234\025L\217\031\342\30065.+Z*G\311\264RUL\230H\246\312\301\301\261\351\315\013\361\366:\254\265n\337i\267V\2753\247m\352\267\024\367Z?x\303\217\365\\!\361\203F\314\362\214\257\304\220\222\344@\237\300\013\244\370`0X\022\205\2109*7\311\032E\343\313(\223\300[\210\"$\362\304\310\251\2511\036\030O\234\224\215\0308\3117\246\340\0276d\014_\021=\034F\025\316@\034\320\021\322q\235#\321\3559\342\374LVY\022\003F\307/\223I\267\346hc~%\213\034\211y\321M/\025\243\236\231\036>\025Y\001\273J\035:\251\014\225'\244\204*\243\313h\351-'\3753M<\346\306\354\224$\006z(k\351 W\211P\037M\270\215\3223\202\033\340\300Xd}\346\303\334@\3737B\340\304\310\314A\304H?n|B\210[\020=:`\031\027\341\240\310\"\215\021F\222l\\q\021\200\261\263\341\235\317\350\031YD\220\016X\210\374\030]\370\007q{\270&\022\340\330\022\224\231\253\362@\231\200<\215\016>:H\000\216\216\033\237\232\030\214\230\036s\352\014^#.\217\353t\2120Oe\201\307\250\241\241A\312\314\214\210\210$IR\350A\014\242P\334Qh;bi\222\342\030\214\001\021\036!\206\021B0)\tfd\202\224\244 I\007B\0252?\214\376\2466T\374br\300\202:N]\260b\000\366\022\334\260\347M\036?\374\306\336\\\256\203\006\343\324\222F\020\021\033&\343\241(\013\373\2203\226\214]a\363=:\235\367e\234\272\263\340\362n\313?\375\227|\362\377\216\3306\262\024l\312\010\367;\006+Lk5\021\331 \034i\3753\212\024I\275b\2044\030\027n\255#\013\2722\313\226\212\220AXq\304%\235u\277#\242\020\t\312uZ;\206\016\233\033\205\261\305k\212-K\320>\361\324\273\024\325\377\254 6\360zP\331Ie\210HN\004\253H\003\252Xg6\014#\302w,3Nb\361\027\310\212 e\327HFC\231\225\376>\244\214\205\201p\343\302\333\277,k\302\332A0\272\217\226\207\222/\325i\301\357\212\202\000\032\221\276\010x\301\335'\251;\226\202L\264\200 \317\223\313&VN\004\304\227\320\n\205\341V\244\357\221S\034$,2.\343\346\013p\001\342\017\333\350yX\247t\247JE\235j\262\334;\351QP\354(\353\2363\205\210gS\247p\224\347\312\211\201\010\310>\210+\212,\010B\005\205\r\032\237\276\245W\226\322\007R\257\306r\343j\"%\212\032\350Q{\225\301\336\206\031\2317\3011\374b\023B7\003u\243\274\016\003\343\367[\340+\334\327\220\006\025/p\325\021\204\353W\020\301\330U\3178\000\300)v\213\213\341B\r\010\254_X\005\",\345&-\206\016\001\350g\374\345\333E\271\035\2152\326\241\250\321\331\023\314\310\274\226N(\241\235~\330\003\225[L\311\261\024\205\332\361\322f8P\303~\255 ,\344\005.\212\306QZk D\277a\035T@\317\253\006"; + PyObject *data = __Pyx_DecompressString(cstring, 2016, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2172 bytes) */ +const char* const cstring = "BZh91AY&SY\351S.\014\274t$f\226e\267b\301n\374\264\212\022\016\253e\0130\210\213J\247t\236\006E6L[6\251\3113=z\032\273\330\021fff$\225\200\000I+\000\000e\024\225\254\000\002IX\000\004\22748J\346\210\352\227m\000\002\333e`\000\027\227\024Z7dj+\\\371\215[\331\316\3339\316\333\300\317<1\303\030\353\254\026M\331\016;]\006\360\006\245[\272\324\235\325m\200\355\375\325b\266\233i\266\233i\266\233i\337\341\254-E\375(\350\265<\344""\357\210&\275e\231\230bi\322\243\013\317}'\274\254\254\250\304\322|\352uLT\314Lbc\023\030\230\304\306&11\211\337R\351}M-\352\273\200\326\002\313<\274j_\003\221\250\243\221\251\001\310\324Q\310\324\200\345\311x \375\310~OW\223\177s:y\243;\362\026\376\213e\265\247\266JE\360D\022Lc$\371j\316\023\214\354\032H\031n\301{\207\336fs\350\021\360\254\210V\223\313E\305\217p;\347\363=\345\2431\013\256-\335@6\371\231Z\355\300\277\331\237\213\277\344\203\243\326\356\002\365\230b \240#\331\203\214\242\202\004\010\020#\220\263\246\236R\010\022\247\353{\237C\331\010x-\364\227\030\320e\006h\317\2154\223n\035C:\207M@\321l\257\336L\260)\005r\026>\346vL\025\376(\231V\226\207\205{u\314\260B\231\201\230\313\375\364\213\035(\344\252N\210FVX\261\023\033nc\220\223I,\032J\222\221R\221K\234\t\360w\346\356\263u0E\247\213DfQ~\002?V$\022\352]H$\237N\344\277\233\217\203\364-\366\202\305\2224]\022@JF\310\361\350\214\307I\361\330+NY5H\350\017\252a\224Yl\020\214\210\2342+\n\014C\245\277\262\201\213\311\3067\030\233\225\305\214\371\327J:\270 #\354\014\022h3\232K\307\317\272\337\010\200*\301\r\202h\246\333\200 VVV\002\303\273\014\341D\242\354\014\241+\374\022D\304\030\355\353@ME\016\010N\350\322\2756\241\363\"\267\240B\345\263\rVC\316!\210\302JRvM\266\333m\266\330\345j\333m\266\333m\266\333m\267\"\004\001\022\242""\005J\326p3I\305\nV\241o~\353RX\264X\302\342\362\3023\262\320P\204P\2021\220\220\364\024\260\014J\342\350\030[\375(F\213\226\303\023# \250\274h\002i\203\231r\023\020\232c:\265b$\n\315\250\224\206\246\362\363\236xg\273N\260KD\226\007\013L\304\255K\335s\363\243\225\034\331\363hQ\323P)a\\'\261\260\000\000\000\000\000BK\021^\342+\022J\3611c\254\\jc\352`\305K8\t\301\224\267$\265\332\205B\"\030T\2510A&a\215\217\226{\312q\327\255\202f\316\0166\330J\364\226\"\013Q\275\250M1\261\362\224\216z9\033\352\233~\304\345;)\"d\247G2:5\254c+G\222KGb5\227\341g\273\232\304c\310\265\2417,\022W\377\206\243\317\2573\214rH\026\203\030D\005\001\000\343\300Zh\225MR\032\361H\270\223\235u\245B\325\0215\006\315.-b\32753H\032\241^\241%Lp@I_P\220\204)@\225\271\tu/\013\314\0037\\\262\000\235\246\017\210\216\013\257\250\364\356\361b\244\205\324\200Y\\JK\210#Ay\242\310@\225H#\261\301\006\365\002.Y\216Y\035\211\001\006i&%\330\261\266\247\231\270\343=\351Wxo\336`\213\331m\306\010\016\0261\003I^t\335w5\332\300\370\233C\222\367\337\r\332w\002}\352\202V\300\203\270m\324k\027'\257\350\375/\321\363I#\300\375WX\232\262\262T\241\335$\354t\243j\220\316\360\376\370\200\014\240\037\030e\203\230\001\204$f\010y\026\353\214\262\023\232\343\020\366\213\327\002\r2\344\206\264\354I\300R\356\215dIt$\245\031\246\026Y\260t\222pt.\t\254W\375\230KG52N%\367\224\271\035\342\316\021\266n\210\210v\352+1\354%o\020*:\223,P\244vDi\245\251\264|RhJ\321\013hc\346(j\245\r\214\225\271\212\250\004\362\200\311G\374\034\334\236\177D\315\307\331>\264\340\3725g\263\022lm\343\233\342\246\266\322\267\376\261\234\366\275\023V!\345r\026\331\2453\207\207\322\362W\277\360X\032\203\231\026\264\031.\016\213\331\356\230\343\364l\276CK\004\226\255@\334\307\030\336u\202\371u\310*R\242N\273|0\n\221U \007\326mRp\255\232\307C[8\2334\246\034!\363\177\037\2234\016%BY~wB\346[\315\370\364c-2*\302^\024hI\201\206-,J1d]6M}q^\302A\357\361\271:|\255\203Vj\230\223\010\230\223e\263F\276\3279\261H\224\266\rCK\323\037\355\374\031S\313\353\343\\Y`\336 \307${cX\277 ""\244,\212U32\220Au\211H\272ui]4\252\222\230\245?\271\2660>\364-j\313\377\027rE8P\220\351S\310\nX\221\240*\377%\242\241\373\205'^\351OL*Cn\202\321\252\023=-\354W\204\226j\n\n\201\220\241~u\006P\300\300`U\322\211\301\010a\033+\212j`\206\000\002s\252\234n\013\022\325`\021\332\364p(`Y'\351o\261$!P$\270\216\305*A'\004\327\356\031\032V\364\212\252\325\364{!\360\353-\211\352,c\242\260\361T\374\202*\025\250\2267\223\276a\331)\247\272jj\"y\214r\367y\275\302\355\037\204H\003\241\005\242*\326\253\013\204,v\252\324M\203+\0255\002UGx&\343\252\221sHW4\220j\032\213<\325\210v\032r\244\347e9\240\031\236A\314\032\221L\221\240q\207A\360\363r\000I7Xp\0134f\211\205\371s\261\206\205^\224\300\233\325Zi\005\203\014\3158A\316\313\243A\2065fA\206\371sA\206\205\343 \225\226\037d\220\010\356\247\271\351,^4/\251\266$\266\275\274]\036\202/<\217f\314\321\210\344\034\321\361\263^,AJD\026\256ID\354U\305\343\372\345\2109JcD`\027`\356+F.\033X'N\026-\317%\332\221R\305\352\373\305YN\013\305\3461W\316XU\257\264\021\215\202\262_,\347\262\350Y\376\337\023b\277\370\014\237\357\252&\264U\300\234\307\213Vj\201V\244B\\=?g\2564\234)W\305\313\020$\005Y\305FA\001j\276\010\034\0267\211eP\346\251\005S\210\303\224'\216$\310Gp*\200\374\010V\2428\361\230\234\034\027\250E\263\344*""\316\362\344\212\347R\341\352\214\223\001\321\024- #pqx\374\\\226\002\214\247\027\312$\0262\236<\232\350\002\320\246\022\310\223r@\243KaF\227\204\214\306\"F/\007\214.\304\213\372p\321(Zt\031\260\350rX\3218\250h\353\255^l\r\023\311\366\232\265ee\030\367+g\313\311\365R\214\274\357d\234Bo\213)\254\267\263\356\346V'5\241\333\r\237\260\022V~:1\255'\226a?\354\224\273\177qJ\314\303\303\336V/\327\367\254\256\014\223\357\300\032;\356\237\277tV\207\311\rw\343#[\357|\332\361<%\335\344\007\356\007\267\335\333\217z\017\372\031o\376\241}\324\311tv\273\353\3167=c\302\373\253\215\231\327\273\335|\367\310\201h\177M\256\\y\273]\266R\303\304F{\317\312X\005\373n\007""\017\023\327.\232\355\227\326S\373\272]\362V\035&\337\263\032#60Yc\230\334t73\316u\247\344\234\366\216\007\327\006 \013qV\337\314u\326\331\355\255\366\336\353\257\017v\334\347\207\2430\353\r\303\376\332)\367R\275\355\376\315\301\236{X\036\205Y\3717\363}\257k\000\342{\275G\375\323Ai\024\346\340\231\353\367='\177\\\350\257\353?\347H\320n;\375;\203\227n\371\305(\314*\205\375\037u\262\235f\267\354\274N\231\376\336+\367S\375\355\301M\267|\354\036\3778\232\343\275\270\330\372\365\352\312\225\rw\375C\273\334y\277{\243\333\204\3150\335d\254\177\323]<\345]\031&\336n\213V\nV\002\377F\373\241uh\257w2\303\253\033\355gv\312\366\255\266\226\320KZ\253\277O=i\377\351uW\230\036\031Y\253\311\260\nL^c\355xg\313\225\350\226\3757;\277\304\332\327.\316\333\232u\335*\r\257\256\265o\303\2217\261\377\304\222\354I\021\010\264C>T\026\2373_\342\211 \352t\004\347\341#K\355@\333\215\022\037\331\rW\370\322Y\207mt\346\226\236\017\023\357Z\217\2411R]/\236\377[;\020X\022NE7\363\217~\332=(\261\3034\3037t\337\275\325M:\253\254o}\313\035\247\341>8p\017~v\177F\261\246\037w\036t3\335|\300\024\016{\367~\241\257@\327\306Z~\326\251B\3176\002\226_;%7\367\317A\321\375\317q\254\345v\347\274\333\200\003\177f\231s\260\273S\034(\356\217?\305Z\336\353\236;\215^\320\362q\017\273\337B\226\262+\327\306\246\036x\233\2609\257\276\325\276i\355\331_\301\216K\301\307\245\275o\035wV\003\342\265\366\347\326\017v#\304\271e\335\261K\313\210\306D\336*\3337\354\377\001h\341\351E\240\327\022\366w\235\374\244\tXL\327\333/\254\217\241-\274\210J\274\217\344\233\0303V\016\332\356\310\316\332\347\035\243\233c\037\260\260\307\357\341P\003\217wXk2\217/\301\276\301<\376\300N4\377K\376\216\365\211{\343V\027\212\275\331nZ%\013O\312;\202\371/\343\215\263\336\316\374\006\345\201\202`"; + PyObject *data = __Pyx_DecompressString(cstring, 2036, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (6913 bytes) */ +const char* const bytes = ".A subclass of cy_combiners.AccumulatorCombineFn.\n\n Make DataflowDistributionCounter able to report to Dataflow service via\n CounterFactory.\n\n When cythonized DataflowDistributinoCounter available, make\n CounterFn combine with cythonized module, otherwise, combine with python\n version.\n ComparableValue[%s]Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.?add_noteapache_beam/transforms/cy_combiners.pydisableenablegc-infisenabled_63AccumulatorCombineFnAccumulatorCombineFn.__eq__AccumulatorCombineFn.__hash__AccumulatorCombineFn.add_inputAccumulatorCombineFn.create_accumulatorAccumulatorCombineFn.extract_outputAccumulatorCombineFn.merge_accumulatorsAllAccumulatorAllAccumulator.__reduce_cython__AllAccumulator.__setstate_cython__AllAccumulator.add_inputAllAccumulator.extract_outputAllAccumulator.mergeAllCombineFnAnyAccumulatorAnyAccumulator.__reduce_cython__AnyAccumulator.__setstate_cython__AnyAccumulator.add_inputAnyAccumulator.extract_outputAnyAccumulator.mergeAnyCombineFnCombineFnComparableValueComparableValue.__reduce__ComparableValue.hydrateCountAccumulatorCountAccumulator.__reduce_cython__CountAccumulator.__setstate_cython__CountAccumulator.add_inputCountAccumulator.add_input_nCountAccumulator.extract_outputCountAccumulator.mergeCountCombineFnDataflowDistributionCounterDataflowDistributionCounterFnDistributionInt64AccumulatorDistributionInt64Accumulator.__reduce_cython__DistributionInt64Accumulator.__setstate_cython__DistributionInt64Accumulator.add_inputDistributionInt64Accumulator.add_input_nDistributionInt64Accumulator.extract_outputDistributionInt64Accumulator.mergeDistributionInt64FnINT64_MAXINT64_MINMaxDoubleAccumulatorMaxDoubleAccumulator.__reduce_cython__MaxDoubleAccumulator.__setstate_cython__MaxDoubleAccumulator.add_inputMaxDoubleAccumulator.extract_outputMaxDoubleAccumulator.mergeMaxFloatFnMaxInt64Ac""cumulatorMaxInt64Accumulator.__reduce_cython__MaxInt64Accumulator.__setstate_cython__MaxInt64Accumulator.add_inputMaxInt64Accumulator.add_input_nMaxInt64Accumulator.extract_outputMaxInt64Accumulator.mergeMaxInt64FnMeanDoubleAccumulatorMeanDoubleAccumulator.__reduce_cython__MeanDoubleAccumulator.__setstate_cython__MeanDoubleAccumulator.add_inputMeanDoubleAccumulator.extract_outputMeanDoubleAccumulator.mergeMeanFloatFnMeanInt64AccumulatorMeanInt64Accumulator.__reduce_cython__MeanInt64Accumulator.__setstate_cython__MeanInt64Accumulator.add_inputMeanInt64Accumulator.add_input_nMeanInt64Accumulator.extract_outputMeanInt64Accumulator.mergeMeanInt64FnMinDoubleAccumulatorMinDoubleAccumulator.__reduce_cython__MinDoubleAccumulator.__setstate_cython__MinDoubleAccumulator.add_inputMinDoubleAccumulator.extract_outputMinDoubleAccumulator.mergeMinFloatFnMinInt64AccumulatorMinInt64Accumulator.__reduce_cython__MinInt64Accumulator.__setstate_cython__MinInt64Accumulator.add_inputMinInt64Accumulator.add_input_nMinInt64Accumulator.extract_outputMinInt64Accumulator.mergeMinInt64Fn__Pyx_PyDict_NextRefSumDoubleAccumulatorSumDoubleAccumulator.__reduce_cython__SumDoubleAccumulator.__setstate_cython__SumDoubleAccumulator.add_inputSumDoubleAccumulator.extract_outputSumDoubleAccumulator.mergeSumFloatFnSumInt64AccumulatorSumInt64Accumulator.__reduce_cython__SumInt64Accumulator.__setstate_cython__SumInt64Accumulator.add_inputSumInt64Accumulator.add_input_nSumInt64Accumulator.extract_outputSumInt64Accumulator.mergeSumInt64Fnaccumulator_accumulator_typeaccumulatorsadd_inputadd_input_napache_beam.transformsapache_beam.transforms.cy_combinersapache_beam.transforms.cy_dataflow_distribution_counterapache_beam.transforms.py_dataflow_distribution_counterasyncio.coroutinescline_in_traceback_comparable_valuecorecreate_accumulator__dict___dict__doc__element__eq__extract_output__func____getstate____hash__hydrateinf_is_coroutineitemskey_fnless_than_fn_less_than_fnlt__main__meanmergemerge_accumulators__metacla""ss____module____mro_entries__n__name__nan__new__operatorotherpop__prepare____pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_AllAccumulator__pyx_unpickle_AnyAccumulator__pyx_unpickle_CountAccumulator__pyx_unpickle_DistributionInt64Accumulator__pyx_unpickle_MaxDoubleAccumulator__pyx_unpickle_MaxInt64Accumulator__pyx_unpickle_MeanDoubleAccumulator__pyx_unpickle_MeanInt64Accumulator__pyx_unpickle_MinDoubleAccumulator__pyx_unpickle_MinInt64Accumulator__pyx_unpickle_SumDoubleAccumulator__pyx_unpickle_SumInt64Accumulator__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex___requires_hydrationrequires_hydrationself__set_name__setdefault__setstate____setstate_cython____slots__statestaticmethod__test__unused_elementunused_nupdateuse_setstatevaluevaluesdouble\000\000\000_NAN\000_NEG_INF\000_POS_INF\200\001\330\0041\260\021\260&\270\001\200!\330\004\010\210\n\220!\2201\200\001\330\0042\260!\2606\270\021\200\001\330\0043\2601\260F\270!\200!\330\004\013\2104\320\017!\240\021\200!\330\004\013\2104\210q\200!\330\004\013\2104\210q\220\004\220A\200!\330\004\013\2104\210u\220C\220t\230:\240T\250\034\260Q\200\001\330\004:\270!\2706\300\021\200!\330\004\005\330\010\022\220!\2207\320\0320\260\001\330\010\014\320\014\037\230s\240%\240q\200!\330\004\010\320\010\031\320\031)\320);\2708\3001\330\004\010\320\010\035\230V\2401\240D\250\013\260<\270t\3001\330\004\010\320\010\036\230a\200\001\330\004,\250A\250V\2601\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0171\260\024\260Q\260g\270[\310\007\310q\340\010\017\320\0171\260\024\260Q\260g\270[\310\001\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0174\260D\270\001\270\027\300\013\3107\320RS\340\010""\017\320\0174\260D\270\001\270\027\300\013\3101\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0175\260T\270\021\270'\300\033\310G\320ST\340\010\017\320\0175\260T\270\021\270'\300\033\310A\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017/\250t\2601\260G\270;\300g\310Q\340\010\017\320\017/\250t\2601\260G\270;\300a\200\001\360\010\000\005\016\210T\220\030\230\024\230Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0175\260T\270\021\270'\300\033\310G\320ST\340\010\017\320\0175\260T\270\021\270'\300\033\310A\200\001\360\010\000\005\016\210T\220\030\230\024\230Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\0176\260d\270!\2707\300+\310W\320TU\340\010\017\320\0176\260d\270!\2707\300+\310Q\200\001\360\010\000\005\016\210T\220\030\230\024\230V\2404\240v\250T\260\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017=\270T\300\021\300'\310\033\320T[\320[\\\340\010\017\320\017=\270T\300\021\300'\310\033\320TU\200!\360\006\000\005\014\320\013\035\230T\240\030\250\026\250v\260Q\200!\330\004\010\210\n\220!\200\001\330\004.\250a\250v\260Q\200!\330\004\005\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\n\220!\200!\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\010\220\001\330\004\010\210\n\220!\200!""\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\010\220\010\230\002\230!\330\004\010\210\n\220!\200!\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\010\220\001\330\004\010\210\n\220!\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\2204\220v\230Q\200!\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\010\220\010\230\002\230!\330\004\010\210\n\220!\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\2204\220v\230Q\200!\330\004\005\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\010\210\n\220(\230\"\230A\200!\330\004\016\210c\220\021\220!\330\004\007\200t\210:\220S\230\013\2401\330\006\014\210M\230\021\230!\330\004\007\200x\210r\220\024\220Q\330\006\n\210)\2201\200!\330\004\010\210\n\220$\220d\230!\200!\330\004\016\210e\2201\220A\330\004\010\210\n\220!\200!\330\004\016\210e\2201\220A\330\004\010\210\010\220\001\330\004\010\210\n\220!\200!\330\004\016\210e\2201\220A\330\004\007\200x\210r\220\024\220Q\330\006\n\210)\2201\200!\340\004\013\210;\220o\240Q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220>\240\030\250\021\250!\330\004\007\200|\2207\230!\330\0100\260\001\3201B\300.\320PQ\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023(\250\010\260\001\260\021\330\004\007\200|\2207\230!\330\0107\260q\3208P\320P^\320^_\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023#\2408\2501\250A\330\004\007\200|\2207\230!\330\0102\260!\3203F\300n\320TU\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023&\240h\250a\250q\330\004\007\200|\2207\230!\330\0105\260Q\3206L\310N\320Z[\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320""\023'\240x\250q\260\001\330\004\007\200|\2207\230!\330\0106\260a\3207N\310n\320\\]\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023/\250x\260q\270\001\330\004\007\200|\2207\230!\330\010>\270a\320?^\320^l\320lm\330\004\013\2101\200!\330\004\010\210\017\220q\330\006\t\210\033\220G\2302\230T\240\021\330\010\014\210I\220[\240\001\200!\330\004\010\210\017\220q\330\006\n\210*\220K\230q\200!\330\004\010\210\017\220q\330\006\n\210(\220+\230Q\330\006\n\210*\220K\230q\200!\330\004\010\210\017\220q\330\006\n\210(\220+\230Q\330\006\n\210*\220K\230q\330\006\n\210*\220A\220T\230\026\230{\250!\330\006\n\210*\220A\220T\230\026\230{\250!\200!\330\004\007\200t\210:\220S\230\004\230H\240A\330\006\n\210)\2201\330\006\t\210\024\210U\220#\220Q\330\010\014\210I\220Q\330\004\013\2104\210u\220C\220t\230:\240T\250\034\260Q\200!\330\004\007\200t\210:\220S\230\004\230H\240A\330\006\n\210)\2201\330\006\t\210\024\210U\220#\220Q\330\010\014\210I\220Q\330\004\013\2104\210u\220C\220t\230:\240T\250\034\260Q\330\004\013\2106\220\024\220V\2304\230x\240t\2506\260\024\260Q\200!\330\004\007\200t\210:\220S\230\004\230J\240a\330\006\n\210+\220Q\330\006\t\210\024\210W\220C\220q\330\010\014\210K\220q\330\004\013\2104\210q\200!\330\004\022\220$\320\026(\250\001\330\004\017\210v\220Q\220a\330\004\013\2101\200!\340\004\017\210z\230\021\230!\330\004\013\2101"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 205; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 13) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 205; i < 255; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 255; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 205; + for (Py_ssize_t i=0; i<50; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {1,2,63}; + int32_t const cint_constants_4[] = {17678593L,24876416L,215229444L}; + for (int i = 0; i < 6; i++) { + numbertab[i] = PyLong_FromLong((i < 3 ? cint_constants_1[i - 0] : cint_constants_4[i - 3])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 6; + const char* c_constant = "g000000000000"; + for (int i = 0; i < 1; i++) { + char *end_pos; + numbertab[i] = PyLong_FromString(c_constant, &end_pos, 32); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + c_constant = end_pos + 1; + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<7; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 2; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 37}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_create_accumulator, __pyx_mstate->__pyx_kp_b_iso88591_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 40}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_z_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 45}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators, __pyx_mstate->__pyx_n_u_accumulator}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge_accumulators, __pyx_mstate->__pyx_kp_b_iso88591_vQa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 50}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_accumulator}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_oQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 54}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_7_0_s_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 59}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 72}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_element}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unused_element, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 78}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 82}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_1_Qg_q_1_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 104}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 108}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_t_S_Ja_Q_WCq_Kq_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 120}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_xr_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 127}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unused_n}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 130}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_G2T_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 135}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 143}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_xr_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 150}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unused_n}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 153}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_G2T_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 158}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_4D_7RS_4D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 167}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 174}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 186}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_t_S_HA_1_U_Q_IQ_4uCt_T_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_q_q_5T_GST_5T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 201}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_4vQ_4vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 210}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_c_t_S_1_M_4vQ_4vQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 219}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_Kq_AT_AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 226}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mean}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_t_S_HA_1_U_Q_IQ_4uCt_T_Q_6_V4xt, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_V4vT_G1F_a_vWE_Q_q_q_q_T_T_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 268}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_e1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 272}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 276}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_5T_GST_5T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 284}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_e1A_xr_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 289}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_G2T_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 294}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_5T_GST_5T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 302}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_e1A_xr_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 307}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_G2T_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 312}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_5T_GST_5T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 321}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_e1A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 326}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 331}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4uCt_T_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_q_q_6d_7_WTU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_31F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 358}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 362}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 370}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 373}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 377}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_q_t1G_gQ_t1G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_AV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 413}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_less_than_fn, __pyx_mstate->__pyx_n_u_key_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_hydrate, __pyx_mstate->__pyx_kp_b_iso88591_81_V1D_t1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 426}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_combin_2, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_T_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_CountAccumulator, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_2_3FnTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SumInt64Accumulat, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MinInt64Accumulat, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MaxInt64Accumulat, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MeanInt64Accumula, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_DistributionInt64, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_a_llm_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_SumDoubleAccumula, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MinDoubleAccumula, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MaxDoubleAccumula, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_xq_7_6a7Nn_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_MeanDoubleAccumul, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_7q8PP___1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_AllAccumulator, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_AnyAccumulator, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_0_1B_PQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* DivInt[int64_t] */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t a, int64_t b, int b_is_constant) { + int64_t q = a / b; + int64_t r = a - q*b; + int64_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectCall2Args (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return PyLong_FromLong(-intval); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + calculate_long: + { + long x; + x = a - b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla - llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) - (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace); +} +#endif + +/* PyNumberPow2 */ +static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace) { +#if !CYTHON_COMPILING_IN_PYPY + Py_ssize_t shiftby; + if (likely(PyLong_CheckExact(exp))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsZero(exp)) { + return PyLong_FromLong(1L); + } else if (__Pyx_PyLong_IsNeg(exp)) { + goto fallback; + } else if (__Pyx_PyLong_IsCompact(exp)) { + shiftby = __Pyx_PyLong_CompactValueUnsigned(exp); + } else { + shiftby = PyLong_AsSsize_t(exp); + } + #else + shiftby = PyLong_AsSsize_t(exp); + #endif + } else { + goto fallback; + } + if (likely(shiftby >= 0)) { + if ((size_t)shiftby <= sizeof(long) * 8 - 2) { + long value = 1L << shiftby; + return PyLong_FromLong(value); + } else if ((size_t)shiftby <= sizeof(unsigned PY_LONG_LONG) * 8 - 1) { + unsigned PY_LONG_LONG value = ((unsigned PY_LONG_LONG)1) << shiftby; + return PyLong_FromUnsignedLongLong(value); + } else { + PyObject *result, *one = PyLong_FromLong(1L); + if (unlikely(!one)) return NULL; + result = PyNumber_Lshift(one, exp); + Py_DECREF(one); + return result; + } + } else if (shiftby == -1 && PyErr_Occurred()) { + PyErr_Clear(); + } +fallback: +#endif + return (inplace ? PyNumber_InPlacePower : PyNumber_Power)(two, exp, none); +} + +/* GetAttr (used by Globals) */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* Globals */ +static PyObject* __Pyx_Globals(void) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_d); +} + +/* pybytes_as_double (used by pyunicode_as_double) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { + PyObject *float_value = PyFloat_FromString(obj); + if (likely(float_value)) { + double value = __Pyx_PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } + return (double)-1; +} +static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { + int last_was_punctuation = 1; + int parse_error_found = 0; + Py_ssize_t i; + for (i=0; i < length; i++) { + char chr = start[i]; + int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); + *buffer = chr; + buffer += (chr != '_'); + parse_error_found |= last_was_punctuation & is_punctuation; + last_was_punctuation = is_punctuation; + } + parse_error_found |= last_was_punctuation; + *buffer = '\0'; + return unlikely(parse_error_found) ? NULL : buffer; +} +static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { + int matches = 1; + char sign = start[0]; + int is_signed = (sign == '+') | (sign == '-'); + start += is_signed; + length -= is_signed; + switch (start[0]) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + matches &= (start[1] == 'a' || start[1] == 'A'); + matches &= (start[2] == 'n' || start[2] == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + matches &= (start[1] == 'n' || start[1] == 'N'); + matches &= (start[2] == 'f' || start[2] == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + matches &= (start[3] == 'i' || start[3] == 'I'); + matches &= (start[4] == 'n' || start[4] == 'N'); + matches &= (start[5] == 'i' || start[5] == 'I'); + matches &= (start[6] == 't' || start[6] == 'T'); + matches &= (start[7] == 'y' || start[7] == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { + return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); +} +CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { + double value; + Py_ssize_t i, digits; + const char *last = start + length; + char *end; + while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) + start++; + while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) + last--; + length = last - start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + digits = 0; + for (i=0; i < length; digits += start[i++] != '_'); + if (likely(digits == length)) { + value = PyOS_string_to_double(start, &end, NULL); + } else if (digits < 40) { + char number[40]; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/transforms/cy_combiners.cp314-win_amd64.pyd b/sdks/python/apache_beam/transforms/cy_combiners.cp314-win_amd64.pyd new file mode 100644 index 000000000000..68c6f7ed364d Binary files /dev/null and b/sdks/python/apache_beam/transforms/cy_combiners.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.c b/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.c new file mode 100644 index 000000000000..d543590ed20f --- /dev/null +++ b/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.c @@ -0,0 +1,13316 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.transforms.cy_dataflow_distribution_counter", + "sources": [ + "apache_beam\\transforms\\cy_dataflow_distribution_counter.pyx" + ] + }, + "module_name": "apache_beam.transforms.cy_dataflow_distribution_counter" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__transforms__cy_dataflow_distribution_counter +#define __PYX_HAVE_API__apache_beam__transforms__cy_dataflow_distribution_counter +/* Early includes */ +#include +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/transforms/cy_dataflow_distribution_counter.pyx", + "apache_beam/transforms/cy_dataflow_distribution_counter.pxd", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":25 + * + * # 3 buckets for every power of ten -> 1, 2, 5 + * cdef enum: # <<<<<<<<<<<<<< + * BUCKET_PER_TEN = 3 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_BUCKET_PER_TEN = 3 +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":29 + * + * # Assume the max input is max(int64_t), then the possible max bucket size is 59 + * cdef enum: # <<<<<<<<<<<<<< + * MAX_BUCKET_SIZE = 59 + * +*/ +enum { + __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE = 59 +}; + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":32 + * MAX_BUCKET_SIZE = 59 + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * cdef public int64_t min + * cdef public int64_t max +*/ +struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtab; + int64_t min; + int64_t max; + int64_t count; + int64_t sum; + int64_t *buckets; + int is_cythonized; +}; + + + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":37 + * + * + * cdef class DataflowDistributionCounter(object): # <<<<<<<<<<<<<< + * """Distribution Counter: + * +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter { + int (*add_input)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + int (*add_input_n)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int64_t, int __pyx_skip_dispatch); + int64_t (*_fast_calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t); + void (*translate_to_histogram)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int (*add_inputs_for_test)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); + int64_t (*calculate_bucket_index)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch); + PyObject *(*extract_output)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int __pyx_skip_dispatch); + PyObject *(*merge)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* ListAppend.proto (used by append) */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* DivInt[int64_t].proto */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t, int64_t, int b_is_constant); + +/* UnaryNegOverflows.proto */ +#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +/* pybytes_as_double.proto (used by pyunicode_as_double) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj); +static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); +static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(obj); + size = PyBytes_GET_SIZE(obj); +#else + if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { + return (double)-1; + } +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} +static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyByteArray_AS_STRING(obj); + size = PyByteArray_GET_SIZE(obj); +#else + as_c_string = PyByteArray_AsString(obj); + if (as_c_string == NULL) { + return (double)-1; + } + size = PyByteArray_Size(obj); +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} + +/* pyunicode_as_double.proto */ +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS +static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { + int last_was_punctuation; + Py_ssize_t i; + last_was_punctuation = 1; + for (i=start; i <= end; i++) { + Py_UCS4 chr = PyUnicode_READ(kind, data, i); + int is_punctuation = (chr == '_') | (chr == '.'); + *buffer = (char)chr; + buffer += (chr != '_'); + if (unlikely(chr > 127)) goto parse_failure; + if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; + last_was_punctuation = is_punctuation; + } + if (unlikely(last_was_punctuation)) goto parse_failure; + *buffer = '\0'; + return buffer; +parse_failure: + return NULL; +} +static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { + int matches = 1; + Py_UCS4 chr; + Py_UCS4 sign = PyUnicode_READ(kind, data, start); + int is_signed = (sign == '-') | (sign == '+'); + start += is_signed; + length -= is_signed; + switch (PyUnicode_READ(kind, data, start)) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'a') | (chr == 'A'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'n') | (chr == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'f') | (chr == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+3); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+4); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+5); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+6); + matches &= (chr == 't') | (chr == 'T'); + chr = PyUnicode_READ(kind, data, start+7); + matches &= (chr == 'y') | (chr == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { + double value; + const char *last; + char *end; + Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); + const int kind = PyUnicode_KIND(obj); + const void* data = PyUnicode_DATA(obj); + start = 0; + while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) + start++; + while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) + length--; + length -= start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + if (length < 40) { + char number[40]; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} +#endif +static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS + if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) + return (double)-1; + if (likely(PyUnicode_IS_ASCII(obj))) { + const char *s; + Py_ssize_t length; + s = PyUnicode_AsUTF8AndSize(obj, &length); + return __Pyx__PyBytes_AsDouble(obj, s, length); + } + return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); +#else + return __Pyx_SlowPyString_AsDouble(obj); +#endif +} + +/* FloatExceptionCheck.proto */ +#define __PYX_CHECK_FLOAT_EXCEPTION(value, error_value)\ + ((error_value) == (error_value) ?\ + (value) == (error_value) :\ + (value) != (value)) + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by SetupReduce) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyLong_As_unsigned_PY_LONG_LONG(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input_n(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int64_t __pyx_v_n, int __pyx_skip_dispatch); /* proto*/ +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter__fast_calculate_bucket_index(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element); /* proto*/ +static void __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_translate_to_histogram(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_histogram, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_inputs_for_test(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_elements, int __pyx_skip_dispatch); /* proto*/ +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_calculate_bucket_index(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_extract_output(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_merge(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "apache_beam.transforms.cy_dataflow_distribution_counter" */ +static unsigned PY_LONG_LONG *__pyx_v_11apache_beam_10transforms_32cy_dataflow_distribution_counter_POWER_TEN; +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_get_log10_round_to_floor(int64_t); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.transforms.cy_dataflow_distribution_counter" +extern int __pyx_module_is_main_apache_beam__transforms__cy_dataflow_distribution_counter; +int __pyx_module_is_main_apache_beam__transforms__cy_dataflow_distribution_counter = 0; + +/* Implementation of "apache_beam.transforms.cy_dataflow_distribution_counter" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_For_internal_use_only_No_backwa[] = " For internal use only. No backwards compatibility guarantees."; +/* #### Code section: decls ### */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter___init__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static void __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_2__dealloc__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_4add_input(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_6add_input_n(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int64_t __pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_8translate_to_histogram(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_histogram); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_10add_inputs_for_test(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_elements); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_12calculate_bucket_index(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_14extract_output(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_16merge(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_codeobj_tab[9]; + PyObject *__pyx_string_tab[68]; + PyObject *__pyx_number_tab[20]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Distribution_counters_support_on __pyx_string_tab[1] +#define __pyx_kp_u_apache_beam_transforms_cy_datafl_2 __pyx_string_tab[2] +#define __pyx_kp_u_disable __pyx_string_tab[3] +#define __pyx_kp_u_enable __pyx_string_tab[4] +#define __pyx_kp_u_gc __pyx_string_tab[5] +#define __pyx_kp_u_isenabled __pyx_string_tab[6] +#define __pyx_kp_u_self_buckets_cannot_be_converted __pyx_string_tab[7] +#define __pyx_kp_u_stringsource __pyx_string_tab[8] +#define __pyx_n_u_DataflowDistributionCounter __pyx_string_tab[9] +#define __pyx_n_u_DataflowDistributionCounter___re __pyx_string_tab[10] +#define __pyx_n_u_DataflowDistributionCounter___se __pyx_string_tab[11] +#define __pyx_n_u_DataflowDistributionCounter_add __pyx_string_tab[12] +#define __pyx_n_u_DataflowDistributionCounter_add_2 __pyx_string_tab[13] +#define __pyx_n_u_DataflowDistributionCounter_add_3 __pyx_string_tab[14] +#define __pyx_n_u_DataflowDistributionCounter_calc __pyx_string_tab[15] +#define __pyx_n_u_DataflowDistributionCounter_extr __pyx_string_tab[16] +#define __pyx_n_u_DataflowDistributionCounter_merg __pyx_string_tab[17] +#define __pyx_n_u_DataflowDistributionCounter_tran __pyx_string_tab[18] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[19] +#define __pyx_n_u_accumulators __pyx_string_tab[20] +#define __pyx_n_u_add_input __pyx_string_tab[21] +#define __pyx_n_u_add_input_n __pyx_string_tab[22] +#define __pyx_n_u_add_inputs_for_test __pyx_string_tab[23] +#define __pyx_n_u_apache_beam_transforms_cy_datafl __pyx_string_tab[24] +#define __pyx_n_u_append __pyx_string_tab[25] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[26] +#define __pyx_n_u_bucketCounts __pyx_string_tab[27] +#define __pyx_n_u_calculate_bucket_index __pyx_string_tab[28] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[29] +#define __pyx_n_u_element __pyx_string_tab[30] +#define __pyx_n_u_elements __pyx_string_tab[31] +#define __pyx_n_u_extract_output __pyx_string_tab[32] +#define __pyx_n_u_firstBucketOffset __pyx_string_tab[33] +#define __pyx_n_u_func __pyx_string_tab[34] +#define __pyx_n_u_getstate __pyx_string_tab[35] +#define __pyx_n_u_histogram __pyx_string_tab[36] +#define __pyx_n_u_is_coroutine __pyx_string_tab[37] +#define __pyx_n_u_items __pyx_string_tab[38] +#define __pyx_n_u_main __pyx_string_tab[39] +#define __pyx_n_u_merge __pyx_string_tab[40] +#define __pyx_n_u_module __pyx_string_tab[41] +#define __pyx_n_u_n __pyx_string_tab[42] +#define __pyx_n_u_name __pyx_string_tab[43] +#define __pyx_n_u_nan __pyx_string_tab[44] +#define __pyx_n_u_pop __pyx_string_tab[45] +#define __pyx_n_u_pyx_state __pyx_string_tab[46] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[47] +#define __pyx_n_u_qualname __pyx_string_tab[48] +#define __pyx_n_u_reduce __pyx_string_tab[49] +#define __pyx_n_u_reduce_cython __pyx_string_tab[50] +#define __pyx_n_u_reduce_ex __pyx_string_tab[51] +#define __pyx_n_u_self __pyx_string_tab[52] +#define __pyx_n_u_set_name __pyx_string_tab[53] +#define __pyx_n_u_setdefault __pyx_string_tab[54] +#define __pyx_n_u_setstate __pyx_string_tab[55] +#define __pyx_n_u_setstate_cython __pyx_string_tab[56] +#define __pyx_n_u_test __pyx_string_tab[57] +#define __pyx_n_u_translate_to_histogram __pyx_string_tab[58] +#define __pyx_n_u_values __pyx_string_tab[59] +#define __pyx_kp_b_iso88591_1_Q_as_XQgS_a_a_r_T_XQgS_Q_Q_a __pyx_string_tab[60] +#define __pyx_kp_b_iso88591_4_AQ __pyx_string_tab[61] +#define __pyx_kp_b_iso88591_4uCt_T_U_1_6_V4xt6_Q __pyx_string_tab[62] +#define __pyx_kp_b_iso88591_6a_xr_Jaq_4vQ_4vQ_A __pyx_string_tab[63] +#define __pyx_kp_b_iso88591_9_1_AQ __pyx_string_tab[64] +#define __pyx_kp_b_iso88591_C1_xr_Jaq_4vQ_4vQ_q_A __pyx_string_tab[65] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[66] +#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[67] +#define __pyx_float_10e0 __pyx_number_tab[0] +#define __pyx_float_10e1 __pyx_number_tab[1] +#define __pyx_float_10e2 __pyx_number_tab[2] +#define __pyx_float_10e3 __pyx_number_tab[3] +#define __pyx_float_10e4 __pyx_number_tab[4] +#define __pyx_float_10e5 __pyx_number_tab[5] +#define __pyx_float_10e6 __pyx_number_tab[6] +#define __pyx_float_10e7 __pyx_number_tab[7] +#define __pyx_float_10e8 __pyx_number_tab[8] +#define __pyx_float_10e9 __pyx_number_tab[9] +#define __pyx_float_10eneg_1 __pyx_number_tab[10] +#define __pyx_float_10e10 __pyx_number_tab[11] +#define __pyx_float_10e11 __pyx_number_tab[12] +#define __pyx_float_10e12 __pyx_number_tab[13] +#define __pyx_float_10e13 __pyx_number_tab[14] +#define __pyx_float_10e14 __pyx_number_tab[15] +#define __pyx_float_10e15 __pyx_number_tab[16] +#define __pyx_float_10e16 __pyx_number_tab[17] +#define __pyx_float_10e17 __pyx_number_tab[18] +#define __pyx_float_10e18 __pyx_number_tab[19] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<68; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<20; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<68; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<20; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":30 + * + * + * cdef int64_t get_log10_round_to_floor(int64_t element): # <<<<<<<<<<<<<< + * cdef int power = 0 + * while element >= POWER_TEN[power]: +*/ + +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_get_log10_round_to_floor(int64_t __pyx_v_element) { + int __pyx_v_power; + int64_t __pyx_r; + int __pyx_t_1; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":31 + * + * cdef int64_t get_log10_round_to_floor(int64_t element): + * cdef int power = 0 # <<<<<<<<<<<<<< + * while element >= POWER_TEN[power]: + * power += 1 +*/ + __pyx_v_power = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":32 + * cdef int64_t get_log10_round_to_floor(int64_t element): + * cdef int power = 0 + * while element >= POWER_TEN[power]: # <<<<<<<<<<<<<< + * power += 1 + * return power - 1 +*/ + while (1) { + __pyx_t_1 = (__pyx_v_element >= (__pyx_v_11apache_beam_10transforms_32cy_dataflow_distribution_counter_POWER_TEN[__pyx_v_power])); + if (!__pyx_t_1) break; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":33 + * cdef int power = 0 + * while element >= POWER_TEN[power]: + * power += 1 # <<<<<<<<<<<<<< + * return power - 1 + * +*/ + __pyx_v_power = (__pyx_v_power + 1); + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":34 + * while element >= POWER_TEN[power]: + * power += 1 + * return power - 1 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = (__pyx_v_power - 1); + goto __pyx_L0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":30 + * + * + * cdef int64_t get_log10_round_to_floor(int64_t element): # <<<<<<<<<<<<<< + * cdef int power = 0 + * while element >= POWER_TEN[power]: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":53 + * is_cythonized: mark whether DataflowDistributionCounter cythonized. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * self.min = INT64_MAX + * self.max = 0 +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter___init__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter___init__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + int __pyx_r; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":54 + * """ + * def __init__(self): + * self.min = INT64_MAX # <<<<<<<<<<<<<< + * self.max = 0 + * self.count = 0 +*/ + __pyx_v_self->min = INT64_MAX; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":55 + * def __init__(self): + * self.min = INT64_MAX + * self.max = 0 # <<<<<<<<<<<<<< + * self.count = 0 + * self.sum = 0 +*/ + __pyx_v_self->max = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":56 + * self.min = INT64_MAX + * self.max = 0 + * self.count = 0 # <<<<<<<<<<<<<< + * self.sum = 0 + * self.buckets = calloc(MAX_BUCKET_SIZE, sizeof(int64_t)) +*/ + __pyx_v_self->count = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":57 + * self.max = 0 + * self.count = 0 + * self.sum = 0 # <<<<<<<<<<<<<< + * self.buckets = calloc(MAX_BUCKET_SIZE, sizeof(int64_t)) + * self.is_cythonized = True +*/ + __pyx_v_self->sum = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":58 + * self.count = 0 + * self.sum = 0 + * self.buckets = calloc(MAX_BUCKET_SIZE, sizeof(int64_t)) # <<<<<<<<<<<<<< + * self.is_cythonized = True + * +*/ + __pyx_v_self->buckets = ((int64_t *)calloc(__pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE, (sizeof(int64_t)))); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":59 + * self.sum = 0 + * self.buckets = calloc(MAX_BUCKET_SIZE, sizeof(int64_t)) + * self.is_cythonized = True # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_v_self->is_cythonized = 1; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":53 + * is_cythonized: mark whether DataflowDistributionCounter cythonized. + * """ + * def __init__(self): # <<<<<<<<<<<<<< + * self.min = INT64_MAX + * self.max = 0 +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":61 + * self.is_cythonized = True + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * """free allocated memory""" + * free(self.buckets) +*/ + +/* Python wrapper */ +static void __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_2__dealloc__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_2__dealloc__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":63 + * def __dealloc__(self): + * """free allocated memory""" + * free(self.buckets) # <<<<<<<<<<<<<< + * + * cpdef bint add_input(self, int64_t element) except -1: +*/ + free(__pyx_v_self->buckets); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":61 + * self.is_cythonized = True + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * """free allocated memory""" + * free(self.buckets) +*/ + + /* function exit code */ +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":65 + * free(self.buckets) + * + * cpdef bint add_input(self, int64_t element) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + int64_t __pyx_v_bucket_index; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_t_7; + int64_t __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_7; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":66 + * + * cpdef bint add_input(self, int64_t element) except -1: + * if element < 0: # <<<<<<<<<<<<<< + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) +*/ + __pyx_t_7 = (__pyx_v_element < 0); + if (unlikely(__pyx_t_7)) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":67 + * cpdef bint add_input(self, int64_t element) except -1: + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') # <<<<<<<<<<<<<< + * self.min = min(self.min, element) + * self.max = max(self.max, element) +*/ + __pyx_t_2 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Distribution_counters_support_on}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 67, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":66 + * + * cpdef bint add_input(self, int64_t element) except -1: + * if element < 0: # <<<<<<<<<<<<<< + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) +*/ + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":68 + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) # <<<<<<<<<<<<<< + * self.max = max(self.max, element) + * self.count += 1 +*/ + __pyx_t_8 = __pyx_v_element; + __pyx_t_9 = __pyx_v_self->min; + __pyx_t_7 = (__pyx_t_8 < __pyx_t_9); + if (__pyx_t_7) { + __pyx_t_10 = __pyx_t_8; + } else { + __pyx_t_10 = __pyx_t_9; + } + __pyx_v_self->min = __pyx_t_10; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":69 + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) + * self.max = max(self.max, element) # <<<<<<<<<<<<<< + * self.count += 1 + * self.sum += element +*/ + __pyx_t_10 = __pyx_v_element; + __pyx_t_8 = __pyx_v_self->max; + __pyx_t_7 = (__pyx_t_10 > __pyx_t_8); + if (__pyx_t_7) { + __pyx_t_9 = __pyx_t_10; + } else { + __pyx_t_9 = __pyx_t_8; + } + __pyx_v_self->max = __pyx_t_9; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":70 + * self.min = min(self.min, element) + * self.max = max(self.max, element) + * self.count += 1 # <<<<<<<<<<<<<< + * self.sum += element + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) +*/ + __pyx_v_self->count = (__pyx_v_self->count + 1); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":71 + * self.max = max(self.max, element) + * self.count += 1 + * self.sum += element # <<<<<<<<<<<<<< + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) + * self.buckets[bucket_index] += 1 +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + __pyx_v_element); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":72 + * self.count += 1 + * self.sum += element + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) # <<<<<<<<<<<<<< + * self.buckets[bucket_index] += 1 + * +*/ + __pyx_t_9 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->__pyx_vtab)->_fast_calculate_bucket_index(__pyx_v_self, __pyx_v_element); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_v_bucket_index = __pyx_t_9; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":73 + * self.sum += element + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) + * self.buckets[bucket_index] += 1 # <<<<<<<<<<<<<< + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: +*/ + __pyx_t_9 = __pyx_v_bucket_index; + (__pyx_v_self->buckets[__pyx_t_9]) = ((__pyx_v_self->buckets[__pyx_t_9]) + 1); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":65 + * free(self.buckets) + * + * cpdef bint add_input(self, int64_t element) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 65, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 65, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 65, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, i); __PYX_ERR(0, 65, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 65, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 65, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 65, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_4add_input(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_4add_input(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input(__pyx_v_self, __pyx_v_element, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":75 + * self.buckets[bucket_index] += 1 + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input_n(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int64_t __pyx_v_n, int __pyx_skip_dispatch) { + int64_t __pyx_v_bucket_index; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int64_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_input_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_8; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":76 + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: + * if element < 0: # <<<<<<<<<<<<<< + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) +*/ + __pyx_t_8 = (__pyx_v_element < 0); + if (unlikely(__pyx_t_8)) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":77 + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') # <<<<<<<<<<<<<< + * self.min = min(self.min, element) + * self.max = max(self.max, element) +*/ + __pyx_t_2 = NULL; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Distribution_counters_support_on}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 77, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":76 + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: + * if element < 0: # <<<<<<<<<<<<<< + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) +*/ + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":78 + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) # <<<<<<<<<<<<<< + * self.max = max(self.max, element) + * self.count += n +*/ + __pyx_t_9 = __pyx_v_element; + __pyx_t_10 = __pyx_v_self->min; + __pyx_t_8 = (__pyx_t_9 < __pyx_t_10); + if (__pyx_t_8) { + __pyx_t_11 = __pyx_t_9; + } else { + __pyx_t_11 = __pyx_t_10; + } + __pyx_v_self->min = __pyx_t_11; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":79 + * raise ValueError('Distribution counters support only non-negative value') + * self.min = min(self.min, element) + * self.max = max(self.max, element) # <<<<<<<<<<<<<< + * self.count += n + * self.sum += element*n +*/ + __pyx_t_11 = __pyx_v_element; + __pyx_t_9 = __pyx_v_self->max; + __pyx_t_8 = (__pyx_t_11 > __pyx_t_9); + if (__pyx_t_8) { + __pyx_t_10 = __pyx_t_11; + } else { + __pyx_t_10 = __pyx_t_9; + } + __pyx_v_self->max = __pyx_t_10; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":80 + * self.min = min(self.min, element) + * self.max = max(self.max, element) + * self.count += n # <<<<<<<<<<<<<< + * self.sum += element*n + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) +*/ + __pyx_v_self->count = (__pyx_v_self->count + __pyx_v_n); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":81 + * self.max = max(self.max, element) + * self.count += n + * self.sum += element*n # <<<<<<<<<<<<<< + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) + * self.buckets[bucket_index] += n +*/ + __pyx_v_self->sum = (__pyx_v_self->sum + (__pyx_v_element * __pyx_v_n)); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":82 + * self.count += n + * self.sum += element*n + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) # <<<<<<<<<<<<<< + * self.buckets[bucket_index] += n + * +*/ + __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->__pyx_vtab)->_fast_calculate_bucket_index(__pyx_v_self, __pyx_v_element); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_v_bucket_index = __pyx_t_10; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":83 + * self.sum += element*n + * cdef int64_t bucket_index = self._fast_calculate_bucket_index(element) + * self.buckets[bucket_index] += n # <<<<<<<<<<<<<< + * + * cdef int64_t _fast_calculate_bucket_index(self, int64_t element): +*/ + __pyx_t_10 = __pyx_v_bucket_index; + (__pyx_v_self->buckets[__pyx_t_10]) = ((__pyx_v_self->buckets[__pyx_t_10]) + __pyx_v_n); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":75 + * self.buckets[bucket_index] += 1 + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n = {"add_input_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + int64_t __pyx_v_n; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 75, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input_n", 0) < (0)) __PYX_ERR(0, 75, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, i); __PYX_ERR(0, 75, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 75, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 75, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_v_n = __Pyx_PyLong_As_int64_t(values[1]); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 75, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_6add_input_n(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_element, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_6add_input_n(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int64_t __pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input_n", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input_n(__pyx_v_self, __pyx_v_element, __pyx_v_n, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_input_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":85 + * self.buckets[bucket_index] += n + * + * cdef int64_t _fast_calculate_bucket_index(self, int64_t element): # <<<<<<<<<<<<<< + * """Calculate the bucket index for the given element. + * +*/ + +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter__fast_calculate_bucket_index(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element) { + int64_t __pyx_v_log10_floor; + int64_t __pyx_v_power_of_ten; + int64_t __pyx_v_bucket_offset; + int64_t __pyx_r; + int __pyx_t_1; + int64_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":91 + * since cpdef will have significant overhead. + * """ + * if element == 0: # <<<<<<<<<<<<<< + * return 0 + * cdef int64_t log10_floor = get_log10_round_to_floor(element) +*/ + __pyx_t_1 = (__pyx_v_element == 0); + if (__pyx_t_1) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":92 + * """ + * if element == 0: + * return 0 # <<<<<<<<<<<<<< + * cdef int64_t log10_floor = get_log10_round_to_floor(element) + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":91 + * since cpdef will have significant overhead. + * """ + * if element == 0: # <<<<<<<<<<<<<< + * return 0 + * cdef int64_t log10_floor = get_log10_round_to_floor(element) +*/ + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":93 + * if element == 0: + * return 0 + * cdef int64_t log10_floor = get_log10_round_to_floor(element) # <<<<<<<<<<<<<< + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] + * cdef int64_t bucket_offset = 0 +*/ + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_get_log10_round_to_floor(__pyx_v_element); if (unlikely(__pyx_t_2 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_v_log10_floor = __pyx_t_2; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":94 + * return 0 + * cdef int64_t log10_floor = get_log10_round_to_floor(element) + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] # <<<<<<<<<<<<<< + * cdef int64_t bucket_offset = 0 + * if element < power_of_ten * 2: +*/ + __pyx_v_power_of_ten = (__pyx_v_11apache_beam_10transforms_32cy_dataflow_distribution_counter_POWER_TEN[__pyx_v_log10_floor]); + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":95 + * cdef int64_t log10_floor = get_log10_round_to_floor(element) + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] + * cdef int64_t bucket_offset = 0 # <<<<<<<<<<<<<< + * if element < power_of_ten * 2: + * bucket_offset = 0 +*/ + __pyx_v_bucket_offset = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":96 + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] + * cdef int64_t bucket_offset = 0 + * if element < power_of_ten * 2: # <<<<<<<<<<<<<< + * bucket_offset = 0 + * elif element < power_of_ten * 5: +*/ + __pyx_t_1 = (__pyx_v_element < (__pyx_v_power_of_ten * 2)); + if (__pyx_t_1) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":97 + * cdef int64_t bucket_offset = 0 + * if element < power_of_ten * 2: + * bucket_offset = 0 # <<<<<<<<<<<<<< + * elif element < power_of_ten * 5: + * bucket_offset = 1 +*/ + __pyx_v_bucket_offset = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":96 + * cdef int64_t power_of_ten = POWER_TEN[log10_floor] + * cdef int64_t bucket_offset = 0 + * if element < power_of_ten * 2: # <<<<<<<<<<<<<< + * bucket_offset = 0 + * elif element < power_of_ten * 5: +*/ + goto __pyx_L4; + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":98 + * if element < power_of_ten * 2: + * bucket_offset = 0 + * elif element < power_of_ten * 5: # <<<<<<<<<<<<<< + * bucket_offset = 1 + * else: +*/ + __pyx_t_1 = (__pyx_v_element < (__pyx_v_power_of_ten * 5)); + if (__pyx_t_1) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":99 + * bucket_offset = 0 + * elif element < power_of_ten * 5: + * bucket_offset = 1 # <<<<<<<<<<<<<< + * else: + * bucket_offset = 2 +*/ + __pyx_v_bucket_offset = 1; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":98 + * if element < power_of_ten * 2: + * bucket_offset = 0 + * elif element < power_of_ten * 5: # <<<<<<<<<<<<<< + * bucket_offset = 1 + * else: +*/ + goto __pyx_L4; + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":101 + * bucket_offset = 1 + * else: + * bucket_offset = 2 # <<<<<<<<<<<<<< + * return 1 + log10_floor * BUCKET_PER_TEN + bucket_offset + * +*/ + /*else*/ { + __pyx_v_bucket_offset = 2; + } + __pyx_L4:; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":102 + * else: + * bucket_offset = 2 + * return 1 + log10_floor * BUCKET_PER_TEN + bucket_offset # <<<<<<<<<<<<<< + * + * cpdef void translate_to_histogram(self, histogram): +*/ + __pyx_r = ((1 + (__pyx_v_log10_floor * __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_BUCKET_PER_TEN)) + __pyx_v_bucket_offset); + goto __pyx_L0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":85 + * self.buckets[bucket_index] += n + * + * cdef int64_t _fast_calculate_bucket_index(self, int64_t element): # <<<<<<<<<<<<<< + * """Calculate the bucket index for the given element. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter._fast_calculate_bucket_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":104 + * return 1 + log10_floor * BUCKET_PER_TEN + bucket_offset + * + * cpdef void translate_to_histogram(self, histogram): # <<<<<<<<<<<<<< + * """Translate buckets into Histogram. + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static void __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_translate_to_histogram(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_histogram, int __pyx_skip_dispatch) { + int __pyx_v_first_bucket_offset; + int __pyx_v_last_bucket_offset; + int __pyx_v_index; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + long __pyx_t_10; + long __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("translate_to_histogram", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_translate_to_histogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_histogram}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":112 + * dataflow service. + * """ + * cdef int first_bucket_offset = 0 # <<<<<<<<<<<<<< + * cdef int last_bucket_offset = 0 + * cdef int index = 0 +*/ + __pyx_v_first_bucket_offset = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":113 + * """ + * cdef int first_bucket_offset = 0 + * cdef int last_bucket_offset = 0 # <<<<<<<<<<<<<< + * cdef int index = 0 + * for index in range(0, MAX_BUCKET_SIZE): +*/ + __pyx_v_last_bucket_offset = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":114 + * cdef int first_bucket_offset = 0 + * cdef int last_bucket_offset = 0 + * cdef int index = 0 # <<<<<<<<<<<<<< + * for index in range(0, MAX_BUCKET_SIZE): + * if self.buckets[index] != 0: +*/ + __pyx_v_index = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":115 + * cdef int last_bucket_offset = 0 + * cdef int index = 0 + * for index in range(0, MAX_BUCKET_SIZE): # <<<<<<<<<<<<<< + * if self.buckets[index] != 0: + * first_bucket_offset = index +*/ + __pyx_t_6 = __pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE; + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_index = __pyx_t_8; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":116 + * cdef int index = 0 + * for index in range(0, MAX_BUCKET_SIZE): + * if self.buckets[index] != 0: # <<<<<<<<<<<<<< + * first_bucket_offset = index + * break +*/ + __pyx_t_9 = ((__pyx_v_self->buckets[__pyx_v_index]) != 0); + if (__pyx_t_9) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":117 + * for index in range(0, MAX_BUCKET_SIZE): + * if self.buckets[index] != 0: + * first_bucket_offset = index # <<<<<<<<<<<<<< + * break + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): +*/ + __pyx_v_first_bucket_offset = __pyx_v_index; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":118 + * if self.buckets[index] != 0: + * first_bucket_offset = index + * break # <<<<<<<<<<<<<< + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): + * if self.buckets[index] != 0: +*/ + goto __pyx_L4_break; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":116 + * cdef int index = 0 + * for index in range(0, MAX_BUCKET_SIZE): + * if self.buckets[index] != 0: # <<<<<<<<<<<<<< + * first_bucket_offset = index + * break +*/ + } + } + __pyx_L4_break:; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":119 + * first_bucket_offset = index + * break + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): # <<<<<<<<<<<<<< + * if self.buckets[index] != 0: + * last_bucket_offset = index +*/ + for (__pyx_t_8 = (__pyx_e_11apache_beam_10transforms_32cy_dataflow_distribution_counter_MAX_BUCKET_SIZE - 1); __pyx_t_8 > -1; __pyx_t_8-=1) { + __pyx_v_index = __pyx_t_8; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":120 + * break + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): + * if self.buckets[index] != 0: # <<<<<<<<<<<<<< + * last_bucket_offset = index + * break +*/ + __pyx_t_9 = ((__pyx_v_self->buckets[__pyx_v_index]) != 0); + if (__pyx_t_9) { + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":121 + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): + * if self.buckets[index] != 0: + * last_bucket_offset = index # <<<<<<<<<<<<<< + * break + * histogram.firstBucketOffset = first_bucket_offset +*/ + __pyx_v_last_bucket_offset = __pyx_v_index; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":122 + * if self.buckets[index] != 0: + * last_bucket_offset = index + * break # <<<<<<<<<<<<<< + * histogram.firstBucketOffset = first_bucket_offset + * histogram.bucketCounts = [] +*/ + goto __pyx_L7_break; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":120 + * break + * for index in range(MAX_BUCKET_SIZE - 1, -1, -1): + * if self.buckets[index] != 0: # <<<<<<<<<<<<<< + * last_bucket_offset = index + * break +*/ + } + } + __pyx_L7_break:; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":123 + * last_bucket_offset = index + * break + * histogram.firstBucketOffset = first_bucket_offset # <<<<<<<<<<<<<< + * histogram.bucketCounts = [] + * for index in range(first_bucket_offset, last_bucket_offset + 1): +*/ + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_first_bucket_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_histogram, __pyx_mstate_global->__pyx_n_u_firstBucketOffset, __pyx_t_1) < (0)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":124 + * break + * histogram.firstBucketOffset = first_bucket_offset + * histogram.bucketCounts = [] # <<<<<<<<<<<<<< + * for index in range(first_bucket_offset, last_bucket_offset + 1): + * histogram.bucketCounts.append(self.buckets[index]) +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_histogram, __pyx_mstate_global->__pyx_n_u_bucketCounts, __pyx_t_1) < (0)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":125 + * histogram.firstBucketOffset = first_bucket_offset + * histogram.bucketCounts = [] + * for index in range(first_bucket_offset, last_bucket_offset + 1): # <<<<<<<<<<<<<< + * histogram.bucketCounts.append(self.buckets[index]) + * +*/ + __pyx_t_10 = (__pyx_v_last_bucket_offset + 1); + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_8 = __pyx_v_first_bucket_offset; __pyx_t_8 < __pyx_t_11; __pyx_t_8+=1) { + __pyx_v_index = __pyx_t_8; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":126 + * histogram.bucketCounts = [] + * for index in range(first_bucket_offset, last_bucket_offset + 1): + * histogram.bucketCounts.append(self.buckets[index]) # <<<<<<<<<<<<<< + * + * cpdef bint add_inputs_for_test(self, elements) except -1: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_histogram, __pyx_mstate_global->__pyx_n_u_bucketCounts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t((__pyx_v_self->buckets[__pyx_v_index])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":104 + * return 1 + log10_floor * BUCKET_PER_TEN + bucket_offset + * + * cpdef void translate_to_histogram(self, histogram): # <<<<<<<<<<<<<< + * """Translate buckets into Histogram. + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.translate_to_histogram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_8translate_to_histogram, "Translate buckets into Histogram.\n\n Args:\n histogram: apache_beam.runners.dataflow.internal.clents.dataflow.Histogram\n Ideally, only call this function when reporting counter to\n dataflow service.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram = {"translate_to_histogram", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_8translate_to_histogram}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_histogram = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("translate_to_histogram (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_histogram,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 104, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "translate_to_histogram", 0) < (0)) __PYX_ERR(0, 104, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("translate_to_histogram", 1, 1, 1, i); __PYX_ERR(0, 104, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + } + __pyx_v_histogram = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("translate_to_histogram", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.translate_to_histogram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_8translate_to_histogram(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_histogram); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_8translate_to_histogram(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_histogram) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("translate_to_histogram", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_translate_to_histogram(__pyx_v_self, __pyx_v_histogram, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.translate_to_histogram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":128 + * histogram.bucketCounts.append(self.buckets[index]) + * + * cpdef bint add_inputs_for_test(self, elements) except -1: # <<<<<<<<<<<<<< + * """Used for performance microbenchmark. + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_inputs_for_test(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_elements, int __pyx_skip_dispatch) { + PyObject *__pyx_v_element = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + int64_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_inputs_for_test", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_inputs_for_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_elements}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":135 + * Directly calling cpdef from def will cause significant overhead. + * """ + * for element in elements: # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) { + __pyx_t_1 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 135, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 135, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 135, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":136 + * """ + * for element in elements: + * self.add_input(element) # <<<<<<<<<<<<<< + * + * cpdef int64_t calculate_bucket_index(self, int64_t element): +*/ + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_v_element); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->__pyx_vtab)->add_input(__pyx_v_self, __pyx_t_9, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 136, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":135 + * Directly calling cpdef from def will cause significant overhead. + * """ + * for element in elements: # <<<<<<<<<<<<<< + * self.add_input(element) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":128 + * histogram.bucketCounts.append(self.buckets[index]) + * + * cpdef bint add_inputs_for_test(self, elements) except -1: # <<<<<<<<<<<<<< + * """Used for performance microbenchmark. + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_inputs_for_test", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_element); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_10add_inputs_for_test, "Used for performance microbenchmark.\n\n During runtime, add_input will be called through c-call, so we want to have\n the same calling routine when running microbenchmark as application runtime.\n Directly calling cpdef from def will cause significant overhead.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test = {"add_inputs_for_test", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_10add_inputs_for_test}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_elements = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_inputs_for_test (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elements,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 128, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 128, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_inputs_for_test", 0) < (0)) __PYX_ERR(0, 128, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_inputs_for_test", 1, 1, 1, i); __PYX_ERR(0, 128, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 128, __pyx_L3_error) + } + __pyx_v_elements = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_inputs_for_test", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 128, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_inputs_for_test", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_10add_inputs_for_test(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_elements); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_10add_inputs_for_test(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_elements) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_inputs_for_test", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_inputs_for_test(__pyx_v_self, __pyx_v_elements, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.add_inputs_for_test", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":138 + * self.add_input(element) + * + * cpdef int64_t calculate_bucket_index(self, int64_t element): # <<<<<<<<<<<<<< + * """Used for unit tests. + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int64_t __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_calculate_bucket_index(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element, int __pyx_skip_dispatch) { + int64_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int64_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("calculate_bucket_index", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_calculate_bucket_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_7; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":143 + * cdef calculate_bucket_index cannot be called directly from def. + * """ + * return self._fast_calculate_bucket_index(element) # <<<<<<<<<<<<<< + * + * cpdef tuple extract_output(self): +*/ + __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self->__pyx_vtab)->_fast_calculate_bucket_index(__pyx_v_self, __pyx_v_element); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_r = __pyx_t_7; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":138 + * self.add_input(element) + * + * cpdef int64_t calculate_bucket_index(self, int64_t element): # <<<<<<<<<<<<<< + * """Used for unit tests. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.calculate_bucket_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_12calculate_bucket_index, "Used for unit tests.\n\n cdef calculate_bucket_index cannot be called directly from def.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index = {"calculate_bucket_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_12calculate_bucket_index}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int64_t __pyx_v_element; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("calculate_bucket_index (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 138, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "calculate_bucket_index", 0) < (0)) __PYX_ERR(0, 138, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("calculate_bucket_index", 1, 1, 1, i); __PYX_ERR(0, 138, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 138, __pyx_L3_error) + } + __pyx_v_element = __Pyx_PyLong_As_int64_t(values[0]); if (unlikely((__pyx_v_element == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("calculate_bucket_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 138, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.calculate_bucket_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_12calculate_bucket_index(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_12calculate_bucket_index(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int64_t __pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("calculate_bucket_index", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_calculate_bucket_index(__pyx_v_self, __pyx_v_element, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.calculate_bucket_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":145 + * return self._fast_calculate_bucket_index(element) + * + * cpdef tuple extract_output(self): # <<<<<<<<<<<<<< + * mean = self.sum // self.count if self.count else float('nan') + * return mean, self.sum, self.count, self.min, self.max +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_extract_output(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, int __pyx_skip_dispatch) { + double __pyx_v_mean; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + double __pyx_t_6; + int __pyx_t_7; + double __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_extract_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":146 + * + * cpdef tuple extract_output(self): + * mean = self.sum // self.count if self.count else float('nan') # <<<<<<<<<<<<<< + * return mean, self.sum, self.count, self.min, self.max + * +*/ + __pyx_t_7 = (__pyx_v_self->count != 0); + if (__pyx_t_7) { + if (unlikely(__pyx_v_self->count == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 146, __pyx_L1_error) + } + else if (sizeof(int64_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(__pyx_v_self->count == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->sum))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(0, 146, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_div_int64_t(__pyx_v_self->sum, __pyx_v_self->count, 0); + } else { + __pyx_t_8 = __Pyx_PyUnicode_AsDouble(__pyx_mstate_global->__pyx_n_u_nan); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_8, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_6 = __pyx_t_8; + } + __pyx_v_mean = __pyx_t_6; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":147 + * cpdef tuple extract_output(self): + * mean = self.sum // self.count if self.count else float('nan') + * return mean, self.sum, self.count, self.min, self.max # <<<<<<<<<<<<<< + * + * cpdef merge(self, accumulators): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_mean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_3) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_9) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_9 = 0; + __pyx_r = ((PyObject*)__pyx_t_10); + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":145 + * return self._fast_calculate_bucket_index(element) + * + * cpdef tuple extract_output(self): # <<<<<<<<<<<<<< + * mean = self.sum // self.count if self.count else float('nan') + * return mean, self.sum, self.count, self.min, self.max +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("extract_output", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_14extract_output(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_14extract_output(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_extract_output(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":149 + * return mean, self.sum, self.count, self.min, self.max + * + * cpdef merge(self, accumulators): # <<<<<<<<<<<<<< + * raise NotImplementedError() +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_merge(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_accumulators, int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_accumulators}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":150 + * + * cpdef merge(self, accumulators): + * raise NotImplementedError() # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 150, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":149 + * return mean, self.sum, self.count, self.min, self.max + * + * cpdef merge(self, accumulators): # <<<<<<<<<<<<<< + * raise NotImplementedError() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge = {"merge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 149, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 149, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge", 0) < (0)) __PYX_ERR(0, 149, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, i); __PYX_ERR(0, 149, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 149, __pyx_L3_error) + } + __pyx_v_accumulators = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 149, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_16merge(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_16merge(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_merge(__pyx_v_self, __pyx_v_accumulators, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":33 + * + * cdef class DataflowDistributionCounter(object): + * cdef public int64_t min # <<<<<<<<<<<<<< + * cdef public int64_t max + * cdef public int64_t count +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min___get__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->min); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.min.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_2__set__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 33, __pyx_L1_error) + __pyx_v_self->min = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.min.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":34 + * cdef class DataflowDistributionCounter(object): + * cdef public int64_t min + * cdef public int64_t max # <<<<<<<<<<<<<< + * cdef public int64_t count + * cdef public int64_t sum +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max___get__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->max); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_2__set__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 34, __pyx_L1_error) + __pyx_v_self->max = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.max.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":35 + * cdef public int64_t min + * cdef public int64_t max + * cdef public int64_t count # <<<<<<<<<<<<<< + * cdef public int64_t sum + * cdef int64_t* buckets +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count___get__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_2__set__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L1_error) + __pyx_v_self->count = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":36 + * cdef public int64_t max + * cdef public int64_t count + * cdef public int64_t sum # <<<<<<<<<<<<<< + * cdef int64_t* buckets + * cdef public bint is_cythonized +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum___get__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.sum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_2__set__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_v_self->sum = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.sum.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/transforms/cy_dataflow_distribution_counter.pxd":38 + * cdef public int64_t sum + * cdef int64_t* buckets + * cdef public bint is_cythonized # <<<<<<<<<<<<<< + * cpdef bint add_input(self, int64_t element) except -1 + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized___get__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized___get__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_cythonized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.is_cythonized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_2__set__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_2__set__(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 38, __pyx_L1_error) + __pyx_v_self->is_cythonized = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.is_cythonized.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_18__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_buckets_cannot_be_converted, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_20__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_buckets_cannot_be_converted, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_min(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_min(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3min_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_max(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_max(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3max_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_count(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5count_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_sum(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_sum(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_3sum_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_is_cythonized(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_is_cythonized(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13is_cythonized_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter[] = { + {"min", __pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_min, __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_min, 0, 0}, + {"max", __pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_max, __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_max, 0, 0}, + {"count", __pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_count, __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_count, 0, 0}, + {"sum", __pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_sum, __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_sum, 0, 0}, + {"is_cythonized", __pyx_getprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_is_cythonized, __pyx_setprop_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_is_cythonized, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter}, + {Py_tp_doc, (void *)PyDoc_STR("Distribution Counter:\n\n Contains value distribution statistics and methods for incrementing.\n\n Currently using special bucketing strategy suitable for Dataflow\n\n Attributes:\n min: minimum value of all inputs.\n max: maximum value of all inputs.\n count: total count of all inputs.\n sum: sum of all inputs.\n buckets: histogram buckets of value counts for a\n distribution(1,2,5 bucketing). Max bucket_index is 58( sys.maxint as input).\n is_cythonized: mark whether DataflowDistributionCounter cythonized.\n ")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter_spec = { + "apache_beam.transforms.cy_dataflow_distribution_counter.DataflowDistributionCounter", + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.cy_dataflow_distribution_counter.""DataflowDistributionCounter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("Distribution Counter:\n\n Contains value distribution statistics and methods for incrementing.\n\n Currently using special bucketing strategy suitable for Dataflow\n\n Attributes:\n min: minimum value of all inputs.\n max: maximum value of all inputs.\n count: total count of all inputs.\n sum: sum of all inputs.\n buckets: histogram buckets of value counts for a\n distribution(1,2,5 bucketing). Max bucket_index is 58( sys.maxint as input).\n is_cythonized: mark whether DataflowDistributionCounter cythonized.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = &__pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.add_input = (int (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.add_input_n = (int (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_input_n; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter._fast_calculate_bucket_index = (int64_t (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter__fast_calculate_bucket_index; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.translate_to_histogram = (void (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_translate_to_histogram; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.add_inputs_for_test = (int (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_add_inputs_for_test; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.calculate_bucket_index = (int64_t (*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int64_t, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_calculate_bucket_index; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.extract_output = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_extract_output; + __pyx_vtable_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter.merge = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_merge; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter)) __PYX_ERR(0, 37, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter = &__pyx_type_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_vtabptr_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cy_dataflow_distribution_counter(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cy_dataflow_distribution_counter}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cy_dataflow_distribution_counter", + __pyx_k_For_internal_use_only_No_backwa, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cy_dataflow_distribution_counter(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cy_dataflow_distribution_counter(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cy_dataflow_distribution_counter(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + unsigned PY_LONG_LONG __pyx_t_2; + unsigned PY_LONG_LONG __pyx_t_3; + unsigned PY_LONG_LONG __pyx_t_4; + unsigned PY_LONG_LONG __pyx_t_5; + unsigned PY_LONG_LONG __pyx_t_6; + unsigned PY_LONG_LONG __pyx_t_7; + unsigned PY_LONG_LONG __pyx_t_8; + unsigned PY_LONG_LONG __pyx_t_9; + unsigned PY_LONG_LONG __pyx_t_10; + unsigned PY_LONG_LONG __pyx_t_11; + unsigned PY_LONG_LONG __pyx_t_12; + unsigned PY_LONG_LONG __pyx_t_13; + unsigned PY_LONG_LONG __pyx_t_14; + unsigned PY_LONG_LONG __pyx_t_15; + unsigned PY_LONG_LONG __pyx_t_16; + unsigned PY_LONG_LONG __pyx_t_17; + unsigned PY_LONG_LONG __pyx_t_18; + unsigned PY_LONG_LONG __pyx_t_19; + unsigned PY_LONG_LONG __pyx_t_20; + unsigned PY_LONG_LONG __pyx_t_21; + static unsigned PY_LONG_LONG __pyx_t_22[20]; + PyObject *__pyx_t_23 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cy_dataflow_distribution_counter' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cy_dataflow_distribution_counter" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_cy_dataflow_distribution_counter", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__transforms__cy_dataflow_distribution_counter) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.transforms.cy_dataflow_distribution_counter")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.transforms.cy_dataflow_distribution_counter", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":24 + * + * + * cdef unsigned long long* POWER_TEN = [10e-1, 10e0, 10e1, 10e2, 10e3, 10e4, 10e5, # <<<<<<<<<<<<<< + * 10e6, 10e7, 10e8, 10e9, 10e10, 10e11, + * 10e12, 10e13, 10e14, 10e15, 10e16, 10e17, +*/ + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10eneg_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e0); if (unlikely((__pyx_t_3 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e1); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e2); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e3); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e4); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e5); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":25 + * + * cdef unsigned long long* POWER_TEN = [10e-1, 10e0, 10e1, 10e2, 10e3, 10e4, 10e5, + * 10e6, 10e7, 10e8, 10e9, 10e10, 10e11, # <<<<<<<<<<<<<< + * 10e12, 10e13, 10e14, 10e15, 10e16, 10e17, + * 10e18] +*/ + __pyx_t_9 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e6); if (unlikely((__pyx_t_9 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e7); if (unlikely((__pyx_t_10 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e8); if (unlikely((__pyx_t_11 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e9); if (unlikely((__pyx_t_12 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e10); if (unlikely((__pyx_t_13 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e11); if (unlikely((__pyx_t_14 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":26 + * cdef unsigned long long* POWER_TEN = [10e-1, 10e0, 10e1, 10e2, 10e3, 10e4, 10e5, + * 10e6, 10e7, 10e8, 10e9, 10e10, 10e11, + * 10e12, 10e13, 10e14, 10e15, 10e16, 10e17, # <<<<<<<<<<<<<< + * 10e18] + * +*/ + __pyx_t_15 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e12); if (unlikely((__pyx_t_15 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e13); if (unlikely((__pyx_t_16 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e14); if (unlikely((__pyx_t_17 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e15); if (unlikely((__pyx_t_18 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e16); if (unlikely((__pyx_t_19 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e17); if (unlikely((__pyx_t_20 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":27 + * 10e6, 10e7, 10e8, 10e9, 10e10, 10e11, + * 10e12, 10e13, 10e14, 10e15, 10e16, 10e17, + * 10e18] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_21 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_mstate_global->__pyx_float_10e18); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L1_error) + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":24 + * + * + * cdef unsigned long long* POWER_TEN = [10e-1, 10e0, 10e1, 10e2, 10e3, 10e4, 10e5, # <<<<<<<<<<<<<< + * 10e6, 10e7, 10e8, 10e9, 10e10, 10e11, + * 10e12, 10e13, 10e14, 10e15, 10e16, 10e17, +*/ + __pyx_t_22[0] = __pyx_t_2; + __pyx_t_22[1] = __pyx_t_3; + __pyx_t_22[2] = __pyx_t_4; + __pyx_t_22[3] = __pyx_t_5; + __pyx_t_22[4] = __pyx_t_6; + __pyx_t_22[5] = __pyx_t_7; + __pyx_t_22[6] = __pyx_t_8; + __pyx_t_22[7] = __pyx_t_9; + __pyx_t_22[8] = __pyx_t_10; + __pyx_t_22[9] = __pyx_t_11; + __pyx_t_22[10] = __pyx_t_12; + __pyx_t_22[11] = __pyx_t_13; + __pyx_t_22[12] = __pyx_t_14; + __pyx_t_22[13] = __pyx_t_15; + __pyx_t_22[14] = __pyx_t_16; + __pyx_t_22[15] = __pyx_t_17; + __pyx_t_22[16] = __pyx_t_18; + __pyx_t_22[17] = __pyx_t_19; + __pyx_t_22[18] = __pyx_t_20; + __pyx_t_22[19] = __pyx_t_21; + __pyx_v_11apache_beam_10transforms_32cy_dataflow_distribution_counter_POWER_TEN = __pyx_t_22; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":65 + * free(self.buckets) + * + * cpdef bint add_input(self, int64_t element) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_5add_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_23) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":75 + * self.buckets[bucket_index] += 1 + * + * cpdef bint add_input_n(self, int64_t element, int64_t n) except -1: # <<<<<<<<<<<<<< + * if element < 0: + * raise ValueError('Distribution counters support only non-negative value') +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_7add_input_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_add_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_add_input_n, __pyx_t_23) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":104 + * return 1 + log10_floor * BUCKET_PER_TEN + bucket_offset + * + * cpdef void translate_to_histogram(self, histogram): # <<<<<<<<<<<<<< + * """Translate buckets into Histogram. + * +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_9translate_to_histogram, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_tran, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_translate_to_histogram, __pyx_t_23) < (0)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":128 + * histogram.bucketCounts.append(self.buckets[index]) + * + * cpdef bint add_inputs_for_test(self, elements) except -1: # <<<<<<<<<<<<<< + * """Used for performance microbenchmark. + * +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_11add_inputs_for_test, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_add_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_add_inputs_for_test, __pyx_t_23) < (0)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":138 + * self.add_input(element) + * + * cpdef int64_t calculate_bucket_index(self, int64_t element): # <<<<<<<<<<<<<< + * """Used for unit tests. + * +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_13calculate_bucket_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_calc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_calculate_bucket_index, __pyx_t_23) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":145 + * return self._fast_calculate_bucket_index(element) + * + * cpdef tuple extract_output(self): # <<<<<<<<<<<<<< + * mean = self.sum // self.count if self.count else float('nan') + * return mean, self.sum, self.count, self.min, self.max +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_15extract_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_extr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_23) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":149 + * return mean, self.sum, self.count, self.min, self.max + * + * cpdef merge(self, accumulators): # <<<<<<<<<<<<<< + * raise NotImplementedError() +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_17merge, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter_merg, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_32cy_dataflow_distribution_counter_DataflowDistributionCounter, __pyx_mstate_global->__pyx_n_u_merge, __pyx_t_23) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter___re, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_23)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_23) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "self.buckets cannot be converted to a Python object for pickling" +*/ + __pyx_t_23 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_32cy_dataflow_distribution_counter_27DataflowDistributionCounter_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounter___se, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_cy_datafl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_23)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_23) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "apache_beam/transforms/cy_dataflow_distribution_counter.pyx":1 + * # Licensed to the Apache Software Foundation (ASF) under one or more # <<<<<<<<<<<<<< + * # contributor license agreements. See the NOTICE file distributed with + * # this work for additional information regarding copyright ownership. +*/ + __pyx_t_23 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_23) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_23); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.transforms.cy_dataflow_distribution_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.transforms.cy_dataflow_distribution_counter"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 8; } index[] = {{1},{53},{59},{7},{6},{2},{9},{64},{14},{27},{45},{47},{37},{39},{47},{50},{42},{33},{50},{20},{12},{9},{11},{19},{55},{6},{18},{12},{22},{18},{7},{8},{14},{17},{8},{12},{9},{13},{5},{8},{5},{10},{1},{8},{3},{3},{11},{14},{12},{10},{17},{13},{4},{12},{10},{12},{19},{8},{22},{6},{150},{16},{46},{87},{23},{91},{10},{9}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (765 bytes) */ +const char* const cstring = "(\265/\375`\037\005\235\027\000\306\346\20180\221s\300\300\000B5h\001\017:T\004\360\n\016 \204\316Z\277L\212\336\"\333L\264\224(\311\213\245\\\035\013\033S\375Z\350\355f\230'\"%\351\267YXU\272\232\017k\000f\000r\000\336r\252\030\255,\277*\301$V\037\313\374\255\247h\235\230\237\260\257\224\312\211\335w\227\211O\"\215\363\233\335m\242\250;w\222\252\225'\352\254a*\247\311\227Y\257\346\305\355l\325.\225\366/:\351\247v\226)=\351\230\223)\314S\333K\224S\013Z)\266\342h\305\336V\317\303\027\273\326\237\342:1Z\267\307\247\315\376\335J\035\001\234.\224\026\250eC\t\006\261\303\031%\370\300\0315\341\t\210\312\246\274\362\201\276\316\300\030\002o\226y!w>\316f4\345\205\315\030\n!6\343(\214\020\000P\230\t\261nw\367sXj\236}\267\312\233\223\370\345S^\267W=\352\235\244\034\316j\313\256\373v\376[\337\r\325\335=)\326\272\337\257\246\221|\374\265\233v\237z\347\001\246L\361y6\243\206\345\021=\340K&\030\311\200d\217<\361y\006\306Q.\370:\002\000\0103\237WF\200\370\021e>2\036\021\342&\3046\243&sL`*\223r({^D>\203l?\025\213`3J\027F\200hr\201\\\030\255\017U \tT\311\240\2141z\205^)\256\206\026J\250\001~\006\311\370#}\005,S\313\243U\221 \222>\003\001\000\317\307\245qqZ\245p\024\206\2001_\202\214}uT\004_ 0\204(Tf\3358\300\350\025\200\272\026\342\237C\014\240\021\0010\003\2518\000 \035o\366B\t\014\301\203\253\017\230`@\311\010\250\275`}\033a\006X\027\370\022\306\257\3418=\036\252\260C\332@_\305\312\276\030@I\202\336\314\312\003\263}\231\r\214w\021Y\014\351\244\337\267\225\340:\224V\200\253\013hND\275\000\224\301d\006c\201\273\000\244\000\244q]\330\340@X\006\243\r\010D\264\006\\\325cy5ni\303\21408\007\010K\000\342\240\334\323\265\"\037\006\321@8,\007\217\321\342\3103AE\r(_\343*\006\353\002\240\006""\002\314\301\010\265\200\220\32154\276\216\231?\000d\035\300:(Y\356C\365\301P\237S\3661\260\002\257%\270\033\002!\354\302\344A\261\214S\300\257<\000\226C\302AY\003D>m3\362\031"; + PyObject *data = __Pyx_DecompressString(cstring, 765, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (857 bytes) */ +const char* const cstring = "BZh91AY&SY\254\365\323\201\000\000p\177\376\367\377\346\207t\237\2455\274\221\377@\277\377\377\342@@@@@@@@@\000@@@\000@\003\035\331\264H\003\030J\204\200\324i\264\332SF#@yM\250h\320d\320\006\200\r\006\231\032i\352m\251\016\006\215\030\203F\2310\203\020\030\214M\0324h\003M4\000\000\000jz\022\n~\244\365\036\247\2502\r\000\000\000\000\000\000\0004\323CA$@D\321\246!=\025?Jz\010\320\000\300&\232\000\003C\023M\251\243O(\323m\377*_\347\364s\372_\373:\027J\004\346\204\342\324I\301\320\275A\376\341\211\005\260\377\240\321\2748\270\304\241\203\007\242\242\t\254\203\000\226e\013\007\312\256\2145\027\326\243\247\336\275\177\014-1J\212M\351S\312N\002\324\360\321Ph\250\242\001\331\231\2458i\rl4\267P|\246\213\312F$\251N:\265.rAj*>5\203:\355\271\222\354\232\013\020&Ct $IK\023\225\331\247\332\301\031c\221\242\306\3575\362\301\317i\210\nlVR\225J \246\247\002\3637K\321\203\230\230\222\365P\023`\361KUcb\200G\030@.E\001\030B\251+\030\311\016\231\356\203330\300]\2313Dc\272q\265\265V\363\235\315e(\364\200+\260::K\313\n&\223\270R/\257\366\020\304W@\303\035f\327\2327\361\267f\343\223\340\r\2606\372\220\261x\322x\355\007S\326\360Ew\322\333X{\245C\003o\341Z\2056\213L\n\213j\212L\"p\236\245:S\315Q`\031\231M\200\201\344\223I\004\202\206\374i.\2005\256%S\373\0250\301\022z\266\301\200q\006y\021\323J$ \202g\"\024\037\233\306\230L+B\230/Z\322\2073\337Sa\341\340\243\3247\224W\"\210\\\235]RZ\3464\340*E\013L2\217\025bD\013\351\306ifb6\222.\312a,\345p)\271\203\006\226T7@\274\204\345\222\024\2309\235\307\221\014YO\257\031/\325\202\225\316\347\210\230'Q&\2362b\234\256\241\272\307\020\340\304\261\344\305\016R\024\364\001\026\030m\331\030\231\002\325\201e\326\2740\205\314\231\212\2338pV\354Hb\213\2250B\311\325\210\021\022\230;d\317\330=\277\212x\346\253\001\241Hr\350\226n\027K\000\276\313\024I\261P\017>\335\223\313\035\366\347-\256\317\354\311\367\311\311\r\023\257\013AHRt\025\303S!k\305\253\353\241\222T\327\022\325\010\220\324p\3544&%\246f\201\303\036\035;\303\255\316\313q\270\343,!\307x\225\355\314&,Ba""\316m\326\357\307f!PYf\31432\360\233+\375t\240\245\002\\C\234>\311\347\227\336t\240G\202.\036>II\346>`\2710!>\233Cb\033\236\027\353`a\212\363\221\nE\021\350Qi\340\257\236\3139>\313@\233f\031\261\233\306 \216\357\364x\340\356}\216\336\253V\2669P\310\215L\311\r\366\311\326\rW\345&\274F\213\204\004C\312\2474&\330NP H\301\345\345B\332\252#\243\211\341\354\177\305\334\221N\024$+=t\340@"; + PyObject *data = __Pyx_DecompressString(cstring, 857, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (745 bytes) */ +const char* const cstring = "x\332\235T\301n\323@\020m\253\264$iK\211\224\212\013 \007UB\202\222*RT\t\204\250J+!q\200\006\n\3426\332\254\327\251\251\275\353z\327!9 \365\350\343\036}\3641\307\034{\354'\370\350\317\350'0v\3224\320\222VDrv=~3\357\315\354\263w\366m\251|\273\035([p\203\212\200+\346KC\006\236'|e\010\356\364\r.\370K\316:D\331]ft\211\0230\342\021z\304\240\315\210\273\245|\302\245%|Wn\321>\230D\021\313\021?\301\234\252\013\343\272u\257\337\3038i;\214\361\354\277Cm9\332\231\2229V\275\035\320c\246\244A\t\347B\031m\206\212x\227\371\212\231\206\022\0061\016\372\352\010u\212\366\017F\225\201\254\206g\323c\307\346\2357\031\035\357H\021\370\224\275\335\037\313\230\356no$b\306\243:\200\317\314\2002\2409\017\300l\260D\255\212\250\273\301\211i\202\315\275@\335\t\004\374N0\t8\003PL\316\254J\211C\003'\023:\0320\346\232\2547+\203\365\360X\251\002\021\250[\024\273\314\357\260Y\200\334\0379\271\022p\204\000\321\361\211\013p\320\357\341\265o#\313G\244\373\314,Bi\340f:\205/'\035NM\344\206\256\247\214X\2772b\3756#\022\317c\334$\262\317\251-\352T\370\330\247\315\231\034\215'W.o\036\032E\2571\334B6\037\326&\370\304a.\303\242\243E\37699\313\366\245z\227\347\177\262,\364\013\200\025p\n\370\353\\\232gj(\266\204\211\030[1W\002\270\004\311 \2372.\302\014\034\\1\302\211\233m\010\367\204\007\200/\026\214\253e\333\256\312\336\251\214\345$ \316\010:\3616\\s\371$\300z\231\251\035+\267\366\230\002w&\236M\340\250)\303\303\r\346\207\374D\000n>\360\374\273!Ok\027\017\346\0267\342FZx\032\327\322\302\272n\245\205bX\322\353\232h\031\325\322\245RX\r\277\353\226\356D_\342\371\264\370$\"i\2614\301$\017\237\305\376\240:8\034V\256A\037G\255\034\272\232\254\346\265q\315BW\251\233\311\346\316\231\177\216\231k\341\257\350}\334\210\367\007\305\341\374\260\202\252\312s\213+a3Y\333\034\354\016Z\247\230\275\0346\303@\357i\025\275\216\017\007\217\206_\317jg\215,\274\255\253\372[\324\214z\261\032l\017\253\303V\262\260=$i\341\336i/\3645\026_\t?`3'\031qY\327tSwG*\376\276\311\226\242\236O\013F\\H6v\317+\347\227\241\244\202\r$\013\257\316*""\027\367\347\026K\341\262n\244K\345\360\271\336\325\310\266w\336\370o\266{\372$\372'c\326v9)\343\320N\021S\016_\350\326om\251j-"; + PyObject *data = __Pyx_DecompressString(cstring, 745, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (1567 bytes) */ +const char* const bytes = "?Distribution counters support only non-negative valueapache_beam/transforms/cy_dataflow_distribution_counter.pyxdisableenablegcisenabledself.buckets cannot be converted to a Python object for picklingDataflowDistributionCounterDataflowDistributionCounter.__reduce_cython__DataflowDistributionCounter.__setstate_cython__DataflowDistributionCounter.add_inputDataflowDistributionCounter.add_input_nDataflowDistributionCounter.add_inputs_for_testDataflowDistributionCounter.calculate_bucket_indexDataflowDistributionCounter.extract_outputDataflowDistributionCounter.mergeDataflowDistributionCounter.translate_to_histogram__Pyx_PyDict_NextRefaccumulatorsadd_inputadd_input_nadd_inputs_for_testapache_beam.transforms.cy_dataflow_distribution_counterappendasyncio.coroutinesbucketCountscalculate_bucket_indexcline_in_tracebackelementelementsextract_outputfirstBucketOffset__func____getstate__histogram_is_coroutineitems__main__merge__module__n__name__nanpop__pyx_state__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex__self__set_name__setdefault__setstate____setstate_cython____test__translate_to_histogramvalues\200!\360\020\000\005$\2401\330\004\"\240!\330\004\025\220Q\330\004\010\210\t\220\025\220a\220s\230!\330\006\t\210\024\210X\220Q\220g\230S\240\001\330\010\036\230a\330\010\t\330\004\010\210\t\220\025\220a\320\027'\240r\250\024\250T\260\021\330\006\t\210\024\210X\220Q\220g\230S\240\001\330\010\035\230Q\330\010\t\330\004\r\320\r\"\240!\330\004\r\320\r\035\230Q\330\004\010\210\t\220\025\220a\320\027,\320,?\270r\300\021\330\006\017\210}\230G\2401\240D\250\010\260\001\260\021\200!\360\n\000\005\014\2104\320\017,\250A\250Q\200!\330\004\013\2104\210u\220C\220t\230:\240T\250\034\260U\270!\2701\330\004\013\2106\220\024\220V\2304\230x\240t\2506\260\024\260Q\320\0026\260a\330\004\007\200x\210r\220\021\330\006\014\210J\220a\220q\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\330\004\010\210\010\220\001\330\004 ""\240\004\320$A\300\021\300!\330\004\010\210\010\220\001\320\021\"\240!\320\0029\270\021\360\016\000\005\t\210\013\2201\330\006\n\210*\220A\220Q\320\002C\3001\330\004\007\200x\210r\220\021\330\006\014\210J\220a\220q\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\2204\220v\230Q\330\004\010\210\n\220!\330\004\010\210\010\220\007\220q\230\001\330\004 \240\004\320$A\300\021\300!\330\004\010\210\010\220\001\320\021\"\240!\200!\330\004\n\320\n\035\230Q\200\001\330\004\n\210+\220Q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 60; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 9) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 60; i < 68; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 68; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 60; + for (Py_ssize_t i=0; i<8; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {10e0,10e1,10e2,10e3,10e4,10e5,10e6,10e7,10e8,10e9,10e-1,10e10,10e11,10e12,10e13,10e14,10e15,10e16,10e17,10e18}; + for (int i = 0; i < 20; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<20; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 2; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 2; + unsigned int flags : 10; + unsigned int first_line : 8; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 65}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_6a_xr_Jaq_4vQ_4vQ_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_add_input_n, __pyx_mstate->__pyx_kp_b_iso88591_C1_xr_Jaq_4vQ_4vQ_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 104}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_histogram}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_translate_to_histogram, __pyx_mstate->__pyx_kp_b_iso88591_1_Q_as_XQgS_a_a_r_T_XQgS_Q_Q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 128}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_elements}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_add_inputs_for_test, __pyx_mstate->__pyx_kp_b_iso88591_9_1_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_calculate_bucket_index, __pyx_mstate->__pyx_kp_b_iso88591_4_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 145}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_4uCt_T_U_1_6_V4xt6_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 149}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_cy_datafl_2, __pyx_mstate->__pyx_n_u_merge, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrFetchRestore (used by RaiseException) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyObjectCall2Args (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* DivInt[int64_t] */ +static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t a, int64_t b, int b_is_constant) { + int64_t q = a / b; + int64_t r = a - q*b; + int64_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* pybytes_as_double (used by pyunicode_as_double) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { + PyObject *float_value = PyFloat_FromString(obj); + if (likely(float_value)) { + double value = __Pyx_PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } + return (double)-1; +} +static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { + int last_was_punctuation = 1; + int parse_error_found = 0; + Py_ssize_t i; + for (i=0; i < length; i++) { + char chr = start[i]; + int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); + *buffer = chr; + buffer += (chr != '_'); + parse_error_found |= last_was_punctuation & is_punctuation; + last_was_punctuation = is_punctuation; + } + parse_error_found |= last_was_punctuation; + *buffer = '\0'; + return unlikely(parse_error_found) ? NULL : buffer; +} +static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { + int matches = 1; + char sign = start[0]; + int is_signed = (sign == '+') | (sign == '-'); + start += is_signed; + length -= is_signed; + switch (start[0]) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + matches &= (start[1] == 'a' || start[1] == 'A'); + matches &= (start[2] == 'n' || start[2] == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + matches &= (start[1] == 'n' || start[1] == 'N'); + matches &= (start[2] == 'f' || start[2] == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + matches &= (start[3] == 'i' || start[3] == 'I'); + matches &= (start[4] == 'n' || start[4] == 'N'); + matches &= (start[5] == 'i' || start[5] == 'I'); + matches &= (start[6] == 't' || start[6] == 'T'); + matches &= (start[7] == 'y' || start[7] == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { + return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); +} +CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { + double value; + Py_ssize_t i, digits; + const char *last = start + length; + char *end; + while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) + start++; + while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) + last--; + length = last - start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + digits = 0; + for (i=0; i < length; digits += start[i++] != '_'); + if (likely(digits == length)) { + value = PyOS_string_to_double(start, &end, NULL); + } else if (digits < 40) { + char number[40]; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyObjectGetAttrStrNoError (used by SetupReduce) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyLong_As_unsigned_PY_LONG_LONG(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_LONG) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned PY_LONG_LONG) -1; + val = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned PY_LONG_LONG) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x)) + } else if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + unsigned PY_LONG_LONG val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned PY_LONG_LONG) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned PY_LONG_LONG) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned PY_LONG_LONG) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned PY_LONG_LONG) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned PY_LONG_LONG) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned PY_LONG_LONG) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned PY_LONG_LONG) 1) << (sizeof(unsigned PY_LONG_LONG) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned PY_LONG_LONG) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.cp314-win_amd64.pyd b/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.cp314-win_amd64.pyd new file mode 100644 index 000000000000..b5519e1dc9ba Binary files /dev/null and b/sdks/python/apache_beam/transforms/cy_dataflow_distribution_counter.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/transforms/stats.c b/sdks/python/apache_beam/transforms/stats.c new file mode 100644 index 000000000000..896cd553bed6 --- /dev/null +++ b/sdks/python/apache_beam/transforms/stats.c @@ -0,0 +1,34045 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.transforms.stats", + "sources": [ + "apache_beam/transforms/stats.py" + ] + }, + "module_name": "apache_beam.transforms.stats" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__transforms__stats +#define __PYX_HAVE_API__apache_beam__transforms__stats +/* Early includes */ +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/transforms/stats.py", + "apache_beam/transforms/stats.pxd", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec; +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer; +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState; +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__; +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key; + +/* "apache_beam/transforms/stats.pxd":21 + * from libc.stdint cimport int64_t + * + * cdef class _QuantileSpec(object): # <<<<<<<<<<<<<< + * cdef readonly int64_t buffer_size + * cdef readonly int64_t num_buffers +*/ +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec { + PyObject_HEAD + int64_t buffer_size; + int64_t num_buffers; + int weighted; + PyObject *key; + int reverse; + PyObject *weighted_key; + PyObject *less_than; +}; + + +/* "apache_beam/transforms/stats.pxd":30 + * cdef readonly less_than + * + * cdef class _QuantileBuffer(object): # <<<<<<<<<<<<<< + * cdef readonly elements + * cdef readonly weights +*/ +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer { + PyObject_HEAD + PyObject *elements; + PyObject *weights; + int weighted; + int64_t level; + PyObject *min_val; + PyObject *max_val; + PyObject *_iter; +}; + + +/* "apache_beam/transforms/stats.pxd":39 + * cdef readonly _iter + * + * cdef class _QuantileState(object): # <<<<<<<<<<<<<< + * cdef readonly _QuantileSpec spec + * cdef public buffers +*/ +struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState *__pyx_vtab; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *spec; + PyObject *buffers; + PyObject *unbuffered_elements; + PyObject *unbuffered_weights; + PyObject *add_unbuffered; +}; + + +/* "apache_beam/transforms/stats.py":433 + * class _QuantileSpec(object): + * """Quantiles computation specifications.""" + * def __init__(self, buffer_size, num_buffers, weighted, key, reverse): # <<<<<<<<<<<<<< + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size +*/ +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ { + PyObject_HEAD + PyObject *__pyx_v_key; +}; + + +/* "apache_beam/transforms/stats.py":454 + * self.less_than = lambda a, b: key(a) < key(b) + * + * def get_argsort_key(self, elements): # <<<<<<<<<<<<<< + * # type: (List) -> Callable[[int], Any] + * +*/ +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key { + PyObject_HEAD + PyObject *__pyx_v_elements; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self; +}; + + + +/* "apache_beam/transforms/stats.py":507 + * + * + * class _QuantileState(object): # <<<<<<<<<<<<<< + * """ + * Compact summarization of a collection on which quantiles can be estimated. +*/ + +struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState { + int (*is_empty)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, int __pyx_skip_dispatch); + PyObject *(*_add_unbuffered)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*_add_unbuffered_weighted)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, PyObject *, int __pyx_skip_dispatch); + PyObject *(*finalize)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, int __pyx_skip_dispatch); + PyObject *(*collapse_if_needed)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState *__pyx_vtabptr_11apache_beam_10transforms_5stats__QuantileState; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* PyValueError_Check.proto */ +#define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_TrueDivideCObj(op1, op2, floatval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2)) +#endif + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyRuntimeError_Check.proto */ +#define __Pyx_PyExc_RuntimeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeError) + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* RaiseClosureNameError.proto */ +static void __Pyx_RaiseClosureNameError(const char *varname); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* DivInt[Py_ssize_t].proto */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant); + +/* UnaryNegOverflows.proto */ +#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +/* ListAppend.proto (used by append) */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* PyRange_Check.proto */ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) + #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) +#endif + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* pyint_simplify.proto */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); + +/* IterNextPlain.proto (used by IterNext) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* IterNext.proto */ +#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); + +/* PyStopIteration_Check.proto */ +#define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration) + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* pybytes_as_double.proto (used by pynumber_float) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj); +static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); +static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(obj); + size = PyBytes_GET_SIZE(obj); +#else + if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { + return (double)-1; + } +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} +static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyByteArray_AS_STRING(obj); + size = PyByteArray_GET_SIZE(obj); +#else + as_c_string = PyByteArray_AsString(obj); + if (as_c_string == NULL) { + return (double)-1; + } + size = PyByteArray_Size(obj); +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} + +/* pyunicode_as_double.proto (used by pynumber_float) */ +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS +static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { + int last_was_punctuation; + Py_ssize_t i; + last_was_punctuation = 1; + for (i=start; i <= end; i++) { + Py_UCS4 chr = PyUnicode_READ(kind, data, i); + int is_punctuation = (chr == '_') | (chr == '.'); + *buffer = (char)chr; + buffer += (chr != '_'); + if (unlikely(chr > 127)) goto parse_failure; + if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; + last_was_punctuation = is_punctuation; + } + if (unlikely(last_was_punctuation)) goto parse_failure; + *buffer = '\0'; + return buffer; +parse_failure: + return NULL; +} +static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { + int matches = 1; + Py_UCS4 chr; + Py_UCS4 sign = PyUnicode_READ(kind, data, start); + int is_signed = (sign == '-') | (sign == '+'); + start += is_signed; + length -= is_signed; + switch (PyUnicode_READ(kind, data, start)) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'a') | (chr == 'A'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'n') | (chr == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'f') | (chr == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+3); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+4); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+5); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+6); + matches &= (chr == 't') | (chr == 'T'); + chr = PyUnicode_READ(kind, data, start+7); + matches &= (chr == 'y') | (chr == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { + double value; + const char *last; + char *end; + Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); + const int kind = PyUnicode_KIND(obj); + const void* data = PyUnicode_DATA(obj); + start = 0; + while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) + start++; + while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) + length--; + length -= start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + if (length < 40) { + char number[40]; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} +#endif +static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS + if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) + return (double)-1; + if (likely(PyUnicode_IS_ASCII(obj))) { + const char *s; + Py_ssize_t length; + s = PyUnicode_AsUTF8AndSize(obj, &length); + return __Pyx__PyBytes_AsDouble(obj, s, length); + } + return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); +#else + return __Pyx_SlowPyString_AsDouble(obj); +#endif +} + +/* pynumber_float.proto */ +static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x)) + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2)) +#endif + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2)) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_SubtractCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* PyImportError_Check.proto */ +#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError) + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* ClassMethod.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include "descrobject.h" +#endif +CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CStringEquals.proto */ +static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static int __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_is_empty(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered_weighted(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_finalize(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_collapse_if_needed(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "apache_beam.transforms.stats" */ +static struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_f_11apache_beam_10transforms_5stats__collapse(PyObject *, PyObject *, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats__interpolate(PyObject *, int64_t, double, double, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats___pyx_unpickle__QuantileBuffer__set_state(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.transforms.stats" +extern int __pyx_module_is_main_apache_beam__transforms__stats; +int __pyx_module_is_main_apache_beam__transforms__stats = 0; + +/* Implementation of "apache_beam.transforms.stats" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_round; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin_sorted; +static PyObject *__pyx_builtin_sum; +/* #### Code section: string_decls ### */ +static const char __pyx_k_iter_elements_level_max_val_min[] = "_iter, elements, level, max_val, min_val, weighted, weights"; +static const char __pyx_k_This_module_has_all_statistic_re[] = "This module has all statistic related transforms.\n\nThis ApproximateUnique class will be deprecated [1]. PLease look into using\nHLLCount in the zetasketch extension module [2].\n\n[1] https://lists.apache.org/thread.html/501605df5027567099b81f18c080469661fb426\n4a002615fa1510502%40%3Cdev.beam.apache.org%3E\n[2] https://beam.apache.org/releases/javadoc/2.16.0/org/apache/beam/sdk/extensio\nns/zetasketch/HllCount.html\n"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats__mmh3_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_2_md5_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_4_get_default_hash_fn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_parse_input_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_2_get_sample_size_from_est_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_est_err); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_2expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_2expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sample_size); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_4get_estimate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sample_size, PyObject *__pyx_v_coder); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_2create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_4add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_6merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_8extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_10display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_20ApproximateQuantiles__display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_4__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_6expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_8display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_4__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_6expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_8display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self, PyObject *__pyx_v_buffer_size, PyObject *__pyx_v_num_buffers, PyObject *__pyx_v_weighted, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self, PyObject *__pyx_v_idx); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self, PyObject *__pyx_v_elements); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_4__reduce__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_3key___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_weights, PyObject *__pyx_v_weighted, PyObject *__pyx_v_level, PyObject *__pyx_v_min_val, PyObject *__pyx_v_max_val); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_2__iter__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_4__lt__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_6__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_unbuffered_elements, PyObject *__pyx_v_unbuffered_weights, PyObject *__pyx_v_buffers, PyObject *__pyx_v_spec); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_2__reduce__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4is_empty(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_6_add_unbuffered(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_8_add_unbuffered_weighted(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_10finalize(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_12collapse_if_needed(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_offset_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4spec___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_buffer_size, PyObject *__pyx_v_num_buffers, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_4create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_epsilon, PyObject *__pyx_v_max_num_elements, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_6_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_weight); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_8create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_10add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_quantile_state, PyObject *__pyx_v_element); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_12_add_inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_quantile_state, PyObject *__pyx_v_elements); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_14merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_16extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulator); /* proto */ +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6__pyx_unpickle__QuantileBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileSpec(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec; + PyObject *__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer; + PyObject *__pyx_type_11apache_beam_10transforms_5stats__QuantileState; + PyObject *__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init__; + PyObject *__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__; + PyTypeObject *__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_slice[1]; + PyObject *__pyx_tuple[9]; + PyObject *__pyx_codeobj_tab[51]; + PyObject *__pyx_string_tab[346]; + PyObject *__pyx_number_tab[12]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct____init__[8]; +int __pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct____init__; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key[8]; +int __pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_An_object_to_keep_samples_and_c __pyx_string_tab[1] +#define __pyx_kp_u_ApproximateUniqueCombineFn_comp __pyx_string_tab[2] +#define __pyx_kp_u_ApproximateUnique_needs_a_size_1 __pyx_string_tab[3] +#define __pyx_kp_u_ApproximateUnique_needs_an_estim __pyx_string_tab[4] +#define __pyx_kp_u_Approximate_Globally_approximat __pyx_string_tab[5] +#define __pyx_kp_u_Approximate_PerKey_approximate __pyx_string_tab[6] +#define __pyx_kp_u_Couldn_t_find_murmurhash_Install __pyx_string_tab[7] +#define __pyx_kp_u_Either_size_or_error_should_be_s __pyx_string_tab[8] +#define __pyx_kp_u_Either_size_or_error_should_be_s_2 __pyx_string_tab[9] +#define __pyx_kp_u_Hashes_input_elements_and_uses __pyx_string_tab[10] +#define __pyx_kp_u_Is_Input_Batched __pyx_string_tab[11] +#define __pyx_kp_u_Is_Reversed __pyx_string_tab[12] +#define __pyx_kp_u_Is_Weighted __pyx_string_tab[13] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[14] +#define __pyx_kp_u_PTransform_for_getting_the_idea __pyx_string_tab[15] +#define __pyx_kp_u_PTransform_takes_PCollection_an __pyx_string_tab[16] +#define __pyx_kp_u_PTransform_takes_PCollection_of __pyx_string_tab[17] +#define __pyx_kp_u_Quantile_Count __pyx_string_tab[18] +#define __pyx_kp_u_Record_Comparer_Key __pyx_string_tab[19] +#define __pyx_kp_u_Runtime_exception_s __pyx_string_tab[20] +#define __pyx_kp_u_This_combiner_gives_an_idea_of __pyx_string_tab[21] +#define __pyx_kp_u__3 __pyx_string_tab[22] +#define __pyx_kp_u_add_note __pyx_string_tab[23] +#define __pyx_kp_u_apache_beam_transforms_stats_py __pyx_string_tab[24] +#define __pyx_kp_u_disable __pyx_string_tab[25] +#define __pyx_kp_u_enable __pyx_string_tab[26] +#define __pyx_kp_u_gc __pyx_string_tab[27] +#define __pyx_kp_u_isenabled __pyx_string_tab[28] +#define __pyx_kp_u_stringsource __pyx_string_tab[29] +#define __pyx_n_u_Any __pyx_string_tab[30] +#define __pyx_n_u_ApproximateQuantiles __pyx_string_tab[31] +#define __pyx_n_u_ApproximateQuantilesCombineFn __pyx_string_tab[32] +#define __pyx_n_u_ApproximateQuantilesCombineFn_2 __pyx_string_tab[33] +#define __pyx_n_u_ApproximateQuantilesCombineFn_3 __pyx_string_tab[34] +#define __pyx_n_u_ApproximateQuantilesCombineFn__a __pyx_string_tab[35] +#define __pyx_n_u_ApproximateQuantilesCombineFn__o __pyx_string_tab[36] +#define __pyx_n_u_ApproximateQuantilesCombineFn_ad __pyx_string_tab[37] +#define __pyx_n_u_ApproximateQuantilesCombineFn_cr __pyx_string_tab[38] +#define __pyx_n_u_ApproximateQuantilesCombineFn_cr_2 __pyx_string_tab[39] +#define __pyx_n_u_ApproximateQuantilesCombineFn_ex __pyx_string_tab[40] +#define __pyx_n_u_ApproximateQuantilesCombineFn_me __pyx_string_tab[41] +#define __pyx_n_u_ApproximateQuantiles_Globally __pyx_string_tab[42] +#define __pyx_n_u_ApproximateQuantiles_Globally_2 __pyx_string_tab[43] +#define __pyx_n_u_ApproximateQuantiles_Globally_di __pyx_string_tab[44] +#define __pyx_n_u_ApproximateQuantiles_Globally_ex __pyx_string_tab[45] +#define __pyx_n_u_ApproximateQuantiles_PerKey __pyx_string_tab[46] +#define __pyx_n_u_ApproximateQuantiles_PerKey___in __pyx_string_tab[47] +#define __pyx_n_u_ApproximateQuantiles_PerKey_disp __pyx_string_tab[48] +#define __pyx_n_u_ApproximateQuantiles_PerKey_expa __pyx_string_tab[49] +#define __pyx_n_u_ApproximateQuantiles__display_da __pyx_string_tab[50] +#define __pyx_n_u_ApproximateUnique __pyx_string_tab[51] +#define __pyx_n_u_ApproximateUniqueCombineFn __pyx_string_tab[52] +#define __pyx_n_u_ApproximateUniqueCombineFn___ini __pyx_string_tab[53] +#define __pyx_n_u_ApproximateUniqueCombineFn_add_i __pyx_string_tab[54] +#define __pyx_n_u_ApproximateUniqueCombineFn_creat __pyx_string_tab[55] +#define __pyx_n_u_ApproximateUniqueCombineFn_displ __pyx_string_tab[56] +#define __pyx_n_u_ApproximateUniqueCombineFn_extra __pyx_string_tab[57] +#define __pyx_n_u_ApproximateUniqueCombineFn_merge __pyx_string_tab[58] +#define __pyx_n_u_ApproximateUnique_Globally __pyx_string_tab[59] +#define __pyx_n_u_ApproximateUnique_Globally___ini __pyx_string_tab[60] +#define __pyx_n_u_ApproximateUnique_Globally_expan __pyx_string_tab[61] +#define __pyx_n_u_ApproximateUnique_PerKey __pyx_string_tab[62] +#define __pyx_n_u_ApproximateUnique_PerKey___init __pyx_string_tab[63] +#define __pyx_n_u_ApproximateUnique_PerKey_expand __pyx_string_tab[64] +#define __pyx_n_u_ApproximateUnique__get_sample_si __pyx_string_tab[65] +#define __pyx_n_u_ApproximateUnique_parse_input_pa __pyx_string_tab[66] +#define __pyx_n_u_Callable __pyx_string_tab[67] +#define __pyx_n_u_CombineFn __pyx_string_tab[68] +#define __pyx_n_u_CombineGlobally __pyx_string_tab[69] +#define __pyx_n_u_CombinePerKey __pyx_string_tab[70] +#define __pyx_n_u_CountGlobalUniqueValues __pyx_string_tab[71] +#define __pyx_n_u_CountPerKeyUniqueValues __pyx_string_tab[72] +#define __pyx_n_u_DisplayDataItem __pyx_string_tab[73] +#define __pyx_n_u_Globally __pyx_string_tab[74] +#define __pyx_n_u_HASH_SPACE_SIZE __pyx_string_tab[75] +#define __pyx_n_u_INPUT_ERROR_ERR_MSG __pyx_string_tab[76] +#define __pyx_n_u_INPUT_SIZE_ERR_MSG __pyx_string_tab[77] +#define __pyx_n_u_K __pyx_string_tab[78] +#define __pyx_n_u_LargestUnique __pyx_string_tab[79] +#define __pyx_n_u_LargestUnique___init __pyx_string_tab[80] +#define __pyx_n_u_LargestUnique_add __pyx_string_tab[81] +#define __pyx_n_u_LargestUnique_get_estimate __pyx_string_tab[82] +#define __pyx_n_u_List __pyx_string_tab[83] +#define __pyx_n_u_MAX_NUM_ELEMENTS __pyx_string_tab[84] +#define __pyx_n_u_MULTI_VALUE_ERR_MSG __pyx_string_tab[85] +#define __pyx_n_u_NO_VALUE_ERR_MSG __pyx_string_tab[86] +#define __pyx_n_u_PTransform __pyx_string_tab[87] +#define __pyx_n_u_PerKey __pyx_string_tab[88] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[89] +#define __pyx_n_u_QuantileBuffer __pyx_string_tab[90] +#define __pyx_n_u_QuantileBuffer___reduce_cython __pyx_string_tab[91] +#define __pyx_n_u_QuantileBuffer___setstate_cytho __pyx_string_tab[92] +#define __pyx_n_u_QuantileSpec __pyx_string_tab[93] +#define __pyx_n_u_QuantileSpec___reduce __pyx_string_tab[94] +#define __pyx_n_u_QuantileSpec_get_argsort_key __pyx_string_tab[95] +#define __pyx_n_u_QuantileState __pyx_string_tab[96] +#define __pyx_n_u_QuantileState___reduce __pyx_string_tab[97] +#define __pyx_n_u_QuantileState__add_unbuffered __pyx_string_tab[98] +#define __pyx_n_u_QuantileState__add_unbuffered_w __pyx_string_tab[99] +#define __pyx_n_u_QuantileState_collapse_if_neede __pyx_string_tab[100] +#define __pyx_n_u_QuantileState_finalize __pyx_string_tab[101] +#define __pyx_n_u_QuantileState_is_empty __pyx_string_tab[102] +#define __pyx_n_u_Sequence __pyx_string_tab[103] +#define __pyx_n_u_T __pyx_string_tab[104] +#define __pyx_n_u_Tuple __pyx_string_tab[105] +#define __pyx_n_u_TypeVar __pyx_string_tab[106] +#define __pyx_n_u_Union __pyx_string_tab[107] +#define __pyx_n_u_V __pyx_string_tab[108] +#define __pyx_n_u__2 __pyx_string_tab[109] +#define __pyx_n_u__4 __pyx_string_tab[110] +#define __pyx_n_u_a __pyx_string_tab[111] +#define __pyx_n_u_accumulator __pyx_string_tab[112] +#define __pyx_n_u_accumulators __pyx_string_tab[113] +#define __pyx_n_u_add __pyx_string_tab[114] +#define __pyx_n_u_add_input __pyx_string_tab[115] +#define __pyx_n_u_add_inputs __pyx_string_tab[116] +#define __pyx_n_u_add_unbuffered __pyx_string_tab[117] +#define __pyx_n_u_add_unbuffered_2 __pyx_string_tab[118] +#define __pyx_n_u_add_unbuffered_weighted __pyx_string_tab[119] +#define __pyx_n_u_all __pyx_string_tab[120] +#define __pyx_n_u_all_elems __pyx_string_tab[121] +#define __pyx_n_u_apache_beam __pyx_string_tab[122] +#define __pyx_n_u_apache_beam_transforms_core __pyx_string_tab[123] +#define __pyx_n_u_apache_beam_transforms_display __pyx_string_tab[124] +#define __pyx_n_u_apache_beam_transforms_ptransfor __pyx_string_tab[125] +#define __pyx_n_u_apache_beam_transforms_stats __pyx_string_tab[126] +#define __pyx_n_u_append __pyx_string_tab[127] +#define __pyx_n_u_args __pyx_string_tab[128] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[129] +#define __pyx_n_u_b __pyx_string_tab[130] +#define __pyx_n_u_buffer_elem __pyx_string_tab[131] +#define __pyx_n_u_buffer_size __pyx_string_tab[132] +#define __pyx_n_u_buffers __pyx_string_tab[133] +#define __pyx_n_u_ceil __pyx_string_tab[134] +#define __pyx_n_u_chain __pyx_string_tab[135] +#define __pyx_n_u_class __pyx_string_tab[136] +#define __pyx_n_u_class_getitem __pyx_string_tab[137] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[138] +#define __pyx_n_u_cls __pyx_string_tab[139] +#define __pyx_n_u_coder __pyx_string_tab[140] +#define __pyx_n_u_coder_2 __pyx_string_tab[141] +#define __pyx_n_u_coders __pyx_string_tab[142] +#define __pyx_n_u_collapse_if_needed __pyx_string_tab[143] +#define __pyx_n_u_collections_abc __pyx_string_tab[144] +#define __pyx_n_u_create __pyx_string_tab[145] +#define __pyx_n_u_create_accumulator __pyx_string_tab[146] +#define __pyx_n_u_default_hash_fn __pyx_string_tab[147] +#define __pyx_n_u_default_hash_fn_type __pyx_string_tab[148] +#define __pyx_n_u_dict __pyx_string_tab[149] +#define __pyx_n_u_dict_2 __pyx_string_tab[150] +#define __pyx_n_u_display_data __pyx_string_tab[151] +#define __pyx_n_u_display_data_2 __pyx_string_tab[152] +#define __pyx_n_u_doc __pyx_string_tab[153] +#define __pyx_n_u_e __pyx_string_tab[154] +#define __pyx_n_u_element __pyx_string_tab[155] +#define __pyx_n_u_elements __pyx_string_tab[156] +#define __pyx_n_u_encode __pyx_string_tab[157] +#define __pyx_n_u_epsilon __pyx_string_tab[158] +#define __pyx_n_u_error __pyx_string_tab[159] +#define __pyx_n_u_est __pyx_string_tab[160] +#define __pyx_n_u_est_err __pyx_string_tab[161] +#define __pyx_n_u_expand __pyx_string_tab[162] +#define __pyx_n_u_extend __pyx_string_tab[163] +#define __pyx_n_u_extract_output __pyx_string_tab[164] +#define __pyx_n_u_finalize __pyx_string_tab[165] +#define __pyx_n_u_from_iterable __pyx_string_tab[166] +#define __pyx_n_u_func __pyx_string_tab[167] +#define __pyx_n_u_get_argsort_key __pyx_string_tab[168] +#define __pyx_n_u_get_argsort_key_locals_lambda __pyx_string_tab[169] +#define __pyx_n_u_get_coder __pyx_string_tab[170] +#define __pyx_n_u_get_default_hash_fn __pyx_string_tab[171] +#define __pyx_n_u_get_estimate __pyx_string_tab[172] +#define __pyx_n_u_get_sample_size_from_est_error __pyx_string_tab[173] +#define __pyx_n_u_getitem __pyx_string_tab[174] +#define __pyx_n_u_getstate __pyx_string_tab[175] +#define __pyx_n_u_hash64 __pyx_string_tab[176] +#define __pyx_n_u_hash_fn __pyx_string_tab[177] +#define __pyx_n_u_hashed_value __pyx_string_tab[178] +#define __pyx_n_u_hashlib __pyx_string_tab[179] +#define __pyx_n_u_heapify __pyx_string_tab[180] +#define __pyx_n_u_heappop __pyx_string_tab[181] +#define __pyx_n_u_heappush __pyx_string_tab[182] +#define __pyx_n_u_heapq __pyx_string_tab[183] +#define __pyx_n_u_hexdigest __pyx_string_tab[184] +#define __pyx_n_u_i __pyx_string_tab[185] +#define __pyx_n_u_idx __pyx_string_tab[186] +#define __pyx_n_u_init __pyx_string_tab[187] +#define __pyx_n_u_init___locals_lambda __pyx_string_tab[188] +#define __pyx_n_u_input_batched __pyx_string_tab[189] +#define __pyx_n_u_input_batched_2 __pyx_string_tab[190] +#define __pyx_n_u_is_coroutine __pyx_string_tab[191] +#define __pyx_n_u_is_empty __pyx_string_tab[192] +#define __pyx_n_u_items __pyx_string_tab[193] +#define __pyx_n_u_itertools __pyx_string_tab[194] +#define __pyx_n_u_k __pyx_string_tab[195] +#define __pyx_n_u_key __pyx_string_tab[196] +#define __pyx_n_u_key_2 __pyx_string_tab[197] +#define __pyx_n_u_kwargs __pyx_string_tab[198] +#define __pyx_n_u_label __pyx_string_tab[199] +#define __pyx_n_u_lambda __pyx_string_tab[200] +#define __pyx_n_u_level __pyx_string_tab[201] +#define __pyx_n_u_log1p __pyx_string_tab[202] +#define __pyx_n_u_logging __pyx_string_tab[203] +#define __pyx_n_u_main __pyx_string_tab[204] +#define __pyx_n_u_math __pyx_string_tab[205] +#define __pyx_n_u_max_num_elements __pyx_string_tab[206] +#define __pyx_n_u_max_val __pyx_string_tab[207] +#define __pyx_n_u_md5 __pyx_string_tab[208] +#define __pyx_n_u_md5_hash __pyx_string_tab[209] +#define __pyx_n_u_merge_accumulators __pyx_string_tab[210] +#define __pyx_n_u_merged_accumulator __pyx_string_tab[211] +#define __pyx_n_u_metaclass __pyx_string_tab[212] +#define __pyx_n_u_min_hash __pyx_string_tab[213] +#define __pyx_n_u_min_val __pyx_string_tab[214] +#define __pyx_n_u_mmh3 __pyx_string_tab[215] +#define __pyx_n_u_mmh3_hash __pyx_string_tab[216] +#define __pyx_n_u_module __pyx_string_tab[217] +#define __pyx_n_u_mro_entries __pyx_string_tab[218] +#define __pyx_n_u_name __pyx_string_tab[219] +#define __pyx_n_u_new __pyx_string_tab[220] +#define __pyx_n_u_new_weight __pyx_string_tab[221] +#define __pyx_n_u_next __pyx_string_tab[222] +#define __pyx_n_u_num_buffers __pyx_string_tab[223] +#define __pyx_n_u_num_quantiles __pyx_string_tab[224] +#define __pyx_n_u_num_quantiles_2 __pyx_string_tab[225] +#define __pyx_n_u_object __pyx_string_tab[226] +#define __pyx_n_u_offset __pyx_string_tab[227] +#define __pyx_n_u_offset_2 __pyx_string_tab[228] +#define __pyx_n_u_offset_fn __pyx_string_tab[229] +#define __pyx_n_u_offset_jitter __pyx_string_tab[230] +#define __pyx_n_u_parse_input_params __pyx_string_tab[231] +#define __pyx_n_u_pcoll __pyx_string_tab[232] +#define __pyx_n_u_pop __pyx_string_tab[233] +#define __pyx_n_u_pow __pyx_string_tab[234] +#define __pyx_n_u_prepare __pyx_string_tab[235] +#define __pyx_n_u_pyx_capi __pyx_string_tab[236] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[237] +#define __pyx_n_u_pyx_result __pyx_string_tab[238] +#define __pyx_n_u_pyx_state __pyx_string_tab[239] +#define __pyx_n_u_pyx_type __pyx_string_tab[240] +#define __pyx_n_u_pyx_unpickle__QuantileBuffer __pyx_string_tab[241] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[242] +#define __pyx_n_u_qs __pyx_string_tab[243] +#define __pyx_n_u_qs_2 __pyx_string_tab[244] +#define __pyx_n_u_qualname __pyx_string_tab[245] +#define __pyx_n_u_quantile_state __pyx_string_tab[246] +#define __pyx_n_u_quantiles __pyx_string_tab[247] +#define __pyx_n_u_reduce __pyx_string_tab[248] +#define __pyx_n_u_reduce_cython __pyx_string_tab[249] +#define __pyx_n_u_reduce_ex __pyx_string_tab[250] +#define __pyx_n_u_registry __pyx_string_tab[251] +#define __pyx_n_u_remove __pyx_string_tab[252] +#define __pyx_n_u_repeat __pyx_string_tab[253] +#define __pyx_n_u_reverse __pyx_string_tab[254] +#define __pyx_n_u_reverse_2 __pyx_string_tab[255] +#define __pyx_n_u_round __pyx_string_tab[256] +#define __pyx_n_u_sample_heap __pyx_string_tab[257] +#define __pyx_n_u_sample_set __pyx_string_tab[258] +#define __pyx_n_u_sample_size __pyx_string_tab[259] +#define __pyx_n_u_sample_size_2 __pyx_string_tab[260] +#define __pyx_n_u_sample_space_size __pyx_string_tab[261] +#define __pyx_n_u_seed __pyx_string_tab[262] +#define __pyx_n_u_self __pyx_string_tab[263] +#define __pyx_n_u_set_name __pyx_string_tab[264] +#define __pyx_n_u_setdefault __pyx_string_tab[265] +#define __pyx_n_u_setstate __pyx_string_tab[266] +#define __pyx_n_u_setstate_cython __pyx_string_tab[267] +#define __pyx_n_u_signed __pyx_string_tab[268] +#define __pyx_n_u_size __pyx_string_tab[269] +#define __pyx_n_u_sort __pyx_string_tab[270] +#define __pyx_n_u_sorted __pyx_string_tab[271] +#define __pyx_n_u_spec __pyx_string_tab[272] +#define __pyx_n_u_spec_2 __pyx_string_tab[273] +#define __pyx_n_u_state __pyx_string_tab[274] +#define __pyx_n_u_staticmethod __pyx_string_tab[275] +#define __pyx_n_u_step __pyx_string_tab[276] +#define __pyx_n_u_sum __pyx_string_tab[277] +#define __pyx_n_u_temp __pyx_string_tab[278] +#define __pyx_n_u_test __pyx_string_tab[279] +#define __pyx_n_u_total_weight __pyx_string_tab[280] +#define __pyx_n_u_typecoders __pyx_string_tab[281] +#define __pyx_n_u_typehints __pyx_string_tab[282] +#define __pyx_n_u_typing __pyx_string_tab[283] +#define __pyx_n_u_unbuffered_elements __pyx_string_tab[284] +#define __pyx_n_u_unbuffered_weights __pyx_string_tab[285] +#define __pyx_n_u_update __pyx_string_tab[286] +#define __pyx_n_u_use_setstate __pyx_string_tab[287] +#define __pyx_n_u_value __pyx_string_tab[288] +#define __pyx_n_u_values __pyx_string_tab[289] +#define __pyx_n_u_verify_deterministic __pyx_string_tab[290] +#define __pyx_n_u_warning __pyx_string_tab[291] +#define __pyx_n_u_weighted __pyx_string_tab[292] +#define __pyx_n_u_weighted_2 __pyx_string_tab[293] +#define __pyx_n_u_weights __pyx_string_tab[294] +#define __pyx_n_u_with_input_types __pyx_string_tab[295] +#define __pyx_n_u_with_output_types __pyx_string_tab[296] +#define __pyx_n_u_x __pyx_string_tab[297] +#define __pyx_n_u_zip __pyx_string_tab[298] +#define __pyx_kp_b_PyObject_PyObject_int64_t_double __pyx_string_tab[299] +#define __pyx_kp_b_iso88591_0_q_aq_1 __pyx_string_tab[300] +#define __pyx_kp_b_iso88591_1_Q_y_1_1_t6_1Kq_1K_Kxq_4_r_m2S __pyx_string_tab[301] +#define __pyx_kp_b_iso88591_3a_81 __pyx_string_tab[302] +#define __pyx_kp_b_iso88591_3a_t1_F_b_b_2Rs_Rt2Rt2XRq_Ba_A __pyx_string_tab[303] +#define __pyx_kp_b_iso88591_3awd_6_2RuA __pyx_string_tab[304] +#define __pyx_kp_b_iso88591_4t_D_A __pyx_string_tab[305] +#define __pyx_kp_b_iso88591_4uAT_4t1IQ __pyx_string_tab[306] +#define __pyx_kp_b_iso88591_4wawe3gV1A __pyx_string_tab[307] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[308] +#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[309] +#define __pyx_kp_b_iso88591_A_A_a_q_A __pyx_string_tab[310] +#define __pyx_kp_b_iso88591_A_V2_A_wa_D_a_d_t1_D __pyx_string_tab[311] +#define __pyx_kp_b_iso88591_A_V2_wa_D_a_d_t1_D __pyx_string_tab[312] +#define __pyx_kp_b_iso88591_A_a_a_a_a_a __pyx_string_tab[313] +#define __pyx_kp_b_iso88591_A_fIZq_Q_q_1D __pyx_string_tab[314] +#define __pyx_kp_b_iso88591_A_fIZq_Q_q_a_9_a __pyx_string_tab[315] +#define __pyx_kp_b_iso88591_A_q_A_d_a_4q_A __pyx_string_tab[316] +#define __pyx_kp_b_iso88591_A_uHF_Ja_c_q_c_d_1_Ja_gQ_Zq_e3e __pyx_string_tab[317] +#define __pyx_kp_b_iso88591_Bb __pyx_string_tab[318] +#define __pyx_kp_b_iso88591_Bc_k_3b_Bb_A_k_4_0 __pyx_string_tab[319] +#define __pyx_kp_b_iso88591_Cq __pyx_string_tab[320] +#define __pyx_kp_b_iso88591_Cq_2S __pyx_string_tab[321] +#define __pyx_kp_b_iso88591_F_Y_1_q __pyx_string_tab[322] +#define __pyx_kp_b_iso88591_G1A_c_4Ct5_uAQ_4r_U_Bc_uA_d_q_e __pyx_string_tab[323] +#define __pyx_kp_b_iso88591_O4q __pyx_string_tab[324] +#define __pyx_kp_b_iso88591_Q_A_1_T_4q __pyx_string_tab[325] +#define __pyx_kp_b_iso88591_Qd_Bd_q_AU_4_xq_A_Qb_D_T_G3a_7 __pyx_string_tab[326] +#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[327] +#define __pyx_kp_b_iso88591_S __pyx_string_tab[328] +#define __pyx_kp_b_iso88591_T_1 __pyx_string_tab[329] +#define __pyx_kp_b_iso88591_T_1_2 __pyx_string_tab[330] +#define __pyx_kp_b_iso88591_T_4wgQa_Qa_Q_L_1_1 __pyx_string_tab[331] +#define __pyx_kp_b_iso88591_T_HD_jPTT__ccd_G1F_a_vWE_Q_q_t7 __pyx_string_tab[332] +#define __pyx_kp_b_iso88591_a_2 __pyx_string_tab[333] +#define __pyx_kp_b_iso88591_a_M_5_t1_QfM_Q __pyx_string_tab[334] +#define __pyx_kp_b_iso88591_a_a_q_au_S_3az_q_O1Cq_6_q_a __pyx_string_tab[335] +#define __pyx_kp_b_iso88591_avQ __pyx_string_tab[336] +#define __pyx_kp_b_iso88591_m1 __pyx_string_tab[337] +#define __pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1 __pyx_string_tab[338] +#define __pyx_kp_b_iso88591_q_IQ_V1_k_4q_q_1_A_a_1 __pyx_string_tab[339] +#define __pyx_kp_b_iso88591_s_4_b_A_S_Q_0_b_A_fAQd_Q_fBb_Rt __pyx_string_tab[340] +#define __pyx_kp_b_iso88591_s_4_c_4xr_Q_Q_xwd_d_1_9AT_AT_a __pyx_string_tab[341] +#define __pyx_kp_b_iso88591_s_S_Q_D_1 __pyx_string_tab[342] +#define __pyx_kp_b_iso88591_s_S_gQhar_WAXQb_gQhaq_WAXQa_c_4 __pyx_string_tab[343] +#define __pyx_kp_b_iso88591_t5_1_XQ_Q __pyx_string_tab[344] +#define __pyx_kp_b_iso88591_t_D_Q_D_Qd_a_q_1D_a_e1_5_G1_t7 __pyx_string_tab[345] +#define __pyx_float_0_5 __pyx_number_tab[0] +#define __pyx_float_1_0 __pyx_number_tab[1] +#define __pyx_float_1e9 __pyx_number_tab[2] +#define __pyx_float_2_0 __pyx_number_tab[3] +#define __pyx_float_4_0 __pyx_number_tab[4] +#define __pyx_float_0_01 __pyx_number_tab[5] +#define __pyx_int_0 __pyx_number_tab[6] +#define __pyx_int_neg_1 __pyx_number_tab[7] +#define __pyx_int_1 __pyx_number_tab[8] +#define __pyx_int_2 __pyx_number_tab[9] +#define __pyx_int_16 __pyx_number_tab[10] +#define __pyx_int_55430000 __pyx_number_tab[11] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileState); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init__); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } + for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<51; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<346; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<12; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_5stats__QuantileState); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init__); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } + for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<51; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<346; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<12; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/transforms/stats.py":61 + * import mmh3 # pylint: disable=import-error + * + * def _mmh3_hash(value): # <<<<<<<<<<<<<< + * # mmh3.hash64 returns two 64-bit unsigned integers + * return mmh3.hash64(value, seed=0, signed=False)[0] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_1_mmh3_hash(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_1_mmh3_hash = {"_mmh3_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_1_mmh3_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_1_mmh3_hash(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_mmh3_hash (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 61, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 61, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_mmh3_hash", 0) < (0)) __PYX_ERR(0, 61, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_mmh3_hash", 1, 1, 1, i); __PYX_ERR(0, 61, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 61, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_mmh3_hash", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 61, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._mmh3_hash", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats__mmh3_hash(__pyx_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats__mmh3_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_mmh3_hash", 0); + + /* "apache_beam/transforms/stats.py":63 + * def _mmh3_hash(value): + * # mmh3.hash64 returns two 64-bit unsigned integers + * return mmh3.hash64(value, seed=0, signed=False)[0] # <<<<<<<<<<<<<< + * + * _default_hash_fn = _mmh3_hash +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_mmh3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_hash64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_seed, __pyx_mstate_global->__pyx_int_0, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_signed, Py_False, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":61 + * import mmh3 # pylint: disable=import-error + * + * def _mmh3_hash(value): # <<<<<<<<<<<<<< + * # mmh3.hash64 returns two 64-bit unsigned integers + * return mmh3.hash64(value, seed=0, signed=False)[0] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._mmh3_hash", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":69 + * except ImportError: + * + * def _md5_hash(value): # <<<<<<<<<<<<<< + * # md5 is a 128-bit hash, so we truncate the hexdigest (string of 32 + * # hexadecimal digits) to 16 digits and convert to int to get the 64-bit +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_3_md5_hash(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_3_md5_hash = {"_md5_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_3_md5_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_3_md5_hash(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_md5_hash (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 69, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_md5_hash", 0) < (0)) __PYX_ERR(0, 69, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_md5_hash", 1, 1, 1, i); __PYX_ERR(0, 69, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 69, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_md5_hash", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._md5_hash", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_2_md5_hash(__pyx_self, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_2_md5_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_md5_hash", 0); + + /* "apache_beam/transforms/stats.py":73 + * # hexadecimal digits) to 16 digits and convert to int to get the 64-bit + * # integer fingerprint. + * return int(hashlib.md5(value).hexdigest()[:16], 16) # <<<<<<<<<<<<<< + * + * _default_hash_fn = _md5_hash +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_hashlib); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_md5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_value}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_4 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hexdigest, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 16, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_5, __pyx_mstate_global->__pyx_int_16}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":69 + * except ImportError: + * + * def _md5_hash(value): # <<<<<<<<<<<<<< + * # md5 is a 128-bit hash, so we truncate the hexdigest (string of 32 + * # hexadecimal digits) to 16 digits and convert to int to get the 64-bit +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats._md5_hash", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":79 + * + * + * def _get_default_hash_fn(): # <<<<<<<<<<<<<< + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_5_get_default_hash_fn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_4_get_default_hash_fn, "Returns either murmurhash or md5 based on installation."); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_5_get_default_hash_fn = {"_get_default_hash_fn", (PyCFunction)__pyx_pw_11apache_beam_10transforms_5stats_5_get_default_hash_fn, METH_NOARGS, __pyx_doc_11apache_beam_10transforms_5stats_4_get_default_hash_fn}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_5_get_default_hash_fn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_default_hash_fn (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_4_get_default_hash_fn(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_4_get_default_hash_fn(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_default_hash_fn", 0); + + /* "apache_beam/transforms/stats.py":81 + * def _get_default_hash_fn(): + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': # <<<<<<<<<<<<<< + * logging.warning( + * 'Couldn\'t find murmurhash. Install mmh3 for a faster implementation of' +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_default_hash_fn_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_md5, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":82 + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': + * logging.warning( # <<<<<<<<<<<<<< + * 'Couldn\'t find murmurhash. Install mmh3 for a faster implementation of' + * 'ApproximateUnique.') +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Couldn_t_find_murmurhash_Install}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":81 + * def _get_default_hash_fn(): + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': # <<<<<<<<<<<<<< + * logging.warning( + * 'Couldn\'t find murmurhash. Install mmh3 for a faster implementation of' +*/ + } + + /* "apache_beam/transforms/stats.py":85 + * 'Couldn\'t find murmurhash. Install mmh3 for a faster implementation of' + * 'ApproximateUnique.') + * return _default_hash_fn # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_default_hash_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":79 + * + * + * def _get_default_hash_fn(): # <<<<<<<<<<<<<< + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.stats._get_default_hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":104 + * 'between 0.01 and 0.50. Received {error = %s}.' + * + * @staticmethod # <<<<<<<<<<<<<< + * def parse_input_params(size=None, error=None): + * """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_1parse_input_params(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_17ApproximateUnique_parse_input_params, "\n Check if input params are valid and return sample size.\n\n :param size: an int not smaller than 16, which we would use to estimate\n number of unique values.\n :param error: max estimation error, which is a float between 0.01 and 0.50.\n If error is given, sample size will be calculated from error with\n _get_sample_size_from_est_error function.\n :return: sample size\n :raises:\n ValueError: If both size and error are given, or neither is given, or\n values are out of range.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_17ApproximateUnique_1parse_input_params = {"parse_input_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_1parse_input_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_17ApproximateUnique_parse_input_params}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_1parse_input_params(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_size = 0; + PyObject *__pyx_v_error = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("parse_input_params (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_error,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 104, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_input_params", 0) < (0)) __PYX_ERR(0, 104, __pyx_L3_error) + + /* "apache_beam/transforms/stats.py":105 + * + * @staticmethod + * def parse_input_params(size=None, error=None): # <<<<<<<<<<<<<< + * """ + * Check if input params are valid and return sample size. +*/ + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 104, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_size = values[0]; + __pyx_v_error = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("parse_input_params", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUnique.parse_input_params", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_parse_input_params(__pyx_self, __pyx_v_size, __pyx_v_error); + + /* "apache_beam/transforms/stats.py":104 + * 'between 0.01 and 0.50. Received {error = %s}.' + * + * @staticmethod # <<<<<<<<<<<<<< + * def parse_input_params(size=None, error=None): + * """ +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_parse_input_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("parse_input_params", 0); + + /* "apache_beam/transforms/stats.py":120 + * """ + * + * if None not in (size, error): # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) + * elif size is None and error is None: +*/ + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_size, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_2; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/transforms/stats.py":121 + * + * if None not in (size, error): + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) # <<<<<<<<<<<<<< + * elif size is None and error is None: + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MULTI_VALUE_ERR_MSG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_size); + __Pyx_GIVEREF(__pyx_v_size); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_size) != (0)) __PYX_ERR(0, 121, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_error); + __Pyx_GIVEREF(__pyx_v_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_error) != (0)) __PYX_ERR(0, 121, __pyx_L1_error); + __pyx_t_7 = PyNumber_Remainder(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 121, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":120 + * """ + * + * if None not in (size, error): # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) + * elif size is None and error is None: +*/ + } + + /* "apache_beam/transforms/stats.py":122 + * if None not in (size, error): + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) + * elif size is None and error is None: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: +*/ + __pyx_t_2 = (__pyx_v_size == Py_None); + if (__pyx_t_2) { + } else { + __pyx_t_4 = __pyx_t_2; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_error == Py_None); + __pyx_t_4 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/transforms/stats.py":123 + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) + * elif size is None and error is None: + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) # <<<<<<<<<<<<<< + * elif size is not None: + * if not isinstance(size, int) or size < 16: +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NO_VALUE_ERR_MSG); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 123, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":122 + * if None not in (size, error): + * raise ValueError(ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)) + * elif size is None and error is None: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: +*/ + } + + /* "apache_beam/transforms/stats.py":124 + * elif size is None and error is None: + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: # <<<<<<<<<<<<<< + * if not isinstance(size, int) or size < 16: + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) +*/ + __pyx_t_4 = (__pyx_v_size != Py_None); + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":125 + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: + * if not isinstance(size, int) or size < 16: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) + * else: +*/ + __pyx_t_2 = PyLong_Check(__pyx_v_size); + __pyx_t_9 = (!__pyx_t_2); + if (!__pyx_t_9) { + } else { + __pyx_t_4 = __pyx_t_9; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_1 = PyObject_RichCompare(__pyx_v_size, __pyx_mstate_global->__pyx_int_16, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_9; + __pyx_L9_bool_binop_done:; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/transforms/stats.py":126 + * elif size is not None: + * if not isinstance(size, int) or size < 16: + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) # <<<<<<<<<<<<<< + * else: + * return size +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_INPUT_SIZE_ERR_MSG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyNumber_Remainder(__pyx_t_3, __pyx_v_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 126, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":125 + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: + * if not isinstance(size, int) or size < 16: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) + * else: +*/ + } + + /* "apache_beam/transforms/stats.py":128 + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) + * else: + * return size # <<<<<<<<<<<<<< + * else: + * if error < 0.01 or error > 0.5: +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_size); + __pyx_r = __pyx_v_size; + goto __pyx_L0; + } + + /* "apache_beam/transforms/stats.py":124 + * elif size is None and error is None: + * raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG) + * elif size is not None: # <<<<<<<<<<<<<< + * if not isinstance(size, int) or size < 16: + * raise ValueError(ApproximateUnique._INPUT_SIZE_ERR_MSG % (size)) +*/ + } + + /* "apache_beam/transforms/stats.py":130 + * return size + * else: + * if error < 0.01 or error > 0.5: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._INPUT_ERROR_ERR_MSG % (error)) + * else: +*/ + /*else*/ { + __pyx_t_1 = PyObject_RichCompare(__pyx_v_error, __pyx_mstate_global->__pyx_float_0_01, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_9) { + } else { + __pyx_t_4 = __pyx_t_9; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_1 = PyObject_RichCompare(__pyx_v_error, __pyx_mstate_global->__pyx_float_0_5, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_9; + __pyx_L12_bool_binop_done:; + if (unlikely(__pyx_t_4)) { + + /* "apache_beam/transforms/stats.py":131 + * else: + * if error < 0.01 or error > 0.5: + * raise ValueError(ApproximateUnique._INPUT_ERROR_ERR_MSG % (error)) # <<<<<<<<<<<<<< + * else: + * return ApproximateUnique._get_sample_size_from_est_error(error) +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_INPUT_ERROR_ERR_MSG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Remainder(__pyx_t_3, __pyx_v_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 131, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":130 + * return size + * else: + * if error < 0.01 or error > 0.5: # <<<<<<<<<<<<<< + * raise ValueError(ApproximateUnique._INPUT_ERROR_ERR_MSG % (error)) + * else: +*/ + } + + /* "apache_beam/transforms/stats.py":133 + * raise ValueError(ApproximateUnique._INPUT_ERROR_ERR_MSG % (error)) + * else: + * return ApproximateUnique._get_sample_size_from_est_error(error) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_get_sample_size_from_est_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_error}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + } + + /* "apache_beam/transforms/stats.py":104 + * 'between 0.01 and 0.50. Received {error = %s}.' + * + * @staticmethod # <<<<<<<<<<<<<< + * def parse_input_params(size=None, error=None): + * """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUnique.parse_input_params", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":135 + * return ApproximateUnique._get_sample_size_from_est_error(error) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _get_sample_size_from_est_error(est_err): + * """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_3_get_sample_size_from_est_error(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_17ApproximateUnique_2_get_sample_size_from_est_error, "\n :return: sample size\n\n Calculate sample size from estimation error\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_17ApproximateUnique_3_get_sample_size_from_est_error = {"_get_sample_size_from_est_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_3_get_sample_size_from_est_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_17ApproximateUnique_2_get_sample_size_from_est_error}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_17ApproximateUnique_3_get_sample_size_from_est_error(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_est_err = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_sample_size_from_est_error (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_est_err,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 135, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 135, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_sample_size_from_est_error", 0) < (0)) __PYX_ERR(0, 135, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_sample_size_from_est_error", 1, 1, 1, i); __PYX_ERR(0, 135, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 135, __pyx_L3_error) + } + __pyx_v_est_err = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_get_sample_size_from_est_error", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 135, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUnique._get_sample_size_from_est_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_2_get_sample_size_from_est_error(__pyx_self, __pyx_v_est_err); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_17ApproximateUnique_2_get_sample_size_from_est_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_est_err) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_sample_size_from_est_error", 0); + + /* "apache_beam/transforms/stats.py":142 + * Calculate sample size from estimation error + * """ + * return math.ceil(4.0 / math.pow(est_err, 2.0)) # <<<<<<<<<<<<<< + * + * @typehints.with_input_types(T) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ceil); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_pow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_est_err, __pyx_mstate_global->__pyx_float_2_0}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_7 = __Pyx_PyFloat_TrueDivideCObj(__pyx_mstate_global->__pyx_float_4_0, __pyx_t_3, 4.0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":135 + * return ApproximateUnique._get_sample_size_from_est_error(error) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _get_sample_size_from_est_error(est_err): + * """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUnique._get_sample_size_from_est_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":148 + * class Globally(PTransform): + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_8Globally_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_8Globally_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_size = 0; + PyObject *__pyx_v_error = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_error,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 148, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 148, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 148, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 148, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 148, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 148, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 148, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 148, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 148, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_size = values[1]; + __pyx_v_error = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 148, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_8Globally___init__(__pyx_self, __pyx_v_self, __pyx_v_size, __pyx_v_error); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":149 + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): + * self._sample_size = ApproximateUnique.parse_input_params(size, error) # <<<<<<<<<<<<<< + * + * def expand(self, pcoll): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_parse_input_params); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_size, __pyx_v_error}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size, __pyx_t_1) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":148 + * class Globally(PTransform): + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":151 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_3expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_8Globally_3expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_8Globally_3expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_3expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_pcoll = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("expand (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_pcoll,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 151, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 151, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 151, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 151, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, i); __PYX_ERR(0, 151, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 151, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 151, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_pcoll = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 151, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_8Globally_2expand(__pyx_self, __pyx_v_self, __pyx_v_pcoll); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_2expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll) { + PyObject *__pyx_v_coder = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("expand", 0); + + /* "apache_beam/transforms/stats.py":152 + * + * def expand(self, pcoll): + * coder = coders.registry.get_coder(pcoll) # <<<<<<<<<<<<<< + * return pcoll \ + * | 'CountGlobalUniqueValues' \ +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_registry); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_pcoll}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_coder, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_coder = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":153 + * def expand(self, pcoll): + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ # <<<<<<<<<<<<<< + * | 'CountGlobalUniqueValues' \ + * >> (CombineGlobally(ApproximateUniqueCombineFn(self._sample_size, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":155 + * return pcoll \ + * | 'CountGlobalUniqueValues' \ + * >> (CombineGlobally(ApproximateUniqueCombineFn(self._sample_size, # <<<<<<<<<<<<<< + * coder))) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CombineGlobally); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "apache_beam/transforms/stats.py":156 + * | 'CountGlobalUniqueValues' \ + * >> (CombineGlobally(ApproximateUniqueCombineFn(self._sample_size, + * coder))) # <<<<<<<<<<<<<< + * + * @typehints.with_input_types(typing.Tuple[K, V]) +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_v_coder}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":155 + * return pcoll \ + * | 'CountGlobalUniqueValues' \ + * >> (CombineGlobally(ApproximateUniqueCombineFn(self._sample_size, # <<<<<<<<<<<<<< + * coder))) + * +*/ + __pyx_t_2 = PyNumber_Rshift(__pyx_mstate_global->__pyx_n_u_CountGlobalUniqueValues, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":154 + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ + * | 'CountGlobalUniqueValues' \ # <<<<<<<<<<<<<< + * >> (CombineGlobally(ApproximateUniqueCombineFn(self._sample_size, + * coder))) +*/ + __pyx_t_1 = PyNumber_Or(__pyx_v_pcoll, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":151 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_coder); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":162 + * class PerKey(PTransform): + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_size = 0; + PyObject *__pyx_v_error = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_error,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 162, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 162, __pyx_L3_error) + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 162, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 162, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 162, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_size = values[1]; + __pyx_v_error = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 162, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6PerKey___init__(__pyx_self, __pyx_v_self, __pyx_v_size, __pyx_v_error); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_error) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":163 + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): + * self._sample_size = ApproximateUnique.parse_input_params(size, error) # <<<<<<<<<<<<<< + * + * def expand(self, pcoll): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_parse_input_params); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_size, __pyx_v_error}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size, __pyx_t_1) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":162 + * class PerKey(PTransform): + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":165 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_3expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_3expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_3expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_3expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_pcoll = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("expand (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_pcoll,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 165, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 165, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, i); __PYX_ERR(0, 165, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_pcoll = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6PerKey_2expand(__pyx_self, __pyx_v_self, __pyx_v_pcoll); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_2expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll) { + PyObject *__pyx_v_coder = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("expand", 0); + + /* "apache_beam/transforms/stats.py":166 + * + * def expand(self, pcoll): + * coder = coders.registry.get_coder(pcoll) # <<<<<<<<<<<<<< + * return pcoll \ + * | 'CountPerKeyUniqueValues' \ +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_registry); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_pcoll}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_coder, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_coder = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":167 + * def expand(self, pcoll): + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ # <<<<<<<<<<<<<< + * | 'CountPerKeyUniqueValues' \ + * >> (CombinePerKey(ApproximateUniqueCombineFn(self._sample_size, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":169 + * return pcoll \ + * | 'CountPerKeyUniqueValues' \ + * >> (CombinePerKey(ApproximateUniqueCombineFn(self._sample_size, # <<<<<<<<<<<<<< + * coder))) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CombinePerKey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "apache_beam/transforms/stats.py":170 + * | 'CountPerKeyUniqueValues' \ + * >> (CombinePerKey(ApproximateUniqueCombineFn(self._sample_size, + * coder))) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_v_coder}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":169 + * return pcoll \ + * | 'CountPerKeyUniqueValues' \ + * >> (CombinePerKey(ApproximateUniqueCombineFn(self._sample_size, # <<<<<<<<<<<<<< + * coder))) + * +*/ + __pyx_t_2 = PyNumber_Rshift(__pyx_mstate_global->__pyx_n_u_CountPerKeyUniqueValues, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":168 + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ + * | 'CountPerKeyUniqueValues' \ # <<<<<<<<<<<<<< + * >> (CombinePerKey(ApproximateUniqueCombineFn(self._sample_size, + * coder))) +*/ + __pyx_t_1 = PyNumber_Or(__pyx_v_pcoll, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":165 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_coder); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":181 + * _HASH_SPACE_SIZE = 2.0**64 + * + * def __init__(self, sample_size): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * self._min_hash = 2.0**64 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_sample_size = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_sample_size_2,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 181, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 181, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 181, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 181, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 181, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_sample_size = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique___init__(__pyx_self, __pyx_v_self, __pyx_v_sample_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sample_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":182 + * + * def __init__(self, sample_size): + * self._sample_size = sample_size # <<<<<<<<<<<<<< + * self._min_hash = 2.0**64 + * self._sample_heap = [] +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size, __pyx_v_sample_size) < (0)) __PYX_ERR(0, 182, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":183 + * def __init__(self, sample_size): + * self._sample_size = sample_size + * self._min_hash = 2.0**64 # <<<<<<<<<<<<<< + * self._sample_heap = [] + * self._sample_set = set() +*/ + __pyx_t_1 = PyFloat_FromDouble(pow(2.0, 64.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash, __pyx_t_1) < (0)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":184 + * self._sample_size = sample_size + * self._min_hash = 2.0**64 + * self._sample_heap = [] # <<<<<<<<<<<<<< + * self._sample_set = set() + * +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap, __pyx_t_1) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":185 + * self._min_hash = 2.0**64 + * self._sample_heap = [] + * self._sample_set = set() # <<<<<<<<<<<<<< + * + * def add(self, element): +*/ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_set, __pyx_t_1) < (0)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":181 + * _HASH_SPACE_SIZE = 2.0**64 + * + * def __init__(self, sample_size): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * self._min_hash = 2.0**64 +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":187 + * self._sample_set = set() + * + * def add(self, element): # <<<<<<<<<<<<<< + * """ + * :param an element from pcoll. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_3add(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_LargestUnique_2add, "\n :param an element from pcoll.\n :return: boolean type whether the value is in the heap\n\n Adds a value to the heap, returning whether the value is (large enough to\n be) in the heap.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_3add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_3add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_LargestUnique_2add}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_3add(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_element = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 187, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 187, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, i); __PYX_ERR(0, 187, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_element = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 187, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_2add(__pyx_self, __pyx_v_self, __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_element) { + PyObject *__pyx_v_temp = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add", 0); + + /* "apache_beam/transforms/stats.py":195 + * be) in the heap. + * """ + * if len(self._sample_heap) >= self._sample_size and element < self._min_hash: # <<<<<<<<<<<<<< + * return False + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_element, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":196 + * """ + * if len(self._sample_heap) >= self._sample_size and element < self._min_hash: + * return False # <<<<<<<<<<<<<< + * + * if element not in self._sample_set: +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":195 + * be) in the heap. + * """ + * if len(self._sample_heap) >= self._sample_size and element < self._min_hash: # <<<<<<<<<<<<<< + * return False + * +*/ + } + + /* "apache_beam/transforms/stats.py":198 + * return False + * + * if element not in self._sample_set: # <<<<<<<<<<<<<< + * self._sample_set.add(element) + * heapq.heappush(self._sample_heap, element) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_element, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":199 + * + * if element not in self._sample_set: + * self._sample_set.add(element) # <<<<<<<<<<<<<< + * heapq.heappush(self._sample_heap, element) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_element}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":200 + * if element not in self._sample_set: + * self._sample_set.add(element) + * heapq.heappush(self._sample_heap, element) # <<<<<<<<<<<<<< + * + * if len(self._sample_heap) > self._sample_size: +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_heappush); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_element}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":202 + * heapq.heappush(self._sample_heap, element) + * + * if len(self._sample_heap) > self._sample_size: # <<<<<<<<<<<<<< + * temp = heapq.heappop(self._sample_heap) + * self._sample_set.remove(temp) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":203 + * + * if len(self._sample_heap) > self._sample_size: + * temp = heapq.heappop(self._sample_heap) # <<<<<<<<<<<<<< + * self._sample_set.remove(temp) + * self._min_hash = self._sample_heap[0] +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heappop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_v_temp = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":204 + * if len(self._sample_heap) > self._sample_size: + * temp = heapq.heappop(self._sample_heap) + * self._sample_set.remove(temp) # <<<<<<<<<<<<<< + * self._min_hash = self._sample_heap[0] + * elif element < self._min_hash: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_temp}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":205 + * temp = heapq.heappop(self._sample_heap) + * self._sample_set.remove(temp) + * self._min_hash = self._sample_heap[0] # <<<<<<<<<<<<<< + * elif element < self._min_hash: + * self._min_hash = element +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash, __pyx_t_4) < (0)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":202 + * heapq.heappush(self._sample_heap, element) + * + * if len(self._sample_heap) > self._sample_size: # <<<<<<<<<<<<<< + * temp = heapq.heappop(self._sample_heap) + * self._sample_set.remove(temp) +*/ + goto __pyx_L7; + } + + /* "apache_beam/transforms/stats.py":206 + * self._sample_set.remove(temp) + * self._min_hash = self._sample_heap[0] + * elif element < self._min_hash: # <<<<<<<<<<<<<< + * self._min_hash = element + * return True +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_element, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":207 + * self._min_hash = self._sample_heap[0] + * elif element < self._min_hash: + * self._min_hash = element # <<<<<<<<<<<<<< + * return True + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash, __pyx_v_element) < (0)) __PYX_ERR(0, 207, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":206 + * self._sample_set.remove(temp) + * self._min_hash = self._sample_heap[0] + * elif element < self._min_hash: # <<<<<<<<<<<<<< + * self._min_hash = element + * return True +*/ + } + __pyx_L7:; + + /* "apache_beam/transforms/stats.py":198 + * return False + * + * if element not in self._sample_set: # <<<<<<<<<<<<<< + * self._sample_set.add(element) + * heapq.heappush(self._sample_heap, element) +*/ + } + + /* "apache_beam/transforms/stats.py":208 + * elif element < self._min_hash: + * self._min_hash = element + * return True # <<<<<<<<<<<<<< + * + * def get_estimate(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":187 + * self._sample_set = set() + * + * def add(self, element): # <<<<<<<<<<<<<< + * """ + * :param an element from pcoll. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_temp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":210 + * return True + * + * def get_estimate(self): # <<<<<<<<<<<<<< + * """ + * :return: estimation count of unique values +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_5get_estimate(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_LargestUnique_4get_estimate, "\n :return: estimation count of unique values\n\n If heap size is smaller than sample size, just return heap size.\n Otherwise, takes into account the possibility of hash collisions,\n which become more likely than not for 2^32 distinct elements.\n Note that log(1+x) ~ x for small x, so for sampleSize << maxHash\n log(1 - sample_size/sample_space) / log(1 - 1/sample_space) ~ sample_size\n and hence estimate ~ sample_size * hash_space / sample_space\n as one would expect.\n\n Given sample_size / sample_space = est / hash_space\n est = sample_size * hash_space / sample_space\n\n Given above sample_size approximate,\n est = log1p(-sample_size/sample_space) / log1p(-1/sample_space)\n * hash_space / sample_space\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_5get_estimate = {"get_estimate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_5get_estimate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_LargestUnique_4get_estimate}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_LargestUnique_5get_estimate(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_estimate (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 210, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 210, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_estimate", 0) < (0)) __PYX_ERR(0, 210, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_estimate", 1, 1, 1, i); __PYX_ERR(0, 210, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 210, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_estimate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 210, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.get_estimate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_4get_estimate(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_LargestUnique_4get_estimate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_sample_space_size = NULL; + PyObject *__pyx_v_est = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_estimate", 0); + + /* "apache_beam/transforms/stats.py":229 + * * hash_space / sample_space + * """ + * if len(self._sample_heap) < self._sample_size: # <<<<<<<<<<<<<< + * return len(self._sample_heap) + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_5) { + + /* "apache_beam/transforms/stats.py":230 + * """ + * if len(self._sample_heap) < self._sample_size: + * return len(self._sample_heap) # <<<<<<<<<<<<<< + * else: + * sample_space_size = self._HASH_SPACE_SIZE - 1.0 * self._min_hash +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":229 + * * hash_space / sample_space + * """ + * if len(self._sample_heap) < self._sample_size: # <<<<<<<<<<<<<< + * return len(self._sample_heap) + * else: +*/ + } + + /* "apache_beam/transforms/stats.py":232 + * return len(self._sample_heap) + * else: + * sample_space_size = self._HASH_SPACE_SIZE - 1.0 * self._min_hash # <<<<<<<<<<<<<< + * est = ( + * math.log1p(-self._sample_size / sample_space_size) / +*/ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_HASH_SPACE_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_hash); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Multiply(__pyx_mstate_global->__pyx_float_1_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_sample_space_size = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":234 + * sample_space_size = self._HASH_SPACE_SIZE - 1.0 * self._min_hash + * est = ( + * math.log1p(-self._sample_size / sample_space_size) / # <<<<<<<<<<<<<< + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / + * sample_space_size) +*/ + __pyx_t_1 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log1p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_v_sample_space_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + + /* "apache_beam/transforms/stats.py":235 + * est = ( + * math.log1p(-self._sample_size / sample_space_size) / + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / # <<<<<<<<<<<<<< + * sample_space_size) + * return round(est) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log1p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_mstate_global->__pyx_int_neg_1, __pyx_v_sample_space_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + + /* "apache_beam/transforms/stats.py":234 + * sample_space_size = self._HASH_SPACE_SIZE - 1.0 * self._min_hash + * est = ( + * math.log1p(-self._sample_size / sample_space_size) / # <<<<<<<<<<<<<< + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / + * sample_space_size) +*/ + __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":235 + * est = ( + * math.log1p(-self._sample_size / sample_space_size) / + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / # <<<<<<<<<<<<<< + * sample_space_size) + * return round(est) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_HASH_SPACE_SIZE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":236 + * math.log1p(-self._sample_size / sample_space_size) / + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / + * sample_space_size) # <<<<<<<<<<<<<< + * return round(est) + * +*/ + __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_v_sample_space_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_est = __pyx_t_6; + __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":237 + * math.log1p(-1 / sample_space_size) * self._HASH_SPACE_SIZE / + * sample_space_size) + * return round(est) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_est}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + + /* "apache_beam/transforms/stats.py":210 + * return True + * + * def get_estimate(self): # <<<<<<<<<<<<<< + * """ + * :return: estimation count of unique values +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.transforms.stats._LargestUnique.get_estimate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sample_space_size); + __Pyx_XDECREF(__pyx_v_est); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":245 + * unique values that were combined. + * """ + * def __init__(self, sample_size, coder): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * coder = coders.typecoders.registry.verify_deterministic( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_sample_size = 0; + PyObject *__pyx_v_coder = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_sample_size_2,&__pyx_mstate_global->__pyx_n_u_coder,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 245, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 245, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 245, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 245, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 245, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_sample_size = values[1]; + __pyx_v_coder = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 245, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn___init__(__pyx_self, __pyx_v_self, __pyx_v_sample_size, __pyx_v_coder); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sample_size, PyObject *__pyx_v_coder) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_INCREF(__pyx_v_coder); + + /* "apache_beam/transforms/stats.py":246 + * """ + * def __init__(self, sample_size, coder): + * self._sample_size = sample_size # <<<<<<<<<<<<<< + * coder = coders.typecoders.registry.verify_deterministic( + * coder, 'ApproximateUniqueCombineFn') +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size, __pyx_v_sample_size) < (0)) __PYX_ERR(0, 246, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":247 + * def __init__(self, sample_size, coder): + * self._sample_size = sample_size + * coder = coders.typecoders.registry.verify_deterministic( # <<<<<<<<<<<<<< + * coder, 'ApproximateUniqueCombineFn') + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_coders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_typecoders); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_registry); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/transforms/stats.py":248 + * self._sample_size = sample_size + * coder = coders.typecoders.registry.verify_deterministic( + * coder, 'ApproximateUniqueCombineFn') # <<<<<<<<<<<<<< + * + * self._coder = coder +*/ + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_coder, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_verify_deterministic, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF_SET(__pyx_v_coder, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":250 + * coder, 'ApproximateUniqueCombineFn') + * + * self._coder = coder # <<<<<<<<<<<<<< + * self._hash_fn = _get_default_hash_fn() + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_coder_2, __pyx_v_coder) < (0)) __PYX_ERR(0, 250, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":251 + * + * self._coder = coder + * self._hash_fn = _get_default_hash_fn() # <<<<<<<<<<<<<< + * + * def create_accumulator(self, *args, **kwargs): +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_default_hash_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_hash_fn, __pyx_t_1) < (0)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":245 + * unique values that were combined. + * """ + * def __init__(self, sample_size, coder): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * coder = coders.typecoders.registry.verify_deterministic( +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_coder); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":253 + * self._hash_fn = _get_default_hash_fn() + * + * def create_accumulator(self, *args, **kwargs): # <<<<<<<<<<<<<< + * return _LargestUnique(self._sample_size) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_3create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_3create_accumulator = {"create_accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_3create_accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_3create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 253, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + default: + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 253, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "create_accumulator", 1) < (0)) __PYX_ERR(0, 253, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_accumulator", 0, 1, 1, i); __PYX_ERR(0, 253, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs < 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 253, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_accumulator", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 253, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_2create_accumulator(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_2create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_accumulator", 0); + + /* "apache_beam/transforms/stats.py":254 + * + * def create_accumulator(self, *args, **kwargs): + * return _LargestUnique(self._sample_size) # <<<<<<<<<<<<<< + * + * def add_input(self, accumulator, element, *args, **kwargs): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LargestUnique); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":253 + * self._hash_fn = _get_default_hash_fn() + * + * def create_accumulator(self, *args, **kwargs): # <<<<<<<<<<<<<< + * return _LargestUnique(self._sample_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":256 + * return _LargestUnique(self._sample_size) + * + * def add_input(self, accumulator, element, *args, **kwargs): # <<<<<<<<<<<<<< + * try: + * hashed_value = self._hash_fn(self._coder.encode(element)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_5add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_5add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_5add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_5add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_accumulator = 0; + PyObject *__pyx_v_element = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 3, __pyx_nargs); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_accumulator,&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 256, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + default: + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 256, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 256, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 256, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + const Py_ssize_t used_pos_args = (kwd_pos_args < 3) ? kwd_pos_args : 3; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "add_input", 1) < (0)) __PYX_ERR(0, 256, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 0, 3, 3, i); __PYX_ERR(0, 256, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs < 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 256, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 256, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 256, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_accumulator = values[1]; + __pyx_v_element = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 0, 3, 3, __pyx_nargs); __PYX_ERR(0, 256, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_4add_input(__pyx_self, __pyx_v_self, __pyx_v_accumulator, __pyx_v_element, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_4add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulator, PyObject *__pyx_v_element, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_v_hashed_value = NULL; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + char const *__pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + + /* "apache_beam/transforms/stats.py":257 + * + * def add_input(self, accumulator, element, *args, **kwargs): + * try: # <<<<<<<<<<<<<< + * hashed_value = self._hash_fn(self._coder.encode(element)) + * accumulator.add(hashed_value) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "apache_beam/transforms/stats.py":258 + * def add_input(self, accumulator, element, *args, **kwargs): + * try: + * hashed_value = self._hash_fn(self._coder.encode(element)) # <<<<<<<<<<<<<< + * accumulator.add(hashed_value) + * return accumulator +*/ + __pyx_t_5 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_coder_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 258, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_element}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hash_fn, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_v_hashed_value = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":259 + * try: + * hashed_value = self._hash_fn(self._coder.encode(element)) + * accumulator.add(hashed_value) # <<<<<<<<<<<<<< + * return accumulator + * except Exception as e: +*/ + __pyx_t_6 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_hashed_value}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":260 + * hashed_value = self._hash_fn(self._coder.encode(element)) + * accumulator.add(hashed_value) + * return accumulator # <<<<<<<<<<<<<< + * except Exception as e: + * raise RuntimeError("Runtime exception: %s" % e) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_accumulator); + __pyx_r = __pyx_v_accumulator; + goto __pyx_L7_try_return; + + /* "apache_beam/transforms/stats.py":257 + * + * def add_input(self, accumulator, element, *args, **kwargs): + * try: # <<<<<<<<<<<<<< + * hashed_value = self._hash_fn(self._coder.encode(element)) + * accumulator.add(hashed_value) +*/ + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":261 + * accumulator.add(hashed_value) + * return accumulator + * except Exception as e: # <<<<<<<<<<<<<< + * raise RuntimeError("Runtime exception: %s" % e) + * +*/ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_10) { + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 261, __pyx_L5_except_error) + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_e = __pyx_t_6; + /*try:*/ { + + /* "apache_beam/transforms/stats.py":262 + * return accumulator + * except Exception as e: + * raise RuntimeError("Runtime exception: %s" % e) # <<<<<<<<<<<<<< + * + * # created an issue https://github.com/apache/beam/issues/19459 to speed up +*/ + __pyx_t_7 = NULL; + __pyx_t_11 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Runtime_exception_s, __pyx_v_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 262, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_11}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_8); + } + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(0, 262, __pyx_L14_error) + } + + /* "apache_beam/transforms/stats.py":261 + * accumulator.add(hashed_value) + * return accumulator + * except Exception as e: # <<<<<<<<<<<<<< + * raise RuntimeError("Runtime exception: %s" % e) + * +*/ + /*finally:*/ { + __pyx_L14_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); + if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_19); + __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); + __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; + __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; + goto __pyx_L5_except_error; + } + } + } + goto __pyx_L5_except_error; + + /* "apache_beam/transforms/stats.py":257 + * + * def add_input(self, accumulator, element, *args, **kwargs): + * try: # <<<<<<<<<<<<<< + * hashed_value = self._hash_fn(self._coder.encode(element)) + * accumulator.add(hashed_value) +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L7_try_return:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L0; + } + + /* "apache_beam/transforms/stats.py":256 + * return _LargestUnique(self._sample_size) + * + * def add_input(self, accumulator, element, *args, **kwargs): # <<<<<<<<<<<<<< + * try: + * hashed_value = self._hash_fn(self._coder.encode(element)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_hashed_value); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":266 + * # created an issue https://github.com/apache/beam/issues/19459 to speed up + * # merge process. + * def merge_accumulators(self, accumulators, *args, **kwargs): # <<<<<<<<<<<<<< + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_7merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_7merge_accumulators = {"merge_accumulators", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_7merge_accumulators, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_7merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_accumulators = 0; + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge_accumulators (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 266, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + default: + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "merge_accumulators", 1) < (0)) __PYX_ERR(0, 266, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge_accumulators", 0, 2, 2, i); __PYX_ERR(0, 266, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs < 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 266, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_accumulators = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge_accumulators", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 266, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_6merge_accumulators(__pyx_self, __pyx_v_self, __pyx_v_accumulators, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_6merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + PyObject *__pyx_v_merged_accumulator = NULL; + PyObject *__pyx_v_accumulator = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge_accumulators", 0); + + /* "apache_beam/transforms/stats.py":267 + * # merge process. + * def merge_accumulators(self, accumulators, *args, **kwargs): + * merged_accumulator = self.create_accumulator() # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * for i in accumulator._sample_heap: +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_merged_accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":268 + * def merge_accumulators(self, accumulators, *args, **kwargs): + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * for i in accumulator._sample_heap: + * merged_accumulator.add(i) +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 268, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 268, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 268, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_accumulator, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":269 + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: + * for i in accumulator._sample_heap: # <<<<<<<<<<<<<< + * merged_accumulator.add(i) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_sample_heap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 269, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 269, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 269, __pyx_L1_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_6); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 269, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":270 + * for accumulator in accumulators: + * for i in accumulator._sample_heap: + * merged_accumulator.add(i) # <<<<<<<<<<<<<< + * + * return merged_accumulator +*/ + __pyx_t_9 = __pyx_v_merged_accumulator; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_i}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":269 + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: + * for i in accumulator._sample_heap: # <<<<<<<<<<<<<< + * merged_accumulator.add(i) + * +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":268 + * def merge_accumulators(self, accumulators, *args, **kwargs): + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * for i in accumulator._sample_heap: + * merged_accumulator.add(i) +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":272 + * merged_accumulator.add(i) + * + * return merged_accumulator # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_merged_accumulator); + __pyx_r = __pyx_v_merged_accumulator; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":266 + * # created an issue https://github.com/apache/beam/issues/19459 to speed up + * # merge process. + * def merge_accumulators(self, accumulators, *args, **kwargs): # <<<<<<<<<<<<<< + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_merged_accumulator); + __Pyx_XDECREF(__pyx_v_accumulator); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":274 + * return merged_accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.get_estimate() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_9extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_9extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_9extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_9extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_accumulator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_accumulator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 274, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extract_output", 0) < (0)) __PYX_ERR(0, 274, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 1, 1, i); __PYX_ERR(0, 274, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error) + } + __pyx_v_accumulator = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("extract_output", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 274, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_8extract_output(__pyx_self, __pyx_v_accumulator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_8extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_accumulator) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/stats.py":276 + * @staticmethod + * def extract_output(accumulator): + * return accumulator.get_estimate() # <<<<<<<<<<<<<< + * + * def display_data(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_estimate, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":274 + * return merged_accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.get_estimate() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":278 + * return accumulator.get_estimate() + * + * def display_data(self): # <<<<<<<<<<<<<< + * return {'sample_size': self._sample_size} + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_11display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_11display_data = {"display_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_11display_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_11display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("display_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 278, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 278, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "display_data", 0) < (0)) __PYX_ERR(0, 278, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, i); __PYX_ERR(0, 278, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 278, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 278, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_10display_data(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_10display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("display_data", 0); + + /* "apache_beam/transforms/stats.py":279 + * + * def display_data(self): + * return {'sample_size': self._sample_size} # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sample_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sample_size_2, __pyx_t_2) < (0)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":278 + * return accumulator.get_estimate() + * + * def display_data(self): # <<<<<<<<<<<<<< + * return {'sample_size': self._sample_size} + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateUniqueCombineFn.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":309 + * out: [0, 2, 5, 7, 100] + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def _display_data(num_quantiles, key, reverse, weighted, input_batched): + * return { +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_20ApproximateQuantiles_1_display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_20ApproximateQuantiles_1_display_data = {"_display_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_20ApproximateQuantiles_1_display_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_20ApproximateQuantiles_1_display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_num_quantiles = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_input_batched = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_display_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_num_quantiles,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_input_batched,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 309, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 309, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 309, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 309, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 309, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 309, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_display_data", 0) < (0)) __PYX_ERR(0, 309, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_display_data", 1, 5, 5, i); __PYX_ERR(0, 309, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 309, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 309, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 309, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 309, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 309, __pyx_L3_error) + } + __pyx_v_num_quantiles = values[0]; + __pyx_v_key = values[1]; + __pyx_v_reverse = values[2]; + __pyx_v_weighted = values[3]; + __pyx_v_input_batched = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_display_data", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 309, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantiles._display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_20ApproximateQuantiles__display_data(__pyx_self, __pyx_v_num_quantiles, __pyx_v_key, __pyx_v_reverse, __pyx_v_weighted, __pyx_v_input_batched); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_20ApproximateQuantiles__display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_display_data", 0); + + /* "apache_beam/transforms/stats.py":311 + * @staticmethod + * def _display_data(num_quantiles, key, reverse, weighted, input_batched): + * return { # <<<<<<<<<<<<<< + * 'num_quantiles': DisplayDataItem(num_quantiles, label='Quantile Count'), + * 'key': DisplayDataItem( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":312 + * def _display_data(num_quantiles, key, reverse, weighted, input_batched): + * return { + * 'num_quantiles': DisplayDataItem(num_quantiles, label='Quantile Count'), # <<<<<<<<<<<<<< + * 'key': DisplayDataItem( + * key.__name__ +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DisplayDataItem); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_num_quantiles}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_mstate_global->__pyx_kp_u_Quantile_Count, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":313 + * return { + * 'num_quantiles': DisplayDataItem(num_quantiles, label='Quantile Count'), + * 'key': DisplayDataItem( # <<<<<<<<<<<<<< + * key.__name__ + * if hasattr(key, '__name__') else key.__class__.__name__, +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DisplayDataItem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":315 + * 'key': DisplayDataItem( + * key.__name__ + * if hasattr(key, '__name__') else key.__class__.__name__, # <<<<<<<<<<<<<< + * label='Record Comparer Key'), + * 'reverse': DisplayDataItem(str(reverse), label='Is Reversed'), +*/ + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_key, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 315, __pyx_L1_error) + if (__pyx_t_7) { + + /* "apache_beam/transforms/stats.py":314 + * 'num_quantiles': DisplayDataItem(num_quantiles, label='Quantile Count'), + * 'key': DisplayDataItem( + * key.__name__ # <<<<<<<<<<<<<< + * if hasattr(key, '__name__') else key.__class__.__name__, + * label='Record Comparer Key'), +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __pyx_t_8; + __pyx_t_8 = 0; + } else { + + /* "apache_beam/transforms/stats.py":315 + * 'key': DisplayDataItem( + * key.__name__ + * if hasattr(key, '__name__') else key.__class__.__name__, # <<<<<<<<<<<<<< + * label='Record Comparer Key'), + * 'reverse': DisplayDataItem(str(reverse), label='Is Reversed'), +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = __pyx_t_9; + __pyx_t_9 = 0; + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_mstate_global->__pyx_kp_u_Record_Comparer_Key, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_key, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":317 + * if hasattr(key, '__name__') else key.__class__.__name__, + * label='Record Comparer Key'), + * 'reverse': DisplayDataItem(str(reverse), label='Is Reversed'), # <<<<<<<<<<<<<< + * 'weighted': DisplayDataItem(str(weighted), label='Is Weighted'), + * 'input_batched': DisplayDataItem( +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DisplayDataItem); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_3}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_mstate_global->__pyx_kp_u_Is_Reversed, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":318 + * label='Record Comparer Key'), + * 'reverse': DisplayDataItem(str(reverse), label='Is Reversed'), + * 'weighted': DisplayDataItem(str(weighted), label='Is Weighted'), # <<<<<<<<<<<<<< + * 'input_batched': DisplayDataItem( + * str(input_batched), label='Is Input Batched'), +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DisplayDataItem); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_weighted); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_9); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_t_3}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_mstate_global->__pyx_kp_u_Is_Weighted, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_weighted, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":319 + * 'reverse': DisplayDataItem(str(reverse), label='Is Reversed'), + * 'weighted': DisplayDataItem(str(weighted), label='Is Weighted'), + * 'input_batched': DisplayDataItem( # <<<<<<<<<<<<<< + * str(input_batched), label='Is Input Batched'), + * } +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DisplayDataItem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":320 + * 'weighted': DisplayDataItem(str(weighted), label='Is Weighted'), + * 'input_batched': DisplayDataItem( + * str(input_batched), label='Is Input Batched'), # <<<<<<<<<<<<<< + * } + * +*/ + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_input_batched); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_mstate_global->__pyx_kp_u_Is_Input_Batched, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_input_batched, __pyx_t_2) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":309 + * out: [0, 2, 5, 7, 100] + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def _display_data(num_quantiles, key, reverse, weighted, input_batched): + * return { +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantiles._display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":346 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_5__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_8Globally_5__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_8Globally_5__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_5__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_num_quantiles = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_input_batched = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_num_quantiles,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_input_batched,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 346, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 346, __pyx_L3_error) + + /* "apache_beam/transforms/stats.py":349 + * self, + * num_quantiles, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":350 + * num_quantiles, + * key=None, + * reverse=False, # <<<<<<<<<<<<<< + * weighted=False, + * input_batched=False): +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":351 + * key=None, + * reverse=False, + * weighted=False, # <<<<<<<<<<<<<< + * input_batched=False): + * self._num_quantiles = num_quantiles +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":352 + * reverse=False, + * weighted=False, + * input_batched=False): # <<<<<<<<<<<<<< + * self._num_quantiles = num_quantiles + * self._key = key +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, i); __PYX_ERR(0, 346, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 346, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 346, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 346, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/transforms/stats.py":349 + * self, + * num_quantiles, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_self = values[0]; + __pyx_v_num_quantiles = values[1]; + __pyx_v_key = values[2]; + __pyx_v_reverse = values[3]; + __pyx_v_weighted = values[4]; + __pyx_v_input_batched = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_8Globally_4__init__(__pyx_self, __pyx_v_self, __pyx_v_num_quantiles, __pyx_v_key, __pyx_v_reverse, __pyx_v_weighted, __pyx_v_input_batched); + + /* "apache_beam/transforms/stats.py":346 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_4__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":353 + * weighted=False, + * input_batched=False): + * self._num_quantiles = num_quantiles # <<<<<<<<<<<<<< + * self._key = key + * self._reverse = reverse +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2, __pyx_v_num_quantiles) < (0)) __PYX_ERR(0, 353, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":354 + * input_batched=False): + * self._num_quantiles = num_quantiles + * self._key = key # <<<<<<<<<<<<<< + * self._reverse = reverse + * self._weighted = weighted +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2, __pyx_v_key) < (0)) __PYX_ERR(0, 354, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":355 + * self._num_quantiles = num_quantiles + * self._key = key + * self._reverse = reverse # <<<<<<<<<<<<<< + * self._weighted = weighted + * self._input_batched = input_batched +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2, __pyx_v_reverse) < (0)) __PYX_ERR(0, 355, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":356 + * self._key = key + * self._reverse = reverse + * self._weighted = weighted # <<<<<<<<<<<<<< + * self._input_batched = input_batched + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2, __pyx_v_weighted) < (0)) __PYX_ERR(0, 356, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":357 + * self._reverse = reverse + * self._weighted = weighted + * self._input_batched = input_batched # <<<<<<<<<<<<<< + * + * def expand(self, pcoll): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2, __pyx_v_input_batched) < (0)) __PYX_ERR(0, 357, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":346 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":359 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombineGlobally( + * ApproximateQuantilesCombineFn.create( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_7expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_8Globally_7expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_8Globally_7expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_7expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_pcoll = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("expand (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_pcoll,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 359, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 359, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 359, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 359, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, i); __PYX_ERR(0, 359, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 359, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 359, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_pcoll = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 359, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_8Globally_6expand(__pyx_self, __pyx_v_self, __pyx_v_pcoll); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_6expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("expand", 0); + + /* "apache_beam/transforms/stats.py":360 + * + * def expand(self, pcoll): + * return pcoll | CombineGlobally( # <<<<<<<<<<<<<< + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CombineGlobally); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":361 + * def expand(self, pcoll): + * return pcoll | CombineGlobally( + * ApproximateQuantilesCombineFn.create( # <<<<<<<<<<<<<< + * num_quantiles=self._num_quantiles, + * key=self._key, +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_create); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":362 + * return pcoll | CombineGlobally( + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, # <<<<<<<<<<<<<< + * key=self._key, + * reverse=self._reverse, +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":363 + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, + * key=self._key, # <<<<<<<<<<<<<< + * reverse=self._reverse, + * weighted=self._weighted, +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "apache_beam/transforms/stats.py":364 + * num_quantiles=self._num_quantiles, + * key=self._key, + * reverse=self._reverse, # <<<<<<<<<<<<<< + * weighted=self._weighted, + * input_batched=self._input_batched)) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/transforms/stats.py":365 + * key=self._key, + * reverse=self._reverse, + * weighted=self._weighted, # <<<<<<<<<<<<<< + * input_batched=self._input_batched)) + * +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/transforms/stats.py":366 + * reverse=self._reverse, + * weighted=self._weighted, + * input_batched=self._input_batched)) # <<<<<<<<<<<<<< + * + * def display_data(self): +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_5, NULL}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_t_6, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_8, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_batched, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":360 + * + * def expand(self, pcoll): + * return pcoll | CombineGlobally( # <<<<<<<<<<<<<< + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, +*/ + __pyx_t_3 = PyNumber_Or(__pyx_v_pcoll, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":359 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombineGlobally( + * ApproximateQuantilesCombineFn.create( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":368 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_9display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_8Globally_9display_data = {"display_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_8Globally_9display_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_8Globally_9display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("display_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 368, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 368, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "display_data", 0) < (0)) __PYX_ERR(0, 368, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, i); __PYX_ERR(0, 368, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 368, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 368, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_8Globally_8display_data(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_8Globally_8display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("display_data", 0); + + /* "apache_beam/transforms/stats.py":369 + * + * def display_data(self): + * return ApproximateQuantiles._display_data( # <<<<<<<<<<<<<< + * num_quantiles=self._num_quantiles, + * key=self._key, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_display_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":370 + * def display_data(self): + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, # <<<<<<<<<<<<<< + * key=self._key, + * reverse=self._reverse, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":371 + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, + * key=self._key, # <<<<<<<<<<<<<< + * reverse=self._reverse, + * weighted=self._weighted, +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/transforms/stats.py":372 + * num_quantiles=self._num_quantiles, + * key=self._key, + * reverse=self._reverse, # <<<<<<<<<<<<<< + * weighted=self._weighted, + * input_batched=self._input_batched) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":373 + * key=self._key, + * reverse=self._reverse, + * weighted=self._weighted, # <<<<<<<<<<<<<< + * input_batched=self._input_batched) + * +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/transforms/stats.py":374 + * reverse=self._reverse, + * weighted=self._weighted, + * input_batched=self._input_batched) # <<<<<<<<<<<<<< + * + * @typehints.with_input_types( +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_t_3, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_5, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_6, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, __pyx_t_7, __pyx_t_10, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_batched, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":368 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.transforms.stats.Globally.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":400 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_5__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_5__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_5__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_5__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_num_quantiles = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_input_batched = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_num_quantiles,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_input_batched,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 400, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 400, __pyx_L3_error) + + /* "apache_beam/transforms/stats.py":403 + * self, + * num_quantiles, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":404 + * num_quantiles, + * key=None, + * reverse=False, # <<<<<<<<<<<<<< + * weighted=False, + * input_batched=False): +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":405 + * key=None, + * reverse=False, + * weighted=False, # <<<<<<<<<<<<<< + * input_batched=False): + * self._num_quantiles = num_quantiles +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":406 + * reverse=False, + * weighted=False, + * input_batched=False): # <<<<<<<<<<<<<< + * self._num_quantiles = num_quantiles + * self._key = key +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, i); __PYX_ERR(0, 400, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 400, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 400, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/transforms/stats.py":403 + * self, + * num_quantiles, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_self = values[0]; + __pyx_v_num_quantiles = values[1]; + __pyx_v_key = values[2]; + __pyx_v_reverse = values[3]; + __pyx_v_weighted = values[4]; + __pyx_v_input_batched = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 400, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6PerKey_4__init__(__pyx_self, __pyx_v_self, __pyx_v_num_quantiles, __pyx_v_key, __pyx_v_reverse, __pyx_v_weighted, __pyx_v_input_batched); + + /* "apache_beam/transforms/stats.py":400 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_4__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":407 + * weighted=False, + * input_batched=False): + * self._num_quantiles = num_quantiles # <<<<<<<<<<<<<< + * self._key = key + * self._reverse = reverse +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2, __pyx_v_num_quantiles) < (0)) __PYX_ERR(0, 407, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":408 + * input_batched=False): + * self._num_quantiles = num_quantiles + * self._key = key # <<<<<<<<<<<<<< + * self._reverse = reverse + * self._weighted = weighted +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2, __pyx_v_key) < (0)) __PYX_ERR(0, 408, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":409 + * self._num_quantiles = num_quantiles + * self._key = key + * self._reverse = reverse # <<<<<<<<<<<<<< + * self._weighted = weighted + * self._input_batched = input_batched +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2, __pyx_v_reverse) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":410 + * self._key = key + * self._reverse = reverse + * self._weighted = weighted # <<<<<<<<<<<<<< + * self._input_batched = input_batched + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2, __pyx_v_weighted) < (0)) __PYX_ERR(0, 410, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":411 + * self._reverse = reverse + * self._weighted = weighted + * self._input_batched = input_batched # <<<<<<<<<<<<<< + * + * def expand(self, pcoll): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2, __pyx_v_input_batched) < (0)) __PYX_ERR(0, 411, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":400 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":413 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombinePerKey( + * ApproximateQuantilesCombineFn.create( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_7expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_7expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_7expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_7expand(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_pcoll = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("expand (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_pcoll,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 413, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 413, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, i); __PYX_ERR(0, 413, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_pcoll = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("expand", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 413, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6PerKey_6expand(__pyx_self, __pyx_v_self, __pyx_v_pcoll); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_6expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pcoll) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("expand", 0); + + /* "apache_beam/transforms/stats.py":414 + * + * def expand(self, pcoll): + * return pcoll | CombinePerKey( # <<<<<<<<<<<<<< + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CombinePerKey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":415 + * def expand(self, pcoll): + * return pcoll | CombinePerKey( + * ApproximateQuantilesCombineFn.create( # <<<<<<<<<<<<<< + * num_quantiles=self._num_quantiles, + * key=self._key, +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_create); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":416 + * return pcoll | CombinePerKey( + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, # <<<<<<<<<<<<<< + * key=self._key, + * reverse=self._reverse, +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":417 + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, + * key=self._key, # <<<<<<<<<<<<<< + * reverse=self._reverse, + * weighted=self._weighted, +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "apache_beam/transforms/stats.py":418 + * num_quantiles=self._num_quantiles, + * key=self._key, + * reverse=self._reverse, # <<<<<<<<<<<<<< + * weighted=self._weighted, + * input_batched=self._input_batched)) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "apache_beam/transforms/stats.py":419 + * key=self._key, + * reverse=self._reverse, + * weighted=self._weighted, # <<<<<<<<<<<<<< + * input_batched=self._input_batched)) + * +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "apache_beam/transforms/stats.py":420 + * reverse=self._reverse, + * weighted=self._weighted, + * input_batched=self._input_batched)) # <<<<<<<<<<<<<< + * + * def display_data(self): +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_5, NULL}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_t_6, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_8, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_batched, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_12 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_12 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":414 + * + * def expand(self, pcoll): + * return pcoll | CombinePerKey( # <<<<<<<<<<<<<< + * ApproximateQuantilesCombineFn.create( + * num_quantiles=self._num_quantiles, +*/ + __pyx_t_3 = PyNumber_Or(__pyx_v_pcoll, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":413 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombinePerKey( + * ApproximateQuantilesCombineFn.create( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.expand", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":422 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_9display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_9display_data = {"display_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_9display_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_6PerKey_9display_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("display_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 422, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 422, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "display_data", 0) < (0)) __PYX_ERR(0, 422, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, i); __PYX_ERR(0, 422, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 422, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("display_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 422, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6PerKey_8display_data(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6PerKey_8display_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("display_data", 0); + + /* "apache_beam/transforms/stats.py":423 + * + * def display_data(self): + * return ApproximateQuantiles._display_data( # <<<<<<<<<<<<<< + * num_quantiles=self._num_quantiles, + * key=self._key, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_display_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":424 + * def display_data(self): + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, # <<<<<<<<<<<<<< + * key=self._key, + * reverse=self._reverse, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":425 + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, + * key=self._key, # <<<<<<<<<<<<<< + * reverse=self._reverse, + * weighted=self._weighted, +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_key_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/transforms/stats.py":426 + * num_quantiles=self._num_quantiles, + * key=self._key, + * reverse=self._reverse, # <<<<<<<<<<<<<< + * weighted=self._weighted, + * input_batched=self._input_batched) +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reverse_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/transforms/stats.py":427 + * key=self._key, + * reverse=self._reverse, + * weighted=self._weighted, # <<<<<<<<<<<<<< + * input_batched=self._input_batched) + * +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_weighted_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/transforms/stats.py":428 + * reverse=self._reverse, + * weighted=self._weighted, + * input_batched=self._input_batched) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_t_3, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_5, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_6, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, __pyx_t_7, __pyx_t_10, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_batched, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":422 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.transforms.stats.PerKey.display_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":433 + * class _QuantileSpec(object): + * """Quantiles computation specifications.""" + * def __init__(self, buffer_size, num_buffers, weighted, key, reverse): # <<<<<<<<<<<<<< + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_buffer_size = 0; + PyObject *__pyx_v_num_buffers = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buffer_size,&__pyx_mstate_global->__pyx_n_u_num_buffers,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 433, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 433, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 433, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 433, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 433, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 433, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 433, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 433, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 433, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 433, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 433, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 433, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 433, __pyx_L3_error) + } + __pyx_v_buffer_size = values[0]; + __pyx_v_num_buffers = values[1]; + __pyx_v_weighted = values[2]; + __pyx_v_key = values[3]; + __pyx_v_reverse = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 433, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec___init__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self), __pyx_v_buffer_size, __pyx_v_num_buffers, __pyx_v_weighted, __pyx_v_key, __pyx_v_reverse); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":442 + * + * # Used to sort tuples of values and weights. + * self.weighted_key = None if key is None else (lambda x: key(x[0])) # <<<<<<<<<<<<<< + * + * # Used to compare values. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___lambda = {"lambda", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_x = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 442, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 442, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda", 0) < (0)) __PYX_ERR(0, 442, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, i); __PYX_ERR(0, 442, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 442, __pyx_L3_error) + } + __pyx_v_x = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 442, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 442, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __pyx_t_3 = __pyx_cur_scope->__pyx_v_key; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":446 + * # Used to compare values. + * if reverse and key is None: + * self.less_than = lambda a, b: a > b # <<<<<<<<<<<<<< + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___1lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___1lambda1 = {"lambda1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___1lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___1lambda1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_a = 0; + PyObject *__pyx_v_b = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 446, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 446, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda1", 0) < (0)) __PYX_ERR(0, 446, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, i); __PYX_ERR(0, 446, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 446, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 446, __pyx_L3_error) + } + __pyx_v_a = values[0]; + __pyx_v_b = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 446, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_a, __pyx_v_b); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda1", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":448 + * self.less_than = lambda a, b: a > b + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) # <<<<<<<<<<<<<< + * elif key is None: + * self.less_than = lambda a, b: a < b +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___2lambda2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___2lambda2 = {"lambda2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___2lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___2lambda2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_a = 0; + PyObject *__pyx_v_b = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 448, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 448, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda2", 0) < (0)) __PYX_ERR(0, 448, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, i); __PYX_ERR(0, 448, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 448, __pyx_L3_error) + } + __pyx_v_a = values[0]; + __pyx_v_b = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 448, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_a, __pyx_v_b); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda2", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 448, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __pyx_t_3 = __pyx_cur_scope->__pyx_v_key; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 448, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __pyx_t_5 = __pyx_cur_scope->__pyx_v_key; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":450 + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: + * self.less_than = lambda a, b: a < b # <<<<<<<<<<<<<< + * else: + * self.less_than = lambda a, b: key(a) < key(b) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___3lambda3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___3lambda3 = {"lambda3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___3lambda3, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___3lambda3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_a = 0; + PyObject *__pyx_v_b = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 450, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 450, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 450, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda3", 0) < (0)) __PYX_ERR(0, 450, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, i); __PYX_ERR(0, 450, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 450, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 450, __pyx_L3_error) + } + __pyx_v_a = values[0]; + __pyx_v_b = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 450, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_a, __pyx_v_b); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda3", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":452 + * self.less_than = lambda a, b: a < b + * else: + * self.less_than = lambda a, b: key(a) < key(b) # <<<<<<<<<<<<<< + * + * def get_argsort_key(self, elements): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___4lambda4(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___4lambda4 = {"lambda4", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___4lambda4, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___4lambda4(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_a = 0; + PyObject *__pyx_v_b = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 452, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 452, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 452, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda4", 0) < (0)) __PYX_ERR(0, 452, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda4", 1, 2, 2, i); __PYX_ERR(0, 452, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 452, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 452, __pyx_L3_error) + } + __pyx_v_a = values[0]; + __pyx_v_b = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda4", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 452, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, __pyx_v_a, __pyx_v_b); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda4", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 452, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __pyx_t_3 = __pyx_cur_scope->__pyx_v_key; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 452, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __pyx_t_5 = __pyx_cur_scope->__pyx_v_key; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":433 + * class _QuantileSpec(object): + * """Quantiles computation specifications.""" + * def __init__(self, buffer_size, num_buffers, weighted, key, reverse): # <<<<<<<<<<<<<< + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size +*/ + +static int __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self, PyObject *__pyx_v_buffer_size, PyObject *__pyx_v_num_buffers, PyObject *__pyx_v_weighted, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *__pyx_cur_scope; + int __pyx_r; + __Pyx_RefNannyDeclarations + int64_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 433, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_key = __pyx_v_key; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key); + + /* "apache_beam/transforms/stats.py":435 + * def __init__(self, buffer_size, num_buffers, weighted, key, reverse): + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size # <<<<<<<<<<<<<< + * self.num_buffers = num_buffers + * self.weighted = weighted +*/ + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_buffer_size); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_v_self->buffer_size = __pyx_t_1; + + /* "apache_beam/transforms/stats.py":436 + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size + * self.num_buffers = num_buffers # <<<<<<<<<<<<<< + * self.weighted = weighted + * self.key = key +*/ + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_num_buffers); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_v_self->num_buffers = __pyx_t_1; + + /* "apache_beam/transforms/stats.py":437 + * self.buffer_size = buffer_size + * self.num_buffers = num_buffers + * self.weighted = weighted # <<<<<<<<<<<<<< + * self.key = key + * self.reverse = reverse +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_weighted); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_v_self->weighted = __pyx_t_2; + + /* "apache_beam/transforms/stats.py":438 + * self.num_buffers = num_buffers + * self.weighted = weighted + * self.key = key # <<<<<<<<<<<<<< + * self.reverse = reverse + * +*/ + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key); + __Pyx_GOTREF(__pyx_v_self->key); + __Pyx_DECREF(__pyx_v_self->key); + __pyx_v_self->key = __pyx_cur_scope->__pyx_v_key; + + /* "apache_beam/transforms/stats.py":439 + * self.weighted = weighted + * self.key = key + * self.reverse = reverse # <<<<<<<<<<<<<< + * + * # Used to sort tuples of values and weights. +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_v_self->reverse = __pyx_t_2; + + /* "apache_beam/transforms/stats.py":442 + * + * # Used to sort tuples of values and weights. + * self.weighted_key = None if key is None else (lambda x: key(x[0])) # <<<<<<<<<<<<<< + * + * # Used to compare values. +*/ + __pyx_t_2 = (__pyx_cur_scope->__pyx_v_key == Py_None); + if (__pyx_t_2) { + __Pyx_INCREF(Py_None); + __pyx_t_3 = Py_None; + } else { + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___lambda, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->weighted_key); + __Pyx_DECREF(__pyx_v_self->weighted_key); + __pyx_v_self->weighted_key = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":445 + * + * # Used to compare values. + * if reverse and key is None: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: a > b + * elif reverse: +*/ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 445, __pyx_L1_error) + if (__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_cur_scope->__pyx_v_key == Py_None); + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":446 + * # Used to compare values. + * if reverse and key is None: + * self.less_than = lambda a, b: a > b # <<<<<<<<<<<<<< + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___1lambda1, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->less_than); + __Pyx_DECREF(__pyx_v_self->less_than); + __pyx_v_self->less_than = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":445 + * + * # Used to compare values. + * if reverse and key is None: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: a > b + * elif reverse: +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":447 + * if reverse and key is None: + * self.less_than = lambda a, b: a > b + * elif reverse: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reverse); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 447, __pyx_L1_error) + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":448 + * self.less_than = lambda a, b: a > b + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) # <<<<<<<<<<<<<< + * elif key is None: + * self.less_than = lambda a, b: a < b +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___2lambda2, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->less_than); + __Pyx_DECREF(__pyx_v_self->less_than); + __pyx_v_self->less_than = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":447 + * if reverse and key is None: + * self.less_than = lambda a, b: a > b + * elif reverse: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":449 + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: a < b + * else: +*/ + __pyx_t_2 = (__pyx_cur_scope->__pyx_v_key == Py_None); + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":450 + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: + * self.less_than = lambda a, b: a < b # <<<<<<<<<<<<<< + * else: + * self.less_than = lambda a, b: key(a) < key(b) +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___3lambda3, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->less_than); + __Pyx_DECREF(__pyx_v_self->less_than); + __pyx_v_self->less_than = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":449 + * elif reverse: + * self.less_than = lambda a, b: key(a) > key(b) + * elif key is None: # <<<<<<<<<<<<<< + * self.less_than = lambda a, b: a < b + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":452 + * self.less_than = lambda a, b: a < b + * else: + * self.less_than = lambda a, b: key(a) < key(b) # <<<<<<<<<<<<<< + * + * def get_argsort_key(self, elements): +*/ + /*else*/ { + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_8__init___4lambda4, 0, __pyx_mstate_global->__pyx_n_u_init___locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->less_than); + __Pyx_DECREF(__pyx_v_self->less_than); + __pyx_v_self->less_than = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "apache_beam/transforms/stats.py":433 + * class _QuantileSpec(object): + * """Quantiles computation specifications.""" + * def __init__(self, buffer_size, num_buffers, weighted, key, reverse): # <<<<<<<<<<<<<< + * # type: (int, int, bool, Any, bool) -> None + * self.buffer_size = buffer_size +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":454 + * self.less_than = lambda a, b: key(a) < key(b) + * + * def get_argsort_key(self, elements): # <<<<<<<<<<<<<< + * # type: (List) -> Callable[[int], Any] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key, "Returns a key for sorting indices of elements by element's value."); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key = {"get_argsort_key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_elements = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_argsort_key (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elements,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 454, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 454, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_argsort_key", 0) < (0)) __PYX_ERR(0, 454, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_argsort_key", 1, 1, 1, i); __PYX_ERR(0, 454, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 454, __pyx_L3_error) + } + __pyx_v_elements = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_argsort_key", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 454, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.get_argsort_key", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self), __pyx_v_elements); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":461 + * return elements.__getitem__ + * else: + * return lambda idx: self.key(elements[idx]) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_15get_argsort_key_lambda5(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_15get_argsort_key_lambda5 = {"lambda5", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_15get_argsort_key_lambda5, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_15get_argsort_key_lambda5(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_idx = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_idx,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 461, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 461, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda5", 0) < (0)) __PYX_ERR(0, 461, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda5", 1, 1, 1, i); __PYX_ERR(0, 461, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 461, __pyx_L3_error) + } + __pyx_v_idx = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda5", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 461, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.get_argsort_key.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self, __pyx_v_idx); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self, PyObject *__pyx_v_idx) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *__pyx_cur_scope; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda5", 0); + __pyx_outer_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 461, __pyx_L1_error) } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->key); + __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->key; + if (unlikely(!__pyx_cur_scope->__pyx_v_elements)) { __Pyx_RaiseClosureNameError("elements"); __PYX_ERR(0, 461, __pyx_L1_error) } + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_elements, __pyx_v_idx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.get_argsort_key.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":454 + * self.less_than = lambda a, b: key(a) < key(b) + * + * def get_argsort_key(self, elements): # <<<<<<<<<<<<<< + * # type: (List) -> Callable[[int], Any] + * +*/ + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self, PyObject *__pyx_v_elements) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_argsort_key", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 454, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __pyx_cur_scope->__pyx_v_elements = __pyx_v_elements; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elements); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_elements); + + /* "apache_beam/transforms/stats.py":458 + * + * """Returns a key for sorting indices of elements by element's value.""" + * if self.key is None: # <<<<<<<<<<<<<< + * return elements.__getitem__ + * else: +*/ + __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->key == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":459 + * """Returns a key for sorting indices of elements by element's value.""" + * if self.key is None: + * return elements.__getitem__ # <<<<<<<<<<<<<< + * else: + * return lambda idx: self.key(elements[idx]) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_elements, __pyx_mstate_global->__pyx_n_u_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":458 + * + * """Returns a key for sorting indices of elements by element's value.""" + * if self.key is None: # <<<<<<<<<<<<<< + * return elements.__getitem__ + * else: +*/ + } + + /* "apache_beam/transforms/stats.py":461 + * return elements.__getitem__ + * else: + * return lambda idx: self.key(elements[idx]) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_15get_argsort_key_lambda5, 0, __pyx_mstate_global->__pyx_n_u_get_argsort_key_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "apache_beam/transforms/stats.py":454 + * self.less_than = lambda a, b: key(a) < key(b) + * + * def get_argsort_key(self, elements): # <<<<<<<<<<<<<< + * # type: (List) -> Callable[[int], Any] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.get_argsort_key", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":463 + * return lambda idx: self.key(elements[idx]) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_4__reduce__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_4__reduce__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/transforms/stats.py":464 + * + * def __reduce__(self): + * return ( # <<<<<<<<<<<<<< + * self.__class__, + * ( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":465 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self.buffer_size, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":467 + * self.__class__, + * ( + * self.buffer_size, # <<<<<<<<<<<<<< + * self.num_buffers, + * self.weighted, +*/ + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->buffer_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/transforms/stats.py":468 + * ( + * self.buffer_size, + * self.num_buffers, # <<<<<<<<<<<<<< + * self.weighted, + * self.key, +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->num_buffers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":469 + * self.buffer_size, + * self.num_buffers, + * self.weighted, # <<<<<<<<<<<<<< + * self.key, + * self.reverse)) +*/ + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->weighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/transforms/stats.py":471 + * self.weighted, + * self.key, + * self.reverse)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/transforms/stats.py":467 + * self.__class__, + * ( + * self.buffer_size, # <<<<<<<<<<<<<< + * self.num_buffers, + * self.weighted, +*/ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 467, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 467, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 467, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->key); + __Pyx_GIVEREF(__pyx_v_self->key); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_self->key) != (0)) __PYX_ERR(0, 467, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 467, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":465 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self.buffer_size, +*/ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 465, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 465, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":463 + * return lambda idx: self.key(elements[idx]) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":22 + * + * cdef class _QuantileSpec(object): + * cdef readonly int64_t buffer_size # <<<<<<<<<<<<<< + * cdef readonly int64_t num_buffers + * cdef readonly bint weighted +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.buffer_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":23 + * cdef class _QuantileSpec(object): + * cdef readonly int64_t buffer_size + * cdef readonly int64_t num_buffers # <<<<<<<<<<<<<< + * cdef readonly bint weighted + * cdef readonly key +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->num_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.num_buffers.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":24 + * cdef readonly int64_t buffer_size + * cdef readonly int64_t num_buffers + * cdef readonly bint weighted # <<<<<<<<<<<<<< + * cdef readonly key + * cdef readonly bint reverse +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->weighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.weighted.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":25 + * cdef readonly int64_t num_buffers + * cdef readonly bint weighted + * cdef readonly key # <<<<<<<<<<<<<< + * cdef readonly bint reverse + * cdef readonly weighted_key +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3key_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3key_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_3key___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_3key___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->key); + __pyx_r = __pyx_v_self->key; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":26 + * cdef readonly bint weighted + * cdef readonly key + * cdef readonly bint reverse # <<<<<<<<<<<<<< + * cdef readonly weighted_key + * cdef readonly less_than +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileSpec.reverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":27 + * cdef readonly key + * cdef readonly bint reverse + * cdef readonly weighted_key # <<<<<<<<<<<<<< + * cdef readonly less_than + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->weighted_key); + __pyx_r = __pyx_v_self->weighted_key; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":28 + * cdef readonly bint reverse + * cdef readonly weighted_key + * cdef readonly less_than # <<<<<<<<<<<<<< + * + * cdef class _QuantileBuffer(object): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->less_than); + __pyx_r = __pyx_v_self->less_than; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":478 + * (see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1 + * &type=pdf and ApproximateQuantilesCombineFn for further information)""" + * def __init__( # <<<<<<<<<<<<<< + * self, elements, weights, weighted, level=0, min_val=None, max_val=None): + * # type: (list, list, bool, int, Any, Any) -> None +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_elements = 0; + PyObject *__pyx_v_weights = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_level = 0; + PyObject *__pyx_v_min_val = 0; + PyObject *__pyx_v_max_val = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[6] = {0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elements,&__pyx_mstate_global->__pyx_n_u_weights,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_level,&__pyx_mstate_global->__pyx_n_u_min_val,&__pyx_mstate_global->__pyx_n_u_max_val,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 478, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 478, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + + /* "apache_beam/transforms/stats.py":479 + * &type=pdf and ApproximateQuantilesCombineFn for further information)""" + * def __init__( + * self, elements, weights, weighted, level=0, min_val=None, max_val=None): # <<<<<<<<<<<<<< + * # type: (list, list, bool, int, Any, Any) -> None + * self.elements = elements +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, i); __PYX_ERR(0, 478, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 6: + values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 478, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 478, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 478, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 478, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0)); + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_elements = values[0]; + __pyx_v_weights = values[1]; + __pyx_v_weighted = values[2]; + __pyx_v_level = values[3]; + __pyx_v_min_val = values[4]; + __pyx_v_max_val = values[5]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, __pyx_nargs); __PYX_ERR(0, 478, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer___init__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self), __pyx_v_elements, __pyx_v_weights, __pyx_v_weighted, __pyx_v_level, __pyx_v_min_val, __pyx_v_max_val); + + /* "apache_beam/transforms/stats.py":478 + * (see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1 + * &type=pdf and ApproximateQuantilesCombineFn for further information)""" + * def __init__( # <<<<<<<<<<<<<< + * self, elements, weights, weighted, level=0, min_val=None, max_val=None): + * # type: (list, list, bool, int, Any, Any) -> None +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_weights, PyObject *__pyx_v_weighted, PyObject *__pyx_v_level, PyObject *__pyx_v_min_val, PyObject *__pyx_v_max_val) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int64_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":481 + * self, elements, weights, weighted, level=0, min_val=None, max_val=None): + * # type: (list, list, bool, int, Any, Any) -> None + * self.elements = elements # <<<<<<<<<<<<<< + * # In non-weighted case weights contains a single element representing weight + * # of the buffer in the sense of the original algorithm. In weighted case, +*/ + __Pyx_INCREF(__pyx_v_elements); + __Pyx_GIVEREF(__pyx_v_elements); + __Pyx_GOTREF(__pyx_v_self->elements); + __Pyx_DECREF(__pyx_v_self->elements); + __pyx_v_self->elements = __pyx_v_elements; + + /* "apache_beam/transforms/stats.py":485 + * # of the buffer in the sense of the original algorithm. In weighted case, + * # it stores weights of individual elements. + * self.weights = weights # <<<<<<<<<<<<<< + * self.weighted = weighted + * self.level = level +*/ + __Pyx_INCREF(__pyx_v_weights); + __Pyx_GIVEREF(__pyx_v_weights); + __Pyx_GOTREF(__pyx_v_self->weights); + __Pyx_DECREF(__pyx_v_self->weights); + __pyx_v_self->weights = __pyx_v_weights; + + /* "apache_beam/transforms/stats.py":486 + * # it stores weights of individual elements. + * self.weights = weights + * self.weighted = weighted # <<<<<<<<<<<<<< + * self.level = level + * if min_val is None or max_val is None: +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_weighted); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_v_self->weighted = __pyx_t_1; + + /* "apache_beam/transforms/stats.py":487 + * self.weights = weights + * self.weighted = weighted + * self.level = level # <<<<<<<<<<<<<< + * if min_val is None or max_val is None: + * # Buffer is always initialized with sorted elements. +*/ + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_v_level); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_v_self->level = __pyx_t_2; + + /* "apache_beam/transforms/stats.py":488 + * self.weighted = weighted + * self.level = level + * if min_val is None or max_val is None: # <<<<<<<<<<<<<< + * # Buffer is always initialized with sorted elements. + * self.min_val = elements[0] +*/ + __pyx_t_3 = (__pyx_v_min_val == Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_max_val == Py_None); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "apache_beam/transforms/stats.py":490 + * if min_val is None or max_val is None: + * # Buffer is always initialized with sorted elements. + * self.min_val = elements[0] # <<<<<<<<<<<<<< + * self.max_val = elements[-1] + * else: +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elements, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->min_val); + __Pyx_DECREF(__pyx_v_self->min_val); + __pyx_v_self->min_val = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":491 + * # Buffer is always initialized with sorted elements. + * self.min_val = elements[0] + * self.max_val = elements[-1] # <<<<<<<<<<<<<< + * else: + * # Note that collapsed buffer may not contain min and max in the list of +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elements, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_self->max_val); + __Pyx_DECREF(__pyx_v_self->max_val); + __pyx_v_self->max_val = __pyx_t_4; + __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":488 + * self.weighted = weighted + * self.level = level + * if min_val is None or max_val is None: # <<<<<<<<<<<<<< + * # Buffer is always initialized with sorted elements. + * self.min_val = elements[0] +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":495 + * # Note that collapsed buffer may not contain min and max in the list of + * # elements. + * self.min_val = min_val # <<<<<<<<<<<<<< + * self.max_val = max_val + * +*/ + /*else*/ { + __Pyx_INCREF(__pyx_v_min_val); + __Pyx_GIVEREF(__pyx_v_min_val); + __Pyx_GOTREF(__pyx_v_self->min_val); + __Pyx_DECREF(__pyx_v_self->min_val); + __pyx_v_self->min_val = __pyx_v_min_val; + + /* "apache_beam/transforms/stats.py":496 + * # elements. + * self.min_val = min_val + * self.max_val = max_val # <<<<<<<<<<<<<< + * + * def __iter__(self): +*/ + __Pyx_INCREF(__pyx_v_max_val); + __Pyx_GIVEREF(__pyx_v_max_val); + __Pyx_GOTREF(__pyx_v_self->max_val); + __Pyx_DECREF(__pyx_v_self->max_val); + __pyx_v_self->max_val = __pyx_v_max_val; + } + __pyx_L3:; + + /* "apache_beam/transforms/stats.py":478 + * (see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1 + * &type=pdf and ApproximateQuantilesCombineFn for further information)""" + * def __init__( # <<<<<<<<<<<<<< + * self, elements, weights, weighted, level=0, min_val=None, max_val=None): + * # type: (list, list, bool, int, Any, Any) -> None +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":498 + * self.max_val = max_val + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return zip( + * self.elements, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_3__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_3__iter__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_2__iter__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_2__iter__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__iter__", 0); + + /* "apache_beam/transforms/stats.py":499 + * + * def __iter__(self): + * return zip( # <<<<<<<<<<<<<< + * self.elements, + * self.weights if self.weighted else itertools.repeat(self.weights[0])) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":501 + * return zip( + * self.elements, + * self.weights if self.weighted else itertools.repeat(self.weights[0])) # <<<<<<<<<<<<<< + * + * def __lt__(self, other): +*/ + if (__pyx_v_self->weighted) { + __Pyx_INCREF(__pyx_v_self->weights); + __pyx_t_3 = __pyx_v_self->weights; + } else { + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_itertools); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_repeat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_self->weights, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_self->elements, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":498 + * self.max_val = max_val + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return zip( + * self.elements, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":503 + * self.weights if self.weighted else itertools.repeat(self.weights[0])) + * + * def __lt__(self, other): # <<<<<<<<<<<<<< + * return self.level < other.level + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5__lt__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__lt__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_4__lt__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_4__lt__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__lt__", 0); + + /* "apache_beam/transforms/stats.py":504 + * + * def __lt__(self, other): + * return self.level < other.level # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":503 + * self.weights if self.weighted else itertools.repeat(self.weights[0])) + * + * def __lt__(self, other): # <<<<<<<<<<<<<< + * return self.level < other.level + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":31 + * + * cdef class _QuantileBuffer(object): + * cdef readonly elements # <<<<<<<<<<<<<< + * cdef readonly weights + * cdef readonly bint weighted +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->elements); + __pyx_r = __pyx_v_self->elements; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":32 + * cdef class _QuantileBuffer(object): + * cdef readonly elements + * cdef readonly weights # <<<<<<<<<<<<<< + * cdef readonly bint weighted + * cdef readonly int64_t level +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->weights); + __pyx_r = __pyx_v_self->weights; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":33 + * cdef readonly elements + * cdef readonly weights + * cdef readonly bint weighted # <<<<<<<<<<<<<< + * cdef readonly int64_t level + * cdef readonly min_val +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->weighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.weighted.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":34 + * cdef readonly weights + * cdef readonly bint weighted + * cdef readonly int64_t level # <<<<<<<<<<<<<< + * cdef readonly min_val + * cdef readonly max_val +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->level); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":35 + * cdef readonly bint weighted + * cdef readonly int64_t level + * cdef readonly min_val # <<<<<<<<<<<<<< + * cdef readonly max_val + * cdef readonly _iter +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->min_val); + __pyx_r = __pyx_v_self->min_val; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":36 + * cdef readonly int64_t level + * cdef readonly min_val + * cdef readonly max_val # <<<<<<<<<<<<<< + * cdef readonly _iter + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->max_val); + __pyx_r = __pyx_v_self->max_val; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":37 + * cdef readonly min_val + * cdef readonly max_val + * cdef readonly _iter # <<<<<<<<<<<<<< + * + * cdef class _QuantileState(object): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_iter); + __pyx_r = __pyx_v_self->_iter; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_6__reduce_cython__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_6__reduce_cython__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._iter, self.elements, self.level, self.max_val, self.min_val, self.weighted, self.weights) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->level); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->weighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->_iter); + __Pyx_GIVEREF(__pyx_v_self->_iter); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_iter) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->elements); + __Pyx_GIVEREF(__pyx_v_self->elements); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->elements) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->max_val); + __Pyx_GIVEREF(__pyx_v_self->max_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->max_val) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->min_val); + __Pyx_GIVEREF(__pyx_v_self->min_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->min_val) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_2) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->weights); + __Pyx_GIVEREF(__pyx_v_self->weights); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->weights) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._iter, self.elements, self.level, self.max_val, self.min_val, self.weighted, self.weights) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._iter, self.elements, self.level, self.max_val, self.min_val, self.weighted, self.weights) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._iter is not None or self.elements is not None or self.max_val is not None or self.min_val is not None or self.weights is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._iter, self.elements, self.level, self.max_val, self.min_val, self.weighted, self.weights) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._iter is not None or self.elements is not None or self.max_val is not None or self.min_val is not None or self.weights is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->_iter != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->elements != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->max_val != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->min_val != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->weights != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._iter is not None or self.elements is not None or self.max_val is not None or self.min_val is not None or self.weights is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._iter is not None or self.elements is not None or self.max_val is not None or self.min_val is not None or self.weights is not None + * if use_setstate: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__QuantileBuffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_55430000); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_55430000); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_55430000) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._iter is not None or self.elements is not None or self.max_val is not None or self.min_val is not None or self.weights is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, None), state + * else: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__QuantileBuffer__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__QuantileBuffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_55430000); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_55430000); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_55430000) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__QuantileBuffer__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8__setstate_cython__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_15_QuantileBuffer_8__setstate_cython__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__QuantileBuffer__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_5stats___pyx_unpickle__QuantileBuffer__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__QuantileBuffer__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":511 + * Compact summarization of a collection on which quantiles can be estimated. + * """ + * def __init__(self, unbuffered_elements, unbuffered_weights, buffers, spec): # <<<<<<<<<<<<<< + * # type: (List, List, List[_QuantileBuffer], _QuantileSpec) -> None + * self.buffers = buffers +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_unbuffered_elements = 0; + PyObject *__pyx_v_unbuffered_weights = 0; + PyObject *__pyx_v_buffers = 0; + PyObject *__pyx_v_spec = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unbuffered_elements,&__pyx_mstate_global->__pyx_n_u_unbuffered_weights,&__pyx_mstate_global->__pyx_n_u_buffers,&__pyx_mstate_global->__pyx_n_u_spec,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 511, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 511, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 511, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 511, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 511, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 511, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 511, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 511, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 511, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 511, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 511, __pyx_L3_error) + } + __pyx_v_unbuffered_elements = values[0]; + __pyx_v_unbuffered_weights = values[1]; + __pyx_v_buffers = values[2]; + __pyx_v_spec = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 511, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState___init__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), __pyx_v_unbuffered_elements, __pyx_v_unbuffered_weights, __pyx_v_buffers, __pyx_v_spec); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState___init__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_unbuffered_elements, PyObject *__pyx_v_unbuffered_weights, PyObject *__pyx_v_buffers, PyObject *__pyx_v_spec) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":513 + * def __init__(self, unbuffered_elements, unbuffered_weights, buffers, spec): + * # type: (List, List, List[_QuantileBuffer], _QuantileSpec) -> None + * self.buffers = buffers # <<<<<<<<<<<<<< + * self.spec = spec + * if spec.weighted: +*/ + __Pyx_INCREF(__pyx_v_buffers); + __Pyx_GIVEREF(__pyx_v_buffers); + __Pyx_GOTREF(__pyx_v_self->buffers); + __Pyx_DECREF(__pyx_v_self->buffers); + __pyx_v_self->buffers = __pyx_v_buffers; + + /* "apache_beam/transforms/stats.py":514 + * # type: (List, List, List[_QuantileBuffer], _QuantileSpec) -> None + * self.buffers = buffers + * self.spec = spec # <<<<<<<<<<<<<< + * if spec.weighted: + * self.add_unbuffered = self._add_unbuffered_weighted +*/ + __pyx_t_1 = __pyx_v_spec; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec))))) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->spec); + __Pyx_DECREF((PyObject *)__pyx_v_self->spec); + __pyx_v_self->spec = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":515 + * self.buffers = buffers + * self.spec = spec + * if spec.weighted: # <<<<<<<<<<<<<< + * self.add_unbuffered = self._add_unbuffered_weighted + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_mstate_global->__pyx_n_u_weighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":516 + * self.spec = spec + * if spec.weighted: + * self.add_unbuffered = self._add_unbuffered_weighted # <<<<<<<<<<<<<< + * else: + * self.add_unbuffered = self._add_unbuffered +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_unbuffered_weighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->add_unbuffered); + __Pyx_DECREF(__pyx_v_self->add_unbuffered); + __pyx_v_self->add_unbuffered = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":515 + * self.buffers = buffers + * self.spec = spec + * if spec.weighted: # <<<<<<<<<<<<<< + * self.add_unbuffered = self._add_unbuffered_weighted + * else: +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":518 + * self.add_unbuffered = self._add_unbuffered_weighted + * else: + * self.add_unbuffered = self._add_unbuffered # <<<<<<<<<<<<<< + * + * # The algorithm requires that the manipulated buffers always be filled to +*/ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_unbuffered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->add_unbuffered); + __Pyx_DECREF(__pyx_v_self->add_unbuffered); + __pyx_v_self->add_unbuffered = __pyx_t_1; + __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/transforms/stats.py":526 + * # into new, full buffers and then take them into account when computing the + * # final output. + * self.unbuffered_elements = unbuffered_elements # <<<<<<<<<<<<<< + * self.unbuffered_weights = unbuffered_weights + * +*/ + __Pyx_INCREF(__pyx_v_unbuffered_elements); + __Pyx_GIVEREF(__pyx_v_unbuffered_elements); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_v_unbuffered_elements; + + /* "apache_beam/transforms/stats.py":527 + * # final output. + * self.unbuffered_elements = unbuffered_elements + * self.unbuffered_weights = unbuffered_weights # <<<<<<<<<<<<<< + * + * # This is needed for pickling to work when Cythonization is enabled. +*/ + __Pyx_INCREF(__pyx_v_unbuffered_weights); + __Pyx_GIVEREF(__pyx_v_unbuffered_weights); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = __pyx_v_unbuffered_weights; + + /* "apache_beam/transforms/stats.py":511 + * Compact summarization of a collection on which quantiles can be estimated. + * """ + * def __init__(self, unbuffered_elements, unbuffered_weights, buffers, spec): # <<<<<<<<<<<<<< + * # type: (List, List, List[_QuantileBuffer], _QuantileSpec) -> None + * self.buffers = buffers +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":530 + * + * # This is needed for pickling to work when Cythonization is enabled. + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_2__reduce__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_2__reduce__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/transforms/stats.py":531 + * # This is needed for pickling to work when Cythonization is enabled. + * def __reduce__(self): + * return ( # <<<<<<<<<<<<<< + * self.__class__, + * ( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":532 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self.unbuffered_elements, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":534 + * self.__class__, + * ( + * self.unbuffered_elements, # <<<<<<<<<<<<<< + * self.unbuffered_weights, + * self.buffers, +*/ + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->unbuffered_elements); + __Pyx_GIVEREF(__pyx_v_self->unbuffered_elements); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->unbuffered_elements) != (0)) __PYX_ERR(0, 534, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->unbuffered_weights); + __Pyx_GIVEREF(__pyx_v_self->unbuffered_weights); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->unbuffered_weights) != (0)) __PYX_ERR(0, 534, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->buffers); + __Pyx_GIVEREF(__pyx_v_self->buffers); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->buffers) != (0)) __PYX_ERR(0, 534, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_self->spec); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->spec); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->spec)) != (0)) __PYX_ERR(0, 534, __pyx_L1_error); + + /* "apache_beam/transforms/stats.py":532 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self.unbuffered_elements, +*/ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 532, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 532, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":530 + * + * # This is needed for pickling to work when Cythonization is enabled. + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":539 + * self.spec)) + * + * def is_empty(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_is_empty(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_empty", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/stats.py":543 + * + * """Check if the buffered & unbuffered elements are empty or not.""" + * return not self.unbuffered_elements and not self.buffers # <<<<<<<<<<<<<< + * + * def _add_unbuffered(self, elements, offset_fn): +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->unbuffered_elements); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { + } else { + __pyx_t_6 = __pyx_t_8; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->buffers); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_7 = (!__pyx_t_8); + __pyx_t_6 = __pyx_t_7; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_6; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":539 + * self.spec)) + * + * def is_empty(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.is_empty", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_4is_empty, "Check if the buffered & unbuffered elements are empty or not."); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty = {"is_empty", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_4is_empty}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_empty (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_empty", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_empty", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4is_empty(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4is_empty(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_empty", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_is_empty(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.is_empty", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":545 + * return not self.unbuffered_elements and not self.buffers + * + * def _add_unbuffered(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch) { + int64_t __pyx_v_num_new_buffers; + int64_t __pyx_v_idx; + PyObject *__pyx_v_to_buffer = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int64_t __pyx_t_7; + int64_t __pyx_t_8; + int64_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_add_unbuffered", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_unbuffered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_elements, __pyx_v_offset_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/stats.py":552 + * collapsing if needed. + * """ + * self.unbuffered_elements.extend(elements) # <<<<<<<<<<<<<< + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * for idx in range(num_new_buffers): +*/ + __pyx_t_2 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_elements}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":553 + * """ + * self.unbuffered_elements.extend(elements) + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size # <<<<<<<<<<<<<< + * for idx in range(num_new_buffers): + * to_buffer = sorted( +*/ + __pyx_t_1 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v_self->spec->buffer_size == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 553, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(__pyx_v_self->spec->buffer_size == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_6))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(0, 553, __pyx_L1_error) + } + __pyx_v_num_new_buffers = __Pyx_div_Py_ssize_t(__pyx_t_6, __pyx_v_self->spec->buffer_size, 0); + + /* "apache_beam/transforms/stats.py":554 + * self.unbuffered_elements.extend(elements) + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * for idx in range(num_new_buffers): # <<<<<<<<<<<<<< + * to_buffer = sorted( + * self.unbuffered_elements[idx * self.spec.buffer_size:(idx + 1) * +*/ + __pyx_t_7 = __pyx_v_num_new_buffers; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_idx = __pyx_t_9; + + /* "apache_beam/transforms/stats.py":555 + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * for idx in range(num_new_buffers): + * to_buffer = sorted( # <<<<<<<<<<<<<< + * self.unbuffered_elements[idx * self.spec.buffer_size:(idx + 1) * + * self.spec.buffer_size], +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":556 + * for idx in range(num_new_buffers): + * to_buffer = sorted( + * self.unbuffered_elements[idx * self.spec.buffer_size:(idx + 1) * # <<<<<<<<<<<<<< + * self.spec.buffer_size], + * key=self.spec.key, +*/ + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_self->unbuffered_elements, (__pyx_v_idx * __pyx_v_self->spec->buffer_size), ((__pyx_v_idx + 1) * __pyx_v_self->spec->buffer_size), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/transforms/stats.py":559 + * self.spec.buffer_size], + * key=self.spec.key, + * reverse=self.spec.reverse) # <<<<<<<<<<<<<< + * heapq.heappush( + * self.buffers, +*/ + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->spec->reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_self->spec->key, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 555, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_3, __pyx_t_10, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_sorted, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_to_buffer, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":560 + * key=self.spec.key, + * reverse=self.spec.reverse) + * heapq.heappush( # <<<<<<<<<<<<<< + * self.buffers, + * _QuantileBuffer(elements=to_buffer, weights=[1], weighted=False)) +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_heappush); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":562 + * heapq.heappush( + * self.buffers, + * _QuantileBuffer(elements=to_buffer, weights=[1], weighted=False)) # <<<<<<<<<<<<<< + * + * if num_new_buffers > 0: +*/ + __pyx_t_2 = NULL; + __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 562, __pyx_L1_error); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_elements, __pyx_v_to_buffer, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weights, __pyx_t_11, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, Py_False, __pyx_t_12, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_10); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_self->buffers, ((PyObject *)__pyx_t_3)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/transforms/stats.py":564 + * _QuantileBuffer(elements=to_buffer, weights=[1], weighted=False)) + * + * if num_new_buffers > 0: # <<<<<<<<<<<<<< + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * + * self.spec. +*/ + __pyx_t_13 = (__pyx_v_num_new_buffers > 0); + if (__pyx_t_13) { + + /* "apache_beam/transforms/stats.py":565 + * + * if num_new_buffers > 0: + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * # <<<<<<<<<<<<<< + * self.spec. + * buffer_size:] +*/ + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_self->unbuffered_elements, (__pyx_v_num_new_buffers * __pyx_v_self->spec->buffer_size), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":564 + * _QuantileBuffer(elements=to_buffer, weights=[1], weighted=False)) + * + * if num_new_buffers > 0: # <<<<<<<<<<<<<< + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * + * self.spec. +*/ + } + + /* "apache_beam/transforms/stats.py":569 + * buffer_size:] + * + * self.collapse_if_needed(offset_fn) # <<<<<<<<<<<<<< + * + * def _add_unbuffered_weighted(self, elements, offset_fn): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self->__pyx_vtab)->collapse_if_needed(__pyx_v_self, __pyx_v_offset_fn, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":545 + * return not self.unbuffered_elements and not self.buffers + * + * def _add_unbuffered(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_to_buffer); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_6_add_unbuffered, "\n Add elements to the unbuffered list, creating new buffers and\n collapsing if needed.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered = {"_add_unbuffered", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_6_add_unbuffered}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_elements = 0; + PyObject *__pyx_v_offset_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_add_unbuffered (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elements,&__pyx_mstate_global->__pyx_n_u_offset_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 545, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 545, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 545, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_add_unbuffered", 0) < (0)) __PYX_ERR(0, 545, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_add_unbuffered", 1, 2, 2, i); __PYX_ERR(0, 545, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 545, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 545, __pyx_L3_error) + } + __pyx_v_elements = values[0]; + __pyx_v_offset_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_add_unbuffered", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 545, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_6_add_unbuffered(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), __pyx_v_elements, __pyx_v_offset_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_6_add_unbuffered(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_add_unbuffered", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered(__pyx_v_self, __pyx_v_elements, __pyx_v_offset_fn, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":571 + * self.collapse_if_needed(offset_fn) + * + * def _add_unbuffered_weighted(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered_weighted(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch) { + int64_t __pyx_v_num_new_buffers; + int64_t __pyx_v_idx; + PyObject *__pyx_v_argsort_key = NULL; + PyObject *__pyx_v_argsort = NULL; + PyObject *__pyx_v_elements_to_buffer = NULL; + PyObject *__pyx_v_weights_to_buffer = NULL; + int64_t __pyx_7genexpr__pyx_v_idx; + int64_t __pyx_8genexpr1__pyx_v_idx; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int64_t __pyx_t_9; + int64_t __pyx_t_10; + int64_t __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *(*__pyx_t_14)(PyObject *); + int64_t __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_add_unbuffered_weighted", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add_unbuffered_weighted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_elements, __pyx_v_offset_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/stats.py":578 + * collapsing if needed. + * """ + * if len(elements) == 1: # <<<<<<<<<<<<<< + * self.unbuffered_elements.append(elements[0][0]) + * self.unbuffered_weights.append(elements[0][1]) +*/ + __pyx_t_6 = PyObject_Length(__pyx_v_elements); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 == 1); + if (__pyx_t_7) { + + /* "apache_beam/transforms/stats.py":579 + * """ + * if len(elements) == 1: + * self.unbuffered_elements.append(elements[0][0]) # <<<<<<<<<<<<<< + * self.unbuffered_weights.append(elements[0][1]) + * else: +*/ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elements, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_self->unbuffered_elements, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":580 + * if len(elements) == 1: + * self.unbuffered_elements.append(elements[0][0]) + * self.unbuffered_weights.append(elements[0][1]) # <<<<<<<<<<<<<< + * else: + * self.unbuffered_elements.extend(elements[0]) +*/ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elements, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_self->unbuffered_weights, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":578 + * collapsing if needed. + * """ + * if len(elements) == 1: # <<<<<<<<<<<<<< + * self.unbuffered_elements.append(elements[0][0]) + * self.unbuffered_weights.append(elements[0][1]) +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":582 + * self.unbuffered_weights.append(elements[0][1]) + * else: + * self.unbuffered_elements.extend(elements[0]) # <<<<<<<<<<<<<< + * self.unbuffered_weights.extend(elements[1]) + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size +*/ + /*else*/ { + __pyx_t_2 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_elements, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":583 + * else: + * self.unbuffered_elements.extend(elements[0]) + * self.unbuffered_weights.extend(elements[1]) # <<<<<<<<<<<<<< + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) +*/ + __pyx_t_4 = __pyx_v_self->unbuffered_weights; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elements, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "apache_beam/transforms/stats.py":584 + * self.unbuffered_elements.extend(elements[0]) + * self.unbuffered_weights.extend(elements[1]) + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size # <<<<<<<<<<<<<< + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * for idx in range(num_new_buffers): +*/ + __pyx_t_1 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v_self->spec->buffer_size == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(0, 584, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((int64_t)-1) > 0)) && unlikely(__pyx_v_self->spec->buffer_size == (int64_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_t_6))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(0, 584, __pyx_L1_error) + } + __pyx_v_num_new_buffers = __Pyx_div_Py_ssize_t(__pyx_t_6, __pyx_v_self->spec->buffer_size, 0); + + /* "apache_beam/transforms/stats.py":585 + * self.unbuffered_weights.extend(elements[1]) + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) # <<<<<<<<<<<<<< + * for idx in range(num_new_buffers): + * argsort = sorted( +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->spec); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->unbuffered_elements}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_argsort_key, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_argsort_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":586 + * num_new_buffers = len(self.unbuffered_elements) // self.spec.buffer_size + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * for idx in range(num_new_buffers): # <<<<<<<<<<<<<< + * argsort = sorted( + * range(idx * self.spec.buffer_size, (idx + 1) * self.spec.buffer_size), +*/ + __pyx_t_9 = __pyx_v_num_new_buffers; + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_idx = __pyx_t_11; + + /* "apache_beam/transforms/stats.py":587 + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * for idx in range(num_new_buffers): + * argsort = sorted( # <<<<<<<<<<<<<< + * range(idx * self.spec.buffer_size, (idx + 1) * self.spec.buffer_size), + * key=argsort_key, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":588 + * for idx in range(num_new_buffers): + * argsort = sorted( + * range(idx * self.spec.buffer_size, (idx + 1) * self.spec.buffer_size), # <<<<<<<<<<<<<< + * key=argsort_key, + * reverse=self.spec.reverse) +*/ + __pyx_t_3 = NULL; + __pyx_t_12 = __Pyx_PyLong_From_int64_t((__pyx_v_idx * __pyx_v_self->spec->buffer_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyLong_From_int64_t(((__pyx_v_idx + 1) * __pyx_v_self->spec->buffer_size)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_12, __pyx_t_13}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/transforms/stats.py":590 + * range(idx * self.spec.buffer_size, (idx + 1) * self.spec.buffer_size), + * key=argsort_key, + * reverse=self.spec.reverse) # <<<<<<<<<<<<<< + * elements_to_buffer = [self.unbuffered_elements[idx] for idx in argsort] + * weights_to_buffer = [self.unbuffered_weights[idx] for idx in argsort] +*/ + __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_self->spec->reverse); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_argsort_key, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 587, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_13, __pyx_t_12, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_sorted, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_argsort, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":591 + * key=argsort_key, + * reverse=self.spec.reverse) + * elements_to_buffer = [self.unbuffered_elements[idx] for idx in argsort] # <<<<<<<<<<<<<< + * weights_to_buffer = [self.unbuffered_weights[idx] for idx in argsort] + * heapq.heappush( +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_v_argsort)) || PyTuple_CheckExact(__pyx_v_argsort)) { + __pyx_t_12 = __pyx_v_argsort; __Pyx_INCREF(__pyx_t_12); + __pyx_t_6 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_argsort); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 591, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_12))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 591, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 591, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_13 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_6)); + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 591, __pyx_L1_error) + } else { + __pyx_t_13 = __pyx_t_14(__pyx_t_12); + if (unlikely(!__pyx_t_13)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 591, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_15 = __Pyx_PyLong_As_int64_t(__pyx_t_13); if (unlikely((__pyx_t_15 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_7genexpr__pyx_v_idx = __pyx_t_15; + __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_self->unbuffered_elements, __pyx_7genexpr__pyx_v_idx, int64_t, 1, __Pyx_PyLong_From_int64_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } /* exit inner scope */ + __Pyx_XDECREF_SET(__pyx_v_elements_to_buffer, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":592 + * reverse=self.spec.reverse) + * elements_to_buffer = [self.unbuffered_elements[idx] for idx in argsort] + * weights_to_buffer = [self.unbuffered_weights[idx] for idx in argsort] # <<<<<<<<<<<<<< + * heapq.heappush( + * self.buffers, +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_v_argsort)) || PyTuple_CheckExact(__pyx_v_argsort)) { + __pyx_t_12 = __pyx_v_argsort; __Pyx_INCREF(__pyx_t_12); + __pyx_t_6 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_argsort); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 592, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_12))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 592, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 592, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_13 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_6)); + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 592, __pyx_L1_error) + } else { + __pyx_t_13 = __pyx_t_14(__pyx_t_12); + if (unlikely(!__pyx_t_13)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 592, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_15 = __Pyx_PyLong_As_int64_t(__pyx_t_13); if (unlikely((__pyx_t_15 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_8genexpr1__pyx_v_idx = __pyx_t_15; + __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_self->unbuffered_weights, __pyx_8genexpr1__pyx_v_idx, int64_t, 1, __Pyx_PyLong_From_int64_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } /* exit inner scope */ + __Pyx_XDECREF_SET(__pyx_v_weights_to_buffer, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":593 + * elements_to_buffer = [self.unbuffered_elements[idx] for idx in argsort] + * weights_to_buffer = [self.unbuffered_weights[idx] for idx in argsort] + * heapq.heappush( # <<<<<<<<<<<<<< + * self.buffers, + * _QuantileBuffer( +*/ + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_heappush); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":595 + * heapq.heappush( + * self.buffers, + * _QuantileBuffer( # <<<<<<<<<<<<<< + * elements=elements_to_buffer, + * weights=weights_to_buffer, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":598 + * elements=elements_to_buffer, + * weights=weights_to_buffer, + * weighted=True)) # <<<<<<<<<<<<<< + * + * if num_new_buffers > 0: +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_elements, __pyx_v_elements_to_buffer, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 595, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weights, __pyx_v_weights_to_buffer, __pyx_t_3, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 595, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, Py_True, __pyx_t_3, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 595, __pyx_L1_error) + __pyx_t_13 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_13); + } + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_12); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_self->buffers, ((PyObject *)__pyx_t_13)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/transforms/stats.py":600 + * weighted=True)) + * + * if num_new_buffers > 0: # <<<<<<<<<<<<<< + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * + * self.spec. +*/ + __pyx_t_7 = (__pyx_v_num_new_buffers > 0); + if (__pyx_t_7) { + + /* "apache_beam/transforms/stats.py":601 + * + * if num_new_buffers > 0: + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * # <<<<<<<<<<<<<< + * self.spec. + * buffer_size:] +*/ + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_self->unbuffered_elements, (__pyx_v_num_new_buffers * __pyx_v_self->spec->buffer_size), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":604 + * self.spec. + * buffer_size:] + * self.unbuffered_weights = self.unbuffered_weights[num_new_buffers * # <<<<<<<<<<<<<< + * self.spec.buffer_size:] + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_self->unbuffered_weights, (__pyx_v_num_new_buffers * __pyx_v_self->spec->buffer_size), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":600 + * weighted=True)) + * + * if num_new_buffers > 0: # <<<<<<<<<<<<<< + * self.unbuffered_elements = self.unbuffered_elements[num_new_buffers * + * self.spec. +*/ + } + + /* "apache_beam/transforms/stats.py":607 + * self.spec.buffer_size:] + * + * self.collapse_if_needed(offset_fn) # <<<<<<<<<<<<<< + * + * def finalize(self): +*/ + __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self->__pyx_vtab)->collapse_if_needed(__pyx_v_self, __pyx_v_offset_fn, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":571 + * self.collapse_if_needed(offset_fn) + * + * def _add_unbuffered_weighted(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered_weighted", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_argsort_key); + __Pyx_XDECREF(__pyx_v_argsort); + __Pyx_XDECREF(__pyx_v_elements_to_buffer); + __Pyx_XDECREF(__pyx_v_weights_to_buffer); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_8_add_unbuffered_weighted, "\n Add elements with weights to the unbuffered list, creating new buffers and\n collapsing if needed.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted = {"_add_unbuffered_weighted", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_8_add_unbuffered_weighted}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_elements = 0; + PyObject *__pyx_v_offset_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_add_unbuffered_weighted (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elements,&__pyx_mstate_global->__pyx_n_u_offset_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 571, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 571, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 571, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_add_unbuffered_weighted", 0) < (0)) __PYX_ERR(0, 571, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_add_unbuffered_weighted", 1, 2, 2, i); __PYX_ERR(0, 571, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 571, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 571, __pyx_L3_error) + } + __pyx_v_elements = values[0]; + __pyx_v_offset_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_add_unbuffered_weighted", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 571, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered_weighted", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_8_add_unbuffered_weighted(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), __pyx_v_elements, __pyx_v_offset_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_8_add_unbuffered_weighted(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_elements, PyObject *__pyx_v_offset_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_add_unbuffered_weighted", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered_weighted(__pyx_v_self, __pyx_v_elements, __pyx_v_offset_fn, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState._add_unbuffered_weighted", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":609 + * self.collapse_if_needed(offset_fn) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_11finalize(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_finalize(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, int __pyx_skip_dispatch) { + PyObject *__pyx_v_argsort_key = NULL; + PyObject *__pyx_v_argsort = NULL; + PyObject *__pyx_8genexpr2__pyx_v_idx = NULL; + PyObject *__pyx_8genexpr3__pyx_v_idx = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_finalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_11finalize)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/stats.py":617 + * proper position since _collapse is not going to be called after. + * """ + * if self.unbuffered_elements and self.spec.weighted: # <<<<<<<<<<<<<< + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * argsort = sorted( +*/ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->unbuffered_elements); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 617, __pyx_L1_error) + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __pyx_v_self->spec->weighted; + __pyx_L4_bool_binop_done:; + if (__pyx_t_6) { + + /* "apache_beam/transforms/stats.py":618 + * """ + * if self.unbuffered_elements and self.spec.weighted: + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) # <<<<<<<<<<<<<< + * argsort = sorted( + * range(len(self.unbuffered_elements)), +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_self->spec); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->unbuffered_elements}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_argsort_key, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_argsort_key = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":619 + * if self.unbuffered_elements and self.spec.weighted: + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * argsort = sorted( # <<<<<<<<<<<<<< + * range(len(self.unbuffered_elements)), + * key=argsort_key, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":620 + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * argsort = sorted( + * range(len(self.unbuffered_elements)), # <<<<<<<<<<<<<< + * key=argsort_key, + * reverse=self.spec.reverse) +*/ + __pyx_t_3 = NULL; + __pyx_t_8 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 620, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "apache_beam/transforms/stats.py":622 + * range(len(self.unbuffered_elements)), + * key=argsort_key, + * reverse=self.spec.reverse) # <<<<<<<<<<<<<< + * self.unbuffered_elements = [ + * self.unbuffered_elements[idx] for idx in argsort +*/ + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->spec->reverse); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_argsort_key, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 619, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_8, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_sorted, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_argsort = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":623 + * key=argsort_key, + * reverse=self.spec.reverse) + * self.unbuffered_elements = [ # <<<<<<<<<<<<<< + * self.unbuffered_elements[idx] for idx in argsort + * ] +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":624 + * reverse=self.spec.reverse) + * self.unbuffered_elements = [ + * self.unbuffered_elements[idx] for idx in argsort # <<<<<<<<<<<<<< + * ] + * self.unbuffered_weights = [ +*/ + if (likely(PyList_CheckExact(__pyx_v_argsort)) || PyTuple_CheckExact(__pyx_v_argsort)) { + __pyx_t_3 = __pyx_v_argsort; __Pyx_INCREF(__pyx_t_3); + __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 624, __pyx_L8_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L8_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L8_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L8_error) + } else { + __pyx_t_8 = __pyx_t_10(__pyx_t_3); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 624, __pyx_L8_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_idx, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->unbuffered_elements, __pyx_8genexpr2__pyx_v_idx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 623, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_idx); __pyx_8genexpr2__pyx_v_idx = 0; + goto __pyx_L12_exit_scope; + __pyx_L8_error:; + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_idx); __pyx_8genexpr2__pyx_v_idx = 0; + goto __pyx_L1_error; + __pyx_L12_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/transforms/stats.py":623 + * key=argsort_key, + * reverse=self.spec.reverse) + * self.unbuffered_elements = [ # <<<<<<<<<<<<<< + * self.unbuffered_elements[idx] for idx in argsort + * ] +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":626 + * self.unbuffered_elements[idx] for idx in argsort + * ] + * self.unbuffered_weights = [ # <<<<<<<<<<<<<< + * self.unbuffered_weights[idx] for idx in argsort + * ] +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":627 + * ] + * self.unbuffered_weights = [ + * self.unbuffered_weights[idx] for idx in argsort # <<<<<<<<<<<<<< + * ] + * self.buffers.append( +*/ + if (likely(PyList_CheckExact(__pyx_v_argsort)) || PyTuple_CheckExact(__pyx_v_argsort)) { + __pyx_t_3 = __pyx_v_argsort; __Pyx_INCREF(__pyx_t_3); + __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 627, __pyx_L15_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L15_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_9; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L15_error) + #endif + if (__pyx_t_9 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); + #endif + ++__pyx_t_9; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 627, __pyx_L15_error) + } else { + __pyx_t_8 = __pyx_t_10(__pyx_t_3); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 627, __pyx_L15_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_idx, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->unbuffered_weights, __pyx_8genexpr3__pyx_v_idx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 627, __pyx_L15_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 626, __pyx_L15_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_idx); __pyx_8genexpr3__pyx_v_idx = 0; + goto __pyx_L19_exit_scope; + __pyx_L15_error:; + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_idx); __pyx_8genexpr3__pyx_v_idx = 0; + goto __pyx_L1_error; + __pyx_L19_exit_scope:; + } /* exit inner scope */ + + /* "apache_beam/transforms/stats.py":626 + * self.unbuffered_elements[idx] for idx in argsort + * ] + * self.unbuffered_weights = [ # <<<<<<<<<<<<<< + * self.unbuffered_weights[idx] for idx in argsort + * ] +*/ + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":630 + * ] + * self.buffers.append( + * _QuantileBuffer( # <<<<<<<<<<<<<< + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) + * self.unbuffered_weights = [] +*/ + __pyx_t_3 = NULL; + + /* "apache_beam/transforms/stats.py":631 + * self.buffers.append( + * _QuantileBuffer( + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) # <<<<<<<<<<<<<< + * self.unbuffered_weights = [] + * elif self.unbuffered_elements: +*/ + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_self->unbuffered_elements, __pyx_v_self->unbuffered_weights}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, Py_True, __pyx_t_8, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":629 + * self.unbuffered_weights[idx] for idx in argsort + * ] + * self.buffers.append( # <<<<<<<<<<<<<< + * _QuantileBuffer( + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) +*/ + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_self->buffers, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":632 + * _QuantileBuffer( + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) + * self.unbuffered_weights = [] # <<<<<<<<<<<<<< + * elif self.unbuffered_elements: + * self.unbuffered_elements.sort( +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":617 + * proper position since _collapse is not going to be called after. + * """ + * if self.unbuffered_elements and self.spec.weighted: # <<<<<<<<<<<<<< + * argsort_key = self.spec.get_argsort_key(self.unbuffered_elements) + * argsort = sorted( +*/ + goto __pyx_L3; + } + + /* "apache_beam/transforms/stats.py":633 + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) + * self.unbuffered_weights = [] + * elif self.unbuffered_elements: # <<<<<<<<<<<<<< + * self.unbuffered_elements.sort( + * key=self.spec.key, reverse=self.spec.reverse) +*/ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->unbuffered_elements); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 633, __pyx_L1_error) + if (__pyx_t_6) { + + /* "apache_beam/transforms/stats.py":634 + * self.unbuffered_weights = [] + * elif self.unbuffered_elements: + * self.unbuffered_elements.sort( # <<<<<<<<<<<<<< + * key=self.spec.key, reverse=self.spec.reverse) + * self.buffers.append( +*/ + __pyx_t_8 = __pyx_v_self->unbuffered_elements; + __Pyx_INCREF(__pyx_t_8); + + /* "apache_beam/transforms/stats.py":635 + * elif self.unbuffered_elements: + * self.unbuffered_elements.sort( + * key=self.spec.key, reverse=self.spec.reverse) # <<<<<<<<<<<<<< + * self.buffers.append( + * _QuantileBuffer( +*/ + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->spec->reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_self->spec->key, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 634, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_3, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 634, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_sort, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":637 + * key=self.spec.key, reverse=self.spec.reverse) + * self.buffers.append( + * _QuantileBuffer( # <<<<<<<<<<<<<< + * self.unbuffered_elements, weights=[1], weighted=False)) + * self.unbuffered_elements = [] +*/ + __pyx_t_4 = NULL; + + /* "apache_beam/transforms/stats.py":638 + * self.buffers.append( + * _QuantileBuffer( + * self.unbuffered_elements, weights=[1], weighted=False)) # <<<<<<<<<<<<<< + * self.unbuffered_elements = [] + * +*/ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 638, __pyx_L1_error); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_self->unbuffered_elements}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weights, __pyx_t_3, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, Py_False, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":636 + * self.unbuffered_elements.sort( + * key=self.spec.key, reverse=self.spec.reverse) + * self.buffers.append( # <<<<<<<<<<<<<< + * _QuantileBuffer( + * self.unbuffered_elements, weights=[1], weighted=False)) +*/ + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_self->buffers, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":633 + * self.unbuffered_elements, self.unbuffered_weights, weighted=True)) + * self.unbuffered_weights = [] + * elif self.unbuffered_elements: # <<<<<<<<<<<<<< + * self.unbuffered_elements.sort( + * key=self.spec.key, reverse=self.spec.reverse) +*/ + } + __pyx_L3:; + + /* "apache_beam/transforms/stats.py":639 + * _QuantileBuffer( + * self.unbuffered_elements, weights=[1], weighted=False)) + * self.unbuffered_elements = [] # <<<<<<<<<<<<<< + * + * def collapse_if_needed(self, offset_fn): +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":609 + * self.collapse_if_needed(offset_fn) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_argsort_key); + __Pyx_XDECREF(__pyx_v_argsort); + __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_idx); + __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_idx); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_11finalize(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_10finalize, "\n Creates a new buffer using all unbuffered elements. Called before\n extracting an output. Note that the buffer doesn't have to be put in a\n proper position since _collapse is not going to be called after.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_11finalize = {"finalize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_11finalize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_10finalize}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_11finalize(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("finalize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("finalize", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finalize", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_10finalize(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_10finalize(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("finalize", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_finalize(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":641 + * self.unbuffered_elements = [] + * + * def collapse_if_needed(self, offset_fn): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * +*/ + +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_collapse_if_needed(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_offset_fn, int __pyx_skip_dispatch) { + int64_t __pyx_v_min_level; + PyObject *__pyx_v_to_collapse = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int64_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("collapse_if_needed", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_collapse_if_needed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_offset_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/transforms/stats.py":648 + * limit is restored. + * """ + * while len(self.buffers) > self.spec.num_buffers: # <<<<<<<<<<<<<< + * to_collapse = [heapq.heappop(self.buffers), heapq.heappop(self.buffers)] + * min_level = to_collapse[1].level +*/ + while (1) { + __pyx_t_1 = __pyx_v_self->buffers; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = (__pyx_t_6 > __pyx_v_self->spec->num_buffers); + if (!__pyx_t_7) break; + + /* "apache_beam/transforms/stats.py":649 + * """ + * while len(self.buffers) > self.spec.num_buffers: + * to_collapse = [heapq.heappop(self.buffers), heapq.heappop(self.buffers)] # <<<<<<<<<<<<<< + * min_level = to_collapse[1].level + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heappop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->buffers}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_heappop); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->buffers}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 649, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 649, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_to_collapse, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":650 + * while len(self.buffers) > self.spec.num_buffers: + * to_collapse = [heapq.heappop(self.buffers), heapq.heappop(self.buffers)] + * min_level = to_collapse[1].level # <<<<<<<<<<<<<< + * + * while self.buffers and self.buffers[0].level <= min_level: +*/ + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_to_collapse, 1, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyLong_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_min_level = __pyx_t_9; + + /* "apache_beam/transforms/stats.py":652 + * min_level = to_collapse[1].level + * + * while self.buffers and self.buffers[0].level <= min_level: # <<<<<<<<<<<<<< + * to_collapse.append(heapq.heappop(self.buffers)) + * +*/ + while (1) { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->buffers); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 652, __pyx_L1_error) + if (__pyx_t_10) { + } else { + __pyx_t_7 = __pyx_t_10; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->buffers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_level); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_min_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __pyx_t_10; + __pyx_L7_bool_binop_done:; + if (!__pyx_t_7) break; + + /* "apache_beam/transforms/stats.py":653 + * + * while self.buffers and self.buffers[0].level <= min_level: + * to_collapse.append(heapq.heappop(self.buffers)) # <<<<<<<<<<<<<< + * + * heapq.heappush(self.buffers, _collapse(to_collapse, offset_fn, self.spec)) +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_heappop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self->buffers}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_to_collapse, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/transforms/stats.py":655 + * to_collapse.append(heapq.heappop(self.buffers)) + * + * heapq.heappush(self.buffers, _collapse(to_collapse, offset_fn, self.spec)) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_heappush); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = ((PyObject *)__pyx_v_self->spec); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = ((PyObject *)__pyx_f_11apache_beam_10transforms_5stats__collapse(__pyx_v_to_collapse, __pyx_v_offset_fn, ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_t_3))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_self->buffers, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "apache_beam/transforms/stats.py":641 + * self.unbuffered_elements = [] + * + * def collapse_if_needed(self, offset_fn): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.collapse_if_needed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_to_collapse); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_12collapse_if_needed, "\n Checks if summary has too many buffers and collapses some of them until the\n limit is restored.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed = {"collapse_if_needed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_14_QuantileState_12collapse_if_needed}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_offset_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collapse_if_needed (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 641, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 641, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "collapse_if_needed", 0) < (0)) __PYX_ERR(0, 641, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("collapse_if_needed", 1, 1, 1, i); __PYX_ERR(0, 641, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 641, __pyx_L3_error) + } + __pyx_v_offset_fn = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("collapse_if_needed", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 641, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.collapse_if_needed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_12collapse_if_needed(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), __pyx_v_offset_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_12collapse_if_needed(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_offset_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("collapse_if_needed", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_collapse_if_needed(__pyx_v_self, __pyx_v_offset_fn, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats._QuantileState.collapse_if_needed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":40 + * + * cdef class _QuantileState(object): + * cdef readonly _QuantileSpec spec # <<<<<<<<<<<<<< + * cdef public buffers + * cdef public unbuffered_elements +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_4spec_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_4spec_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4spec___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_4spec___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->spec); + __pyx_r = ((PyObject *)__pyx_v_self->spec); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":41 + * cdef class _QuantileState(object): + * cdef readonly _QuantileSpec spec + * cdef public buffers # <<<<<<<<<<<<<< + * cdef public unbuffered_elements + * cdef public unbuffered_weights +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->buffers); + __pyx_r = __pyx_v_self->buffers; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_2__set__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->buffers); + __Pyx_DECREF(__pyx_v_self->buffers); + __pyx_v_self->buffers = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_4__del__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->buffers); + __Pyx_DECREF(__pyx_v_self->buffers); + __pyx_v_self->buffers = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":42 + * cdef readonly _QuantileSpec spec + * cdef public buffers + * cdef public unbuffered_elements # <<<<<<<<<<<<<< + * cdef public unbuffered_weights + * cdef public add_unbuffered +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->unbuffered_elements); + __pyx_r = __pyx_v_self->unbuffered_elements; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_2__set__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_4__del__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->unbuffered_elements); + __Pyx_DECREF(__pyx_v_self->unbuffered_elements); + __pyx_v_self->unbuffered_elements = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":43 + * cdef public buffers + * cdef public unbuffered_elements + * cdef public unbuffered_weights # <<<<<<<<<<<<<< + * cdef public add_unbuffered + * cpdef bint is_empty(self) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->unbuffered_weights); + __pyx_r = __pyx_v_self->unbuffered_weights; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_2__set__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_4__del__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->unbuffered_weights); + __Pyx_DECREF(__pyx_v_self->unbuffered_weights); + __pyx_v_self->unbuffered_weights = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.pxd":44 + * cdef public unbuffered_elements + * cdef public unbuffered_weights + * cdef public add_unbuffered # <<<<<<<<<<<<<< + * cpdef bint is_empty(self) + * @cython.locals(num_new_buffers=int64_t, idx=int64_t) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered___get__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered___get__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->add_unbuffered); + __pyx_r = __pyx_v_self->add_unbuffered; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_2__set__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_2__set__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->add_unbuffered); + __Pyx_DECREF(__pyx_v_self->add_unbuffered); + __pyx_v_self->add_unbuffered = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_4__del__(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_4__del__(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->add_unbuffered); + __Pyx_DECREF(__pyx_v_self->add_unbuffered); + __pyx_v_self->add_unbuffered = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":658 + * + * + * def _collapse(buffers, offset_fn, spec): # <<<<<<<<<<<<<< + * # type: (List[_QuantileBuffer], Any, _QuantileSpec) -> _QuantileBuffer + * +*/ + +static struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_f_11apache_beam_10transforms_5stats__collapse(PyObject *__pyx_v_buffers, PyObject *__pyx_v_offset_fn, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_spec) { + int64_t __pyx_v_new_level; + double __pyx_v_new_weight; + double __pyx_v_step; + double __pyx_v_offset; + PyObject *__pyx_v_buffer = NULL; + PyObject *__pyx_v_new_elements = NULL; + PyObject *__pyx_v_new_weights = NULL; + PyObject *__pyx_v_min_val = NULL; + PyObject *__pyx_v_max_val = NULL; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int64_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + size_t __pyx_t_10; + double __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *(*__pyx_t_13)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_collapse", 0); + + /* "apache_beam/transforms/stats.py":664 + * Approximates elements from multiple buffers and produces a single buffer. + * """ + * new_level = 0 # <<<<<<<<<<<<<< + * new_weight = 0 + * for buffer in buffers: +*/ + __pyx_v_new_level = 0; + + /* "apache_beam/transforms/stats.py":665 + * """ + * new_level = 0 + * new_weight = 0 # <<<<<<<<<<<<<< + * for buffer in buffers: + * # As presented in the paper, there should always be at least two +*/ + __pyx_v_new_weight = 0.0; + + /* "apache_beam/transforms/stats.py":666 + * new_level = 0 + * new_weight = 0 + * for buffer in buffers: # <<<<<<<<<<<<<< + * # As presented in the paper, there should always be at least two + * # buffers of the same (minimal) level to collapse, but it is possible +*/ + if (likely(PyList_CheckExact(__pyx_v_buffers)) || PyTuple_CheckExact(__pyx_v_buffers)) { + __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 666, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 666, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 666, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_buffer, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":671 + * # to violate this condition when combining buffers from independently + * # computed shards. If they differ we take the max. + * new_level = max([new_level, buffer.level + 1]) # <<<<<<<<<<<<<< + * new_weight = new_weight + sum(buffer.weights) + * if spec.weighted: +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_v_new_level; + __pyx_t_7 = __Pyx_PyLong_From_int64_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_9) { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = __pyx_t_5; + } else { + __pyx_t_8 = __Pyx_PyLong_From_int64_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_t_8; + __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_new_level = __pyx_t_6; + + /* "apache_beam/transforms/stats.py":672 + * # computed shards. If they differ we take the max. + * new_level = max([new_level, buffer.level + 1]) + * new_weight = new_weight + sum(buffer.weights) # <<<<<<<<<<<<<< + * if spec.weighted: + * step = new_weight / (spec.buffer_size - 1) +*/ + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_new_weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_weights); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_new_weight = __pyx_t_11; + + /* "apache_beam/transforms/stats.py":666 + * new_level = 0 + * new_weight = 0 + * for buffer in buffers: # <<<<<<<<<<<<<< + * # As presented in the paper, there should always be at least two + * # buffers of the same (minimal) level to collapse, but it is possible +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":673 + * new_level = max([new_level, buffer.level + 1]) + * new_weight = new_weight + sum(buffer.weights) + * if spec.weighted: # <<<<<<<<<<<<<< + * step = new_weight / (spec.buffer_size - 1) + * offset = new_weight / (2 * spec.buffer_size) +*/ + if (__pyx_v_spec->weighted) { + + /* "apache_beam/transforms/stats.py":674 + * new_weight = new_weight + sum(buffer.weights) + * if spec.weighted: + * step = new_weight / (spec.buffer_size - 1) # <<<<<<<<<<<<<< + * offset = new_weight / (2 * spec.buffer_size) + * else: +*/ + __pyx_t_6 = (__pyx_v_spec->buffer_size - 1); + if (unlikely(__pyx_t_6 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 674, __pyx_L1_error) + } + __pyx_v_step = (__pyx_v_new_weight / ((double)__pyx_t_6)); + + /* "apache_beam/transforms/stats.py":675 + * if spec.weighted: + * step = new_weight / (spec.buffer_size - 1) + * offset = new_weight / (2 * spec.buffer_size) # <<<<<<<<<<<<<< + * else: + * step = new_weight +*/ + __pyx_t_6 = (2 * __pyx_v_spec->buffer_size); + if (unlikely(__pyx_t_6 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 675, __pyx_L1_error) + } + __pyx_v_offset = (__pyx_v_new_weight / ((double)__pyx_t_6)); + + /* "apache_beam/transforms/stats.py":673 + * new_level = max([new_level, buffer.level + 1]) + * new_weight = new_weight + sum(buffer.weights) + * if spec.weighted: # <<<<<<<<<<<<<< + * step = new_weight / (spec.buffer_size - 1) + * offset = new_weight / (2 * spec.buffer_size) +*/ + goto __pyx_L6; + } + + /* "apache_beam/transforms/stats.py":677 + * offset = new_weight / (2 * spec.buffer_size) + * else: + * step = new_weight # <<<<<<<<<<<<<< + * offset = offset_fn(new_weight) + * new_elements, new_weights, min_val, max_val = \ +*/ + /*else*/ { + __pyx_v_step = __pyx_v_new_weight; + + /* "apache_beam/transforms/stats.py":678 + * else: + * step = new_weight + * offset = offset_fn(new_weight) # <<<<<<<<<<<<<< + * new_elements, new_weights, min_val, max_val = \ + * _interpolate(buffers, spec.buffer_size, step, offset, spec) +*/ + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_v_offset_fn); + __pyx_t_5 = __pyx_v_offset_fn; + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_new_weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_10 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_11 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_offset = __pyx_t_11; + } + __pyx_L6:; + + /* "apache_beam/transforms/stats.py":680 + * offset = offset_fn(new_weight) + * new_elements, new_weights, min_val, max_val = \ + * _interpolate(buffers, spec.buffer_size, step, offset, spec) # <<<<<<<<<<<<<< + * if not spec.weighted: + * new_weights = [new_weight] +*/ + __pyx_t_1 = __pyx_f_11apache_beam_10transforms_5stats__interpolate(__pyx_v_buffers, __pyx_v_spec->buffer_size, __pyx_v_step, __pyx_v_offset, __pyx_v_spec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 4)) { + if (size > 4) __Pyx_RaiseTooManyValuesError(4); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 679, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_8); + } else { + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + } + #else + { + Py_ssize_t i; + PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8}; + for (i=0; i < 4; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8}; + __pyx_t_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); + for (index=0; index < 4; index++) { + PyObject* item = __pyx_t_13(__pyx_t_12); if (unlikely(!item)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 4) < (0)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_13 = NULL; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L8_unpacking_done; + __pyx_L7_unpacking_failed:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_L8_unpacking_done:; + } + + /* "apache_beam/transforms/stats.py":679 + * step = new_weight + * offset = offset_fn(new_weight) + * new_elements, new_weights, min_val, max_val = \ # <<<<<<<<<<<<<< + * _interpolate(buffers, spec.buffer_size, step, offset, spec) + * if not spec.weighted: +*/ + __pyx_v_new_elements = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_new_weights = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_min_val = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_v_max_val = __pyx_t_8; + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":681 + * new_elements, new_weights, min_val, max_val = \ + * _interpolate(buffers, spec.buffer_size, step, offset, spec) + * if not spec.weighted: # <<<<<<<<<<<<<< + * new_weights = [new_weight] + * return _QuantileBuffer( +*/ + __pyx_t_9 = (!__pyx_v_spec->weighted); + if (__pyx_t_9) { + + /* "apache_beam/transforms/stats.py":682 + * _interpolate(buffers, spec.buffer_size, step, offset, spec) + * if not spec.weighted: + * new_weights = [new_weight] # <<<<<<<<<<<<<< + * return _QuantileBuffer( + * new_elements, new_weights, spec.weighted, new_level, min_val, max_val) +*/ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_new_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 682, __pyx_L1_error); + __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_new_weights, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":681 + * new_elements, new_weights, min_val, max_val = \ + * _interpolate(buffers, spec.buffer_size, step, offset, spec) + * if not spec.weighted: # <<<<<<<<<<<<<< + * new_weights = [new_weight] + * return _QuantileBuffer( +*/ + } + + /* "apache_beam/transforms/stats.py":683 + * if not spec.weighted: + * new_weights = [new_weight] + * return _QuantileBuffer( # <<<<<<<<<<<<<< + * new_elements, new_weights, spec.weighted, new_level, min_val, max_val) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_1 = NULL; + + /* "apache_beam/transforms/stats.py":684 + * new_weights = [new_weight] + * return _QuantileBuffer( + * new_elements, new_weights, spec.weighted, new_level, min_val, max_val) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_spec->weighted); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_new_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = 1; + { + PyObject *__pyx_callargs[7] = {__pyx_t_1, __pyx_v_new_elements, __pyx_v_new_weights, __pyx_t_7, __pyx_t_4, __pyx_v_min_val, __pyx_v_max_val}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_callargs+__pyx_t_10, (7-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_8); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_t_8); + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":658 + * + * + * def _collapse(buffers, offset_fn, spec): # <<<<<<<<<<<<<< + * # type: (List[_QuantileBuffer], Any, _QuantileSpec) -> _QuantileBuffer + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.transforms.stats._collapse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_buffer); + __Pyx_XDECREF(__pyx_v_new_elements); + __Pyx_XDECREF(__pyx_v_new_weights); + __Pyx_XDECREF(__pyx_v_min_val); + __Pyx_XDECREF(__pyx_v_max_val); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":687 + * + * + * def _interpolate(buffers, count, step, offset, spec): # <<<<<<<<<<<<<< + * # type: (List[_QuantileBuffer], int, float, float, _QuantileSpec) -> Tuple[List, List, Any, Any] + * +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_5stats__interpolate(PyObject *__pyx_v_buffers, int64_t __pyx_v_count, double __pyx_v_step, double __pyx_v_offset, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *__pyx_v_spec) { + int64_t __pyx_v_j; + PyObject *__pyx_v_buffer_iterators = NULL; + PyObject *__pyx_v_min_val = NULL; + PyObject *__pyx_v_max_val = NULL; + PyObject *__pyx_v_buffer = NULL; + PyObject *__pyx_v_sorted_elements = NULL; + int __pyx_v_buffers_have_same_weight; + PyObject *__pyx_v_weight = NULL; + Py_ssize_t __pyx_v_max_idx; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_sorted_elements_iter = NULL; + PyObject *__pyx_v_weighted_element = NULL; + PyObject *__pyx_v_new_elements = NULL; + PyObject *__pyx_v_new_weights = NULL; + PyObject *__pyx_v_current_weight = NULL; + PyObject *__pyx_v_previous_weight = NULL; + double __pyx_v_target_weight; + int64_t __pyx_8genexpr4__pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + double __pyx_t_12; + int64_t __pyx_t_13; + int64_t __pyx_t_14; + int64_t __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + int __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_interpolate", 0); + + /* "apache_beam/transforms/stats.py":695 + * of this list for `0 <= k < count`. + * """ + * buffer_iterators = [] # <<<<<<<<<<<<<< + * min_val = buffers[0].min_val + * max_val = buffers[0].max_val +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_buffer_iterators = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":696 + * """ + * buffer_iterators = [] + * min_val = buffers[0].min_val # <<<<<<<<<<<<<< + * max_val = buffers[0].max_val + * for buffer in buffers: +*/ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_buffers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_min_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_min_val = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":697 + * buffer_iterators = [] + * min_val = buffers[0].min_val + * max_val = buffers[0].max_val # <<<<<<<<<<<<<< + * for buffer in buffers: + * # Calculate extreme values for the union of buffers. +*/ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_buffers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_max_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_max_val = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":698 + * min_val = buffers[0].min_val + * max_val = buffers[0].max_val + * for buffer in buffers: # <<<<<<<<<<<<<< + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( +*/ + if (likely(PyList_CheckExact(__pyx_v_buffers)) || PyTuple_CheckExact(__pyx_v_buffers)) { + __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 698, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 698, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_4(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 698, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_buffer, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":700 + * for buffer in buffers: + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( # <<<<<<<<<<<<<< + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_spec->less_than); + __pyx_t_7 = __pyx_v_spec->less_than; + + /* "apache_beam/transforms/stats.py":701 + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( + * buffer.min_val, min_val) else min_val # <<<<<<<<<<<<<< + * max_val = buffer.max_val if spec.less_than( + * max_val, buffer.max_val) else max_val +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_min_val); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_v_min_val}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/transforms/stats.py":700 + * for buffer in buffers: + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( # <<<<<<<<<<<<<< + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_10) { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_min_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + + /* "apache_beam/transforms/stats.py":701 + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( + * buffer.min_val, min_val) else min_val # <<<<<<<<<<<<<< + * max_val = buffer.max_val if spec.less_than( + * max_val, buffer.max_val) else max_val +*/ + __Pyx_INCREF(__pyx_v_min_val); + __pyx_t_2 = __pyx_v_min_val; + } + __Pyx_DECREF_SET(__pyx_v_min_val, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":702 + * min_val = buffer.min_val if spec.less_than( + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( # <<<<<<<<<<<<<< + * max_val, buffer.max_val) else max_val + * buffer_iterators.append(iter(buffer)) +*/ + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_v_spec->less_than); + __pyx_t_8 = __pyx_v_spec->less_than; + + /* "apache_beam/transforms/stats.py":703 + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( + * max_val, buffer.max_val) else max_val # <<<<<<<<<<<<<< + * buffer_iterators.append(iter(buffer)) + * +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_max_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_max_val, __pyx_t_6}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/transforms/stats.py":702 + * min_val = buffer.min_val if spec.less_than( + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( # <<<<<<<<<<<<<< + * max_val, buffer.max_val) else max_val + * buffer_iterators.append(iter(buffer)) +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_10) { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_max_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + + /* "apache_beam/transforms/stats.py":703 + * buffer.min_val, min_val) else min_val + * max_val = buffer.max_val if spec.less_than( + * max_val, buffer.max_val) else max_val # <<<<<<<<<<<<<< + * buffer_iterators.append(iter(buffer)) + * +*/ + __Pyx_INCREF(__pyx_v_max_val); + __pyx_t_2 = __pyx_v_max_val; + } + __Pyx_DECREF_SET(__pyx_v_max_val, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":704 + * max_val = buffer.max_val if spec.less_than( + * max_val, buffer.max_val) else max_val + * buffer_iterators.append(iter(buffer)) # <<<<<<<<<<<<<< + * + * # Note that `heapq.merge` can also be used here since the buffers are sorted. +*/ + __pyx_t_2 = PyObject_GetIter(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_buffer_iterators, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":698 + * min_val = buffers[0].min_val + * max_val = buffers[0].max_val + * for buffer in buffers: # <<<<<<<<<<<<<< + * # Calculate extreme values for the union of buffers. + * min_val = buffer.min_val if spec.less_than( +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":709 + * # In practice, however, `sorted` uses natural order in the union and + * # significantly outperforms `heapq.merge`. + * sorted_elements = sorted( # <<<<<<<<<<<<<< + * itertools.chain.from_iterable(buffer_iterators), + * key=spec.weighted_key, +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":710 + * # significantly outperforms `heapq.merge`. + * sorted_elements = sorted( + * itertools.chain.from_iterable(buffer_iterators), # <<<<<<<<<<<<<< + * key=spec.weighted_key, + * reverse=spec.reverse) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_itertools); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_chain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_buffer_iterators}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_from_iterable, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + + /* "apache_beam/transforms/stats.py":712 + * itertools.chain.from_iterable(buffer_iterators), + * key=spec.weighted_key, + * reverse=spec.reverse) # <<<<<<<<<<<<<< + * + * if not spec.weighted: +*/ + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_spec->reverse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_5}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_spec->weighted_key, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 709, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_t_7, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 709, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_sorted, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_sorted_elements = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":714 + * reverse=spec.reverse) + * + * if not spec.weighted: # <<<<<<<<<<<<<< + * # If all buffers have the same weight, then quantiles' indices are evenly + * # distributed over a range [0, len(sorted_elements)]. +*/ + __pyx_t_10 = (!__pyx_v_spec->weighted); + if (__pyx_t_10) { + + /* "apache_beam/transforms/stats.py":717 + * # If all buffers have the same weight, then quantiles' indices are evenly + * # distributed over a range [0, len(sorted_elements)]. + * buffers_have_same_weight = True # <<<<<<<<<<<<<< + * weight = buffers[0].weights[0] + * for buffer in buffers: +*/ + __pyx_v_buffers_have_same_weight = 1; + + /* "apache_beam/transforms/stats.py":718 + * # distributed over a range [0, len(sorted_elements)]. + * buffers_have_same_weight = True + * weight = buffers[0].weights[0] # <<<<<<<<<<<<<< + * for buffer in buffers: + * if buffer.weights[0] != weight: +*/ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_buffers, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_weight = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":719 + * buffers_have_same_weight = True + * weight = buffers[0].weights[0] + * for buffer in buffers: # <<<<<<<<<<<<<< + * if buffer.weights[0] != weight: + * buffers_have_same_weight = False +*/ + if (likely(PyList_CheckExact(__pyx_v_buffers)) || PyTuple_CheckExact(__pyx_v_buffers)) { + __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 719, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 719, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 719, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_4(__pyx_t_1); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 719, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_buffer, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":720 + * weight = buffers[0].weights[0] + * for buffer in buffers: + * if buffer.weights[0] != weight: # <<<<<<<<<<<<<< + * buffers_have_same_weight = False + * break +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_mstate_global->__pyx_n_u_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_v_weight, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_10) { + + /* "apache_beam/transforms/stats.py":721 + * for buffer in buffers: + * if buffer.weights[0] != weight: + * buffers_have_same_weight = False # <<<<<<<<<<<<<< + * break + * if buffers_have_same_weight: +*/ + __pyx_v_buffers_have_same_weight = 0; + + /* "apache_beam/transforms/stats.py":722 + * if buffer.weights[0] != weight: + * buffers_have_same_weight = False + * break # <<<<<<<<<<<<<< + * if buffers_have_same_weight: + * offset = offset / weight +*/ + goto __pyx_L8_break; + + /* "apache_beam/transforms/stats.py":720 + * weight = buffers[0].weights[0] + * for buffer in buffers: + * if buffer.weights[0] != weight: # <<<<<<<<<<<<<< + * buffers_have_same_weight = False + * break +*/ + } + + /* "apache_beam/transforms/stats.py":719 + * buffers_have_same_weight = True + * weight = buffers[0].weights[0] + * for buffer in buffers: # <<<<<<<<<<<<<< + * if buffer.weights[0] != weight: + * buffers_have_same_weight = False +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L10_for_end; + __pyx_L8_break:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L10_for_end; + __pyx_L10_for_end:; + + /* "apache_beam/transforms/stats.py":723 + * buffers_have_same_weight = False + * break + * if buffers_have_same_weight: # <<<<<<<<<<<<<< + * offset = offset / weight + * step = step / weight +*/ + if (__pyx_v_buffers_have_same_weight) { + + /* "apache_beam/transforms/stats.py":724 + * break + * if buffers_have_same_weight: + * offset = offset / weight # <<<<<<<<<<<<<< + * step = step / weight + * max_idx = len(sorted_elements) - 1 +*/ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_12 = __Pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_offset = __pyx_t_12; + + /* "apache_beam/transforms/stats.py":725 + * if buffers_have_same_weight: + * offset = offset / weight + * step = step / weight # <<<<<<<<<<<<<< + * max_idx = len(sorted_elements) - 1 + * result = [ +*/ + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_v_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_step = __pyx_t_12; + + /* "apache_beam/transforms/stats.py":726 + * offset = offset / weight + * step = step / weight + * max_idx = len(sorted_elements) - 1 # <<<<<<<<<<<<<< + * result = [ + * sorted_elements[min(int(j * step + offset), max_idx)][0] +*/ + __pyx_t_3 = PyObject_Length(__pyx_v_sorted_elements); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_v_max_idx = (__pyx_t_3 - 1); + + /* "apache_beam/transforms/stats.py":727 + * step = step / weight + * max_idx = len(sorted_elements) - 1 + * result = [ # <<<<<<<<<<<<<< + * sorted_elements[min(int(j * step + offset), max_idx)][0] + * for j in range(count) +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":729 + * result = [ + * sorted_elements[min(int(j * step + offset), max_idx)][0] + * for j in range(count) # <<<<<<<<<<<<<< + * ] + * return result, [], min_val, max_val +*/ + __pyx_t_13 = __pyx_v_count; + __pyx_t_14 = __pyx_t_13; + for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { + __pyx_8genexpr4__pyx_v_j = __pyx_t_15; + + /* "apache_beam/transforms/stats.py":728 + * max_idx = len(sorted_elements) - 1 + * result = [ + * sorted_elements[min(int(j * step + offset), max_idx)][0] # <<<<<<<<<<<<<< + * for j in range(count) + * ] +*/ + __pyx_t_3 = __pyx_v_max_idx; + __pyx_t_8 = PyLong_FromDouble(((__pyx_8genexpr4__pyx_v_j * __pyx_v_step) + __pyx_v_offset)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_10) { + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_7 = __pyx_t_2; + __pyx_t_2 = 0; + } else { + __Pyx_INCREF(__pyx_t_8); + __pyx_t_7 = __pyx_t_8; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_sorted_elements, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + } /* exit inner scope */ + __pyx_v_result = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":731 + * for j in range(count) + * ] + * return result, [], min_val, max_val # <<<<<<<<<<<<<< + * + * sorted_elements_iter = iter(sorted_elements) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 731, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 731, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_min_val); + __Pyx_GIVEREF(__pyx_v_min_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_min_val) != (0)) __PYX_ERR(0, 731, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_max_val); + __Pyx_GIVEREF(__pyx_v_max_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_max_val) != (0)) __PYX_ERR(0, 731, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":723 + * buffers_have_same_weight = False + * break + * if buffers_have_same_weight: # <<<<<<<<<<<<<< + * offset = offset / weight + * step = step / weight +*/ + } + + /* "apache_beam/transforms/stats.py":714 + * reverse=spec.reverse) + * + * if not spec.weighted: # <<<<<<<<<<<<<< + * # If all buffers have the same weight, then quantiles' indices are evenly + * # distributed over a range [0, len(sorted_elements)]. +*/ + } + + /* "apache_beam/transforms/stats.py":733 + * return result, [], min_val, max_val + * + * sorted_elements_iter = iter(sorted_elements) # <<<<<<<<<<<<<< + * weighted_element = next(sorted_elements_iter) + * new_elements = [] +*/ + __pyx_t_7 = PyObject_GetIter(__pyx_v_sorted_elements); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_sorted_elements_iter = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":734 + * + * sorted_elements_iter = iter(sorted_elements) + * weighted_element = next(sorted_elements_iter) # <<<<<<<<<<<<<< + * new_elements = [] + * new_weights = [] +*/ + __pyx_t_7 = __Pyx_PyIter_Next(__pyx_v_sorted_elements_iter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_weighted_element = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":735 + * sorted_elements_iter = iter(sorted_elements) + * weighted_element = next(sorted_elements_iter) + * new_elements = [] # <<<<<<<<<<<<<< + * new_weights = [] + * j = 0 +*/ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_new_elements = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":736 + * weighted_element = next(sorted_elements_iter) + * new_elements = [] + * new_weights = [] # <<<<<<<<<<<<<< + * j = 0 + * current_weight = weighted_element[1] +*/ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_new_weights = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":737 + * new_elements = [] + * new_weights = [] + * j = 0 # <<<<<<<<<<<<<< + * current_weight = weighted_element[1] + * previous_weight = 0 +*/ + __pyx_v_j = 0; + + /* "apache_beam/transforms/stats.py":738 + * new_weights = [] + * j = 0 + * current_weight = weighted_element[1] # <<<<<<<<<<<<<< + * previous_weight = 0 + * while j < count: +*/ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_weighted_element, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_current_weight = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":739 + * j = 0 + * current_weight = weighted_element[1] + * previous_weight = 0 # <<<<<<<<<<<<<< + * while j < count: + * target_weight = j * step + offset +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_previous_weight = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/transforms/stats.py":740 + * current_weight = weighted_element[1] + * previous_weight = 0 + * while j < count: # <<<<<<<<<<<<<< + * target_weight = j * step + offset + * j += 1 +*/ + while (1) { + __pyx_t_10 = (__pyx_v_j < __pyx_v_count); + if (!__pyx_t_10) break; + + /* "apache_beam/transforms/stats.py":741 + * previous_weight = 0 + * while j < count: + * target_weight = j * step + offset # <<<<<<<<<<<<<< + * j += 1 + * try: +*/ + __pyx_v_target_weight = ((__pyx_v_j * __pyx_v_step) + __pyx_v_offset); + + /* "apache_beam/transforms/stats.py":742 + * while j < count: + * target_weight = j * step + offset + * j += 1 # <<<<<<<<<<<<<< + * try: + * while current_weight <= target_weight: +*/ + __pyx_v_j = (__pyx_v_j + 1); + + /* "apache_beam/transforms/stats.py":743 + * target_weight = j * step + offset + * j += 1 + * try: # <<<<<<<<<<<<<< + * while current_weight <= target_weight: + * weighted_element = next(sorted_elements_iter) +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_18); + /*try:*/ { + + /* "apache_beam/transforms/stats.py":744 + * j += 1 + * try: + * while current_weight <= target_weight: # <<<<<<<<<<<<<< + * weighted_element = next(sorted_elements_iter) + * current_weight += weighted_element[1] +*/ + while (1) { + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_target_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 744, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_current_weight, __pyx_t_7, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L16_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 744, __pyx_L16_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_10) break; + + /* "apache_beam/transforms/stats.py":745 + * try: + * while current_weight <= target_weight: + * weighted_element = next(sorted_elements_iter) # <<<<<<<<<<<<<< + * current_weight += weighted_element[1] + * except StopIteration: +*/ + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_sorted_elements_iter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_weighted_element, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":746 + * while current_weight <= target_weight: + * weighted_element = next(sorted_elements_iter) + * current_weight += weighted_element[1] # <<<<<<<<<<<<<< + * except StopIteration: + * pass +*/ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_weighted_element, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_current_weight, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 746, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_current_weight, __pyx_t_7); + __pyx_t_7 = 0; + } + + /* "apache_beam/transforms/stats.py":743 + * target_weight = j * step + offset + * j += 1 + * try: # <<<<<<<<<<<<<< + * while current_weight <= target_weight: + * weighted_element = next(sorted_elements_iter) +*/ + } + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + goto __pyx_L23_try_end; + __pyx_L16_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":747 + * weighted_element = next(sorted_elements_iter) + * current_weight += weighted_element[1] + * except StopIteration: # <<<<<<<<<<<<<< + * pass + * new_elements.append(weighted_element[0]) +*/ + __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration)))); + if (__pyx_t_19) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L17_exception_handled; + } + goto __pyx_L18_except_error; + + /* "apache_beam/transforms/stats.py":743 + * target_weight = j * step + offset + * j += 1 + * try: # <<<<<<<<<<<<<< + * while current_weight <= target_weight: + * weighted_element = next(sorted_elements_iter) +*/ + __pyx_L18_except_error:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + goto __pyx_L1_error; + __pyx_L17_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_18); + __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); + __pyx_L23_try_end:; + } + + /* "apache_beam/transforms/stats.py":749 + * except StopIteration: + * pass + * new_elements.append(weighted_element[0]) # <<<<<<<<<<<<<< + * if spec.weighted: + * new_weights.append(current_weight - previous_weight) +*/ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_weighted_element, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_new_elements, __pyx_t_7); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":750 + * pass + * new_elements.append(weighted_element[0]) + * if spec.weighted: # <<<<<<<<<<<<<< + * new_weights.append(current_weight - previous_weight) + * previous_weight = current_weight +*/ + if (__pyx_v_spec->weighted) { + + /* "apache_beam/transforms/stats.py":751 + * new_elements.append(weighted_element[0]) + * if spec.weighted: + * new_weights.append(current_weight - previous_weight) # <<<<<<<<<<<<<< + * previous_weight = current_weight + * +*/ + __pyx_t_7 = PyNumber_Subtract(__pyx_v_current_weight, __pyx_v_previous_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_new_weights, __pyx_t_7); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":752 + * if spec.weighted: + * new_weights.append(current_weight - previous_weight) + * previous_weight = current_weight # <<<<<<<<<<<<<< + * + * return new_elements, new_weights, min_val, max_val +*/ + __Pyx_INCREF(__pyx_v_current_weight); + __Pyx_DECREF_SET(__pyx_v_previous_weight, __pyx_v_current_weight); + + /* "apache_beam/transforms/stats.py":750 + * pass + * new_elements.append(weighted_element[0]) + * if spec.weighted: # <<<<<<<<<<<<<< + * new_weights.append(current_weight - previous_weight) + * previous_weight = current_weight +*/ + } + } + + /* "apache_beam/transforms/stats.py":754 + * previous_weight = current_weight + * + * return new_elements, new_weights, min_val, max_val # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_new_elements); + __Pyx_GIVEREF(__pyx_v_new_elements); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_new_elements) != (0)) __PYX_ERR(0, 754, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_new_weights); + __Pyx_GIVEREF(__pyx_v_new_weights); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_new_weights) != (0)) __PYX_ERR(0, 754, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_min_val); + __Pyx_GIVEREF(__pyx_v_min_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_min_val) != (0)) __PYX_ERR(0, 754, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_max_val); + __Pyx_GIVEREF(__pyx_v_max_val); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_max_val) != (0)) __PYX_ERR(0, 754, __pyx_L1_error); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":687 + * + * + * def _interpolate(buffers, count, step, offset, spec): # <<<<<<<<<<<<<< + * # type: (List[_QuantileBuffer], int, float, float, _QuantileSpec) -> Tuple[List, List, Any, Any] + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats._interpolate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_buffer_iterators); + __Pyx_XDECREF(__pyx_v_min_val); + __Pyx_XDECREF(__pyx_v_max_val); + __Pyx_XDECREF(__pyx_v_buffer); + __Pyx_XDECREF(__pyx_v_sorted_elements); + __Pyx_XDECREF(__pyx_v_weight); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_sorted_elements_iter); + __Pyx_XDECREF(__pyx_v_weighted_element); + __Pyx_XDECREF(__pyx_v_new_elements); + __Pyx_XDECREF(__pyx_v_new_weights); + __Pyx_XDECREF(__pyx_v_current_weight); + __Pyx_XDECREF(__pyx_v_previous_weight); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":818 + * _qs = None # type: _QuantileState + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, # type: int +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_num_quantiles = 0; + PyObject *__pyx_v_buffer_size = 0; + PyObject *__pyx_v_num_buffers = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_input_batched = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_num_quantiles,&__pyx_mstate_global->__pyx_n_u_buffer_size,&__pyx_mstate_global->__pyx_n_u_num_buffers,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_input_batched,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 818, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 818, __pyx_L3_error) + + /* "apache_beam/transforms/stats.py":823 + * buffer_size, # type: int + * num_buffers, # type: int + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":824 + * num_buffers, # type: int + * key=None, + * reverse=False, # <<<<<<<<<<<<<< + * weighted=False, + * input_batched=False): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":825 + * key=None, + * reverse=False, + * weighted=False, # <<<<<<<<<<<<<< + * input_batched=False): + * self._num_quantiles = num_quantiles +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":826 + * reverse=False, + * weighted=False, + * input_batched=False): # <<<<<<<<<<<<<< + * self._num_quantiles = num_quantiles + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 8, i); __PYX_ERR(0, 818, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 818, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 818, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 818, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 818, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 818, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/transforms/stats.py":823 + * buffer_size, # type: int + * num_buffers, # type: int + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_self = values[0]; + __pyx_v_num_quantiles = values[1]; + __pyx_v_buffer_size = values[2]; + __pyx_v_num_buffers = values[3]; + __pyx_v_key = values[4]; + __pyx_v_reverse = values[5]; + __pyx_v_weighted = values[6]; + __pyx_v_input_batched = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 8, __pyx_nargs); __PYX_ERR(0, 818, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn___init__(__pyx_self, __pyx_v_self, __pyx_v_num_quantiles, __pyx_v_buffer_size, __pyx_v_num_buffers, __pyx_v_key, __pyx_v_reverse, __pyx_v_weighted, __pyx_v_input_batched); + + /* "apache_beam/transforms/stats.py":818 + * _qs = None # type: _QuantileState + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, # type: int +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_buffer_size, PyObject *__pyx_v_num_buffers, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/transforms/stats.py":827 + * weighted=False, + * input_batched=False): + * self._num_quantiles = num_quantiles # <<<<<<<<<<<<<< + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) + * self._input_batched = input_batched +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2, __pyx_v_num_quantiles) < (0)) __PYX_ERR(0, 827, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":828 + * input_batched=False): + * self._num_quantiles = num_quantiles + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) # <<<<<<<<<<<<<< + * self._input_batched = input_batched + * if self._input_batched: +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_buffer_size, __pyx_v_num_buffers, __pyx_v_weighted, __pyx_v_key, __pyx_v_reverse}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec, __pyx_callargs+__pyx_t_3, (6-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":829 + * self._num_quantiles = num_quantiles + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) + * self._input_batched = input_batched # <<<<<<<<<<<<<< + * if self._input_batched: + * setattr(self, 'add_input', self._add_inputs) +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2, __pyx_v_input_batched) < (0)) __PYX_ERR(0, 829, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":830 + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) + * self._input_batched = input_batched + * if self._input_batched: # <<<<<<<<<<<<<< + * setattr(self, 'add_input', self._add_inputs) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":831 + * self._input_batched = input_batched + * if self._input_batched: + * setattr(self, 'add_input', self._add_inputs) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_add_inputs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_SetAttr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":830 + * self._spec = _QuantileSpec(buffer_size, num_buffers, weighted, key, reverse) + * self._input_batched = input_batched + * if self._input_batched: # <<<<<<<<<<<<<< + * setattr(self, 'add_input', self._add_inputs) + * +*/ + } + + /* "apache_beam/transforms/stats.py":818 + * _qs = None # type: _QuantileState + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, # type: int +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":833 + * setattr(self, 'add_input', self._add_inputs) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 833, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 833, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce__", 0) < (0)) __PYX_ERR(0, 833, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, i); __PYX_ERR(0, 833, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 833, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 833, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_2__reduce__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/transforms/stats.py":834 + * + * def __reduce__(self): + * return ( # <<<<<<<<<<<<<< + * self.__class__, + * ( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/transforms/stats.py":835 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self._num_quantiles, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/transforms/stats.py":837 + * self.__class__, + * ( + * self._num_quantiles, # <<<<<<<<<<<<<< + * self._spec.buffer_size, + * self._spec.num_buffers, +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/transforms/stats.py":838 + * ( + * self._num_quantiles, + * self._spec.buffer_size, # <<<<<<<<<<<<<< + * self._spec.num_buffers, + * self._spec.key, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_buffer_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":839 + * self._num_quantiles, + * self._spec.buffer_size, + * self._spec.num_buffers, # <<<<<<<<<<<<<< + * self._spec.key, + * self._spec.reverse, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_num_buffers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":840 + * self._spec.buffer_size, + * self._spec.num_buffers, + * self._spec.key, # <<<<<<<<<<<<<< + * self._spec.reverse, + * self._spec.weighted, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":841 + * self._spec.num_buffers, + * self._spec.key, + * self._spec.reverse, # <<<<<<<<<<<<<< + * self._spec.weighted, + * self._input_batched)) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_reverse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":842 + * self._spec.key, + * self._spec.reverse, + * self._spec.weighted, # <<<<<<<<<<<<<< + * self._input_batched)) + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weighted); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":843 + * self._spec.reverse, + * self._spec.weighted, + * self._input_batched)) # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_input_batched_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":837 + * self.__class__, + * ( + * self._num_quantiles, # <<<<<<<<<<<<<< + * self._spec.buffer_size, + * self._spec.num_buffers, +*/ + __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_7); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_7) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_8) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_3) != (0)) __PYX_ERR(0, 837, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":835 + * def __reduce__(self): + * return ( + * self.__class__, # <<<<<<<<<<<<<< + * ( + * self._num_quantiles, +*/ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 835, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 835, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_9 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":833 + * setattr(self, 'add_input', self._add_inputs) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":845 + * self._input_batched)) + * + * @classmethod # <<<<<<<<<<<<<< + * def create( + * cls, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_5create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_4create, "\n Creates an approximate quantiles combiner with the given key and desired\n number of quantiles.\n\n Args:\n num_quantiles: Number of quantiles to produce. It is the size of the\n final output list, including the mininum and maximum value items.\n epsilon: (optional) The default error bound is `epsilon`, which holds as\n long as the number of elements is less than `_MAX_NUM_ELEMENTS`.\n Specifically, if one considers the input as a sorted list x_1, ...,\n x_N, then the distance between each exact quantile x_c and its\n approximation x_c' is bounded by `|c - c'| < epsilon * N`. Note that\n these errors are worst-case scenarios. In practice the accuracy tends\n to be much better.\n max_num_elements: (optional) The cost (in time and space) to compute\n quantiles to a given accuracy is a function of the total number of\n elements in the data set.\n key: (optional) Key is a mapping of elements to a comparable key, similar\n to the key argument of Python's sorting methods.\n reverse: (optional) whether to order things smallest to largest, rather\n than largest to smallest.\n weighted: (optional) if set to True, the combiner produces weighted\n quantiles. The input elements are then expected to be tuples of values\n with the corresponding weight.\n input_batched: (optional) if set to True, inputs are expected to be\n batches of elements.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_5create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_5create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_4create}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_5create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_num_quantiles = 0; + PyObject *__pyx_v_epsilon = 0; + PyObject *__pyx_v_max_num_elements = 0; + PyObject *__pyx_v_key = 0; + PyObject *__pyx_v_reverse = 0; + PyObject *__pyx_v_weighted = 0; + PyObject *__pyx_v_input_batched = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_num_quantiles,&__pyx_mstate_global->__pyx_n_u_epsilon,&__pyx_mstate_global->__pyx_n_u_max_num_elements,&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_reverse,&__pyx_mstate_global->__pyx_n_u_weighted,&__pyx_mstate_global->__pyx_n_u_input_batched,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 845, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(0, 845, __pyx_L3_error) + + /* "apache_beam/transforms/stats.py":849 + * cls, + * num_quantiles, # type: int + * epsilon=None, # <<<<<<<<<<<<<< + * max_num_elements=None, + * key=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":850 + * num_quantiles, # type: int + * epsilon=None, + * max_num_elements=None, # <<<<<<<<<<<<<< + * key=None, + * reverse=False, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":851 + * epsilon=None, + * max_num_elements=None, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":852 + * max_num_elements=None, + * key=None, + * reverse=False, # <<<<<<<<<<<<<< + * weighted=False, + * input_batched=False): +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":853 + * key=None, + * reverse=False, + * weighted=False, # <<<<<<<<<<<<<< + * input_batched=False): + * # type: (...) -> ApproximateQuantilesCombineFn +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + + /* "apache_beam/transforms/stats.py":854 + * reverse=False, + * weighted=False, + * input_batched=False): # <<<<<<<<<<<<<< + * # type: (...) -> ApproximateQuantilesCombineFn + * +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 0, 2, 8, i); __PYX_ERR(0, 845, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 845, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 845, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 845, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/transforms/stats.py":849 + * cls, + * num_quantiles, # type: int + * epsilon=None, # <<<<<<<<<<<<<< + * max_num_elements=None, + * key=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":850 + * num_quantiles, # type: int + * epsilon=None, + * max_num_elements=None, # <<<<<<<<<<<<<< + * key=None, + * reverse=False, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/transforms/stats.py":851 + * epsilon=None, + * max_num_elements=None, + * key=None, # <<<<<<<<<<<<<< + * reverse=False, + * weighted=False, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); + } + __pyx_v_cls = values[0]; + __pyx_v_num_quantiles = values[1]; + __pyx_v_epsilon = values[2]; + __pyx_v_max_num_elements = values[3]; + __pyx_v_key = values[4]; + __pyx_v_reverse = values[5]; + __pyx_v_weighted = values[6]; + __pyx_v_input_batched = values[7]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create", 0, 2, 8, __pyx_nargs); __PYX_ERR(0, 845, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_4create(__pyx_self, __pyx_v_cls, __pyx_v_num_quantiles, __pyx_v_epsilon, __pyx_v_max_num_elements, __pyx_v_key, __pyx_v_reverse, __pyx_v_weighted, __pyx_v_input_batched); + + /* "apache_beam/transforms/stats.py":845 + * self._input_batched)) + * + * @classmethod # <<<<<<<<<<<<<< + * def create( + * cls, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_4create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_num_quantiles, PyObject *__pyx_v_epsilon, PyObject *__pyx_v_max_num_elements, PyObject *__pyx_v_key, PyObject *__pyx_v_reverse, PyObject *__pyx_v_weighted, PyObject *__pyx_v_input_batched) { + PyObject *__pyx_v_b = NULL; + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + double __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + long __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + __Pyx_INCREF(__pyx_v_epsilon); + __Pyx_INCREF(__pyx_v_max_num_elements); + + /* "apache_beam/transforms/stats.py":884 + * batches of elements. + * """ + * max_num_elements = max_num_elements or cls._MAX_NUM_ELEMENTS # <<<<<<<<<<<<<< + * if not epsilon: + * epsilon = min(1e-2, 1.0 / num_quantiles) \ +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_max_num_elements); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 884, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_max_num_elements); + __pyx_t_1 = __pyx_v_max_num_elements; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_MAX_NUM_ELEMENTS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_DECREF_SET(__pyx_v_max_num_elements, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":885 + * """ + * max_num_elements = max_num_elements or cls._MAX_NUM_ELEMENTS + * if not epsilon: # <<<<<<<<<<<<<< + * epsilon = min(1e-2, 1.0 / num_quantiles) \ + * if weighted else (1.0 / num_quantiles) +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_epsilon); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_4 = (!__pyx_t_2); + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":887 + * if not epsilon: + * epsilon = min(1e-2, 1.0 / num_quantiles) \ + * if weighted else (1.0 / num_quantiles) # <<<<<<<<<<<<<< + * # Note that calculation of the buffer size and the number of buffers here + * # is based on technique used in the Munro-Paterson algorithm. Switching to +*/ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_weighted); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 887, __pyx_L1_error) + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":886 + * max_num_elements = max_num_elements or cls._MAX_NUM_ELEMENTS + * if not epsilon: + * epsilon = min(1e-2, 1.0 / num_quantiles) \ # <<<<<<<<<<<<<< + * if weighted else (1.0 / num_quantiles) + * # Note that calculation of the buffer size and the number of buffers here +*/ + __pyx_t_3 = __Pyx_PyFloat_TrueDivideCObj(__pyx_mstate_global->__pyx_float_1_0, __pyx_v_num_quantiles, 1.0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1e-2; + __pyx_t_7 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_6 = __pyx_t_3; + } else { + __pyx_t_8 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_t_8; + __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else { + + /* "apache_beam/transforms/stats.py":887 + * if not epsilon: + * epsilon = min(1e-2, 1.0 / num_quantiles) \ + * if weighted else (1.0 / num_quantiles) # <<<<<<<<<<<<<< + * # Note that calculation of the buffer size and the number of buffers here + * # is based on technique used in the Munro-Paterson algorithm. Switching to +*/ + __pyx_t_6 = __Pyx_PyFloat_TrueDivideCObj(__pyx_mstate_global->__pyx_float_1_0, __pyx_v_num_quantiles, 1.0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __Pyx_DECREF_SET(__pyx_v_epsilon, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":885 + * """ + * max_num_elements = max_num_elements or cls._MAX_NUM_ELEMENTS + * if not epsilon: # <<<<<<<<<<<<<< + * epsilon = min(1e-2, 1.0 / num_quantiles) \ + * if weighted else (1.0 / num_quantiles) +*/ + } + + /* "apache_beam/transforms/stats.py":892 + * # the logic used in the "New Algorithm" may result in memory savings since + * # it results in lower values for b and k in practice. + * b = 2 # <<<<<<<<<<<<<< + * while (b - 2) * (1 << (b - 2)) < epsilon * max_num_elements: + * b = b + 1 +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); + __pyx_v_b = __pyx_mstate_global->__pyx_int_2; + + /* "apache_beam/transforms/stats.py":893 + * # it results in lower values for b and k in practice. + * b = 2 + * while (b - 2) * (1 << (b - 2)) < epsilon * max_num_elements: # <<<<<<<<<<<<<< + * b = b + 1 + * b = b - 1 +*/ + while (1) { + __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyLong_SubtractObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_v_epsilon, __pyx_v_max_num_elements); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_4) break; + + /* "apache_beam/transforms/stats.py":894 + * b = 2 + * while (b - 2) * (1 << (b - 2)) < epsilon * max_num_elements: + * b = b + 1 # <<<<<<<<<<<<<< + * b = b - 1 + * k = max(2, int(math.ceil(max_num_elements / float(1 << (b - 1))))) +*/ + __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1); + __pyx_t_1 = 0; + } + + /* "apache_beam/transforms/stats.py":895 + * while (b - 2) * (1 << (b - 2)) < epsilon * max_num_elements: + * b = b + 1 + * b = b - 1 # <<<<<<<<<<<<<< + * k = max(2, int(math.ceil(max_num_elements / float(1 << (b - 1))))) + * return cls( +*/ + __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":896 + * b = b + 1 + * b = b - 1 + * k = max(2, int(math.ceil(max_num_elements / float(1 << (b - 1))))) # <<<<<<<<<<<<<< + * return cls( + * num_quantiles=num_quantiles, +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ceil); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyLong_SubtractObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Lshift(__pyx_mstate_global->__pyx_int_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_v_max_num_elements, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = 2; + __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + __Pyx_INCREF(__pyx_t_8); + __pyx_t_1 = __pyx_t_8; + } else { + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_k = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":897 + * b = b - 1 + * k = max(2, int(math.ceil(max_num_elements / float(1 << (b - 1))))) + * return cls( # <<<<<<<<<<<<<< + * num_quantiles=num_quantiles, + * buffer_size=k, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_v_cls); + __pyx_t_3 = __pyx_v_cls; + + /* "apache_beam/transforms/stats.py":904 + * reverse=reverse, + * weighted=weighted, + * input_batched=input_batched) # <<<<<<<<<<<<<< + * + * def _offset(self, new_weight): +*/ + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_1); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 7 : 0)] = {__pyx_t_1, NULL}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_quantiles, __pyx_v_num_quantiles, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer_size, __pyx_v_k, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_num_buffers, __pyx_v_b, __pyx_t_7, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_v_key, __pyx_t_7, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_reverse, __pyx_v_reverse, __pyx_t_7, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_weighted, __pyx_v_weighted, __pyx_t_7, __pyx_callargs+1, 5) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_input_batched, __pyx_v_input_batched, __pyx_t_7, __pyx_callargs+1, 6) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":845 + * self._input_batched)) + * + * @classmethod # <<<<<<<<<<<<<< + * def create( + * cls, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_b); + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_epsilon); + __Pyx_XDECREF(__pyx_v_max_num_elements); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":906 + * input_batched=input_batched) + * + * def _offset(self, new_weight): # <<<<<<<<<<<<<< + * # type: (int) -> float + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_7_offset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_6_offset, "\n If the weight is even, we must round up or down. Alternate between these\n two options to avoid a bias.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_7_offset = {"_offset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_7_offset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_6_offset}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_7_offset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_new_weight = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_offset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_new_weight,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 906, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 906, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 906, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_offset", 0) < (0)) __PYX_ERR(0, 906, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_offset", 1, 2, 2, i); __PYX_ERR(0, 906, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 906, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 906, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_new_weight = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_offset", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 906, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn._offset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_6_offset(__pyx_self, __pyx_v_self, __pyx_v_new_weight); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_6_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_weight) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_offset", 0); + + /* "apache_beam/transforms/stats.py":913 + * two options to avoid a bias. + * """ + * if new_weight % 2 == 1: # <<<<<<<<<<<<<< + * return (new_weight + 1) / 2 + * else: +*/ + __pyx_t_1 = __Pyx_PyLong_RemainderObjC(__pyx_v_new_weight, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":914 + * """ + * if new_weight % 2 == 1: + * return (new_weight + 1) / 2 # <<<<<<<<<<<<<< + * else: + * self._offset_jitter = 2 - self._offset_jitter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_new_weight, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_TrueDivideObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":913 + * two options to avoid a bias. + * """ + * if new_weight % 2 == 1: # <<<<<<<<<<<<<< + * return (new_weight + 1) / 2 + * else: +*/ + } + + /* "apache_beam/transforms/stats.py":916 + * return (new_weight + 1) / 2 + * else: + * self._offset_jitter = 2 - self._offset_jitter # <<<<<<<<<<<<<< + * return (new_weight + self._offset_jitter) / 2 + * +*/ + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset_jitter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyLong_SubtractCObj(__pyx_mstate_global->__pyx_int_2, __pyx_t_3, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset_jitter, __pyx_t_1) < (0)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":917 + * else: + * self._offset_jitter = 2 - self._offset_jitter + * return (new_weight + self._offset_jitter) / 2 # <<<<<<<<<<<<<< + * + * # TODO(https://github.com/apache/beam/issues/19737): Signature incompatible +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset_jitter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Add(__pyx_v_new_weight, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_TrueDivideObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/transforms/stats.py":906 + * input_batched=input_batched) + * + * def _offset(self, new_weight): # <<<<<<<<<<<<<< + * # type: (int) -> float + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn._offset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":921 + * # TODO(https://github.com/apache/beam/issues/19737): Signature incompatible + * # with supertype + * def create_accumulator(self): # <<<<<<<<<<<<<< + * # type: () -> _QuantileState + * self._qs = _QuantileState( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_9create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_9create_accumulator = {"create_accumulator", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_9create_accumulator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_9create_accumulator(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_accumulator (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 921, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 921, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_accumulator", 0) < (0)) __PYX_ERR(0, 921, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_accumulator", 1, 1, 1, i); __PYX_ERR(0, 921, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 921, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create_accumulator", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 921, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_8create_accumulator(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_8create_accumulator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_accumulator", 0); + + /* "apache_beam/transforms/stats.py":923 + * def create_accumulator(self): + * # type: () -> _QuantileState + * self._qs = _QuantileState( # <<<<<<<<<<<<<< + * unbuffered_elements=[], + * unbuffered_weights=[], +*/ + __pyx_t_2 = NULL; + + /* "apache_beam/transforms/stats.py":924 + * # type: () -> _QuantileState + * self._qs = _QuantileState( + * unbuffered_elements=[], # <<<<<<<<<<<<<< + * unbuffered_weights=[], + * buffers=[], +*/ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/transforms/stats.py":925 + * self._qs = _QuantileState( + * unbuffered_elements=[], + * unbuffered_weights=[], # <<<<<<<<<<<<<< + * buffers=[], + * spec=self._spec) +*/ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/transforms/stats.py":926 + * unbuffered_elements=[], + * unbuffered_weights=[], + * buffers=[], # <<<<<<<<<<<<<< + * spec=self._spec) + * return self._qs +*/ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/transforms/stats.py":927 + * unbuffered_weights=[], + * buffers=[], + * spec=self._spec) # <<<<<<<<<<<<<< + * return self._qs + * +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unbuffered_elements, __pyx_t_3, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_unbuffered_weights, __pyx_t_4, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffers, __pyx_t_5, __pyx_t_8, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_spec, __pyx_t_6, __pyx_t_8, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + + /* "apache_beam/transforms/stats.py":923 + * def create_accumulator(self): + * # type: () -> _QuantileState + * self._qs = _QuantileState( # <<<<<<<<<<<<<< + * unbuffered_elements=[], + * unbuffered_weights=[], +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_qs, ((PyObject *)__pyx_t_1)) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":928 + * buffers=[], + * spec=self._spec) + * return self._qs # <<<<<<<<<<<<<< + * + * def add_input(self, quantile_state, element): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_qs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":921 + * # TODO(https://github.com/apache/beam/issues/19737): Signature incompatible + * # with supertype + * def create_accumulator(self): # <<<<<<<<<<<<<< + * # type: () -> _QuantileState + * self._qs = _QuantileState( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.create_accumulator", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":930 + * return self._qs + * + * def add_input(self, quantile_state, element): # <<<<<<<<<<<<<< + * """ + * Add a new element to the collection being summarized by quantile state. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_11add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_10add_input, "\n Add a new element to the collection being summarized by quantile state.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_11add_input = {"add_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_11add_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_10add_input}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_11add_input(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_quantile_state = 0; + PyObject *__pyx_v_element = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_input (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_quantile_state,&__pyx_mstate_global->__pyx_n_u_element,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 930, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 930, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 930, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 930, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_input", 0) < (0)) __PYX_ERR(0, 930, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_input", 1, 3, 3, i); __PYX_ERR(0, 930, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 930, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 930, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 930, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_quantile_state = values[1]; + __pyx_v_element = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_input", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 930, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_10add_input(__pyx_self, __pyx_v_self, __pyx_v_quantile_state, __pyx_v_element); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_10add_input(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_quantile_state, PyObject *__pyx_v_element) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_input", 0); + + /* "apache_beam/transforms/stats.py":934 + * Add a new element to the collection being summarized by quantile state. + * """ + * quantile_state.add_unbuffered([element], self._offset) # <<<<<<<<<<<<<< + * return quantile_state + * +*/ + __pyx_t_2 = __pyx_v_quantile_state; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_element); + __Pyx_GIVEREF(__pyx_v_element); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_element) != (0)) __PYX_ERR(0, 934, __pyx_L1_error); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_unbuffered_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":935 + * """ + * quantile_state.add_unbuffered([element], self._offset) + * return quantile_state # <<<<<<<<<<<<<< + * + * def _add_inputs(self, quantile_state, elements): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_quantile_state); + __pyx_r = __pyx_v_quantile_state; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":930 + * return self._qs + * + * def add_input(self, quantile_state, element): # <<<<<<<<<<<<<< + * """ + * Add a new element to the collection being summarized by quantile state. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.add_input", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":937 + * return quantile_state + * + * def _add_inputs(self, quantile_state, elements): # <<<<<<<<<<<<<< + * # type: (_QuantileState, List) -> _QuantileState + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_13_add_inputs(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_12_add_inputs, "\n Add a batch of elements to the collection being summarized by quantile\n state.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_13_add_inputs = {"_add_inputs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_13_add_inputs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_12_add_inputs}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_13_add_inputs(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_quantile_state = 0; + PyObject *__pyx_v_elements = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_add_inputs (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_quantile_state,&__pyx_mstate_global->__pyx_n_u_elements,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 937, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 937, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 937, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 937, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_add_inputs", 0) < (0)) __PYX_ERR(0, 937, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_add_inputs", 1, 3, 3, i); __PYX_ERR(0, 937, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 937, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 937, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 937, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_quantile_state = values[1]; + __pyx_v_elements = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_add_inputs", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 937, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn._add_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_12_add_inputs(__pyx_self, __pyx_v_self, __pyx_v_quantile_state, __pyx_v_elements); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_12_add_inputs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_quantile_state, PyObject *__pyx_v_elements) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_add_inputs", 0); + + /* "apache_beam/transforms/stats.py":944 + * state. + * """ + * if len(elements) == 0: # <<<<<<<<<<<<<< + * return quantile_state + * quantile_state.add_unbuffered(elements, self._offset) +*/ + __pyx_t_1 = PyObject_Length(__pyx_v_elements); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 == 0); + if (__pyx_t_2) { + + /* "apache_beam/transforms/stats.py":945 + * """ + * if len(elements) == 0: + * return quantile_state # <<<<<<<<<<<<<< + * quantile_state.add_unbuffered(elements, self._offset) + * return quantile_state +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_quantile_state); + __pyx_r = __pyx_v_quantile_state; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":944 + * state. + * """ + * if len(elements) == 0: # <<<<<<<<<<<<<< + * return quantile_state + * quantile_state.add_unbuffered(elements, self._offset) +*/ + } + + /* "apache_beam/transforms/stats.py":946 + * if len(elements) == 0: + * return quantile_state + * quantile_state.add_unbuffered(elements, self._offset) # <<<<<<<<<<<<<< + * return quantile_state + * +*/ + __pyx_t_4 = __pyx_v_quantile_state; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_elements, __pyx_t_5}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_unbuffered_2, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/transforms/stats.py":947 + * return quantile_state + * quantile_state.add_unbuffered(elements, self._offset) + * return quantile_state # <<<<<<<<<<<<<< + * + * def merge_accumulators(self, accumulators): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_quantile_state); + __pyx_r = __pyx_v_quantile_state; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":937 + * return quantile_state + * + * def _add_inputs(self, quantile_state, elements): # <<<<<<<<<<<<<< + * # type: (_QuantileState, List) -> _QuantileState + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn._add_inputs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":949 + * return quantile_state + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_15merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_14merge_accumulators, "Merges all the accumulators (quantile state) as one."); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_15merge_accumulators = {"merge_accumulators", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_15merge_accumulators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_14merge_accumulators}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_15merge_accumulators(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_accumulators = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("merge_accumulators (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_accumulators,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 949, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "merge_accumulators", 0) < (0)) __PYX_ERR(0, 949, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("merge_accumulators", 1, 2, 2, i); __PYX_ERR(0, 949, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_accumulators = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("merge_accumulators", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 949, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_14merge_accumulators(__pyx_self, __pyx_v_self, __pyx_v_accumulators); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_14merge_accumulators(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulators) { + PyObject *__pyx_v_qs = NULL; + PyObject *__pyx_v_accumulator = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("merge_accumulators", 0); + + /* "apache_beam/transforms/stats.py":951 + * def merge_accumulators(self, accumulators): + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() # <<<<<<<<<<<<<< + * for accumulator in accumulators: + * if accumulator.is_empty(): +*/ + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_qs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":952 + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.is_empty(): + * continue +*/ + if (likely(PyList_CheckExact(__pyx_v_accumulators)) || PyTuple_CheckExact(__pyx_v_accumulators)) { + __pyx_t_1 = __pyx_v_accumulators; __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_accumulators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 952, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 952, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); + #endif + ++__pyx_t_4; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error) + } else { + __pyx_t_2 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 952, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_accumulator, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":953 + * qs = self.create_accumulator() + * for accumulator in accumulators: + * if accumulator.is_empty(): # <<<<<<<<<<<<<< + * continue + * if self._spec.weighted: +*/ + __pyx_t_6 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_empty, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_7) { + + /* "apache_beam/transforms/stats.py":954 + * for accumulator in accumulators: + * if accumulator.is_empty(): + * continue # <<<<<<<<<<<<<< + * if self._spec.weighted: + * qs.add_unbuffered( +*/ + goto __pyx_L3_continue; + + /* "apache_beam/transforms/stats.py":953 + * qs = self.create_accumulator() + * for accumulator in accumulators: + * if accumulator.is_empty(): # <<<<<<<<<<<<<< + * continue + * if self._spec.weighted: +*/ + } + + /* "apache_beam/transforms/stats.py":955 + * if accumulator.is_empty(): + * continue + * if self._spec.weighted: # <<<<<<<<<<<<<< + * qs.add_unbuffered( + * [accumulator.unbuffered_elements, accumulator.unbuffered_weights], +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weighted); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + + /* "apache_beam/transforms/stats.py":956 + * continue + * if self._spec.weighted: + * qs.add_unbuffered( # <<<<<<<<<<<<<< + * [accumulator.unbuffered_elements, accumulator.unbuffered_weights], + * self._offset) +*/ + __pyx_t_2 = __pyx_v_qs; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/transforms/stats.py":957 + * if self._spec.weighted: + * qs.add_unbuffered( + * [accumulator.unbuffered_elements, accumulator.unbuffered_weights], # <<<<<<<<<<<<<< + * self._offset) + * else: +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_unbuffered_elements); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_unbuffered_weights); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 957, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 957, __pyx_L1_error); + __pyx_t_8 = 0; + __pyx_t_9 = 0; + + /* "apache_beam/transforms/stats.py":958 + * qs.add_unbuffered( + * [accumulator.unbuffered_elements, accumulator.unbuffered_weights], + * self._offset) # <<<<<<<<<<<<<< + * else: + * qs.add_unbuffered(accumulator.unbuffered_elements, self._offset) +*/ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_unbuffered_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":955 + * if accumulator.is_empty(): + * continue + * if self._spec.weighted: # <<<<<<<<<<<<<< + * qs.add_unbuffered( + * [accumulator.unbuffered_elements, accumulator.unbuffered_weights], +*/ + goto __pyx_L6; + } + + /* "apache_beam/transforms/stats.py":960 + * self._offset) + * else: + * qs.add_unbuffered(accumulator.unbuffered_elements, self._offset) # <<<<<<<<<<<<<< + * + * qs.buffers.extend(accumulator.buffers) +*/ + /*else*/ { + __pyx_t_9 = __pyx_v_qs; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_unbuffered_elements); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_10, __pyx_t_2}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_unbuffered_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L6:; + + /* "apache_beam/transforms/stats.py":962 + * qs.add_unbuffered(accumulator.unbuffered_elements, self._offset) + * + * qs.buffers.extend(accumulator.buffers) # <<<<<<<<<<<<<< + * heapq.heapify(qs.buffers) + * qs.collapse_if_needed(self._offset) +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_qs, __pyx_mstate_global->__pyx_n_u_buffers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __pyx_t_10; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_buffers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":952 + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() + * for accumulator in accumulators: # <<<<<<<<<<<<<< + * if accumulator.is_empty(): + * continue +*/ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":963 + * + * qs.buffers.extend(accumulator.buffers) + * heapq.heapify(qs.buffers) # <<<<<<<<<<<<<< + * qs.collapse_if_needed(self._offset) + * return qs +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_heapq); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_heapify); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_qs, __pyx_mstate_global->__pyx_n_u_buffers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":964 + * qs.buffers.extend(accumulator.buffers) + * heapq.heapify(qs.buffers) + * qs.collapse_if_needed(self._offset) # <<<<<<<<<<<<<< + * return qs + * +*/ + __pyx_t_9 = __pyx_v_qs; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_collapse_if_needed, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":965 + * heapq.heapify(qs.buffers) + * qs.collapse_if_needed(self._offset) + * return qs # <<<<<<<<<<<<<< + * + * def extract_output(self, accumulator): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_qs); + __pyx_r = __pyx_v_qs; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":949 + * return quantile_state + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.merge_accumulators", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_qs); + __Pyx_XDECREF(__pyx_v_accumulator); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/transforms/stats.py":967 + * return qs + * + * def extract_output(self, accumulator): # <<<<<<<<<<<<<< + * """ + * Outputs num_quantiles elements consisting of the minimum, maximum and +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_17extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_16extract_output, "\n Outputs num_quantiles elements consisting of the minimum, maximum and\n num_quantiles - 2 evenly spaced intermediate elements. Returns the empty\n list if no elements have been added.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_17extract_output = {"extract_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_17extract_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_16extract_output}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_17extract_output(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_accumulator = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("extract_output (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_accumulator,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 967, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 967, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 967, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extract_output", 0) < (0)) __PYX_ERR(0, 967, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extract_output", 1, 2, 2, i); __PYX_ERR(0, 967, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 967, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 967, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_accumulator = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("extract_output", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 967, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_16extract_output(__pyx_self, __pyx_v_self, __pyx_v_accumulator); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_16extract_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_accumulator) { + PyObject *__pyx_v_all_elems = NULL; + PyObject *__pyx_v_total_weight = NULL; + PyObject *__pyx_v_buffer_elem = NULL; + PyObject *__pyx_v_step = NULL; + PyObject *__pyx_v_offset = NULL; + PyObject *__pyx_v_quantiles = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_min_val = NULL; + PyObject *__pyx_v_max_val = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + int64_t __pyx_t_10; + double __pyx_t_11; + double __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *(*__pyx_t_15)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("extract_output", 0); + + /* "apache_beam/transforms/stats.py":973 + * list if no elements have been added. + * """ + * if accumulator.is_empty(): # <<<<<<<<<<<<<< + * return [] + * accumulator.finalize() +*/ + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_empty, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 973, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":974 + * """ + * if accumulator.is_empty(): + * return [] # <<<<<<<<<<<<<< + * accumulator.finalize() + * all_elems = accumulator.buffers +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":973 + * list if no elements have been added. + * """ + * if accumulator.is_empty(): # <<<<<<<<<<<<<< + * return [] + * accumulator.finalize() +*/ + } + + /* "apache_beam/transforms/stats.py":975 + * if accumulator.is_empty(): + * return [] + * accumulator.finalize() # <<<<<<<<<<<<<< + * all_elems = accumulator.buffers + * total_weight = 0 +*/ + __pyx_t_2 = __pyx_v_accumulator; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":976 + * return [] + * accumulator.finalize() + * all_elems = accumulator.buffers # <<<<<<<<<<<<<< + * total_weight = 0 + * if self._spec.weighted: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_accumulator, __pyx_mstate_global->__pyx_n_u_buffers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_all_elems = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":977 + * accumulator.finalize() + * all_elems = accumulator.buffers + * total_weight = 0 # <<<<<<<<<<<<<< + * if self._spec.weighted: + * for buffer_elem in all_elems: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_total_weight = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/transforms/stats.py":978 + * all_elems = accumulator.buffers + * total_weight = 0 + * if self._spec.weighted: # <<<<<<<<<<<<<< + * for buffer_elem in all_elems: + * total_weight += sum(buffer_elem.weights) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_weighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/transforms/stats.py":979 + * total_weight = 0 + * if self._spec.weighted: + * for buffer_elem in all_elems: # <<<<<<<<<<<<<< + * total_weight += sum(buffer_elem.weights) + * else: +*/ + if (likely(PyList_CheckExact(__pyx_v_all_elems)) || PyTuple_CheckExact(__pyx_v_all_elems)) { + __pyx_t_2 = __pyx_v_all_elems; __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_all_elems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 979, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 979, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 979, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_buffer_elem, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/transforms/stats.py":980 + * if self._spec.weighted: + * for buffer_elem in all_elems: + * total_weight += sum(buffer_elem.weights) # <<<<<<<<<<<<<< + * else: + * for buffer_elem in all_elems: +*/ + __pyx_t_7 = NULL; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer_elem, __pyx_mstate_global->__pyx_n_u_weights); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_total_weight, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_total_weight, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":979 + * total_weight = 0 + * if self._spec.weighted: + * for buffer_elem in all_elems: # <<<<<<<<<<<<<< + * total_weight += sum(buffer_elem.weights) + * else: +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":978 + * all_elems = accumulator.buffers + * total_weight = 0 + * if self._spec.weighted: # <<<<<<<<<<<<<< + * for buffer_elem in all_elems: + * total_weight += sum(buffer_elem.weights) +*/ + goto __pyx_L4; + } + + /* "apache_beam/transforms/stats.py":982 + * total_weight += sum(buffer_elem.weights) + * else: + * for buffer_elem in all_elems: # <<<<<<<<<<<<<< + * total_weight += len(buffer_elem.elements) * buffer_elem.weights[0] + * +*/ + /*else*/ { + if (likely(PyList_CheckExact(__pyx_v_all_elems)) || PyTuple_CheckExact(__pyx_v_all_elems)) { + __pyx_t_2 = __pyx_v_all_elems; __Pyx_INCREF(__pyx_t_2); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_all_elems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 982, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 982, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 982, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_6(__pyx_t_2); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 982, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_buffer_elem, __pyx_t_8); + __pyx_t_8 = 0; + + /* "apache_beam/transforms/stats.py":983 + * else: + * for buffer_elem in all_elems: + * total_weight += len(buffer_elem.elements) * buffer_elem.weights[0] # <<<<<<<<<<<<<< + * + * step = total_weight / (self._num_quantiles - 1) +*/ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer_elem, __pyx_mstate_global->__pyx_n_u_elements); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer_elem, __pyx_mstate_global->__pyx_n_u_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Multiply(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_total_weight, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_total_weight, __pyx_t_7); + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":982 + * total_weight += sum(buffer_elem.weights) + * else: + * for buffer_elem in all_elems: # <<<<<<<<<<<<<< + * total_weight += len(buffer_elem.elements) * buffer_elem.weights[0] + * +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "apache_beam/transforms/stats.py":985 + * total_weight += len(buffer_elem.elements) * buffer_elem.weights[0] + * + * step = total_weight / (self._num_quantiles - 1) # <<<<<<<<<<<<<< + * offset = (total_weight - 1) / (self._num_quantiles - 1) + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_total_weight, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_step = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":986 + * + * step = total_weight / (self._num_quantiles - 1) + * offset = (total_weight - 1) / (self._num_quantiles - 1) # <<<<<<<<<<<<<< + * + * quantiles, _, min_val, max_val = \ +*/ + __pyx_t_2 = __Pyx_PyLong_SubtractObjC(__pyx_v_total_weight, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 986, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_offset = __pyx_t_7; + __pyx_t_7 = 0; + + /* "apache_beam/transforms/stats.py":989 + * + * quantiles, _, min_val, max_val = \ + * _interpolate(all_elems, self._num_quantiles - 2, step, offset, # <<<<<<<<<<<<<< + * self._spec) + * +*/ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_quantiles_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyLong_SubtractObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = __Pyx_PyFloat_AsDouble(__pyx_v_step); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyFloat_AsDouble(__pyx_v_offset); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":990 + * quantiles, _, min_val, max_val = \ + * _interpolate(all_elems, self._num_quantiles - 2, step, offset, + * self._spec) # <<<<<<<<<<<<<< + * + * return [min_val] + quantiles + [max_val] +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec))))) __PYX_ERR(0, 990, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":989 + * + * quantiles, _, min_val, max_val = \ + * _interpolate(all_elems, self._num_quantiles - 2, step, offset, # <<<<<<<<<<<<<< + * self._spec) + * +*/ + __pyx_t_7 = __pyx_f_11apache_beam_10transforms_5stats__interpolate(__pyx_v_all_elems, __pyx_t_10, __pyx_t_11, __pyx_t_12, ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { + PyObject* sequence = __pyx_t_7; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 4)) { + if (size > 4) __Pyx_RaiseTooManyValuesError(4); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 988, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 3); + __Pyx_INCREF(__pyx_t_13); + } else { + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + } + #else + { + Py_ssize_t i; + PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_8,&__pyx_t_13}; + for (i=0; i < 4; i++) { + PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + Py_ssize_t index = -1; + PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_8,&__pyx_t_13}; + __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); + for (index=0; index < 4; index++) { + PyObject* item = __pyx_t_15(__pyx_t_14); if (unlikely(!item)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 4) < (0)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L12_unpacking_done; + __pyx_L11_unpacking_failed:; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_L12_unpacking_done:; + } + + /* "apache_beam/transforms/stats.py":988 + * offset = (total_weight - 1) / (self._num_quantiles - 1) + * + * quantiles, _, min_val, max_val = \ # <<<<<<<<<<<<<< + * _interpolate(all_elems, self._num_quantiles - 2, step, offset, + * self._spec) +*/ + __pyx_v_quantiles = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v__ = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_min_val = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v_max_val = __pyx_t_13; + __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":992 + * self._spec) + * + * return [min_val] + quantiles + [max_val] # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_min_val); + __Pyx_GIVEREF(__pyx_v_min_val); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_min_val) != (0)) __PYX_ERR(0, 992, __pyx_L1_error); + __pyx_t_13 = PyNumber_Add(__pyx_t_7, __pyx_v_quantiles); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_max_val); + __Pyx_GIVEREF(__pyx_v_max_val); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_max_val) != (0)) __PYX_ERR(0, 992, __pyx_L1_error); + __pyx_t_8 = PyNumber_Add(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "apache_beam/transforms/stats.py":967 + * return qs + * + * def extract_output(self, accumulator): # <<<<<<<<<<<<<< + * """ + * Outputs num_quantiles elements consisting of the minimum, maximum and +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("apache_beam.transforms.stats.ApproximateQuantilesCombineFn.extract_output", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_all_elems); + __Pyx_XDECREF(__pyx_v_total_weight); + __Pyx_XDECREF(__pyx_v_buffer_elem); + __Pyx_XDECREF(__pyx_v_step); + __Pyx_XDECREF(__pyx_v_offset); + __Pyx_XDECREF(__pyx_v_quantiles); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_min_val); + __Pyx_XDECREF(__pyx_v_max_val); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__QuantileBuffer(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_7__pyx_unpickle__QuantileBuffer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_10transforms_5stats_7__pyx_unpickle__QuantileBuffer = {"__pyx_unpickle__QuantileBuffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_7__pyx_unpickle__QuantileBuffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_10transforms_5stats_7__pyx_unpickle__QuantileBuffer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__QuantileBuffer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__QuantileBuffer", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__QuantileBuffer", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__QuantileBuffer", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.transforms.stats.__pyx_unpickle__QuantileBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_10transforms_5stats_6__pyx_unpickle__QuantileBuffer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_10transforms_5stats_6__pyx_unpickle__QuantileBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__QuantileBuffer", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__QuantileBuffer(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') # <<<<<<<<<<<<<< + * __pyx_result = _QuantileBuffer.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, __pyx_k_iter_elements_level_max_val_min); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') + * __pyx_result = _QuantileBuffer.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') + * __pyx_result = _QuantileBuffer.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _QuantileBuffer.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_10transforms_5stats___pyx_unpickle__QuantileBuffer__set_state(((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') + * __pyx_result = _QuantileBuffer.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): + * __pyx_result._iter = __pyx_state[0]; __pyx_result.elements = __pyx_state[1]; __pyx_result.level = __pyx_state[2]; __pyx_result.max_val = __pyx_state[3]; __pyx_result.min_val = __pyx_state[4]; __pyx_result.weighted = __pyx_state[5]; __pyx_result.weights = __pyx_state[6] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__QuantileBuffer(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.transforms.stats.__pyx_unpickle__QuantileBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._iter = __pyx_state[0]; __pyx_result.elements = __pyx_state[1]; __pyx_result.level = __pyx_state[2]; __pyx_result.max_val = __pyx_state[3]; __pyx_result.min_val = __pyx_state[4]; __pyx_result.weighted = __pyx_state[5]; __pyx_result.weights = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + +static PyObject *__pyx_f_11apache_beam_10transforms_5stats___pyx_unpickle__QuantileBuffer__set_state(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__QuantileBuffer__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): + * __pyx_result._iter = __pyx_state[0]; __pyx_result.elements = __pyx_state[1]; __pyx_result.level = __pyx_state[2]; __pyx_result.max_val = __pyx_state[3]; __pyx_result.min_val = __pyx_state[4]; __pyx_result.weighted = __pyx_state[5]; __pyx_result.weights = __pyx_state[6] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_iter); + __Pyx_DECREF(__pyx_v___pyx_result->_iter); + __pyx_v___pyx_result->_iter = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->elements); + __Pyx_DECREF(__pyx_v___pyx_result->elements); + __pyx_v___pyx_result->elements = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->level = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->max_val); + __Pyx_DECREF(__pyx_v___pyx_result->max_val); + __pyx_v___pyx_result->max_val = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->min_val); + __Pyx_DECREF(__pyx_v___pyx_result->min_val); + __pyx_v___pyx_result->min_val = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->weighted = __pyx_t_3; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->weights); + __Pyx_DECREF(__pyx_v___pyx_result->weights); + __pyx_v___pyx_result->weights = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): + * __pyx_result._iter = __pyx_state[0]; __pyx_result.elements = __pyx_state[1]; __pyx_result.level = __pyx_state[2]; __pyx_result.max_val = __pyx_state[3]; __pyx_result.min_val = __pyx_state[4]; __pyx_result.weighted = __pyx_state[5]; __pyx_result.weights = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 7); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__QuantileBuffer__set_state(<_QuantileBuffer> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__QuantileBuffer__set_state(_QuantileBuffer __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._iter = __pyx_state[0]; __pyx_result.elements = __pyx_state[1]; __pyx_result.level = __pyx_state[2]; __pyx_result.max_val = __pyx_state[3]; __pyx_result.min_val = __pyx_state[4]; __pyx_result.weighted = __pyx_state[5]; __pyx_result.weights = __pyx_state[6] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 7) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.transforms.stats.__pyx_unpickle__QuantileBuffer__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileSpec(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)o); + p->key = Py_None; Py_INCREF(Py_None); + p->weighted_key = Py_None; Py_INCREF(Py_None); + p->less_than = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileSpec(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileSpec) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->key); + Py_CLEAR(p->weighted_key); + Py_CLEAR(p->less_than); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileSpec(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->key) { + e = (*v)(p->key, a); if (e) return e; + } + if (p->weighted_key) { + e = (*v)(p->weighted_key, a); if (e) return e; + } + if (p->less_than) { + e = (*v)(p->less_than, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileSpec(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)o; + tmp = ((PyObject*)p->key); + p->key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->weighted_key); + p->weighted_key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->less_than); + p->less_than = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_buffer_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11buffer_size_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_num_buffers(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_11num_buffers_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_weighted(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_8weighted_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_key(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3key_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_reverse(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_7reverse_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_weighted_key(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_12weighted_key_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_less_than(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_9less_than_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_5stats__QuantileSpec[] = { + {"get_argsort_key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_10transforms_5stats_13_QuantileSpec_2get_argsort_key}, + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_5stats__QuantileSpec[] = { + {"buffer_size", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_buffer_size, 0, 0, 0}, + {"num_buffers", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_num_buffers, 0, 0, 0}, + {"weighted", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_weighted, 0, 0, 0}, + {"key", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_key, 0, 0, 0}, + {"reverse", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_reverse, 0, 0, 0}, + {"weighted_key", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_weighted_key, 0, 0, 0}, + {"less_than", __pyx_getprop_11apache_beam_10transforms_5stats_13_QuantileSpec_less_than, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_5stats__QuantileSpec_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileSpec}, + {Py_tp_doc, (void *)PyDoc_STR("Quantiles computation specifications.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileSpec}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileSpec}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_5stats__QuantileSpec}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_5stats__QuantileSpec}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileSpec}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_5stats__QuantileSpec_spec = { + "apache_beam.transforms.stats._QuantileSpec", + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_5stats__QuantileSpec_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_5stats__QuantileSpec = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.stats.""_QuantileSpec", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Quantiles computation specifications."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_5stats_13_QuantileSpec_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_5stats__QuantileSpec, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileBuffer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)o); + p->elements = Py_None; Py_INCREF(Py_None); + p->weights = Py_None; Py_INCREF(Py_None); + p->min_val = Py_None; Py_INCREF(Py_None); + p->max_val = Py_None; Py_INCREF(Py_None); + p->_iter = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileBuffer(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileBuffer) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->elements); + Py_CLEAR(p->weights); + Py_CLEAR(p->min_val); + Py_CLEAR(p->max_val); + Py_CLEAR(p->_iter); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileBuffer(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->elements) { + e = (*v)(p->elements, a); if (e) return e; + } + if (p->weights) { + e = (*v)(p->weights, a); if (e) return e; + } + if (p->min_val) { + e = (*v)(p->min_val, a); if (e) return e; + } + if (p->max_val) { + e = (*v)(p->max_val, a); if (e) return e; + } + if (p->_iter) { + e = (*v)(p->_iter, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileBuffer(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *)o; + tmp = ((PyObject*)p->elements); + p->elements = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->weights); + p->weights = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->min_val); + p->min_val = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->max_val); + p->max_val = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_iter); + p->_iter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_10transforms_5stats__QuantileBuffer(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_LT: { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5__lt__(o1, o2); + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_elements(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8elements_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_weights(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7weights_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_weighted(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_8weighted_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_level(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5level_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_min_val(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7min_val_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_max_val(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7max_val_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer__iter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_5_iter_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_5stats__QuantileBuffer[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_5stats__QuantileBuffer[] = { + {"elements", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_elements, 0, 0, 0}, + {"weights", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_weights, 0, 0, 0}, + {"weighted", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_weighted, 0, 0, 0}, + {"level", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_level, 0, 0, 0}, + {"min_val", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_min_val, 0, 0, 0}, + {"max_val", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer_max_val, 0, 0, 0}, + {"_iter", __pyx_getprop_11apache_beam_10transforms_5stats_15_QuantileBuffer__iter, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_doc, (void *)PyDoc_STR("A single buffer in the sense of the referenced algorithm.\n (see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1\n &type=pdf and ApproximateQuantilesCombineFn for further information)")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_iter, (void *)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_3__iter__}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_5stats__QuantileBuffer}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileBuffer}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer_spec = { + "apache_beam.transforms.stats._QuantileBuffer", + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.stats.""_QuantileBuffer", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A single buffer in the sense of the referenced algorithm.\n (see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1\n &type=pdf and ApproximateQuantilesCombineFn for further information)"), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_3__iter__, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_5stats_15_QuantileBuffer_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_5stats__QuantileBuffer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_10transforms_5stats__QuantileState __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState; + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileState(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_10transforms_5stats__QuantileState; + p->spec = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)Py_None); Py_INCREF(Py_None); + p->buffers = Py_None; Py_INCREF(Py_None); + p->unbuffered_elements = Py_None; Py_INCREF(Py_None); + p->unbuffered_weights = Py_None; Py_INCREF(Py_None); + p->add_unbuffered = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileState(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileState) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->spec); + Py_CLEAR(p->buffers); + Py_CLEAR(p->unbuffered_elements); + Py_CLEAR(p->unbuffered_weights); + Py_CLEAR(p->add_unbuffered); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileState(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->spec) { + e = (*v)(((PyObject *)p->spec), a); if (e) return e; + } + if (p->buffers) { + e = (*v)(p->buffers, a); if (e) return e; + } + if (p->unbuffered_elements) { + e = (*v)(p->unbuffered_elements, a); if (e) return e; + } + if (p->unbuffered_weights) { + e = (*v)(p->unbuffered_weights, a); if (e) return e; + } + if (p->add_unbuffered) { + e = (*v)(p->add_unbuffered, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileState(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *p = (struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *)o; + tmp = ((PyObject*)p->spec); + p->spec = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->buffers); + p->buffers = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->unbuffered_elements); + p->unbuffered_elements = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->unbuffered_weights); + p->unbuffered_weights = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->add_unbuffered); + p->add_unbuffered = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_spec(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_4spec_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_buffers(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_buffers(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_7buffers_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_elements(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_elements(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_19unbuffered_elements_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_weights(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_18unbuffered_weights_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_add_unbuffered(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_add_unbuffered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_14add_unbuffered_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_10transforms_5stats__QuantileState[] = { + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_10transforms_5stats__QuantileState[] = { + {"spec", __pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_spec, 0, 0, 0}, + {"buffers", __pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_buffers, __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_buffers, 0, 0}, + {"unbuffered_elements", __pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_elements, __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_elements, 0, 0}, + {"unbuffered_weights", __pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_weights, __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_unbuffered_weights, 0, 0}, + {"add_unbuffered", __pyx_getprop_11apache_beam_10transforms_5stats_14_QuantileState_add_unbuffered, __pyx_setprop_11apache_beam_10transforms_5stats_14_QuantileState_add_unbuffered, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_5stats__QuantileState_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileState}, + {Py_tp_doc, (void *)PyDoc_STR("\n Compact summarization of a collection on which quantiles can be estimated.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileState}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileState}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_10transforms_5stats__QuantileState}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_10transforms_5stats__QuantileState}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_5stats__QuantileState}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_5stats__QuantileState_spec = { + "apache_beam.transforms.stats._QuantileState", + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_5stats__QuantileState_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_5stats__QuantileState = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.stats.""_QuantileState", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_5stats__QuantileState, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("\n Compact summarization of a collection on which quantiles can be estimated.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_5stats__QuantileState, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_5stats__QuantileState, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_10transforms_5stats__QuantileState, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_10transforms_5stats__QuantileState, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_10transforms_5stats_14_QuantileState_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_5stats__QuantileState, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct____init__[--__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct____init__]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct____init__) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_key); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct____init__[__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct____init__++] = ((struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_key) { + e = (*v)(p->__pyx_v_key, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct____init__(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ *)o; + tmp = ((PyObject*)p->__pyx_v_key); + p->__pyx_v_key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct____init__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct____init__}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct____init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct____init__}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init___spec = { + "apache_beam.transforms.stats.__pyx_scope_struct____init__", + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init___slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.stats.""__pyx_scope_struct____init__", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct____init__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct____init__, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key[--__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(PyObject *o) { + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_elements); + Py_CLEAR(p->__pyx_v_self); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key[__pyx_mstate_global->__pyx_freecount_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key++] = ((struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_elements) { + e = (*v)(p->__pyx_v_elements, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *p = (struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key *)o; + tmp = ((PyObject*)p->__pyx_v_elements); + p->__pyx_v_elements = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key_spec = { + "apache_beam.transforms.stats.__pyx_scope_struct_1_get_argsort_key", + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.transforms.stats.""__pyx_scope_struct_1_get_argsort_key", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +static int __pyx_import_star_set(__pyx_mstatetype *__pyx_mstate,PyObject *o, PyObject* py_name, const char *name) { + static const char* internal_type_names[] = { + "_QuantileBuffer", + "_QuantileSpec", + "_QuantileState", + "__pyx_ctuple_4libc_6stdint_int64_t", + "__pyx_ctuple_4libc_6stdint_int64_t__and_4libc_6stdint_int64_t", + "__pyx_ctuple_4libc_6stdint_int64_t__and_4libc_6stdint_int64_t_struct", + "__pyx_ctuple_4libc_6stdint_int64_t_struct", + "__pyx_ctuple_Py_ssize_t", + "__pyx_ctuple_Py_ssize_t_struct", + "__pyx_ctuple_double", + "__pyx_ctuple_double_struct", + "__pyx_scope_struct_1_get_argsort_key", + "__pyx_scope_struct____init__", + "int64_t", + 0 + }; + const char** type_name = internal_type_names; + while (*type_name) { + if (__Pyx_StrEq(name, *type_name)) { + PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name); + goto bad; + } + type_name++; + } + if (0); + else { + if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad; + } + return 0; + bad: + return -1; +} + +/* ImportStar */ +static int +__Pyx_import_all_from(PyObject *locals, PyObject *v) +{ + PyObject *all = PyObject_GetAttrString(v, "__all__"); + PyObject *dict, *name, *value; + int skip_leading_underscores = 0; + int pos, err; + if (all == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_Clear(); + dict = PyObject_GetAttrString(v, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_SetString(PyExc_ImportError, + "from-import-* object has no __dict__ and no __all__"); + return -1; + } + all = PyMapping_Keys(dict); + Py_DECREF(dict); + if (all == NULL) + return -1; + skip_leading_underscores = 1; + } + for (pos = 0, err = 0; ; pos++) { + name = PySequence_GetItem(all, pos); + if (name == NULL) { + if (!PyErr_ExceptionMatches(PyExc_IndexError)) + err = -1; + else + PyErr_Clear(); + break; + } + if (skip_leading_underscores && likely(PyUnicode_Check(name))) { + Py_ssize_t length = __Pyx_PyUnicode_GET_LENGTH(name); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) { + Py_DECREF(name); + return -1; + } + #endif + if (likely(length) && __Pyx_PyUnicode_READ_CHAR(name, 0) == '_') { + Py_DECREF(name); + continue; + } + } + value = PyObject_GetAttr(v, name); + if (value == NULL) + err = -1; + else if (PyDict_CheckExact(locals)) + err = PyDict_SetItem(locals, name, value); + else + err = PyObject_SetItem(locals, name, value); + Py_DECREF(name); + Py_XDECREF(value); + if (err != 0) + break; + } + Py_DECREF(all); + return err; +} +static int __pyx_import_star(PyObject* m) { + int i; + int ret = -1; + const char* s; + PyObject *locals = 0; + PyObject *list = 0; + PyObject *utf8_name = 0; + PyObject *name; + PyObject *item; + PyObject *import_obj; + Py_ssize_t size; + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(m); + locals = PyDict_New(); if (!locals) goto bad; + if (__Pyx_import_all_from(locals, m) < 0) goto bad; + list = PyDict_Items(locals); if (!list) goto bad; + size = __Pyx_PyList_GET_SIZE(list); + #if !CYTHON_ASSUME_SAFE_SIZE + if (size < 0) goto bad; + #endif + for(i=0; i__pyx_kp_b_PyObject_PyObject_int64_t_double); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 277; + void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_11apache_beam_10transforms_5stats__interpolate, (void (*)(void))&__pyx_f_11apache_beam_10transforms_5stats__collapse, (void (*)(void)) NULL}; + void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec)) __PYX_ERR(0, 431, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec = &__pyx_type_11apache_beam_10transforms_5stats__QuantileSpec; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_QuantileSpec, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer)) __PYX_ERR(0, 474, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer = &__pyx_type_11apache_beam_10transforms_5stats__QuantileBuffer; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_QuantileBuffer, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_10transforms_5stats__QuantileState = &__pyx_vtable_11apache_beam_10transforms_5stats__QuantileState; + __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState.is_empty = (int (*)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_is_empty; + __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState._add_unbuffered = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered; + __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState._add_unbuffered_weighted = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState__add_unbuffered_weighted; + __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState.finalize = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_finalize; + __pyx_vtable_11apache_beam_10transforms_5stats__QuantileState.collapse_if_needed = (PyObject *(*)(struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileState *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_10transforms_5stats_14_QuantileState_collapse_if_needed; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_5stats__QuantileState_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState)) __PYX_ERR(0, 507, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_5stats__QuantileState_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState = &__pyx_type_11apache_beam_10transforms_5stats__QuantileState; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_vtabptr_11apache_beam_10transforms_5stats__QuantileState) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_QuantileState, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__)) __PYX_ERR(0, 433, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init___spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__) < (0)) __PYX_ERR(0, 433, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__ = &__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct____init__; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__) < (0)) __PYX_ERR(0, 433, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct____init__->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key)) __PYX_ERR(0, 454, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key_spec, __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key) < (0)) __PYX_ERR(0, 454, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key = &__pyx_type_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key) < (0)) __PYX_ERR(0, 454, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_10transforms_5stats___pyx_scope_struct_1_get_argsort_key->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_stats(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_stats}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "stats", + __pyx_k_This_module_has_all_statistic_re, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_stats(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_stats(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_stats(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'stats' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "stats" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_stats", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__transforms__stats) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.transforms.stats")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.transforms.stats", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/transforms/stats.py":31 + * # pytype: skip-file + * + * import hashlib # <<<<<<<<<<<<<< + * import heapq + * import itertools +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_hashlib, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_hashlib, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":32 + * + * import hashlib + * import heapq # <<<<<<<<<<<<<< + * import itertools + * import logging +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_heapq, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_heapq, __pyx_t_2) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":33 + * import hashlib + * import heapq + * import itertools # <<<<<<<<<<<<<< + * import logging + * import math +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_itertools, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":34 + * import heapq + * import itertools + * import logging # <<<<<<<<<<<<<< + * import math + * import typing +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":35 + * import itertools + * import logging + * import math # <<<<<<<<<<<<<< + * import typing + * from collections.abc import Callable +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_math, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":36 + * import logging + * import math + * import typing # <<<<<<<<<<<<<< + * from collections.abc import Callable + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_typing, __pyx_t_2) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":37 + * import math + * import typing + * from collections.abc import Callable # <<<<<<<<<<<<<< + * from typing import Any + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":38 + * import typing + * from collections.abc import Callable + * from typing import Any # <<<<<<<<<<<<<< + * from typing import List + * from typing import Tuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":39 + * from collections.abc import Callable + * from typing import Any + * from typing import List # <<<<<<<<<<<<<< + * from typing import Tuple + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":40 + * from typing import Any + * from typing import List + * from typing import Tuple # <<<<<<<<<<<<<< + * + * from apache_beam import coders +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":42 + * from typing import Tuple + * + * from apache_beam import coders # <<<<<<<<<<<<<< + * from apache_beam import typehints + * from apache_beam.transforms.core import * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_coders}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":43 + * + * from apache_beam import coders + * from apache_beam import typehints # <<<<<<<<<<<<<< + * from apache_beam.transforms.core import * + * from apache_beam.transforms.display import DisplayDataItem +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_typehints}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_typehints}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":44 + * from apache_beam import coders + * from apache_beam import typehints + * from apache_beam.transforms.core import * # <<<<<<<<<<<<<< + * from apache_beam.transforms.display import DisplayDataItem + * from apache_beam.transforms.ptransform import PTransform +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u__2}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_core, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":45 + * from apache_beam import typehints + * from apache_beam.transforms.core import * + * from apache_beam.transforms.display import DisplayDataItem # <<<<<<<<<<<<<< + * from apache_beam.transforms.ptransform import PTransform + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DisplayDataItem}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_display, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DisplayDataItem}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":46 + * from apache_beam.transforms.core import * + * from apache_beam.transforms.display import DisplayDataItem + * from apache_beam.transforms.ptransform import PTransform # <<<<<<<<<<<<<< + * + * __all__ = [ +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PTransform}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_ptransfor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PTransform}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":48 + * from apache_beam.transforms.ptransform import PTransform + * + * __all__ = [ # <<<<<<<<<<<<<< + * 'ApproximateQuantiles', + * 'ApproximateUnique', +*/ + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles, __pyx_mstate_global->__pyx_n_u_ApproximateUnique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":54 + * + * # Type variables + * T = typing.TypeVar('T') # <<<<<<<<<<<<<< + * K = typing.TypeVar('K') + * V = typing.TypeVar('V') +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TypeVar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_T}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_T, __pyx_t_2) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":55 + * # Type variables + * T = typing.TypeVar('T') + * K = typing.TypeVar('K') # <<<<<<<<<<<<<< + * V = typing.TypeVar('V') + * +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TypeVar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_K}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_K, __pyx_t_2) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":56 + * T = typing.TypeVar('T') + * K = typing.TypeVar('K') + * V = typing.TypeVar('V') # <<<<<<<<<<<<<< + * + * try: +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TypeVar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_V}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_V, __pyx_t_2) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":58 + * V = typing.TypeVar('V') + * + * try: # <<<<<<<<<<<<<< + * import mmh3 # pylint: disable=import-error + * +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/transforms/stats.py":59 + * + * try: + * import mmh3 # pylint: disable=import-error # <<<<<<<<<<<<<< + * + * def _mmh3_hash(value): +*/ + __pyx_t_10 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_mmh3, 0, 0, NULL, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 59, __pyx_L2_error) + __pyx_t_2 = __pyx_t_10; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mmh3, __pyx_t_2) < (0)) __PYX_ERR(0, 59, __pyx_L2_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":61 + * import mmh3 # pylint: disable=import-error + * + * def _mmh3_hash(value): # <<<<<<<<<<<<<< + * # mmh3.hash64 returns two 64-bit unsigned integers + * return mmh3.hash64(value, seed=0, signed=False)[0] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_1_mmh3_hash, 0, __pyx_mstate_global->__pyx_n_u_mmh3_hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mmh3_hash, __pyx_t_2) < (0)) __PYX_ERR(0, 61, __pyx_L2_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":65 + * return mmh3.hash64(value, seed=0, signed=False)[0] + * + * _default_hash_fn = _mmh3_hash # <<<<<<<<<<<<<< + * _default_hash_fn_type = 'mmh3' + * except ImportError: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_mmh3_hash); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L2_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_hash_fn, __pyx_t_2) < (0)) __PYX_ERR(0, 65, __pyx_L2_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":66 + * + * _default_hash_fn = _mmh3_hash + * _default_hash_fn_type = 'mmh3' # <<<<<<<<<<<<<< + * except ImportError: + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_hash_fn_type, __pyx_mstate_global->__pyx_n_u_mmh3) < (0)) __PYX_ERR(0, 66, __pyx_L2_error) + + /* "apache_beam/transforms/stats.py":58 + * V = typing.TypeVar('V') + * + * try: # <<<<<<<<<<<<<< + * import mmh3 # pylint: disable=import-error + * +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L7_try_end; + __pyx_L2_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":67 + * _default_hash_fn = _mmh3_hash + * _default_hash_fn_type = 'mmh3' + * except ImportError: # <<<<<<<<<<<<<< + * + * def _md5_hash(value): +*/ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); + if (__pyx_t_11) { + __Pyx_AddTraceback("apache_beam.transforms.stats", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 67, __pyx_L4_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + + /* "apache_beam/transforms/stats.py":69 + * except ImportError: + * + * def _md5_hash(value): # <<<<<<<<<<<<<< + * # md5 is a 128-bit hash, so we truncate the hexdigest (string of 32 + * # hexadecimal digits) to 16 digits and convert to int to get the 64-bit +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_3_md5_hash, 0, __pyx_mstate_global->__pyx_n_u_md5_hash, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L4_except_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_md5_hash, __pyx_t_6) < (0)) __PYX_ERR(0, 69, __pyx_L4_except_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":75 + * return int(hashlib.md5(value).hexdigest()[:16], 16) + * + * _default_hash_fn = _md5_hash # <<<<<<<<<<<<<< + * _default_hash_fn_type = 'md5' + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_md5_hash); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L4_except_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_hash_fn, __pyx_t_6) < (0)) __PYX_ERR(0, 75, __pyx_L4_except_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":76 + * + * _default_hash_fn = _md5_hash + * _default_hash_fn_type = 'md5' # <<<<<<<<<<<<<< + * + * +*/ + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_hash_fn_type, __pyx_mstate_global->__pyx_n_u_md5) < (0)) __PYX_ERR(0, 76, __pyx_L4_except_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L3_exception_handled; + } + goto __pyx_L4_except_error; + + /* "apache_beam/transforms/stats.py":58 + * V = typing.TypeVar('V') + * + * try: # <<<<<<<<<<<<<< + * import mmh3 # pylint: disable=import-error + * +*/ + __pyx_L4_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L3_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_8, __pyx_t_9); + __pyx_L7_try_end:; + } + + /* "apache_beam/transforms/stats.py":79 + * + * + * def _get_default_hash_fn(): # <<<<<<<<<<<<<< + * """Returns either murmurhash or md5 based on installation.""" + * if _default_hash_fn_type == 'md5': +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_5_get_default_hash_fn, 0, __pyx_mstate_global->__pyx_n_u_get_default_hash_fn, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_default_hash_fn, __pyx_t_5) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":88 + * + * + * class ApproximateUnique(object): # <<<<<<<<<<<<<< + * """ + * Hashes input elements and uses those to extrapolate the size of the entire +*/ + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateUnique, __pyx_mstate_global->__pyx_n_u_ApproximateUnique, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_Hashes_input_elements_and_uses); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[1]) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 88, __pyx_L1_error) + } + + /* "apache_beam/transforms/stats.py":95 + * """ + * + * _NO_VALUE_ERR_MSG = 'Either size or error should be set. Received {}.' # <<<<<<<<<<<<<< + * _MULTI_VALUE_ERR_MSG = 'Either size or error should be set. ' \ + * 'Received {size = %s, error = %s}.' +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NO_VALUE_ERR_MSG, __pyx_mstate_global->__pyx_kp_u_Either_size_or_error_should_be_s) < (0)) __PYX_ERR(0, 95, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":96 + * + * _NO_VALUE_ERR_MSG = 'Either size or error should be set. Received {}.' + * _MULTI_VALUE_ERR_MSG = 'Either size or error should be set. ' \ # <<<<<<<<<<<<<< + * 'Received {size = %s, error = %s}.' + * _INPUT_SIZE_ERR_MSG = 'ApproximateUnique needs a size >= 16 for an error ' \ +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MULTI_VALUE_ERR_MSG, __pyx_mstate_global->__pyx_kp_u_Either_size_or_error_should_be_s_2) < (0)) __PYX_ERR(0, 96, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":98 + * _MULTI_VALUE_ERR_MSG = 'Either size or error should be set. ' \ + * 'Received {size = %s, error = %s}.' + * _INPUT_SIZE_ERR_MSG = 'ApproximateUnique needs a size >= 16 for an error ' \ # <<<<<<<<<<<<<< + * '<= 0.50. In general, the estimation error is about ' \ + * '2 / sqrt(sample_size). Received {size = %s}.' +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_INPUT_SIZE_ERR_MSG, __pyx_mstate_global->__pyx_kp_u_ApproximateUnique_needs_a_size_1) < (0)) __PYX_ERR(0, 98, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":101 + * '<= 0.50. In general, the estimation error is about ' \ + * '2 / sqrt(sample_size). Received {size = %s}.' + * _INPUT_ERROR_ERR_MSG = 'ApproximateUnique needs an estimation error ' \ # <<<<<<<<<<<<<< + * 'between 0.01 and 0.50. Received {error = %s}.' + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_INPUT_ERROR_ERR_MSG, __pyx_mstate_global->__pyx_kp_u_ApproximateUnique_needs_an_estim) < (0)) __PYX_ERR(0, 101, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":104 + * 'between 0.01 and 0.50. Received {error = %s}.' + * + * @staticmethod # <<<<<<<<<<<<<< + * def parse_input_params(size=None, error=None): + * """ +*/ + __pyx_t_12 = NULL; + + /* "apache_beam/transforms/stats.py":105 + * + * @staticmethod + * def parse_input_params(size=None, error=None): # <<<<<<<<<<<<<< + * """ + * Check if input params are valid and return sample size. +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_17ApproximateUnique_1parse_input_params, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_parse_input_pa, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_mstate_global->__pyx_tuple[2]); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_parse_input_params, __pyx_t_6) < (0)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":135 + * return ApproximateUnique._get_sample_size_from_est_error(error) + * + * @staticmethod # <<<<<<<<<<<<<< + * def _get_sample_size_from_est_error(est_err): + * """ +*/ + __pyx_t_13 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_17ApproximateUnique_3_get_sample_size_from_est_error, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ApproximateUnique__get_sample_si, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12}; + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_sample_size_from_est_error, __pyx_t_6) < (0)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":146 + * @typehints.with_input_types(T) + * @typehints.with_output_types(int) + * class Globally(PTransform): # <<<<<<<<<<<<<< + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PTransform); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = PyTuple_Pack(1, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_Globally, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_Approximate_Globally_approximat); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (__pyx_t_6 != __pyx_t_12) { + if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 146, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":148 + * class Globally(PTransform): + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_8Globally_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_Globally___ini, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[2]); + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_12) < (0)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":151 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_8Globally_3expand, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_Globally_expan, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_12) < (0)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":144 + * return math.ceil(4.0 / math.pow(est_err, 2.0)) + * + * @typehints.with_input_types(T) # <<<<<<<<<<<<<< + * @typehints.with_output_types(int) + * class Globally(PTransform): +*/ + __pyx_t_15 = NULL; + __pyx_t_17 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_with_input_types); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_18}; + __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + } + + /* "apache_beam/transforms/stats.py":145 + * + * @typehints.with_input_types(T) + * @typehints.with_output_types(int) # <<<<<<<<<<<<<< + * class Globally(PTransform): + * """ Approximate.Globally approximate number of unique values""" +*/ + __pyx_t_18 = NULL; + __pyx_t_20 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_with_output_types); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_20, ((PyObject *)(&PyLong_Type))}; + __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + } + + /* "apache_beam/transforms/stats.py":146 + * @typehints.with_input_types(T) + * @typehints.with_output_types(int) + * class Globally(PTransform): # <<<<<<<<<<<<<< + * """ Approximate.Globally approximate number of unique values""" + * def __init__(self, size=None, error=None): +*/ + __pyx_t_22 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_t_6, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_22}; + __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_19}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_t_12) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":160 + * @typehints.with_input_types(typing.Tuple[K, V]) + * @typehints.with_output_types(typing.Tuple[K, int]) + * class PerKey(PTransform): # <<<<<<<<<<<<<< + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PTransform); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = PyTuple_Pack(1, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_PerKey, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_Approximate_PerKey_approximate); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_6 != __pyx_t_13) { + if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 160, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":162 + * class PerKey(PTransform): + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): # <<<<<<<<<<<<<< + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_PerKey___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_mstate_global->__pyx_tuple[2]); + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_13) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":165 + * self._sample_size = ApproximateUnique.parse_input_params(size, error) + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * coder = coders.registry.get_coder(pcoll) + * return pcoll \ +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_3expand, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUnique_PerKey_expand, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_13) < (0)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":158 + * coder))) + * + * @typehints.with_input_types(typing.Tuple[K, V]) # <<<<<<<<<<<<<< + * @typehints.with_output_types(typing.Tuple[K, int]) + * class PerKey(PTransform): +*/ + __pyx_t_16 = NULL; + __pyx_t_15 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_with_input_types); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_K); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_V); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_21 = PyTuple_Pack(2, __pyx_t_17, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_20 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_t_21); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_20}; + __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + } + + /* "apache_beam/transforms/stats.py":159 + * + * @typehints.with_input_types(typing.Tuple[K, V]) + * @typehints.with_output_types(typing.Tuple[K, int]) # <<<<<<<<<<<<<< + * class PerKey(PTransform): + * """ Approximate.PerKey approximate number of unique values per key""" +*/ + __pyx_t_20 = NULL; + __pyx_t_21 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_with_output_types); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_K); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_24 = PyTuple_Pack(2, __pyx_t_18, ((PyObject *)(&PyLong_Type))); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_t_23, __pyx_t_24); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_t_18}; + __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + } + + /* "apache_beam/transforms/stats.py":160 + * @typehints.with_input_types(typing.Tuple[K, V]) + * @typehints.with_output_types(typing.Tuple[K, int]) + * class PerKey(PTransform): # <<<<<<<<<<<<<< + * """ Approximate.PerKey approximate number of unique values per key""" + * def __init__(self, size=None, error=None): +*/ + __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_t_6, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_17); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_17}; + __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_22}; + __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_t_13) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":88 + * + * + * class ApproximateUnique(object): # <<<<<<<<<<<<<< + * """ + * Hashes input elements and uses those to extrapolate the size of the entire +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ApproximateUnique, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ApproximateUnique, __pyx_t_6) < (0)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":173 + * + * + * class _LargestUnique(object): # <<<<<<<<<<<<<< + * """ + * An object to keep samples and calculate sample hash space. It is an +*/ + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_LargestUnique, __pyx_mstate_global->__pyx_n_u_LargestUnique, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_An_object_to_keep_samples_and_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[4]) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[4]) < 0))) __PYX_ERR(0, 173, __pyx_L1_error) + } + + /* "apache_beam/transforms/stats.py":179 + * """ + * # We use unsigned 64-bit integer hashes. + * _HASH_SPACE_SIZE = 2.0**64 # <<<<<<<<<<<<<< + * + * def __init__(self, sample_size): +*/ + __pyx_t_6 = PyFloat_FromDouble(pow(2.0, 64.0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HASH_SPACE_SIZE, __pyx_t_6) < (0)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":181 + * _HASH_SPACE_SIZE = 2.0**64 + * + * def __init__(self, sample_size): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * self._min_hash = 2.0**64 +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_1__init__, 0, __pyx_mstate_global->__pyx_n_u_LargestUnique___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":187 + * self._sample_set = set() + * + * def add(self, element): # <<<<<<<<<<<<<< + * """ + * :param an element from pcoll. +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_3add, 0, __pyx_mstate_global->__pyx_n_u_LargestUnique_add, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_6) < (0)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":210 + * return True + * + * def get_estimate(self): # <<<<<<<<<<<<<< + * """ + * :return: estimation count of unique values +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_LargestUnique_5get_estimate, 0, __pyx_mstate_global->__pyx_n_u_LargestUnique_get_estimate, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_estimate, __pyx_t_6) < (0)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/transforms/stats.py":173 + * + * + * class _LargestUnique(object): # <<<<<<<<<<<<<< + * """ + * An object to keep samples and calculate sample hash space. It is an +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LargestUnique, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LargestUnique, __pyx_t_6) < (0)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":240 + * + * + * class ApproximateUniqueCombineFn(CombineFn): # <<<<<<<<<<<<<< + * """ + * ApproximateUniqueCombineFn computes an estimate of the number of +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CombineFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_ApproximateUniqueCombineFn_comp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_5 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 240, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":245 + * unique values that were combined. + * """ + * def __init__(self, sample_size, coder): # <<<<<<<<<<<<<< + * self._sample_size = sample_size + * coder = coders.typecoders.registry.verify_deterministic( +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn___ini, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":253 + * self._hash_fn = _get_default_hash_fn() + * + * def create_accumulator(self, *args, **kwargs): # <<<<<<<<<<<<<< + * return _LargestUnique(self._sample_size) + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_3create_accumulator, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn_creat, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_t_4) < (0)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":256 + * return _LargestUnique(self._sample_size) + * + * def add_input(self, accumulator, element, *args, **kwargs): # <<<<<<<<<<<<<< + * try: + * hashed_value = self._hash_fn(self._coder.encode(element)) +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_5add_input, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn_add_i, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_4) < (0)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":266 + * # created an issue https://github.com/apache/beam/issues/19459 to speed up + * # merge process. + * def merge_accumulators(self, accumulators, *args, **kwargs): # <<<<<<<<<<<<<< + * merged_accumulator = self.create_accumulator() + * for accumulator in accumulators: +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_7merge_accumulators, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn_merge, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_merge_accumulators, __pyx_t_4) < (0)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":274 + * return merged_accumulator + * + * @staticmethod # <<<<<<<<<<<<<< + * def extract_output(accumulator): + * return accumulator.get_estimate() +*/ + __pyx_t_14 = NULL; + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_9extract_output, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn_extra, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_12}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_4) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":278 + * return accumulator.get_estimate() + * + * def display_data(self): # <<<<<<<<<<<<<< + * return {'sample_size': self._sample_size} + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_26ApproximateUniqueCombineFn_11display_data, 0, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn_displ, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_display_data_2, __pyx_t_4) < (0)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":240 + * + * + * class ApproximateUniqueCombineFn(CombineFn): # <<<<<<<<<<<<<< + * """ + * ApproximateUniqueCombineFn computes an estimate of the number of +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn, __pyx_t_5, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ApproximateUniqueCombineFn, __pyx_t_4) < (0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":282 + * + * + * class ApproximateQuantiles(object): # <<<<<<<<<<<<<< + * """ + * PTransform for getting the idea of data distribution using approximate N-tile +*/ + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[6]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_PTransform_for_getting_the_idea); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[6]) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[6]) < 0))) __PYX_ERR(0, 282, __pyx_L1_error) + } + + /* "apache_beam/transforms/stats.py":309 + * out: [0, 2, 5, 7, 100] + * """ + * @staticmethod # <<<<<<<<<<<<<< + * def _display_data(num_quantiles, key, reverse, weighted, input_batched): + * return { +*/ + __pyx_t_12 = NULL; + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_20ApproximateQuantiles_1_display_data, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles__display_da, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_14}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_display_data, __pyx_t_4) < (0)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":326 + * typing.Union[T, typing.Sequence[T], Tuple[T, float]]) + * @typehints.with_output_types(List[T]) + * class Globally(PTransform): # <<<<<<<<<<<<<< + * """ + * PTransform takes PCollection and returns a list whose single value is +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PTransform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_Globally, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_PTransform_takes_PCollection_an); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_4 != __pyx_t_14) { + if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 326, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/transforms/stats.py":346 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_8Globally_5__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_Globally_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/transforms/stats.py":359 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombineGlobally( + * ApproximateQuantilesCombineFn.create( +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_8Globally_7expand, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_Globally_ex, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_14) < (0)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/transforms/stats.py":368 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_8Globally_9display_data, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_Globally_di, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); + #endif + if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_display_data_2, __pyx_t_14) < (0)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "apache_beam/transforms/stats.py":323 + * } + * + * @typehints.with_input_types( # <<<<<<<<<<<<<< + * typing.Union[T, typing.Sequence[T], Tuple[T, float]]) + * @typehints.with_output_types(List[T]) +*/ + __pyx_t_19 = NULL; + __pyx_t_16 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_with_input_types); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "apache_beam/transforms/stats.py":324 + * + * @typehints.with_input_types( + * typing.Union[T, typing.Sequence[T], Tuple[T, float]]) # <<<<<<<<<<<<<< + * @typehints.with_output_types(List[T]) + * class Globally(PTransform): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_typing); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_24 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_18); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_23 = PyTuple_Pack(2, __pyx_t_21, ((PyObject *)(&PyFloat_Type))); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_t_23); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = PyTuple_Pack(3, __pyx_t_15, __pyx_t_24, __pyx_t_21); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_20, __pyx_t_23); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_21}; + __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + } + + /* "apache_beam/transforms/stats.py":325 + * @typehints.with_input_types( + * typing.Union[T, typing.Sequence[T], Tuple[T, float]]) + * @typehints.with_output_types(List[T]) # <<<<<<<<<<<<<< + * class Globally(PTransform): + * """ +*/ + __pyx_t_21 = NULL; + __pyx_t_23 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_with_output_types); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_List); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_t_20, __pyx_t_15); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_18}; + __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_24, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + } + + /* "apache_beam/transforms/stats.py":326 + * typing.Union[T, typing.Sequence[T], Tuple[T, float]]) + * @typehints.with_output_types(List[T]) + * class Globally(PTransform): # <<<<<<<<<<<<<< + * """ + * PTransform takes PCollection and returns a list whose single value is +*/ + __pyx_t_24 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_24); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_t_24}; + __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_17}; + __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Globally, __pyx_t_14) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":379 + * typehints.Union[Tuple[K, V], Tuple[K, Tuple[V, float]]]) + * @typehints.with_output_types(Tuple[K, List[V]]) + * class PerKey(PTransform): # <<<<<<<<<<<<<< + * """ + * PTransform takes PCollection of KV and returns a list based on each key +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PTransform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_PerKey, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_PTransform_takes_PCollection_of); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (__pyx_t_4 != __pyx_t_12) { + if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 379, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":400 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_5__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_PerKey___in, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_12) < (0)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":413 + * self._input_batched = input_batched + * + * def expand(self, pcoll): # <<<<<<<<<<<<<< + * return pcoll | CombinePerKey( + * ApproximateQuantilesCombineFn.create( +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_7expand, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_PerKey_expa, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_12) < (0)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":422 + * input_batched=self._input_batched)) + * + * def display_data(self): # <<<<<<<<<<<<<< + * return ApproximateQuantiles._display_data( + * num_quantiles=self._num_quantiles, +*/ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_6PerKey_9display_data, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles_PerKey_disp, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12); + #endif + if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_display_data_2, __pyx_t_12) < (0)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "apache_beam/transforms/stats.py":376 + * input_batched=self._input_batched) + * + * @typehints.with_input_types( # <<<<<<<<<<<<<< + * typehints.Union[Tuple[K, V], Tuple[K, Tuple[V, float]]]) + * @typehints.with_output_types(Tuple[K, List[V]]) +*/ + __pyx_t_22 = NULL; + __pyx_t_19 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_with_input_types); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "apache_beam/transforms/stats.py":377 + * + * @typehints.with_input_types( + * typehints.Union[Tuple[K, V], Tuple[K, Tuple[V, float]]]) # <<<<<<<<<<<<<< + * @typehints.with_output_types(Tuple[K, List[V]]) + * class PerKey(PTransform): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_K); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_V); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_15 = PyTuple_Pack(2, __pyx_t_18, __pyx_t_23); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_K); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_V); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_25 = PyTuple_Pack(2, __pyx_t_20, ((PyObject *)(&PyFloat_Type))); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_25); + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_20 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_t_25); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + __pyx_t_25 = PyTuple_Pack(2, __pyx_t_16, __pyx_t_20); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_25); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_20 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_t_25); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + __pyx_t_25 = PyTuple_Pack(2, __pyx_t_23, __pyx_t_20); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_25); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_20 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_25); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_20}; + __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_24, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + } + + /* "apache_beam/transforms/stats.py":378 + * @typehints.with_input_types( + * typehints.Union[Tuple[K, V], Tuple[K, Tuple[V, float]]]) + * @typehints.with_output_types(Tuple[K, List[V]]) # <<<<<<<<<<<<<< + * class PerKey(PTransform): + * """ +*/ + __pyx_t_20 = NULL; + __pyx_t_25 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_typehints); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_with_output_types); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_K); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_List); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_V); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_26 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_18); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_26); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = PyTuple_Pack(2, __pyx_t_15, __pyx_t_26); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; + __pyx_t_26 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_18); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_26); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_25, __pyx_t_26}; + __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_23, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; + __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + } + + /* "apache_beam/transforms/stats.py":379 + * typehints.Union[Tuple[K, V], Tuple[K, Tuple[V, float]]]) + * @typehints.with_output_types(Tuple[K, List[V]]) + * class PerKey(PTransform): # <<<<<<<<<<<<<< + * """ + * PTransform takes PCollection of KV and returns a list based on each key +*/ + __pyx_t_23 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_23); + #endif + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_23}; + __pyx_t_24 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_t_24}; + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PerKey, __pyx_t_12) < (0)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/transforms/stats.py":282 + * + * + * class ApproximateQuantiles(object): # <<<<<<<<<<<<<< + * """ + * PTransform for getting the idea of data distribution using approximate N-tile +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles, __pyx_t_5, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ApproximateQuantiles, __pyx_t_4) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":454 + * self.less_than = lambda a, b: key(a) < key(b) + * + * def get_argsort_key(self, elements): # <<<<<<<<<<<<<< + * # type: (List) -> Callable[[int], Any] + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_3get_argsort_key, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileSpec_get_argsort_key, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec, __pyx_mstate_global->__pyx_n_u_get_argsort_key, __pyx_t_5) < (0)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":463 + * return lambda idx: self.key(elements[idx]) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_13_QuantileSpec_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileSpec___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileSpec, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_5) < (0)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_15_QuantileBuffer_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileBuffer___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__QuantileBuffer, (type(self), 0x34dcb70, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__QuantileBuffer__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_15_QuantileBuffer_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileBuffer___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileBuffer, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":530 + * + * # This is needed for pickling to work when Cythonization is enabled. + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_5) < (0)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":539 + * self.spec)) + * + * def is_empty(self): # <<<<<<<<<<<<<< + * # type: () -> bool + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_5is_empty, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState_is_empty, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_is_empty, __pyx_t_5) < (0)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":545 + * return not self.unbuffered_elements and not self.buffers + * + * def _add_unbuffered(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_7_add_unbuffered, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState__add_unbuffered, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_add_unbuffered, __pyx_t_5) < (0)) __PYX_ERR(0, 545, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":571 + * self.collapse_if_needed(offset_fn) + * + * def _add_unbuffered_weighted(self, elements, offset_fn): # <<<<<<<<<<<<<< + * # type: (List, Any) -> None + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_9_add_unbuffered_weighted, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState__add_unbuffered_w, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_add_unbuffered_weighted, __pyx_t_5) < (0)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":609 + * self.collapse_if_needed(offset_fn) + * + * def finalize(self): # <<<<<<<<<<<<<< + * # type: () -> None + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_11finalize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState_finalize, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_finalize, __pyx_t_5) < (0)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":641 + * self.unbuffered_elements = [] + * + * def collapse_if_needed(self, offset_fn): # <<<<<<<<<<<<<< + * # type: (Any) -> None + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_14_QuantileState_13collapse_if_needed, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_QuantileState_collapse_if_neede, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_10transforms_5stats__QuantileState, __pyx_mstate_global->__pyx_n_u_collapse_if_needed, __pyx_t_5) < (0)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":757 + * + * + * class ApproximateQuantilesCombineFn(CombineFn): # <<<<<<<<<<<<<< + * """ + * This combiner gives an idea of the distribution of a collection of values +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CombineFn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_kp_u_This_combiner_gives_an_idea_of); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 757, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":807 + * # For alternating between biasing up and down in the above even weight + * # collapse operation. + * _offset_jitter = 0 # <<<<<<<<<<<<<< + * + * # The cost (in time and space) to compute quantiles to a given accuracy is a +*/ + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_offset_jitter, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 807, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":815 + * # non-optimal. The impact is logarithmic with respect to this value, so this + * # default should be fine for most uses. + * _MAX_NUM_ELEMENTS = 1e9 # <<<<<<<<<<<<<< + * _qs = None # type: _QuantileState + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MAX_NUM_ELEMENTS, __pyx_mstate_global->__pyx_float_1e9) < (0)) __PYX_ERR(0, 815, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":816 + * # default should be fine for most uses. + * _MAX_NUM_ELEMENTS = 1e9 + * _qs = None # type: _QuantileState # <<<<<<<<<<<<<< + * + * def __init__( +*/ + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_qs, Py_None) < (0)) __PYX_ERR(0, 816, __pyx_L1_error) + + /* "apache_beam/transforms/stats.py":818 + * _qs = None # type: _QuantileState + * + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, # type: int +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[7]); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":833 + * setattr(self, 'add_input', self._add_inputs) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return ( + * self.__class__, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_3__reduce__, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_3, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/transforms/stats.py":845 + * self._input_batched)) + * + * @classmethod # <<<<<<<<<<<<<< + * def create( + * cls, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_5create, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_cr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[8]); + __pyx_t_13 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_13) < (0)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":906 + * input_batched=input_batched) + * + * def _offset(self, new_weight): # <<<<<<<<<<<<<< + * # type: (int) -> float + * +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_7_offset, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn__o, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_offset, __pyx_t_13) < (0)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":921 + * # TODO(https://github.com/apache/beam/issues/19737): Signature incompatible + * # with supertype + * def create_accumulator(self): # <<<<<<<<<<<<<< + * # type: () -> _QuantileState + * self._qs = _QuantileState( +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_9create_accumulator, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_cr_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_t_13) < (0)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":930 + * return self._qs + * + * def add_input(self, quantile_state, element): # <<<<<<<<<<<<<< + * """ + * Add a new element to the collection being summarized by quantile state. +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_11add_input, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_ad, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_add_input, __pyx_t_13) < (0)) __PYX_ERR(0, 930, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":937 + * return quantile_state + * + * def _add_inputs(self, quantile_state, elements): # <<<<<<<<<<<<<< + * # type: (_QuantileState, List) -> _QuantileState + * +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_13_add_inputs, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn__a, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_add_inputs, __pyx_t_13) < (0)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":949 + * return quantile_state + * + * def merge_accumulators(self, accumulators): # <<<<<<<<<<<<<< + * """Merges all the accumulators (quantile state) as one.""" + * qs = self.create_accumulator() +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_15merge_accumulators, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_me, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_merge_accumulators, __pyx_t_13) < (0)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":967 + * return qs + * + * def extract_output(self, accumulator): # <<<<<<<<<<<<<< + * """ + * Outputs num_quantiles elements consisting of the minimum, maximum and +*/ + __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_29ApproximateQuantilesCombineFn_17extract_output, 0, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn_ex, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_extract_output, __pyx_t_13) < (0)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "apache_beam/transforms/stats.py":757 + * + * + * class ApproximateQuantilesCombineFn(CombineFn): # <<<<<<<<<<<<<< + * """ + * This combiner gives an idea of the distribution of a collection of values +*/ + __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ApproximateQuantilesCombineFn, __pyx_t_13) < (0)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__QuantileBuffer(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x34dcb70, 0x7f9f705, 0x9fb38c7, b'_iter, elements, level, max_val, min_val, weighted, weights') +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_10transforms_5stats_7__pyx_unpickle__QuantileBuffer, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__QuantileBuffer, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_transforms_stats, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__QuantileBuffer, __pyx_t_5) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/transforms/stats.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_XDECREF(__pyx_t_21); + __Pyx_XDECREF(__pyx_t_22); + __Pyx_XDECREF(__pyx_t_23); + __Pyx_XDECREF(__pyx_t_24); + __Pyx_XDECREF(__pyx_t_25); + __Pyx_XDECREF(__pyx_t_26); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.transforms.stats", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.transforms.stats"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 672, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/transforms/stats.py":73 + * # hexadecimal digits) to 16 digits and convert to int to get the 64-bit + * # integer fingerprint. + * return int(hashlib.md5(value).hexdigest()[:16], 16) # <<<<<<<<<<<<<< + * + * _default_hash_fn = _md5_hash +*/ + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_16, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); + + /* "apache_beam/transforms/stats.py":88 + * + * + * class ApproximateUnique(object): # <<<<<<<<<<<<<< + * """ + * Hashes input elements and uses those to extrapolate the size of the entire +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "apache_beam/transforms/stats.py":104 + * 'between 0.01 and 0.50. Received {error = %s}.' + * + * @staticmethod # <<<<<<<<<<<<<< + * def parse_input_params(size=None, error=None): + * """ +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "apache_beam/transforms/stats.py":173 + * + * + * class _LargestUnique(object): # <<<<<<<<<<<<<< + * """ + * An object to keep samples and calculate sample hash space. It is an +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + + /* "apache_beam/transforms/stats.py":282 + * + * + * class ApproximateQuantiles(object): # <<<<<<<<<<<<<< + * """ + * PTransform for getting the idea of data distribution using approximate N-tile +*/ + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); + + /* "apache_beam/transforms/stats.py":346 + * efficiently. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * num_quantiles, +*/ + __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(4, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); + + /* "apache_beam/transforms/stats.py":845 + * self._input_batched)) + * + * @classmethod # <<<<<<<<<<<<<< + * def create( + * cls, +*/ + __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(6, Py_None, Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<9; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 12; } index[] = {{1},{110},{106},{145},{89},{57},{63},{87},{48},{69},{191},{16},{11},{11},{179},{678},{1018},{1053},{14},{19},{21},{2222},{1},{8},{31},{7},{6},{2},{9},{14},{3},{20},{29},{38},{40},{41},{37},{39},{36},{48},{44},{48},{29},{38},{42},{36},{27},{36},{40},{34},{34},{17},{26},{35},{36},{45},{39},{41},{45},{26},{35},{33},{24},{33},{31},{49},{36},{8},{9},{15},{13},{23},{23},{15},{8},{16},{20},{19},{1},{14},{23},{18},{27},{4},{17},{20},{17},{10},{6},{20},{15},{33},{35},{13},{24},{29},{14},{25},{30},{39},{33},{23},{23},{8},{1},{5},{7},{5},{1},{1},{1},{1},{11},{12},{3},{9},{11},{15},{14},{24},{7},{9},{11},{27},{30},{33},{28},{6},{4},{18},{1},{11},{11},{7},{4},{5},{9},{17},{18},{3},{5},{6},{6},{18},{15},{6},{18},{16},{21},{8},{5},{13},{12},{7},{1},{7},{8},{6},{7},{5},{3},{7},{6},{6},{14},{8},{13},{8},{15},{33},{9},{20},{12},{31},{11},{12},{6},{8},{12},{7},{7},{7},{8},{5},{9},{1},{3},{8},{26},{13},{14},{13},{8},{5},{9},{1},{3},{4},{6},{5},{8},{5},{5},{7},{8},{4},{16},{7},{3},{9},{18},{18},{13},{9},{7},{4},{10},{10},{15},{8},{7},{10},{4},{11},{13},{14},{6},{7},{6},{9},{14},{18},{5},{3},{3},{11},{12},{14},{12},{11},{10},{30},{14},{3},{2},{12},{14},{9},{10},{17},{13},{8},{6},{6},{7},{8},{5},{12},{11},{12},{11},{17},{4},{4},{12},{10},{12},{19},{6},{4},{4},{6},{4},{5},{5},{12},{4},{3},{4},{8},{12},{10},{9},{6},{19},{18},{6},{12},{5},{6},{20},{7},{8},{9},{7},{16},{17},{1},{3},{299},{42},{179},{27},{197},{29},{22},{27},{25},{35},{30},{53},{55},{55},{55},{44},{44},{47},{163},{8},{60},{12},{16},{46},{183},{11},{40},{122},{11},{37},{14},{24},{59},{202},{13},{71},{104},{25},{11},{57},{121},{108},{146},{40},{328},{27},{225}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (5364 bytes) */ +const char* const cstring = "(\265/\375`\2154U\247\000\252\263\320%I\320\356X\007\000_\274\002\366\322+\375\241\307\340\304L\341\0233\205O\314\024>\261\355\223D~\020\021\242\273PA\200>\334\226j\031}\022\270\331\305\344\221\027k\242\211F\230\242\027\242`rFD}\351\213\025k\262-\254A\262,\025\002+\002g\002\030\366\267c\2617Iqw\021\277M\327\036\334E\244\371\203;\316\365s\375\341\225\221\0347\236}{\205\365\354\323\217y\007\216di\326\312S\367\221\374J\243\337/\334\365\347\335*\024A\223|\223\203/\232$\307\034\345\347\224aS\207[\\}\010\323\246\326\"N\tuI\252\360L\027\23633\\f\266\272\217\2075\2541\037\315\263\177\030\2227?\230?\221\356\252\026\274R\001\341\r\301\262\314\252\353\272?\315\027M\r\343\025\010\274S`V\336\303\217[<\t\033\3076\336\252!\020--\336\003\030\274\202q\301\253\226!<\003C\223W))^\213\247z\231*\3043x\306(\347\324\255\310\036\247t_\177<\376\267\342\246>i\270\223u\257\nw_\361\321]\203\372\301\335\373\313D>j\363\365\303C]\301D\311\3448j\224\221\353\362$m8\306\277\264u<\356\036\356\023\306u\370\301N\216\371\233,\010\254\225\237\234\037<~\270k\363a;\334x\264\335|'}f\262\375\033\270\371E\357\002\177\366um\263\203\371\016\010\333f\347\033\264\205\317\307\007\361\233\332\224\215[<9\207\341\323\233\233,\265\331\215\3769\311\317/\307m\001\257N\364\347x\306\315\235\323\365\361\305\335\271\216\341\227\231(\342\316\315S\3341\334QF0<\311\033\233\371\345c0\377Gc[\030j\030\031\352t^\313\370_\353\017\033\273\023\374\004\323\224\300\340\027\355\377\336\205\273\224\254\352&\215c\026\354\202\373I\302\310\275\n\265\371\343\313\360\330\002\323\265`\032\t\246i\2221\034\343a\232\032\374$6\307\340\177\007\276\3715\3345\3773\324E\370|\230x\216\370g\275\363\307\375,\307\n7\177\322\366($n#\322,\313\221\334\375\033\317\030\376q\303D\362\303\032\307Hl\222\342\371}z\343\276\203\273\377t\311\361\214\353\031\376\256\303\363\013\365\207\301Qc\376a)j\216\313\177\"Lv\334\277\037\001#\361\330\302\370\324\005\265\177Q\217\277\315L\232\371e&\352\376`\206\001\305<\023s\226\225\236\214\014\303/\3720\374\032\021\021\017I\262g""\236\215\300-\333\240\321\317h3~\226di\213\355R\377\014\266CVL\256\321 L\3245<\324\037\031J\350\3063f\364#\031n^\376\370\237\363G\2029\217\261\234\363\007\323\035\347 \371\361\360#\3724\354s\316[\317\276p\377\307a\234\334\337h\343\032\034\277,\337\354x\326YE\303H\232\245\355\365z\235\264\017\262\365R\374\3147\370?\346X\251\3073\007}69\366.\237\215cd\373\3119\203O\026\342ii\310;/\036\241\236\034\364\362\311\351\311\341\311\311=B>\231C\253g\363\360d\014:A=\331\225\301\345\312\311/\241\037\237\235\234\343a'(\347\334\264~\202\262\205\240\226\205,~\337\301\301\321p\303\305\374%\377\230|\205\332<\273\036E\210\300\344\010>\210O\037\206\233\354\346\327>\366\346N\212J\357\"\014\226Fze\203/\232\337W\342w\361\024\305U\212\252\237\344\027m\0316\371>\3013\377\031\275\313\374\357]}\304@\\CA\000nR7\232{\343\252\264\251\366\242mi\255%\233\334\013\021\312&-!\261\260\325f=\221\242n\244\033\005\374\342\000\257w\003p\243\200ZMUD\375LT$g\312\245n\334\235\240\362\252\214\274$u\004\372a\302\001}\206JK=\240!\350F\006\016(\225y\r\010\244\037\372\261\201\243\335Dn\237[\243zuz\001\355\260\200\236\nV\264V\223\221\001\247\024D?\324\222j\340\244`My\274\021fp\3325qQ\256\314\202W\253\th$\340\270\236\033!\365\222\326\005)\312\003GC\003x\220X\332\352A\335Ic\350GFj\005\341""\025\370\300\211\244&)\310\007\216\212\340\243\266\242\234p\2555\247.\251\206\326\021-]\321\351*\225\252Z*\202\323{\332\260\310X\321:\352\310ax\255\006V\266\276\254\257\326R\315J\035\001\261;]e\251 \352\353\374(\2658l\211U\rx;\312j\265\247\013K\262\306\250)\025Lkh\007\006\312\204#\245\002\320\016\235\212\230^n0\327\306-\271\260\026\250\305hal\227\340m\251g\312JS7\270\326\205Fm\320\022\326\305rX]\326\256\272:\003\027\352BB70,N+H8p\244\025V!-\245\0024\373\302\002`U\005^\003\030\026\022Vhd\340L\032\026&\024\272q\221\333H!\340\264\372\242\036\300x1.r\244\243\326\352\255 +\211\324\225\356\240(u\204\000\216\346\212\270_k\323\262L\336\322:\224\266\322\020\023\317\241\\\263}\200\362\262V\000k\220\352\242\212\350G\t\207jM\226e\301\313\242!\251\240\335\214\\\014mI[\"G[1\250\236\n@5`\302\241T\026T\032\203\366#\215t@\211#\025\240\332\320\000%\034\020\352\221\201\363\324\224\264\304\221\t\303\242cE\352\310C9J9\232\252U\023\225\304\204K\251%\320\023\364\224\201\243\245\001PS\tGj[\022\274!\352H\t\227:\312\026\331\"E\005\303\344\026/{^>O\022\304\253\336U*8\203\355\247\334$\214F\316\237\237`\331\307=\013u's\356\345\367o\203?\3126\317\261\3609\370\317\315\334\365\177\021)\276i\223\031}\2309\215\323r/\372\220\350\333\345x\212''\372\276\362\315\222,\313\276G\34414u\201v;\264!\246\327\312A-\362\326\337\030\271\265V/\310\013\202\222K\265\017\330^baP$0\301\213\241\342\000\261\030,\316\312\361v\016)\200\024\306\204\272\345\270\022 X\200\360\322\332\007X\323n:0.)\231\020\013\2778\251\233\220\033\342\232%-\310\246POlN\036\353\340\300\253i9\030\207\265\265nP\023\264\232\235\255@\253LU@R\001!\315\240\\\322\001\034 zH+M\325h\251\026\322s5Y/^h\013\035`\224\013\271\231\2546\304'@\210\343\226\363\362\366\025\222\367B\205\001\2714*\357\005\333\3054LHHiP\212\024\312\033\254\030\311x3P\251\001\016\215\324\204\232\\\226\033\341\344u\240\346\210\330\316\300;\204zth\330\330I\017\254\330\343\rr\275>7\034\227\027\325z&J8\027\320Kt\213\340r\264-\370\245\251\013J\336*\246\021nE\256vk\034\274\016H^\222\324Z""\"-Pz\365\232\261b\001/\312\215i9\2745\003\255\025iI\254:\265N\350\300\245\334\323\n\202\367L\003\250)\264\233\341.X\240\216\254!k\217\n\230\033\211\333\303\236P7NjMN\253\250\3350\270\033\332\026\034\355\342\303\305\320\320\305\353u\201\001\303\205\216\316\005\316\005\016)\205\205\305\n\024\265\2676\276\343\210w\204\354\225\301^\330\320;\344zA\025/*\376Vs=\264!\355\307\022`Q\326\007\246\034--\220\202\344\244\033\320\242u\345\245:\340\367~\371\315\257\367\365\363\216\270\231\334N.Nka\310\300\007\351\310kAZ\217\207\244S\2404$E\311F\010dx\355\213\235A\255,\351\000\217M\261\252\025\365\001M\275\352\205\032\224z\264\332\030\013\304\256\034\241T\274n\016\\\020l\213\225YIr@$\326\264\302\236\322\211\315\036CT\323\\\016\254@\010\032\204\2101\212\210L \023\215\210$)H2l\006\277\030\001s#^oA.\225/\314\217\353u\243Jx\364-\246\235\232\356\236Y\322\332\034\311\311|\3304\214\377\230\010\260\321z\021\240\210Q.\003y\030$\240.K-\331_\360\r;FA\300x\22432_\316>N\001\251\264\240\221\350\323Aw\202\270\236\275e\200\276\204i\210\035\314j(;\3631\333\333S^P\365kY6%u?\016w\2041-w\"\266a\037\230\207l\277S\245\2115\336\342t(Q\260\034\366\345\303yHg\332+~x\315\205\000\323\301\335\371G\222\240\241\256\002?\000\020\316 \3047\341\335\225\214\306\027fbi?\221:\340q\240\t\315\370\264z\231%\036n\336~V\177\3428LV\353,\222!\007\304F\212\201\255\223Xv\203;)\336%\\n\202\337\376\035\364D\306\350\277\235\327\035\371t\256\251\014;\2068\003/\270u\037Q\246\006\006{r\370\246s,n\230\363y\233iC\222\037\375\2409\203\006^\032o\233\251\321D""\253\205\016\021vL\367\264.\366\220\310\244\000\230\304\231\r6\326|%i|\305@G\242\n\341\017J\r\035A0\017\246\300[\213w\313\325\240\022\256y/\243\222L\014\351\234\251U\033+ \r\340;|\222+1'?\205\033;\360}z\317v\n2W\300S\t\343r\322\255p\212Iq1\271\251Nyp\326-\301IZ\000\371\304n\031U\366\330\260\3349\235\314\223F\301 \rb\351_C\003\001$c\303\366|\255u\240\223\243km3\241E\254\366\0031%\326l\211\275\\;\225\260l\305\006\001\t*\214\207\370\013\037\033\260\026\343j\204\246F\2051J\373os\213m7V$\003Z*\212\006Qd:\267\251\200\344\rKq\t<\302+$\363\243w\347n\334\261I\242\026\251\225iU\275\302x\230\266\207\240k+\201r\004z\221>\315\031\375\217\200\330\021\267I0\321\353(\213\205|2N\320\352\003\200B\263g\221\311\334\222\220\251,9So\233 \340\235\016jX\323\230U\246\002\211\344<\254\315\207\003~M\"\246\342\037lp\367\013\035\001\373P(0\034ZZ\250\333H\371Jz\247\342\216\230\006{\340\343n\022\300(+\336\"1F\364>R\002\376!T\271L-\345C\302viD\356\032\205\225-\220\343#\202\264\345\315\265#\013(\024\rgY\2145\005\244\211`\367W \262E\026l\335cp@\022W(\331\365zl\005\033^h\344\215\347N\005\273\034\210\224\034\216\243\371\310G\345k\341\203\036H#2U\3452\232D\203Y\001\246\\\214(\033\242/\221\177e\320l\036;lb \235\320\246\234o2#:\364%\010\211\247\240A\212\022\244\216/g\034Ab\001\004c\2009td\375\033\273\360\373,1r$\323W\317\356\022!\232\026\267\312\256\255\2631Z\326F\314\016\365;p\205\346@Q\\\243\370@[\016\\\242Q\005\363_\252\342\226\232\034$\363Y\024P\220\215P\264\3557Ag\373\337\211\277,]\332\004?\"H\247\237|1\351.\215\313\017\270\262\342\251`\321-\260\005\356\353\333\356\230\207\231y\246\221\334 \037\352\353P\006\237x{\225dy\223\031\320\256\001%O\203AK\237\3774\230k\357\272\n\212i\337\013\244\024rt`_\340\362\3261\"P\234oZ\251.\262\274\032\203O\300s\243\323<\340\265\3129\n\314\324\323A\213\023\3270\345k\377\330\344\251\010j\340\n\250\013c\231\367*\356\230\210\017\021\305\014\267\361\020\373P\234\265\177\341\325d\332V\332i\212\234%\303\222\373\007Z\023\025\333S g\236\341\003\367\205\241-\310\r\317\335\231l""\005n\343\220\344\313C0\217\025*\2020\230\221\004\370\r\262\367\003t@M^\375f\274\261\374\223k\r\315EK\371~9t,=\227\020\353i\007P\034#j\205_\365\3428&/.\317\345\361\271vs\353\237\264\311\270W\010\340\326\014\017\r\221o`\356\021<\363m\344\327\274*\267\376\253\325\275\250A\315\303\206b.\336\243:\227\220]\013\225\265\371\224\321\301\017\322\346\357\3001v\336\326j\320\\\226mFC\335M\237Kg\215`n.\233\223\205\014(q!\304\023\202W\350\010\354\321\275\247_\305\367\217o\010MKr\"(\026\006s\270#m\276\265\363\351\267+\250\264u\212i\317L2H\273\326\232\010\302\034\\#\377(\023\027\312\246\370D\036r\206\304~\250\323\315\323\002aE\321\300hJ\026\221\200%\307\210]\037U\326~\244\367\247i\"\207&\0169J@d\004\021\371\177\274\rq\022O\252\256\237V[\214y\226\356\022\352\213\317\200%\364\007\307\"\362\336\330\364\3705\235\306\004i\t\212\243\340\212 \210v\006h\340q9\375\226+\000\373\036\007$\264\334-\034f\023\022\361\214\236\035n\"\210\r\211E\346\344\304\034\270\350\324\225\370\306\236\314\2300r\233z#\226\235\010\023-a1s\232\212!\212\215[\254\257\032E\3628h\177A\213\277g\233Q\243\302+\344V\031eM\227d<\365%\243\2170\013\022\265\003\004\257H)\341\361\001a\350\212\035\271D\005\257}\264\373\001\301\034\377@5\236\312\201\326j\257\222W;\322\243\211\261n\351i\262j\3012\357\303\247\374\337_=\"~\317S\006kd\373\345\211\347v\230W\361 \347\222\256H\020\307\243wb?\212\301-\370\370\330\\\223\345\362`\322\357\310\275\006\325<\007)\345u[\\)X;\242Z\337""\254\346\023{\010\334eH\t\033JXI`\022)\247\376\373\002R\017o\014\342m\035\234N\273X\035\332\263@\271\373u\374\200;\017r\361\227\260\366N\250q\034\321\340\331\256\004O\270\210'-\334W\361\315%\300\271\235e\327X\330\016G\027\270\235\"\"\337\327\023\036nXmJ\n\366\306Z\3655\263<\346\321c\320b\203V]\003\372(#l\204\232\221v)|2p\372\340\343\245\231\350\273}\024\336Rs\264\255\371\330\357\230d\212\376$\200\013\214%L\207v\346\260z\005\233\302-\263@Sr\026(\325\020\0045-\270\335z\0169n\203\203\341\266\006\247\211\3079p\211eC>\202\357\375\tZ\330y\013E\310>\334\037\037\361\372\324c\007\333\353\372s\211]\220\341\031\213\311\237\032Z\251\020\320$\362\257\331\"\202\260\010\024\310W~\232\242\355\352\206lZ4\367\262\315\226\r<\010\256u\367\332\020\265\224\265\314_\214\203Uuv\\.\265Li\336}K\322?\177E\013\370\362\216\365\033\227\216@\367\021\001&\025\205L\227F\023\333\215\200\234\307\300L\212\211\243_V\213\007\230\261\355Qio^;\315\022\230\361\277\376\220\346\260\261\262\201qI2\n\244\364\241\342\202/\220\243\321\t\271w\317\016gA\252\201L\037\002\2345\200\356\353&\360\245\203\206\032i\360\030O\0107g=\214+\026\027p3tVO\302\277\324\216\020\201z\204\344\322\217\360\277\216\007Mp\\\205\021/\000\325\307s\223\":g\036\021l\232\341-\031U\347\274\231\207h\230ED| \356\240\221{\027\361b\361\033\221\027i%-\tm\361\037\273\274\270l1\205\251\355\227\\\363u\316\322\237\305\226*6\032\262\351\202@\201\205\215\024'q\250\003\325\214\3122x<\236A\206J*\035\343\230\321X\007x\353\247\375\241\344\351v[\352\253\034\205\227\322\304P\014HA \302f\305\312\343=\000nE\020I\322H\263\201\344Z\002\"\200\367\r\000\030\202\352\226\016\376\034\3104]\014F\004\023J=z#\302o\206\315\346X\331\2207\264`\373\004&\252\026\261\364\275\203\273\240*\266s\222\000`\027\277X\344\200$\345\003A\370X\205S\264T\202-\025\337\005\361\250\027\231\025\336\216\374\031\374\261\201+&F\207\245\362W\272\036]a\017\320/dM\202\240\363p\353'2\033\255S\365\230\330\212\343v\244\332Gb|sVc\3324s7\020Q,\344\302=\353c\360+\001\036=,\025\034\237\247\000\200z\311\270\003_/\360k\354tRD\2402\252\331\217}\365M\367\026\005I.d1)\004\315\221z/301\312q\211\262\351\223#w\224\331\324b\3540\302\252\302\336\201\303\245\013\236\214\2142\323;Vq\017\215t\314\264\261+5\277\024\307{\013iqg\234\350I\352\021%#S\212JK\010\niS%\301\332$\222\270bI4\201\034\303\022\355\352\361\376\270x-;E`\212\202\355\354\355\373\003+N\321\350\322\376\346\310\200\376\326$\340x\030\367=2x\025\265\2063\207\335\377/\246\307,\264\272%\233U*\341\230\371\275k?w\345\365e\233\013\260\344\335\236\243dN\265\320z\004\342Ao\242rW\267\006\360\235$*\251F\n\227\227\220\265\364\336\213\207c2\025H\022\302\022e\324\200\357\014]\351\372\322\333\000\302\255\326\036\256a\300\352\271\345q\362\010\274\"5\233\363.\213B!)\022\306\330\215\005\207\030\233\025\212w:G\327\3734\306\313\346Z_\235h\t\006\202\204\370V(\301\314\010{eTd\355C`\342\244l|U\221&\366\304\212\303\r2\261\360\263\204\205e\373|\031\320\360xb@\276\361\206\036\303\323\033Kf:\355k\036\230Nd\326\342\333d\005h\250\247\213(\371z3\236\016\246\205\227\006\267\203\212\3634I\377\303-\241\363\231\004\314\306\032\351\241\022\264L\034C\236\222 \221\242\224\231Rh\254\320C0\317\014\320(dq\235\033$|\3062\027\305w\273\260|\242\216Am\033]<\302\327!\207\016;:\306b\201BI\306Pr\201z\301<\265\340\355\232\351qC2W\331M\351\214m\322W\342\240\206lc\215\002\371\223\322\035\235\354\233\nI\305\203n\024\242\231vI\312[\305*)\255\01404\233l\254\352\030)\322K*\205\345\304;bRw\024\224\215U \325\274\014$_\005\346\006y+*\332\245\271\024\3300\266\225\004\300\245$K-\2522f\001\327\354\t\306\004\267\025\007X+QTE\260\033\020\014\310\")?\226Q2\014\"\237\024\313Xh\265\240\003\237\253\244\324\304\324\316\363\344\2456\005\023\"\016fj\3142\302RcA{\207\260\267\2235\252\265Z0\375\332\010\033\033Q\204i \224\305\356\027s\227\235RN\024\216\336g\364}#\241\3203\226\310q\247\027c\237E\240r\016:\210|\004\"\030\206\203\034`\341)TU\212\252\014\207\223\230\030\202\354h7p\360\304>\366|EX\327hx\2060\246H r\371y}w\007)\336\316=R/\235\265\267*\316\373\226\252""\327\035\023\200\273\030\264\301\216\350\305e?a\315\365\252A\020o\222\334^L@\341\026\021\007\026!\304@f\240@\201^\303\371`\236\317\314\225z\370\252X\225\371\272\207\246\376\200\362\026<\254|\237A\267\356\357\032\23166\306\321[\2154i\313Ze\250\275\252\252\032\346Zh\r\270v\013\027\230\223j\304m\262\370\203\257\243\347\3677/\311\374\214\357\277^\370z\017\337\344\027\320|!\346\014\346\306\035,:B\204-\267~\357\343\027{?\222/l.\300\375\352/A\366\254\2117\330\246\326\263Z\336\253/\007\303\315\270k\224\355\212\021\334 \200\037\227\302\256\rD\320\032\353v\205U\022\241\345ERa\365\224\036\203{\372QH\272\345\307\275\245\323y2D\224\260\372\036\367\n\235\342b\304\270\271G\365s\224\326*\021q\346\301\3079\217\220s,\357\276\265:\275J\323\177u\327]:\226\261\264\207\r\336\217h\347\366tK.\371\007\367\355&\033\272\376\203\213\317\351k\325\357\256\201MLs9A\222<\333\026\302\020\205\246g\347\360`\340\355\331\213\201\226+\220\303y\200v(\271\206\003@b\3425\020vZ\020\032\357\251\236\214\254`\326\004q\005ed\355\217g\336\261\022\331\214\315\010q\026\265\302\013\314@\310\303\022\261\256\006F\374\007\030g\0049\205\260\214Q\013\204\363Gy\2525\020\203\267\317\000+\215HOy\342gr\353\314@u\246L\020\357\245(\253,rD\356W\024\307\013\377\244\335\320,!\260lcm\266pp\346\3108\302\205\0253\375\237\322d\345\221\220]\242\245;\366p\357u\365z?\307H\336\2771\267\033\374\247\360H4\261o\364\272}\226\\\324\002_>{7\225\322u\215c\356\354\210\307\251j]\201\217\026s\\`\363\240\331\262\037\277\306r`\031\214\316\276\207O\263\313\3316\004\316\030\234\260\267\017\234\364NJ\323^\242\300dQ\000\337$\307!!\334.\014\360\031\n\026\006J\0002\004J\020\002F\000b\272\352*&\256\230\222%~0\200\225\300\216\377\036\355\253i\325B\201\324QQ\326\t\305a\221\325E;\016\0347\243\023\334<*\215\203u.\231\205\027M\341\317-Wb\355\200\251EJ\030m\361;\234g\355\215\230\240\356\007\313\007\013(\342\261F+\223.\255\3256\342\363\263D\034\031\206\021\344\356}k\177//\253\336\344(\266\315I\316\330L\342\367\355Pw\214A\303\370\361\220\216F\3126\362""\304\366\200\225\3321\274\247\034\207\203\020\005g*\372\264\324\265+*6p\302(\244\366Co\305\312p\007\333\274\233\316\035\257\3535\366\231\223\311F\232\353\353\363\366\334\221\230\\\324]\301\023\202\004\247\340\233s\342\234\230\217,\301w\\\233\270\247\267\215\231\216\315u\2216\234\233\305\271\037`\335\246<\330\n\254\315\215\024\343\317{a\177\276\177\227a\253\004`\303\347q\001\026 \274\241\002\027\364[hto\025\225\265\3622\224\024\307.\034O\267eA\231pCP^_\204\245s\365\331{?O[\005@\320 \243\214\333\t\206V\223b\215\r\243\255\326\254\261\255\253\006V\202\275\t\205\032\317lU&\323oc\033\016KF\332\030\223\261\027\242DD5\306\367y;\333\271oi6r\262X\014\224\224\005~\267d\232\016\256\306\220Z\034\254X\317\325>\211\310=I\301\034\331,\357?\315\303Y\333\306\327'$xY\263&\t\347-9vV\256\222\310\3710\025\340\277\321\351\\\177w\244\2174cr\016\013\005\252G[#\0335p02KDA.\357\325\342\364\006@\001~\215\312\347w\325nZ\302P\212}\375\206\007\030\245\254\321\0012B\370\203\237\263\225T\"\246\364\215\027&\344\217m\257]\262E\275\255\265\220\314\305\363\263\034\235&a\247\004c\235\335\330\327&\245@\205\005D\252\277V\343E\251}#,\"\260\216\215Q@\3407\254\007\207\340\370`\203\340\372\207\257\343\225\nRU\244\311\224+ZD\252\3066V\000\251O\267\307\275\355\241B\351I\347\346\3416)\245D\034QI\240\224\217z$\t\\\275\360eU\303\025\237/m\270\322\241\216n1\007\263h\266\352m6|\313\214\372\256\034\315\203\250\363\007,\263B\331\223\215y.rO\034\267P,\355\314\203Ar\r\262\240\031\031\000q\213}\261/\2056\206P\337\205\350\345q\226\372\316\3731\245\271T\225kG$5/\r\241\033\351\342\236\251\204D\001\223F\375\220\251L\003\275\300\016\006\377\177\277\345\342\313\014\332uC\234\252\221\004T\030,c\003\\b3\220B\334\322i\261\270h\204q(\211n/\027\014\354\205\264 \351\257=\224\031\212h\251)\336_q#\243\212\210\257\267\312U\347\0210\331\333?T\316\254\2145\007\n\033i1\353\314\034\300ss\035\335\034\\\013\210\332x\2243N\257\374T\262'\316V\245\211J\030\2522:\031\025\234 \275\014!4P\255\304\2500\202\372\215C$\"\035\013\310\013\353}L+\005=""\331X.\343\274\2664c\355K)^\2540\3302\322[\006(1\023\233T\346\276a\257\213CCF\010\016\330\021&\301\020\nn\001\023(\342\264\243\036\365\362\244\354\340\212\020\262Y\240\254\233w\021lLZ\206\321Fw\216e\261\005\371\337\001\010\316\354`_\200\024\210\254{\342a\212\013\240\225\305\020^\343(\0273\307=\301\2549\232636B\2723u{\322(\231&O\003\325\266\026\025\357Y(\2220\357q\347\341\312\233\241\027\257\314ik\370o\271\001\3550\215\333\361\352<%\014\241y\253\204\264\202\317.\026>\301d\2227Q\362\032\r=\342\265\332Z\237\244N\006\034\020g^r\260@_@i\332\337\036\241\350\256\351R4\334\2024\241HP\270k9\303e\307\245!\222m\223\261uiu\315h\215\325\006\231\253\031h\177\306C\214$\024\222Nu\272Si\271\270\221#+,f2\260A\233\2062\007\013t(Kc\000 \341\203\230\323\030\306q\302(\\bi\204\315\203\234\266\314d\221\206&i\025I\246>\n\306:\251\242\204\0232\334\351\203\251\"\347_`qo3#=\331\335\217X$\361K9\330:\033\217\222\300\304\214\030\213\025\r\307\022q'g\260l]\243\326\004\233\206\035\363(\210(`\337W\014\315$\215\311&\232#\214\021\"\250\231=\234q\304\206.\341\233P`\300\231}\310\212P\362\243\313\304\002\307(\275\245\310\027\014E\336\345\260\373.-\001\351\273\r\227\202]yS\325y\005=\355\304\326\2406\014\331\316s\357\363\367\374\007+\322f\362\321(xq%\2130\322\231\267D\317\271\242\362N\361\"\"\302,lCh,\202X\362\370;\250\203+ 2\224\274k\370\"\n,\262\211\264\306%1\220o$+\236\371\277/C\347\323\311\332n\345\030e\264\357\226\227\326\261Y`^\035;\212Jiq\234\223\302\376\020K\203\036P\224$\200\341\237_\276\224\330\330\010b\220}|\347\223\216\363\020\312\341\330\022#W\300\252\357\352I\034L\275\247\256j\021\232e\\\350\310\207\030\234\026\310[nLg\230\031\210\354\016O\363T;0\0070\303\306\376M\341h\320I\211y\331\010I\354\271\005\206\225\336\035\372a\321\tp\210,\337H\006\353\007\240\326\206\003x\230e\207\021c\362\216\241\337\272\001Y$U\223\014\034\213\252\302\262\376\337l\350\236y4\306\021\367\345\304\345\203\373\276\263\214fp\337S\265\215|m\203\231\220\267\334\017\010\375E(^ \336\026h\273\302\233\021\340\002\226\222\205%""\306\232\342 \264\024%\264\357\270\260\027c\201i\230.d\013\251\214`E\204&.\351\337\371q\335\236\211|~R\033\002\313\006\215\340LWD$\270\276\301\264h7\315w\257\213\031\341\030m\025X\244Q\240T\257k\207\3264\025\357\251\233`$\242\310\234\341A0\3014.~1R\273V`\205F_Y\225VAp%9]5\025u\226\203!\035\222\224\235\002\265T\007\3023yu\214\353/g\024X\006b,\311\022\352\213\2216\240\213\354\3012\312\221\321\351\251j\303\277\361\034\230\313\247ik1\233\352\206\201z\\\312E\260\306\035Uo\2550\2226\n\224\020?46\342*8\004\315vl\327`\026\016\313D\263\006\3114(\224;\320\347?\226\004.\213\257\031 \251h\306\234\262@\260K8\001\343\006\347\371\252I\200\240E<\257%\327\205\253\302\322\025\345\231\236\222@R\022\245U\002D\212\t\020\304\"p\010\223zi~'\001?\t \350\244\001\343\344\362}L\022\332\302^;\0100\327\252%EK\341\304\260\347\0272 s\332!f\302\024\350\314\330\032<\316\031\222xK\024M\356YE\241\004\005\333dft\202\033r\245\003B\271\030\305C>\252\034`\272\214\223\031\211\0042\262\221\"P\333V\200\264\035\t\021\020=(\206\240\243z~\033F\273\237R+>\335\\\250\376@\201\276{\302\260\rh\344\002\263\211\223m\267\255\202d\034\346\262\307\274\213e|\001\207)\254# \220\216d\3102\312\321X\324Hp\310!c\0077\227S\270\250\221)\027\027\214\002X\264\031#\030`!H\362\222Y\0138\346\241\013J\\\234g7/9\322ts\341y\367\"I\257u\214\356\220\337\216d\016\031*\256\351\020\206Ql\221&694@\321\036u\366\002u\245*\324\023WB.\030\021\304c#\222j\262\022\254\324\231,S\263\027\210\212J)\000\232\222\306O\212%\212\234\242\275\343\250\356j\204\257""\273\034\351vN#S\220\351q*.q\252N*[f\270\323x\273A\035+y1\235\367\236\010\014\301Y\253\024\244-\264Pa\267\346$\225\200\307=`,\244h\370& \300\367\270\266rv\200E\026l\304\010\"\t0\206*\"\202\206\2263\022<\032\273\303\347\3166\\w\343H\206^\343uE\246\337'\014\313#\342\344\235\t\266a\314\275\260\356]|\334\000\312\260\205\006\022\016^\256\262\\\210\242\312\010%\262w1_AQN\000\247$\013\322\330\302\303\272\301&\020\275\023E\373\220<\311V\311\244\311\311B\232x'0\241\t\230\201\363J0\016\023\263\017y&\202r\204V\251\r\202\220\322I7\242\317\010O\"2\013\034\220\366\233\342d\3073\031W\010\265\333\343:\275\317\301\264\266J\020\024\372;\303\220\227\026\200*\266\325d\246\210'$z\020L\322x\237\203\240\t\2156\034\014!\211)!\324\342\324u\006l\276\361\205\0342\037D\230(\241vD\240\335\262\200\203]KL(#ej'ML+\316\036\337\317VODd\310d]\244-\246\322\n\022\200\255Zn\rw\221\005\210\334\340\325\025\2225=\335\206\334\355%\035a\347\0179\347\363)\366\371\372}\253\374^C\354\210\032m!\240i4\206\034\244\312\224A\333\310\250\323EQ\t0\0246\220{\021\360$\254\352t2\026\230o1\240\313\207Z\245Q!\310M\200\261\200MR\311g\2621\233[\320\272\323\235\241\254v\254\306\337\230\240\303]\327czH\202\001\270\022\212\022B\346\346\016\256\236\210\33600D0^&H\354C\307d\nss\017j\331_\350\270\253s\3531\355\243\013\2701\334:2\014\016F,\033\256\323zQdha\360\367,\367-<\236\256\357>\272A\330\322o\361df\200S A\247'\210\312~\323m\035q\t\234\327\031\233\245\310\212\252\252\202\347\252R\334\210V\263r\\N%\025\302\253R4\343\227kA\217\257\020\314\036\0029;\020\217s\233\233 \341+9\222\321}Y\236j\374\232*\215\375p\270i\356)-\274\\\363\3424\250m\271ieJ\023\r%\333\373\362\230\177\034\340\010*\"=\032\220@\334\207]\367\354\262\010\034\021\350\242>\361b\241B\037\207\261x:U9URl\376h\036\352l\352V\312sZs{<\267\020\033\324\024W\0370\002\376\215u\247P\021\226c\353\331a\260s\253d\224\241\036\341\030\001\333\247\353\227\314\360\353L\230\307\230\017\277%\355\316q]\275f\221J@L\010\210\234\022\217\253~\352\037\227\300\262\004\302\371\020\253\330W\250J""\032d\014\"\366\365\031\313\344Ds\336\342\233\032\235\342\036u\314\342\364\211\223\233\274@\030\326\026.\216i\351x{I@\201\322 PZp Dm\240,z\247N\027hP\350R\251\221\323BD\353\347\370\307\242z\256\366\255\225?\310\367\332\014 \312\316\027\237\372\250\013\361\346\254\022\252\0170&\200\361!xo\332\301\300n\013\200\301tV.s1\272v-1b+D\303\006\0266\014\"\347*\300\334\357\306/\340\230{\312\363/\271\314P\t\3055Z\271tY\262a\013\371 \030D=\325\254t\325\007X\272\007\013m\204\024C\001p\377\246u\ruH\257Z\262b\365J\307R\322v\227V\200k\307@\205$\004\244\251Qa\236\342\034ts\265\214\251\257\236|\365\206q\037\307v\217\t\316\243~\235\004\246P\nt\276\031\323h\317\242\270\206\tK*\205Jn\370-q\355\354\337\010\205/\200pk\212):^\356\004\324\023\307\3349F\257D\323\332Q\315C\324{\226d\340\263\037\005\254kL9\344\235\336Y\272\320\326\320\354\350\347X \364\207\204\236K}ko\t\204\377m\361\276?\311R\221\026\013\2154\264\276\002T\256+`\363\226}\302N&lh\367K\266\261\261\245\245+\342D\010\202\320\344?\226\371\255e\333\330\263\025\3736J\323\013Cr\317-\241\322\313P\374ZZ\024H\026\221\r\323{FJ\237\017\310~\271\327\310\373\n\272\236\257\017L\3219\204\n\"\212.\270\0002\322\257h<\000\323\301\007y\225\226/b\340Q\000\353\303\213\314#\006A\240]T\362\233\002\020\035i\260.\303\244\030\336\2364#\036j\327\356H\310\344\241'N\007\276N\330\021q\017\251`\210\276\240\260J%\020\222\317\235\355\302\275\2303z\226|\345\207pm\313\265\252q\017\010\024\203\251}\004{X\034\025\344\254\335p\220@VZ*\221n)\016R\212\324Q{/zd\342\032\254&\022\343\001K\027\027Z\231\214Q\r4\260\242\305b\226\324X\263\201lq\002\256(\330\202\013\002\326\264\301\202HEP\026(Pa\001`)\201!C\206xv\n0Z\2332\322\252\250\225,K\025k\tb\0145\246\223d\203\235\r)D)\nr\177\342\356H\247\n\022\006\2523R\000"; + PyObject *data = __Pyx_DecompressString(cstring, 5562, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (5437 bytes) */ +const char* const cstring = "x\332\355ZK{\323\326\326&!\004\223@\332@J\201^\220)\227\000\301\304\271p\t\227\036\223\244@!\220\033\264\247\034>\035Y\336vDl\311\226d\222\264_O\031z\250\241\206\032z\350\241\207\0362\324\320\303\374\004~\302y\327\336\222\357\t\364|\347\371F} \226\274\265\366\332\353\372\256\265\267\034\033\222\244\204.\031\3117L\265%\333\2206\031\313K\226\222\313g\231%)zJR\225\254Z\314*6\013F\245\r\305\332\220\254\274\242\262\230\364\330\2264\"\003\027EU\2139\"4L\311HK\212\244\032\271\244\2463)]\324U[3\364\030\210h\265|\3364\266\265\0348\276\320\265B\221\315\013\272\037t\232\221/\332|]\211Y6\247!^\366\006\223\364b.\311\2103X\024\371<\351\255\222-\202\330\336Pli\213\231,\\1\025\353\265\214\2443\226\002k\311\322~e\322\375{R\374\206\224\206\254\264\226i\342\346\356=i26;\t\245t)\303tf*\331\t\276t \nT\010(I\345\244Q\264\245)\351\272d\025L{\\\230F&\326\227c\322*S\231\366\226\245\244\337\370Z\367\244\013\326\357\261=\005\322\273\027H2{\2131\035\362L\306\271\023\204`M\276\202L0nU5\3660k$\225lvGR\232\203M\333uX\256u\34223\237\260O\233\226\307\340&\333\2317\212\331\224~\311\226\322\032$\314\025M\374\247\330 \003Z6\204\220r\271\215iac)\255X6\246id\246\034\323m\241\255\221\356\262JlQ\203\315M\341%L\025\232Z\033\264\030\354\"Y\314n5\304\357\177\222\276\341\220\t\251\325\206\010\230G\020\035\312i:BPbBJ\221\001E\213G\231a1J\020\266m\233J\336\340\031A\321!\026\026A\212)\232\311\300\014\253\322\030O\225\300jI\030\327\262\2129M\317pZ\023^\017\347\265\322)\010d\305\222RL\267Xv\007\274R\232e\233Z\022\211\221\242\007|M\221\211\"\tA\362\330\202\315I\356\007\212\255n\260\024\276\257\262\267\314\264\370\355OL\313l`\3663\203\213\214l\231\337\201::\305q\212e58\031\312 fh\035\225\334\004\"]Z^\\\2766sk\206\233\300d\204\017\226d\025\223j\026j@N\210\236,jY[\323%{'\317,\270=-\355\030E\036\326d\250<\350Z'@p\235\033\2064\270\244\350\272!\242@\306t\030\345\022\0245\261\010\374D\263\177P\262\026\327my\335Tt\013Q\224\343\241\224a\266\035\232PK1\205\344H)\266\3224\023\005V\321\"\232\326`~v\315\326\262\344\232q\026""\313\304\244BQ1i\000q\200pV\311q\004x\314Vc\227%&B*\023\346\022\226\005\3215\304|l\010\034\026\267\005<\316\321\027\t\0213'e\261\3708\344\314\260\361\370d\374\362\345\tJ\036\031\213\010\276\367f\005)0cNz59!M\315NH\263\270\336\3045>9\371\272\311\351\325\270\206!IKK\332\335\370$\002\021Q\027g\327f/s\3555\320H\315u^w\2553\301\031I\300C\341\363{\353f\221u.\216\265\261t\327\312mJ\220\016\261Xl\242U\265\333\2234\007\352\355\275.O\0379)\302\260\347\342\373h\336%\300\253\370\353+\270\233\220z<\232\014\036\221\220\301\342\343\275d\rH{\032\253\207\270\177\336\200\274\252\265\305\251\255l\"\226\226\347\215l\226\361\322\027\344\220]4u\252@$\246\264\305\001\205\3424\033 +\362\221s\352\016[+\004\n\201Nj\223q\030\2431!b\302\314 ,\205\006m\312\316\265\240y\003\334(u\005\022\025\263<\251\032\344!\030\221\244\261\200\037\302\177N\0327\362\264\256\222\275,Q\271\000\202@\237\034$\246\351\255\274\221\302\274\005\310+\246\222\204\206\230=\001msZV1\003\206\022\021\221\000\233Tx\314L\221f\022\223e\016O\227\200\036\206\311\345\3121\014\244\254P\022S`[\2334[\033\214'-X\032f\212c\030f\202E\016\346!\250\305\003,\235\301\355\0042\210h\233b\020\334\005\017\211.\234\023\353\210\205\266\005\221\241\034\314\014\211\207\rW\304n\204@\350\354pjc\255\206\211c\322z\303\241\255\241\242\005H\311\266\363\030\021P\252\032\250\230\344\255b^\004C\203\235\230\037xk\013\270\305\345P\r\023N\315\033z\212\254'd\210\365\312\320?\241\221\220\007\020\251\250\033\215\345\003w\223\323\2725\001#\024`E\342kM\300C\232\272\301{'\221\000-\321\322\340G\030\247\033\372\265\320l\350>\221$\224=\212P\236f\321l\253-\330\210@L\261\210E\203]\310&&-\233\306[\224\013Z|K\331\341\321\031\366\253\014\275\013\302\237\2307\031\332\264\240\226\3033\203\027\364@\335tZS5PP\302\321\300\3073\037b>y\331+\377\223\320,%Q\313\007\203R\np^=Q\241a\257\217\"C\323\037C\"\260yr\375\005\016\177\201\303_\340\360\377\016\016+\2017%\354\224t\033{\020\304\036\356)\352\021\202\310\220U\014\023\033\266\2552n\3509lF0u}\003\206\0106\263hC\321\021\363mb\330\356""\222\351\333\272\335`\273\335\2129\302\351\264W\336\243\023\016B\014=\ry\206sm]T\004Z\303\027\301&gHj\337\213\267`\302x\033\242\240\353\n\302\262\321\253\267\306\242P\002\334\260\033\322r\305\\\210t6\313\205\n\322\312\023\301LlIr,\245\221\360\001\203q](q\231{7\340\245l\357\313+\0004\202\215\000\005\362\302\357)\351\255\246p\234\031ob\320\237D\237\313\034c\037\363\365h\003\207\2774\303\241D\343\220\302h\234\207p@\351mF\332\236t\332\221\347{;\022\213\376Q\303\016;\314}\332m\023M\270\327d \003\263\360@\204+O\022S\305!\325CiuC\372'T\374'\371;\264F\327\222bO\032L\017\254\250+\2000%\333\302m\035[cZ>\334\0277t@r3\332C\363\321s\317\330\226\224\310f\014\023p\224;\207\375\247\245\"\216\301\230\354\306wT\257\226V\237\336\276\365ZZR\364\315\342\204\264\252\274Q2F^\311\302j\027\245\2478k\260\024T\213s-'\007\322\022E\207.R\335\010\320{\245\021\232\020\3719\354\276L\373Q\016\006\204\204O\341i\322g\211!\211w\316M\020\010\2501)~\373\366-)1\277$\255=~\270\364|\201v\003/\215\2544\205f\377\231A\215\177^\232\231\272qmf\032\033\200\037\213\340J\023(\3357l;?w\375\272\n\246\026c\346v\214\212c\336*\306X\252x\375\255\306\266R\206z=el\351YCI}\2372\264{\361\311X\034\377n\304n\314\306\247/\232,\177\017\177q\260\272H\373\351{\371T\232\254\321\334\264\223\371\032\320\327L<\362Mh\370T\230\356\341\001\026\322\026\321\215z(`!\310_%\264?\034\234\206\331u\265\351\330\274\222\017\035J0\303\322\n\" <\226\002\216\245(T\306\3438\370j\017T\216\3168'\242r\200-s\353\241\005m\317\351\200\220N\2114}\034\273\331)\332\342\366\344\320\206\355\024\211F1\263A\262\345M\005\340\246\262 \331\t\2401\002\260f\010\210\240\232\344\212\250!8;\263\003\r\232\rOG\273\363\254\007\200\321\211\205i\244\212\315c\315\316\323\035\234s)\331\000\356\003\334\014\221E\315\026S!\322\021\246a=\241o\027&\005}J\262\230\206\345\371\201\341\034\267t\353B\342\2415\321Q\252\351t\266\331\226\205\216\013\004\n\374\026*\033\260\020\274\233@\2637\347\344\247p\336\243\313\373\217\233\274\377\250\305\373\3576x\373\267w\237\334\3345\ng\020C]\315]""\317\326\256\331R\230\254\273\261CD7z:1!\340\365\351\035\335\247\367s\2342@\223v\031\304\354\260\rk\3610-\361\275\222J\3118\311c\n\316\"7\230\234dJ\356z\243/\264\256\343 \030\204\371\035\340\001\005\001\323\3513\243j\226\270K\335%\230\200\247\214\"\016\341\356'\364\235\026Xo x\257\261\306[\203}\037\306d\031\331h\313\362\307\250LF^\373(\035i+,\365\021B#\235\206y\367'j0\333\237L5\031\036|\n\215\334\362\016f\177z~\210\255\332\262\200\261\375is\014\311\321\312\272\247\356\2157\017\373>\334\327\037M*DK>\253\354\310T9\366\247D\254\002g{\322\2107\032\373<\332_\230\200\346\243\242\004t\373\010\"\357\301C\274\360\330\373}\330\336OzI\336I\322+\272:i\366\r\233N\342}\265\370\204\320\352$\3347\256\202\227A=\202\252\343\311\336\246\330'H\002\202\256\010i\033\337\207\363^>\017\036\313xI!\267\274\022\224\323\246\221\223QTd\336GuO@\211\264\230\360\226L\3452g\315Cp\002\310\206\271\202\233P\247\340\253\020\204\357/\305\023\301\360%/\020|XP\264\016/\010?.\300\215\217\321\220\204\034\345G\211\265G\362\332rb~Q^{\374\313\242\374\370\331\362\213uyqu\365\371*}\312Kk\017\2031\3768\030z\"?\025\305S,\321\376\255a\302\216a\212\315\366\021\262X\370\312\367)\232*y)\361\263\374\354\305\222\274\370tqi\361\331\372\232\274\364\342\351\372c\371e\342\351\213\306\332\362\263\347\355\003\315\2238\241\266,/\357l\343o\001\257\265\344g\210\314U\226\226\303\304| Z\260\366\257\315R\240\362&\004\242w\021\000\330\251\254\365 YC\341l\373\322RY\332\307I_\030\200\032\034\031\355O\363!g\334\366\255'\017\361\200\354X\324ES\307R\037y\0326$\035dtn\240\344)\374\3222\275\272\353\"\340m/Eq\373\260f\311,\227\267w\326\030\374\207vq}\235z\225ul]^*&\274j\350/\257\310JKz\267f:Dk\340SKQ\355\020\271C\201\275\364\221\021\276\342\203:\023\253\245\023i\271\2155\233\022\250l\262=\036\005 \267\307\323|\343~\017\002\336\356\240\027\306\246\204\274\253X;\272\252\031\264 \340\020\371j%\203\306\237$m\331\003\004}9\336Rg\325\rl\350e\231\2775\205\307\203\033\304\013\355\036\350+\330\300\\2\241,K*\352\246\232\265T\003=\257\314?\371\207""\325\355\324\346\361\220\025S\222\252@\376n\374\227\203\035\237L\257\244\345\264\336\365\235\366\2462*\232JY\315/\255u\241\365\036\217\rU\226Y\320.\206]#b\005\"\262\274\245e\r\235\343!\362>\300F\001\250\310S\306?[\352H\030\204\034Ia\t\276\245\220e\372m\211,w$S\307\327\330\335\254\201\037\261X\367q\243\344\222)\345>\021\010\223\321]\207\206\255H\364\021 \227\233n\341\267\002\0258\243\0333!?\272 Hy\317N\367x\337\276\201\350\323\322;t\311\033y~)Z\033t-l\260\355\224F\270\250i\251\355\006z\006\327nM\332\372{\271\343\233%7\342.LV\276\003%\363\331\206\221\2656\ty\360\267\271E\346B\275a\331\220q\026\233\254l\326\310\304\363\370\310\240C\227\345\034\217K\230e\003\273Z\2316\231\241K\351;\364\313\245fe\372#-\273\213;\037I\265\305\232\214}\235\022\006:\266\315b&\256\304\014\277\035\221\371\007\267\243\234\303\266\212<\216;\323\220\261\252\2511\236\037\272\222\343\303:\333\022\037\002\027t\304O\313F\270\355\000@n\373&~\373\024t\354\255\237\024\356\301\335\033\215\016\025\272\313t\236\322\n>\314\033X<\217\363\033\354\237H\230<\312\216\n'7\3567\230\272\211\037\177\210o\342XM\334\0071C\267\"\265\350\256\250\3475u\223\324\355(V\374\351[[\004\277\\\260\n0\001\024\311\n#\204*\t\246Mu\233\365\243\253\270\205\003l\233n3tj\263c\342H\014[l\226\0078\004\233m9\270\232t\002\024f\004\005l#;\332\023\245\307-\375VE\014\320\317\236X6\315\013i\340>\334\205i\330,\257r\217Rki\031\234gr6Hoq&iQ\325\245\017NJ\037\232\032\234\030\330\300\231b\016A\237\227e\0162\262\215_\235d\203\030!\203\013\274\244;\234\030\330\226\370-JK\225\tc\274\253\360X\305w\20614p\302\301\307\341wv\351\2063JL\256\273\243\365\310)\367\240\033w\237x\205\335\316\221\337*\347*O\252\333\265\302\373>Z\340\036\206g\374\263\327\313fe\264>0R\312\271S\356\232w\320\233\361/\335\254\230\325\321]\254f\361\265#cN\302y\345\r\370\347g*\017*j\365d\265P\377\342\264;\312\305,=vV\235_\275\343^\334K\274\353\333\355?\344\037\372\312\235v\225:\036\336\202\200\221#\273\375GJ\243\320&r\340p\244>x\270\365\377\207\273\007\016\235\362\277\034/\037,O\227\025\241\014t\375\334\031p~\200)\222^_}\370\214\270\3710t\340\320\221R\037\261\235*\255B\262\357\260\256\r\231W]\333\233\362~.\257\226\271%\317\225\036\224\024\262l?n\023u.\342<\310\243\316\214St\023\3767\261r\262r\250\262RIV\007\252\017\252\311\032g9\2159\221\223\216\302u\r>\216bz\344s\247\257\036\031\205}\351)W\342\320Q\242.m9)7\352\336\360\316\224\247\260t\261\222\010\037\316\224l\377\304xy\240\274P\031\340\243#b\264\010#\256\273\307\335\031\310\033\367\036\227W\336E\311\2003\340\2448[.\363\246\275L\371e%Ns\352\003\207\370\372\273Gi\375\036\037\373\223\274K|\030t\311\333\202GF\276v\027\340\204\221\343\316yL\0309IJ\327G\276\204\341\343\301\263\346\264\327^\364OL\353V`\020\244\037\271\360\325FJi\347\261\373\213W(\367\211\2648\366Y\251P?6\352\234\365\372\374\350\235j\274\272\000\247\336\275\267/\3557\256\342\237\275]\035\255\236\257*\365\271;\\\013\377X\324\373\026Q4t\312\035\200\261\206FJ)\030kH(1t\002\001\024>\203\364\247\317{\211\017\337R\202\026K\217\020\255\260\352\321\322\217\216\202h\366\307\357W\325\332\311Z\241~d\244\244:_@\373\213H\254x\223\002\322\340Q\306Y\251\017\036)\215\225~q\n\356 \217\000\206hZ\251GFJo\334>\377\364\025\377\312\367U\253\026\335\215@\352]\220\236,\231`\247\272']\323\033m%\373[\355`-\0162\3773\311\227\376V\353\253\215:\277{\017\274d\271O\004 \301\3109\347\001\246\216\222Q6\021""\207\323\224U\273\302\371\017p?\340%\302G\200\205\311J\177%Z\271R\235\257\026\210[-\n~\3630\343A\010\270V\351\253\214\222\003#>\300\005\371s\264\364\203s\325\375\273\177\021\306\257sY\221\177C\016Q\224\216\372c\343\241\024G\374\310\327\356CB\212\372\300I\222\305=\357\177;S\231\257\330\325\331\032\207\303\303\0348\360G\337B?.\013\375\017\351\362\260\377\t]\236\364\257\323e\275\377\025]^\365\377\243\237\226+\324)o&\t\255+?U\237\324\266\336+\273\355#\0052\302p\351>\005\254KU`\250\255\224\005\366$S\037!`q\177//U\317\324f\337\3675\037\005\225\r\246\002\"-yc\036\207\177 \340i\367,\274z\266:\010\034B\352\374\201\312y\2240\3523\324\033\247\350\177}\r\3516T\215\326\217rS\234p\276\207\023\246=\305\373\265r\262R\240J\365\034\371D\2319\\\271Q\035\r\370q\026\376\347\2227\350)\376\300\227\316o^\224\307\373\031\377\314U\377\352\375\252R}[\013\352""\317\035'\347\301S\273\003g\335\202/MV\206\253wj\233\376\312*\265\027\337\213\320 \351\377\227B\260\036\211WF\375\251\205\3323\177u-\210\216\335\001 \230\177L\362\232\355\314\221\322W\000\335\025^x\010\336^R\033 \232\221\243\307J\257\374S\261\362&D%<\337\025\343\356U\377\302\235\352L\025 \027)E\234\303\300\303a\340%X\237rF\001\\\300\213A\177\360\264\260\177\260\360\207\213\004kV)\212\254\373#\304\257c\2455\247\217\342rw\360\014\201\013\301\330y^\352\023\344\251!\252\007\300\027 r\254\334\357_\271W]\021c\017\234\244\333\357\237\271\206Rn\373\323\2135\014\017\023\267\027\350\033h\255\317[\327R\341\276\377\251\314 \203\315\332\030H\311\253\000\226w\333\242)\020\345\225\272\203\020\215\220;p\n\001\370\211R\002\351p\326\353\367\316{\334\337E\347\221\233\240,\244Z\370\324=\354\026`H\334.!\376_s\343\017\237@m]wG\305h\230\224\002\324I\2429dwP\334\006\216\363\364\275\202\326\243o/:D\301\267n\306[\3616\312\n\265~\025\021\031\337\270?y\ttQ+\350\216\200\356\273\355t\205\016\032\2457~s\014\366\277\272Z\216\013\tZ\360\\\224\360!\204%z\273\007\260\316\005\367\217r\n\035\351\254u\343=\265\031\005j9\024~\367\t\200\317u\225\250\275\275Y)\370\267\036!mo\335\255.\326\320\337F\032u\200\220,\202\034\236u\016:<\217\177\246\030\203\321\303\340\260\375a\360\360\026\312\207P\300\001\366\013\356!\377\033\202\343\024Y\270E}\314\307\303\276Nu\271p\243\215\2127\013\264|X\te\023\225\020\317QJ\354\362\315Jt\227wr\227\240\225\320\371\270\177\034-\247?\221\250\235~/\034J\223\216PP\010O2\244SP,\337\272?{\353\300Q\245\336\213I\004\356\037\253\374\275\252p\354:\353\026\376\r\251V\227~"; + PyObject *data = __Pyx_DecompressString(cstring, 5437, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (13709 bytes) */ +const char* const bytes = ".\n An object to keep samples and calculate sample hash space. It is an\n accumulator of a combine function.\n \n ApproximateUniqueCombineFn computes an estimate of the number of\n unique values that were combined.\n ApproximateUnique needs a size >= 16 for an error <= 0.50. In general, the estimation error is about 2 / sqrt(sample_size). Received {size = %s}.ApproximateUnique needs an estimation error between 0.01 and 0.50. Received {error = %s}. Approximate.Globally approximate number of unique values Approximate.PerKey approximate number of unique values per keyCouldn't find murmurhash. Install mmh3 for a faster implementation ofApproximateUnique.Either size or error should be set. Received {}.Either size or error should be set. Received {size = %s, error = %s}.\n Hashes input elements and uses those to extrapolate the size of the entire\n set of hash values by assuming the rest of the hash values are as densely\n distributed as the sample space.\n Is Input BatchedIs ReversedIs WeightedNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.\n PTransform for getting the idea of data distribution using approximate N-tile\n (e.g. quartiles, percentiles etc.) either globally or per-key.\n\n Examples:\n\n in: list(range(101)), num_quantiles=5\n\n out: [0, 25, 50, 75, 100]\n\n in: [(i, 1 if i<10 else 1e-5) for i in range(101)], num_quantiles=5,\n weighted=True\n\n out: [0, 2, 5, 7, 100]\n\n in: [list(range(10)), ..., list(range(90, 101))], num_quantiles=5,\n input_batched=True\n\n out: [0, 25, 50, 75, 100]\n\n in: [(list(range(10)), [1]*10), (list(range(10)), [0]*10), ...,\n (list(range(90, 101)), [0]*11)], num_quantiles=5, input_batched=True,\n weighted=True\n\n out: [0, 2, 5, 7, 100]\n \n PTransform takes PCollection and returns a list whose single value is\n approximate N-tiles of ""the input collection globally.\n\n Args:\n num_quantiles: number of elements in the resulting quantiles values list.\n key: (optional) Key is a mapping of elements to a comparable key, similar\n to the key argument of Python's sorting methods.\n reverse: (optional) whether to order things smallest to largest, rather\n than largest to smallest.\n weighted: (optional) if set to True, the transform returns weighted\n quantiles. The input PCollection is then expected to contain tuples of\n input values with the corresponding weight.\n input_batched: (optional) if set to True, the transform expects each\n element of input PCollection to be a batch, which is a list of elements\n for non-weighted case and a tuple of lists of elements and weights for\n weighted. Provides a way to accumulate multiple elements at a time more\n efficiently.\n \n PTransform takes PCollection of KV and returns a list based on each key\n whose single value is list of approximate N-tiles of the input element of\n the key.\n\n Args:\n num_quantiles: number of elements in the resulting quantiles values list.\n key: (optional) Key is a mapping of elements to a comparable key, similar\n to the key argument of Python's sorting methods.\n reverse: (optional) whether to order things smallest to largest, rather\n than largest to smallest.\n weighted: (optional) if set to True, the transform returns weighted\n quantiles. The input PCollection is then expected to contain tuples of\n input values with the corresponding weight.\n input_batched: (optional) if set to True, the transform expects each\n element of input PCollection to be a batch, which is a list of elements\n for non-weighted case and a tuple of lists of elements and weights for\n weighted. Provides a way to accumulate multiple elements at a time more\n efficiently.""\n Quantile CountRecord Comparer KeyRuntime exception: %s\n This combiner gives an idea of the distribution of a collection of values\n using approximate N-tiles. The output of this combiner is the list of size of\n the number of quantiles (num_quantiles), containing the input values of the\n minimum value item of the list, the intermediate values (n-tiles) and the\n maximum value item of the list, in the sort order provided via key (similar\n to the key argument of Python's sorting methods).\n\n If there are fewer values to combine than the number of quantile\n (num_quantiles), then the resulting list will contain all the values being\n combined, in sorted order.\n\n If no `key` is provided, then the results are sorted in the natural order.\n\n To evaluate the quantiles, we use the \"New Algorithm\" described here:\n\n [MRL98] Manku, Rajagopalan & Lindsay, \"Approximate Medians and other\n Quantiles in One Pass and with Limited Memory\", Proc. 1998 ACM SIGMOD,\n Vol 27, No 2, p 426-435, June 1998.\n http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6513&rep=rep1\n &type=pdf\n\n Note that the weighted quantiles are evaluated using a generalized version of\n the algorithm referenced in the paper.\n\n The default error bound is (1 / num_quantiles) for uniformly distributed data\n and min(1e-2, 1 / num_quantiles) for weighted case, though in practice the\n accuracy tends to be much better.\n\n Args:\n num_quantiles: Number of quantiles to produce. It is the size of the final\n output list, including the mininum and maximum value items.\n buffer_size: The size of the buffers, corresponding to k in the referenced\n paper.\n num_buffers: The number of buffers, corresponding to b in the referenced\n paper.\n key: (optional) Key is a mapping of elements to a comparable key, similar\n to the key argument of Python's sorting methods.\n reverse: (optional) whether to order things smallest to largest, rather""\n than largest to smallest.\n weighted: (optional) if set to True, the combiner produces weighted\n quantiles. The input elements are then expected to be tuples of input\n values with the corresponding weight.\n input_batched: (optional) if set to True, inputs are expected to be batches\n of elements.\n ?add_noteapache_beam/transforms/stats.pydisableenablegcisenabledAnyApproximateQuantilesApproximateQuantilesCombineFnApproximateQuantilesCombineFn.__init__ApproximateQuantilesCombineFn.__reduce__ApproximateQuantilesCombineFn._add_inputsApproximateQuantilesCombineFn._offsetApproximateQuantilesCombineFn.add_inputApproximateQuantilesCombineFn.createApproximateQuantilesCombineFn.create_accumulatorApproximateQuantilesCombineFn.extract_outputApproximateQuantilesCombineFn.merge_accumulatorsApproximateQuantiles.GloballyApproximateQuantiles.Globally.__init__ApproximateQuantiles.Globally.display_dataApproximateQuantiles.Globally.expandApproximateQuantiles.PerKeyApproximateQuantiles.PerKey.__init__ApproximateQuantiles.PerKey.display_dataApproximateQuantiles.PerKey.expandApproximateQuantiles._display_dataApproximateUniqueApproximateUniqueCombineFnApproximateUniqueCombineFn.__init__ApproximateUniqueCombineFn.add_inputApproximateUniqueCombineFn.create_accumulatorApproximateUniqueCombineFn.display_dataApproximateUniqueCombineFn.extract_outputApproximateUniqueCombineFn.merge_accumulatorsApproximateUnique.GloballyApproximateUnique.Globally.__init__ApproximateUnique.Globally.expandApproximateUnique.PerKeyApproximateUnique.PerKey.__init__ApproximateUnique.PerKey.expandApproximateUnique._get_sample_size_from_est_errorApproximateUnique.parse_input_paramsCallableCombineFnCombineGloballyCombinePerKeyCountGlobalUniqueValuesCountPerKeyUniqueValuesDisplayDataItemGlobally_HASH_SPACE_SIZE_INPUT_ERROR_ERR_MSG_INPUT_SIZE_ERR_MSGK_LargestUnique_LargestUnique.__init___LargestUnique.add_LargestUnique.get_estimateList_MAX_NUM_ELEMENTS_MULTI_VALUE_ERR_MSG_NO_VA""LUE_ERR_MSGPTransformPerKey__Pyx_PyDict_NextRef_QuantileBuffer_QuantileBuffer.__reduce_cython___QuantileBuffer.__setstate_cython___QuantileSpec_QuantileSpec.__reduce___QuantileSpec.get_argsort_key_QuantileState_QuantileState.__reduce___QuantileState._add_unbuffered_QuantileState._add_unbuffered_weighted_QuantileState.collapse_if_needed_QuantileState.finalize_QuantileState.is_emptySequenceTTupleTypeVarUnionV*_aaccumulatoraccumulatorsaddadd_input_add_inputs_add_unbufferedadd_unbuffered_add_unbuffered_weighted__all__all_elemsapache_beamapache_beam.transforms.coreapache_beam.transforms.displayapache_beam.transforms.ptransformapache_beam.transforms.statsappendargsasyncio.coroutinesbbuffer_elembuffer_sizebuffersceilchain__class____class_getitem__cline_in_tracebackclscoder_codercoderscollapse_if_neededcollections.abccreatecreate_accumulator_default_hash_fn_default_hash_fn_type__dict___dict_display_datadisplay_data__doc__eelementelementsencodeepsilonerrorestest_errexpandextendextract_outputfinalizefrom_iterable__func__get_argsort_keyget_argsort_key..get_coder_get_default_hash_fnget_estimate_get_sample_size_from_est_error__getitem____getstate__hash64_hash_fnhashed_valuehashlibheapifyheappopheappushheapqhexdigestiidx__init____init__..input_batched_input_batched_is_coroutineis_emptyitemsitertoolskkey_keykwargslabellevellog1plogging__main__mathmax_num_elementsmax_valmd5_md5_hashmerge_accumulatorsmerged_accumulator__metaclass___min_hashmin_valmmh3_mmh3_hash__module____mro_entries____name____new__new_weightnextnum_buffersnum_quantiles_num_quantilesobject_offsetoffsetoffset_fn_offset_jitterparse_input_paramspcollpoppow__prepare____pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle__QuantileBuffer__pyx_vtable___qsqs__qualname__quantile_statequantiles__reduce____reduce_cython____reduce_ex__registryremoverepeatreverse_reverseround_sample_heap_sample_set_sample_sizesample_sizesample_space_sizeseedself__set_name__setdefault__""setstate____setstate_cython__signedsizesortsortedspec_specstatestaticmethodstepsumtemp__test__total_weighttypecoderstypehintstypingunbuffered_elementsunbuffered_weightsupdateuse_setstatevaluevaluesverify_deterministicwarningweighted_weightedweightswith_input_typeswith_output_typesxzipPyObject *(PyObject *, int64_t, double, double, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)\000struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileBuffer *(PyObject *, PyObject *, struct __pyx_obj_11apache_beam_10transforms_5stats__QuantileSpec *)\000_interpolate\000_collapse\200!\330\004\031\230\024\320\0350\260\001\330\004\010\210\017\220q\330\006\n\210%\210{\230!\330\010\032\230$\230a\230q\340\004\013\2101\200!\360\014\000\005\010\200{\220)\2301\330\006\r\210Q\330\004\017\210y\230\001\330\004\020\220\013\2301\330\004\023\2201\330\004\007\200t\2106\220\021\330\006\n\210/\230\021\330\010\030\230\003\2301\230K\240q\340\006\n\210/\230\021\330\010\030\230\003\2301\230K\240{\260\"\260K\270x\300q\310\001\340\004\013\210=\230\003\2304\320\037/\250r\260\021\330\004\016\210m\2302\230S\240\003\2404\320'7\260r\270\021\340\004\017\210s\220)\2301\330\010\024\220A\220[\240\004\320$4\260B\260c\270\026\270q\330\025\031\230\021\340\004\013\2101\210I\220R\220z\240\022\2401\240A\200\001\340\002\005\320\005\033\2303\230a\330\004\013\2108\2201\330\010\t\340\002\t\210\021\200!\360\010\000\007\010\330\006\007\330\006\007\330\006\007\330\006\007\330\006\007\360<\000\005\030\320\027(\250\003\2503\250a\330\004\007\200t\2101\330\006\020\220\004\220F\230$\230b\240\001\330\013\032\230$\230b\240\001\360\n\000\005\t\210\001\330\004\013\2102\210R\210s\220#\220R\220t\2302\230R\230t\2402\240X\250R\250q\330\006\n\210\"\210B\210a\330\004\010\210\002\210\"\210A\330\004\013\2101\210C\210s\220!\2204\220u\230A\320\035.\250b\260\005\260Q\260b\270\004\270B\270b\300\001\330\004\013\2103\210a\330\010\026\220a\330\010\024\220A\330\010\024\220A\330\010\014\210A\330\010\020\220\001\330\010\021\220""\021\330\010\026\220a\200!\360\010\000\005\014\2103\210a\210w\220d\230!\2306\240\032\2502\250R\250u\260A\200!\360\010\000\005\014\2104\210t\320\023(\250\004\250D\260\004\260A\200!\360\016\000\005\014\2104\210u\220A\220T\230\022\2304\230t\2401\240I\250Q\200!\340\004\013\2104\210w\220a\220w\230e\2403\240g\250V\2601\260A\200!\330\004\005\330\010\014\210A\340\014\020\220\001\330\014\020\220\001\330\014\020\220\001\330\014\020\220\001\330\014\020\220\001\200!\330\004\005\330\010\014\210A\340\014\020\220\001\330\014\020\220\001\330\014\020\220\001\330\014\020\220\001\200A\360\006\000\t\n\330\010\t\330\010\t\330\010\t\330\006\n\320\n\034\230A\330\006\n\210(\220!\330\006\n\210,\220a\330\006\n\210-\220q\330\006\n\320\n\034\230A\200A\330\006\r\210V\2202\220_\240A\330\n'\240w\250a\330\016\034\230D\240\001\330\016\022\220$\220a\330\016\026\220d\230!\330\016\027\220t\2301\330\016\034\230D\240\001\200A\330\006\r\210V\2202\220]\240!\330\n'\240w\250a\330\016\034\230D\240\001\330\016\022\220$\220a\330\016\026\220d\230!\330\016\027\220t\2301\330\016\034\230D\240\001\200!\330\004\005\330\010\014\210A\340\014\020\220\001\330\014\020\220\006\220a\330\014\020\220\006\220a\330\014\020\220\006\220a\330\014\020\220\006\220a\330\014\020\220\006\220a\330\014\020\220\001\200A\330\006\016\210f\220I\230Z\240q\250\001\330\006\r\210Q\330\r\017\210q\330\r\021\220\037\240\001\320!;\2701\270D\300\001\330<=\200A\330\006\016\210f\220I\230Z\240q\250\001\330\006\r\210Q\330\r\017\210q\330\r\021\220\035\230a\320\0379\270\021\270$\270a\330:;\200A\330\006\r\320\r!\240\036\250q\330\n\030\230\004\230A\330\n\016\210d\220!\330\n\022\220$\220a\330\n\023\2204\220q\330\n\030\230\004\230A\200!\330\031$\240A\360\036\000\005\010\200u\210H\220F\230!\330\006\014\210J\220a\320\027(\320(>\270c\300\026\300q\330\t\016\210c\220\025\220d\230&\240\003\2401\330\006\014\210J\220a\320\027(\250\001\330\t\016\210g\220Q\330\006\t\210\024\210Z\220q\230\006\230e\2403\240e\2502\250Q\330\010\016\210j\230\001\320\031*\320*?\270s\300!""\340\010\017\210q\340\006\t\210\026\210r\220\025\220c\230\026\230r\240\021\330\010\016\210j\230\001\320\031*\320*@\300\003\3001\340\010\017\320\017 \320 @\300\001\300\021\220}\240B\240b\250\001\200!\360\016\000\005\010\200{\220\"\220B\220c\230\021\330\006\016\210k\230\022\2303\230b\240\001\340\006\n\320\n\034\230B\230b\240\004\240A\330\006\016\210k\230\022\2304\320\0370\260\002\260!\260*\270C\270q\300\001\300\021\300!\220}\240C\240q\250\003\2502\250S\260\001\260\021\200!\330\004\010\320\010\030\230\001\330\004\014\210F\220+\230Y\320&;\2701\330\010\017\210q\340\004\010\210\n\220!\330\004\010\210\014\320\024(\250\001\200!\360\016\000\005\t\320\010\034\230G\2401\240A\330\004\026\220c\230\021\230$\320\0364\260C\260t\2705\300\001\330\004\010\210\007\210u\220A\220Q\330\006\022\220&\230\001\330\n\016\320\016\"\240!\2404\240r\250\024\250U\260.\300\004\300B\300c\310\021\330#'\240u\250A\330\n\016\210d\220%\220q\330\n\022\220$\220e\2301\330\006\013\2109\220A\330\n\016\210a\330\n\031\230\021\230)\240;\250h\260a\260t\2709\300A\340\004\007\320\007\027\220r\230\021\330\006\n\320\n!\240\024\320%9\270\021\320:J\310!\330:>\270e\3001\360\006\000\005\t\320\010\033\2301\230A\200!\330\004\014\210O\2304\230q\200!\340\004\010\210\007\210~\230Q\330\010\034\230A\330\010\033\2301\330\010\020\220\001\330\010\r\210T\220\021\330\004\013\2104\210q\200!\360\016\000\005\013\210#\210Q\210d\220*\230B\230d\240%\240q\330\006\024\220A\220U\230(\240!\2404\240{\260%\260x\270q\300\004\300A\330\006\022\220+\230Q\230b\240\001\340\006\014\210D\220\t\230\024\230T\240\030\250\021\250\"\250G\2603\260a\330\010\023\2207\230!\2305\240\010\250\001\250\024\250Q\340\006\013\2109\220A\220T\230\032\2409\250A\250]\270+\300T\310\021\200\001\330\004-\250Q\250f\260A\200!\330\004\010\320\010\030\230\001\330\004\010\210\r\220S\230\002\230!\330\004\010\320\010\030\230\001\330\004\010\320\010\032\230!\210\\\230\024\230T\240\021\240(\250!\2501\200!\360\010\000\005\023\220/\240\021\240!\240:\250T\260\021\330\004\013\2101\200!""\330\004\005\330\006\025\220T\230\031\240!\2404\240w\250g\260Q\260a\330\006\021\220\024\220Q\220a\330\006\r\210Q\330\004\013\210=\230\001\330\006\014\210L\230\001\320\0311\260\022\2601\200\001\360\010\000\005\016\210T\220\030\230\024\230[\250\004\250H\260D\270\n\300$\300j\320PT\320T_\320_c\320cd\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\025\250c\260\024\260Z\270w\300e\3103\310d\320R[\320[b\320bg\320gj\320jn\320nw\320w~\360\000\000\177\001D\002\360\000\000D\002G\002\360\000\000G\002K\002\360\000\000K\002T\002\360\000\000T\002[\002\360\000\000[\002\\\002\330\004\007\200q\330\010\017\320\0170\260\004\260A\260W\270K\300w\310a\340\010\017\320\0170\260\004\260A\260W\270K\300q\200!\330\004\013\210>\230\021\230$\230a\200!\360\n\000\007\010\330\006\007\330\006\007\330\006\007\330\004\010\320\010\032\230!\330\004\010\210\t\220\035\230a\230}\250M\270\032\3005\310\001\330\004\010\320\010\032\230!\330\004\007\200t\2101\330\006\r\210Q\210f\220M\240\024\240Q\200!\340\004\005\330\010\031\230\037\250\001\250\037\270\006\270a\330\010\017\210\177\230a\330\014\017\210q\330\017\026\220a\220u\320\034-\250S\260\n\270!\330\014\022\220!\330\010\023\220?\240!\2403\240a\240z\260\026\260q\330\010\024\220O\2401\240C\240q\250\013\2606\270\021\330\010\031\230\037\250\001\330\014\017\210q\320\020 \240\006\240a\320\004\027\220{\240!\330\006\n\320\n\032\320\032+\320+>\270a\270v\300Q\200!\340\004\013\210;\220m\2401\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220?\240(\250!\2501\330\004\007\200|\2207\230!\330\0101\260\021\3202D\300N\320RS\330\004\013\2101\200!\340\004\t\210\024\320\r \240\001\330\004\010\210\017\220q\330\006\t\210\033\220I\230Q\330\010\t\330\006\t\210\024\210V\2201\330\010\n\210/\230\021\330\014\r\210[\320\030.\250k\270\021\330\014\020\220\001\340\010\n\210/\230\021\230+\320%;\2704\270q\340\006\010\210\010\220\007\220q\230\013\2401\330\004\t\210\030\220\021\220""\"\220A\330\004\006\320\006\031\230\021\230$\230a\330\004\013\2101\200!\360&\000\005\010\200s\210!\2104\210\177\230b\240\004\240A\330\006\r\210S\220\001\220\024\220Q\340\006\032\230$\320\0360\260\002\260$\260b\270\004\270A\330\006\007\330\n\016\210f\220A\220Q\220d\230.\250\002\320*=\270Q\330\n\016\210f\220B\220b\230\002\320\032-\250R\250t\3203E\300Q\330\n\013\330\006\r\210U\220!\2201\200!\360\020\000\005\010\200s\210!\2104\210\177\230c\240\024\240^\2604\260x\270r\300\024\300Q\330\006\r\210Q\340\004\007\200x\210w\220d\230!\330\006\n\210,\220d\230!\2301\330\006\013\2109\220A\220T\230\037\250\001\340\006\t\210\023\210A\210T\220\037\240\002\240$\240a\330\010\017\210u\220H\230A\230T\240\021\330\010\014\210L\230\007\230q\240\001\330\010\014\210M\230\024\230]\250!\2501\330\013\023\2202\220T\230\021\330\010\014\210M\230\021\330\004\013\2101\200!\360\016\000\005\010\200s\210!\210:\220S\230\001\330\006\r\210Q\330\004\022\220/\240\021\240*\250D\260\001\330\004\013\2101\200!\360\016\000\005\010\200s\210!\210:\220S\230\001\330\006\n\320\n\036\230g\240Q\240h\250a\250r\260\021\260!\330\006\n\320\n\035\230W\240A\240X\250Q\250b\260\001\260\021\340\006\n\320\n\036\230g\240Q\240h\250a\250q\330\006\n\320\n\035\230W\240A\240X\250Q\250a\330\004\026\220c\230\021\230$\320\0364\260C\260t\2705\300\001\330\004\022\220$\220e\320\033+\2501\250D\260\001\330\004\010\210\007\210u\220A\220Q\330\006\020\220\006\220a\330\n\017\210q\220\004\220B\220d\230%\230\177\250d\260\"\260C\260r\270\024\270U\300!\330\n\016\210a\330\n\022\220$\220e\2301\330\006\033\2301\230D\320 4\260A\260U\270$\270g\300Q\330\006\032\230!\2304\320\0372\260!\2605\270\004\270G\3001\330\006\013\2109\220A\330\n\016\210a\330\n\031\230\021\330\016\027\220q\330\016\026\220a\330\016\027\220q\340\004\007\320\007\027\220r\230\021\330\006\n\320\n!\240\024\320%9\270\021\320:J\310!\330:>\270e\3001\340\006\n\320\n \240\004\320$7\260q\3208H\310\001\3308<\270E\300\021\340\004\010\320\010\033\2301\230A\200!\360\010\000\005\010\200t\2105\220\003""\2201\330\006\r\210X\220Q\340\006\r\210Q\200!\360\020\000\005\010\200t\320\013 \240\004\240D\250\005\250Q\330\006\024\220D\230\005\320\035-\250Q\250d\260!\330\006\020\220\006\220a\330\n\017\210q\220\003\2201\220D\230\001\330\n\016\210a\330\n\022\220$\220e\2301\330\006\n\320\n!\240\021\330\n\016\320\016\"\240!\2405\250\004\250G\2601\340\006\n\320\n \240\001\330\n\016\320\016!\240\021\240%\240t\2507\260!\340\006\n\210(\220'\230\021\330\n\031\230\021\330\016\022\320\022(\250\004\320,A\300\031\310!\330\006\n\320\n \240\001\330\t\r\210Q\330\006\n\320\n\036\230e\2401\330\n\016\210d\220%\220v\230X\240T\250\025\250a\330\006\n\210(\220'\230\021\330\n\031\230\021\330\016\022\320\022(\250\010\260\001\260\024\260Y\270a\330\004\010\320\010\037\230q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 299; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 30) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 299; i < 346; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 346; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 299; + for (Py_ssize_t i=0; i<47; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {0.5,1.0,1e9,2.0,4.0,0.01}; + for (int i = 0; i < 6; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 6; + int8_t const cint_constants_1[] = {0,-1,1,2,16}; + int32_t const cint_constants_4[] = {55430000L}; + for (int i = 0; i < 6; i++) { + numbertab[i] = PyLong_FromLong((i < 5 ? cint_constants_1[i - 0] : cint_constants_4[i - 5])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<12; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 4; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 4; + unsigned int flags : 10; + unsigned int first_line : 10; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 442}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 446}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Bb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 448}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Cq_2S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 450}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Bb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 452}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Cq_2S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 461}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_idx}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 61}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_mmh3_hash, __pyx_mstate->__pyx_kp_b_iso88591_4wawe3gV1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_md5_hash, __pyx_mstate->__pyx_kp_b_iso88591_3awd_6_2RuA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 79}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_get_default_hash_fn, __pyx_mstate->__pyx_kp_b_iso88591_3a_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 104}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_error}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_parse_input_params, __pyx_mstate->__pyx_kp_b_iso88591_A_uHF_Ja_c_q_c_d_1_Ja_gQ_Zq_e3e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 135}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_est_err}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_get_sample_size_from_est_error, __pyx_mstate->__pyx_kp_b_iso88591_4uAT_4t1IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 148}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_error}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 151}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pcoll, __pyx_mstate->__pyx_n_u_coder}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_A_fIZq_Q_q_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 162}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_error}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pcoll, __pyx_mstate->__pyx_n_u_coder}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_A_fIZq_Q_q_a_9_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sample_size_2}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 187}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_temp}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_s_4_c_4xr_Q_Q_xwd_d_1_9AT_AT_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 210}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sample_space_size, __pyx_mstate->__pyx_n_u_est}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_get_estimate, __pyx_mstate->__pyx_kp_b_iso88591_s_4_b_A_S_Q_0_b_A_fAQd_Q_fBb_Rt, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 245}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sample_size_2, __pyx_mstate->__pyx_n_u_coder}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_F_Y_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 253}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_create_accumulator, __pyx_mstate->__pyx_kp_b_iso88591_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 256}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_hashed_value, __pyx_mstate->__pyx_n_u_e}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_T_4wgQa_Qa_Q_L_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 266}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_merged_accumulator, __pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_i}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_merge_accumulators, __pyx_mstate->__pyx_kp_b_iso88591_0_q_aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 274}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_accumulator}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 278}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_display_data_2, __pyx_mstate->__pyx_kp_b_iso88591_O4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 309}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_num_quantiles, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_reverse, __pyx_mstate->__pyx_n_u_weighted, __pyx_mstate->__pyx_n_u_input_batched}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_display_data, __pyx_mstate->__pyx_kp_b_iso88591_a_a_q_au_S_3az_q_O1Cq_6_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 346}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_quantiles, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_reverse, __pyx_mstate->__pyx_n_u_weighted, __pyx_mstate->__pyx_n_u_input_batched}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 359}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pcoll}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_A_V2_A_wa_D_a_d_t1_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 368}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_display_data_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A_d_a_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 400}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_quantiles, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_reverse, __pyx_mstate->__pyx_n_u_weighted, __pyx_mstate->__pyx_n_u_input_batched}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 413}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pcoll}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_A_V2_wa_D_a_d_t1_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 422}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_display_data_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A_d_a_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 454}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_elements}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_get_argsort_key, __pyx_mstate->__pyx_kp_b_iso88591_t5_1_XQ_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 463}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_HD_jPTT__ccd_G1F_a_vWE_Q_q_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 530}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 539}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_is_empty, __pyx_mstate->__pyx_kp_b_iso88591_4t_D_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 545}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_offset_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add_unbuffered, __pyx_mstate->__pyx_kp_b_iso88591_G1A_c_4Ct5_uAQ_4r_U_Bc_uA_d_q_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 571}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_offset_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add_unbuffered_weighted, __pyx_mstate->__pyx_kp_b_iso88591_s_S_gQhar_WAXQb_gQhaq_WAXQa_c_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 609}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_finalize, __pyx_mstate->__pyx_kp_b_iso88591_t_D_Q_D_Qd_a_q_1D_a_e1_5_G1_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 641}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_collapse_if_needed, __pyx_mstate->__pyx_kp_b_iso88591_Qd_Bd_q_AU_4_xq_A_Qb_D_T_G3a_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 818}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_quantiles, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_num_buffers, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_reverse, __pyx_mstate->__pyx_n_u_weighted, __pyx_mstate->__pyx_n_u_input_batched}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_a_M_5_t1_QfM_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 833}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_a_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 845}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_num_quantiles, __pyx_mstate->__pyx_n_u_epsilon, __pyx_mstate->__pyx_n_u_max_num_elements, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_reverse, __pyx_mstate->__pyx_n_u_weighted, __pyx_mstate->__pyx_n_u_input_batched, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_k}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_create, __pyx_mstate->__pyx_kp_b_iso88591_3a_t1_F_b_b_2Rs_Rt2Rt2XRq_Ba_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 906}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_weight}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_kp_b_iso88591_Bc_k_3b_Bb_A_k_4_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 921}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_create_accumulator, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_1_T_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 930}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_quantile_state, __pyx_mstate->__pyx_n_u_element}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add_input, __pyx_mstate->__pyx_kp_b_iso88591_T_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 937}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_quantile_state, __pyx_mstate->__pyx_n_u_elements}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_add_inputs, __pyx_mstate->__pyx_kp_b_iso88591_s_S_Q_D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 949}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulators, __pyx_mstate->__pyx_n_u_qs_2, __pyx_mstate->__pyx_n_u_accumulator}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_merge_accumulators, __pyx_mstate->__pyx_kp_b_iso88591_q_IQ_V1_k_4q_q_1_A_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 967}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_accumulator, __pyx_mstate->__pyx_n_u_all_elems, __pyx_mstate->__pyx_n_u_total_weight, __pyx_mstate->__pyx_n_u_buffer_elem, __pyx_mstate->__pyx_n_u_step, __pyx_mstate->__pyx_n_u_offset_2, __pyx_mstate->__pyx_n_u_quantiles, __pyx_mstate->__pyx_n_u__4, __pyx_mstate->__pyx_n_u_min_val, __pyx_mstate->__pyx_n_u_max_val}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_transforms_stats_py, __pyx_mstate->__pyx_n_u_extract_output, __pyx_mstate->__pyx_kp_b_iso88591_1_Q_y_1_1_t6_1Kq_1K_Kxq_4_r_m2S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__QuantileBuffer, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_1_7_1_2DNRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyFloatBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double a = floatval; + double b, result; + CYTHON_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + if (likely(PyFloat_CheckExact(op2))) { + b = __Pyx_PyFloat_AS_DOUBLE(op2); + if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;} + } else + if (likely(PyLong_CheckExact(op2))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsZero(op2)) { + b = 0.0; + if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;} + } else if (__Pyx_PyLong_IsCompact(op2)) { + b = (double) __Pyx_PyLong_CompactValue(op2); + } else { + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2); + switch (size) { + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #endif + b = PyLong_AsDouble(op2); + if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL; + #if !CYTHON_USE_PYLONG_INTERNALS + if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;} + #endif + #if CYTHON_USE_PYLONG_INTERNALS + } + } + #endif + } else { + return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2); + } + result = a / b; + return PyFloat_FromDouble(result); +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* RaiseClosureNameError */ +static void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* DivInt[Py_ssize_t] */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) { + Py_ssize_t q = a / b; + Py_ssize_t r = a - q*b; + Py_ssize_t adapt_python = (b_is_constant ? + ((r != 0) & ((r < 0) ^ (b < 0))) : + ((r != 0) & ((r ^ b) < 0)) + ); + return q - adapt_python; +} + +/* PyObjectCall2Args (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* pybuiltin_invalid (used by pyint_simplify) */ +static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + if (argname) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", + argname, type_name, obj_type_name + ); + } else { + PyErr_Format(PyExc_TypeError, + "Expected %.200s, got " __Pyx_FMT_TYPENAME, + type_name, obj_type_name + ); + } + __Pyx_DECREF_TypeName(obj_type_name); +} + +/* pyint_simplify */ +static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { + PyObject *number = *number_var; + if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { + return 0; + } + PyObject *int_object; + if (likely(PyNumber_Check(number))) { + int_object = PyNumber_Long(number); + if (unlikely(!int_object)) goto bad; + } else { + __Pyx_PyBuiltin_Invalid(number, "int", argname); + goto bad; + } + *number_var = int_object; + Py_DECREF(number); + return 0; +bad: + *number_var = NULL; + Py_DECREF(number); + return -1; +} + +/* IterNextPlain (used by IterNext) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* IterNext */ +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(defval); + return defval; + } + if (defval) { + Py_INCREF(defval); + return defval; + } + __Pyx_PyErr_SetNone(PyExc_StopIteration); + return NULL; +} +static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { + __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator)); + PyErr_Format(PyExc_TypeError, + __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name); + __Pyx_DECREF_TypeName(iterator_type_name); +} +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { + PyObject* next; +#if !CYTHON_COMPILING_IN_LIMITED_API + iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc); + if (likely(iternext)) { + next = iternext(iterator); + if (likely(next)) + return next; + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 + if (unlikely(iternext == &_PyObject_NextNotImplemented)) + return NULL; + #endif + } else if (CYTHON_USE_TYPE_SLOTS) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else +#endif + if (unlikely(!PyIter_Check(iterator))) { + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } else { + next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator); + if (likely(next)) + return next; + } + return __Pyx_PyIter_Next2Default(defval); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return PyLong_FromLong(-intval); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + calculate_long: + { + long x; + x = a - b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla - llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) - (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace); +} +#endif + +/* pybytes_as_double (used by pynumber_float) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { + PyObject *float_value = PyFloat_FromString(obj); + if (likely(float_value)) { + double value = __Pyx_PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } + return (double)-1; +} +static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { + int last_was_punctuation = 1; + int parse_error_found = 0; + Py_ssize_t i; + for (i=0; i < length; i++) { + char chr = start[i]; + int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); + *buffer = chr; + buffer += (chr != '_'); + parse_error_found |= last_was_punctuation & is_punctuation; + last_was_punctuation = is_punctuation; + } + parse_error_found |= last_was_punctuation; + *buffer = '\0'; + return unlikely(parse_error_found) ? NULL : buffer; +} +static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { + int matches = 1; + char sign = start[0]; + int is_signed = (sign == '+') | (sign == '-'); + start += is_signed; + length -= is_signed; + switch (start[0]) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + matches &= (start[1] == 'a' || start[1] == 'A'); + matches &= (start[2] == 'n' || start[2] == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + matches &= (start[1] == 'n' || start[1] == 'N'); + matches &= (start[2] == 'f' || start[2] == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + matches &= (start[3] == 'i' || start[3] == 'I'); + matches &= (start[4] == 'n' || start[4] == 'N'); + matches &= (start[5] == 'i' || start[5] == 'I'); + matches &= (start[6] == 't' || start[6] == 'T'); + matches &= (start[7] == 'y' || start[7] == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { + return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); +} +CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { + double value; + Py_ssize_t i, digits; + const char *last = start + length; + char *end; + while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) + start++; + while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) + last--; + length = last - start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + digits = 0; + for (i=0; i < length; digits += start[i++] != '_'); + if (likely(digits == length)) { + value = PyOS_string_to_double(start, &end, NULL); + } else if (digits < 40) { + char number[40]; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} + +/* pynumber_float */ +static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) { + double val; + if (PyLong_CheckExact(obj)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(obj))) { + val = (double) __Pyx_PyLong_CompactValue(obj); + goto no_error; + } +#endif + val = PyLong_AsDouble(obj); + } else if (PyUnicode_CheckExact(obj)) { + val = __Pyx_PyUnicode_AsDouble(obj); + } else if (PyBytes_CheckExact(obj)) { + val = __Pyx_PyBytes_AsDouble(obj); + } else if (PyByteArray_CheckExact(obj)) { + val = __Pyx_PyByteArray_AsDouble(obj); + } else { + return PyNumber_Float(obj); + } + if (unlikely(val == -1 && PyErr_Occurred())) { + return NULL; + } +#if CYTHON_USE_PYLONG_INTERNALS +no_error: +#endif + return PyFloat_FromDouble(val); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_remainder(op1, op2); + } + calculate_long: + { + long x = a % b; + x += ((x != 0) & ((x ^ b) < 0)) * b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx = lla % llb; + llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_RemainderObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_RemainderObjC(op1, op2, inplace); +} +#endif + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_true_divide(op1, op2); + } + calculate_long: + if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) + || __Pyx_PyLong_DigitCount(op1) <= 52 / PyLong_SHIFT) { + return PyFloat_FromDouble((double)a / (double)b); + } + return PyLong_Type.tp_as_number->nb_true_divide(op1, op2); +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_TrueDivideObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) / (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_TrueDivideObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_TrueDivideObjC(op1, op2, inplace); +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractCObj(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + long b; + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb; + if (unlikely(__Pyx_PyLong_IsZero(op2))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op2); + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2); + if (likely(size == 1)) { + b = (long) digits[0]; + if (!is_positive) b *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + calculate_long: + { + long x; + x = a - b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla - llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_SubtractCObj(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + double b = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) - (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + return __Pyx_Unpacked___Pyx_PyLong_SubtractCObj(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op2)) { + return __Pyx_Float___Pyx_PyLong_SubtractCObj(op2, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_SubtractCObj(op1, op2, inplace); +} +#endif + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { + PyObject *cobj; + union { + void (*fp)(void); + void *p; + } tmp; + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod0 (used by PyType_Ready) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* ClassMethod */ +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (PyMethodDescr_Check(method)) +#else + if (__Pyx_TypeCheck(method, &PyMethodDescr_Type)) +#endif + { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyErr_Format( + PyExc_SystemError, + "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. " + "This is most likely a classmethod in a cdef class method with binding=False. " + "Try setting 'binding' to True.", + method); +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PyTypeObject *d_type = GraalPyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); +#elif CYTHON_COMPILING_IN_GRAAL + PyTypeObject *d_type = PyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); +#else + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + PyTypeObject *d_type = descr->d_common.d_type; + return PyDescr_NewClassMethod(d_type, descr->d_method); +#endif + } +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API + else if (PyMethod_Check(method)) { + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else { + return PyClassMethod_New(method); + } +#else + { + PyObject *func=NULL; + PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; + if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { + func = PyObject_GetAttrString(method, "__func__"); + if (!func) goto bad; + } else { + func = method; + Py_INCREF(func); + } + builtins = PyEval_GetBuiltins(); // borrowed + if (unlikely(!builtins)) goto bad; + classmethod_str = PyUnicode_FromString("classmethod"); + if (unlikely(!classmethod_str)) goto bad; + classmethod = PyObject_GetItem(builtins, classmethod_str); + Py_DECREF(classmethod_str); + if (unlikely(!classmethod)) goto bad; + result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); + Py_DECREF(classmethod); + bad: + Py_XDECREF(func); + return result; + } +#endif +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__3); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CStringEquals */ +static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) { + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + return *s1 == *s2; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/transforms/stats.cp314-win_amd64.pyd b/sdks/python/apache_beam/transforms/stats.cp314-win_amd64.pyd new file mode 100644 index 000000000000..79376197eb19 Binary files /dev/null and b/sdks/python/apache_beam/transforms/stats.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/transforms/xlang/io.py b/sdks/python/apache_beam/transforms/xlang/io.py new file mode 100644 index 000000000000..3d0a9efb1901 --- /dev/null +++ b/sdks/python/apache_beam/transforms/xlang/io.py @@ -0,0 +1,138 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# NOTE: This file contains autogenerated external transform(s) +# and should not be edited by hand. +# Refer to gen_xlang_wrappers.py for more info. + +"""Cross-language transforms in this module can be imported from the +:py:mod:`apache_beam.io` package.""" + +# pylint:disable=line-too-long + +from apache_beam.transforms.external import BeamJarExpansionService +from apache_beam.transforms.external_transform_provider import ExternalTransform + + +class GenerateSequence(ExternalTransform): + """ + Outputs a PCollection of Beam Rows, each containing a single INT64 number + called "value". The count is produced from the given "start" value and either + up to the given "end" or until 2^63 - 1. + To produce an unbounded PCollection, simply do not specify an "end" value. + Unbounded sequences can specify a "rate" for output elements. + In all cases, the sequence of numbers is generated in parallel, so there is no + inherent ordering between the generated values + """ + identifier = "beam:schematransform:org.apache.beam:generate_sequence:v1" + + def __init__(self, start, end=None, rate=None, expansion_service=None): + """ + :param start: (int64) + The minimum number to generate (inclusive). + :param end: (int64) + The maximum number to generate (exclusive). Will be an unbounded + sequence if left unspecified. + :param rate: (Row(elements=, seconds=typing.Optional[int64])) + Specifies the rate to generate a given number of elements per a given + number of seconds. Applicable only to unbounded sequences. + """ + self.default_expansion_service = BeamJarExpansionService( + "sdks:java:io:expansion-service:shadowJar") + super().__init__( + start=start, end=end, rate=rate, expansion_service=expansion_service) + + +class TfrecordRead(ExternalTransform): + + identifier = "beam:schematransform:org.apache.beam:tfrecord_read:v1" + + def __init__( + self, + compression, + file_pattern, + validate, + error_handling=None, + expansion_service=None): + """ + :param compression: (str) + Decompression type to use when reading input files. + :param file_pattern: (str) + Filename or file pattern used to find input files. + :param validate: (boolean) + Validate file pattern. + :param error_handling: (Row(output=)) + This option specifies whether and where to output unwritable rows. + """ + self.default_expansion_service = BeamJarExpansionService( + "sdks:java:io:expansion-service:shadowJar") + super().__init__( + compression=compression, + file_pattern=file_pattern, + validate=validate, + error_handling=error_handling, + expansion_service=expansion_service) + + +class TfrecordWrite(ExternalTransform): + + identifier = "beam:schematransform:org.apache.beam:tfrecord_write:v1" + + def __init__( + self, + compression, + num_shards, + output_prefix, + error_handling=None, + filename_suffix=None, + max_num_writers_per_bundle=None, + no_spilling=None, + shard_template=None, + expansion_service=None): + """ + :param compression: (str) + Option to indicate the output sink's compression type. Default is NONE. + :param num_shards: (int32) + The number of shards to use, or 0 for automatic. + :param output_prefix: (str) + The directory to which files will be written. + :param error_handling: (Row(output=)) + This option specifies whether and where to output unwritable rows. + :param filename_suffix: (str) + The suffix of each file written, combined with prefix and shardTemplate. + :param max_num_writers_per_bundle: (int32) + Maximum number of writers created in a bundle before spilling to + shuffle. + :param no_spilling: (boolean) + Whether to skip the spilling of data caused by having + maxNumWritersPerBundle. + :param shard_template: (str) + The shard template of each file written, combined with prefix and + suffix. + """ + self.default_expansion_service = BeamJarExpansionService( + "sdks:java:io:expansion-service:shadowJar") + super().__init__( + compression=compression, + num_shards=num_shards, + output_prefix=output_prefix, + error_handling=error_handling, + filename_suffix=filename_suffix, + max_num_writers_per_bundle=max_num_writers_per_bundle, + no_spilling=no_spilling, + shard_template=shard_template, + expansion_service=expansion_service) diff --git a/sdks/python/apache_beam/utils/counters.c b/sdks/python/apache_beam/utils/counters.c new file mode 100644 index 000000000000..9c2cafca4f16 --- /dev/null +++ b/sdks/python/apache_beam/utils/counters.c @@ -0,0 +1,18095 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "name": "apache_beam.utils.counters", + "sources": [ + "apache_beam/utils/counters.py" + ] + }, + "module_name": "apache_beam.utils.counters" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__utils__counters +#define __PYX_HAVE_API__apache_beam__utils__counters +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/utils/counters.py", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_5utils_8counters_Counter; +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + +/* "apache_beam/utils/counters.pxd":20 + * # cython: overflowcheck=True + * + * cdef class Counter(object): # <<<<<<<<<<<<<< + * cdef readonly object name + * cdef readonly object combine_fn +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_Counter { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtab; + PyObject *name; + PyObject *combine_fn; + PyObject *accumulator; + PyObject *_add_input; +}; + + +/* "apache_beam/utils/counters.pxd":28 + * + * + * cdef class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n +*/ +struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_obj_11apache_beam_5utils_8counters_Counter __pyx_base; + PyObject *_fast_add_input; + PyObject *_fast_add_input_n; +}; + + + +/* "apache_beam/utils/counters.py":142 + * + * + * class Counter(object): # <<<<<<<<<<<<<< + * """A counter aggregates a series of values. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter { + int (*update)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter *__pyx_vtabptr_11apache_beam_5utils_8counters_Counter; + + +/* "apache_beam/utils/counters.py":209 + * + * + * class AccumulatorCombineFnCounter(Counter): # <<<<<<<<<<<<<< + * """Counter optimized for a mutating accumulator that holds all the logic.""" + * def __init__(self, name, combine_fn): +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter { + struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* PyNumber_Hex.proto */ +#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16) + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyRange_Check.proto */ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) + #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* SetNewInClass.proto */ +static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value); + +/* PyObjectCall2Args.proto (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CyFunctionClassCell.proto */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj); + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static int __pyx_f_11apache_beam_5utils_8counters_7Counter_update(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_update(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "apache_beam.utils.counters" */ +static PyObject *__pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_Counter__set_state(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_AccumulatorCombineFnCounter__set_state(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.utils.counters" +extern int __pyx_module_is_main_apache_beam__utils__counters; +int __pyx_module_is_main_apache_beam__utils__counters = 0; + +/* Implementation of "apache_beam.utils.counters" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_id; +/* #### Code section: string_decls ### */ +static const char __pyx_k_add_input__fast_add_input__fast[] = "_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name"; +static const char __pyx_k_add_input_accumulator_combine_f[] = "_add_input, accumulator, combine_fn, name"; +static const char __pyx_k_Counters_collect_the_progress_of[] = "Counters collect the progress of the Worker for reporting to the service.\n\nFor internal use only; no backwards-compatibility guarantees.\n"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_side_input_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_input_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_2shuffle_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_stage_name, PyObject *__pyx_v_step_name, PyObject *__pyx_v_system_name, PyObject *__pyx_v_namespace, PyObject *__pyx_v_origin, PyObject *__pyx_v_output_index, PyObject *__pyx_v_io_target); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_6_str_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_8counters_7Counter___init__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_2update(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_4update_n(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_6reset(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_8value(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10__str__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_12__repr__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_14_str_internal(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_4name___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10combine_fn___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_11accumulator___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10_add_input___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_16__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_18__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter___init__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_2update(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_4update_n(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_n); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_6reset(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input___get__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n___get__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_8__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_10__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_2get_counter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_4reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_6get_counters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_4__pyx_unpickle_Counter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_6__pyx_unpickle_AccumulatorCombineFnCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_5utils_8counters_Counter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_5utils_8counters_Counter; + PyObject *__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_Counter; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_tuple[4]; + PyObject *__pyx_codeobj_tab[24]; + PyObject *__pyx_string_tab[173]; + PyObject *__pyx_number_tab[2]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_CounterName_2 __pyx_string_tab[1] +#define __pyx_kp_u_Keeps_track_of_unique_counters __pyx_string_tab[2] +#define __pyx_kp_u_Naming_information_for_a_counter __pyx_string_tab[3] +#define __pyx_kp_u_None __pyx_string_tab[4] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[5] +#define __pyx_kp_u__2 __pyx_string_tab[6] +#define __pyx_kp_u__3 __pyx_string_tab[7] +#define __pyx_kp_u__4 __pyx_string_tab[8] +#define __pyx_kp_u__5 __pyx_string_tab[9] +#define __pyx_kp_u__6 __pyx_string_tab[10] +#define __pyx_kp_u_add_note __pyx_string_tab[11] +#define __pyx_kp_u_apache_beam_utils_counters_py __pyx_string_tab[12] +#define __pyx_kp_u_at __pyx_string_tab[13] +#define __pyx_kp_u_at_2 __pyx_string_tab[14] +#define __pyx_kp_u_disable __pyx_string_tab[15] +#define __pyx_kp_u_enable __pyx_string_tab[16] +#define __pyx_kp_u_gc __pyx_string_tab[17] +#define __pyx_kp_u_isenabled __pyx_string_tab[18] +#define __pyx_kp_u_out __pyx_string_tab[19] +#define __pyx_kp_u_s __pyx_string_tab[20] +#define __pyx_kp_u_stringsource __pyx_string_tab[21] +#define __pyx_kp_u_user __pyx_string_tab[22] +#define __pyx_n_u_AccumulatorCombineFn __pyx_string_tab[23] +#define __pyx_n_u_AccumulatorCombineFnCounter __pyx_string_tab[24] +#define __pyx_n_u_AccumulatorCombineFnCounter___re __pyx_string_tab[25] +#define __pyx_n_u_AccumulatorCombineFnCounter___se __pyx_string_tab[26] +#define __pyx_n_u_AccumulatorCombineFnCounter_rese __pyx_string_tab[27] +#define __pyx_n_u_AccumulatorCombineFnCounter_upda __pyx_string_tab[28] +#define __pyx_n_u_AccumulatorCombineFnCounter_upda_2 __pyx_string_tab[29] +#define __pyx_n_u_BEAM_DISTRIBUTION __pyx_string_tab[30] +#define __pyx_n_u_Counter __pyx_string_tab[31] +#define __pyx_n_u_CounterFactory __pyx_string_tab[32] +#define __pyx_n_u_CounterFactory___init __pyx_string_tab[33] +#define __pyx_n_u_CounterFactory_get_counter __pyx_string_tab[34] +#define __pyx_n_u_CounterFactory_get_counters __pyx_string_tab[35] +#define __pyx_n_u_CounterFactory_reset __pyx_string_tab[36] +#define __pyx_n_u_CounterName __pyx_string_tab[37] +#define __pyx_n_u_CounterName_3 __pyx_string_tab[38] +#define __pyx_n_u_CounterName___new __pyx_string_tab[39] +#define __pyx_n_u_CounterName___repr __pyx_string_tab[40] +#define __pyx_n_u_CounterName___str __pyx_string_tab[41] +#define __pyx_n_u_CounterName__str_internal __pyx_string_tab[42] +#define __pyx_n_u_Counter___reduce_cython __pyx_string_tab[43] +#define __pyx_n_u_Counter___setstate_cython __pyx_string_tab[44] +#define __pyx_n_u_Counter__str_internal __pyx_string_tab[45] +#define __pyx_n_u_Counter_reset __pyx_string_tab[46] +#define __pyx_n_u_Counter_update __pyx_string_tab[47] +#define __pyx_n_u_Counter_update_n __pyx_string_tab[48] +#define __pyx_n_u_Counter_value __pyx_string_tab[49] +#define __pyx_n_u_DATAFLOW_DISTRIBUTION __pyx_string_tab[50] +#define __pyx_n_u_DataflowDistributionCounterFn __pyx_string_tab[51] +#define __pyx_n_u_Dict __pyx_string_tab[52] +#define __pyx_n_u_DistributionInt64Fn __pyx_string_tab[53] +#define __pyx_n_u_IOTargetName __pyx_string_tab[54] +#define __pyx_n_u_Lock __pyx_string_tab[55] +#define __pyx_n_u_MEAN __pyx_string_tab[56] +#define __pyx_n_u_MeanInt64Fn __pyx_string_tab[57] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[58] +#define __pyx_n_u_SUM __pyx_string_tab[59] +#define __pyx_n_u_SYSTEM __pyx_string_tab[60] +#define __pyx_n_u_SumInt64Fn __pyx_string_tab[61] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[62] +#define __pyx_n_u_USER __pyx_string_tab[63] +#define __pyx_n_u__7 __pyx_string_tab[64] +#define __pyx_n_u_add_input __pyx_string_tab[65] +#define __pyx_n_u_add_input_n __pyx_string_tab[66] +#define __pyx_n_u_apache_beam_transforms __pyx_string_tab[67] +#define __pyx_n_u_apache_beam_utils_counters __pyx_string_tab[68] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[69] +#define __pyx_n_u_class __pyx_string_tab[70] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[71] +#define __pyx_n_u_cls __pyx_string_tab[72] +#define __pyx_n_u_collections __pyx_string_tab[73] +#define __pyx_n_u_combine_fn __pyx_string_tab[74] +#define __pyx_n_u_core __pyx_string_tab[75] +#define __pyx_n_u_counter __pyx_string_tab[76] +#define __pyx_n_u_counters __pyx_string_tab[77] +#define __pyx_n_u_create_accumulator __pyx_string_tab[78] +#define __pyx_n_u_cy_combiners __pyx_string_tab[79] +#define __pyx_n_u_dict __pyx_string_tab[80] +#define __pyx_n_u_dict_2 __pyx_string_tab[81] +#define __pyx_n_u_doc __pyx_string_tab[82] +#define __pyx_n_u_enter __pyx_string_tab[83] +#define __pyx_n_u_exit __pyx_string_tab[84] +#define __pyx_n_u_extract_output __pyx_string_tab[85] +#define __pyx_n_u_func __pyx_string_tab[86] +#define __pyx_n_u_get __pyx_string_tab[87] +#define __pyx_n_u_get_counter __pyx_string_tab[88] +#define __pyx_n_u_get_counters __pyx_string_tab[89] +#define __pyx_n_u_getstate __pyx_string_tab[90] +#define __pyx_n_u_id __pyx_string_tab[91] +#define __pyx_n_u_init __pyx_string_tab[92] +#define __pyx_n_u_input_index __pyx_string_tab[93] +#define __pyx_n_u_io_target __pyx_string_tab[94] +#define __pyx_n_u_is_coroutine __pyx_string_tab[95] +#define __pyx_n_u_items __pyx_string_tab[96] +#define __pyx_n_u_lock __pyx_string_tab[97] +#define __pyx_n_u_main __pyx_string_tab[98] +#define __pyx_n_u_metaclass __pyx_string_tab[99] +#define __pyx_n_u_module __pyx_string_tab[100] +#define __pyx_n_u_mro_entries __pyx_string_tab[101] +#define __pyx_n_u_n __pyx_string_tab[102] +#define __pyx_n_u_name __pyx_string_tab[103] +#define __pyx_n_u_name_2 __pyx_string_tab[104] +#define __pyx_n_u_namedtuple __pyx_string_tab[105] +#define __pyx_n_u_namespace __pyx_string_tab[106] +#define __pyx_n_u_new __pyx_string_tab[107] +#define __pyx_n_u_object __pyx_string_tab[108] +#define __pyx_n_u_origin __pyx_string_tab[109] +#define __pyx_n_u_output_index __pyx_string_tab[110] +#define __pyx_n_u_pop __pyx_string_tab[111] +#define __pyx_n_u_prepare __pyx_string_tab[112] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[113] +#define __pyx_n_u_pyx_result __pyx_string_tab[114] +#define __pyx_n_u_pyx_state __pyx_string_tab[115] +#define __pyx_n_u_pyx_type __pyx_string_tab[116] +#define __pyx_n_u_pyx_unpickle_AccumulatorCombin __pyx_string_tab[117] +#define __pyx_n_u_pyx_unpickle_Counter __pyx_string_tab[118] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[119] +#define __pyx_n_u_qualname __pyx_string_tab[120] +#define __pyx_n_u_reduce __pyx_string_tab[121] +#define __pyx_n_u_reduce_cython __pyx_string_tab[122] +#define __pyx_n_u_reduce_ex __pyx_string_tab[123] +#define __pyx_n_u_repr __pyx_string_tab[124] +#define __pyx_n_u_requesting_step_name __pyx_string_tab[125] +#define __pyx_n_u_reset __pyx_string_tab[126] +#define __pyx_n_u_self __pyx_string_tab[127] +#define __pyx_n_u_set_name __pyx_string_tab[128] +#define __pyx_n_u_setdefault __pyx_string_tab[129] +#define __pyx_n_u_setstate __pyx_string_tab[130] +#define __pyx_n_u_setstate_cython __pyx_string_tab[131] +#define __pyx_n_u_shuffle_id __pyx_string_tab[132] +#define __pyx_n_u_side_input_id __pyx_string_tab[133] +#define __pyx_n_u_stage_name __pyx_string_tab[134] +#define __pyx_n_u_state __pyx_string_tab[135] +#define __pyx_n_u_step_name __pyx_string_tab[136] +#define __pyx_n_u_str __pyx_string_tab[137] +#define __pyx_n_u_str_internal __pyx_string_tab[138] +#define __pyx_n_u_super __pyx_string_tab[139] +#define __pyx_n_u_system_name __pyx_string_tab[140] +#define __pyx_n_u_test __pyx_string_tab[141] +#define __pyx_n_u_threading __pyx_string_tab[142] +#define __pyx_n_u_typing __pyx_string_tab[143] +#define __pyx_n_u_update __pyx_string_tab[144] +#define __pyx_n_u_update_n __pyx_string_tab[145] +#define __pyx_n_u_use_setstate __pyx_string_tab[146] +#define __pyx_n_u_value __pyx_string_tab[147] +#define __pyx_n_u_values __pyx_string_tab[148] +#define __pyx_kp_b_iso88591_1_G4_Kt6 __pyx_string_tab[149] +#define __pyx_kp_b_iso88591_4_Q __pyx_string_tab[150] +#define __pyx_kp_b_iso88591_4_a __pyx_string_tab[151] +#define __pyx_kp_b_iso88591_7 __pyx_string_tab[152] +#define __pyx_kp_b_iso88591_9 __pyx_string_tab[153] +#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[154] +#define __pyx_kp_b_iso88591_N_c_AQ __pyx_string_tab[155] +#define __pyx_kp_b_iso88591_Q_IT_wl_Q_Ql_a_q_a_G1F_IQha_Q __pyx_string_tab[156] +#define __pyx_kp_b_iso88591_Q_T __pyx_string_tab[157] +#define __pyx_kp_b_iso88591_Q_T_vQ __pyx_string_tab[158] +#define __pyx_kp_b_iso88591_QfA __pyx_string_tab[159] +#define __pyx_kp_b_iso88591_Qk __pyx_string_tab[160] +#define __pyx_kp_b_iso88591_Qk_2 __pyx_string_tab[161] +#define __pyx_kp_b_iso88591_T_d_4D8LDP_bboosst_G1F_a_vWE_Q __pyx_string_tab[162] +#define __pyx_kp_b_iso88591_T_d_M_Q_G1F_a_vWE_Q_q_t_we3d_we __pyx_string_tab[163] +#define __pyx_kp_b_iso88591_U_1_q __pyx_string_tab[164] +#define __pyx_kp_b_iso88591_WC_5 __pyx_string_tab[165] +#define __pyx_kp_b_iso88591__8 __pyx_string_tab[166] +#define __pyx_kp_b_iso88591_q_0_kQR_7_1_7_N_1 __pyx_string_tab[167] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1 __pyx_string_tab[168] +#define __pyx_kp_b_iso88591_t83k_T_T_XS_84t1_d_d_Q_4_D_D __pyx_string_tab[169] +#define __pyx_kp_b_iso88591_t_9 __pyx_string_tab[170] +#define __pyx_kp_b_iso88591_t_9_4_1_T_Q __pyx_string_tab[171] +#define __pyx_kp_b_iso88591_t_at __pyx_string_tab[172] +#define __pyx_int_5281864 __pyx_number_tab[0] +#define __pyx_int_114471469 __pyx_number_tab[1] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_8counters_Counter); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<24; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<173; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_8counters_Counter); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<24; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<173; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/utils/counters.py":50 + * + * + * def side_input_id(step_name, input_index): # <<<<<<<<<<<<<< + * # type: (str, int) -> IOTargetName + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_1side_input_id(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_side_input_id, "Create an IOTargetName that identifies the reading of a side input.\n\n Given a step \"s4\" that receives two side inputs, then the CounterName\n that represents the consumption of side input number 2 is:\n * step_name: s4 <---|\n * input_index: 2 <---|-- Identifying the side input itself\n * requesting_step_name: s4 <-- Identifying the step that reads from it.\n\n If \"s4\" emits the whole AsIter of the side input, down to a step, say \"s5\",\n then the requesting_step_name of the subsequent consumption will be \"s5\".\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_1side_input_id = {"side_input_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_1side_input_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_side_input_id}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_1side_input_id(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_input_index = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("side_input_id (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_input_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 50, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 50, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "side_input_id", 0) < (0)) __PYX_ERR(0, 50, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("side_input_id", 1, 2, 2, i); __PYX_ERR(0, 50, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 50, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 50, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + __pyx_v_input_index = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("side_input_id", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 50, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.side_input_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_side_input_id(__pyx_self, __pyx_v_step_name, __pyx_v_input_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_side_input_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name, PyObject *__pyx_v_input_index) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("side_input_id", 0); + + /* "apache_beam/utils/counters.py":64 + * then the requesting_step_name of the subsequent consumption will be "s5". + * """ + * return IOTargetName(step_name, input_index) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IOTargetName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_step_name, __pyx_v_input_index}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":50 + * + * + * def side_input_id(step_name, input_index): # <<<<<<<<<<<<<< + * # type: (str, int) -> IOTargetName + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.side_input_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":67 + * + * + * def shuffle_id(step_name): # <<<<<<<<<<<<<< + * # type: (str) -> IOTargetName + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_3shuffle_id(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_2shuffle_id, "Create an IOTargetName that identifies a GBK step.\n\n Given a step \"s6\" that is downstream from a GBK \"s5\", then \"s6\" will read\n from shuffle. The CounterName that quantifies the consumption of data from\n shuffle has:\n * step_name: s5\n * requesting_step_name: s6\n\n If \"s6\" emits the whole iterable down to a step, say \"s7\", and \"s7\" continues\n to consume data from the iterable, then a new CounterName will be:\n * step_name: s5 <--- Identifying the GBK\n * requesting_step_name: s6\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_3shuffle_id = {"shuffle_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_3shuffle_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_2shuffle_id}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_3shuffle_id(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_step_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("shuffle_id (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_step_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 67, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 67, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "shuffle_id", 0) < (0)) __PYX_ERR(0, 67, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("shuffle_id", 1, 1, 1, i); __PYX_ERR(0, 67, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 67, __pyx_L3_error) + } + __pyx_v_step_name = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("shuffle_id", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 67, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.shuffle_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_2shuffle_id(__pyx_self, __pyx_v_step_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_2shuffle_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_step_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("shuffle_id", 0); + + /* "apache_beam/utils/counters.py":83 + * * requesting_step_name: s6 + * """ + * return IOTargetName(step_name, None) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IOTargetName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_step_name, Py_None}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":67 + * + * + * def shuffle_id(step_name): # <<<<<<<<<<<<<< + * # type: (str) -> IOTargetName + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.shuffle_id", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":105 + * USER = object() + * + * def __new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_1__new__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_11CounterName_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_11CounterName_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_1__new__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_stage_name = 0; + PyObject *__pyx_v_step_name = 0; + PyObject *__pyx_v_system_name = 0; + PyObject *__pyx_v_namespace = 0; + PyObject *__pyx_v_origin = 0; + PyObject *__pyx_v_output_index = 0; + PyObject *__pyx_v_io_target = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_stage_name,&__pyx_mstate_global->__pyx_n_u_step_name,&__pyx_mstate_global->__pyx_n_u_system_name,&__pyx_mstate_global->__pyx_n_u_namespace,&__pyx_mstate_global->__pyx_n_u_origin,&__pyx_mstate_global->__pyx_n_u_output_index,&__pyx_mstate_global->__pyx_n_u_io_target,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 105, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 9: + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 105, __pyx_L3_error) + + /* "apache_beam/utils/counters.py":108 + * cls, + * name, + * stage_name=None, # <<<<<<<<<<<<<< + * step_name=None, + * system_name=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":109 + * name, + * stage_name=None, + * step_name=None, # <<<<<<<<<<<<<< + * system_name=None, + * namespace=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":110 + * stage_name=None, + * step_name=None, + * system_name=None, # <<<<<<<<<<<<<< + * namespace=None, + * origin=None, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":111 + * step_name=None, + * system_name=None, + * namespace=None, # <<<<<<<<<<<<<< + * origin=None, + * output_index=None, +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":112 + * system_name=None, + * namespace=None, + * origin=None, # <<<<<<<<<<<<<< + * output_index=None, + * io_target=None): +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":113 + * namespace=None, + * origin=None, + * output_index=None, # <<<<<<<<<<<<<< + * io_target=None): + * origin = origin or CounterName.SYSTEM +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":114 + * origin=None, + * output_index=None, + * io_target=None): # <<<<<<<<<<<<<< + * origin = origin or CounterName.SYSTEM + * return super().__new__( +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 9, i); __PYX_ERR(0, 105, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 9: + values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 8: + values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + + /* "apache_beam/utils/counters.py":108 + * cls, + * name, + * stage_name=None, # <<<<<<<<<<<<<< + * step_name=None, + * system_name=None, +*/ + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":109 + * name, + * stage_name=None, + * step_name=None, # <<<<<<<<<<<<<< + * system_name=None, + * namespace=None, +*/ + if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":110 + * stage_name=None, + * step_name=None, + * system_name=None, # <<<<<<<<<<<<<< + * namespace=None, + * origin=None, +*/ + if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":111 + * step_name=None, + * system_name=None, + * namespace=None, # <<<<<<<<<<<<<< + * origin=None, + * output_index=None, +*/ + if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":112 + * system_name=None, + * namespace=None, + * origin=None, # <<<<<<<<<<<<<< + * output_index=None, + * io_target=None): +*/ + if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":113 + * namespace=None, + * origin=None, + * output_index=None, # <<<<<<<<<<<<<< + * io_target=None): + * origin = origin or CounterName.SYSTEM +*/ + if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); + + /* "apache_beam/utils/counters.py":114 + * origin=None, + * output_index=None, + * io_target=None): # <<<<<<<<<<<<<< + * origin = origin or CounterName.SYSTEM + * return super().__new__( +*/ + if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_cls = values[0]; + __pyx_v_name = values[1]; + __pyx_v_stage_name = values[2]; + __pyx_v_step_name = values[3]; + __pyx_v_system_name = values[4]; + __pyx_v_namespace = values[5]; + __pyx_v_origin = values[6]; + __pyx_v_output_index = values[7]; + __pyx_v_io_target = values[8]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 9, __pyx_nargs); __PYX_ERR(0, 105, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_11CounterName___new__(__pyx_self, __pyx_v_cls, __pyx_v_name, __pyx_v_stage_name, __pyx_v_step_name, __pyx_v_system_name, __pyx_v_namespace, __pyx_v_origin, __pyx_v_output_index, __pyx_v_io_target); + + /* "apache_beam/utils/counters.py":105 + * USER = object() + * + * def __new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_stage_name, PyObject *__pyx_v_step_name, PyObject *__pyx_v_system_name, PyObject *__pyx_v_namespace, PyObject *__pyx_v_origin, PyObject *__pyx_v_output_index, PyObject *__pyx_v_io_target) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__new__", 0); + __Pyx_INCREF(__pyx_v_origin); + + /* "apache_beam/utils/counters.py":115 + * output_index=None, + * io_target=None): + * origin = origin or CounterName.SYSTEM # <<<<<<<<<<<<<< + * return super().__new__( + * cls, +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_origin); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 115, __pyx_L1_error) + if (!__pyx_t_2) { + } else { + __Pyx_INCREF(__pyx_v_origin); + __pyx_t_1 = __pyx_v_origin; + goto __pyx_L3_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SYSTEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_DECREF_SET(__pyx_v_origin, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":116 + * io_target=None): + * origin = origin or CounterName.SYSTEM + * return super().__new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = NULL; + __pyx_t_6 = __Pyx_CyFunction_GetClassObj(__pyx_self); + if (!__pyx_t_6) { PyErr_SetString(PyExc_RuntimeError, "super(): empty __class__ cell"); __PYX_ERR(0, 116, __pyx_L1_error) } + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_cls}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + + /* "apache_beam/utils/counters.py":125 + * origin, + * output_index, + * io_target) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[10] = {__pyx_t_4, __pyx_v_cls, __pyx_v_name, __pyx_v_stage_name, __pyx_v_step_name, __pyx_v_system_name, __pyx_v_namespace, __pyx_v_origin, __pyx_v_output_index, __pyx_v_io_target}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (10-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":105 + * USER = object() + * + * def __new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_origin); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":127 + * io_target) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_3__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_11CounterName_3__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_11CounterName_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_3__repr__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 127, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 127, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 127, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 127, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 127, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_11CounterName_2__repr__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/utils/counters.py":128 + * + * def __repr__(self): + * return ' at %s>' % (self._str_internal(), hex(id(self))) # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_CounterName_2; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":127 + * io_target) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":130 + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return self._str_internal() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_5__str__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_11CounterName_5__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_11CounterName_5__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_5__str__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 130, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 130, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 130, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 130, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_11CounterName_4__str__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/utils/counters.py":131 + * + * def __str__(self): + * return self._str_internal() # <<<<<<<<<<<<<< + * + * def _str_internal(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str_internal, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":130 + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return self._str_internal() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":133 + * return self._str_internal() + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_7_str_internal(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_11CounterName_7_str_internal = {"_str_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_11CounterName_7_str_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_11CounterName_7_str_internal(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_str_internal (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 133, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 133, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_str_internal", 0) < (0)) __PYX_ERR(0, 133, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_str_internal", 1, 1, 1, i); __PYX_ERR(0, 133, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 133, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_str_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName._str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_11CounterName_6_str_internal(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_11CounterName_6_str_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5[4]; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_str_internal", 0); + + /* "apache_beam/utils/counters.py":134 + * + * def _str_internal(self): + * if self.origin == CounterName.USER: # <<<<<<<<<<<<<< + * return 'user-%s-%s' % (self.step_name, self.name) + * elif self.origin == CounterName.SYSTEM and self.output_index: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_USER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "apache_beam/utils/counters.py":135 + * def _str_internal(self): + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) # <<<<<<<<<<<<<< + * elif self.origin == CounterName.SYSTEM and self.output_index: + * return '%s-out%s-%s' % (self.step_name, self.output_index, self.name) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_user; + __pyx_t_5[1] = __pyx_t_3; + __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_5[3] = __pyx_t_1; + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":134 + * + * def _str_internal(self): + * if self.origin == CounterName.USER: # <<<<<<<<<<<<<< + * return 'user-%s-%s' % (self.step_name, self.name) + * elif self.origin == CounterName.SYSTEM and self.output_index: +*/ + } + + /* "apache_beam/utils/counters.py":136 + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) + * elif self.origin == CounterName.SYSTEM and self.output_index: # <<<<<<<<<<<<<< + * return '%s-out%s-%s' % (self.step_name, self.output_index, self.name) + * else: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CounterName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_SYSTEM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_6) { + } else { + __pyx_t_4 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_output_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "apache_beam/utils/counters.py":137 + * return 'user-%s-%s' % (self.step_name, self.name) + * elif self.origin == CounterName.SYSTEM and self.output_index: + * return '%s-out%s-%s' % (self.step_name, self.output_index, self.name) # <<<<<<<<<<<<<< + * else: + * return '%s-%s-%s' % (self.stage_name, self.step_name, self.name) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_output_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8[0] = __pyx_t_3; + __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u_out; + __pyx_t_8[2] = __pyx_t_2; + __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_8[4] = __pyx_t_7; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":136 + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) + * elif self.origin == CounterName.SYSTEM and self.output_index: # <<<<<<<<<<<<<< + * return '%s-out%s-%s' % (self.step_name, self.output_index, self.name) + * else: +*/ + } + + /* "apache_beam/utils/counters.py":139 + * return '%s-out%s-%s' % (self.step_name, self.output_index, self.name) + * else: + * return '%s-%s-%s' % (self.stage_name, self.step_name, self.name) # <<<<<<<<<<<<<< + * + * +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_stage_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_step_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8[0] = __pyx_t_7; + __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_8[2] = __pyx_t_2; + __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_8[4] = __pyx_t_3; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "apache_beam/utils/counters.py":133 + * return self._str_internal() + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterName._str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":169 + * DATAFLOW_DISTRIBUTION = cy_combiners.DataflowDistributionCounterFn() + * + * def __init__(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, core.CombineFn) -> None + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_8counters_7Counter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_7Counter___init__, "Creates a Counter object.\n\n Args:\n name: the name of this counter. It may be a string,\n or a CounterName object.\n combine_fn: the CombineFn to use for aggregation\n "); +#if CYTHON_UPDATE_DESCRIPTOR_DOC +struct wrapperbase __pyx_wrapperbase_11apache_beam_5utils_8counters_7Counter___init__; +#endif +static int __pyx_pw_11apache_beam_5utils_8counters_7Counter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_combine_fn = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_combine_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 169, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 169, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 169, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 169, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 169, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 169, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_combine_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 169, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter___init__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self), __pyx_v_name, __pyx_v_combine_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_8counters_7Counter___init__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/counters.py":179 + * combine_fn: the CombineFn to use for aggregation + * """ + * self.name = name # <<<<<<<<<<<<<< + * self.combine_fn = combine_fn + * self.accumulator = combine_fn.create_accumulator() +*/ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "apache_beam/utils/counters.py":180 + * """ + * self.name = name + * self.combine_fn = combine_fn # <<<<<<<<<<<<<< + * self.accumulator = combine_fn.create_accumulator() + * self._add_input = self.combine_fn.add_input +*/ + __Pyx_INCREF(__pyx_v_combine_fn); + __Pyx_GIVEREF(__pyx_v_combine_fn); + __Pyx_GOTREF(__pyx_v_self->combine_fn); + __Pyx_DECREF(__pyx_v_self->combine_fn); + __pyx_v_self->combine_fn = __pyx_v_combine_fn; + + /* "apache_beam/utils/counters.py":181 + * self.name = name + * self.combine_fn = combine_fn + * self.accumulator = combine_fn.create_accumulator() # <<<<<<<<<<<<<< + * self._add_input = self.combine_fn.add_input + * +*/ + __pyx_t_2 = __pyx_v_combine_fn; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->accumulator); + __Pyx_DECREF(__pyx_v_self->accumulator); + __pyx_v_self->accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":182 + * self.combine_fn = combine_fn + * self.accumulator = combine_fn.create_accumulator() + * self._add_input = self.combine_fn.add_input # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_add_input); + __Pyx_DECREF(__pyx_v_self->_add_input); + __pyx_v_self->_add_input = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":169 + * DATAFLOW_DISTRIBUTION = cy_combiners.DataflowDistributionCounterFn() + * + * def __init__(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, core.CombineFn) -> None + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":184 + * self._add_input = self.combine_fn.add_input + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self._add_input(self.accumulator, value) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_5utils_8counters_7Counter_update(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_5utils_8counters_7Counter_3update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/utils/counters.py":185 + * + * def update(self, value): + * self.accumulator = self._add_input(self.accumulator, value) # <<<<<<<<<<<<<< + * + * def update_n(self, value, n): +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_add_input); + __pyx_t_4 = __pyx_v_self->_add_input; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_self->accumulator, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->accumulator); + __Pyx_DECREF(__pyx_v_self->accumulator); + __pyx_v_self->accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":184 + * self._add_input = self.combine_fn.add_input + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self._add_input(self.accumulator, value) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_3update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_3update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 184, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 184, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 184, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 184, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 184, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 184, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_2update(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_2update(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_5utils_8counters_7Counter_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":187 + * self.accumulator = self._add_input(self.accumulator, value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * """Update the counter with the same value N times""" + * for _ in range(n): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_5update_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_7Counter_4update_n, "Update the counter with the same value N times"); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_5update_n = {"update_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_5update_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_7Counter_4update_n}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_5update_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 187, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_n", 0) < (0)) __PYX_ERR(0, 187, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_n", 1, 2, 2, i); __PYX_ERR(0, 187, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 187, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 187, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 187, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.update_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_4update_n(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self), __pyx_v_value, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_4update_n(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_n) { + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_n", 0); + + /* "apache_beam/utils/counters.py":189 + * def update_n(self, value, n): + * """Update the counter with the same value N times""" + * for _ in range(n): # <<<<<<<<<<<<<< + * self.accumulator = self._add_input(self, value) + * +*/ + __pyx_t_2 = NULL; + __pyx_t_3 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 189, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":190 + * """Update the counter with the same value N times""" + * for _ in range(n): + * self.accumulator = self._add_input(self, value) # <<<<<<<<<<<<<< + * + * def reset(self, value): +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_self->_add_input); + __pyx_t_6 = __pyx_v_self->_add_input; + __pyx_t_3 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_3 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->accumulator); + __Pyx_DECREF(__pyx_v_self->accumulator); + __pyx_v_self->accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":189 + * def update_n(self, value, n): + * """Update the counter with the same value N times""" + * for _ in range(n): # <<<<<<<<<<<<<< + * self.accumulator = self._add_input(self, value) + * +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":187 + * self.accumulator = self._add_input(self.accumulator, value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * """Update the counter with the same value N times""" + * for _ in range(n): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.update_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":192 + * self.accumulator = self._add_input(self, value) + * + * def reset(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_7reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_7reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_7reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_7reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 192, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 192, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reset", 0) < (0)) __PYX_ERR(0, 192, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, i); __PYX_ERR(0, 192, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 192, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 192, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_6reset(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_6reset(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/utils/counters.py":193 + * + * def reset(self, value): + * self.accumulator = self.combine_fn.create_accumulator() # <<<<<<<<<<<<<< + * + * def value(self): +*/ + __pyx_t_2 = __pyx_v_self->combine_fn; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->accumulator); + __Pyx_DECREF(__pyx_v_self->accumulator); + __pyx_v_self->accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":192 + * self.accumulator = self._add_input(self, value) + * + * def reset(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":195 + * self.accumulator = self.combine_fn.create_accumulator() + * + * def value(self): # <<<<<<<<<<<<<< + * return self.combine_fn.extract_output(self.accumulator) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_9value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_9value = {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_9value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_9value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("value", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("value", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_8value(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_8value(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("value", 0); + + /* "apache_beam/utils/counters.py":196 + * + * def value(self): + * return self.combine_fn.extract_output(self.accumulator) # <<<<<<<<<<<<<< + * + * def __str__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->combine_fn; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->accumulator}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extract_output, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":195 + * self.accumulator = self.combine_fn.create_accumulator() + * + * def value(self): # <<<<<<<<<<<<<< + * return self.combine_fn.extract_output(self.accumulator) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":198 + * return self.combine_fn.extract_output(self.accumulator) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s>' % self._str_internal() + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_11__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_11__str__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_10__str__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10__str__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "apache_beam/utils/counters.py":199 + * + * def __str__(self): + * return '<%s>' % self._str_internal() # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str_internal, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":198 + * return self.combine_fn.extract_output(self.accumulator) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '<%s>' % self._str_internal() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":201 + * return '<%s>' % self._str_internal() + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_13__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_13__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_12__repr__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_12__repr__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/utils/counters.py":202 + * + * def __repr__(self): + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) # <<<<<<<<<<<<<< + * + * def _str_internal(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_str_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_2; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":201 + * return '<%s>' % self._str_internal() + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":204 + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * return '%s %s %s' % ( + * self.name, self.combine_fn.__class__.__name__, self.value()) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_15_str_internal(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_15_str_internal = {"_str_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_15_str_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_15_str_internal(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_str_internal (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_str_internal", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_str_internal", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_14_str_internal(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_14_str_internal(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_str_internal", 0); + + /* "apache_beam/utils/counters.py":205 + * + * def _str_internal(self): + * return '%s %s %s' % ( # <<<<<<<<<<<<<< + * self.name, self.combine_fn.__class__.__name__, self.value()) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/counters.py":206 + * def _str_internal(self): + * return '%s %s %s' % ( + * self.name, self.combine_fn.__class__.__name__, self.value()) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->combine_fn, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_4), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5[0] = __pyx_t_1; + __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_5[2] = __pyx_t_2; + __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_5[4] = __pyx_t_3; + + /* "apache_beam/utils/counters.py":205 + * + * def _str_internal(self): + * return '%s %s %s' % ( # <<<<<<<<<<<<<< + * self.name, self.combine_fn.__class__.__name__, self.value()) + * +*/ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/counters.py":204 + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * return '%s %s %s' % ( + * self.name, self.combine_fn.__class__.__name__, self.value()) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter._str_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":21 + * + * cdef class Counter(object): + * cdef readonly object name # <<<<<<<<<<<<<< + * cdef readonly object combine_fn + * cdef readonly object accumulator +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_4name_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_4name___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_4name___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":22 + * cdef class Counter(object): + * cdef readonly object name + * cdef readonly object combine_fn # <<<<<<<<<<<<<< + * cdef readonly object accumulator + * cdef readonly object _add_input +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_10combine_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_10combine_fn_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_10combine_fn___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10combine_fn___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->combine_fn); + __pyx_r = __pyx_v_self->combine_fn; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":23 + * cdef readonly object name + * cdef readonly object combine_fn + * cdef readonly object accumulator # <<<<<<<<<<<<<< + * cdef readonly object _add_input + * cpdef bint update(self, value) except -1 +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_11accumulator_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_11accumulator_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_11accumulator___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_11accumulator___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->accumulator); + __pyx_r = __pyx_v_self->accumulator; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":24 + * cdef readonly object combine_fn + * cdef readonly object accumulator + * cdef readonly object _add_input # <<<<<<<<<<<<<< + * cpdef bint update(self, value) except -1 + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_10_add_input_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_10_add_input_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_10_add_input___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_10_add_input___get__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_add_input); + __pyx_r = __pyx_v_self->_add_input; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_16__reduce_cython__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_16__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._add_input, self.accumulator, self.combine_fn, self.name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_add_input); + __Pyx_GIVEREF(__pyx_v_self->_add_input); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_add_input) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->accumulator); + __Pyx_GIVEREF(__pyx_v_self->accumulator); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->accumulator) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->combine_fn); + __Pyx_GIVEREF(__pyx_v_self->combine_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->combine_fn) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._add_input, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._add_input, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._add_input is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._add_input, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._add_input is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->_add_input != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->accumulator != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->combine_fn != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->name != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._add_input is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._add_input is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Counter); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_114471469); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_114471469); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_114471469) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._add_input is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, None), state + * else: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Counter__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Counter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_114471469); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_114471469); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_114471469) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Counter__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_7Counter_18__setstate_cython__(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_7Counter_18__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Counter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_Counter__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Counter__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.Counter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":211 + * class AccumulatorCombineFnCounter(Counter): + * """Counter optimized for a mutating accumulator that holds all the logic.""" + * def __init__(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, cy_combiners.AccumulatorCombineFn) -> None + * assert isinstance(combine_fn, cy_combiners.AccumulatorCombineFn) +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_combine_fn = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_combine_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 211, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) + } + __pyx_v_name = values[0]; + __pyx_v_combine_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter___init__(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self), __pyx_v_name, __pyx_v_combine_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter___init__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/counters.py":213 + * def __init__(self, name, combine_fn): + * # type: (CounterName, cy_combiners.AccumulatorCombineFn) -> None + * assert isinstance(combine_fn, cy_combiners.AccumulatorCombineFn) # <<<<<<<<<<<<<< + * super().__init__(name, combine_fn) + * self.reset() +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_combine_fn, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 213, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 213, __pyx_L1_error) + #endif + + /* "apache_beam/utils/counters.py":214 + * # type: (CounterName, cy_combiners.AccumulatorCombineFn) -> None + * assert isinstance(combine_fn, cy_combiners.AccumulatorCombineFn) + * super().__init__(name, combine_fn) # <<<<<<<<<<<<<< + * self.reset() + * +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), ((PyObject *)__pyx_v_self)}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_1 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_name, __pyx_v_combine_fn}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":215 + * assert isinstance(combine_fn, cy_combiners.AccumulatorCombineFn) + * super().__init__(name, combine_fn) + * self.reset() # <<<<<<<<<<<<<< + * + * def update(self, value): +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":211 + * class AccumulatorCombineFnCounter(Counter): + * """Counter optimized for a mutating accumulator that holds all the logic.""" + * def __init__(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, cy_combiners.AccumulatorCombineFn) -> None + * assert isinstance(combine_fn, cy_combiners.AccumulatorCombineFn) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":217 + * self.reset() + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._fast_add_input(value) + * +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_update(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/utils/counters.py":218 + * + * def update(self, value): + * self._fast_add_input(value) # <<<<<<<<<<<<<< + * + * def update_n(self, value, n): +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_fast_add_input); + __pyx_t_4 = __pyx_v_self->_fast_add_input; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":217 + * self.reset() + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._fast_add_input(value) + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update = {"update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 217, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 217, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update", 0) < (0)) __PYX_ERR(0, 217, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, i); __PYX_ERR(0, 217, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 217, __pyx_L3_error) + } + __pyx_v_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 217, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_2update(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self), __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_2update(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.update", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":220 + * self._fast_add_input(value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * self._fast_add_input_n(value, n) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n = {"update_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_n = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("update_n (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_n,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 220, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 220, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_n", 0) < (0)) __PYX_ERR(0, 220, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_n", 1, 2, 2, i); __PYX_ERR(0, 220, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 220, __pyx_L3_error) + } + __pyx_v_value = values[0]; + __pyx_v_n = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("update_n", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 220, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.update_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_4update_n(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self), __pyx_v_value, __pyx_v_n); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_4update_n(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_n) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("update_n", 0); + + /* "apache_beam/utils/counters.py":221 + * + * def update_n(self, value, n): + * self._fast_add_input_n(value, n) # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->_fast_add_input_n); + __pyx_t_3 = __pyx_v_self->_fast_add_input_n; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_value, __pyx_v_n}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":220 + * self._fast_add_input(value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * self._fast_add_input_n(value, n) + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.update_n", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":223 + * self._fast_add_input_n(value, n) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * self._fast_add_input = self.accumulator.add_input +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_6reset(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_6reset(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/utils/counters.py":224 + * + * def reset(self): + * self.accumulator = self.combine_fn.create_accumulator() # <<<<<<<<<<<<<< + * self._fast_add_input = self.accumulator.add_input + * self._fast_add_input_n = self.accumulator.add_input_n +*/ + __pyx_t_2 = __pyx_v_self->__pyx_base.combine_fn; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_accumulator, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx_base.accumulator); + __Pyx_DECREF(__pyx_v_self->__pyx_base.accumulator); + __pyx_v_self->__pyx_base.accumulator = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":225 + * def reset(self): + * self.accumulator = self.combine_fn.create_accumulator() + * self._fast_add_input = self.accumulator.add_input # <<<<<<<<<<<<<< + * self._fast_add_input_n = self.accumulator.add_input_n + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.accumulator, __pyx_mstate_global->__pyx_n_u_add_input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_fast_add_input); + __Pyx_DECREF(__pyx_v_self->_fast_add_input); + __pyx_v_self->_fast_add_input = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":226 + * self.accumulator = self.combine_fn.create_accumulator() + * self._fast_add_input = self.accumulator.add_input + * self._fast_add_input_n = self.accumulator.add_input_n # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.accumulator, __pyx_mstate_global->__pyx_n_u_add_input_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_fast_add_input_n); + __Pyx_DECREF(__pyx_v_self->_fast_add_input_n); + __pyx_v_self->_fast_add_input_n = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":223 + * self._fast_add_input_n(value, n) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * self._fast_add_input = self.accumulator.add_input +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":29 + * + * cdef class AccumulatorCombineFnCounter(Counter): + * cdef readonly object _fast_add_input # <<<<<<<<<<<<<< + * cdef readonly object _fast_add_input_n +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input___get__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_fast_add_input); + __pyx_r = __pyx_v_self->_fast_add_input; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.pxd":30 + * cdef class AccumulatorCombineFnCounter(Counter): + * cdef readonly object _fast_add_input + * cdef readonly object _fast_add_input_n # <<<<<<<<<<<<<< +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n___get__(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n___get__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_fast_add_input_n); + __pyx_r = __pyx_v_self->_fast_add_input_n; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_8__reduce_cython__(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_8__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._add_input, self._fast_add_input, self._fast_add_input_n, self.accumulator, self.combine_fn, self.name) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base._add_input); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base._add_input); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._add_input) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_fast_add_input); + __Pyx_GIVEREF(__pyx_v_self->_fast_add_input); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_fast_add_input) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_fast_add_input_n); + __Pyx_GIVEREF(__pyx_v_self->_fast_add_input_n); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_fast_add_input_n) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.accumulator); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.accumulator); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.accumulator) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.combine_fn); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.combine_fn); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.combine_fn) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->__pyx_base.name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._add_input, self._fast_add_input, self._fast_add_input_n, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._add_input, self._fast_add_input, self._fast_add_input_n, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._add_input is not None or self._fast_add_input is not None or self._fast_add_input_n is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._add_input, self._fast_add_input, self._fast_add_input_n, self.accumulator, self.combine_fn, self.name) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._add_input is not None or self._fast_add_input is not None or self._fast_add_input_n is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, None), state +*/ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->__pyx_base._add_input != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_fast_add_input != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->_fast_add_input_n != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.accumulator != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.combine_fn != Py_None); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->__pyx_base.name != Py_None); + __pyx_t_2 = __pyx_t_3; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._add_input is not None or self._fast_add_input is not None or self._fast_add_input_n is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._add_input is not None or self._fast_add_input is not None or self._fast_add_input_n is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AccumulatorCombin); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_5281864); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_5281864); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_5281864) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._add_input is not None or self._fast_add_input is not None or self._fast_add_input_n is not None or self.accumulator is not None or self.combine_fn is not None or self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, None), state + * else: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AccumulatorCombin); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_5281864); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_5281864); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_5281864) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_10__setstate_cython__(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_10__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_AccumulatorCombineFnCounter__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.counters.AccumulatorCombineFnCounter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":231 + * class CounterFactory(object): + * """Keeps track of unique counters.""" + * def __init__(self): # <<<<<<<<<<<<<< + * self.counters = {} # type: Dict[CounterName, Counter] + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 231, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 231, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 231, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 231, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 231, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 231, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_14CounterFactory___init__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/counters.py":232 + * """Keeps track of unique counters.""" + * def __init__(self): + * self.counters = {} # type: Dict[CounterName, Counter] # <<<<<<<<<<<<<< + * + * # Lock to be acquired when accessing the counters map. +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters, __pyx_t_1) < (0)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":235 + * + * # Lock to be acquired when accessing the counters map. + * self._lock = threading.Lock() # <<<<<<<<<<<<<< + * + * def get_counter(self, name, combine_fn): +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":231 + * class CounterFactory(object): + * """Keeps track of unique counters.""" + * def __init__(self): # <<<<<<<<<<<<<< + * self.counters = {} # type: Dict[CounterName, Counter] + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":237 + * self._lock = threading.Lock() + * + * def get_counter(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, core.CombineFn) -> Counter + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_3get_counter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_14CounterFactory_2get_counter, "Returns a counter with the requested name.\n\n Passing in the same name will return the same counter; the\n combine_fn must agree.\n\n Args:\n name: the name of this counter. Typically has three parts:\n \"step-output-counter\".\n combine_fn: the CombineFn to use for aggregation\n Returns:\n A new or existing counter with the requested name.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_3get_counter = {"get_counter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_3get_counter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_14CounterFactory_2get_counter}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_3get_counter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_combine_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_counter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_combine_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 237, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 237, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 237, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 237, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_counter", 0) < (0)) __PYX_ERR(0, 237, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_counter", 1, 3, 3, i); __PYX_ERR(0, 237, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 237, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 237, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 237, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_name = values[1]; + __pyx_v_combine_fn = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_counter", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 237, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_2get_counter(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_combine_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_2get_counter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_combine_fn) { + PyObject *__pyx_v_counter = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_counter", 0); + + /* "apache_beam/utils/counters.py":252 + * A new or existing counter with the requested name. + * """ + * with self._lock: # <<<<<<<<<<<<<< + * counter = self.counters.get(name, None) + * if counter: +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/utils/counters.py":253 + * """ + * with self._lock: + * counter = self.counters.get(name, None) # <<<<<<<<<<<<<< + * if counter: + * assert counter.combine_fn == combine_fn +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_name, Py_None}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_counter = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":254 + * with self._lock: + * counter = self.counters.get(name, None) + * if counter: # <<<<<<<<<<<<<< + * assert counter.combine_fn == combine_fn + * else: +*/ + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_counter); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 254, __pyx_L7_error) + if (__pyx_t_10) { + + /* "apache_beam/utils/counters.py":255 + * counter = self.counters.get(name, None) + * if counter: + * assert counter.combine_fn == combine_fn # <<<<<<<<<<<<<< + * else: + * if isinstance(combine_fn, cy_combiners.AccumulatorCombineFn): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_counter, __pyx_mstate_global->__pyx_n_u_combine_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_v_combine_fn, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 255, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_10)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 255, __pyx_L7_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 255, __pyx_L7_error) + #endif + + /* "apache_beam/utils/counters.py":254 + * with self._lock: + * counter = self.counters.get(name, None) + * if counter: # <<<<<<<<<<<<<< + * assert counter.combine_fn == combine_fn + * else: +*/ + goto __pyx_L13; + } + + /* "apache_beam/utils/counters.py":257 + * assert counter.combine_fn == combine_fn + * else: + * if isinstance(combine_fn, cy_combiners.AccumulatorCombineFn): # <<<<<<<<<<<<<< + * counter = AccumulatorCombineFnCounter(name, combine_fn) + * else: +*/ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_10 = PyObject_IsInstance(__pyx_v_combine_fn, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 257, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_10) { + + /* "apache_beam/utils/counters.py":258 + * else: + * if isinstance(combine_fn, cy_combiners.AccumulatorCombineFn): + * counter = AccumulatorCombineFnCounter(name, combine_fn) # <<<<<<<<<<<<<< + * else: + * counter = Counter(name, combine_fn) +*/ + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_combine_fn}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L7_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_DECREF_SET(__pyx_v_counter, ((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":257 + * assert counter.combine_fn == combine_fn + * else: + * if isinstance(combine_fn, cy_combiners.AccumulatorCombineFn): # <<<<<<<<<<<<<< + * counter = AccumulatorCombineFnCounter(name, combine_fn) + * else: +*/ + goto __pyx_L14; + } + + /* "apache_beam/utils/counters.py":260 + * counter = AccumulatorCombineFnCounter(name, combine_fn) + * else: + * counter = Counter(name, combine_fn) # <<<<<<<<<<<<<< + * self.counters[name] = counter + * return counter +*/ + /*else*/ { + __pyx_t_5 = NULL; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_name, __pyx_v_combine_fn}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L7_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_DECREF_SET(__pyx_v_counter, ((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + } + __pyx_L14:; + + /* "apache_beam/utils/counters.py":261 + * else: + * counter = Counter(name, combine_fn) + * self.counters[name] = counter # <<<<<<<<<<<<<< + * return counter + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_counter) < 0))) __PYX_ERR(0, 261, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L13:; + + /* "apache_beam/utils/counters.py":262 + * counter = Counter(name, combine_fn) + * self.counters[name] = counter + * return counter # <<<<<<<<<<<<<< + * + * def reset(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_counter); + __pyx_r = __pyx_v_counter; + goto __pyx_L11_try_return; + + /* "apache_beam/utils/counters.py":252 + * A new or existing counter with the requested name. + * """ + * with self._lock: # <<<<<<<<<<<<<< + * counter = self.counters.get(name, None) + * if counter: +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 252, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 252, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_10 < (0)) __PYX_ERR(0, 252, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_10); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 252, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_9 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_2) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L18; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "apache_beam/utils/counters.py":237 + * self._lock = threading.Lock() + * + * def get_counter(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, core.CombineFn) -> Counter + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_counter); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":264 + * return counter + * + * def reset(self): # <<<<<<<<<<<<<< + * # Counters are cached in state sampler states. + * with self._lock: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_5reset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_5reset = {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_5reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_5reset(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reset (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 264, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 264, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reset", 0) < (0)) __PYX_ERR(0, 264, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, i); __PYX_ERR(0, 264, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 264, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 264, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_4reset(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_4reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_v_counter = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reset", 0); + + /* "apache_beam/utils/counters.py":266 + * def reset(self): + * # Counters are cached in state sampler states. + * with self._lock: # <<<<<<<<<<<<<< + * for counter in self.counters.values(): + * counter.reset() +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/utils/counters.py":267 + * # Counters are cached in state sampler states. + * with self._lock: + * for counter in self.counters.values(): # <<<<<<<<<<<<<< + * counter.reset() + * +*/ + __pyx_t_10 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 267, __pyx_L7_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_11, &__pyx_t_10, NULL, &__pyx_t_5, NULL, __pyx_t_12); + if (unlikely(__pyx_t_13 == 0)) break; + if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 267, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_counter, __pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/utils/counters.py":268 + * with self._lock: + * for counter in self.counters.values(): + * counter.reset() # <<<<<<<<<<<<<< + * + * def get_counters(self): +*/ + __pyx_t_3 = __pyx_v_counter; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reset, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/counters.py":266 + * def reset(self): + * # Counters are cached in state sampler states. + * with self._lock: # <<<<<<<<<<<<<< + * for counter in self.counters.values(): + * counter.reset() +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 266, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 266, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (__pyx_t_15 < (0)) __PYX_ERR(0, 266, __pyx_L9_except_error) + __pyx_t_16 = (!__pyx_t_15); + if (unlikely(__pyx_t_16)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 266, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L18; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "apache_beam/utils/counters.py":264 + * return counter + * + * def reset(self): # <<<<<<<<<<<<<< + * # Counters are cached in state sampler states. + * with self._lock: +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_counter); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/counters.py":270 + * counter.reset() + * + * def get_counters(self): # <<<<<<<<<<<<<< + * """Returns the current set of counters. + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_7get_counters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_8counters_14CounterFactory_6get_counters, "Returns the current set of counters.\n\n Returns:\n An iterable that contains the current set of counters. To make sure that\n multiple threads can iterate over the set of counters, we return a new\n iterable here. Note that the actual set of counters may get modified after\n this method returns hence the returned iterable may be stale.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_7get_counters = {"get_counters", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_7get_counters, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_14CounterFactory_6get_counters}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_14CounterFactory_7get_counters(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_counters (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 270, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_counters", 0) < (0)) __PYX_ERR(0, 270, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_counters", 1, 1, 1, i); __PYX_ERR(0, 270, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 270, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_counters", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 270, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_6get_counters(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_14CounterFactory_6get_counters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_counters", 0); + + /* "apache_beam/utils/counters.py":279 + * this method returns hence the returned iterable may be stale. + * """ + * with self._lock: # <<<<<<<<<<<<<< + * return self.counters.values() # pylint: disable=bad-option-value +*/ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "apache_beam/utils/counters.py":280 + * """ + * with self._lock: + * return self.counters.values() # pylint: disable=bad-option-value # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_counters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L11_try_return; + + /* "apache_beam/utils/counters.py":279 + * this method returns hence the returned iterable may be stale. + * """ + * with self._lock: # <<<<<<<<<<<<<< + * return self.counters.values() # pylint: disable=bad-option-value +*/ + } + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 279, __pyx_L9_except_error) + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 279, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (__pyx_t_11 < (0)) __PYX_ERR(0, 279, __pyx_L9_except_error) + __pyx_t_12 = (!__pyx_t_11); + if (unlikely(__pyx_t_12)) { + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 279, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L11_try_return:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L4_return; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + goto __pyx_L6; + } + __pyx_L4_return: { + __pyx_t_9 = __pyx_r; + __pyx_r = 0; + if (__pyx_t_2) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "apache_beam/utils/counters.py":270 + * counter.reset() + * + * def get_counters(self): # <<<<<<<<<<<<<< + * """Returns the current set of counters. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.counters.CounterFactory.get_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Counter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_5__pyx_unpickle_Counter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_5__pyx_unpickle_Counter = {"__pyx_unpickle_Counter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_5__pyx_unpickle_Counter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_5__pyx_unpickle_Counter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Counter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Counter", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Counter", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Counter", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_Counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_4__pyx_unpickle_Counter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_4__pyx_unpickle_Counter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Counter", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_Counter(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') # <<<<<<<<<<<<<< + * __pyx_result = Counter.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, __pyx_k_add_input_accumulator_combine_f); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') + * __pyx_result = Counter.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') + * __pyx_result = Counter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = Counter.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_Counter__set_state(((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') + * __pyx_result = Counter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result.accumulator = __pyx_state[1]; __pyx_result.combine_fn = __pyx_state[2]; __pyx_result.name = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Counter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_Counter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._add_input = __pyx_state[0]; __pyx_result.accumulator = __pyx_state[1]; __pyx_result.combine_fn = __pyx_state[2]; __pyx_result.name = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_Counter__set_state(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Counter__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result.accumulator = __pyx_state[1]; __pyx_result.combine_fn = __pyx_state[2]; __pyx_result.name = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_add_input); + __Pyx_DECREF(__pyx_v___pyx_result->_add_input); + __pyx_v___pyx_result->_add_input = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->accumulator); + __Pyx_DECREF(__pyx_v___pyx_result->accumulator); + __pyx_v___pyx_result->accumulator = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->combine_fn); + __Pyx_DECREF(__pyx_v___pyx_result->combine_fn); + __pyx_v___pyx_result->combine_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result.accumulator = __pyx_state[1]; __pyx_result.combine_fn = __pyx_state[2]; __pyx_result.name = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_Counter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Counter__set_state(Counter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._add_input = __pyx_state[0]; __pyx_result.accumulator = __pyx_state[1]; __pyx_result.combine_fn = __pyx_state[2]; __pyx_result.name = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_Counter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AccumulatorCombineFnCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7__pyx_unpickle_AccumulatorCombineFnCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_8counters_7__pyx_unpickle_AccumulatorCombineFnCounter = {"__pyx_unpickle_AccumulatorCombineFnCounter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7__pyx_unpickle_AccumulatorCombineFnCounter, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_8counters_7__pyx_unpickle_AccumulatorCombineFnCounter(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_AccumulatorCombineFnCounter (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_AccumulatorCombineFnCounter", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AccumulatorCombineFnCounter", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AccumulatorCombineFnCounter", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_AccumulatorCombineFnCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_8counters_6__pyx_unpickle_AccumulatorCombineFnCounter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_8counters_6__pyx_unpickle_AccumulatorCombineFnCounter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AccumulatorCombineFnCounter", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_AccumulatorCombineFnCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') # <<<<<<<<<<<<<< + * __pyx_result = AccumulatorCombineFnCounter.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, __pyx_k_add_input__fast_add_input__fast); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') + * __pyx_result = AccumulatorCombineFnCounter.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') + * __pyx_result = AccumulatorCombineFnCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = AccumulatorCombineFnCounter.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(1, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_AccumulatorCombineFnCounter__set_state(((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') + * __pyx_result = AccumulatorCombineFnCounter.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result._fast_add_input = __pyx_state[1]; __pyx_result._fast_add_input_n = __pyx_state[2]; __pyx_result.accumulator = __pyx_state[3]; __pyx_result.combine_fn = __pyx_state[4]; __pyx_result.name = __pyx_state[5] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_AccumulatorCombineFnCounter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0509848, 0x817ddac, 0xd0882c2, b'_add_input, _fast_add_input, _fast_add_input_n, accumulator, combine_fn, name') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_AccumulatorCombineFnCounter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._add_input = __pyx_state[0]; __pyx_result._fast_add_input = __pyx_state[1]; __pyx_result._fast_add_input_n = __pyx_state[2]; __pyx_result.accumulator = __pyx_state[3]; __pyx_result.combine_fn = __pyx_state[4]; __pyx_result.name = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + +static PyObject *__pyx_f_11apache_beam_5utils_8counters___pyx_unpickle_AccumulatorCombineFnCounter__set_state(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_AccumulatorCombineFnCounter__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result._fast_add_input = __pyx_state[1]; __pyx_result._fast_add_input_n = __pyx_state[2]; __pyx_result.accumulator = __pyx_state[3]; __pyx_result.combine_fn = __pyx_state[4]; __pyx_result.name = __pyx_state[5] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._add_input); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._add_input); + __pyx_v___pyx_result->__pyx_base._add_input = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_fast_add_input); + __Pyx_DECREF(__pyx_v___pyx_result->_fast_add_input); + __pyx_v___pyx_result->_fast_add_input = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_fast_add_input_n); + __Pyx_DECREF(__pyx_v___pyx_result->_fast_add_input_n); + __pyx_v___pyx_result->_fast_add_input_n = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.accumulator); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.accumulator); + __pyx_v___pyx_result->__pyx_base.accumulator = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.combine_fn); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.combine_fn); + __pyx_v___pyx_result->__pyx_base.combine_fn = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name); + __pyx_v___pyx_result->__pyx_base.name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): + * __pyx_result._add_input = __pyx_state[0]; __pyx_result._fast_add_input = __pyx_state[1]; __pyx_result._fast_add_input_n = __pyx_state[2]; __pyx_result.accumulator = __pyx_state[3]; __pyx_result.combine_fn = __pyx_state[4]; __pyx_result.name = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_AccumulatorCombineFnCounter__set_state(AccumulatorCombineFnCounter __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._add_input = __pyx_state[0]; __pyx_result._fast_add_input = __pyx_state[1]; __pyx_result._fast_add_input_n = __pyx_state[2]; __pyx_result.accumulator = __pyx_state[3]; __pyx_result.combine_fn = __pyx_state[4]; __pyx_result.name = __pyx_state[5] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 6) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.counters.__pyx_unpickle_AccumulatorCombineFnCounter__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter __pyx_vtable_11apache_beam_5utils_8counters_Counter; + +static PyObject *__pyx_tp_new_11apache_beam_5utils_8counters_Counter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_5utils_8counters_Counter; + p->name = Py_None; Py_INCREF(Py_None); + p->combine_fn = Py_None; Py_INCREF(Py_None); + p->accumulator = Py_None; Py_INCREF(Py_None); + p->_add_input = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_8counters_Counter(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_8counters_Counter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name); + Py_CLEAR(p->combine_fn); + Py_CLEAR(p->accumulator); + Py_CLEAR(p->_add_input); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_5utils_8counters_Counter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + if (p->combine_fn) { + e = (*v)(p->combine_fn, a); if (e) return e; + } + if (p->accumulator) { + e = (*v)(p->accumulator, a); if (e) return e; + } + if (p->_add_input) { + e = (*v)(p->_add_input, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_5utils_8counters_Counter(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_5utils_8counters_Counter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_Counter *)o; + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->combine_fn); + p->combine_fn = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->accumulator); + p->accumulator = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_add_input); + p->_add_input = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_7Counter_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_7Counter_4name_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_7Counter_combine_fn(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_7Counter_10combine_fn_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_7Counter_accumulator(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_7Counter_11accumulator_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_7Counter__add_input(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_7Counter_10_add_input_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_8counters_Counter[] = { + {"update_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_5update_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_8counters_7Counter_4update_n}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_7reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_9value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"_str_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_15_str_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_8counters_Counter[] = { + {"name", __pyx_getprop_11apache_beam_5utils_8counters_7Counter_name, 0, 0, 0}, + {"combine_fn", __pyx_getprop_11apache_beam_5utils_8counters_7Counter_combine_fn, 0, 0, 0}, + {"accumulator", __pyx_getprop_11apache_beam_5utils_8counters_7Counter_accumulator, 0, 0, 0}, + {"_add_input", __pyx_getprop_11apache_beam_5utils_8counters_7Counter__add_input, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_8counters_Counter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_8counters_Counter}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_5utils_8counters_7Counter_13__repr__}, + {Py_tp_str, (void *)__pyx_pw_11apache_beam_5utils_8counters_7Counter_11__str__}, + {Py_tp_doc, (void *)PyDoc_STR("A counter aggregates a series of values.\n\n The aggregation kind of the Counter is specified when the Counter\n is created. The values aggregated must be of an appropriate for the\n aggregation used. Aggregations supported are listed in the code.\n\n (The aggregated value will be reported to the Dataflow service.)\n\n Do not create directly; call CounterFactory.get_counter instead.\n\n Attributes:\n name: the name of the counter, a string\n combine_fn: the CombineFn to use for aggregation\n accumulator: the accumulator created for the combine_fn\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_8counters_Counter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_5utils_8counters_Counter}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_8counters_Counter}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_8counters_Counter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_8counters_7Counter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_8counters_Counter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_8counters_Counter_spec = { + "apache_beam.utils.counters.Counter", + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_8counters_Counter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_8counters_Counter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.counters.""Counter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_Counter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_8counters_Counter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_5utils_8counters_7Counter_13__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pw_11apache_beam_5utils_8counters_7Counter_11__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A counter aggregates a series of values.\n\n The aggregation kind of the Counter is specified when the Counter\n is created. The values aggregated must be of an appropriate for the\n aggregation used. Aggregations supported are listed in the code.\n\n (The aggregated value will be reported to the Dataflow service.)\n\n Do not create directly; call CounterFactory.get_counter instead.\n\n Attributes:\n name: the name of the counter, a string\n combine_fn: the CombineFn to use for aggregation\n accumulator: the accumulator created for the combine_fn\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_8counters_Counter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_5utils_8counters_Counter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_8counters_Counter, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_8counters_Counter, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_8counters_7Counter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_8counters_Counter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter __pyx_vtable_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + +static PyObject *__pyx_tp_new_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *p; + PyObject *o = __pyx_tp_new_11apache_beam_5utils_8counters_Counter(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_5utils_8counters_Counter*)__pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + p->_fast_add_input = Py_None; Py_INCREF(Py_None); + p->_fast_add_input_n = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_fast_add_input); + Py_CLEAR(p->_fast_add_input_n); + PyObject_GC_Track(o); + __pyx_tp_dealloc_11apache_beam_5utils_8counters_Counter(o); +} + +static int __pyx_tp_traverse_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)o; + e = __pyx_tp_traverse_11apache_beam_5utils_8counters_Counter(o, v, a); if (e) return e; + if (p->_fast_add_input) { + e = (*v)(p->_fast_add_input, a); if (e) return e; + } + if (p->_fast_add_input_n) { + e = (*v)(p->_fast_add_input_n, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *p = (struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter *)o; + __pyx_tp_clear_11apache_beam_5utils_8counters_Counter(o); + tmp = ((PyObject*)p->_fast_add_input); + p->_fast_add_input = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_fast_add_input_n); + p->_fast_add_input_n = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter__fast_add_input(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_15_fast_add_input_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter__fast_add_input_n(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_17_fast_add_input_n_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter[] = { + {"update_n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter[] = { + {"_fast_add_input", __pyx_getprop_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter__fast_add_input, 0, 0, 0}, + {"_fast_add_input_n", __pyx_getprop_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter__fast_add_input_n, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {Py_tp_doc, (void *)PyDoc_STR("Counter optimized for a mutating accumulator that holds all the logic.")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter_spec = { + "apache_beam.utils.counters.AccumulatorCombineFnCounter", + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.counters.""AccumulatorCombineFnCounter", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_5utils_8counters_7Counter_13__repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY || 0 + __pyx_pw_11apache_beam_5utils_8counters_7Counter_11__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Counter optimized for a mutating accumulator that holds all the logic."), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_11apache_beam_5utils_8counters_Counter = &__pyx_vtable_11apache_beam_5utils_8counters_Counter; + __pyx_vtable_11apache_beam_5utils_8counters_Counter.update = (int (*)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_5utils_8counters_7Counter_update; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_8counters_Counter_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter)) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_8counters_Counter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter = &__pyx_type_11apache_beam_5utils_8counters_Counter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_UPDATE_DESCRIPTOR_DOC + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { + __pyx_wrapperbase_11apache_beam_5utils_8counters_7Counter___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_11apache_beam_5utils_8counters_7Counter___init__.doc = __pyx_doc_11apache_beam_5utils_8counters_7Counter___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11apache_beam_5utils_8counters_7Counter___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_vtabptr_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Counter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_Counter) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = &__pyx_vtable_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + __pyx_vtable_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter.__pyx_base = *__pyx_vtabptr_11apache_beam_5utils_8counters_Counter; + __pyx_vtable_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter.__pyx_base.update = (int (*)(struct __pyx_obj_11apache_beam_5utils_8counters_Counter *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_update; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter)) __PYX_ERR(0, 209, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter = &__pyx_type_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_vtabptr_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_counters(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_counters}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "counters", + __pyx_k_Counters_collect_the_progress_of, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_counters(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_counters(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_counters(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'counters' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "counters" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_counters", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__utils__counters) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.utils.counters")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.utils.counters", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/utils/counters.py":28 + * # pytype: skip-file + * + * import threading # <<<<<<<<<<<<<< + * from collections import namedtuple + * from typing import TYPE_CHECKING +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":29 + * + * import threading + * from collections import namedtuple # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Dict +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":30 + * import threading + * from collections import namedtuple + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Dict + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":31 + * from collections import namedtuple + * from typing import TYPE_CHECKING + * from typing import Dict # <<<<<<<<<<<<<< + * + * from apache_beam.transforms import cy_combiners +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Dict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":33 + * from typing import Dict + * + * from apache_beam.transforms import cy_combiners # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cy_combiners}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cy_combiners}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":35 + * from apache_beam.transforms import cy_combiners + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.transforms import core + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "apache_beam/utils/counters.py":36 + * + * if TYPE_CHECKING: + * from apache_beam.transforms import core # <<<<<<<<<<<<<< + * + * # Information identifying the IO being measured by a counter. +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_core}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":35 + * from apache_beam.transforms import cy_combiners + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.transforms import core + * +*/ + } + + /* "apache_beam/utils/counters.py":46 + * # side inputs. The way in which each is represented is explained in the + * # documentation of the side_input_id, and shuffle_id functions. + * IOTargetName = namedtuple( # <<<<<<<<<<<<<< + * 'IOTargetName', ['requesting_step_name', 'input_index']) + * +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "apache_beam/utils/counters.py":47 + * # documentation of the side_input_id, and shuffle_id functions. + * IOTargetName = namedtuple( + * 'IOTargetName', ['requesting_step_name', 'input_index']) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_7 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_requesting_step_name, __pyx_mstate_global->__pyx_n_u_input_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IOTargetName, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IOTargetName, __pyx_t_2) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":50 + * + * + * def side_input_id(step_name, input_index): # <<<<<<<<<<<<<< + * # type: (str, int) -> IOTargetName + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_1side_input_id, 0, __pyx_mstate_global->__pyx_n_u_side_input_id, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_side_input_id, __pyx_t_2) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":67 + * + * + * def shuffle_id(step_name): # <<<<<<<<<<<<<< + * # type: (str) -> IOTargetName + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_3shuffle_id, 0, __pyx_mstate_global->__pyx_n_u_shuffle_id, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_shuffle_id, __pyx_t_2) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":86 + * + * + * _CounterName = namedtuple( # <<<<<<<<<<<<<< + * '_CounterName', + * [ +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/utils/counters.py":88 + * _CounterName = namedtuple( + * '_CounterName', + * [ # <<<<<<<<<<<<<< + * 'name', + * 'stage_name', +*/ + __pyx_t_4 = __Pyx_PyList_Pack(8, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_stage_name, __pyx_mstate_global->__pyx_n_u_step_name, __pyx_mstate_global->__pyx_n_u_system_name, __pyx_mstate_global->__pyx_n_u_namespace, __pyx_mstate_global->__pyx_n_u_origin, __pyx_mstate_global->__pyx_n_u_output_index, __pyx_mstate_global->__pyx_n_u_io_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CounterName_3, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CounterName_3, __pyx_t_2) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":100 + * + * + * class CounterName(_CounterName): # <<<<<<<<<<<<<< + * """Naming information for a counter.""" + * SYSTEM = object() +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CounterName_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_CounterName, __pyx_mstate_global->__pyx_n_u_CounterName, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_kp_u_Naming_information_for_a_counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_t_7) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "apache_beam/utils/counters.py":102 + * class CounterName(_CounterName): + * """Naming information for a counter.""" + * SYSTEM = object() # <<<<<<<<<<<<<< + * USER = object() + * +*/ + __pyx_t_10 = NULL; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SYSTEM, __pyx_t_9) < (0)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":103 + * """Naming information for a counter.""" + * SYSTEM = object() + * USER = object() # <<<<<<<<<<<<<< + * + * def __new__( +*/ + __pyx_t_10 = NULL; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_USER, __pyx_t_9) < (0)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":105 + * USER = object() + * + * def __new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_11CounterName_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_CounterName___new, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + PyList_Append(__pyx_t_7, __pyx_t_9); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1]); + if (__Pyx_SetNewInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_9) < (0)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":127 + * io_target) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_11CounterName_3__repr__, 0, __pyx_mstate_global->__pyx_n_u_CounterName___repr, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_9) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":130 + * return ' at %s>' % (self._str_internal(), hex(id(self))) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return self._str_internal() + * +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_11CounterName_5__str__, 0, __pyx_mstate_global->__pyx_n_u_CounterName___str, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_9) < (0)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":133 + * return self._str_internal() + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * if self.origin == CounterName.USER: + * return 'user-%s-%s' % (self.step_name, self.name) +*/ + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_11CounterName_7_str_internal, 0, __pyx_mstate_global->__pyx_n_u_CounterName__str_internal, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str_internal, __pyx_t_9) < (0)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "apache_beam/utils/counters.py":100 + * + * + * class CounterName(_CounterName): # <<<<<<<<<<<<<< + * """Naming information for a counter.""" + * SYSTEM = object() +*/ + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CounterName, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); + #endif + if (__Pyx_CyFunction_InitClassCell(__pyx_t_7, __pyx_t_9) < (0)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CounterName, __pyx_t_9) < (0)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":160 + * + * # Handy references to common counters. + * SUM = cy_combiners.SumInt64Fn() # <<<<<<<<<<<<<< + * MEAN = cy_combiners.MeanInt64Fn() + * BEAM_DISTRIBUTION = cy_combiners.DistributionInt64Fn() +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SumInt64Fn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_SUM, __pyx_t_2) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":161 + * # Handy references to common counters. + * SUM = cy_combiners.SumInt64Fn() + * MEAN = cy_combiners.MeanInt64Fn() # <<<<<<<<<<<<<< + * BEAM_DISTRIBUTION = cy_combiners.DistributionInt64Fn() + * +*/ + __pyx_t_9 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MeanInt64Fn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_MEAN, __pyx_t_2) < (0)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":162 + * SUM = cy_combiners.SumInt64Fn() + * MEAN = cy_combiners.MeanInt64Fn() + * BEAM_DISTRIBUTION = cy_combiners.DistributionInt64Fn() # <<<<<<<<<<<<<< + * + * # Dataflow Distribution Accumulator Fn. +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DistributionInt64Fn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_BEAM_DISTRIBUTION, __pyx_t_2) < (0)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":167 + * # TODO(https://github.com/apache/beam/issues/18843): Generalize distribution + * # counter if necessary. + * DATAFLOW_DISTRIBUTION = cy_combiners.DataflowDistributionCounterFn() # <<<<<<<<<<<<<< + * + * def __init__(self, name, combine_fn): +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cy_combiners); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DataflowDistributionCounterFn); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_DATAFLOW_DISTRIBUTION, __pyx_t_2) < (0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":184 + * self._add_input = self.combine_fn.add_input + * + * def update(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self._add_input(self.accumulator, value) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter_update, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":187 + * self.accumulator = self._add_input(self.accumulator, value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * """Update the counter with the same value N times""" + * for _ in range(n): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_5update_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter_update_n, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_update_n, __pyx_t_2) < (0)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":192 + * self.accumulator = self._add_input(self, value) + * + * def reset(self, value): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_7reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":195 + * self.accumulator = self.combine_fn.create_accumulator() + * + * def value(self): # <<<<<<<<<<<<<< + * return self.combine_fn.extract_output(self.accumulator) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_9value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter_value, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < (0)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":204 + * return '<%s at %s>' % (self._str_internal(), hex(id(self))) + * + * def _str_internal(self): # <<<<<<<<<<<<<< + * return '%s %s %s' % ( + * self.name, self.combine_fn.__class__.__name__, self.value()) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_15_str_internal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter__str_internal, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_str_internal, __pyx_t_2) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Counter, (type(self), 0x6d2b22d, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Counter__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7Counter_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Counter___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_Counter, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":217 + * self.reset() + * + * def update(self, value): # <<<<<<<<<<<<<< + * self._fast_add_input(value) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter_upda, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_2) < (0)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":220 + * self._fast_add_input(value) + * + * def update_n(self, value, n): # <<<<<<<<<<<<<< + * self._fast_add_input_n(value, n) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_5update_n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter_upda_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_mstate_global->__pyx_n_u_update_n, __pyx_t_2) < (0)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":223 + * self._fast_add_input_n(value, n) + * + * def reset(self): # <<<<<<<<<<<<<< + * self.accumulator = self.combine_fn.create_accumulator() + * self._fast_add_input = self.accumulator.add_input +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_7reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter_rese, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter___re, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_AccumulatorCombineFnCounter, (type(self), 0x0509848, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_AccumulatorCombineFnCounter__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_27AccumulatorCombineFnCounter_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AccumulatorCombineFnCounter___se, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_8counters_AccumulatorCombineFnCounter, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":229 + * + * + * class CounterFactory(object): # <<<<<<<<<<<<<< + * """Keeps track of unique counters.""" + * def __init__(self): +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_CounterFactory, __pyx_mstate_global->__pyx_n_u_CounterFactory, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_kp_u_Keeps_track_of_unique_counters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[3]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[3]) < 0))) __PYX_ERR(0, 229, __pyx_L1_error) + } + + /* "apache_beam/utils/counters.py":231 + * class CounterFactory(object): + * """Keeps track of unique counters.""" + * def __init__(self): # <<<<<<<<<<<<<< + * self.counters = {} # type: Dict[CounterName, Counter] + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_1__init__, 0, __pyx_mstate_global->__pyx_n_u_CounterFactory___init, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/utils/counters.py":237 + * self._lock = threading.Lock() + * + * def get_counter(self, name, combine_fn): # <<<<<<<<<<<<<< + * # type: (CounterName, core.CombineFn) -> Counter + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_3get_counter, 0, __pyx_mstate_global->__pyx_n_u_CounterFactory_get_counter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_counter, __pyx_t_6) < (0)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/utils/counters.py":264 + * return counter + * + * def reset(self): # <<<<<<<<<<<<<< + * # Counters are cached in state sampler states. + * with self._lock: +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_5reset, 0, __pyx_mstate_global->__pyx_n_u_CounterFactory_reset, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_6) < (0)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/utils/counters.py":270 + * counter.reset() + * + * def get_counters(self): # <<<<<<<<<<<<<< + * """Returns the current set of counters. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_14CounterFactory_7get_counters, 0, __pyx_mstate_global->__pyx_n_u_CounterFactory_get_counters, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_counters, __pyx_t_6) < (0)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "apache_beam/utils/counters.py":229 + * + * + * class CounterFactory(object): # <<<<<<<<<<<<<< + * """Keeps track of unique counters.""" + * def __init__(self): +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CounterFactory, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CounterFactory, __pyx_t_6) < (0)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_Counter(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x6d2b22d, 0x87abd2a, 0xe73339b, b'_add_input, accumulator, combine_fn, name') +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_5__pyx_unpickle_Counter, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Counter, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Counter, __pyx_t_2) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_8counters_7__pyx_unpickle_AccumulatorCombineFnCounter, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AccumulatorCombin, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_counters, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_AccumulatorCombin, __pyx_t_2) < (0)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/counters.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.utils.counters", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.utils.counters"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(0, 128, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/utils/counters.py":252 + * A new or existing counter with the requested name. + * """ + * with self._lock: # <<<<<<<<<<<<<< + * counter = self.counters.get(name, None) + * if counter: +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "apache_beam/utils/counters.py":105 + * USER = object() + * + * def __new__( # <<<<<<<<<<<<<< + * cls, + * name, +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(7, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "apache_beam/utils/counters.py":229 + * + * + * class CounterFactory(object): # <<<<<<<<<<<<<< + * """Keeps track of unique counters.""" + * def __init__(self): +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<4; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 9; } index[] = {{1},{13},{31},{33},{4},{179},{1},{1},{1},{1},{1},{8},{29},{5},{4},{7},{6},{2},{9},{4},{4},{14},{5},{20},{27},{45},{47},{33},{34},{36},{17},{7},{14},{23},{26},{27},{20},{11},{12},{19},{20},{19},{25},{25},{27},{21},{13},{14},{16},{13},{21},{29},{4},{19},{12},{4},{4},{11},{20},{3},{6},{10},{13},{4},{1},{9},{11},{22},{26},{18},{9},{18},{3},{11},{10},{4},{7},{8},{18},{12},{8},{5},{7},{9},{8},{14},{8},{3},{11},{12},{12},{2},{8},{11},{9},{13},{5},{5},{8},{13},{10},{15},{1},{4},{8},{10},{9},{7},{6},{6},{12},{3},{11},{14},{12},{11},{10},{42},{22},{14},{12},{10},{17},{13},{8},{20},{5},{4},{12},{10},{12},{19},{10},{13},{10},{5},{9},{7},{13},{5},{11},{8},{9},{6},{6},{8},{12},{5},{6},{26},{11},{17},{14},{11},{22},{24},{92},{20},{27},{11},{15},{15},{259},{157},{28},{74},{12},{55},{59},{81},{16},{40},{19}}; + #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (1831 bytes) */ +const char* const cstring = "BZh91AY&SY\217\301\227\264\000\001\024\177\377\377\377\375\377\377\377\357\377\377\377\377\375\277\377\377\357\300@@@@@@@@@@@@\000@\000`\006+\347\273n\006\302\264Z\264\330-p\030hJ\236\221=\244\236MO'\250\233)\344\217S56\241\240fH\017P\036\223'\244\365\000\365\036G\245=\251\250\311\246\207\250\364\017Q\344\236\223)\352\006\21124i5\r\204\032\004\322~\246#L\204\310\006@\001\243 d\000\r\000\000z\2154\000h\020`\t\204\300\230L&\230&#\000L\001\032\0310\t\200\000\000\021\200\230\000\000\022\232\"hjb\023\022\217\322ji\3524\321\351\r\003@\032\0002\000\000\000\000\000\000\000\032\004\030\002a0&\023\t\246\t\210\300\023\000F\206L\002`\000\000\004`&\000\000\004\242\002L\202O'\240\243z\223\3054i\243A\240=@\032h\000\000\000\000\000\000\000\000=O\361\000$\307\345.\016,\214\022\005\252\010\314\021\223wG\035\304\026\302\030'hP\243\350\246\313Z\373\026\276_\215g\336c\030\3061\214\235\010\203W\247\332})J\177\244_\343\000\201\203\020\306[O\027\356\310l\210\212\243\337\244D\272$\007\240AAUU\0050\203\007\240e9\272,\251&h\022\220\206Q\002YD\215\352\203p\2128\231\320#\247X1\211\226U\036\022\022\"\203\360\327\376\037\216\346\242!DS\rW\027\342,*\325\036\353\002\005\254\233\226\336T\216\262\301d\\#\322jr\302\235\244\357\037\302\266v\376d\007\251@~\331\334Z\334\036%\257,!.\375H\371\037a\214|l\204\300\211B\243\025\254p\301\250Z{\361\357g\343\215\022\017\236\334\03533\214\333\257\247z\003OM\333vq\331\273\223\317\237\223\211\010[e!@\377\313\202\\\314\323\2268\363z\\\304\215d\355\323\026M\010\035\376\316\271()a\315d\331(\233&\357\334\254\344\035[\006\224\270\3501\0032)\232E\201^]:o\256*\371\343H\364\260qF\204\374nH\211\373\315N+\265\223\351\nc\240\004\376M \320o\033\306=\3226\344f\246\322W\315iE\251\321o\226\240\373\217\355=>\271\\\307~\237\253\006\235L\337\201\3045(\220\241 \001\027IB\324\020P\270Jk\333\312\0300\304\263\014$g\033\317?]\226*J=x$\317\321\330\267-\027v\006Bj\202\230\357\\9\330n\254\266\037\247\253\230\360\243E\241I\226e\276\2207WZI(!.\314\3660f\024\232\202\\H\203|3\272g>\\\225\203""\023VDd\334eA:\327\203o\244\326\32162QB\204\213Y\036\316\314\357\233\366\264\2514\2272\027DL\212\030#\013u(\347=\004\266\r\327\351F\270\023\356\326\340\225\006H\313g6\2445\"|\216\376}L\211)\327\373\345ReJ2\343D\244b\243\005%\276\233)\035\246\026\004\306\223x\016\351\002\204\207\035g34\254\224\305\030\343\017)CR\036\0231zb\023\363\\\300UF3I\267\267\272\253\347\212\246\031&_\305\217\327\260\363\375s\301\246\343\304\243\363\232\306\354@\201\205\375F^>\026g\236~\034_\274\t\335z\3566\224k\223;U\335hZH\024e\354v\212e\267d\351\255\027\023\367LCC\311\rM\207\235w\334\300\004g\231\212\n\025\237I\024\025\306\017g\000\270w\207\271q\362{S\376\016K\032T*\255gat\354\023\240-\026(9T\254\002t\232\255\003\201\320\246\202\024\026\013\022Q-4\035\273viA\217\035b\022$<\364\200\353\242tn\247\262\301\307}p\317{I\322IR\305\262G\021V\376#re\027^\367\256q\2620\223\030G}\311\312%\030a&\244\361=y\206\344\306\311\275!js{\366\241\331\261\267\366\330e\355<\361\356~\240]%&9\220\310\316\331puB\020\312E\260\227G\352K\000J\325qLx\320l\031\021\303x\220\036\3345\261\025E\024\016\006\256\022\212\252\277\361w$S\205\t\010\374\031{@"; + PyObject *data = __Pyx_DecompressString(cstring, 1831, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1644 bytes) */ +const char* const cstring = "x\332\235UKW\333F\024\306\306!\026\316\244\344\000\241\343\"\213\224\255A\031tu@$%\272\\Rl\274\267=\247\264\242\267u\222\243\376\370;U\035\254qw\275\217\r\233$\023\371\304\312\203\207[\307\212\236\304\034\027\r\363 \251\313\231,\330\022\r\335:\321$@\261\177#M\371O\013+4\3750\217-(\254\314\361\201\251\356\255\247\022\231u\202\273\333\010mT\017\341/\255Q\206\034\362MR\314=Z\317=\311\345S\3539\273\324Q\313?\331H\241\345\337S\313k\351\314\352\243\\j\023I\220\351\264l\363\036\203h\037\340\342p\365P&o\027\326/\ra\030\357\366\030\263*Uu\023\326\026\200\r\006\217!\024\242_\022X\202_$\2570R\200kL5\230j\032\206D\274I\201\r'\025\025)\030\223\216\303\256_\325\"\262\242\370\335`\253U\324\261\260\300\271&\223\355\022\315T\201GDZ\206\314\241\234Y\250\004\034\314\021\304%SCE\233\202\032\324\261oF\373\3075\334k\317\003\322\265\356\344\267\353\242S\r\234\232\210\207""\215@:C\275\204uNJ\014\031\320\027\204J\030\322\205_\211p\334\251\002,L\3156H\310Y\246\014\322\322e\225(\225\030@\357\336\032\267\313\006\221\034\203r\223\016\014\314\202\274\206MK\337\321i'\2230\230\262YF\250\014\260\300V\350\273\0143\000=R\367\230]j\257`^m\203\267\371NZ\222\2257w\233\263iYW\367 \264S\256\217\001\315c\322}.oYyx\305\306F;\221\036\332\320?p\327\023\220\303\366B\"\332\"\360QcP\307\035\210\221\224\303B\204@c\304(\206\010\355T\0108\215\024q\230Q\017\267\350\004\014\263]\273X\204\260t\215\351\032\351\366O\003\245\035\022\372\n\325{\207u\256\221c\210gv\031\346\241\n:\245\216\2164\200\367.L\245\006\261\266?_m\324w\261\017\237\225^0!\376\303\027{3\323\214M\324\346\233\243\347j\253\316\202\363\247w\303_\013x\375\247\306T{g\241\366\332\315v\331?\3359\177\312\277\354c)\030\025\243\237\2713\356-o\346M\244\031\373\271>U\277\332\210\204\033\265sN\342hd\350\314Xm\314\371\324\275\342VB{1q\335\217\371\231\372\345\272\332\230j|\335H4\300\357\321\227C\343\037\324\262\315\221\017\235\230\223v\363\336\224w\325\2174G\306jS\315\321\363\265\003\307\360\276\361\262\255\321\211\332\035'\013\213\233>n\216O\213\3519\277\022\214\004\2705>\355\254\272\363\356\2127#3H\203\316\256\213\233#\2235\351\373B\307\367d-\017q\\\363 \245\326\330\244\224\214\327\276s\362\356\247\3365?\000\227_\270\232\370z!H\212\333\017\336&\305\306\266\330.\210\202)L&\030o\306d=\347\235\025\367\246\207\233\261\263o\366k[N\312\235v\263\315\321\013\016\004\373\261Si\301\213\273\213\336\201O\202\037\002M\334Y{{Kln\211\255\247\342)8\253\210\312\2418|u44\364:\222\210\002IDS\222\244\242\233\222lF\237H\362$\272-\311v\024K\202\243D\022\022\255HR\211\036Jr\030}%\311\253\350o\303@~\033NJ\222\034\276/\311\375\341\254$\331\341\315a\031e\005\252!\316/\326\223\215H\343\343\267\023\"\007\241\354\301X\236\035m\216\234\035|b\223\020\3532\214\1778\351?:Q\347\272\013\021\217\275\357\351\000\340\0237\342\302D\264b_\271\025\241|\037L\324\3576\366Dv\263\031\273\350\334r\257{3\336\274\014\373%,\300\333\267\000\236\033A\246\321\206\334\311f\342b\334\337\rpP\351\263\373\245\236\025K\317\305\363\027\342\305^\333tF\356\362\332m\347\0079\2220\341b\362\013\000\317%?\037L5a\304\377pr\356\204w\333_\360y0\037n\177\t\235\272\351k\301\234\354T\013 \261\355.\270\257\374dpN6\266\r\333\363\320\232\273\342*@yp\035&\3739X\274\364\347C\276}Z\266O\317\303\036\367\227\352S\177\003\205\337\263\344"; + PyObject *data = __Pyx_DecompressString(cstring, 1644, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (3109 bytes) */ +const char* const bytes = "> at at disableenablegcisenabled-out<%s>user-AccumulatorCombineFnAccumulatorCombineFnCounterAccumulatorCombineFnCounter.__reduce_cython__AccumulatorCombineFnCounter.__setstate_cython__AccumulatorCombineFnCounter.resetAccumulatorCombineFnCounter.updateAccumulatorCombineFnCounter.update_nBEAM_DISTRIBUTIONCounterCounterFactoryCounterFactory.__init__CounterFactory.get_counterCounterFactory.get_countersCounterFactory.resetCounterName_CounterNameCounterName.__new__CounterName.__repr__CounterName.__str__CounterName._str_internalCounter.__reduce_cython__Counter.__setstate_cython__Counter._str_internalCounter.resetCounter.updateCounter.update_nCounter.valueDATAFLOW_DISTRIBUTIONDataflowDistributionCounterFnDictDistributionInt64FnIOTargetNameLockMEANMeanInt64Fn__Pyx_PyDict_NextRefSUMSYSTEMSumInt64FnTYPE_CHECKINGUSER_add_inputadd_input_napache_beam.transformsapache_beam.utils.countersasyncio.coroutines__class__cline_in_tracebackclscollectionscombine_fncorecountercounterscreate_accumulatorcy_combiners__dict___dict__doc____enter____exit__extract_output__func__getget_counterget_counters__getstate__id__init__input_indexio_target_is_coroutineitems_lock__main____metaclass____module____mro_entries__nname__name__namedtuplenamespace__new__objectoriginoutput_indexpop__prepare____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_AccumulatorCombineFnCounter__pyx_unpickle_Counter__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex____repr__requesting_step_nameresetself__set_name__setdefault__setstate____setstate_cython__shuffle_idside_input_idstage_namestatestep_name__str___str_internalsupersystem_name__test__threadingtypingupdateupdate_nuse_setstatevalueva""lues\200!\330\004\013\2101\330\010\014\210G\2204\220{\240*\250K\260t\2706\300\021\200!\330\004\013\2104\210~\230Q\200!\330\004\013\2104\210{\230/\250\021\250$\250a\200!\330\004\010\320\010\032\230!\2307\240!\200\001\330\0049\270\021\270&\300\001\200!\330\004\010\210\014\220A\360\006\000\005\t\210\t\220\031\230%\230q\200!\330\004\013\320\013(\250\004\250N\270$\270c\300\021\300\"\300A\300Q\200!\360\036\000\n\016\210Q\330\006\020\220\004\220I\230T\240\021\240&\250\001\330\006\t\210\021\330\010\017\210w\220l\240#\240Q\340\010\013\210:\220Q\220l\240,\250a\330\n\024\320\024/\250q\260\006\260a\340\n\024\220G\2301\230F\240!\330\010\014\210I\220Q\220h\230a\330\006\r\210Q\200!\360\022\000\n\016\210Q\330\006\r\210T\220\031\230'\240\021\200!\340\t\r\210Q\330\006\n\210+\220T\230\031\240'\250\021\330\010\017\210v\220Q\200\001\330\004%\240Q\240f\250A\200\001\360\034\000\003\n\210\034\220Q\220k\240\021\200\001\360 \000\003\n\210\034\220Q\220k\240\021\200\001\360\010\000\005\016\210T\220\035\230d\320\"4\260D\3208L\310D\320P^\320^b\320bo\320os\320st\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\320:K\3107\320RW\320WZ\320Z^\320^q\320qx\320x}\360\000\000~\001A\002\360\000\000A\002E\002\360\000\000E\002R\002\360\000\000R\002Y\002\360\000\000Y\002^\002\360\000\000^\002a\002\360\000\000a\002e\002\360\000\000e\002q\002\360\000\000q\002x\002\360\000\000x\002}\002\360\000\000}\002@\003\360\000\000@\003D\003\360\000\000D\003J\003\360\000\000J\003Q\003\360\000\000Q\003R\003\330\004\007\200q\330\010\017\320\017<\270D\300\001\300\027\310\013\320SZ\320Z[\340\010\017\320\017<\270D\300\001\300\027\310\013\320ST\200\001\360\010\000\005\016\210T\220\035\230d\240.\260\004\260M\300\024\300Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230<\240w\250e\2603\260d\270-\300w\310e\320SV\320VZ\320Zf\320fm\320mr\320ru\320uy""\320y\177\360\000\000@\002G\002\360\000\000G\002H\002\330\004\007\200q\330\010\017\320\017(\250\004\250A\250W\260K\270w\300a\340\010\017\320\017(\250\004\250A\250W\260K\270q\200!\340\004\010\210\005\210U\220!\2201\330\006\n\210/\230\024\230[\250\001\250\026\250q\200!\360\006\000\007\010\330\006\007\330\006\007\330\006\007\330\006\007\330\006\007\330\006\007\330\004\r\210W\220C\220{\240!\330\004\013\2105\220\002\220(\230!\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\200!\330\004\010\320\010\030\230\001\230\021\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2207\230(\240!\2401\330\004\007\200|\2207\230!\330\010)\250\021\250*\260N\300!\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023.\250h\260a\260q\330\004\007\200|\2207\230!\330\010=\270Q\320>\\\320\\j\320jk\330\004\013\2101\200!\330\004\007\200t\2108\2203\220k\240\021\330\006\r\320\r\035\230T\240\034\250T\260\021\330\t\r\210X\220S\230\013\2408\2504\250t\2601\330\006\r\320\r\036\230d\240,\250d\260/\300\024\300Q\340\006\r\210^\2304\230}\250D\260\014\270D\300\001\200!\330\004\010\210\017\220t\230;\320&9\270\021\200!\330\004\010\210\017\220t\230;\320&9\270\021\330\004\010\320\010\033\2304\230|\2501\330\004\010\320\010\035\230T\240\034\250Q\200!\330\004\010\210\017\220t\230;\240a\240t\250>\270\021"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 149; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 23) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 149; i < 173; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 173; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 149; + for (Py_ssize_t i=0; i<24; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int32_t const cint_constants_4[] = {5281864L,114471469L}; + for (int i = 0; i < 2; i++) { + numbertab[i] = PyLong_FromLong(cint_constants_4[i - 0]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 4; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 4; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 50}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_input_index}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_side_input_id, __pyx_mstate->__pyx_kp_b_iso88591_Qk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 67}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_step_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_shuffle_id, __pyx_mstate->__pyx_kp_b_iso88591_Qk_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 105}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_stage_name, __pyx_mstate->__pyx_n_u_step_name, __pyx_mstate->__pyx_n_u_system_name, __pyx_mstate->__pyx_n_u_namespace, __pyx_mstate->__pyx_n_u_origin, __pyx_mstate->__pyx_n_u_output_index, __pyx_mstate->__pyx_n_u_io_target}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_WC_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 127}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_N_c_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 130}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 133}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_str_internal, __pyx_mstate->__pyx_kp_b_iso88591_t83k_T_T_XS_84t1_d_d_Q_4_D_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 184}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591_t_at, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 187}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u__7}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_update_n, __pyx_mstate->__pyx_kp_b_iso88591_U_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 192}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_t_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 195}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_kp_b_iso88591_4_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 204}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_str_internal, __pyx_mstate->__pyx_kp_b_iso88591_1_G4_Kt6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_M_Q_G1F_a_vWE_Q_q_t_we3d_we, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 217}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_kp_b_iso88591__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 220}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_n}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_update_n, __pyx_mstate->__pyx_kp_b_iso88591_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 223}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_t_9_4_1_T_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_d_4D8LDP_bboosst_G1F_a_vWE_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 231}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 237}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_combine_fn, __pyx_mstate->__pyx_n_u_counter}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_get_counter, __pyx_mstate->__pyx_kp_b_iso88591_Q_IT_wl_Q_Ql_a_q_a_G1F_IQha_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 264}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_counter}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_Q_T_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 270}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_counters_py, __pyx_mstate->__pyx_n_u_get_counters, __pyx_mstate->__pyx_kp_b_iso88591_Q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Counter, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_1_7_N_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_AccumulatorCombin, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_Q_jjk_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectGetMethod (used by PyObjectCallMethod0) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__5); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* SetNewInClass */ +static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) { +#ifdef __Pyx_CyFunction_USED + int ret; + if (__Pyx_CyFunction_Check(value)) { + PyObject *staticnew; +#if !CYTHON_COMPILING_IN_LIMITED_API + staticnew = PyStaticMethod_New(value); +#else + PyObject *builtins, *staticmethod_str, *staticmethod; + builtins = PyEval_GetBuiltins(); // borrowed + if (!builtins) return -1; + staticmethod_str = PyUnicode_FromStringAndSize("staticmethod", 12); + if (!staticmethod_str) return -1; + staticmethod = PyObject_GetItem(builtins, staticmethod_str); + Py_DECREF(staticmethod_str); + if (!staticmethod) return -1; + staticnew = PyObject_CallFunctionObjArgs(staticmethod, value, NULL); + Py_DECREF(staticmethod); +#endif + if (unlikely(!staticnew)) return -1; + ret = __Pyx_SetNameInClass(ns, name, staticnew); + Py_DECREF(staticnew); + return ret; + } +#endif + return __Pyx_SetNameInClass(ns, name, value); +} + +/* PyObjectCall2Args (used by Py3ClassCreate) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CyFunctionClassCell */ +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = __Pyx_PyList_GET_SIZE(cyfunctions); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(count < 0)) return -1; + #endif + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + __Pyx_PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + __Pyx_CyFunction_SetClassObj(m, classobj); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* PyObjectVectorCallKwBuilder (used by CIntToPy) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__6); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/utils/counters.cp314-win_amd64.pyd b/sdks/python/apache_beam/utils/counters.cp314-win_amd64.pyd new file mode 100644 index 000000000000..576b3831f9b3 Binary files /dev/null and b/sdks/python/apache_beam/utils/counters.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/utils/windowed_value.c b/sdks/python/apache_beam/utils/windowed_value.c new file mode 100644 index 000000000000..9743be524ec2 --- /dev/null +++ b/sdks/python/apache_beam/utils/windowed_value.c @@ -0,0 +1,27875 @@ +/* Generated by Cython 3.2.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "apache_beam.utils.windowed_value", + "sources": [ + "apache_beam/utils/windowed_value.py" + ] + }, + "module_name": "apache_beam.utils.windowed_value" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) +#endif +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#include +typedef uintptr_t __pyx_uintptr_t; +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CInitCode */ +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__apache_beam__utils__windowed_value +#define __PYX_HAVE_API__apache_beam__utils__windowed_value +/* Early includes */ +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "apache_beam/utils/windowed_value.py", + "apache_beam/utils/windowed_value.pxd", + "", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase; +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr; +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values; +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values; +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create; + +/* "apache_beam/utils/windowed_value.pxd":55 + * + * @cython.locals(wv=WindowedValue) + * cpdef WindowedValue create( # <<<<<<<<<<<<<< + * object value, int64_t timestamp_micros, object windows, object pane_info=*) + * +*/ +struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create { + int __pyx_n; + PyObject *pane_info; +}; + +/* "apache_beam/utils/windowed_value.pxd":27 + * cdef list _BYTE_TO_PANE_INFO + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class PaneInfo(object): + * cdef readonly bint _is_first +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo { + PyObject_HEAD + int _is_first; + int _is_last; + int _timing; + int _index; + int _nonspeculative_index; + unsigned char _encoded_byte; +}; + + +/* "apache_beam/utils/windowed_value.pxd":36 + * cdef readonly unsigned char _encoded_byte + * + * @cython.final # <<<<<<<<<<<<<< + * cdef class WindowedValue(object): + * cdef public object value +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab; + PyObject *value; + PyObject *windows; + PyObject *pane_info; + int64_t timestamp_micros; + PyObject *timestamp_object; +}; + + +/* "apache_beam/utils/windowed_value.pxd":46 + * cpdef WindowedValue with_value(self, new_value) + * + * cdef class WindowedBatch(object): # <<<<<<<<<<<<<< + * cpdef WindowedBatch with_values(self, object new_values) + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch { + PyObject_HEAD + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab; +}; + + +/* "apache_beam/utils/windowed_value.pxd":49 + * cpdef WindowedBatch with_values(self, object new_values) + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * cdef public WindowedValue _wv + * +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv; +}; + + +/* "apache_beam/utils/windowed_value.pxd":59 + * + * + * cdef class _IntervalWindowBase(object): # <<<<<<<<<<<<<< + * cdef object _start_object + * cdef readonly int64_t _start_micros +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase { + PyObject_HEAD + PyObject *_start_object; + int64_t _start_micros; + PyObject *_end_object; + int64_t _end_micros; +}; + + +/* "apache_beam/utils/windowed_value.py":182 + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) + * result = [None] * ( + * max(p.encoded_byte for p in pane_infos) + 1 # <<<<<<<<<<<<<< + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_p; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; +}; + + +/* "apache_beam/utils/windowed_value.py":347 + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * for value in explode_fn(self._wv.value): + * yield self._wv.with_value(value) +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values { + PyObject_HEAD + PyObject *__pyx_v_explode_fn; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self; + PyObject *__pyx_v_value; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); +}; + + +/* "apache_beam/utils/windowed_value.py":370 + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values { + PyObject_HEAD + PyObject *__pyx_v_grouped; + PyObject *__pyx_v_key; + PyObject *__pyx_v_produce_fn; + PyObject *__pyx_v_values; + PyObject *__pyx_v_windowed_values; + PyObject *__pyx_v_wv; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; +}; + + + +/* "apache_beam/utils/windowed_value.py":196 + * + * + * class WindowedValue(object): # <<<<<<<<<<<<<< + * """A windowed value having a value, a timestamp and set of windows. + * +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch); + + +/* "apache_beam/utils/windowed_value.py":288 + * + * + * class WindowedBatch(object): # <<<<<<<<<<<<<< + * """A batch of N windowed values, each having a value, a timestamp and set of + * windows.""" +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + + +/* "apache_beam/utils/windowed_value.py":311 + * + * + * class HomogeneousWindowedBatch(WindowedBatch): # <<<<<<<<<<<<<< + * """A WindowedBatch with Homogeneous event-time information, represented + * internally as a WindowedValue. +*/ + +struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch { + struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base; +}; +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto (used by fastcall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto (used by BytesEquals) */ +#include + +/* BytesEquals.proto (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* CallCFunction.proto (used by CallUnboundCMethod0) */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyObjectCall.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_OrObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_OrObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceOr(op1, op2) : PyNumber_Or(op1, op2)) +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + #if __clang__ || __GNUC__ + __attribute__((no_sanitize("thread"))) + #endif + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* PyAssertionError_Check.proto */ +#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck, int unsafe_shared); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* JoinPyUnicode.export */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* GetException.proto (used by pep479) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) +#endif + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* pybytes_as_double.proto (used by pynumber_float) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj); +static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); +static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(obj); + size = PyBytes_GET_SIZE(obj); +#else + if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { + return (double)-1; + } +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} +static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyByteArray_AS_STRING(obj); + size = PyByteArray_GET_SIZE(obj); +#else + as_c_string = PyByteArray_AsString(obj); + if (as_c_string == NULL) { + return (double)-1; + } + size = PyByteArray_Size(obj); +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); +} + +/* pyunicode_as_double.proto (used by pynumber_float) */ +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS +static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { + int last_was_punctuation; + Py_ssize_t i; + last_was_punctuation = 1; + for (i=start; i <= end; i++) { + Py_UCS4 chr = PyUnicode_READ(kind, data, i); + int is_punctuation = (chr == '_') | (chr == '.'); + *buffer = (char)chr; + buffer += (chr != '_'); + if (unlikely(chr > 127)) goto parse_failure; + if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure; + last_was_punctuation = is_punctuation; + } + if (unlikely(last_was_punctuation)) goto parse_failure; + *buffer = '\0'; + return buffer; +parse_failure: + return NULL; +} +static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) { + int matches = 1; + Py_UCS4 chr; + Py_UCS4 sign = PyUnicode_READ(kind, data, start); + int is_signed = (sign == '-') | (sign == '+'); + start += is_signed; + length -= is_signed; + switch (PyUnicode_READ(kind, data, start)) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'a') | (chr == 'A'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'n') | (chr == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+1); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+2); + matches &= (chr == 'f') | (chr == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + chr = PyUnicode_READ(kind, data, start+3); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+4); + matches &= (chr == 'n') | (chr == 'N'); + chr = PyUnicode_READ(kind, data, start+5); + matches &= (chr == 'i') | (chr == 'I'); + chr = PyUnicode_READ(kind, data, start+6); + matches &= (chr == 't') | (chr == 'T'); + chr = PyUnicode_READ(kind, data, start+7); + matches &= (chr == 'y') | (chr == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { + double value; + const char *last; + char *end; + Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj); + const int kind = PyUnicode_KIND(obj); + const void* data = PyUnicode_DATA(obj); + start = 0; + while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start))) + start++; + while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1))) + length--; + length -= start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + if (length < 40) { + char number[40]; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} +#endif +static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { +#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS + if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) + return (double)-1; + if (likely(PyUnicode_IS_ASCII(obj))) { + const char *s; + Py_ssize_t length; + s = PyUnicode_AsUTF8AndSize(obj, &length); + return __Pyx__PyBytes_AsDouble(obj, s, length); + } + return __Pyx_PyUnicode_AsDouble_WithSpaces(obj); +#else + return __Pyx_SlowPyString_AsDouble(obj); +#endif +} + +/* pynumber_float.proto */ +static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x)) + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) +#endif + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* PyNotImplementedError_Check.proto */ +#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError) + +/* RaiseKeywordRequired.proto */ +static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name); + +/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectVectorCallMethodKwBuilder.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod +#else +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#endif + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto (used by FetchCommonType) */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif + +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto (used by CythonFunctionShared) */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto (used by CythonFunction) */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_dict; +#endif + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif + +/* PyObjectCallMethod1.proto (used by append) */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* IterFinish.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallMethod0.proto (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* GetTopmostException.proto (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyOverflowError_Check.proto */ +#define __Pyx_PyExc_OverflowError_Check(obj) __Pyx_TypeCheck(obj, PyExc_OverflowError) + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); + +/* CallNextTpTraverse.proto */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/* CallNextTpClear.proto */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear); + +/* CheckTypeForFreelists.proto */ +#if CYTHON_USE_FREELISTS +#if CYTHON_USE_TYPE_SPECS +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT +#else +#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) +#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) +#endif +#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ + (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ + (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) +#endif + +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); + +/* ValidateBasesTuple.proto (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); + +/* GetVTable.proto (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type); + +/* MergeVTables.proto */ +static int __Pyx_MergeVtables(PyTypeObject *type); + +/* DelItemOnTypeDict.proto (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* HasAttr.proto (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* ClassMethod.proto */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include "descrobject.h" +#endif +CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); + +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* CLineInTraceback.proto (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto (used by AddTraceback) */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CheckUnpickleChecksum.proto */ +static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value); + +/* UpdateUnpickledDict.proto */ +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif +static unsigned long __Pyx_get_runtime_version(void); + +/* SwapException.proto (used by CoroutineBase) */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterNextPlain.proto (used by CoroutineBase) */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* ReturnWithStopIteration.proto (used by CoroutineBase) */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto (used by Generator) */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *gi_weakreflist; +#endif + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_new_value, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_new_values, int __pyx_skip_dispatch); /* proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_f_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values, int __pyx_skip_dispatch); /* proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "apache_beam.utils.windowed_value" */ +static PyTypeObject *__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp = 0; +static PyObject *__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0; +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_5utils_14windowed_value_create(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args); /*proto*/ +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_WindowedBatch__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_HomogeneousWindowedBatch__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *, PyObject *); /*proto*/ +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle__IntervalWindowBase__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *, PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "apache_beam.utils.windowed_value" +extern int __pyx_module_is_main_apache_beam__utils__windowed_value; +int __pyx_module_is_main_apache_beam__utils__windowed_value = 0; + +/* Implementation of "apache_beam.utils.windowed_value" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_NotImplemented; +static PyObject *__pyx_builtin_max; +/* #### Code section: string_decls ### */ +static const char __pyx_k__7[] = ""; +static const char __pyx_k_wv_2[] = "_wv"; +static const char __pyx_k_Core_windowing_data_structures[] = "Core windowing data structures."; +static const char __pyx_k_end_micros__end_object__start_m[] = "_end_micros, _end_object, _start_micros, _start_object"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_2from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self, PyObject *__pyx_v_is_first, PyObject *__pyx_v_is_last, PyObject *__pyx_v_timing, PyObject *__pyx_v_index, PyObject *__pyx_v_nonspeculative_index); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_2_get_encoded_byte(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_4from_encoded_byte(PyObject *__pyx_v_encoded_byte); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_5index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_10__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12__reduce__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value__construct_well_known_pane_infos(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_2__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_4__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_6__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_8with_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_new_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_10__reduce__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, int64_t __pyx_v_timestamp_micros, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_2as_windowed_values(CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_explode_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_4from_windowed_values(PyObject *__pyx_v_windowed_values, PyObject *__pyx_v_produce_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_6__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_8__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_wv); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_2of(PyObject *__pyx_v_values, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_4with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6as_windowed_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_explode_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_11__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_13__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_15from_batch_and_windowed_value(PyObject *__pyx_v_batch, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value); /* proto */ +static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_17from_windowed_values(PyObject *__pyx_v_windowed_values, PyObject *__pyx_v_produce_fn); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_22__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_2__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_4__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_6__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_8__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_10__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_4__pyx_unpickle_WindowedBatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_6__pyx_unpickle_HomogeneousWindowedBatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8__pyx_unpickle__IntervalWindowBase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_PaneInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedBatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values; + PyObject *__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values; + PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_k__2; + PyObject *__pyx_k__5; + PyObject *__pyx_tuple[2]; + PyObject *__pyx_codeobj_tab[29]; + PyObject *__pyx_string_tab[211]; + PyObject *__pyx_number_tab[14]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr[8]; +int __pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values[8]; +int __pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values[8]; +int __pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values; +#endif +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + +/* Generator.module_state_decls */ +PyTypeObject *__pyx_GeneratorType; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Iterable_WindowedBatch __pyx_string_tab[1] +#define __pyx_kp_u_Iterable_WindowedValue __pyx_string_tab[2] +#define __pyx_kp_u_None __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u_PaneInfo_first __pyx_string_tab[5] +#define __pyx_kp_u_Sequence_WindowedValue __pyx_string_tab[6] +#define __pyx_kp_u_The_timing_of_a_PaneInfo __pyx_string_tab[7] +#define __pyx_kp_u_WindowedBatch_2 __pyx_string_tab[8] +#define __pyx_kp_u__3 __pyx_string_tab[9] +#define __pyx_kp_u__4 __pyx_string_tab[10] +#define __pyx_kp_u__6 __pyx_string_tab[11] +#define __pyx_kp_u__8 __pyx_string_tab[12] +#define __pyx_kp_u__9 __pyx_string_tab[13] +#define __pyx_kp_u_add_note __pyx_string_tab[14] +#define __pyx_kp_u_apache_beam_utils_windowed_value_2 __pyx_string_tab[15] +#define __pyx_kp_u_disable __pyx_string_tab[16] +#define __pyx_kp_u_enable __pyx_string_tab[17] +#define __pyx_kp_u_gc __pyx_string_tab[18] +#define __pyx_kp_u_index_2 __pyx_string_tab[19] +#define __pyx_kp_u_isenabled __pyx_string_tab[20] +#define __pyx_kp_u_last __pyx_string_tab[21] +#define __pyx_kp_u_nonspeculative_index_2 __pyx_string_tab[22] +#define __pyx_kp_u_stringsource __pyx_string_tab[23] +#define __pyx_kp_u_timing_2 __pyx_string_tab[24] +#define __pyx_n_u_Any __pyx_string_tab[25] +#define __pyx_n_u_BoundedWindow __pyx_string_tab[26] +#define __pyx_n_u_Callable __pyx_string_tab[27] +#define __pyx_n_u_EARLY __pyx_string_tab[28] +#define __pyx_n_u_HomogeneousWindowedBatch __pyx_string_tab[29] +#define __pyx_n_u_HomogeneousWindowedBatch___reduc __pyx_string_tab[30] +#define __pyx_n_u_HomogeneousWindowedBatch___setst __pyx_string_tab[31] +#define __pyx_n_u_HomogeneousWindowedBatch_as_empt __pyx_string_tab[32] +#define __pyx_n_u_HomogeneousWindowedBatch_as_wind __pyx_string_tab[33] +#define __pyx_n_u_HomogeneousWindowedBatch_from_ba __pyx_string_tab[34] +#define __pyx_n_u_HomogeneousWindowedBatch_from_wi __pyx_string_tab[35] +#define __pyx_n_u_HomogeneousWindowedBatch_of __pyx_string_tab[36] +#define __pyx_n_u_HomogeneousWindowedBatch_with_va __pyx_string_tab[37] +#define __pyx_n_u_IntervalWindowBase __pyx_string_tab[38] +#define __pyx_n_u_IntervalWindowBase___reduce_cyt __pyx_string_tab[39] +#define __pyx_n_u_IntervalWindowBase___setstate_c __pyx_string_tab[40] +#define __pyx_n_u_Iterable __pyx_string_tab[41] +#define __pyx_n_u_LATE __pyx_string_tab[42] +#define __pyx_n_u_List __pyx_string_tab[43] +#define __pyx_n_u_MAX_TIMESTAMP __pyx_string_tab[44] +#define __pyx_n_u_MIN_TIMESTAMP __pyx_string_tab[45] +#define __pyx_n_u_NotImplemented __pyx_string_tab[46] +#define __pyx_n_u_ON_TIME __pyx_string_tab[47] +#define __pyx_n_u_Optional __pyx_string_tab[48] +#define __pyx_n_u_PANE_INFO_UNKNOWN __pyx_string_tab[49] +#define __pyx_n_u_PaneInfo __pyx_string_tab[50] +#define __pyx_n_u_PaneInfoTiming __pyx_string_tab[51] +#define __pyx_n_u_PaneInfoTiming_from_string __pyx_string_tab[52] +#define __pyx_n_u_PaneInfoTiming_to_string __pyx_string_tab[53] +#define __pyx_n_u_PaneInfo___reduce __pyx_string_tab[54] +#define __pyx_n_u_PaneInfo__get_encoded_byte __pyx_string_tab[55] +#define __pyx_n_u_PaneInfo_from_encoded_byte __pyx_string_tab[56] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[57] +#define __pyx_n_u_Sequence __pyx_string_tab[58] +#define __pyx_n_u_TYPE_CHECKING __pyx_string_tab[59] +#define __pyx_n_u_Timestamp __pyx_string_tab[60] +#define __pyx_n_u_TimestampTypes __pyx_string_tab[61] +#define __pyx_n_u_Tuple __pyx_string_tab[62] +#define __pyx_n_u_UNKNOWN __pyx_string_tab[63] +#define __pyx_n_u_WindowedBatch __pyx_string_tab[64] +#define __pyx_n_u_WindowedBatch___reduce_cython __pyx_string_tab[65] +#define __pyx_n_u_WindowedBatch___setstate_cython __pyx_string_tab[66] +#define __pyx_n_u_WindowedBatch_as_windowed_values __pyx_string_tab[67] +#define __pyx_n_u_WindowedBatch_from_windowed_valu __pyx_string_tab[68] +#define __pyx_n_u_WindowedBatch_with_values __pyx_string_tab[69] +#define __pyx_n_u_WindowedValue __pyx_string_tab[70] +#define __pyx_n_u_WindowedValue___reduce __pyx_string_tab[71] +#define __pyx_n_u_WindowedValue_with_value __pyx_string_tab[72] +#define __pyx_n_u_apache_beam_transforms_window __pyx_string_tab[73] +#define __pyx_n_u_apache_beam_utils_timestamp __pyx_string_tab[74] +#define __pyx_n_u_apache_beam_utils_windowed_value __pyx_string_tab[75] +#define __pyx_n_u_append __pyx_string_tab[76] +#define __pyx_n_u_as_empty_windowed_value __pyx_string_tab[77] +#define __pyx_n_u_as_windowed_values __pyx_string_tab[78] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[79] +#define __pyx_n_u_batch __pyx_string_tab[80] +#define __pyx_n_u_byte __pyx_string_tab[81] +#define __pyx_n_u_class_getitem __pyx_string_tab[82] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[83] +#define __pyx_n_u_close __pyx_string_tab[84] +#define __pyx_n_u_cls __pyx_string_tab[85] +#define __pyx_n_u_collections __pyx_string_tab[86] +#define __pyx_n_u_construct_well_known_pane_infos __pyx_string_tab[87] +#define __pyx_n_u_construct_well_known_pane_infos_2 __pyx_string_tab[88] +#define __pyx_n_u_create __pyx_string_tab[89] +#define __pyx_n_u_d __pyx_string_tab[90] +#define __pyx_n_u_defaultdict __pyx_string_tab[91] +#define __pyx_n_u_dict __pyx_string_tab[92] +#define __pyx_n_u_dict_2 __pyx_string_tab[93] +#define __pyx_n_u_doc __pyx_string_tab[94] +#define __pyx_n_u_encoded_byte __pyx_string_tab[95] +#define __pyx_n_u_end __pyx_string_tab[96] +#define __pyx_n_u_end_micros __pyx_string_tab[97] +#define __pyx_n_u_explode_fn __pyx_string_tab[98] +#define __pyx_n_u_from_batch_and_windowed_value __pyx_string_tab[99] +#define __pyx_n_u_from_encoded_byte __pyx_string_tab[100] +#define __pyx_n_u_from_string __pyx_string_tab[101] +#define __pyx_n_u_from_windowed_values __pyx_string_tab[102] +#define __pyx_n_u_from_windowed_values_locals_lamb __pyx_string_tab[103] +#define __pyx_n_u_func __pyx_string_tab[104] +#define __pyx_n_u_genexpr __pyx_string_tab[105] +#define __pyx_n_u_get_encoded_byte __pyx_string_tab[106] +#define __pyx_n_u_getstate __pyx_string_tab[107] +#define __pyx_n_u_grouped __pyx_string_tab[108] +#define __pyx_n_u_index __pyx_string_tab[109] +#define __pyx_n_u_is_coroutine __pyx_string_tab[110] +#define __pyx_n_u_is_first __pyx_string_tab[111] +#define __pyx_n_u_is_last __pyx_string_tab[112] +#define __pyx_n_u_items __pyx_string_tab[113] +#define __pyx_n_u_key __pyx_string_tab[114] +#define __pyx_n_u_lambda __pyx_string_tab[115] +#define __pyx_n_u_main __pyx_string_tab[116] +#define __pyx_n_u_max __pyx_string_tab[117] +#define __pyx_n_u_metaclass __pyx_string_tab[118] +#define __pyx_n_u_micros __pyx_string_tab[119] +#define __pyx_n_u_module __pyx_string_tab[120] +#define __pyx_n_u_mro_entries __pyx_string_tab[121] +#define __pyx_n_u_name __pyx_string_tab[122] +#define __pyx_n_u_new __pyx_string_tab[123] +#define __pyx_n_u_new_value __pyx_string_tab[124] +#define __pyx_n_u_new_values __pyx_string_tab[125] +#define __pyx_n_u_next __pyx_string_tab[126] +#define __pyx_n_u_nonspeculative_index __pyx_string_tab[127] +#define __pyx_n_u_object __pyx_string_tab[128] +#define __pyx_n_u_of __pyx_string_tab[129] +#define __pyx_n_u_p __pyx_string_tab[130] +#define __pyx_n_u_pane_info __pyx_string_tab[131] +#define __pyx_n_u_pane_infos __pyx_string_tab[132] +#define __pyx_n_u_pop __pyx_string_tab[133] +#define __pyx_n_u_prepare __pyx_string_tab[134] +#define __pyx_n_u_produce_fn __pyx_string_tab[135] +#define __pyx_n_u_pyx_capi __pyx_string_tab[136] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[137] +#define __pyx_n_u_pyx_result __pyx_string_tab[138] +#define __pyx_n_u_pyx_state __pyx_string_tab[139] +#define __pyx_n_u_pyx_type __pyx_string_tab[140] +#define __pyx_n_u_pyx_unpickle_HomogeneousWindow __pyx_string_tab[141] +#define __pyx_n_u_pyx_unpickle_WindowedBatch __pyx_string_tab[142] +#define __pyx_n_u_pyx_unpickle__IntervalWindowBa __pyx_string_tab[143] +#define __pyx_n_u_pyx_vtable __pyx_string_tab[144] +#define __pyx_n_u_qualname __pyx_string_tab[145] +#define __pyx_n_u_reduce __pyx_string_tab[146] +#define __pyx_n_u_reduce_cython __pyx_string_tab[147] +#define __pyx_n_u_reduce_ex __pyx_string_tab[148] +#define __pyx_n_u_result __pyx_string_tab[149] +#define __pyx_n_u_return __pyx_string_tab[150] +#define __pyx_n_u_self __pyx_string_tab[151] +#define __pyx_n_u_send __pyx_string_tab[152] +#define __pyx_n_u_set_name __pyx_string_tab[153] +#define __pyx_n_u_setdefault __pyx_string_tab[154] +#define __pyx_n_u_setstate __pyx_string_tab[155] +#define __pyx_n_u_setstate_cython __pyx_string_tab[156] +#define __pyx_n_u_start __pyx_string_tab[157] +#define __pyx_n_u_start_micros __pyx_string_tab[158] +#define __pyx_n_u_state __pyx_string_tab[159] +#define __pyx_n_u_staticmethod __pyx_string_tab[160] +#define __pyx_n_u_test __pyx_string_tab[161] +#define __pyx_n_u_throw __pyx_string_tab[162] +#define __pyx_n_u_timestamp __pyx_string_tab[163] +#define __pyx_n_u_timestamp_micros __pyx_string_tab[164] +#define __pyx_n_u_timestamp_object __pyx_string_tab[165] +#define __pyx_n_u_timing __pyx_string_tab[166] +#define __pyx_n_u_to_string __pyx_string_tab[167] +#define __pyx_n_u_typing __pyx_string_tab[168] +#define __pyx_n_u_update __pyx_string_tab[169] +#define __pyx_n_u_use_setstate __pyx_string_tab[170] +#define __pyx_n_u_value __pyx_string_tab[171] +#define __pyx_n_u_values __pyx_string_tab[172] +#define __pyx_n_u_windowed_value __pyx_string_tab[173] +#define __pyx_n_u_windowed_values __pyx_string_tab[174] +#define __pyx_n_u_windows __pyx_string_tab[175] +#define __pyx_n_u_with_value __pyx_string_tab[176] +#define __pyx_n_u_with_values __pyx_string_tab[177] +#define __pyx_n_u_wv __pyx_string_tab[178] +#define __pyx_n_u_wv_2 __pyx_string_tab[179] +#define __pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P __pyx_string_tab[180] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[181] +#define __pyx_kp_b_iso88591_1D_Kq __pyx_string_tab[182] +#define __pyx_kp_b_iso88591_1F __pyx_string_tab[183] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[184] +#define __pyx_kp_b_iso88591_1_HD_D_a __pyx_string_tab[185] +#define __pyx_kp_b_iso88591_1_Qa __pyx_string_tab[186] +#define __pyx_kp_b_iso88591_1_Qhk __pyx_string_tab[187] +#define __pyx_kp_b_iso88591_1_t1_a_t1_a_D_A_1 __pyx_string_tab[188] +#define __pyx_kp_b_iso88591_2_1N_Qa __pyx_string_tab[189] +#define __pyx_kp_b_iso88591_4t_aq __pyx_string_tab[190] +#define __pyx_kp_b_iso88591_6_4_j_A __pyx_string_tab[191] +#define __pyx_kp_b_iso88591_6avQ __pyx_string_tab[192] +#define __pyx_kp_b_iso88591_7q_HAQ_IQ_Kq_M __pyx_string_tab[193] +#define __pyx_kp_b_iso88591_81_Q_7_Q_a __pyx_string_tab[194] +#define __pyx_kp_b_iso88591_A_3a_1_3a_a __pyx_string_tab[195] +#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7 __pyx_string_tab[196] +#define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t5_q_q_9_Qg_PWW __pyx_string_tab[197] +#define __pyx_kp_b_iso88591_T_t_5ET_G1F_a_vWE_Q_q_t_uCt_QR __pyx_string_tab[198] +#define __pyx_kp_b_iso88591__10 __pyx_string_tab[199] +#define __pyx_kp_b_iso88591__11 __pyx_string_tab[200] +#define __pyx_kp_b_iso88591__12 __pyx_string_tab[201] +#define __pyx_kp_b_iso88591_d_d_T_4q __pyx_string_tab[202] +#define __pyx_kp_b_iso88591_ha __pyx_string_tab[203] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[204] +#define __pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1 __pyx_string_tab[205] +#define __pyx_kp_b_iso88591_q_0_kQR_81A_7_VVdde_1 __pyx_string_tab[206] +#define __pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1 __pyx_string_tab[207] +#define __pyx_kp_b_iso88591_q_8_A __pyx_string_tab[208] +#define __pyx_kp_b_iso88591_q_j_q_q_q_q_1E_Q_gQhavV83a_gQha __pyx_string_tab[209] +#define __pyx_kp_b_struct___pyx_obj_11apache_beam_5 __pyx_string_tab[210] +#define __pyx_int_0 __pyx_number_tab[0] +#define __pyx_int_neg_1 __pyx_number_tab[1] +#define __pyx_int_1 __pyx_number_tab[2] +#define __pyx_int_2 __pyx_number_tab[3] +#define __pyx_int_3 __pyx_number_tab[4] +#define __pyx_int_7 __pyx_number_tab[5] +#define __pyx_int_11 __pyx_number_tab[6] +#define __pyx_int_1000000 __pyx_number_tab[7] +#define __pyx_int_191069070 __pyx_number_tab[8] +#define __pyx_int_235429631 __pyx_number_tab[9] +#define __pyx_int_238750788 __pyx_number_tab[10] +#define __pyx_int_0xfffffffffffff __pyx_number_tab[11] +#define __pyx_int_0xffffffffffffff __pyx_number_tab[12] +#define __pyx_int_0xfffffffffffffff __pyx_number_tab[13] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values); + Py_CLEAR(clear_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values); + Py_CLEAR(clear_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values); + Py_CLEAR(clear_module_state->__pyx_k__2); + Py_CLEAR(clear_module_state->__pyx_k__5); + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<29; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<211; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<14; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_clear_end ### */ +return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values); + Py_VISIT(traverse_module_state->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values); + Py_VISIT(traverse_module_state->__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values); + Py_VISIT(traverse_module_state->__pyx_k__2); + Py_VISIT(traverse_module_state->__pyx_k__5); + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<29; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<211; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<14; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* Generator.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_GeneratorType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "apache_beam/utils/windowed_value.py":54 + * UNKNOWN = 3 + * + * @classmethod # <<<<<<<<<<<<<< + * def to_string(cls, value): + * return { +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_1to_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_1to_string = {"to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_1to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_1to_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("to_string (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 54, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 54, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 54, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_string", 0) < (0)) __PYX_ERR(0, 54, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_string", 1, 2, 2, i); __PYX_ERR(0, 54, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 54, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 54, __pyx_L3_error) + } + __pyx_v_cls = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("to_string", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 54, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfoTiming.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_to_string(__pyx_self, __pyx_v_cls, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("to_string", 0); + + /* "apache_beam/utils/windowed_value.py":56 + * @classmethod + * def to_string(cls, value): + * return { # <<<<<<<<<<<<<< + * cls.EARLY: 'EARLY', + * cls.ON_TIME: 'ON_TIME', +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":57 + * def to_string(cls, value): + * return { + * cls.EARLY: 'EARLY', # <<<<<<<<<<<<<< + * cls.ON_TIME: 'ON_TIME', + * cls.LATE: 'LATE', +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_EARLY) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":58 + * return { + * cls.EARLY: 'EARLY', + * cls.ON_TIME: 'ON_TIME', # <<<<<<<<<<<<<< + * cls.LATE: 'LATE', + * cls.UNKNOWN: 'UNKNOWN', +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_ON_TIME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_ON_TIME) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":59 + * cls.EARLY: 'EARLY', + * cls.ON_TIME: 'ON_TIME', + * cls.LATE: 'LATE', # <<<<<<<<<<<<<< + * cls.UNKNOWN: 'UNKNOWN', + * }[value] +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_LATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_LATE) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":60 + * cls.ON_TIME: 'ON_TIME', + * cls.LATE: 'LATE', + * cls.UNKNOWN: 'UNKNOWN', # <<<<<<<<<<<<<< + * }[value] + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_UNKNOWN) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":61 + * cls.LATE: 'LATE', + * cls.UNKNOWN: 'UNKNOWN', + * }[value] # <<<<<<<<<<<<<< + * + * @classmethod +*/ + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":54 + * UNKNOWN = 3 + * + * @classmethod # <<<<<<<<<<<<<< + * def to_string(cls, value): + * return { +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfoTiming.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":63 + * }[value] + * + * @classmethod # <<<<<<<<<<<<<< + * def from_string(cls, value): + * return { +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_3from_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_3from_string = {"from_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_3from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_3from_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_cls = 0; + PyObject *__pyx_v_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_string (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 63, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 63, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 63, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_string", 0) < (0)) __PYX_ERR(0, 63, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_string", 1, 2, 2, i); __PYX_ERR(0, 63, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 63, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 63, __pyx_L3_error) + } + __pyx_v_cls = values[0]; + __pyx_v_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_string", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 63, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfoTiming.from_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_2from_string(__pyx_self, __pyx_v_cls, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_2from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_string", 0); + + /* "apache_beam/utils/windowed_value.py":65 + * @classmethod + * def from_string(cls, value): + * return { # <<<<<<<<<<<<<< + * 'EARLY': cls.EARLY, + * 'ON_TIME': cls.ON_TIME, +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":66 + * def from_string(cls, value): + * return { + * 'EARLY': cls.EARLY, # <<<<<<<<<<<<<< + * 'ON_TIME': cls.ON_TIME, + * 'LATE': cls.LATE, +*/ + __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_EARLY, __pyx_t_2) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":67 + * return { + * 'EARLY': cls.EARLY, + * 'ON_TIME': cls.ON_TIME, # <<<<<<<<<<<<<< + * 'LATE': cls.LATE, + * 'UNKNOWN': cls.UNKNOWN +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_ON_TIME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ON_TIME, __pyx_t_2) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":68 + * 'EARLY': cls.EARLY, + * 'ON_TIME': cls.ON_TIME, + * 'LATE': cls.LATE, # <<<<<<<<<<<<<< + * 'UNKNOWN': cls.UNKNOWN + * }[value] +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_LATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LATE, __pyx_t_2) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":69 + * 'ON_TIME': cls.ON_TIME, + * 'LATE': cls.LATE, + * 'UNKNOWN': cls.UNKNOWN # <<<<<<<<<<<<<< + * }[value] + * +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_mstate_global->__pyx_n_u_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_UNKNOWN, __pyx_t_2) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":70 + * 'LATE': cls.LATE, + * 'UNKNOWN': cls.UNKNOWN + * }[value] # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":63 + * }[value] + * + * @classmethod # <<<<<<<<<<<<<< + * def from_string(cls, value): + * return { +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfoTiming.from_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":81 + * from a window, and the index of the firing. + * """ + * def __init__(self, is_first, is_last, timing, index, nonspeculative_index): # <<<<<<<<<<<<<< + * self._is_first = is_first + * self._is_last = is_last +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_is_first = 0; + PyObject *__pyx_v_is_last = 0; + PyObject *__pyx_v_timing = 0; + PyObject *__pyx_v_index = 0; + PyObject *__pyx_v_nonspeculative_index = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_is_first,&__pyx_mstate_global->__pyx_n_u_is_last,&__pyx_mstate_global->__pyx_n_u_timing,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_nonspeculative_index,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 81, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 81, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 81, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 81, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 81, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 81, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 81, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 81, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 81, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 81, __pyx_L3_error) + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 81, __pyx_L3_error) + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 81, __pyx_L3_error) + values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 81, __pyx_L3_error) + } + __pyx_v_is_first = values[0]; + __pyx_v_is_last = values[1]; + __pyx_v_timing = values[2]; + __pyx_v_index = values[3]; + __pyx_v_nonspeculative_index = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 81, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo___init__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self), __pyx_v_is_first, __pyx_v_is_last, __pyx_v_timing, __pyx_v_index, __pyx_v_nonspeculative_index); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self, PyObject *__pyx_v_is_first, PyObject *__pyx_v_is_last, PyObject *__pyx_v_timing, PyObject *__pyx_v_index, PyObject *__pyx_v_nonspeculative_index) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + unsigned char __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/windowed_value.py":82 + * """ + * def __init__(self, is_first, is_last, timing, index, nonspeculative_index): + * self._is_first = is_first # <<<<<<<<<<<<<< + * self._is_last = is_last + * self._timing = timing +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_first); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_v_self->_is_first = __pyx_t_1; + + /* "apache_beam/utils/windowed_value.py":83 + * def __init__(self, is_first, is_last, timing, index, nonspeculative_index): + * self._is_first = is_first + * self._is_last = is_last # <<<<<<<<<<<<<< + * self._timing = timing + * self._index = index +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_last); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_v_self->_is_last = __pyx_t_1; + + /* "apache_beam/utils/windowed_value.py":84 + * self._is_first = is_first + * self._is_last = is_last + * self._timing = timing # <<<<<<<<<<<<<< + * self._index = index + * self._nonspeculative_index = nonspeculative_index +*/ + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_timing); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_v_self->_timing = __pyx_t_2; + + /* "apache_beam/utils/windowed_value.py":85 + * self._is_last = is_last + * self._timing = timing + * self._index = index # <<<<<<<<<<<<<< + * self._nonspeculative_index = nonspeculative_index + * self._encoded_byte = self._get_encoded_byte() +*/ + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_index); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_v_self->_index = __pyx_t_2; + + /* "apache_beam/utils/windowed_value.py":86 + * self._timing = timing + * self._index = index + * self._nonspeculative_index = nonspeculative_index # <<<<<<<<<<<<<< + * self._encoded_byte = self._get_encoded_byte() + * +*/ + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_nonspeculative_index); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_v_self->_nonspeculative_index = __pyx_t_2; + + /* "apache_beam/utils/windowed_value.py":87 + * self._index = index + * self._nonspeculative_index = nonspeculative_index + * self._encoded_byte = self._get_encoded_byte() # <<<<<<<<<<<<<< + * + * def _get_encoded_byte(self): +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_encoded_byte, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_6 = __Pyx_PyLong_As_unsigned_char(__pyx_t_3); if (unlikely((__pyx_t_6 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->_encoded_byte = __pyx_t_6; + + /* "apache_beam/utils/windowed_value.py":81 + * from a window, and the index of the firing. + * """ + * def __init__(self, is_first, is_last, timing, index, nonspeculative_index): # <<<<<<<<<<<<<< + * self._is_first = is_first + * self._is_last = is_last +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":89 + * self._encoded_byte = self._get_encoded_byte() + * + * def _get_encoded_byte(self): # <<<<<<<<<<<<<< + * byte = 0 + * if self._is_first: +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte = {"_get_encoded_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_get_encoded_byte (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_get_encoded_byte", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_get_encoded_byte", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_2_get_encoded_byte(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_2_get_encoded_byte(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_v_byte = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_encoded_byte", 0); + + /* "apache_beam/utils/windowed_value.py":90 + * + * def _get_encoded_byte(self): + * byte = 0 # <<<<<<<<<<<<<< + * if self._is_first: + * byte |= 1 +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_byte = __pyx_mstate_global->__pyx_int_0; + + /* "apache_beam/utils/windowed_value.py":91 + * def _get_encoded_byte(self): + * byte = 0 + * if self._is_first: # <<<<<<<<<<<<<< + * byte |= 1 + * if self._is_last: +*/ + if (__pyx_v_self->_is_first) { + + /* "apache_beam/utils/windowed_value.py":92 + * byte = 0 + * if self._is_first: + * byte |= 1 # <<<<<<<<<<<<<< + * if self._is_last: + * byte |= 2 +*/ + __pyx_t_1 = __Pyx_PyLong_OrObjC(__pyx_v_byte, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_byte, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":91 + * def _get_encoded_byte(self): + * byte = 0 + * if self._is_first: # <<<<<<<<<<<<<< + * byte |= 1 + * if self._is_last: +*/ + } + + /* "apache_beam/utils/windowed_value.py":93 + * if self._is_first: + * byte |= 1 + * if self._is_last: # <<<<<<<<<<<<<< + * byte |= 2 + * byte |= self._timing << 2 +*/ + if (__pyx_v_self->_is_last) { + + /* "apache_beam/utils/windowed_value.py":94 + * byte |= 1 + * if self._is_last: + * byte |= 2 # <<<<<<<<<<<<<< + * byte |= self._timing << 2 + * return byte +*/ + __pyx_t_1 = __Pyx_PyLong_OrObjC(__pyx_v_byte, __pyx_mstate_global->__pyx_int_2, 2, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_byte, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":93 + * if self._is_first: + * byte |= 1 + * if self._is_last: # <<<<<<<<<<<<<< + * byte |= 2 + * byte |= self._timing << 2 +*/ + } + + /* "apache_beam/utils/windowed_value.py":95 + * if self._is_last: + * byte |= 2 + * byte |= self._timing << 2 # <<<<<<<<<<<<<< + * return byte + * +*/ + __pyx_t_1 = __Pyx_PyLong_From_long((__pyx_v_self->_timing << 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_byte, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_byte, __pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":96 + * byte |= 2 + * byte |= self._timing << 2 + * return byte # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_byte); + __pyx_r = __pyx_v_byte; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":89 + * self._encoded_byte = self._get_encoded_byte() + * + * def _get_encoded_byte(self): # <<<<<<<<<<<<<< + * byte = 0 + * if self._is_first: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._get_encoded_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_byte); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":98 + * return byte + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_encoded_byte(encoded_byte): + * assert encoded_byte in _BYTE_TO_PANE_INFO +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte = {"from_encoded_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_encoded_byte = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_encoded_byte (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoded_byte,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 98, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 98, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_encoded_byte", 0) < (0)) __PYX_ERR(0, 98, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_encoded_byte", 1, 1, 1, i); __PYX_ERR(0, 98, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 98, __pyx_L3_error) + } + __pyx_v_encoded_byte = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_encoded_byte", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.from_encoded_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_4from_encoded_byte(__pyx_v_encoded_byte); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_4from_encoded_byte(PyObject *__pyx_v_encoded_byte) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_encoded_byte", 0); + + /* "apache_beam/utils/windowed_value.py":100 + * @staticmethod + * def from_encoded_byte(encoded_byte): + * assert encoded_byte in _BYTE_TO_PANE_INFO # <<<<<<<<<<<<<< + * return _BYTE_TO_PANE_INFO[encoded_byte] + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_encoded_byte, __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); + __PYX_ERR(0, 100, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 100, __pyx_L1_error) + #endif + + /* "apache_beam/utils/windowed_value.py":101 + * def from_encoded_byte(encoded_byte): + * assert encoded_byte in _BYTE_TO_PANE_INFO + * return _BYTE_TO_PANE_INFO[encoded_byte] # <<<<<<<<<<<<<< + * + * # Because common PaneInfo objects are cached, it is important that the value +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 101, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, __pyx_v_encoded_byte); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":98 + * return byte + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_encoded_byte(encoded_byte): + * assert encoded_byte in _BYTE_TO_PANE_INFO +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.from_encoded_byte", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":107 + * # properties. + * + * @property # <<<<<<<<<<<<<< + * def is_first(self): + * return self._is_first +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":109 + * @property + * def is_first(self): + * return self._is_first # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":107 + * # properties. + * + * @property # <<<<<<<<<<<<<< + * def is_first(self): + * return self._is_first +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.is_first.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":111 + * return self._is_first + * + * @property # <<<<<<<<<<<<<< + * def is_last(self): + * return self._is_last +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":113 + * @property + * def is_last(self): + * return self._is_last # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":111 + * return self._is_first + * + * @property # <<<<<<<<<<<<<< + * def is_last(self): + * return self._is_last +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.is_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":115 + * return self._is_last + * + * @property # <<<<<<<<<<<<<< + * def timing(self): + * return self._timing +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":117 + * @property + * def timing(self): + * return self._timing # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":115 + * return self._is_last + * + * @property # <<<<<<<<<<<<<< + * def timing(self): + * return self._timing +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.timing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":119 + * return self._timing + * + * @property # <<<<<<<<<<<<<< + * def index(self): + * # type: () -> int +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_5index___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_5index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":122 + * def index(self): + * # type: () -> int + * return self._index # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":119 + * return self._timing + * + * @property # <<<<<<<<<<<<<< + * def index(self): + * # type: () -> int +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":124 + * return self._index + * + * @property # <<<<<<<<<<<<<< + * def nonspeculative_index(self): + * # type: () -> int +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":127 + * def nonspeculative_index(self): + * # type: () -> int + * return self._nonspeculative_index # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_nonspeculative_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":124 + * return self._index + * + * @property # <<<<<<<<<<<<<< + * def nonspeculative_index(self): + * # type: () -> int +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.nonspeculative_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":129 + * return self._nonspeculative_index + * + * @property # <<<<<<<<<<<<<< + * def encoded_byte(self): + * # type: () -> int +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":132 + * def encoded_byte(self): + * # type: () -> int + * return self._encoded_byte # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->_encoded_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":129 + * return self._nonspeculative_index + * + * @property # <<<<<<<<<<<<<< + * def encoded_byte(self): + * # type: () -> int +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.encoded_byte.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":134 + * return self._encoded_byte + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ( + * 'PaneInfo(first: %r, last: %r, timing: %s, index: %d, ' +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6__repr__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7[11]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/utils/windowed_value.py":135 + * + * def __repr__(self): + * return ( # <<<<<<<<<<<<<< + * 'PaneInfo(first: %r, last: %r, timing: %s, index: %d, ' + * 'nonspeculative_index: %d)') % ( +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":138 + * 'PaneInfo(first: %r, last: %r, timing: %s, index: %d, ' + * 'nonspeculative_index: %d)') % ( + * self.is_first, # <<<<<<<<<<<<<< + * self.is_last, + * PaneInfoTiming.to_string(self.timing), +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":139 + * 'nonspeculative_index: %d)') % ( + * self.is_first, + * self.is_last, # <<<<<<<<<<<<<< + * PaneInfoTiming.to_string(self.timing), + * self.index, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":140 + * self.is_first, + * self.is_last, + * PaneInfoTiming.to_string(self.timing), # <<<<<<<<<<<<<< + * self.index, + * self.nonspeculative_index) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_to_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":141 + * self.is_last, + * PaneInfoTiming.to_string(self.timing), + * self.index, # <<<<<<<<<<<<<< + * self.nonspeculative_index) + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_5), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":142 + * PaneInfoTiming.to_string(self.timing), + * self.index, + * self.nonspeculative_index) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_5), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_PaneInfo_first; + __pyx_t_7[1] = __pyx_t_2; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_last; + __pyx_t_7[3] = __pyx_t_3; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_timing_2; + __pyx_t_7[5] = __pyx_t_1; + __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u_index_2; + __pyx_t_7[7] = __pyx_t_4; + __pyx_t_7[8] = __pyx_mstate_global->__pyx_kp_u_nonspeculative_index_2; + __pyx_t_7[9] = __pyx_t_6; + __pyx_t_7[10] = __pyx_mstate_global->__pyx_kp_u_; + + /* "apache_beam/utils/windowed_value.py":136 + * def __repr__(self): + * return ( + * 'PaneInfo(first: %r, last: %r, timing: %s, index: %d, ' # <<<<<<<<<<<<<< + * 'nonspeculative_index: %d)') % ( + * self.is_first, +*/ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 11, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":134 + * return self._encoded_byte + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return ( + * 'PaneInfo(first: %r, last: %r, timing: %s, index: %d, ' +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":144 + * self.nonspeculative_index) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if self is other: + * return True +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8__eq__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/utils/windowed_value.py":145 + * + * def __eq__(self, other): + * if self is other: # <<<<<<<<<<<<<< + * return True + * +*/ + __pyx_t_1 = (((PyObject *)__pyx_v_self) == __pyx_v_other); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":146 + * def __eq__(self, other): + * if self is other: + * return True # <<<<<<<<<<<<<< + * + * if isinstance(other, PaneInfo): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":145 + * + * def __eq__(self, other): + * if self is other: # <<<<<<<<<<<<<< + * return True + * +*/ + } + + /* "apache_beam/utils/windowed_value.py":148 + * return True + * + * if isinstance(other, PaneInfo): # <<<<<<<<<<<<<< + * return ( + * self.is_first == other.is_first and self.is_last == other.is_last and +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":149 + * + * if isinstance(other, PaneInfo): + * return ( # <<<<<<<<<<<<<< + * self.is_first == other.is_first and self.is_last == other.is_last and + * self.timing == other.timing and self.index == other.index and +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":150 + * if isinstance(other, PaneInfo): + * return ( + * self.is_first == other.is_first and self.is_last == other.is_last and # <<<<<<<<<<<<<< + * self.timing == other.timing and self.index == other.index and + * self.nonspeculative_index == other.nonspeculative_index) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_is_first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 150, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_last); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_is_last); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 150, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/utils/windowed_value.py":151 + * return ( + * self.is_first == other.is_first and self.is_last == other.is_last and + * self.timing == other.timing and self.index == other.index and # <<<<<<<<<<<<<< + * self.nonspeculative_index == other.nonspeculative_index) + * +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 151, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 151, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L5_bool_binop_done; + } + + /* "apache_beam/utils/windowed_value.py":152 + * self.is_first == other.is_first and self.is_last == other.is_last and + * self.timing == other.timing and self.index == other.index and + * self.nonspeculative_index == other.nonspeculative_index) # <<<<<<<<<<<<<< + * + * return NotImplemented +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_L5_bool_binop_done:; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":148 + * return True + * + * if isinstance(other, PaneInfo): # <<<<<<<<<<<<<< + * return ( + * self.is_first == other.is_first and self.is_last == other.is_last and +*/ + } + + /* "apache_beam/utils/windowed_value.py":154 + * self.nonspeculative_index == other.nonspeculative_index) + * + * return NotImplemented # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_builtin_NotImplemented); + __pyx_r = __pyx_builtin_NotImplemented; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":144 + * self.nonspeculative_index) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if self is other: + * return True +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":156 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(( + * self.is_first, +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_11__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_11__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_10__hash__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_10__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_hash_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/utils/windowed_value.py":158 + * def __hash__(self): + * return hash(( + * self.is_first, # <<<<<<<<<<<<<< + * self.is_last, + * self.timing, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "apache_beam/utils/windowed_value.py":159 + * return hash(( + * self.is_first, + * self.is_last, # <<<<<<<<<<<<<< + * self.timing, + * self.index, +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/utils/windowed_value.py":160 + * self.is_first, + * self.is_last, + * self.timing, # <<<<<<<<<<<<<< + * self.index, + * self.nonspeculative_index)) +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "apache_beam/utils/windowed_value.py":161 + * self.is_last, + * self.timing, + * self.index, # <<<<<<<<<<<<<< + * self.nonspeculative_index)) + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/utils/windowed_value.py":162 + * self.timing, + * self.index, + * self.nonspeculative_index)) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nonspeculative_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/utils/windowed_value.py":158 + * def __hash__(self): + * return hash(( + * self.is_first, # <<<<<<<<<<<<<< + * self.is_last, + * self.timing, +*/ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 158, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 158, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 158, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 158, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 158, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":157 + * + * def __hash__(self): + * return hash(( # <<<<<<<<<<<<<< + * self.is_first, + * self.is_last, +*/ + __pyx_t_7 = PyObject_Hash(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_hash_t)-1))) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":156 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(( + * self.is_first, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":164 + * self.nonspeculative_index)) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, + * self._nonspeculative_index) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12__reduce__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_12__reduce__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/utils/windowed_value.py":165 + * + * def __reduce__(self): + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, # <<<<<<<<<<<<<< + * self._nonspeculative_index) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_self->_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "apache_beam/utils/windowed_value.py":166 + * def __reduce__(self): + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, + * self._nonspeculative_index) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_self->_nonspeculative_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "apache_beam/utils/windowed_value.py":165 + * + * def __reduce__(self): + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, # <<<<<<<<<<<<<< + * self._nonspeculative_index) + * +*/ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo)) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 165, __pyx_L1_error); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":164 + * self.nonspeculative_index)) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, + * self._nonspeculative_index) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":29 + * @cython.final + * cdef class PaneInfo(object): + * cdef readonly bint _is_first # <<<<<<<<<<<<<< + * cdef readonly bint _is_last + * cdef readonly int _timing +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._is_first.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":30 + * cdef class PaneInfo(object): + * cdef readonly bint _is_first + * cdef readonly bint _is_last # <<<<<<<<<<<<<< + * cdef readonly int _timing + * cdef readonly int _index +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._is_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":31 + * cdef readonly bint _is_first + * cdef readonly bint _is_last + * cdef readonly int _timing # <<<<<<<<<<<<<< + * cdef readonly int _index + * cdef readonly int _nonspeculative_index +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._timing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":32 + * cdef readonly bint _is_last + * cdef readonly int _timing + * cdef readonly int _index # <<<<<<<<<<<<<< + * cdef readonly int _nonspeculative_index + * cdef readonly unsigned char _encoded_byte +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":33 + * cdef readonly int _timing + * cdef readonly int _index + * cdef readonly int _nonspeculative_index # <<<<<<<<<<<<<< + * cdef readonly unsigned char _encoded_byte + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_nonspeculative_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._nonspeculative_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":34 + * cdef readonly int _index + * cdef readonly int _nonspeculative_index + * cdef readonly unsigned char _encoded_byte # <<<<<<<<<<<<<< + * + * @cython.final +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_char(__pyx_v_self->_encoded_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.PaneInfo._encoded_byte.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":169 + * + * + * def _construct_well_known_pane_infos(): # <<<<<<<<<<<<<< + * # type: () -> List[PaneInfo] + * pane_infos = [] +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_1_construct_well_known_pane_infos(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_1_construct_well_known_pane_infos = {"_construct_well_known_pane_infos", (PyCFunction)__pyx_pw_11apache_beam_5utils_14windowed_value_1_construct_well_known_pane_infos, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_1_construct_well_known_pane_infos(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_construct_well_known_pane_infos (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value__construct_well_known_pane_infos(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/utils/windowed_value.py":182 + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) + * result = [None] * ( + * max(p.encoded_byte for p in pane_infos) + 1 # <<<<<<<<<<<<<< + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: +*/ + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 182, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_2generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_construct_well_known_pane_infos, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value); if (unlikely(!gen)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value._construct_well_known_pane_infos.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 182, __pyx_L1_error) + } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 182, __pyx_L1_error) } + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 182, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_2; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_mstate_global->__pyx_n_u_encoded_byte); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 182, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":169 + * + * + * def _construct_well_known_pane_infos(): # <<<<<<<<<<<<<< + * # type: () -> List[PaneInfo] + * pane_infos = [] +*/ + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value__construct_well_known_pane_infos(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_v_pane_infos = NULL; + PyObject *__pyx_v_timing = NULL; + long __pyx_v_nonspeculative_index; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_pane_info = NULL; + PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_2generator2 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + size_t __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_construct_well_known_pane_infos", 0); + + /* "apache_beam/utils/windowed_value.py":171 + * def _construct_well_known_pane_infos(): + * # type: () -> List[PaneInfo] + * pane_infos = [] # <<<<<<<<<<<<<< + * for timing in (PaneInfoTiming.EARLY, + * PaneInfoTiming.ON_TIME, +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_pane_infos = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":172 + * # type: () -> List[PaneInfo] + * pane_infos = [] + * for timing in (PaneInfoTiming.EARLY, # <<<<<<<<<<<<<< + * PaneInfoTiming.ON_TIME, + * PaneInfoTiming.LATE, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":173 + * pane_infos = [] + * for timing in (PaneInfoTiming.EARLY, + * PaneInfoTiming.ON_TIME, # <<<<<<<<<<<<<< + * PaneInfoTiming.LATE, + * PaneInfoTiming.UNKNOWN): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ON_TIME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":174 + * for timing in (PaneInfoTiming.EARLY, + * PaneInfoTiming.ON_TIME, + * PaneInfoTiming.LATE, # <<<<<<<<<<<<<< + * PaneInfoTiming.UNKNOWN): + * nonspeculative_index = -1 if timing == PaneInfoTiming.EARLY else 0 +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":175 + * PaneInfoTiming.ON_TIME, + * PaneInfoTiming.LATE, + * PaneInfoTiming.UNKNOWN): # <<<<<<<<<<<<<< + * nonspeculative_index = -1 if timing == PaneInfoTiming.EARLY else 0 + * pane_infos.append(PaneInfo(True, True, timing, 0, nonspeculative_index)) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_UNKNOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":172 + * # type: () -> List[PaneInfo] + * pane_infos = [] + * for timing in (PaneInfoTiming.EARLY, # <<<<<<<<<<<<<< + * PaneInfoTiming.ON_TIME, + * PaneInfoTiming.LATE, +*/ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 172, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 172, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 172, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 172, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_6 >= 4) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); + #endif + ++__pyx_t_6; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_timing, __pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":176 + * PaneInfoTiming.LATE, + * PaneInfoTiming.UNKNOWN): + * nonspeculative_index = -1 if timing == PaneInfoTiming.EARLY else 0 # <<<<<<<<<<<<<< + * pane_infos.append(PaneInfo(True, True, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(True, False, timing, 0, nonspeculative_index)) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_EARLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_v_timing, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_8) { + __pyx_t_7 = -1L; + } else { + __pyx_t_7 = 0; + } + __pyx_v_nonspeculative_index = __pyx_t_7; + + /* "apache_beam/utils/windowed_value.py":177 + * PaneInfoTiming.UNKNOWN): + * nonspeculative_index = -1 if timing == PaneInfoTiming.EARLY else 0 + * pane_infos.append(PaneInfo(True, True, timing, 0, nonspeculative_index)) # <<<<<<<<<<<<<< + * pane_infos.append(PaneInfo(True, False, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, True, timing, -1, nonspeculative_index)) +*/ + __pyx_t_4 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_4, Py_True, Py_True, __pyx_v_timing, __pyx_mstate_global->__pyx_int_0, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_pane_infos, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":178 + * nonspeculative_index = -1 if timing == PaneInfoTiming.EARLY else 0 + * pane_infos.append(PaneInfo(True, True, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(True, False, timing, 0, nonspeculative_index)) # <<<<<<<<<<<<<< + * pane_infos.append(PaneInfo(False, True, timing, -1, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, Py_True, Py_False, __pyx_v_timing, __pyx_mstate_global->__pyx_int_0, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_pane_infos, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":179 + * pane_infos.append(PaneInfo(True, True, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(True, False, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, True, timing, -1, nonspeculative_index)) # <<<<<<<<<<<<<< + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) + * result = [None] * ( +*/ + __pyx_t_4 = NULL; + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_4, Py_False, Py_True, __pyx_v_timing, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_pane_infos, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":180 + * pane_infos.append(PaneInfo(True, False, timing, 0, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, True, timing, -1, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) # <<<<<<<<<<<<<< + * result = [None] * ( + * max(p.encoded_byte for p in pane_infos) + 1 +*/ + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[6] = {__pyx_t_3, Py_False, Py_False, __pyx_v_timing, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_pane_infos, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":172 + * # type: () -> List[PaneInfo] + * pane_infos = [] + * for timing in (PaneInfoTiming.EARLY, # <<<<<<<<<<<<<< + * PaneInfoTiming.ON_TIME, + * PaneInfoTiming.LATE, +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":182 + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) + * result = [None] * ( + * max(p.encoded_byte for p in pane_infos) + 1 # <<<<<<<<<<<<<< + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: +*/ + __pyx_t_1 = NULL; + __pyx_t_4 = __pyx_pf_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_genexpr(NULL, __pyx_v_pane_infos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":181 + * pane_infos.append(PaneInfo(False, True, timing, -1, nonspeculative_index)) + * pane_infos.append(PaneInfo(False, False, timing, -1, nonspeculative_index)) + * result = [None] * ( # <<<<<<<<<<<<<< + * max(p.encoded_byte for p in pane_infos) + 1 + * ) # type: List[PaneInfo] # type: ignore[list-item] +*/ + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, Py_None) != (0)) __PYX_ERR(0, 181, __pyx_L1_error); + { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_temp); + __Pyx_DECREF(__pyx_t_5); + __pyx_t_5 = __pyx_temp; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":184 + * max(p.encoded_byte for p in pane_infos) + 1 + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: # <<<<<<<<<<<<<< + * result[pane_info.encoded_byte] = pane_info + * return result +*/ + __pyx_t_5 = __pyx_v_pane_infos; __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 184, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_pane_info, __pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":185 + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: + * result[pane_info.encoded_byte] = pane_info # <<<<<<<<<<<<<< + * return result + * +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pane_info, __pyx_mstate_global->__pyx_n_u_encoded_byte); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely((PyObject_SetItem(__pyx_v_result, __pyx_t_4, __pyx_v_pane_info) < 0))) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":184 + * max(p.encoded_byte for p in pane_infos) + 1 + * ) # type: List[PaneInfo] # type: ignore[list-item] + * for pane_info in pane_infos: # <<<<<<<<<<<<<< + * result[pane_info.encoded_byte] = pane_info + * return result +*/ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":186 + * for pane_info in pane_infos: + * result[pane_info.encoded_byte] = pane_info + * return result # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":169 + * + * + * def _construct_well_known_pane_infos(): # <<<<<<<<<<<<<< + * # type: () -> List[PaneInfo] + * pane_infos = [] +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._construct_well_known_pane_infos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pane_infos); + __Pyx_XDECREF(__pyx_v_timing); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_pane_info); + __Pyx_XDECREF(__pyx_gb_11apache_beam_5utils_14windowed_value_32_construct_well_known_pane_infos_2generator2); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":208 + * PANE_INFO_UNKNOWN. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * value, +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_timestamp = 0; + PyObject *__pyx_v_windows = 0; + PyObject *__pyx_v_pane_info = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_windows,&__pyx_mstate_global->__pyx_n_u_pane_info,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 208, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 208, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 208, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 208, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 208, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 208, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 208, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__2); + } + __pyx_v_value = values[0]; + __pyx_v_timestamp = values[1]; + __pyx_v_windows = values[2]; + __pyx_v_pane_info = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 208, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue___init__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), __pyx_v_value, __pyx_v_timestamp, __pyx_v_windows, __pyx_v_pane_info); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int64_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/windowed_value.py":218 + * # For performance reasons, only timestamp_micros is stored by default + * # (as a C int). The Timestamp object is created on demand below. + * self.value = value # <<<<<<<<<<<<<< + * if isinstance(timestamp, int): + * self.timestamp_micros = timestamp * 1000000 +*/ + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = __pyx_v_value; + + /* "apache_beam/utils/windowed_value.py":219 + * # (as a C int). The Timestamp object is created on demand below. + * self.value = value + * if isinstance(timestamp, int): # <<<<<<<<<<<<<< + * self.timestamp_micros = timestamp * 1000000 + * if TYPE_CHECKING: +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_timestamp); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":220 + * self.value = value + * if isinstance(timestamp, int): + * self.timestamp_micros = timestamp * 1000000 # <<<<<<<<<<<<<< + * if TYPE_CHECKING: + * self.timestamp_object = None # type: Optional[Timestamp] +*/ + __pyx_t_2 = __Pyx_PyLong_MultiplyObjC(__pyx_v_timestamp, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->timestamp_micros = __pyx_t_3; + + /* "apache_beam/utils/windowed_value.py":221 + * if isinstance(timestamp, int): + * self.timestamp_micros = timestamp * 1000000 + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * self.timestamp_object = None # type: Optional[Timestamp] + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":222 + * self.timestamp_micros = timestamp * 1000000 + * if TYPE_CHECKING: + * self.timestamp_object = None # type: Optional[Timestamp] # <<<<<<<<<<<<<< + * else: + * self.timestamp_object = ( +*/ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->timestamp_object); + __Pyx_DECREF(__pyx_v_self->timestamp_object); + __pyx_v_self->timestamp_object = Py_None; + + /* "apache_beam/utils/windowed_value.py":221 + * if isinstance(timestamp, int): + * self.timestamp_micros = timestamp * 1000000 + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * self.timestamp_object = None # type: Optional[Timestamp] + * else: +*/ + } + + /* "apache_beam/utils/windowed_value.py":219 + * # (as a C int). The Timestamp object is created on demand below. + * self.value = value + * if isinstance(timestamp, int): # <<<<<<<<<<<<<< + * self.timestamp_micros = timestamp * 1000000 + * if TYPE_CHECKING: +*/ + goto __pyx_L3; + } + + /* "apache_beam/utils/windowed_value.py":224 + * self.timestamp_object = None # type: Optional[Timestamp] + * else: + * self.timestamp_object = ( # <<<<<<<<<<<<<< + * timestamp + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) +*/ + /*else*/ { + + /* "apache_beam/utils/windowed_value.py":226 + * self.timestamp_object = ( + * timestamp + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) # <<<<<<<<<<<<<< + * self.timestamp_micros = self.timestamp_object.micros + * self.windows = windows +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_timestamp, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":225 + * else: + * self.timestamp_object = ( + * timestamp # <<<<<<<<<<<<<< + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) + * self.timestamp_micros = self.timestamp_object.micros +*/ + __Pyx_INCREF(__pyx_v_timestamp); + __pyx_t_2 = __pyx_v_timestamp; + } else { + + /* "apache_beam/utils/windowed_value.py":226 + * self.timestamp_object = ( + * timestamp + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) # <<<<<<<<<<<<<< + * self.timestamp_micros = self.timestamp_object.micros + * self.windows = windows +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_timestamp}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_of, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + + /* "apache_beam/utils/windowed_value.py":224 + * self.timestamp_object = None # type: Optional[Timestamp] + * else: + * self.timestamp_object = ( # <<<<<<<<<<<<<< + * timestamp + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) +*/ + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->timestamp_object); + __Pyx_DECREF(__pyx_v_self->timestamp_object); + __pyx_v_self->timestamp_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":227 + * timestamp + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) + * self.timestamp_micros = self.timestamp_object.micros # <<<<<<<<<<<<<< + * self.windows = windows + * self.pane_info = pane_info +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->timestamp_object, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->timestamp_micros = __pyx_t_3; + } + __pyx_L3:; + + /* "apache_beam/utils/windowed_value.py":228 + * if isinstance(timestamp, Timestamp) else Timestamp.of(timestamp)) + * self.timestamp_micros = self.timestamp_object.micros + * self.windows = windows # <<<<<<<<<<<<<< + * self.pane_info = pane_info + * +*/ + __Pyx_INCREF(__pyx_v_windows); + __Pyx_GIVEREF(__pyx_v_windows); + __Pyx_GOTREF(__pyx_v_self->windows); + __Pyx_DECREF(__pyx_v_self->windows); + __pyx_v_self->windows = __pyx_v_windows; + + /* "apache_beam/utils/windowed_value.py":229 + * self.timestamp_micros = self.timestamp_object.micros + * self.windows = windows + * self.pane_info = pane_info # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_INCREF(__pyx_v_pane_info); + __Pyx_GIVEREF(__pyx_v_pane_info); + __Pyx_GOTREF(__pyx_v_self->pane_info); + __Pyx_DECREF(__pyx_v_self->pane_info); + __pyx_v_self->pane_info = __pyx_v_pane_info; + + /* "apache_beam/utils/windowed_value.py":208 + * PANE_INFO_UNKNOWN. + * """ + * def __init__( # <<<<<<<<<<<<<< + * self, + * value, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":231 + * self.pane_info = pane_info + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * # type: () -> Timestamp +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":234 + * def timestamp(self): + * # type: () -> Timestamp + * if self.timestamp_object is None: # <<<<<<<<<<<<<< + * self.timestamp_object = Timestamp(0, self.timestamp_micros) + * return self.timestamp_object +*/ + __pyx_t_1 = (__pyx_v_self->timestamp_object == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":235 + * # type: () -> Timestamp + * if self.timestamp_object is None: + * self.timestamp_object = Timestamp(0, self.timestamp_micros) # <<<<<<<<<<<<<< + * return self.timestamp_object + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_4 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->timestamp_micros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_0, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->timestamp_object); + __Pyx_DECREF(__pyx_v_self->timestamp_object); + __pyx_v_self->timestamp_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":234 + * def timestamp(self): + * # type: () -> Timestamp + * if self.timestamp_object is None: # <<<<<<<<<<<<<< + * self.timestamp_object = Timestamp(0, self.timestamp_micros) + * return self.timestamp_object +*/ + } + + /* "apache_beam/utils/windowed_value.py":236 + * if self.timestamp_object is None: + * self.timestamp_object = Timestamp(0, self.timestamp_micros) + * return self.timestamp_object # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->timestamp_object); + __pyx_r = __pyx_v_self->timestamp_object; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":231 + * self.pane_info = pane_info + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * # type: () -> Timestamp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":238 + * return self.timestamp_object + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '(%s, %s, %s, %s)' % ( + * repr(self.value), +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_2__repr__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_2__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9[9]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/utils/windowed_value.py":239 + * + * def __repr__(self): + * return '(%s, %s, %s, %s)' % ( # <<<<<<<<<<<<<< + * repr(self.value), + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":240 + * def __repr__(self): + * return '(%s, %s, %s, %s)' % ( + * repr(self.value), # <<<<<<<<<<<<<< + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), +*/ + __pyx_t_1 = __pyx_v_self->value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":241 + * return '(%s, %s, %s, %s)' % ( + * repr(self.value), + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' # <<<<<<<<<<<<<< + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), + * self.windows, +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); + __pyx_t_2 = __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP; + } else { + + /* "apache_beam/utils/windowed_value.py":242 + * repr(self.value), + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), # <<<<<<<<<<<<<< + * self.windows, + * self.pane_info) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_8) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); + __pyx_t_5 = __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP; + } else { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = 0; + } + + /* "apache_beam/utils/windowed_value.py":241 + * return '(%s, %s, %s, %s)' % ( + * repr(self.value), + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' # <<<<<<<<<<<<<< + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), + * self.windows, +*/ + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":243 + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), + * self.windows, # <<<<<<<<<<<<<< + * self.pane_info) + * +*/ + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->windows), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "apache_beam/utils/windowed_value.py":244 + * if self.timestamp == MAX_TIMESTAMP else float(self.timestamp), + * self.windows, + * self.pane_info) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->pane_info), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_9[1] = __pyx_t_1; + __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_9[3] = __pyx_t_5; + __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_9[5] = __pyx_t_2; + __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_9[7] = __pyx_t_3; + __pyx_t_9[8] = __pyx_mstate_global->__pyx_kp_u_; + + /* "apache_beam/utils/windowed_value.py":239 + * + * def __repr__(self): + * return '(%s, %s, %s, %s)' % ( # <<<<<<<<<<<<<< + * repr(self.value), + * 'MIN_TIMESTAMP' if self.timestamp == MIN_TIMESTAMP else 'MAX_TIMESTAMP' +*/ + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_9, 9, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":238 + * return self.timestamp_object + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '(%s, %s, %s, %s)' % ( + * repr(self.value), +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":246 + * self.pane_info) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, WindowedValue): + * return ( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_4__eq__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_4__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/utils/windowed_value.py":247 + * + * def __eq__(self, other): + * if isinstance(other, WindowedValue): # <<<<<<<<<<<<<< + * return ( + * type(self) == type(other) and +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":248 + * def __eq__(self, other): + * if isinstance(other, WindowedValue): + * return ( # <<<<<<<<<<<<<< + * type(self) == type(other) and + * self.timestamp_micros == other.timestamp_micros and +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":249 + * if isinstance(other, WindowedValue): + * return ( + * type(self) == type(other) and # <<<<<<<<<<<<<< + * self.timestamp_micros == other.timestamp_micros and + * self.value == other.value and self.windows == other.windows and +*/ + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 249, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/utils/windowed_value.py":250 + * return ( + * type(self) == type(other) and + * self.timestamp_micros == other.timestamp_micros and # <<<<<<<<<<<<<< + * self.value == other.value and self.windows == other.windows and + * self.pane_info == other.pane_info) +*/ + __pyx_t_3 = __Pyx_PyLong_From_int64_t(__pyx_v_self->timestamp_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_timestamp_micros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 250, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/utils/windowed_value.py":251 + * type(self) == type(other) and + * self.timestamp_micros == other.timestamp_micros and + * self.value == other.value and self.windows == other.windows and # <<<<<<<<<<<<<< + * self.pane_info == other.pane_info) + * return NotImplemented +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->value, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 251, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_windows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->windows, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 251, __pyx_L1_error) + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_2 = __pyx_t_5; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_bool_binop_done; + } + + /* "apache_beam/utils/windowed_value.py":252 + * self.timestamp_micros == other.timestamp_micros and + * self.value == other.value and self.windows == other.windows and + * self.pane_info == other.pane_info) # <<<<<<<<<<<<<< + * return NotImplemented + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_pane_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->pane_info, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":247 + * + * def __eq__(self, other): + * if isinstance(other, WindowedValue): # <<<<<<<<<<<<<< + * return ( + * type(self) == type(other) and +*/ + } + + /* "apache_beam/utils/windowed_value.py":253 + * self.value == other.value and self.windows == other.windows and + * self.pane_info == other.pane_info) + * return NotImplemented # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_builtin_NotImplemented); + __pyx_r = __pyx_builtin_NotImplemented; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":246 + * self.pane_info) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, WindowedValue): + * return ( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":255 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_6__hash__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_6__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/utils/windowed_value.py":256 + * + * def __hash__(self): + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * # <<<<<<<<<<<<<< + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * +*/ + __pyx_t_1 = __pyx_v_self->value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_mstate_global->__pyx_int_0xfffffffffffffff); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":257 + * def __hash__(self): + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * # <<<<<<<<<<<<<< + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->timestamp_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_mstate_global->__pyx_int_0xffffffffffffff); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":256 + * + * def __hash__(self): + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * # <<<<<<<<<<<<<< + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * +*/ + __pyx_t_1 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_3, __pyx_t_4, 3, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":258 + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * # <<<<<<<<<<<<<< + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) + * +*/ + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_self->windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_mstate_global->__pyx_int_0xfffffffffffff); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":257 + * def __hash__(self): + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * # <<<<<<<<<<<<<< + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) +*/ + __pyx_t_1 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_7, __pyx_t_3, 7, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":259 + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) # <<<<<<<<<<<<<< + * + * def with_value(self, new_value): +*/ + __pyx_t_1 = __pyx_v_self->pane_info; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyLong_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_mstate_global->__pyx_int_0xfffffffffffff); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":258 + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * + * (hash(tuple(self.windows)) & 0xFFFFFFFFFFFFF) + 11 * # <<<<<<<<<<<<<< + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) + * +*/ + __pyx_t_1 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_11, __pyx_t_4, 11, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyLong_AsHash_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":255 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return ((hash(self.value) & 0xFFFFFFFFFFFFFFF) + 3 * + * (self.timestamp_micros & 0xFFFFFFFFFFFFFF) + 7 * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":261 + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) + * + * def with_value(self, new_value): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedValue + * +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_new_value, CYTHON_UNUSED int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_value", 0); + + /* "apache_beam/utils/windowed_value.py":268 + * This is the fasted way to create a new WindowedValue. + * """ + * return create( # <<<<<<<<<<<<<< + * new_value, self.timestamp_micros, self.windows, self.pane_info) + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + + /* "apache_beam/utils/windowed_value.py":269 + * """ + * return create( + * new_value, self.timestamp_micros, self.windows, self.pane_info) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_1 = __pyx_v_self->windows; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_self->pane_info; + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/utils/windowed_value.py":268 + * This is the fasted way to create a new WindowedValue. + * """ + * return create( # <<<<<<<<<<<<<< + * new_value, self.timestamp_micros, self.windows, self.pane_info) + * +*/ + __pyx_t_4.__pyx_n = 1; + __pyx_t_4.pane_info = __pyx_t_2; + __pyx_t_3 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_new_value, __pyx_v_self->timestamp_micros, __pyx_t_1, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":261 + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) + * + * def with_value(self, new_value): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedValue + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.with_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_14windowed_value_13WindowedValue_8with_value, "Creates a new WindowedValue with the same timestamps and windows as this.\n\n This is the fasted way to create a new WindowedValue.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value = {"with_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_14windowed_value_13WindowedValue_8with_value}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_new_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("with_value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 261, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 261, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_value", 0) < (0)) __PYX_ERR(0, 261, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_value", 1, 1, 1, i); __PYX_ERR(0, 261, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 261, __pyx_L3_error) + } + __pyx_v_new_value = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("with_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 261, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.with_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_8with_value(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), __pyx_v_new_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_8with_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_new_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_value", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(__pyx_v_self, __pyx_v_new_value, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.with_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":271 + * new_value, self.timestamp_micros, self.windows, self.pane_info) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return WindowedValue, ( + * self.value, self.timestamp, self.windows, self.pane_info) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_10__reduce__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_10__reduce__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "apache_beam/utils/windowed_value.py":272 + * + * def __reduce__(self): + * return WindowedValue, ( # <<<<<<<<<<<<<< + * self.value, self.timestamp, self.windows, self.pane_info) + * +*/ + __Pyx_XDECREF(__pyx_r); + + /* "apache_beam/utils/windowed_value.py":273 + * def __reduce__(self): + * return WindowedValue, ( + * self.value, self.timestamp, self.windows, self.pane_info) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->value); + __Pyx_GIVEREF(__pyx_v_self->value); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->value) != (0)) __PYX_ERR(0, 273, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 273, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->windows); + __Pyx_GIVEREF(__pyx_v_self->windows); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->windows) != (0)) __PYX_ERR(0, 273, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->pane_info); + __Pyx_GIVEREF(__pyx_v_self->pane_info); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->pane_info) != (0)) __PYX_ERR(0, 273, __pyx_L1_error); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":272 + * + * def __reduce__(self): + * return WindowedValue, ( # <<<<<<<<<<<<<< + * self.value, self.timestamp, self.windows, self.pane_info) + * +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue)) != (0)) __PYX_ERR(0, 272, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 272, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":271 + * new_value, self.timestamp_micros, self.windows, self.pane_info) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return WindowedValue, ( + * self.value, self.timestamp, self.windows, self.pane_info) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":38 + * @cython.final + * cdef class WindowedValue(object): + * cdef public object value # <<<<<<<<<<<<<< + * cdef public object windows + * cdef public object pane_info +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_4__del__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":39 + * cdef class WindowedValue(object): + * cdef public object value + * cdef public object windows # <<<<<<<<<<<<<< + * cdef public object pane_info + * cdef public int64_t timestamp_micros +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->windows); + __pyx_r = __pyx_v_self->windows; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->windows); + __Pyx_DECREF(__pyx_v_self->windows); + __pyx_v_self->windows = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_4__del__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->windows); + __Pyx_DECREF(__pyx_v_self->windows); + __pyx_v_self->windows = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":40 + * cdef public object value + * cdef public object windows + * cdef public object pane_info # <<<<<<<<<<<<<< + * cdef public int64_t timestamp_micros + * cdef object timestamp_object +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pane_info); + __pyx_r = __pyx_v_self->pane_info; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->pane_info); + __Pyx_DECREF(__pyx_v_self->pane_info); + __pyx_v_self->pane_info = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_4__del__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pane_info); + __Pyx_DECREF(__pyx_v_self->pane_info); + __pyx_v_self->pane_info = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":41 + * cdef public object windows + * cdef public object pane_info + * cdef public int64_t timestamp_micros # <<<<<<<<<<<<<< + * cdef object timestamp_object + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->timestamp_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.timestamp_micros.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + int64_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __pyx_t_1 = __Pyx_PyLong_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L1_error) + __pyx_v_self->timestamp_micros = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedValue.timestamp_micros.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":279 + * + * + * def create(value, timestamp_micros, windows, pane_info=PANE_INFO_UNKNOWN): # <<<<<<<<<<<<<< + * wv = WindowedValue.__new__(WindowedValue) + * wv.value = value +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_f_11apache_beam_5utils_14windowed_value_create(PyObject *__pyx_v_value, int64_t __pyx_v_timestamp_micros, PyObject *__pyx_v_windows, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args) { + PyObject *__pyx_v_pane_info = __pyx_mstate_global->__pyx_k__5; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wv = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_pane_info = __pyx_optional_args->pane_info; + } + } + + /* "apache_beam/utils/windowed_value.py":280 + * + * def create(value, timestamp_micros, windows, pane_info=PANE_INFO_UNKNOWN): + * wv = WindowedValue.__new__(WindowedValue) # <<<<<<<<<<<<<< + * wv.value = value + * wv.timestamp_micros = timestamp_micros +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedValue(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":281 + * def create(value, timestamp_micros, windows, pane_info=PANE_INFO_UNKNOWN): + * wv = WindowedValue.__new__(WindowedValue) + * wv.value = value # <<<<<<<<<<<<<< + * wv.timestamp_micros = timestamp_micros + * wv.windows = windows +*/ + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_wv->value); + __Pyx_DECREF(__pyx_v_wv->value); + __pyx_v_wv->value = __pyx_v_value; + + /* "apache_beam/utils/windowed_value.py":282 + * wv = WindowedValue.__new__(WindowedValue) + * wv.value = value + * wv.timestamp_micros = timestamp_micros # <<<<<<<<<<<<<< + * wv.windows = windows + * wv.pane_info = pane_info +*/ + __pyx_v_wv->timestamp_micros = __pyx_v_timestamp_micros; + + /* "apache_beam/utils/windowed_value.py":283 + * wv.value = value + * wv.timestamp_micros = timestamp_micros + * wv.windows = windows # <<<<<<<<<<<<<< + * wv.pane_info = pane_info + * return wv +*/ + __Pyx_INCREF(__pyx_v_windows); + __Pyx_GIVEREF(__pyx_v_windows); + __Pyx_GOTREF(__pyx_v_wv->windows); + __Pyx_DECREF(__pyx_v_wv->windows); + __pyx_v_wv->windows = __pyx_v_windows; + + /* "apache_beam/utils/windowed_value.py":284 + * wv.timestamp_micros = timestamp_micros + * wv.windows = windows + * wv.pane_info = pane_info # <<<<<<<<<<<<<< + * return wv + * +*/ + __Pyx_INCREF(__pyx_v_pane_info); + __Pyx_GIVEREF(__pyx_v_pane_info); + __Pyx_GOTREF(__pyx_v_wv->pane_info); + __Pyx_DECREF(__pyx_v_wv->pane_info); + __pyx_v_wv->pane_info = __pyx_v_pane_info; + + /* "apache_beam/utils/windowed_value.py":285 + * wv.windows = windows + * wv.pane_info = pane_info + * return wv # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_wv); + __pyx_r = __pyx_v_wv; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":279 + * + * + * def create(value, timestamp_micros, windows, pane_info=PANE_INFO_UNKNOWN): # <<<<<<<<<<<<<< + * wv = WindowedValue.__new__(WindowedValue) + * wv.value = value +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_wv); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_3create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_3create, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_value = 0; + int64_t __pyx_v_timestamp_micros; + PyObject *__pyx_v_windows = 0; + PyObject *__pyx_v_pane_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_timestamp_micros,&__pyx_mstate_global->__pyx_n_u_windows,&__pyx_mstate_global->__pyx_n_u_pane_info,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 279, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(0, 279, __pyx_L3_error) + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__5); + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 0, 3, 4, i); __PYX_ERR(0, 279, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 279, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 279, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[3]) values[3] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__5); + } + __pyx_v_value = values[0]; + __pyx_v_timestamp_micros = __Pyx_PyLong_As_int64_t(values[1]); if (unlikely((__pyx_v_timestamp_micros == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_v_windows = values[2]; + __pyx_v_pane_info = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_2create(__pyx_self, __pyx_v_value, __pyx_v_timestamp_micros, __pyx_v_windows, __pyx_v_pane_info); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, int64_t __pyx_v_timestamp_micros, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.pane_info = __pyx_v_pane_info; + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_v_timestamp_micros, __pyx_v_windows, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":291 + * """A batch of N windowed values, each having a value, a timestamp and set of + * windows.""" + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_new_values, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_values", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_with_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values)) { + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_new_values}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/utils/windowed_value.py":298 + * This is the fasted way to create a new WindowedValue. + * """ + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 298, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":291 + * """A batch of N windowed values, each having a value, a timestamp and set of + * windows.""" + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values, "Creates a new WindowedBatch with the same timestamps and windows as this.\n\n This is the fasted way to create a new WindowedValue.\n "); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values = {"with_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_new_values = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("with_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_values,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 291, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 291, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_values", 0) < (0)) __PYX_ERR(0, 291, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_values", 1, 1, 1, i); __PYX_ERR(0, 291, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 291, __pyx_L3_error) + } + __pyx_v_new_values = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("with_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 291, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_self), __pyx_v_new_values); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_values", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values(__pyx_v_self, __pyx_v_new_values, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":300 + * raise NotImplementedError + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values = {"as_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v_explode_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("as_windowed_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_explode_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 300, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 300, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_windowed_values", 0) < (0)) __PYX_ERR(0, 300, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_windowed_values", 1, 1, 1, i); __PYX_ERR(0, 300, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 300, __pyx_L3_error) + } + __pyx_v_explode_fn = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("as_windowed_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 300, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.as_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_2as_windowed_values(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_self), __pyx_v_explode_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_2as_windowed_values(CYTHON_UNUSED struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_explode_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("as_windowed_values", 0); + + /* "apache_beam/utils/windowed_value.py":301 + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: + * raise NotImplementedError # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0); + __PYX_ERR(0, 301, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":300 + * raise NotImplementedError + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.as_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":303 + * raise NotImplementedError + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values = {"from_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_values = 0; + PyObject *__pyx_v_produce_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_windowed_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_values,&__pyx_mstate_global->__pyx_n_u_produce_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 303, __pyx_L3_error) + if (likely(__pyx_kwds_len > 0)) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 303, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_windowed_values", 0) < (0)) __PYX_ERR(0, 303, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_windowed_values", 1, 1, 1, i); __PYX_ERR(0, 303, __pyx_L3_error) } + } + for (Py_ssize_t i = 1; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseKeywordRequired("from_windowed_values", *(__pyx_pyargnames[i - 0])); __PYX_ERR(0, 303, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + __Pyx_RaiseKeywordRequired("from_windowed_values", __pyx_mstate_global->__pyx_n_u_produce_fn); __PYX_ERR(0, 303, __pyx_L3_error) + } + __pyx_v_windowed_values = values[0]; + __pyx_v_produce_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_windowed_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 303, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.from_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_4from_windowed_values(__pyx_v_windowed_values, __pyx_v_produce_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_4from_windowed_values(PyObject *__pyx_v_windowed_values, PyObject *__pyx_v_produce_fn) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_windowed_values", 0); + + /* "apache_beam/utils/windowed_value.py":307 + * windowed_values: Sequence[WindowedValue], *, + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * return HomogeneousWindowedBatch.from_windowed_values( # <<<<<<<<<<<<<< + * windowed_values, produce_fn=produce_fn) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + __Pyx_INCREF(__pyx_t_2); + + /* "apache_beam/utils/windowed_value.py":308 + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * return HomogeneousWindowedBatch.from_windowed_values( + * windowed_values, produce_fn=produce_fn) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_windowed_values}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_produce_fn, __pyx_v_produce_fn, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":303 + * raise NotImplementedError + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.from_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_6__reduce_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_6__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = () # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple); + __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = () + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = False +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = () + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = False # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, None), state +*/ + /*else*/ { + __pyx_v_use_setstate = 0; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = False + * if use_setstate: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedBatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = False + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, None), state + * else: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_WindowedBatch__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedBatch); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedBatch__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_8__setstate_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_13WindowedBatch_8__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_WindowedBatch__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_WindowedBatch__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedBatch__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.WindowedBatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":315 + * internally as a WindowedValue. + * """ + * def __init__(self, wv): # <<<<<<<<<<<<<< + * self._wv = wv + * +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_wv = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wv,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 315, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 315, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 315, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 315, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 315, __pyx_L3_error) + } + __pyx_v_wv = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 315, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch___init__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), __pyx_v_wv); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_wv) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/windowed_value.py":316 + * """ + * def __init__(self, wv): + * self._wv = wv # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_1 = __pyx_v_wv; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_wv); + __Pyx_DECREF((PyObject *)__pyx_v_self->_wv); + __pyx_v_self->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":315 + * internally as a WindowedValue. + * """ + * def __init__(self, wv): # <<<<<<<<<<<<<< + * self._wv = wv + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":318 + * self._wv = wv + * + * @staticmethod # <<<<<<<<<<<<<< + * def of(values, timestamp, windows, pane_info): + * return HomogeneousWindowedBatch( +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of = {"of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_values = 0; + PyObject *__pyx_v_timestamp = 0; + PyObject *__pyx_v_windows = 0; + PyObject *__pyx_v_pane_info = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("of (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_values,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_windows,&__pyx_mstate_global->__pyx_n_u_pane_info,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 318, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 318, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "of", 0) < (0)) __PYX_ERR(0, 318, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("of", 1, 4, 4, i); __PYX_ERR(0, 318, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 318, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 318, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 318, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 318, __pyx_L3_error) + } + __pyx_v_values = values[0]; + __pyx_v_timestamp = values[1]; + __pyx_v_windows = values[2]; + __pyx_v_pane_info = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("of", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 318, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.of", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_2of(__pyx_v_values, __pyx_v_timestamp, __pyx_v_windows, __pyx_v_pane_info); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_2of(PyObject *__pyx_v_values, PyObject *__pyx_v_timestamp, PyObject *__pyx_v_windows, PyObject *__pyx_v_pane_info) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("of", 0); + + /* "apache_beam/utils/windowed_value.py":320 + * @staticmethod + * def of(values, timestamp, windows, pane_info): + * return HomogeneousWindowedBatch( # <<<<<<<<<<<<<< + * WindowedValue(values, timestamp, windows, pane_info)) + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + + /* "apache_beam/utils/windowed_value.py":321 + * def of(values, timestamp, windows, pane_info): + * return HomogeneousWindowedBatch( + * WindowedValue(values, timestamp, windows, pane_info)) # <<<<<<<<<<<<<< + * + * @property +*/ + __pyx_t_4 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_values, __pyx_v_timestamp, __pyx_v_windows, __pyx_v_pane_info}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_t_3)}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF((PyObject *)__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":318 + * self._wv = wv + * + * @staticmethod # <<<<<<<<<<<<<< + * def of(values, timestamp, windows, pane_info): + * return HomogeneousWindowedBatch( +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.of", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":323 + * WindowedValue(values, timestamp, windows, pane_info)) + * + * @property # <<<<<<<<<<<<<< + * def values(self): + * return self._wv.value +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":325 + * @property + * def values(self): + * return self._wv.value # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_wv->value); + __pyx_r = __pyx_v_self->_wv->value; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":323 + * WindowedValue(values, timestamp, windows, pane_info)) + * + * @property # <<<<<<<<<<<<<< + * def values(self): + * return self._wv.value +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":327 + * return self._wv.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * return self._wv.timestamp +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":329 + * @property + * def timestamp(self): + * return self._wv.timestamp # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_wv), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":327 + * return self._wv.value + * + * @property # <<<<<<<<<<<<<< + * def timestamp(self): + * return self._wv.timestamp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":331 + * return self._wv.timestamp + * + * @property # <<<<<<<<<<<<<< + * def pane_info(self): + * return self._wv.pane_info +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":333 + * @property + * def pane_info(self): + * return self._wv.pane_info # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_wv->pane_info); + __pyx_r = __pyx_v_self->_wv->pane_info; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":331 + * return self._wv.timestamp + * + * @property # <<<<<<<<<<<<<< + * def pane_info(self): + * return self._wv.pane_info +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":335 + * return self._wv.pane_info + * + * @property # <<<<<<<<<<<<<< + * def windows(self): + * return self._wv.windows +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":337 + * @property + * def windows(self): + * return self._wv.windows # <<<<<<<<<<<<<< + * + * @windows.setter +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_wv->windows); + __pyx_r = __pyx_v_self->_wv->windows; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":335 + * return self._wv.pane_info + * + * @property # <<<<<<<<<<<<<< + * def windows(self): + * return self._wv.windows +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":339 + * return self._wv.windows + * + * @windows.setter # <<<<<<<<<<<<<< + * def windows(self, value): + * self._wv.windows = value +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + + /* "apache_beam/utils/windowed_value.py":341 + * @windows.setter + * def windows(self, value): + * self._wv.windows = value # <<<<<<<<<<<<<< + * + * def with_values(self, new_values): +*/ + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->_wv->windows); + __Pyx_DECREF(__pyx_v_self->_wv->windows); + __pyx_v_self->_wv->windows = __pyx_v_value; + + /* "apache_beam/utils/windowed_value.py":339 + * return self._wv.windows + * + * @windows.setter # <<<<<<<<<<<<<< + * def windows(self, value): + * self._wv.windows = value +*/ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":343 + * self._wv.windows = value + * + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) +*/ + +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_f_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values, int __pyx_skip_dispatch) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_values", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if ( + #if !CYTHON_USE_TYPE_SLOTS + unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch && + __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) + #else + unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) + #endif + ) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_with_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values)) { + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_new_values}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch))))) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "apache_beam/utils/windowed_value.py":345 + * def with_values(self, new_values): + * # type: (Any) -> WindowedBatch + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) # <<<<<<<<<<<<<< + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_4 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(__pyx_v_self->_wv, __pyx_v_new_values, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":343 + * self._wv.windows = value + * + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values = {"with_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_new_values = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("with_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_new_values,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 343, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 343, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "with_values", 0) < (0)) __PYX_ERR(0, 343, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("with_values", 1, 1, 1, i); __PYX_ERR(0, 343, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 343, __pyx_L3_error) + } + __pyx_v_new_values = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("with_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 343, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_4with_values(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), __pyx_v_new_values); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_4with_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_new_values) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("with_values", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_with_values(__pyx_v_self, __pyx_v_new_values, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.with_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_8generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/utils/windowed_value.py":347 + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * for value in explode_fn(self._wv.value): + * yield self._wv.with_value(value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values = {"as_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_explode_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("as_windowed_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_explode_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 347, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 347, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_windowed_values", 0) < (0)) __PYX_ERR(0, 347, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_windowed_values", 1, 1, 1, i); __PYX_ERR(0, 347, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 347, __pyx_L3_error) + } + __pyx_v_explode_fn = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("as_windowed_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 347, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.as_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6as_windowed_values(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), __pyx_v_explode_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6as_windowed_values(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_explode_fn) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("as_windowed_values", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 347, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __pyx_cur_scope->__pyx_v_explode_fn = __pyx_v_explode_fn; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_explode_fn); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_explode_fn); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_8generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_as_windowed_values, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_as_wind, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value); if (unlikely(!gen)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.as_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_8generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("as_windowed_values", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L6_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 347, __pyx_L1_error) + } + + /* "apache_beam/utils/windowed_value.py":348 + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: + * for value in explode_fn(self._wv.value): # <<<<<<<<<<<<<< + * yield self._wv.with_value(value) + * +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_explode_fn); + __pyx_t_3 = __pyx_cur_scope->__pyx_v_explode_fn; + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_self->_wv->value}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 348, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_5; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 348, __pyx_L1_error) + #endif + if (__pyx_t_5 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); + #else + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); + #endif + ++__pyx_t_5; + } + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + } else { + __pyx_t_1 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 348, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":349 + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: + * for value in explode_fn(self._wv.value): + * yield self._wv.with_value(value) # <<<<<<<<<<<<<< + * + * def as_empty_windowed_value(self): +*/ + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(__pyx_cur_scope->__pyx_v_self->_wv, __pyx_cur_scope->__pyx_v_value, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_XGIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_5; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_6; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L6_resume_from_yield:; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_6 = __pyx_cur_scope->__pyx_t_2; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 349, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":348 + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: + * for value in explode_fn(self._wv.value): # <<<<<<<<<<<<<< + * yield self._wv.with_value(value) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/utils/windowed_value.py":347 + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * for value in explode_fn(self._wv.value): + * yield self._wv.with_value(value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("as_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":351 + * yield self._wv.with_value(value) + * + * def as_empty_windowed_value(self): # <<<<<<<<<<<<<< + * """Get a single WindowedValue with identical windowing information to this + * HomogeneousWindowedBatch, but with value=None. Useful for re-using APIs that +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value, "Get a single WindowedValue with identical windowing information to this\n HomogeneousWindowedBatch, but with value=None. Useful for re-using APIs that\n pull windowing information from a WindowedValue."); +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value = {"as_empty_windowed_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("as_empty_windowed_value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_empty_windowed_value", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_empty_windowed_value", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("as_empty_windowed_value", 0); + + /* "apache_beam/utils/windowed_value.py":355 + * HomogeneousWindowedBatch, but with value=None. Useful for re-using APIs that + * pull windowing information from a WindowedValue.""" + * return self._wv.with_value(None) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(__pyx_v_self->_wv, Py_None, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":351 + * yield self._wv.with_value(value) + * + * def as_empty_windowed_value(self): # <<<<<<<<<<<<<< + * """Get a single WindowedValue with identical windowing information to this + * HomogeneousWindowedBatch, but with value=None. Useful for re-using APIs that +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.as_empty_windowed_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":357 + * return self._wv.with_value(None) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, HomogeneousWindowedBatch): + * return self._wv == other._wv +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_12__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_12__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_11__eq__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_11__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/utils/windowed_value.py":358 + * + * def __eq__(self, other): + * if isinstance(other, HomogeneousWindowedBatch): # <<<<<<<<<<<<<< + * return self._wv == other._wv + * return NotImplemented +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":359 + * def __eq__(self, other): + * if isinstance(other, HomogeneousWindowedBatch): + * return self._wv == other._wv # <<<<<<<<<<<<<< + * return NotImplemented + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_wv_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_wv), __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":358 + * + * def __eq__(self, other): + * if isinstance(other, HomogeneousWindowedBatch): # <<<<<<<<<<<<<< + * return self._wv == other._wv + * return NotImplemented +*/ + } + + /* "apache_beam/utils/windowed_value.py":360 + * if isinstance(other, HomogeneousWindowedBatch): + * return self._wv == other._wv + * return NotImplemented # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_builtin_NotImplemented); + __pyx_r = __pyx_builtin_NotImplemented; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":357 + * return self._wv.with_value(None) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if isinstance(other, HomogeneousWindowedBatch): + * return self._wv == other._wv +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":362 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._wv) + * +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_14__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_14__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_13__hash__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_13__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/utils/windowed_value.py":363 + * + * def __hash__(self): + * return hash(self._wv) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __pyx_t_1 = ((PyObject *)__pyx_v_self->_wv); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":362 + * return NotImplemented + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self._wv) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":365 + * return hash(self._wv) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_batch_and_windowed_value( + * *, batch, windowed_value: WindowedValue) -> 'WindowedBatch': +*/ + +/* Python wrapper */ +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value = {"from_batch_and_windowed_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_batch = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_batch_and_windowed_value (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch,&__pyx_mstate_global->__pyx_n_u_windowed_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 365, __pyx_L3_error) + if (likely(__pyx_kwds_len > 0)) { + switch (__pyx_nargs) { + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "from_batch_and_windowed_value", 0) < (0)) __PYX_ERR(0, 365, __pyx_L3_error) + for (Py_ssize_t i = 0; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseKeywordRequired("from_batch_and_windowed_value", *(__pyx_pyargnames[i - 0])); __PYX_ERR(0, 365, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 0)) { + goto __pyx_L5_argtuple_error; + } else { + __Pyx_RaiseKeywordRequired("from_batch_and_windowed_value", __pyx_mstate_global->__pyx_n_u_batch); __PYX_ERR(0, 365, __pyx_L3_error) + } + __pyx_v_batch = values[0]; + __pyx_v_windowed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)values[1]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_batch_and_windowed_value", 1, 0, 0, __pyx_nargs); __PYX_ERR(0, 365, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.from_batch_and_windowed_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_windowed_value), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, 0, "windowed_value", 0))) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_15from_batch_and_windowed_value(__pyx_v_batch, __pyx_v_windowed_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_15from_batch_and_windowed_value(PyObject *__pyx_v_batch, struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_windowed_value) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_batch_and_windowed_value", 0); + + /* "apache_beam/utils/windowed_value.py":368 + * def from_batch_and_windowed_value( + * *, batch, windowed_value: WindowedValue) -> 'WindowedBatch': + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF((PyObject *)__pyx_r); + __pyx_t_2 = NULL; + __pyx_t_3 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value(__pyx_v_windowed_value, __pyx_v_batch, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_r = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":365 + * return hash(self._wv) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_batch_and_windowed_value( + * *, batch, windowed_value: WindowedValue) -> 'WindowedBatch': +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.from_batch_and_windowed_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_19generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "apache_beam/utils/windowed_value.py":370 + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values = {"from_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_windowed_values = 0; + PyObject *__pyx_v_produce_fn = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_windowed_values (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_windowed_values,&__pyx_mstate_global->__pyx_n_u_produce_fn,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 370, __pyx_L3_error) + if (likely(__pyx_kwds_len > 0)) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 370, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_windowed_values", 0) < (0)) __PYX_ERR(0, 370, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_windowed_values", 1, 1, 1, i); __PYX_ERR(0, 370, __pyx_L3_error) } + } + for (Py_ssize_t i = 1; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseKeywordRequired("from_windowed_values", *(__pyx_pyargnames[i - 0])); __PYX_ERR(0, 370, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + __Pyx_RaiseKeywordRequired("from_windowed_values", __pyx_mstate_global->__pyx_n_u_produce_fn); __PYX_ERR(0, 370, __pyx_L3_error) + } + __pyx_v_windowed_values = values[0]; + __pyx_v_produce_fn = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_windowed_values", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 370, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.from_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_17from_windowed_values(__pyx_v_windowed_values, __pyx_v_produce_fn); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":374 + * windowed_values: Sequence[WindowedValue], *, + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * grouped = collections.defaultdict(lambda: []) # <<<<<<<<<<<<<< + * for wv in windowed_values: + * grouped[wv.with_value(None)].append(wv.value) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20from_windowed_values_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20from_windowed_values_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20from_windowed_values_lambda1, METH_NOARGS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20from_windowed_values_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda1", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.from_windowed_values.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":370 + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_17from_windowed_values(PyObject *__pyx_v_windowed_values, PyObject *__pyx_v_produce_fn) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_windowed_values", 0); + __pyx_cur_scope = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 370, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_windowed_values = __pyx_v_windowed_values; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_windowed_values); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_windowed_values); + __pyx_cur_scope->__pyx_v_produce_fn = __pyx_v_produce_fn; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_produce_fn); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_produce_fn); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_19generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_from_wi, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value); if (unlikely(!gen)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.from_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_19generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_windowed_values", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L9_resume_from_yield; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(__pyx_sent_value != Py_None)) { + if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); + __PYX_ERR(0, 370, __pyx_L1_error) + } + + /* "apache_beam/utils/windowed_value.py":374 + * windowed_values: Sequence[WindowedValue], *, + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * grouped = collections.defaultdict(lambda: []) # <<<<<<<<<<<<<< + * for wv in windowed_values: + * grouped[wv.with_value(None)].append(wv.value) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20from_windowed_values_lambda1, 0, __pyx_mstate_global->__pyx_n_u_from_windowed_values_locals_lamb, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_grouped = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":375 + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * grouped = collections.defaultdict(lambda: []) + * for wv in windowed_values: # <<<<<<<<<<<<<< + * grouped[wv.with_value(None)].append(wv.value) + * +*/ + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_windowed_values)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_windowed_values)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_v_windowed_values; __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_windowed_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 375, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 375, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_6; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 375, __pyx_L1_error) + #endif + if (__pyx_t_6 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); + #endif + ++__pyx_t_6; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 375, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_wv); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_wv, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":376 + * grouped = collections.defaultdict(lambda: []) + * for wv in windowed_values: + * grouped[wv.with_value(None)].append(wv.value) # <<<<<<<<<<<<<< + * + * for key, values in grouped.items(): +*/ + __pyx_t_3 = __pyx_cur_scope->__pyx_v_wv; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, Py_None}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_value, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_grouped, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_wv, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":375 + * produce_fn: Callable) -> Iterable['WindowedBatch']: + * grouped = collections.defaultdict(lambda: []) + * for wv in windowed_values: # <<<<<<<<<<<<<< + * grouped[wv.with_value(None)].append(wv.value) + * +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":378 + * grouped[wv.with_value(None)].append(wv.value) + * + * for key, values in grouped.items(): # <<<<<<<<<<<<<< + * yield HomogeneousWindowedBatch(key.with_value(produce_fn(values))) + * +*/ + __pyx_t_6 = 0; + if (unlikely(__pyx_cur_scope->__pyx_v_grouped == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 378, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_grouped, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_4; + __pyx_t_4 = 0; + while (1) { + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_6, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_10); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_values); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_values, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + + /* "apache_beam/utils/windowed_value.py":379 + * + * for key, values in grouped.items(): + * yield HomogeneousWindowedBatch(key.with_value(produce_fn(values))) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = NULL; + __pyx_t_12 = __pyx_cur_scope->__pyx_v_key; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_14 = NULL; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_produce_fn); + __pyx_t_15 = __pyx_cur_scope->__pyx_v_produce_fn; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15); + assert(__pyx_t_14); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_cur_scope->__pyx_v_values}; + __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_value, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XGIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_6; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_9; + __pyx_cur_scope->__pyx_t_3 = __pyx_t_10; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L9_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_cur_scope->__pyx_t_0 = 0; + __Pyx_XGOTREF(__pyx_t_1); + __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_9 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_10 = __pyx_cur_scope->__pyx_t_3; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 379, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* "apache_beam/utils/windowed_value.py":370 + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("from_windowed_values", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":50 + * + * cdef class HomogeneousWindowedBatch(WindowedBatch): + * cdef public WindowedValue _wv # <<<<<<<<<<<<<< + * + * cpdef WindowedBatch with_values(self, object new_values) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_wv); + __pyx_r = ((PyObject *)__pyx_v_self->_wv); + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_2__set__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_2__set__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(1, 50, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_wv); + __Pyx_DECREF((PyObject *)__pyx_v_self->_wv); + __pyx_v_self->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch._wv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_5__del__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_4__del__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_4__del__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_wv); + __Pyx_DECREF((PyObject *)__pyx_v_self->_wv); + __pyx_v_self->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20__reduce_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_20__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._wv,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF((PyObject *)__pyx_v_self->_wv); + __Pyx_GIVEREF((PyObject *)__pyx_v_self->_wv); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_wv)) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._wv,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._wv,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_3 = (__pyx_v__dict != Py_None); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._wv is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._wv,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._wv is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, None), state +*/ + /*else*/ { + __pyx_t_2 = (((PyObject *)__pyx_v_self->_wv) != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._wv is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._wv is not None + * if use_setstate: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_HomogeneousWindow); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_191069070); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_191069070); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_191069070) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._wv is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, None), state + * else: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_HomogeneousWindowedBatch__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_HomogeneousWindow); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_191069070); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_191069070); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_191069070) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_HomogeneousWindowedBatch__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_22__setstate_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_22__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_HomogeneousWindowedBatch__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_HomogeneousWindowedBatch__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_HomogeneousWindowedBatch__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.HomogeneousWindowedBatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":394 + * """Optimized form of IntervalWindow storing only microseconds for endpoints. + * """ + * def __init__(self, start, end): # <<<<<<<<<<<<<< + * # type: (TimestampTypes, TimestampTypes) -> None + * if start is not None: +*/ + +/* Python wrapper */ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_start = 0; + PyObject *__pyx_v_end = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_end,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 394, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 394, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 394, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 394, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 394, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 394, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 394, __pyx_L3_error) + } + __pyx_v_start = values[0]; + __pyx_v_end = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 394, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase___init__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self), __pyx_v_start, __pyx_v_end); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase___init__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int64_t __pyx_t_8; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int64_t __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "apache_beam/utils/windowed_value.py":396 + * def __init__(self, start, end): + * # type: (TimestampTypes, TimestampTypes) -> None + * if start is not None: # <<<<<<<<<<<<<< + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: +*/ + __pyx_t_1 = (__pyx_v_start != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":397 + * # type: (TimestampTypes, TimestampTypes) -> None + * if start is not None: + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] # <<<<<<<<<<<<<< + * try: + * self._start_micros = self._start_object.micros +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_start}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_of, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->_start_object); + __Pyx_DECREF(__pyx_v_self->_start_object); + __pyx_v_self->_start_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":398 + * if start is not None: + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._start_micros = self._start_object.micros + * except OverflowError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "apache_beam/utils/windowed_value.py":399 + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: + * self._start_micros = self._start_object.micros # <<<<<<<<<<<<<< + * except OverflowError: + * self._start_micros = ( +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_object, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_start_micros = __pyx_t_8; + + /* "apache_beam/utils/windowed_value.py":398 + * if start is not None: + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._start_micros = self._start_object.micros + * except OverflowError: +*/ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/utils/windowed_value.py":400 + * try: + * self._start_micros = self._start_object.micros + * except OverflowError: # <<<<<<<<<<<<<< + * self._start_micros = ( + * MIN_TIMESTAMP.micros +*/ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError)))); + if (__pyx_t_9) { + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 400, __pyx_L6_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_10); + + /* "apache_beam/utils/windowed_value.py":403 + * self._start_micros = ( + * MIN_TIMESTAMP.micros + * if self._start_object.micros < 0 else MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * else: + * # Micros must be populated elsewhere. +*/ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_object, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":402 + * except OverflowError: + * self._start_micros = ( + * MIN_TIMESTAMP.micros # <<<<<<<<<<<<<< + * if self._start_object.micros < 0 else MAX_TIMESTAMP.micros) + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 402, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 402, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = __Pyx_PyLong_As_int64_t(__pyx_t_11); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = __pyx_t_13; + } else { + + /* "apache_beam/utils/windowed_value.py":403 + * self._start_micros = ( + * MIN_TIMESTAMP.micros + * if self._start_object.micros < 0 else MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * else: + * # Micros must be populated elsewhere. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_13 = __Pyx_PyLong_As_int64_t(__pyx_t_12); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 403, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_8 = __pyx_t_13; + } + + /* "apache_beam/utils/windowed_value.py":401 + * self._start_micros = self._start_object.micros + * except OverflowError: + * self._start_micros = ( # <<<<<<<<<<<<<< + * MIN_TIMESTAMP.micros + * if self._start_object.micros < 0 else MAX_TIMESTAMP.micros) +*/ + __pyx_v_self->_start_micros = __pyx_t_8; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L5_exception_handled; + } + goto __pyx_L6_except_error; + + /* "apache_beam/utils/windowed_value.py":398 + * if start is not None: + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._start_micros = self._start_object.micros + * except OverflowError: +*/ + __pyx_L6_except_error:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + __pyx_L9_try_end:; + } + + /* "apache_beam/utils/windowed_value.py":396 + * def __init__(self, start, end): + * # type: (TimestampTypes, TimestampTypes) -> None + * if start is not None: # <<<<<<<<<<<<<< + * self._start_object = Timestamp.of(start) # type: Optional[Timestamp] + * try: +*/ + goto __pyx_L3; + } + + /* "apache_beam/utils/windowed_value.py":406 + * else: + * # Micros must be populated elsewhere. + * self._start_object = None # <<<<<<<<<<<<<< + * + * if end is not None: +*/ + /*else*/ { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_start_object); + __Pyx_DECREF(__pyx_v_self->_start_object); + __pyx_v_self->_start_object = Py_None; + } + __pyx_L3:; + + /* "apache_beam/utils/windowed_value.py":408 + * self._start_object = None + * + * if end is not None: # <<<<<<<<<<<<<< + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: +*/ + __pyx_t_1 = (__pyx_v_end != Py_None); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":409 + * + * if end is not None: + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] # <<<<<<<<<<<<<< + * try: + * self._end_micros = self._end_object.micros +*/ + __pyx_t_3 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_end}; + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_of, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + } + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_v_self->_end_object); + __Pyx_DECREF(__pyx_v_self->_end_object); + __pyx_v_self->_end_object = __pyx_t_10; + __pyx_t_10 = 0; + + /* "apache_beam/utils/windowed_value.py":410 + * if end is not None: + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._end_micros = self._end_object.micros + * except OverflowError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "apache_beam/utils/windowed_value.py":411 + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: + * self._end_micros = self._end_object.micros # <<<<<<<<<<<<<< + * except OverflowError: + * self._end_micros = ( +*/ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_end_object, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 411, __pyx_L13_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyLong_As_int64_t(__pyx_t_10); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L13_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_self->_end_micros = __pyx_t_8; + + /* "apache_beam/utils/windowed_value.py":410 + * if end is not None: + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._end_micros = self._end_object.micros + * except OverflowError: +*/ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L18_try_end; + __pyx_L13_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "apache_beam/utils/windowed_value.py":412 + * try: + * self._end_micros = self._end_object.micros + * except OverflowError: # <<<<<<<<<<<<<< + * self._end_micros = ( + * MIN_TIMESTAMP.micros +*/ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError)))); + if (__pyx_t_9) { + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 412, __pyx_L15_except_error) + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + + /* "apache_beam/utils/windowed_value.py":415 + * self._end_micros = ( + * MIN_TIMESTAMP.micros + * if self._end_object.micros < 0 else MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * else: + * # Micros must be populated elsewhere. +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_end_object, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":414 + * except OverflowError: + * self._end_micros = ( + * MIN_TIMESTAMP.micros # <<<<<<<<<<<<<< + * if self._end_object.micros < 0 else MAX_TIMESTAMP.micros) + * else: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 414, __pyx_L15_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 414, __pyx_L15_except_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_13 = __Pyx_PyLong_As_int64_t(__pyx_t_12); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L15_except_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_8 = __pyx_t_13; + } else { + + /* "apache_beam/utils/windowed_value.py":415 + * self._end_micros = ( + * MIN_TIMESTAMP.micros + * if self._end_object.micros < 0 else MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * else: + * # Micros must be populated elsewhere. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = __Pyx_PyLong_As_int64_t(__pyx_t_11); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 415, __pyx_L15_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = __pyx_t_13; + } + + /* "apache_beam/utils/windowed_value.py":413 + * self._end_micros = self._end_object.micros + * except OverflowError: + * self._end_micros = ( # <<<<<<<<<<<<<< + * MIN_TIMESTAMP.micros + * if self._end_object.micros < 0 else MAX_TIMESTAMP.micros) +*/ + __pyx_v_self->_end_micros = __pyx_t_8; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L14_exception_handled; + } + goto __pyx_L15_except_error; + + /* "apache_beam/utils/windowed_value.py":410 + * if end is not None: + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: # <<<<<<<<<<<<<< + * self._end_micros = self._end_object.micros + * except OverflowError: +*/ + __pyx_L15_except_error:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L14_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); + __pyx_L18_try_end:; + } + + /* "apache_beam/utils/windowed_value.py":408 + * self._start_object = None + * + * if end is not None: # <<<<<<<<<<<<<< + * self._end_object = Timestamp.of(end) # type: Optional[Timestamp] + * try: +*/ + goto __pyx_L12; + } + + /* "apache_beam/utils/windowed_value.py":418 + * else: + * # Micros must be populated elsewhere. + * self._end_object = None # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->_end_object); + __Pyx_DECREF(__pyx_v_self->_end_object); + __pyx_v_self->_end_object = Py_None; + } + __pyx_L12:; + + /* "apache_beam/utils/windowed_value.py":394 + * """Optimized form of IntervalWindow storing only microseconds for endpoints. + * """ + * def __init__(self, start, end): # <<<<<<<<<<<<<< + * # type: (TimestampTypes, TimestampTypes) -> None + * if start is not None: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":420 + * self._end_object = None + * + * @property # <<<<<<<<<<<<<< + * def start(self): + * # type: () -> Timestamp +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":423 + * def start(self): + * # type: () -> Timestamp + * if self._start_object is None: # <<<<<<<<<<<<<< + * self._start_object = Timestamp(0, self._start_micros) + * return self._start_object +*/ + __pyx_t_1 = (__pyx_v_self->_start_object == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":424 + * # type: () -> Timestamp + * if self._start_object is None: + * self._start_object = Timestamp(0, self._start_micros) # <<<<<<<<<<<<<< + * return self._start_object + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_4 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_start_micros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_0, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->_start_object); + __Pyx_DECREF(__pyx_v_self->_start_object); + __pyx_v_self->_start_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":423 + * def start(self): + * # type: () -> Timestamp + * if self._start_object is None: # <<<<<<<<<<<<<< + * self._start_object = Timestamp(0, self._start_micros) + * return self._start_object +*/ + } + + /* "apache_beam/utils/windowed_value.py":425 + * if self._start_object is None: + * self._start_object = Timestamp(0, self._start_micros) + * return self._start_object # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_start_object); + __pyx_r = __pyx_v_self->_start_object; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":420 + * self._end_object = None + * + * @property # <<<<<<<<<<<<<< + * def start(self): + * # type: () -> Timestamp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.start.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":427 + * return self._start_object + * + * @property # <<<<<<<<<<<<<< + * def end(self): + * # type: () -> Timestamp +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "apache_beam/utils/windowed_value.py":430 + * def end(self): + * # type: () -> Timestamp + * if self._end_object is None: # <<<<<<<<<<<<<< + * self._end_object = Timestamp(0, self._end_micros) + * return self._end_object +*/ + __pyx_t_1 = (__pyx_v_self->_end_object == Py_None); + if (__pyx_t_1) { + + /* "apache_beam/utils/windowed_value.py":431 + * # type: () -> Timestamp + * if self._end_object is None: + * self._end_object = Timestamp(0, self._end_micros) # <<<<<<<<<<<<<< + * return self._end_object + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_4 = ((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_end_micros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_0, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->_end_object); + __Pyx_DECREF(__pyx_v_self->_end_object); + __pyx_v_self->_end_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":430 + * def end(self): + * # type: () -> Timestamp + * if self._end_object is None: # <<<<<<<<<<<<<< + * self._end_object = Timestamp(0, self._end_micros) + * return self._end_object +*/ + } + + /* "apache_beam/utils/windowed_value.py":432 + * if self._end_object is None: + * self._end_object = Timestamp(0, self._end_micros) + * return self._end_object # <<<<<<<<<<<<<< + * + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_end_object); + __pyx_r = __pyx_v_self->_end_object; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":427 + * return self._start_object + * + * @property # <<<<<<<<<<<<<< + * def end(self): + * # type: () -> Timestamp +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.end.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":434 + * return self._end_object + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # Cut off window at start/end timestamps for comparison purposes since some + * # portable runners do this already, and timestamps outside of the bands of +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_2__hash__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_2__hash__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_v_start = NULL; + PyObject *__pyx_v_end = NULL; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int64_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_hash_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "apache_beam/utils/windowed_value.py":438 + * # portable runners do this already, and timestamps outside of the bands of + * # Min/Max timestamps are functionally equal to Min/Max. + * start = max(self._start_micros, MIN_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * end = min(self._end_micros, MAX_TIMESTAMP.micros) + * return hash((start, end)) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_v_self->_start_micros; + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + } else { + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_start = __pyx_t_2; + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":439 + * # Min/Max timestamps are functionally equal to Min/Max. + * start = max(self._start_micros, MIN_TIMESTAMP.micros) + * end = min(self._end_micros, MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * return hash((start, end)) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_v_self->_end_micros; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + } else { + __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_end = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":440 + * start = max(self._start_micros, MIN_TIMESTAMP.micros) + * end = min(self._end_micros, MAX_TIMESTAMP.micros) + * return hash((start, end)) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_start); + __Pyx_GIVEREF(__pyx_v_start); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start) != (0)) __PYX_ERR(0, 440, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_end); + __Pyx_GIVEREF(__pyx_v_end); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end) != (0)) __PYX_ERR(0, 440, __pyx_L1_error); + __pyx_t_7 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_hash_t)-1))) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_7; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":434 + * return self._end_object + * + * def __hash__(self): # <<<<<<<<<<<<<< + * # Cut off window at start/end timestamps for comparison purposes since some + * # portable runners do this already, and timestamps outside of the bands of +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_start); + __Pyx_XDECREF(__pyx_v_end); + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":442 + * return hash((start, end)) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if type(self) != type(other): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_4__eq__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_4__eq__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_v_self_start = NULL; + PyObject *__pyx_v_self_end = NULL; + PyObject *__pyx_v_other_start = NULL; + PyObject *__pyx_v_other_end = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int64_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "apache_beam/utils/windowed_value.py":443 + * + * def __eq__(self, other): + * if type(self) != type(other): # <<<<<<<<<<<<<< + * return False + * +*/ + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "apache_beam/utils/windowed_value.py":444 + * def __eq__(self, other): + * if type(self) != type(other): + * return False # <<<<<<<<<<<<<< + * + * # Cut off window at start/end timestamps for comparison purposes since some +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":443 + * + * def __eq__(self, other): + * if type(self) != type(other): # <<<<<<<<<<<<<< + * return False + * +*/ + } + + /* "apache_beam/utils/windowed_value.py":449 + * # portable runners do this already, and timestamps outside of the bands of + * # Min/Max timestamps are functionally equal to Min/Max. + * self_start = max(self._start_micros, MIN_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * self_end = min(self._end_micros, MAX_TIMESTAMP.micros) + * other_start = max(other._start_micros, MIN_TIMESTAMP.micros) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __pyx_v_self->_start_micros; + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + } else { + __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __pyx_t_6; + __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self_start = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/utils/windowed_value.py":450 + * # Min/Max timestamps are functionally equal to Min/Max. + * self_start = max(self._start_micros, MIN_TIMESTAMP.micros) + * self_end = min(self._end_micros, MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * other_start = max(other._start_micros, MIN_TIMESTAMP.micros) + * other_end = min(other._end_micros, MAX_TIMESTAMP.micros) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __pyx_v_self->_end_micros; + __pyx_t_6 = __Pyx_PyLong_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; + } else { + __pyx_t_5 = __Pyx_PyLong_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self_end = __pyx_t_1; + __pyx_t_1 = 0; + + /* "apache_beam/utils/windowed_value.py":451 + * self_start = max(self._start_micros, MIN_TIMESTAMP.micros) + * self_end = min(self._end_micros, MAX_TIMESTAMP.micros) + * other_start = max(other._start_micros, MIN_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * other_end = min(other._end_micros, MAX_TIMESTAMP.micros) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_start_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = __pyx_t_3; + } else { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __pyx_t_1; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_other_start = __pyx_t_3; + __pyx_t_3 = 0; + + /* "apache_beam/utils/windowed_value.py":452 + * self_end = min(self._end_micros, MAX_TIMESTAMP.micros) + * other_start = max(other._start_micros, MIN_TIMESTAMP.micros) + * other_end = min(other._end_micros, MAX_TIMESTAMP.micros) # <<<<<<<<<<<<<< + * + * return (self_start == other_start and self_end == other_end) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_micros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_end_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_t_5); + __pyx_t_1 = __pyx_t_5; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_t_1; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_other_end = __pyx_t_5; + __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":454 + * other_end = min(other._end_micros, MAX_TIMESTAMP.micros) + * + * return (self_start == other_start and self_end == other_end) # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self_start, __pyx_v_other_start, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 454, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self_end, __pyx_v_other_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_L4_bool_binop_done:; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":442 + * return hash((start, end)) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if type(self) != type(other): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_self_start); + __Pyx_XDECREF(__pyx_v_self_end); + __Pyx_XDECREF(__pyx_v_other_start); + __Pyx_XDECREF(__pyx_v_other_end); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.py":456 + * return (self_start == other_start and self_end == other_end) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '[%s, %s)' % (float(self.start), float(self.end)) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_7__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_6__repr__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_6__repr__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "apache_beam/utils/windowed_value.py":457 + * + * def __repr__(self): + * return '[%s, %s)' % (float(self.start), float(self.end)) # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u__6; + __pyx_t_4[1] = __pyx_t_1; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_4[3] = __pyx_t_2; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "apache_beam/utils/windowed_value.py":456 + * return (self_start == other_start and self_end == other_end) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '[%s, %s)' % (float(self.start), float(self.end)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":61 + * cdef class _IntervalWindowBase(object): + * cdef object _start_object + * cdef readonly int64_t _start_micros # <<<<<<<<<<<<<< + * cdef object _end_object + * cdef readonly int64_t _end_micros +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_start_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase._start_micros.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "apache_beam/utils/windowed_value.pxd":63 + * cdef readonly int64_t _start_micros + * cdef object _end_object + * cdef readonly int64_t _end_micros # <<<<<<<<<<<<<< +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros___get__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros___get__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_end_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase._end_micros.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_8__reduce_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_8__reduce_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._end_micros, self._end_object, self._start_micros, self._start_object) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: +*/ + __pyx_t_1 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_end_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_v_self->_start_micros); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_end_object); + __Pyx_GIVEREF(__pyx_v_self->_end_object); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->_end_object) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_start_object); + __Pyx_GIVEREF(__pyx_v_self->_start_object); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->_start_object) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._end_micros, self._end_object, self._start_micros, self._start_object) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None and _dict: + * state += (_dict,) +*/ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._end_micros, self._end_object, self._start_micros, self._start_object) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_5 = (__pyx_v__dict != Py_None); + if (__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None and _dict: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._end_object is not None or self._start_object is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._end_micros, self._end_object, self._start_micros, self._start_object) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None and _dict: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._end_object is not None or self._start_object is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, None), state +*/ + /*else*/ { + __pyx_t_5 = (__pyx_v_self->_end_object != Py_None); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->_start_object != Py_None); + __pyx_t_4 = __pyx_t_5; + __pyx_L6_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_4; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._end_object is not None or self._start_object is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._end_object is not None or self._start_object is not None + * if use_setstate: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__IntervalWindowBa); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_235429631); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_235429631); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_235429631) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._end_object is not None or self._start_object is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, None), state + * else: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__IntervalWindowBase__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__IntervalWindowBa); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_235429631); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_235429631); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_235429631) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__IntervalWindowBase__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_10__setstate_cython__(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_10__setstate_cython__(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__IntervalWindowBase__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_v___pyx_state; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 17, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle__IntervalWindowBase__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__IntervalWindowBase__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("apache_beam.utils.windowed_value._IntervalWindowBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_WindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_5__pyx_unpickle_WindowedBatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_5__pyx_unpickle_WindowedBatch = {"__pyx_unpickle_WindowedBatch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_5__pyx_unpickle_WindowedBatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_5__pyx_unpickle_WindowedBatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedBatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_WindowedBatch", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedBatch", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedBatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_WindowedBatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_4__pyx_unpickle_WindowedBatch(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_4__pyx_unpickle_WindowedBatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedBatch", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_WindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') # <<<<<<<<<<<<<< + * __pyx_result = WindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = WindowedBatch.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = WindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = WindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_WindowedBatch__set_state(WindowedBatch __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_WindowedBatch__set_state(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') + * __pyx_result = WindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_WindowedBatch__set_state(WindowedBatch __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_WindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_WindowedBatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_WindowedBatch__set_state(WindowedBatch __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_WindowedBatch__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedBatch__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_WindowedBatch__set_state(WindowedBatch __pyx_result, __pyx_state: tuple): + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 12, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_WindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_WindowedBatch__set_state(WindowedBatch __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_WindowedBatch__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_HomogeneousWindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_7__pyx_unpickle_HomogeneousWindowedBatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_7__pyx_unpickle_HomogeneousWindowedBatch = {"__pyx_unpickle_HomogeneousWindowedBatch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_7__pyx_unpickle_HomogeneousWindowedBatch, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_7__pyx_unpickle_HomogeneousWindowedBatch(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_HomogeneousWindowedBatch (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_HomogeneousWindowedBatch", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_HomogeneousWindowedBatch", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_HomogeneousWindowedBatch", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_HomogeneousWindowedBatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_6__pyx_unpickle_HomogeneousWindowedBatch(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_6__pyx_unpickle_HomogeneousWindowedBatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_HomogeneousWindowedBatch", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle_HomogeneousWindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') # <<<<<<<<<<<<<< + * __pyx_result = HomogeneousWindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, __pyx_k_wv_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') + * __pyx_result = HomogeneousWindowedBatch.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') + * __pyx_result = HomogeneousWindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = HomogeneousWindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_HomogeneousWindowedBatch__set_state(((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') + * __pyx_result = HomogeneousWindowedBatch.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): + * __pyx_result._wv = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_HomogeneousWindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xb637b8e, 0x28cd5d5, 0x2170e5e, b'_wv') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_HomogeneousWindowedBatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._wv = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle_HomogeneousWindowedBatch__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_HomogeneousWindowedBatch__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): + * __pyx_result._wv = __pyx_state[0] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->_wv); + __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->_wv); + __pyx_v___pyx_result->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): + * __pyx_result._wv = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle_HomogeneousWindowedBatch__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_HomogeneousWindowedBatch__set_state(HomogeneousWindowedBatch __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._wv = __pyx_state[0] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle_HomogeneousWindowedBatch__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__IntervalWindowBase(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_9__pyx_unpickle__IntervalWindowBase(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_11apache_beam_5utils_14windowed_value_9__pyx_unpickle__IntervalWindowBase = {"__pyx_unpickle__IntervalWindowBase", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_9__pyx_unpickle__IntervalWindowBase, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_11apache_beam_5utils_14windowed_value_9__pyx_unpickle__IntervalWindowBase(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__IntervalWindowBase (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__IntervalWindowBase", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__IntervalWindowBase", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_v___pyx_state = ((PyObject*)values[2]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__IntervalWindowBase", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle__IntervalWindowBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_r = __pyx_pf_11apache_beam_5utils_14windowed_value_8__pyx_unpickle__IntervalWindowBase(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11apache_beam_5utils_14windowed_value_8__pyx_unpickle__IntervalWindowBase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__IntervalWindowBase", 0); + + /* "(tree fragment)":6 + * def __pyx_unpickle__IntervalWindowBase(__pyx_type, long __pyx_checksum, tuple __pyx_state): + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') # <<<<<<<<<<<<<< + * __pyx_result = _IntervalWindowBase.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, __pyx_k_end_micros__end_object__start_m); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":7 + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') + * __pyx_result = _IntervalWindowBase.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v___pyx_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') + * __pyx_result = _IntervalWindowBase.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); + if (__pyx_t_5) { + + /* "(tree fragment)":9 + * __pyx_result = _IntervalWindowBase.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); + __PYX_ERR(2, 9, __pyx_L1_error) + } + __pyx_t_2 = __pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle__IntervalWindowBase__set_state(((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":8 + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') + * __pyx_result = _IntervalWindowBase.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): + * __pyx_result._end_micros = __pyx_state[0]; __pyx_result._end_object = __pyx_state[1]; __pyx_result._start_micros = __pyx_state[2]; __pyx_result._start_object = __pyx_state[3] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__IntervalWindowBase(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle__IntervalWindowBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._end_micros = __pyx_state[0]; __pyx_result._end_object = __pyx_state[1]; __pyx_result._start_micros = __pyx_state[2]; __pyx_result._start_object = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + +static PyObject *__pyx_f_11apache_beam_5utils_14windowed_value___pyx_unpickle__IntervalWindowBase__set_state(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int64_t __pyx_t_2; + int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__IntervalWindowBase__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): + * __pyx_result._end_micros = __pyx_state[0]; __pyx_result._end_object = __pyx_state[1]; __pyx_result._start_micros = __pyx_state[2]; __pyx_result._start_object = __pyx_state[3] # <<<<<<<<<<<<<< + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_end_micros = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_end_object); + __Pyx_DECREF(__pyx_v___pyx_result->_end_object); + __pyx_v___pyx_result->_end_object = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->_start_micros = __pyx_t_2; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_start_object); + __Pyx_DECREF(__pyx_v___pyx_result->_start_object); + __pyx_v___pyx_result->_start_object = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): + * __pyx_result._end_micros = __pyx_state[0]; __pyx_result._end_object = __pyx_state[1]; __pyx_result._start_micros = __pyx_state[2]; __pyx_result._start_object = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + + /* "(tree fragment)":11 + * __pyx_unpickle__IntervalWindowBase__set_state(<_IntervalWindowBase> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__IntervalWindowBase__set_state(_IntervalWindowBase __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< + * __pyx_result._end_micros = __pyx_state[0]; __pyx_result._end_object = __pyx_state[1]; __pyx_result._start_micros = __pyx_state[2]; __pyx_result._start_object = __pyx_state[3] + * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 4) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("apache_beam.utils.windowed_value.__pyx_unpickle__IntervalWindowBase__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_PaneInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_PaneInfo(PyObject *o) { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_PaneInfo(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_is_first(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8is_first_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_is_last(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7is_last_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_timing(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6timing_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5index_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_nonspeculative_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_20nonspeculative_index_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_encoded_byte(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_12encoded_byte_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__is_first(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_9_is_first_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__is_last(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_8_is_last_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__timing(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7_timing_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_6_index_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__nonspeculative_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_21_nonspeculative_index_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__encoded_byte(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13_encoded_byte_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_14windowed_value_PaneInfo[] = { + {"_get_encoded_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"from_encoded_byte", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_14windowed_value_PaneInfo[] = { + {"is_first", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_is_first, 0, 0, 0}, + {"is_last", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_is_last, 0, 0, 0}, + {"timing", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_timing, 0, 0, 0}, + {"index", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_index, 0, 0, 0}, + {"nonspeculative_index", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_nonspeculative_index, 0, 0, 0}, + {"encoded_byte", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo_encoded_byte, 0, 0, 0}, + {"_is_first", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__is_first, 0, 0, 0}, + {"_is_last", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__is_last, 0, 0, 0}, + {"_timing", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__timing, 0, 0, 0}, + {"_index", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__index, 0, 0, 0}, + {"_nonspeculative_index", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__nonspeculative_index, 0, 0, 0}, + {"_encoded_byte", __pyx_getprop_11apache_beam_5utils_14windowed_value_8PaneInfo__encoded_byte, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_PaneInfo}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_11__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("Describes the trigger firing information for a given WindowedValue.\n\n \"Panes\" represent individual firings on a single window. ``PaneInfo``s are\n passed downstream after trigger firings. They contain information about\n whether it's an early/on time/late firing, if it's the last or first firing\n from a window, and the index of the firing.\n ")}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_PaneInfo}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_14windowed_value_PaneInfo}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_14windowed_value_PaneInfo}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value_PaneInfo}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo_spec = { + "apache_beam.utils.windowed_value.PaneInfo", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, + __pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""PaneInfo", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_PaneInfo, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_7__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_11__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + PyDoc_STR("Describes the trigger firing information for a given WindowedValue.\n\n \"Panes\" represent individual firings on a single window. ``PaneInfo``s are\n passed downstream after trigger firings. They contain information about\n whether it's an early/on time/late firing, if it's the last or first firing\n from a window, and the index of the firing.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_PaneInfo, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_14windowed_value_PaneInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_14windowed_value_PaneInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_14windowed_value_8PaneInfo_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value_PaneInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue __pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedValue; + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedValue(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue; + p->value = Py_None; Py_INCREF(Py_None); + p->windows = Py_None; Py_INCREF(Py_None); + p->pane_info = Py_None; Py_INCREF(Py_None); + p->timestamp_object = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedValue(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->value); + Py_CLEAR(p->windows); + Py_CLEAR(p->pane_info); + Py_CLEAR(p->timestamp_object); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value_WindowedValue(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + if (p->windows) { + e = (*v)(p->windows, a); if (e) return e; + } + if (p->pane_info) { + e = (*v)(p->pane_info, a); if (e) return e; + } + if (p->timestamp_object) { + e = (*v)(p->timestamp_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_5utils_14windowed_value_WindowedValue(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)o; + tmp = ((PyObject*)p->value); + p->value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->windows); + p->windows = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pane_info); + p->pane_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->timestamp_object); + p->timestamp_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_WindowedValue(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9timestamp_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_5value_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_windows(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_windows(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7windows_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_pane_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_pane_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_9pane_info_5__del__(o); + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp_micros(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp_micros(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_16timestamp_micros_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_14windowed_value_WindowedValue[] = { + {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_14windowed_value_WindowedValue[] = { + {"timestamp", __pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp, 0, 0, 0}, + {"value", __pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_value, __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_value, 0, 0}, + {"windows", __pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_windows, __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_windows, 0, 0}, + {"pane_info", __pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_pane_info, __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_pane_info, 0, 0}, + {"timestamp_micros", __pyx_getprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp_micros, __pyx_setprop_11apache_beam_5utils_14windowed_value_13WindowedValue_timestamp_micros, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_3__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("A windowed value having a value, a timestamp and set of windows.\n\n Attributes:\n value: The underlying value of a windowed value.\n timestamp: Timestamp associated with the value as seconds since Unix epoch.\n windows: A set (iterable) of window objects for the value. The window\n object are descendants of the BoundedWindow class.\n pane_info: A PaneInfo descriptor describing the triggering information for\n the pane that contained this value. If None, will be set to\n PANE_INFO_UNKNOWN.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_14windowed_value_WindowedValue}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedValue}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue_spec = { + "apache_beam.utils.windowed_value.WindowedValue", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""WindowedValue", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_3__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_7__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A windowed value having a value, a timestamp and set of windows.\n\n Attributes:\n value: The underlying value of a windowed value.\n timestamp: Timestamp associated with the value as seconds since Unix epoch.\n windows: A set (iterable) of window objects for the value. The window\n object are descendants of the BoundedWindow class.\n pane_info: A PaneInfo descriptor describing the triggering information for\n the pane that contained this value. If None, will be set to\n PANE_INFO_UNKNOWN.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedValue_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedValue, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedBatch; + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedBatch(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *)o); + p->__pyx_vtab = __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedBatch(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedBatch) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_14windowed_value_WindowedBatch[] = { + {"as_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"from_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedBatch}, + {Py_tp_doc, (void *)PyDoc_STR("A batch of N windowed values, each having a value, a timestamp and set of\n windows.")}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_14windowed_value_WindowedBatch}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedBatch}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch_spec = { + "apache_beam.utils.windowed_value.WindowedBatch", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""WindowedBatch", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedBatch, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("A batch of N windowed values, each having a value, a timestamp and set of\n windows."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_14windowed_value_WindowedBatch, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedBatch, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif +static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch __pyx_vtable_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *p; + PyObject *o = __pyx_tp_new_11apache_beam_5utils_14windowed_value_WindowedBatch(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + p->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_wv); + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_WindowedBatch(o); +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)o; + #if !CYTHON_USE_MODULE_STATE + e = 0; + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch)) { + traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, tp_traverse, traverseproc); + if (traverse) { e = traverse(o, v, a); } + } else + #endif + { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); } + if (e) return e; + { + e = __Pyx_call_type_traverse(o, 0, v, a); + if (e) return e; + } + if (p->_wv) { + e = (*v)(((PyObject *)p->_wv), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *)o; + #if !CYTHON_USE_MODULE_STATE + if (likely(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch)) { + inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, tp_clear, inquiry); + if (clear) clear(o); + } else + #endif + { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); } + tmp = ((PyObject*)p->_wv); + p->_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_12__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_12__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_values(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_6values_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_timestamp(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9timestamp_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_pane_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9pane_info_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_windows(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_windows(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7windows_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch__wv(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_1__get__(o); +} + +static int __pyx_setprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch__wv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_3__set__(o, v); + } + else { + return __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3_wv_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch[] = { + {"of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"as_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"as_empty_windowed_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_9as_empty_windowed_value}, + {"from_batch_and_windowed_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"from_windowed_values", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch[] = { + {"values", __pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_values, 0, 0, 0}, + {"timestamp", __pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_timestamp, 0, 0, 0}, + {"pane_info", __pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_pane_info, 0, 0, 0}, + {"windows", __pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_windows, __pyx_setprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_windows, 0, 0}, + {"_wv", __pyx_getprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch__wv, __pyx_setprop_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch__wv, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_14__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("A WindowedBatch with Homogeneous event-time information, represented\n internally as a WindowedValue.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch_spec = { + "apache_beam.utils.windowed_value.HomogeneousWindowedBatch", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""HomogeneousWindowedBatch", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_14__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A WindowedBatch with Homogeneous event-time information, represented\n internally as a WindowedValue.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *p; + PyObject *o; + o = __Pyx_AllocateExtensionType(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)o); + p->_start_object = Py_None; Py_INCREF(Py_None); + p->_end_object = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value__IntervalWindowBase) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_start_object); + Py_CLEAR(p->_end_object); + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_start_object) { + e = (*v)(p->_start_object, a); if (e) return e; + } + if (p->_end_object) { + e = (*v)(p->_end_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)o; + tmp = ((PyObject*)p->_start_object); + p->_start_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_end_object); + p->_end_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value__IntervalWindowBase(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_start(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_5start_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_end(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3end_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase__start_micros(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_13_start_micros_1__get__(o); +} + +static PyObject *__pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase__end_micros(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11_end_micros_1__get__(o); +} + +static PyMethodDef __pyx_methods_11apache_beam_5utils_14windowed_value__IntervalWindowBase[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_11apache_beam_5utils_14windowed_value__IntervalWindowBase[] = { + {"start", __pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_start, 0, 0, 0}, + {"end", __pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_end, 0, 0, 0}, + {"_start_micros", __pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase__start_micros, 0, 0, 0}, + {"_end_micros", __pyx_getprop_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase__end_micros, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_repr, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_7__repr__}, + {Py_tp_hash, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("Optimized form of IntervalWindow storing only microseconds for endpoints.\n ")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_clear, (void *)__pyx_tp_clear_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_methods, (void *)__pyx_methods_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_getset, (void *)__pyx_getsets_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {Py_tp_init, (void *)__pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value__IntervalWindowBase}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase_spec = { + "apache_beam.utils.windowed_value._IntervalWindowBase", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""_IntervalWindowBase", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_7__repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_3__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Optimized form of IntervalWindow storing only microseconds for endpoints.\n "), /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_traverse*/ + __pyx_tp_clear_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_clear*/ + __pyx_tp_richcompare_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value__IntervalWindowBase, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr[--__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_p); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr[__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_p) { + e = (*v)(p->__pyx_v_p, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr_spec = { + "apache_beam.utils.windowed_value.__pyx_scope_struct__genexpr", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""__pyx_scope_struct__genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values[--__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_explode_fn); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_value); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values[__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values++] = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_explode_fn) { + e = (*v)(p->__pyx_v_explode_fn, a); if (e) return e; + } + if (p->__pyx_v_self) { + e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values_spec = { + "apache_beam.utils.windowed_value.__pyx_scope_struct_1_as_windowed_values", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""__pyx_scope_struct_1_as_windowed_values", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values)))) + { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values[--__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values]; + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(Py_TYPE(o)); + #endif + memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values)); + #if CYTHON_COMPILING_IN_LIMITED_API + (void) PyObject_Init(o, t); + #else + (void) PyObject_INIT(o, t); + #endif + PyObject_GC_Track(o); + } else + #endif + { + o = __Pyx_AllocateExtensionType(t, 1); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values(PyObject *o) { + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_grouped); + Py_CLEAR(p->__pyx_v_key); + Py_CLEAR(p->__pyx_v_produce_fn); + Py_CLEAR(p->__pyx_v_values); + Py_CLEAR(p->__pyx_v_windowed_values); + Py_CLEAR(p->__pyx_v_wv); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values)))) + { + __pyx_mstate_global->__pyx_freelist_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values[__pyx_mstate_global->__pyx_freecount_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values++] = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)o); + } else + #endif + { + PyTypeObject *tp = Py_TYPE(o); + #if CYTHON_USE_TYPE_SLOTS + (*tp->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif + } +} + +static int __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *p = (struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_v_grouped) { + e = (*v)(p->__pyx_v_grouped, a); if (e) return e; + } + if (p->__pyx_v_key) { + e = (*v)(p->__pyx_v_key, a); if (e) return e; + } + if (p->__pyx_v_produce_fn) { + e = (*v)(p->__pyx_v_produce_fn, a); if (e) return e; + } + if (p->__pyx_v_values) { + e = (*v)(p->__pyx_v_values, a); if (e) return e; + } + if (p->__pyx_v_windowed_values) { + e = (*v)(p->__pyx_v_windowed_values, a); if (e) return e; + } + if (p->__pyx_v_wv) { + e = (*v)(p->__pyx_v_wv, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values}, + {Py_tp_new, (void *)__pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values}, + {0, 0}, +}; +static PyType_Spec __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values_spec = { + "apache_beam.utils.windowed_value.__pyx_scope_struct_2_from_windowed_values", + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, + __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values_slots, +}; +#else + +static PyTypeObject __pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values = { + PyVarObject_HEAD_INIT(0, 0) + "apache_beam.utils.windowed_value.""__pyx_scope_struct_2_from_windowed_values", /*tp_name*/ + sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, /*tp_dealloc*/ + 0, /*tp_vectorcall_offset*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyTypeObject__BYTE_TO_P); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 26; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, (void *)&__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_struct___pyx_obj_11apache_beam_5); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 218; + void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_11apache_beam_5utils_14windowed_value_create, (void (*)(void)) NULL}; + void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo)) __PYX_ERR(0, 73, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) < (0)) __PYX_ERR(0, 73, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = &__pyx_type_11apache_beam_5utils_14windowed_value_PaneInfo; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) < (0)) __PYX_ERR(0, 73, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PaneInfo, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) < (0)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = &__pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedValue; + __pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedValue.with_value = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedValue_with_value; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(0, 196, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = &__pyx_type_11apache_beam_5utils_14windowed_value_WindowedValue; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_WindowedValue, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = &__pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedBatch; + __pyx_vtable_11apache_beam_5utils_14windowed_value_WindowedBatch.with_values = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_5utils_14windowed_value_13WindowedBatch_with_values; + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(0, 288, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = &__pyx_type_11apache_beam_5utils_14windowed_value_WindowedBatch; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_WindowedBatch, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) < (0)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = &__pyx_vtable_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + __pyx_vtable_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch.__pyx_base = *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch; + __pyx_vtable_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch.__pyx_base.with_values = (struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_with_values; + #if CYTHON_USE_TYPE_SPECS + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch_spec, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = &__pyx_type_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_base = __pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch; + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase)) __PYX_ERR(0, 391, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = &__pyx_type_11apache_beam_5utils_14windowed_value__IntervalWindowBase; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IntervalWindowBase, (PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr)) __PYX_ERR(0, 182, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 182, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr = &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 182, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct__genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values)) __PYX_ERR(0, 347, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values = &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_1_as_windowed_values->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values)) __PYX_ERR(0, 370, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values_spec, __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values = &__pyx_type_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values); + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values->tp_dictoffset && __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_11apache_beam_5utils_14windowed_value___pyx_scope_struct_2_from_windowed_values->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_windowed_value(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_windowed_value}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "windowed_value", + __pyx_k_Core_windowing_data_structures, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_windowed_value(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_windowed_value(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_windowed_value(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'windowed_value' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "windowed_value" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + +__Pyx_RefNannySetupContext("PyInit_windowed_value", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_module_is_main_apache_beam__utils__windowed_value) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "apache_beam.utils.windowed_value")) { + if (unlikely((PyDict_SetItemString(modules, "apache_beam.utils.windowed_value", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "apache_beam/utils/windowed_value.py":27 + * # pytype: skip-file + * + * import collections # <<<<<<<<<<<<<< + * from typing import TYPE_CHECKING + * from typing import Any +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_collections, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":28 + * + * import collections + * from typing import TYPE_CHECKING # <<<<<<<<<<<<<< + * from typing import Any + * from typing import Callable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TYPE_CHECKING}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":29 + * import collections + * from typing import TYPE_CHECKING + * from typing import Any # <<<<<<<<<<<<<< + * from typing import Callable + * from typing import Iterable +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Any}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":30 + * from typing import TYPE_CHECKING + * from typing import Any + * from typing import Callable # <<<<<<<<<<<<<< + * from typing import Iterable + * from typing import List +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":31 + * from typing import Any + * from typing import Callable + * from typing import Iterable # <<<<<<<<<<<<<< + * from typing import List + * from typing import Optional +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Iterable}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":32 + * from typing import Callable + * from typing import Iterable + * from typing import List # <<<<<<<<<<<<<< + * from typing import Optional + * from typing import Sequence +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_List}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":33 + * from typing import Iterable + * from typing import List + * from typing import Optional # <<<<<<<<<<<<<< + * from typing import Sequence + * from typing import Tuple +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Optional}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":34 + * from typing import List + * from typing import Optional + * from typing import Sequence # <<<<<<<<<<<<<< + * from typing import Tuple + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":35 + * from typing import Optional + * from typing import Sequence + * from typing import Tuple # <<<<<<<<<<<<<< + * + * from apache_beam.utils.timestamp import MAX_TIMESTAMP +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Tuple}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":37 + * from typing import Tuple + * + * from apache_beam.utils.timestamp import MAX_TIMESTAMP # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import MIN_TIMESTAMP + * from apache_beam.utils.timestamp import Timestamp +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MAX_TIMESTAMP}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":38 + * + * from apache_beam.utils.timestamp import MAX_TIMESTAMP + * from apache_beam.utils.timestamp import MIN_TIMESTAMP # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import Timestamp + * from apache_beam.utils.timestamp import TimestampTypes # pylint: disable=unused-import +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MIN_TIMESTAMP}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":39 + * from apache_beam.utils.timestamp import MAX_TIMESTAMP + * from apache_beam.utils.timestamp import MIN_TIMESTAMP + * from apache_beam.utils.timestamp import Timestamp # <<<<<<<<<<<<<< + * from apache_beam.utils.timestamp import TimestampTypes # pylint: disable=unused-import + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + switch (__pyx_t_3) { + case 0: + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + if (!(likely(PyType_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_5))) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_XGOTREF((PyObject *)__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_5utils_14windowed_value_Timestamp, ((PyTypeObject*)__pyx_t_5)); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + break; + default:; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":40 + * from apache_beam.utils.timestamp import MIN_TIMESTAMP + * from apache_beam.utils.timestamp import Timestamp + * from apache_beam.utils.timestamp import TimestampTypes # pylint: disable=unused-import # <<<<<<<<<<<<<< + * + * if TYPE_CHECKING: +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimestampTypes}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_utils_timestamp, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TimestampTypes}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":42 + * from apache_beam.utils.timestamp import TimestampTypes # pylint: disable=unused-import + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import BoundedWindow + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { + + /* "apache_beam/utils/windowed_value.py":43 + * + * if TYPE_CHECKING: + * from apache_beam.transforms.window import BoundedWindow # <<<<<<<<<<<<<< + * + * +*/ + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedWindow}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_apache_beam_transforms_window, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BoundedWindow}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":42 + * from apache_beam.utils.timestamp import TimestampTypes # pylint: disable=unused-import + * + * if TYPE_CHECKING: # <<<<<<<<<<<<<< + * from apache_beam.transforms.window import BoundedWindow + * +*/ + } + + /* "apache_beam/utils/windowed_value.py":46 + * + * + * class PaneInfoTiming(object): # <<<<<<<<<<<<<< + * """The timing of a PaneInfo.""" + * +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_kp_u_The_timing_of_a_PaneInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[1]) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + } + + /* "apache_beam/utils/windowed_value.py":49 + * """The timing of a PaneInfo.""" + * + * EARLY = 0 # <<<<<<<<<<<<<< + * ON_TIME = 1 + * LATE = 2 +*/ + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EARLY, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":50 + * + * EARLY = 0 + * ON_TIME = 1 # <<<<<<<<<<<<<< + * LATE = 2 + * UNKNOWN = 3 +*/ + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ON_TIME, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":51 + * EARLY = 0 + * ON_TIME = 1 + * LATE = 2 # <<<<<<<<<<<<<< + * UNKNOWN = 3 + * +*/ + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_LATE, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":52 + * ON_TIME = 1 + * LATE = 2 + * UNKNOWN = 3 # <<<<<<<<<<<<<< + * + * @classmethod +*/ + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_UNKNOWN, __pyx_mstate_global->__pyx_int_3) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + + /* "apache_beam/utils/windowed_value.py":54 + * UNKNOWN = 3 + * + * @classmethod # <<<<<<<<<<<<<< + * def to_string(cls, value): + * return { +*/ + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_1to_string, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming_to_string, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_to_string, __pyx_t_8) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/utils/windowed_value.py":63 + * }[value] + * + * @classmethod # <<<<<<<<<<<<<< + * def from_string(cls, value): + * return { +*/ + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_14PaneInfoTiming_3from_string, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming_from_string, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_from_string, __pyx_t_7) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "apache_beam/utils/windowed_value.py":46 + * + * + * class PaneInfoTiming(object): # <<<<<<<<<<<<<< + * """The timing of a PaneInfo.""" + * +*/ + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PaneInfoTiming, __pyx_t_7) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":89 + * self._encoded_byte = self._get_encoded_byte() + * + * def _get_encoded_byte(self): # <<<<<<<<<<<<<< + * byte = 0 + * if self._is_first: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_3_get_encoded_byte, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfo__get_encoded_byte, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_mstate_global->__pyx_n_u_get_encoded_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":98 + * return byte + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_encoded_byte(encoded_byte): + * assert encoded_byte in _BYTE_TO_PANE_INFO +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_5from_encoded_byte, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfo_from_encoded_byte, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_mstate_global->__pyx_n_u_from_encoded_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = NULL; + __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_mstate_global->__pyx_n_u_from_encoded_byte); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_mstate_global->__pyx_n_u_from_encoded_byte, __pyx_t_2) < (0)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":164 + * self.nonspeculative_index)) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return PaneInfo, (self._is_first, self._is_last, self._timing, self._index, + * self._nonspeculative_index) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_8PaneInfo_13__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PaneInfo___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":169 + * + * + * def _construct_well_known_pane_infos(): # <<<<<<<<<<<<<< + * # type: () -> List[PaneInfo] + * pane_infos = [] +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_1_construct_well_known_pane_infos, 0, __pyx_mstate_global->__pyx_n_u_construct_well_known_pane_infos_2, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_construct_well_known_pane_infos_2, __pyx_t_2) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":190 + * + * # Cache of well-known PaneInfo objects. + * _BYTE_TO_PANE_INFO = _construct_well_known_pane_infos() # <<<<<<<<<<<<<< + * + * # Default PaneInfo descriptor for when a value is not the output of triggering. +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_construct_well_known_pane_infos_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO); + __Pyx_DECREF_SET(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":193 + * + * # Default PaneInfo descriptor for when a value is not the output of triggering. + * PANE_INFO_UNKNOWN = _BYTE_TO_PANE_INFO[0xF] # <<<<<<<<<<<<<< + * + * +*/ + if (unlikely(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 193, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, 0xF, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PANE_INFO_UNKNOWN, __pyx_t_2) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":213 + * timestamp, # type: TimestampTypes + * windows, # type: Tuple[BoundedWindow, ...] + * pane_info=PANE_INFO_UNKNOWN # type: PaneInfo # <<<<<<<<<<<<<< + * ): + * # type: (...) -> None +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PANE_INFO_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate_global->__pyx_k__2 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":261 + * (hash(self.pane_info) & 0xFFFFFFFFFFFFF)) + * + * def with_value(self, new_value): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedValue + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedValue_9with_value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValue_with_value, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_mstate_global->__pyx_n_u_with_value, __pyx_t_2) < (0)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":271 + * new_value, self.timestamp_micros, self.windows, self.pane_info) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return WindowedValue, ( + * self.value, self.timestamp, self.windows, self.pane_info) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedValue_11__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedValue___reduce, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 271, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":279 + * + * + * def create(value, timestamp_micros, windows, pane_info=PANE_INFO_UNKNOWN): # <<<<<<<<<<<<<< + * wv = WindowedValue.__new__(WindowedValue) + * wv.value = value +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PANE_INFO_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_mstate_global->__pyx_k__5 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PANE_INFO_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_3create, 0, __pyx_mstate_global->__pyx_n_u_create, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_2) < (0)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":291 + * """A batch of N windowed values, each having a value, a timestamp and set of + * windows.""" + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_1with_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedBatch_with_values, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_with_values, __pyx_t_2) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":300 + * raise NotImplementedError + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * raise NotImplementedError + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_explode_fn, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 300, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Iterable_WindowedValue) < (0)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_3as_windowed_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedBatch_as_windowed_values, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_as_windowed_values, __pyx_t_4) < (0)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":303 + * raise NotImplementedError + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_windowed_values, __pyx_mstate_global->__pyx_kp_u_Sequence_WindowedValue) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_produce_fn, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Iterable_WindowedBatch) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_5from_windowed_values, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedBatch_from_windowed_valu, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_t_2) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = NULL; + __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_t_2) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedBatch___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_WindowedBatch, (type(self), 0xe3b0c44, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_WindowedBatch__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_13WindowedBatch_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_WindowedBatch___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":318 + * self._wv = wv + * + * @staticmethod # <<<<<<<<<<<<<< + * def of(values, timestamp, windows, pane_info): + * return HomogeneousWindowedBatch( +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_3of, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_of, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_of, __pyx_t_2) < (0)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = NULL; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_of); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_of, __pyx_t_2) < (0)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":343 + * self._wv.windows = value + * + * def with_values(self, new_values): # <<<<<<<<<<<<<< + * # type: (Any) -> WindowedBatch + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_5with_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_with_va, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_with_values, __pyx_t_2) < (0)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":347 + * return HomogeneousWindowedBatch(self._wv.with_value(new_values)) + * + * def as_windowed_values(self, explode_fn: Callable) -> Iterable[WindowedValue]: # <<<<<<<<<<<<<< + * for value in explode_fn(self._wv.value): + * yield self._wv.with_value(value) +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_explode_fn, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Iterable_WindowedValue) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_7as_windowed_values, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_as_wind, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_as_windowed_values, __pyx_t_4) < (0)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":351 + * yield self._wv.with_value(value) + * + * def as_empty_windowed_value(self): # <<<<<<<<<<<<<< + * """Get a single WindowedValue with identical windowing information to this + * HomogeneousWindowedBatch, but with value=None. Useful for re-using APIs that +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_10as_empty_windowed_value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_as_empt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_as_empty_windowed_value, __pyx_t_4) < (0)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "apache_beam/utils/windowed_value.py":365 + * return hash(self._wv) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_batch_and_windowed_value( + * *, batch, windowed_value: WindowedValue) -> 'WindowedBatch': +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_windowed_value, __pyx_mstate_global->__pyx_n_u_WindowedValue) < (0)) __PYX_ERR(0, 365, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_WindowedBatch_2) < (0)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_16from_batch_and_windowed_value, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_from_ba, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_batch_and_windowed_value, __pyx_t_2) < (0)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = NULL; + __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_batch_and_windowed_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_batch_and_windowed_value, __pyx_t_2) < (0)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "apache_beam/utils/windowed_value.py":370 + * return HomogeneousWindowedBatch(windowed_value.with_value(batch)) + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_windowed_values( + * windowed_values: Sequence[WindowedValue], *, +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_windowed_values, __pyx_mstate_global->__pyx_kp_u_Sequence_WindowedValue) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_produce_fn, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Iterable_WindowedBatch) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_18from_windowed_values, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch_from_wi, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_t_5) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = NULL; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_from_windowed_values, __pyx_t_5) < (0)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch___reduc, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_HomogeneousWindowedBatch, (type(self), 0xb637b8e, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_HomogeneousWindowedBatch__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_24HomogeneousWindowedBatch_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HomogeneousWindowedBatch___setst, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":382 + * + * + * try: # <<<<<<<<<<<<<< + * WindowedValue.timestamp_object = None + * except TypeError: +*/ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "apache_beam/utils/windowed_value.py":383 + * + * try: + * WindowedValue.timestamp_object = None # <<<<<<<<<<<<<< + * except TypeError: + * # When we're compiled, we can't dynamically add attributes to +*/ + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue), __pyx_mstate_global->__pyx_n_u_timestamp_object, Py_None) < (0)) __PYX_ERR(0, 383, __pyx_L3_error) + + /* "apache_beam/utils/windowed_value.py":382 + * + * + * try: # <<<<<<<<<<<<<< + * WindowedValue.timestamp_object = None + * except TypeError: +*/ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "apache_beam/utils/windowed_value.py":384 + * try: + * WindowedValue.timestamp_object = None + * except TypeError: # <<<<<<<<<<<<<< + * # When we're compiled, we can't dynamically add attributes to + * # the cdef class, but in this case it's OK as it's already present +*/ + __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); + if (__pyx_t_12) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + + /* "apache_beam/utils/windowed_value.py":382 + * + * + * try: # <<<<<<<<<<<<<< + * WindowedValue.timestamp_object = None + * except TypeError: +*/ + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_10, __pyx_t_11); + __pyx_L8_try_end:; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowBase___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__IntervalWindowBase, (type(self), 0xe085eff, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__IntervalWindowBase__set_state(self, __pyx_state) +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_19_IntervalWindowBase_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntervalWindowBase___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle_WindowedBatch(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'') +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_5__pyx_unpickle_WindowedBatch, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedBatch, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_WindowedBatch, __pyx_t_5) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":1 + * cdef extern from *: # <<<<<<<<<<<<<< + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_7__pyx_unpickle_HomogeneousWindowedBatch, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_HomogeneousWindow, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_HomogeneousWindow, __pyx_t_5) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "(tree fragment)":4 + * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 + * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 + * def __pyx_unpickle__IntervalWindowBase(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_result + * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe085eff, 0x0ff69a6, 0x03e8f77, b'_end_micros, _end_object, _start_micros, _start_object') +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_5utils_14windowed_value_9__pyx_unpickle__IntervalWindowBase, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__IntervalWindowBa, NULL, __pyx_mstate_global->__pyx_n_u_apache_beam_utils_windowed_value, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__IntervalWindowBa, __pyx_t_5) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "apache_beam/utils/windowed_value.py":1 + * # # <<<<<<<<<<<<<< + * # Licensed to the Apache Software Foundation (ASF) under one or more + * # contributor license agreements. See the NOTICE file distributed with +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init apache_beam.utils.windowed_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init apache_beam.utils.windowed_value"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 182, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "apache_beam/utils/windowed_value.py":46 + * + * + * class PaneInfoTiming(object): # <<<<<<<<<<<<<< + * """The timing of a PaneInfo.""" + * +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + { + const struct { const unsigned int length: 8; } index[] = {{1},{25},{23},{4},{179},{16},{23},{25},{15},{1},{2},{1},{1},{1},{8},{35},{7},{6},{2},{9},{9},{8},{24},{14},{10},{3},{13},{8},{5},{24},{42},{44},{48},{43},{54},{45},{27},{36},{19},{37},{39},{8},{4},{4},{13},{13},{14},{7},{8},{17},{8},{14},{26},{24},{19},{26},{26},{20},{8},{13},{9},{14},{5},{7},{13},{31},{33},{32},{34},{25},{13},{24},{24},{29},{27},{32},{6},{23},{18},{18},{5},{4},{17},{18},{5},{3},{11},{49},{32},{6},{1},{11},{8},{5},{7},{12},{3},{11},{10},{29},{17},{11},{20},{38},{8},{7},{17},{12},{7},{5},{13},{8},{7},{5},{3},{8},{8},{3},{13},{6},{10},{15},{8},{7},{9},{10},{4},{20},{6},{2},{1},{9},{10},{3},{11},{10},{12},{14},{12},{11},{10},{39},{28},{34},{14},{12},{10},{17},{13},{6},{6},{4},{4},{12},{10},{12},{19},{5},{13},{5},{12},{8},{5},{9},{16},{16},{6},{9},{6},{6},{12},{5},{6},{14},{15},{7},{10},{11},{2},{3},{54},{2},{20},{11},{11},{24},{21},{23},{47},{23},{17},{27},{11},{50},{38},{38},{89},{100},{122},{7},{9},{12},{28},{4},{10},{56},{59},{58},{28},{179},{224}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (1886 bytes) */ +const char* const cstring = "(\265/\375`\035\017\245:\000jT\324\021;\360\030\347\314\3009\301V\301\354\210\007\004\323\231\242\321B\210\0217\rf5\215\036Dd\333\026i\201\257\235$d\276.\027\312\224\261\323\323\022Ea%\352:\253\256\262,\313\322\205\026\003\372\000\371\000\033\001\235\367\347\030\213\370Et\374\023\343\027G\367\353\177\332\273\r\264$T\024\223\225e\346\031\321\275\343\323\261\220\006\005\347\305\023\335\374\354\334\006\347\022\025\337\344z\353\020%\227!\312\310\311\220f\352C\024\361I?'G\237\371\222\302=\025^\222\035U\331\345\307\341\327\211\331\314\337\267\306\343\230s^M!\n\311+\314;Rw\023\365\243\2747\ni:?\311\034\311\316\351\331\353\\{=/\263\317K\221'9\206#O\232\304z\223=\367\255u\036\t\373\363P\277\256\363l\206\273\207\343\277\016\321\355\013s\263\360\305\337\364\365P\223\275$Q\\\230\333!\177\316s)\342P\036\362.>\324\237\341\250s\350\"\343\222R\223\325B-\222g\347\241\257\374\216#\313\037CN\206z\353\272\217'\354Y\327\303\357\233\366z\323\234\036-3\222\323\210N\354yg\374\336\0365\2314\322\364%.\237\337g%\001\3334s\033\2675\357\375\357\262\346\257\037\357\263D\307\235\373Oi2\357|\037\3051'\361\370\246Fs\030\343\344\021\267\313:\207K\276O\221\334a,n\214\307^\2429\367\343\370=\377)\236\346\324\013\207\227Y\334\245\315\213\357\\6\261\356m\035\205\313\362{\270\213\350\331E\314\305/\313-\362R|\276K1J\314\270\027\261&\361\356;\311_\357s\213\257M\212\332\307\363\250\3374s\177\275\370\356\3349\256\363\331_\350\315\334\345\316\377\2076\013\342\221\001\361`Ym\351\226\373\242>\3654\334E\262g\312\367\335\207\303\343\217[\324\217\373?\341\335o\264$\"Z\020\355\010\023\371\320fXF\213\325\312l\022\021\215\337\365\357\2764w3\332l\2506\024\273\031\311\206f7\254\024\033\352\234\024\222\335bB\317\363\316\371]\317\260\256\223\275\334\036u\3068\274\333g\216c_7w\217y\3569j\005\304*\261\312\324\244T\352\207\262\372\2500\365'\226.\264\004T\007\203`V[bj\204\372\220\255\010\006<\324\030\233J\003Se\322\004\203\340\300Cz\0200\304K\203Z\253\205\353MgV\256\200\240m\215\255@j\225UA@\220\327\306\000\2746W\252\315-L""\314u\271P,\010kR\361\272\250\021\006\301\007\025\206\201\267\346\265F\355\251K\2520\000`\220\345\332\334\223\226\326\262\204\2615b=P{R\205\2342\020t\253\002\327\005\033\265\352T\233:\221W\333\272\021\204\255\002\353M\232[\220\026Aa\355Q\201R\005\203 ,Mp\005=D\332\207\026\346\321\372\2600\366\304\025lY\265\\^\033\304\272\330\236\037\354\367\221\360&\270\260<\254`)\000&\272a\331mi\007\373j\000&!\221\257&\325\303R\3749\372=\217&\332\333\247\356w\"\331\317Q?\317\225\317\365\211\366?\313\214\362p\271K}\031%\222\246FM_\347\177\356P\036%\276\016c\322\314\242\370g6\377416\003\337\363\237\"@\t\177:3\356f\210brr\304&\031\305C\224\216]`:\211I\350\002\303/\030\006\303\241\355\027\"\361\316\2440u\207\325jq\354+\341\205H\017\010|RWl\227\330\247\226k\324\316\330\334\257\307\003b\223r\333\202\364\223Z\363S\312\340\n\332\200\032.\016+\300V\374d+l\315pu\336&\246\227v%\004\363\332\332\027\036+\362\343;\"\275H5\257\207K\023ka\255\014{\022\361\346+\006\240\316\312\313cU\326\030\225\352\201m\261\006\277\0335\"\nX\343&\264+\341\353\302ju@\004-*X\335\317c\305\240\010\362\200.@\014\367\326\236\260\343\250\326\244\010\036iB\313\275aO\002^\030\226Q\321\033s\225\000\254p[nO\353Rd{G\256r\334\336\362\264([\300\336\\\335\200\262\227W\242\305\371\365\225\003K)\351M\252\275M\300'\tw\346W\360{Y\373-e\260a\305\256\222\200'nL\353\321\216\354\253\341m0\010\362\260x\001\201F\250a\025c\314\314\314\210\214$I!\255\001!\014\002\242$\224\020=\242\271(\317a\214!\202\234\021\231\031\tD&((H\n\205\016\205\022\022V\005\360\002\361RD\202 \261;AN%e\217\002b\314\325p\235'g\326\347\024\353zf\216+U\320Vj@\232\r~\223\316\241\263\220^\324)\256\013z\344GU)@\232\341\200\021X\350\254\030\246\200\227\300\027f\221P\3759G\245h\206$]\202\037A\035\274\365\211\302\230\235m\216/z8\003o\032F\010\333ln\017\025\0224PS$\332c\316\347\201\036D\261\305\2264G-\237\321\355\211\372M!J\016\217\267*\241\247\256m8\321az\023\274\303|\254\334\330\032\026\020O0\215\223/p\013\200\2353\360\341E\003\375\321\333\207Fm\201\023\257\211%[<`\0148\376\333\n\202\305{d|\314%\375P\336Z\326\341W\276\367X\307j\327 \265I\006\025\235h9)a\r\334\355\374\326\021=]n\0270\373\366\221\177\245\362%\300:QEM\322\304.s\303\207\025\257=\273\021\350\217\355/\373+\213\327\304\026\023UO\016P\212k\371)\377\313\232\344\320hf^\210\362\326\354\366\215\246S\024\300V\267(\352\307+\247I\310'%k\375\003L\037\206-\363\3241\263p\273\nZ\232]Q\252\362\276M \352\362\303\327\233\307^\006A\376|`5\216\251\035\201\2728'\r?\037@\261\217\016\013\301\205;\306T\207t\\8G\244=:>P\253\2233\365\250.^\004r\3566\261\256\356evI2\027 \201\360f\"\203\264\237\034\263\360&\251\n\254\340\247\271\0379\002#\273\017*\324\360`!\234\355\361wc\230&\251\354~{Xu\274\273~\352\355\351\327\377\360k)9\003\206tm\376\316\346\203\001\346\346\002\r\037\013\"\177\343\035n\033\203\224ezFD\265@\314\220M\256\345$\363\337e\320\262\004PGdu\276:\212\252&\013\241v)\336\235<\005\257\341\023\312\244Z\207\2566\230\331\270\263\260\021\367d\025\215\030\2417\332\233\024\315}\301%\207\r\331\241~.\205sjK*\251F\031\254\350\306x8Rl!\t\037\241\036jiMD'\"\322\020\342\326\255&\342\244\370\0252)|\376@\002\364\324\005BRAY\320\023\272\201a\230\253\010\331\244\220\037\005\025"; + PyObject *data = __Pyx_DecompressString(cstring, 1886, 3); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2076 bytes) */ +const char* const cstring = "BZh91AY&SYO@\305\026\000\000\326\377\377\377\377\377\377\357\377\377\377\377\357\377\372\277\377\377\346@@@@@@@@@@@@@\000@\000`\007\235\363\307w\264\207\236\275\354\000\002\233f\2647\203\301\244D)\346\215\r\003&Dd\362\246\324\336\202\236\243\324\332\236S#\021\350\207\246\246\324z\217Hm@dhi\264\214\322{J\036\246h\324\022\2124\236&\204\302\223\304e2z\236\240\032h\0004h\000\000\000\000\000\000\000\000\000hF\204*~B\2150i\r\003\321\244h\304\310h\003\0102`\023&\214\214\02014h\332\231\250h\036\201)\250CTmS\311\244\303I\240\320\321\3526\243!\200\206\203@\000\014\0024\031\003\001\000\007\251\220\020i\211\211\211\200\230\t\200\000\000\000L\000\0010\000\t\200\000\000\000\232\004\211\004\320$\365'\212zjd\302\032S\312~\250\362\203z\210\017)\351\032\001\3524\000\000\000\323@\000\001\352\n6\t7\356\363\272\253x\3306\233\361\372q]\037\226[Nf\3761\375@\247#4`H\0146\333`\250\3415\302\247|H\320Z\310[\t\222H~\213\277\360U\027\266\333\020\332c\t\320\335\235\213d,$\025f\300f\213\376\220\212\014'\243&\006$\n\003\242\005\024\010\245*\301$\226\204\311\302o\016'\304\020\244Y\310\032\205\020\215\320\240\034\300T\034!L6Zj\262%\254\242\222\221\322-\276\000f\017\026qO@\332\276\032\273x\0167\027\327\020\3700T\240\364\375\235Gq\252?\376\345\037\316<\314F\233\337-\250\346\212(\022\2152e\022\nH\021\005X\002[\272\325\217\031\3069Obt\252l,\253\260Y\355'\240!\302\220%Yq1-\372\227\227\003V\317s\007\026\326\220S\t$\344\311*\216%P\226\025\331\303\340\\\364\t$\275\336\321l \3101\t\211+\326\227\362pak[\021\022\253e\210\265\324\346\364\346\035Y\262u4\223\325\240c\252V\246m\260\2457QE\270!\004\272\0309\320\t\246x\r\026\2053\005\235:\210\230\314`T\022\221z\226\337\030\352\215\376\033\364\266Z/\255U_\311\376\006Z \\\216\206M)#\337\001\205\317=t\326\242\372\210\334\225v\330O4\211u\221\247\227SaE\365]\257\311\215\226Z\021\207\256\25243 H\207\017\351\235-U\221\306\337v\r\\9\tn \364\301\002\375\005\003\202\332*Cz\236k8\032\212\026A\227\206\021B\\\322e\260'\206\321\244\361\364\004\006\222=\016\365tQ|\007n;D\033\244""\005\023\365\227x\354\"S^\262\340\013\006\341\277\235\210=]@\026\233\213$\211%Jb*\204\344$\223 \243\255\202pA\220\035x\302}\203>01\210\2311\302F=\201\004\240'5Y\365[\305\331\210\236i\203\341\216\"\002\031\001\316\241k\211m:\016\316\014wF\031\353\237\274e\277\306\265&Xb=q\3041\216\020D^\377\333Rx<\242\257\317\362\335\010\256w\236n\232\323i\347\3121\241\334\037\246\214{\322\244\325\363\225N\230\274\270TE\215\r_A\321\004\204\306\301\010\033\022\027\017q\205\022\304\326\006\221G k@\204r1\r\216i\211CH\201\r+Ee\030\344?\2212\3526\257F\246\270Z d8nW\235So\014\322Ia\331\300\262\246\321\236)\364\306\333\222\275\th\002\351e\\\034\355\262T\204\311\231\212\203[\034\220D\306\256\341\230\201Ph\254\226\363\"\344\224\305\033\210\030/)&\240-R&=,\030\320\033\325K\322z\243\006\257=\351\277\326:\376\007\213\311\010\211u\365\257V%\3458;&\336\2032B\366\276\016\240g\312\003\242\207\033Zz\265\356\262}\251\031 \277zHb\244\343%\301\023\343\037\242t\2528h\271\237\272\225\002\241\211\000\307\tP\r\266\222\022z\241\020r\302\002\014\207\317\252u\233G\005\333&\036\2364wS\333H\252\001L\013\033\3717\036\035\372\362#\303\033f\306t\367\240\315\004=\225\244\350\310\202*\341\312n9[\211\007#\272\352`+]Q\2666m\303\021\205\267\n\353\231\212\265\365\364\203:B\314\327?\002A\203\026\2414\004R\3403\254\374\327\031\312t\2565\274\251^\311\031\327,\n\"R\214\271\304Q\235\211\346#?1\210v\030ba\202l9]\231L\022w\222Wb:7\020\332'J:\25042efu\276\344\370\317Y\360\257\211z\270E\355S\275\016\255\316\r[n\355\334\005\326\021u\0217\241\001\337\013\274' \221\255&\375\374%\000\272\021C\213SS\334\036\215\2532h\342\304\200m\215\263\277\241\323ty\021\316\320& \316\342a\226md\332n/4\250q\343\342)\177\025i7\344\221\232\032\347\025_\217\301\227(\326#\361\371\026\321l_\350\240iw\021\221\261\233\024\242\315O\200\2630\347x\224\247J\230\310\213\324\234\000\02718\270F$\321:%*\260\201:\010\242;\316\243\361\357\226\311\326V\204\236\370\334J&2\332c\235\017n\321\203Lr\262\020\244\202\321\001\256(!\337i.\317\002\n\006m\010\347^\304\373\204""\351=n\210\036O0.\352\004\341\"\240\350\310f\256~\303-n\240\334\253\017i\204\204R\202<\342,\2035\324\373%NM8\007!\336\365D2\3277\332\353\237kh\2105\200*\21647pA\304-4);\366\343\277Q\004ZE\371\250'ky\251\314\362ryp\034\342\2447i\230{\251\034\003\0015\337\030}j\320\222\n\355\223U\225\243l*a\027=fRdTR\250\246C\343\036\321Q1\237e\253\242\020\014\313F\031\311IB\200\223\216\324\\\313\2722a%\230\233m:H\202\265\355\337\200\346\341:\025\253\230ZWW;\032h.\027u\330\3478\317\n\025\311\r\362\316\240\\p\r\206NWVi\346j\253\310\372\002\"UG\021F\324\022%|]\270'[\371B\324}\274JIH_\312\211\005\261I\022\264I\367F\306(\306$=e\376\025@\325EDp\206\026@\222Lt-\317\212\267\227)h\347\026\3372\304\302\307\220\273$\361\301\324\252\004\222\242*\300\272\367\1771\335\3459\3727\177\314\316\372\0160\341ILh\016\256\022\225\3323\271~\213H\361=\354F\335\307\367\365\311\236\016\331\2541\004Y\215\234\311\357[\215\327\242\251\244\"\206YA\360\211B\nv\t(\212\204\342\304\316}\221\003i\014\\O\227\340\243a\315\1776\351\215\234\202\362\366\300\265\220\266\207\344\376~\354\350\362\232\374\345*\372\246Q\214s\257\324oHi\203j6\251\240\324\220Z\013XE\024\032\357\242\203\223\254_\262\0333B\257_c\251\2352\362\362P\267\315\300[\205\253\275\370\337.\222`\342\326\321.Yu\000\344\2762\r\332\0048Ar\364\260\336\351arI.[8\226THVG\362\256\002\213\033l\206:\346\"\306\016\007\225X\370\n\022\220j\033\232\240p\013\202\277?w\0139\320\215N\365\371\231\007\001\206r\224\2675\372\371\242\351d\364\314\215\265\210\237\361\321\247\020tl\352}\264\304\300\372\246\366\300\243fT{\032nY\322\364\005\374\324\033l\033\2125\253\275\"\220\2657b\010\270]\312\n\353\n\332\305Te\330w\227X\375\241`\232S\014![\363v\014\372\021^\020\271t\025\241)6\213\304i/\322\375\207,\026g\202.\215w\255?9\201\366B}\316\303\252\003Y\220\365\325t\365\240JoV\300F\306\305\031\"\023\032\370\004\254\306\007\022\265I\261D\217(\031@\263A\2600\201\223\256\277\nJ\002\221\216!w$S\205\t\004\364\014Q`"; + PyObject *data = __Pyx_DecompressString(cstring, 2076, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (1861 bytes) */ +const char* const cstring = "x\332\225W\313S\333H\032\207\304!\316\220%K\310.\363\330\335\0215\263C&\260\316x\207\204\014I\230u\300\014\256\004\203\023o\230lj\252\253-\265m\005Y-\253[\030W\355Vq\324QG\035}\324QG\0379r\324\321G\376\204\375\023\366kI~\210\367RE?\276\376\336\337\257?\265\277/pb\342\212F>\316\357\252\272B[Dy\205\271\\\237\377mp\320\247\277\307\232E~+R\235\024)'\022\257c.\255\265y\235\352\222\312$\205hj\005$8\321\332\022\343\246*\203\274`\322\245\235\374\316\337\226\236-IXW$\223|\"2g\022\263*\262\206\031#L\242U\251b\251\032Wu\211\267\r\3022R\241*\265\251%\351\204(\022\247\222\001|\243\002\274Nt\211\021.\026\322<\326u\3121W\251\216@\\\325k\363\222\242\232`D\335'Bz\003k\214dv\260N\nz\225>\254\252&\343+\322;\322\264\210.\237\216\256\014\032\271\332\000-\302-,\365\3052\247\262\363pQ\372\230\371\031+\n\002\343\004\033X\256\023T!\270\361\330\342\252\306\036\267bn\264/\324f\214\266\2422\221L\242\213\261&/J\300@\016V s\021IY\224 :plQ\322\251\316\014\"[\032\026!\240\230\361\205\310\251^c\3242e\262\272\030{\271\"\345\364\366+j\001\217\022y\270\2065M(\314\347\336\276\371\260I\033\264FtB-\226\360\377\"z\006!\223(\226L\220\034\026\026\241K8\241\002\014\022\177\r^\314\020i\030\274\215\222i\271\214?\311\311.d\255\232\264\201*b\211\000^\3275\020J]\327\004\255^x\324Ry=\026G\005\035\000\017\353\210\343\025f\344\034\322\331\004\237\317t&\267\375\333\370&W\316\277Q\031\337\312\375\212\312\205\255\374\273rnkg\253P\034n\340r\026\032\206F\032\004\024+\333\321\311\266!.\010\326vr\305<*\0247\266\321?\213\257\213\333\273\305>\300\373s9\204Ur\027\245+\302\337\251\023NO\321\207\001\242!\251F8\202\313F\001\244\250\322\346dp\022*\036=\001\251\366\001\374\257C\373@Er\300\337\222j\377\252\226?\354\344\321\332f~\355u\241\370\013\330'\220\241\2061\\\210\336Q\266 \3628\264D\251\256\200\371\225\330\276\n\240W\343\353B\344$:Pb3\222\314$}(=\322z2\334\304:\253R\263\3012\221\355\321\303\260/ex?[g\217\222\356b\303 \272r\301\305=\033>fm]ViF\246&\005u:a\341\235\214J\032\366m\001\002\225\223\206\330\3029\2645\004\376\312\244""\202\345=Y\243\214\310\032\223\251\246\211\306\r\r\020\3110p\323\002\030\264\210\246\241=\235\266td\340P\262JY\346\205Fe\350\354\253\031q1\017\014\363*\001\331$POE!Uli\\\021\370B\321\030O\n\225Q\002\213\020?\022\377\rU6\301\277\003C\203#T\325/m9g\020=rw\316C\305y\264al/4\334\250(x\025\241\252\245\203{\375XO_(q\022\003\026\325\240\002\006Q\302\317\006RE\"\343\222\300:\374\370\301,>5\242\030l\217\264\2076\032\030\212\002\343\001\014\204\343\250lq\3700S\305\322@?\254L\n\326!$\350z\360\247\343FH\326I+\032\302(\006\013\006.\363\363\276i\264\"\236\002\264j\014\2124\254\226A\r\204\014\223\030\330$bA\303[P\005\367\014\350\01726Ta1\\\327\211\274\307\254F\2643\t\203\352F\3538\037b)\336\025\321\312\322\rU\336\2038.\352\351\247\330.;;\257\345\207\034\373\\\264j\341a\323\302Z\077\077\375\253|\366\023\320'@\301\342\010L\302-SgD\2532\001A\321\217\342<\303*\306\360H\227B\347t,\330\231<\036\243\032\206\347bPe\250o\235\202^\261\207\261n\322\326\2405\014\026\261\330p\037U,zy\014:\177\364\350\262\014\005\224[\220\201\276#a\361#\004$\361}\n\355\321\226\r[\332Hkl\355\243\326\376N{;\264+=\032\333i\213.?\330\242W\037\312yT\336F\203\317\332\330\340s`g\017\347NR\223\301\3447\235lg\335Ky\257\375fw\374p\274\227Z\360\262\336\206?'\226Y\177\332\377\016\250s\275\324\244\235\355\245\357\332\233\316\272{\027\370?\363\277\365q\250\301~\351\336t\263=\241\352\317n\311\305C\265\275\364\037\234\222Sw\367\274/@]\254#u\373\220\30341e\343\344\372\256\275\356\334qg\334\\\310\007Z\244\277\373s\275\276\207E\177\241[\352\202\362\377\246\307n\335\265\227l\356w\307\305\366\265\335\024\323\026\350\271q\307\236\026Q\334\352\245'\355gNVL+NIL\313\316\\\177wk\342\020\307\\\323\316\214\223\023\346\177tp/\375{\347\246\220\211v!\327\270p\372wvN\004\371\213\223u6\334\305N\030\375\276\275\353\344\335\007\340P\372\276\320<\3534O\304 \316\232\275\364\275\340^\306S\3749\177""\271\273p\264{\234;IRJ\221\342)\273\014N_S5w\237tnwF\014\374\324}\000\211\255\035}\014vv\203\335_ON\321Fl\374\305\345\235U\377A\360$\177T>\376?\014\276\364n{\226\277\346\363\356\317\307\363A\351\355\320\366\222\277\336\035\357\316\036M\036/\007o\337\235$I\331\340\306\202\367R\200OTx\322\236\213\367\275\324gv\214\246\347\216\002\326\025o\301/w\277\361K\301\3237\307\305\340_\037\373\250\217\335\216\200\037|\363\014\002N\177\341~\325\0018\237\334\270'@:q\370\311\031\207j4{\323_'\206\324Wn\326\315wf\275\233\336j\367OG\245^j\312\256\2057\020\273\373\235\367\340\370\217>N\022w\275M\250Ls\224\330\352T\275\202\377N$z\224X\363>\370r\027.\007\270io@\201'\356\330\367\203\311\214W\361\301\261\211\303\006`^T\306\376)x\360\327N)\274D\321{C\212\232>4G\224\315\216\274\253\320\223\360a\205\262K\311\216\227|\313I\217\036\016\033\234\370Y\310\237.!\276(\235\"\306F\330\236j\300{\205\031\342s\264(%\03508\302f\215]\323\213\350A$=\032\010\207?\020B\r\337\217E\207\377\003t\267Qn"; + PyObject *data = __Pyx_DecompressString(cstring, 1861, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (4125 bytes) */ +const char* const bytes = ")Iterable['WindowedBatch']Iterable[WindowedValue]NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.PaneInfo(first: Sequence[WindowedValue]The timing of a PaneInfo.'WindowedBatch'(, [.?add_noteapache_beam/utils/windowed_value.pydisableenablegc, index: isenabled, last: , nonspeculative_index: , timing: AnyBoundedWindowCallableEARLYHomogeneousWindowedBatchHomogeneousWindowedBatch.__reduce_cython__HomogeneousWindowedBatch.__setstate_cython__HomogeneousWindowedBatch.as_empty_windowed_valueHomogeneousWindowedBatch.as_windowed_valuesHomogeneousWindowedBatch.from_batch_and_windowed_valueHomogeneousWindowedBatch.from_windowed_valuesHomogeneousWindowedBatch.ofHomogeneousWindowedBatch.with_values_IntervalWindowBase_IntervalWindowBase.__reduce_cython___IntervalWindowBase.__setstate_cython__IterableLATEListMAX_TIMESTAMPMIN_TIMESTAMPNotImplementedON_TIMEOptionalPANE_INFO_UNKNOWNPaneInfoPaneInfoTimingPaneInfoTiming.from_stringPaneInfoTiming.to_stringPaneInfo.__reduce__PaneInfo._get_encoded_bytePaneInfo.from_encoded_byte__Pyx_PyDict_NextRefSequenceTYPE_CHECKINGTimestampTimestampTypesTupleUNKNOWNWindowedBatchWindowedBatch.__reduce_cython__WindowedBatch.__setstate_cython__WindowedBatch.as_windowed_valuesWindowedBatch.from_windowed_valuesWindowedBatch.with_valuesWindowedValueWindowedValue.__reduce__WindowedValue.with_valueapache_beam.transforms.windowapache_beam.utils.timestampapache_beam.utils.windowed_valueappendas_empty_windowed_valueas_windowed_valuesasyncio.coroutinesbatchbyte__class_getitem__cline_in_tracebackcloseclscollections_construct_well_known_pane_infos..genexpr_construct_well_known_pane_infoscreateddefaultdict__dict___dict__doc__encoded_byteend_end_microsexplode_fnfrom_batch_and_windowed_valuefrom_encoded_bytefrom_stringfrom_windowed_valuesfrom_windowed_values..__func__genexpr_get_encoded_byte__getstate""__groupedindex_is_coroutineis_firstis_lastitemskey__main__max__metaclass__micros__module____mro_entries____name____new__new_valuenew_valuesnextnonspeculative_indexobjectofppane_infopane_infospop__prepare__produce_fn__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_HomogeneousWindowedBatch__pyx_unpickle_WindowedBatch__pyx_unpickle__IntervalWindowBase__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex__resultreturnselfsend__set_name__setdefault__setstate____setstate_cython__start_start_microsstatestaticmethod__test__throwtimestamptimestamp_microstimestamp_objecttimingto_stringtypingupdateuse_setstatevaluevalueswindowed_valuewindowed_valueswindowswith_valuewith_valueswv_wvPyObject *\000PyTypeObject *\000_BYTE_TO_PANE_INFO\000Timestamp\2101\200!\340\004\013\320\013#\2401\240D\250\004\250K\260q\270\001\200\001\330\004+\2501\250F\260!\200\001\330\0041\260\021\260&\270\001\200!\330\004\013\2101\330\010\014\210H\220D\230\014\240D\250\n\260$\260a\200!\340\004\013\210=\230\003\2301\330\004\013\320\013\035\230Q\230a\200!\340\004\013\320\013#\2401\330\010\025\220Q\220h\230k\250\031\260!\200!\330\004\013\2101\330\004\007\200t\2101\330\006\016\210a\330\004\007\200t\2101\330\006\016\210a\330\004\014\210D\220\t\230\023\230A\330\004\013\2101\200!\340 2\260!\330\004\013\320\013#\2401\240N\260+\270Q\270a\200!\360\010\000\005\014\2104\210t\220;\230a\230q\200!\360\016\000\005\014\2106\220\021\330\010\023\2204\320\027*\250$\250j\270\004\270A\200\001\330\0046\260a\260v\270Q\320\0007\260q\330\002\007\200}\220H\230A\230Q\330\002\004\200I\210Q\330\002\004\320\004\030\230\001\330\002\004\200K\210q\330\002\004\200M\220\021\330\002\t\210\021\200!\340\004\005\330\010\013\2108\2201\330\010\013\210:\220Q\330\010\013\2107\220!\330\010\013\210:\220Q\330\005\006\200a\200!\340\004\005\330\010\021\220\023\220A\330\010\023\2203\220a\330\010\020\220\003\2201\330\010\023\2203\220a\330\005\006\200a\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,""\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\2305\240\007\240q\330\004\007\200q\330\010\017\320\0179\270\024\270Q\270g\300[\320PW\320WX\340\010\017\320\0179\270\024\270Q\270g\300[\320PQ\200\001\360\010\000\005\016\210T\220\036\230t\240>\260\024\3205E\300T\310\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\270?\310'\320QR\330\004\007\200q\330\010\017\320\0174\260D\270\001\270\027\300\013\3107\320RS\340\010\017\320\0174\260D\270\001\270\027\300\013\3101\320\002+\250=\270\001\200!\360\016\000\005\013\210!\320\002+\250=\270\001\330\004\n\210!\200!\330\004\013\210;\220d\230,\240d\250+\260T\270\032\3004\300q\330\026\032\230!\240h\250a\200!\340\027\030\330\022\037\230q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023+\2508\2601\260A\330\004\007\200|\2207\230!\330\010:\270!\320;V\320Vd\320de\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\320\023&\240h\250a\250q\330\004\007\200|\2207\230!\330\0105\260Q\3206L\310N\320Z[\330\004\013\2101\200!\340\027\030\330\022\037\230q\330\004\013\320\013#\320#8\270\001\330\010\031\230\033\240A\200\001\340\002\017\210q\330\002\006\200j\220\001\220\036\230q\330\021\037\230q\330\021\037\230q\330\021\037\230q\330\004\033\2301\230E\240\027\250\003\250>\270\034\300Q\330\004\016\210g\220Q\220h\230a\230v\240V\2508\2603\260a\330\004\016\210g\220Q\220h\230a\230v\240W\250H\260C""\260q\330\004\016\210g\220Q\220h\230a\230w\240f\250I\260S\270\001\330\004\016\210g\220Q\220h\230a\230w\240g\250Y\260c\270\021\330\002\013\2101\210F\220!\330\006\t\210\022\320\013.\250b\260\001\340\002\006\200m\2201\330\004\n\210!\2109\320\024%\240Q\330\002\t\210\021struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args)\000create"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 180; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 25) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 180; i < 211; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 211; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 180; + for (Py_ssize_t i=0; i<31; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,-1,1,2,3,7,11}; + int32_t const cint_constants_4[] = {1000000L,191069070L,235429631L,238750788L}; + int64_t const cint_constants_8[] = {4503599627370495LL,72057594037927935LL,1152921504606846975LL}; + for (int i = 0; i < 14; i++) { + numbertab[i] = PyLong_FromLongLong((i < 7 ? cint_constants_1[i - 0] : (i < 11 ? cint_constants_4[i - 7] : cint_constants_8[i - 11]))); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<14; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 2; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; +} __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 182}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 347}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_explode_fn, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_as_windowed_values, __pyx_mstate->__pyx_kp_b_iso88591__10, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 370}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_windowed_values, __pyx_mstate->__pyx_n_u_produce_fn, __pyx_mstate->__pyx_n_u_grouped, __pyx_mstate->__pyx_n_u_wv, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_values}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_from_windowed_values, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 374}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 54}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_to_string, __pyx_mstate->__pyx_kp_b_iso88591_81_Q_7_Q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 63}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_from_string, __pyx_mstate->__pyx_kp_b_iso88591_A_3a_1_3a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 89}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_byte}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_get_encoded_byte, __pyx_mstate->__pyx_kp_b_iso88591_1_t1_a_t1_a_D_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 98}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_encoded_byte}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_from_encoded_byte, __pyx_mstate->__pyx_kp_b_iso88591_1_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 164}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_d_d_T_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 169}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pane_infos, __pyx_mstate->__pyx_n_u_timing, __pyx_mstate->__pyx_n_u_nonspeculative_index, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_pane_info, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_construct_well_known_pane_infos_2, __pyx_mstate->__pyx_kp_b_iso88591_q_j_q_q_q_q_1E_Q_gQhavV83a_gQha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 261}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_value}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_with_value, __pyx_mstate->__pyx_kp_b_iso88591_6_4_j_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 271}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_1_HD_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 279}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_timestamp_micros, __pyx_mstate->__pyx_n_u_windows, __pyx_mstate->__pyx_n_u_pane_info}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_create, __pyx_mstate->__pyx_kp_b_iso88591_7q_HAQ_IQ_Kq_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 291}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_values}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_with_values, __pyx_mstate->__pyx_kp_b_iso88591__11, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 300}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_explode_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_as_windowed_values, __pyx_mstate->__pyx_kp_b_iso88591__12, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 303}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_windowed_values, __pyx_mstate->__pyx_n_u_produce_fn}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_from_windowed_values, __pyx_mstate->__pyx_kp_b_iso88591_q_8_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 318}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_windows, __pyx_mstate->__pyx_n_u_pane_info}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_of, __pyx_mstate->__pyx_kp_b_iso88591_1_Qhk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 343}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_values}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_with_values, __pyx_mstate->__pyx_kp_b_iso88591_1D_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 351}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_as_empty_windowed_value, __pyx_mstate->__pyx_kp_b_iso88591_4t_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 2, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 365}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch, __pyx_mstate->__pyx_n_u_windowed_value}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_apache_beam_utils_windowed_value_2, __pyx_mstate->__pyx_n_u_from_batch_and_windowed_value, __pyx_mstate->__pyx_kp_b_iso88591_2_1N_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_t5_q_q_9_Qg_PWW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_6avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_t_5ET_G1F_a_vWE_Q_q_t_uCt_QR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_WindowedBatch, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_HomogeneousWindow, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_81A_7_VVdde_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__IntervalWindowBa, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_haq_7_5Q6LNZ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* Generator.init */ + if (likely(__pyx_Generator_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray (used by fastcall) */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals (used by UnicodeEquals) */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals (used by fastcall) */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO (used by PyObjectFastCall) */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall (used by PyObjectCallOneArg) */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywordsImpl (used by ParseKeywords) */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else + Py_ssize_t pos = 0; + #endif + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} + +/* ParseKeywords */ +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_OrObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceOr : PyNumber_Or)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_OrObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_or(op1, op2); + } + calculate_long: + { + long x; + x = a | b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla | llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_OrObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_OrObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_OrObjC(op1, op2, inplace); +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + (void)wraparound; + (void)boundscheck; + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); + } + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); + } + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (!is_list && mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (is_list || likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + (void)wraparound; + (void)boundscheck; + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* PyDictVersioning (used by GetModuleGlobalName) */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* GetException (used by pep479) */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + calculate_long: + { + long x; + x = a + b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_multiply(op1, op2); + } + calculate_long: + CYTHON_UNUSED_VAR(a); + CYTHON_UNUSED_VAR(b); + lla = a; + goto calculate_long_long; + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) * (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace); +} +#endif + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* pybytes_as_double (used by pynumber_float) */ +static double __Pyx_SlowPyString_AsDouble(PyObject *obj) { + PyObject *float_value = PyFloat_FromString(obj); + if (likely(float_value)) { + double value = __Pyx_PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } + return (double)-1; +} +static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) { + int last_was_punctuation = 1; + int parse_error_found = 0; + Py_ssize_t i; + for (i=0; i < length; i++) { + char chr = start[i]; + int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E'); + *buffer = chr; + buffer += (chr != '_'); + parse_error_found |= last_was_punctuation & is_punctuation; + last_was_punctuation = is_punctuation; + } + parse_error_found |= last_was_punctuation; + *buffer = '\0'; + return unlikely(parse_error_found) ? NULL : buffer; +} +static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) { + int matches = 1; + char sign = start[0]; + int is_signed = (sign == '+') | (sign == '-'); + start += is_signed; + length -= is_signed; + switch (start[0]) { + #ifdef Py_NAN + case 'n': + case 'N': + if (unlikely(length != 3)) goto parse_failure; + matches &= (start[1] == 'a' || start[1] == 'A'); + matches &= (start[2] == 'n' || start[2] == 'N'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_NAN : Py_NAN; + #endif + case 'i': + case 'I': + if (unlikely(length < 3)) goto parse_failure; + matches &= (start[1] == 'n' || start[1] == 'N'); + matches &= (start[2] == 'f' || start[2] == 'F'); + if (likely(length == 3 && matches)) + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + if (unlikely(length != 8)) goto parse_failure; + matches &= (start[3] == 'i' || start[3] == 'I'); + matches &= (start[4] == 'n' || start[4] == 'N'); + matches &= (start[5] == 'i' || start[5] == 'I'); + matches &= (start[6] == 't' || start[6] == 'T'); + matches &= (start[7] == 'y' || start[7] == 'Y'); + if (unlikely(!matches)) goto parse_failure; + return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL; + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + break; + default: + goto parse_failure; + } + return 0.0; +parse_failure: + return -1.0; +} +static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) { + return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd)); +} +CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) { + double value; + Py_ssize_t i, digits; + const char *last = start + length; + char *end; + while (__Pyx__PyBytes_AsDouble_IsSpace(*start)) + start++; + while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1])) + last--; + length = last - start; + if (unlikely(length <= 0)) goto fallback; + value = __Pyx__PyBytes_AsDouble_inf_nan(start, length); + if (unlikely(value == -1.0)) goto fallback; + if (value != 0.0) return value; + digits = 0; + for (i=0; i < length; digits += start[i++] != '_'); + if (likely(digits == length)) { + value = PyOS_string_to_double(start, &end, NULL); + } else if (digits < 40) { + char number[40]; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) goto fallback; + value = PyOS_string_to_double(number, &end, NULL); + } else { + char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char)); + if (unlikely(!number)) goto fallback; + last = __Pyx__PyBytes_AsDouble_Copy(start, number, length); + if (unlikely(!last)) { + PyMem_Free(number); + goto fallback; + } + value = PyOS_string_to_double(number, &end, NULL); + PyMem_Free(number); + } + if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) { + return value; + } +fallback: + return __Pyx_SlowPyString_AsDouble(obj); +} + +/* pynumber_float */ +static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) { + double val; + if (PyLong_CheckExact(obj)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(obj))) { + val = (double) __Pyx_PyLong_CompactValue(obj); + goto no_error; + } +#endif + val = PyLong_AsDouble(obj); + } else if (PyUnicode_CheckExact(obj)) { + val = __Pyx_PyUnicode_AsDouble(obj); + } else if (PyBytes_CheckExact(obj)) { + val = __Pyx_PyBytes_AsDouble(obj); + } else if (PyByteArray_CheckExact(obj)) { + val = __Pyx_PyByteArray_AsDouble(obj); + } else { + return PyNumber_Float(obj); + } + if (unlikely(val == -1 && PyErr_Occurred())) { + return NULL; + } +#if CYTHON_USE_PYLONG_INTERNALS +no_error: +#endif + return PyFloat_FromDouble(val); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + long b; + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb; + if (unlikely(__Pyx_PyLong_IsZero(op2))) { + return __Pyx_NewRef(op2); + } + const int is_positive = __Pyx_PyLong_IsPos(op2); + const digit* digits = __Pyx_PyLong_Digits(op2); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2); + if (likely(size == 1)) { + b = (long) digits[0]; + if (!is_positive) b *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) b *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) llb *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_multiply(op1, op2); + } + calculate_long: + CYTHON_UNUSED_VAR(a); + CYTHON_UNUSED_VAR(b); + llb = b; + goto calculate_long_long; + calculate_long_long: + { + PY_LONG_LONG llx; + llx = lla * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyCObj(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long a = intval; + double b = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) * (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + return __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op2)) { + return __Pyx_Float___Pyx_PyLong_MultiplyCObj(op2, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(op1, op2, inplace); +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* RaiseKeywordRequired */ +static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name) { + PyErr_Format(PyExc_TypeError, + "%s() needs keyword-only argument %U", func_name, kw_name); +} + +/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectVectorCallMethodKwBuilder */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { + PyObject *result; + PyObject *obj = PyObject_GetAttr(args[0], name); + if (unlikely(!obj)) + return NULL; + result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); + Py_DECREF(obj); + return result; +} +#endif + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* ArgTypeTestFunc (used by ArgTypeTest) */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* dict_setdefault (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { + PyObject* value; +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict (used by FixUpExtensionType) */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType (used by FetchCommonType) */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_vectorcall_offset = memb->offset; + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse (used by CythonFunctionShared) */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew (used by CythonFunctionShared) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = 0; + i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared (used by CythonFunction) */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +#endif +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif +#if CYTHON_METH_FASTCALL +#if CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + op->func_dict = NULL; +#endif + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectCall2Args (used by PyObjectCallMethod1) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} +#endif + +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* IterFinish (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyObjectCallNoArg (used by PyObjectCallMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallMethod0 (used by dict_iter) */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack (used by UnpackTuple2) */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack (used by UnpackItemEndCheck) */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck (used by UnpackTuple2) */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError (used by UnpackTupleError) */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError (used by UnpackTuple2) */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 (used by dict_iter) */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_AVOID_BORROWED_REFS +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_AVOID_BORROWED_REFS + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* GetTopmostException (used by SaveResetException) */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + +/* CallNextTpTraverse */ +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + traverseproc tp_traverse = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_traverse) + return tp_traverse(obj, v, a); + return 0; +} + +/* CallNextTpClear */ +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + inquiry tp_clear = NULL; + while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear) + type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + if (type && tp_clear) + tp_clear(obj); +} + +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { + PyObject *cobj; + union { + void (*fp)(void); + void *p; + } tmp; + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* ValidateBasesTuple (used by PyType_Ready) */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { + PyObject *ob = PyCapsule_New(vtable, 0, 0); + if (unlikely(!ob)) + goto bad; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#else + if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) +#endif + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* GetVTable (used by MergeVTables) */ +static void* __Pyx_GetVtable(PyTypeObject *type) { + void* ptr; +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#else + PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); +#endif + if (!ob) + goto bad; + ptr = PyCapsule_GetPointer(ob, 0); + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + +/* MergeVTables */ +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i=0; + Py_ssize_t size; + void** base_vtables; + __Pyx_TypeName tp_base_name = NULL; + __Pyx_TypeName base_name = NULL; + void* unknown = (void*)-1; + PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); + int base_depth = 0; + { + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + while (base) { + base_depth += 1; + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; +#if CYTHON_COMPILING_IN_LIMITED_API + size = PyTuple_Size(bases); + if (size < 0) goto other_failure; +#else + size = PyTuple_GET_SIZE(bases); +#endif + for (i = 1; i < size; i++) { + PyObject *basei; + void* base_vtable; +#if CYTHON_AVOID_BORROWED_REFS + basei = PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto other_failure; +#else + basei = PyTuple_GET_ITEM(bases, i); +#endif + base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + if (base_vtable != NULL) { + int j; + PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + goto bad; + } + base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); + } + } + } + PyErr_Clear(); + PyMem_Free(base_vtables); + return 0; +bad: + { + PyTypeObject* basei = NULL; + PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); + tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); +#if CYTHON_AVOID_BORROWED_REFS + basei = (PyTypeObject*)PySequence_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#elif !CYTHON_ASSUME_SAFE_MACROS + basei = (PyTypeObject*)PyTuple_GetItem(bases, i); + if (unlikely(!basei)) goto really_bad; +#else + basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); +#endif + base_name = __Pyx_PyType_GetFullyQualifiedName(basei); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(basei); +#endif + } + PyErr_Format(PyExc_TypeError, + "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +really_bad: // bad has failed! +#endif + __Pyx_DECREF_TypeName(tp_base_name); + __Pyx_DECREF_TypeName(base_name); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +other_failure: +#endif + PyMem_Free(base_vtables); + return -1; +} + +/* DelItemOnTypeDict (used by SetupReduce) */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* HasAttr (used by ImportImpl) */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__8); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* ClassMethod */ +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (PyMethodDescr_Check(method)) +#else + if (__Pyx_TypeCheck(method, &PyMethodDescr_Type)) +#endif + { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyErr_Format( + PyExc_SystemError, + "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. " + "This is most likely a classmethod in a cdef class method with binding=False. " + "Try setting 'binding' to True.", + method); +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PyTypeObject *d_type = GraalPyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); +#elif CYTHON_COMPILING_IN_GRAAL + PyTypeObject *d_type = PyDescrObject_GetType(method); + return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); +#else + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + PyTypeObject *d_type = descr->d_common.d_type; + return PyDescr_NewClassMethod(d_type, descr->d_method); +#endif + } +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API + else if (PyMethod_Check(method)) { + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else { + return PyClassMethod_New(method); + } +#else + { + PyObject *func=NULL; + PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; + if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { + func = PyObject_GetAttrString(method, "__func__"); + if (!func) goto bad; + } else { + func = method; + Py_INCREF(func); + } + builtins = PyEval_GetBuiltins(); // borrowed + if (unlikely(!builtins)) goto bad; + classmethod_str = PyUnicode_FromString("classmethod"); + if (unlikely(!classmethod_str)) goto bad; + classmethod = PyObject_GetItem(builtins, classmethod_str); + Py_DECREF(classmethod_str); + if (unlikely(!classmethod)) goto bad; + result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); + Py_DECREF(classmethod); + bad: + Py_XDECREF(func); + return result; + } +#endif +} + +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* GetNameInClass */ +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + PyObject *dict; + assert(PyType_Check(nmspace)); +#if CYTHON_USE_TYPE_SLOTS + dict = ((PyTypeObject*)nmspace)->tp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* CLineInTraceback (used by AddTraceback) */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline = NULL; + PyObject *ptype, *pvalue, *ptraceback; + PyObject *cython_runtime_dict; + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) + } + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache (used by AddTraceback) */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CheckUnpickleChecksum */ +static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + PyObject *pickle_module = PyImport_ImportModule("pickle"); + if (unlikely(!pickle_module)) return; + PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); + Py_DECREF(pickle_module); + if (unlikely(!pickle_error)) return; + if (checksum2 == checksum1) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", + checksum, checksum1, members); + } else if (checksum3 == checksum2) { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, members); + } else { + PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", + checksum, checksum1, checksum2, checksum3, members); + } + Py_DECREF(pickle_error); +} +static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { + int found = 0; + found |= checksum1 == checksum; + found |= checksum2 == checksum; + found |= checksum3 == checksum; + if (likely(found)) + return 0; + __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); + return -1; +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int64_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int64_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int64_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned char) -1; + val = __Pyx_PyLong_As_unsigned_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT)) { + return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT)) { + return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT)) { + return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) + } else if ((sizeof(unsigned char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { + unsigned char val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned char) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned char) 1) << (sizeof(unsigned char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned char) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned char"); + return (unsigned char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned char"); + return (unsigned char) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_char(unsigned char value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned char) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned char) <= sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned char), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned char)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* UpdateUnpickledDict */ +static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); + if (unlikely(!state_dict)) { + return -1; + } + int non_empty = PyObject_IsTrue(state_dict); + if (non_empty == 0) { + Py_DECREF(state_dict); + return 0; + } else if (unlikely(non_empty == -1)) { + return -1; + } + PyObject *dict; + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + dict = PyObject_GetAttrString(obj, "__dict__"); + #else + dict = PyObject_GenericGetDict(obj, NULL); + #endif + if (unlikely(!dict)) { + Py_DECREF(state_dict); + return -1; + } + int result; + if (likely(PyDict_CheckExact(dict))) { + result = PyDict_Update(dict, state_dict); + } else { + PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); + if (likely(obj_result)) { + Py_DECREF(obj_result); + result = 0; + } else { + result = -1; + } + } + Py_DECREF(state_dict); + Py_DECREF(dict); + return result; +} +static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { + Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(state_size == -1)) return -1; + #endif + if (state_size <= index) { + return 0; + } + return __Pyx__UpdateUnpickledDict(obj, state, index); +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__9); + } + goto done; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + return __Pyx_cached_runtime_version; +#endif +} + +/* SwapException (used by CoroutineBase) */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* IterNextPlain (used by CoroutineBase) */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* ReturnWithStopIteration (used by CoroutineBase) */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase (used by Generator) */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + if (gen->gi_weakreflist != NULL) + #endif + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + gen->gi_weakreflist = NULL; +#endif + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_WEAKREF | +#endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + PyObject *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); + } + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return __Pyx_NewRef(b ? Py_True: Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/sdks/python/apache_beam/utils/windowed_value.cp314-win_amd64.pyd b/sdks/python/apache_beam/utils/windowed_value.cp314-win_amd64.pyd new file mode 100644 index 000000000000..9548088e5a2b Binary files /dev/null and b/sdks/python/apache_beam/utils/windowed_value.cp314-win_amd64.pyd differ diff --git a/sdks/python/apache_beam/yaml/docs/yaml-combine.md b/sdks/python/apache_beam/yaml/docs/yaml-combine.md new file mode 100644 index 000000000000..dadeee8879a7 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-combine.md @@ -0,0 +1,168 @@ +--- +type: languages +title: "Apache Beam YAML Aggregations" +--- + + +# Beam YAML Aggregations + +Beam YAML has the ability to do aggregations to group and combine +values across records. The is accomplished via the `Combine` transform type. + +For example, one can write + +``` +- type: Combine + config: + group_by: col1 + combine: + total: + value: col2 + fn: + type: sum +``` + +If the function has no configuration requirements, it can be provided directly +as a string + +``` +- type: Combine + config: + group_by: col1 + combine: + total: + value: col2 + fn: sum +``` + +This can be simplified further if the output field name is the same as the input +field name + +``` +- type: Combine + config: + group_by: col1 + combine: + col2: sum +``` + +One can aggregate over many fields at once + +``` +- type: Combine + config: + group_by: col1 + combine: + col2: sum + col3: max +``` + +and/or group by more than one field + +``` +- type: Combine + config: + group_by: [col1, col2] + combine: + col3: sum +``` + +or none at all (which will result in a global combine with a single output) + +``` +- type: Combine + config: + group_by: [] + combine: + col2: sum + col3: max +``` + +## Windowed aggregation + +As with all transforms, `Combine` can take a windowing parameter + +``` +- type: Combine + windowing: + type: fixed + size: 60s + config: + group_by: col1 + combine: + col2: sum + col3: max +``` + +If no windowing specification is provided, it inherits the windowing +parameters from upstream, e.g. + +``` +- type: WindowInto + windowing: + type: fixed + size: 60s +- type: Combine + config: + group_by: col1 + combine: + col2: sum + col3: max +``` + +is equivalent to the previous example. + + +## Custom aggregation functions + +One can use aggregation functions defined in Python by setting the language +parameter. + +``` +- type: Combine + config: + language: python + group_by: col1 + combine: + biggest: + value: "col2 + col2" + fn: + type: 'apache_beam.transforms.combiners.TopCombineFn' + config: + n: 10 +``` + +## SQL-style aggregations + +By setting the language to SQL, one can provide full SQL snippets as the +combine fn. + +``` +- type: Combine + config: + language: sql + group_by: col1 + combine: + num_values: "count(*)" + total: "sum(col2)" +``` + +One can of course also use the `Sql` transform type and provide a query +directly. diff --git a/sdks/python/apache_beam/yaml/docs/yaml-errors.md b/sdks/python/apache_beam/yaml/docs/yaml-errors.md new file mode 100644 index 000000000000..34a124fc6063 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-errors.md @@ -0,0 +1,279 @@ +--- +type: languages +title: "Apache Beam YAML Error Handling" +--- + + +# Beam YAML Error Handling + +The larger one's pipeline gets, the more common it is to encounter "exceptional" +data that is malformatted, doesn't handle the proper preconditions, or otherwise +breaks during processing. Generally any such record will cause the pipeline to +permanently fail, but often it is desirable to allow the pipeline to continue, +re-directing bad records to another path for special handling or simply +recording them for later off-line analysis. This is often called the +"dead letter queue" pattern. + +Beam YAML has special support for this pattern if the transform supports a +`error_handling` config parameter with an `output` field. +The `output` parameter is a name that must referenced as an input to +another transform that will process the errors (e.g. by writing them out). +For example, +the following code will write all "good" processed records to one file and +any "bad" records, along with metadata about what error was encountered, +to a separate file. + +```yaml +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + + - type: MapToFields + input: ReadFromCsv + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + ratio: col2 / col3 + error_handling: + output: my_error_output + + - type: WriteToJson + input: MapToFields + config: + path: /path/to/output.json + + - type: WriteToJson + name: WriteErrorsToJson + input: MapToFields.my_error_output + config: + path: /path/to/errors.json +``` + +Note that with `error_handling` declared, `MapToFields.my_error_output` +**must** be consumed; to ignore it will be an error. Any use is fine, e.g. +logging the bad records to stdout would be sufficient (though not recommended +for a robust pipeline). + +Note also that the exact format of the error outputs is still being finalized. +They can be safely printed and written to outputs, but their precise schema +may change in a future version of Beam and should not yet be depended on. +It generally contains the failed record itself as well as information about +the error that was encountered (e.g. error messages and tracebacks). +To recover the bad record alone one can process the error output with the +`StripErrorMetadata` transformation. + +Some transforms allow for extra arguments in their error_handling config, e.g. +for Python functions one can give a `threshold` which limits the relative number +of records that can be bad before considering the entire pipeline a failure + +```yaml +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + + - type: MapToFields + input: ReadFromCsv + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + ratio: col2 / col3 + error_handling: + output: my_error_output + # If more than 10% of records throw an error, stop the pipeline. + threshold: 0.1 + + - type: WriteToJson + input: MapToFields + config: + path: /path/to/output.json + + - type: WriteToJson + name: WriteErrorsToJson + input: MapToFields.my_error_output + config: + path: /path/to/errors.json +``` + +One can do arbitrary further processing on these failed records if desired, +e.g. + +```yaml +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + + - type: MapToFields + name: ComputeRatio + input: ReadFromCsv + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + ratio: col2 / col3 + error_handling: + output: my_error_output + + - type: StripErrorMetadata + name: FailedRecordsWithoutMetadata + # Takes the error information from ComputeRatio and returns just the + # failing records themselves for another attempt with a different + # transform. + input: ComputeRatio.my_error_output + + - type: MapToFields + name: ComputeRatioForBadRecords + input: FailedRecordsWithoutMetadata + config: + language: python + fields: + col1: col1 + ratio: col2 / (col3 + 1) + error_handling: + output: still_bad + + - type: WriteToJson + # Takes as input everything from the "success" path of both transforms. + input: [ComputeRatio, ComputeRatioForBadRecords] + config: + path: /path/to/output.json + + - type: WriteToJson + name: WriteErrorsToJson + # These failed the first and the second transform. + input: ComputeRatioForBadRecords.still_bad + config: + path: /path/to/errors.json +``` + +When using the `chain` syntax, the required error consumption can happen +in an `extra_transforms` block. + +```yaml +pipeline: + type: chain + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + + - type: MapToFields + name: SomeStep + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + ratio: col2 / col3 + error_handling: + output: errors + + - type: MapToFields + name: AnotherStep + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + inverse_ratio: 1 / ratio + error_handling: + output: errors + + - type: WriteToJson + config: + path: /path/to/output.json + + extra_transforms: + - type: WriteToJson + name: WriteErrors + input: [SomeStep.errors, AnotherStep.errors] + config: + path: /path/to/errors.json +``` + +## Error Handling with Custom Providers +Custom transforms, such as those defined in separate YAML files via a `YamlProvider`, can also expose error outputs from their underlying transforms. + +Consider a file `my_transforms.yaml` that defines a `RaiseElementToPower` transform: +```yaml +# my_transforms.yaml +- type: yaml + transforms: + RaiseElementToPower: + config_schema: + properties: + n: {type: integer} + body: + type: MapToFields + config: + language: python + append: true + fields: + power: "element ** {{n}}" + # This transform internally defines and exposes an error output. + error_handling: + output: my_error +``` +This transform takes a numeric element and raises it to the power of `n`. If the element is not a number, it will produce an error. The error output from the internal `MapToFields` is named `my_error`. This error output is automatically exposed by the `RaiseElementToPower` transform. + +When using this transform in a pipeline, you can access this error output and handle it. The main output of the transform will contain only the successfully processed elements. + +```yaml +pipeline: + transforms: + - type: Create + config: + elements: [2, 'bad', 3] + - type: RaiseElementToPower + input: Create + config: + n: 2 + - type: WriteToJson + name: WriteGood + # The main output contains successfully processed elements. + input: RaiseElementToPower + config: + path: /path/to/good + - type: WriteToJson + name: WriteBad + # The error output is accessed by its name. + input: RaiseElementToPower.my_error + config: + path: /path/to/bad + + providers: + - include: my_transforms.yaml + +``` +In this example, the pipeline separates the good and bad records coming from the custom `RaiseElementToPower` transform. The good records are written to one location, and the error records are written to another. + +A pipeline will fail at construction time if an error output is declared (either in a built-in transform or a custom one) but not consumed. This helps ensure that all error paths are considered. + +See YAML schema [info](https://beam.apache.org/documentation/sdks/yaml-schema/) for another use of error_handling in a schema context. diff --git a/sdks/python/apache_beam/yaml/docs/yaml-inline-python.md b/sdks/python/apache_beam/yaml/docs/yaml-inline-python.md new file mode 100644 index 000000000000..e951711022f7 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-inline-python.md @@ -0,0 +1,204 @@ +--- +type: languages +title: "Apache Beam YAML Inline Python" +--- + + +# Using PyTransform from YAML + +Beam YAML provides the ability to easily invoke Python transforms via the +`PyTransform` type, simply referencing them by fully qualified name. +For example, + +``` +- type: PyTransform + config: + constructor: apache_beam.pkg.module.SomeTransform + args: [1, 'foo'] + kwargs: + baz: 3 +``` + +will invoke the transform `apache_beam.pkg.mod.SomeTransform(1, 'foo', baz=3)`. +This fully qualified name can be any PTransform class or other callable that +returns a PTransform. Note, however, that PTransforms that do not accept or +return schema'd data may not be as useable to use from YAML. +Restoring the schema-ness after a non-schema returning transform can be done +by using the `callable` option on `MapToFields` which takes the entire element +as an input, e.g. + +``` +- type: PyTransform + config: + constructor: apache_beam.pkg.module.SomeTransform + args: [1, 'foo'] + kwargs: + baz: 3 +- type: MapToFields + config: + language: python + fields: + col1: + callable: 'lambda element: element.col1' + output_type: string + col2: + callable: 'lambda element: element.col2' + output_type: integer +``` + +This can be used to call arbitrary transforms in the Beam SDK, e.g. + +``` +pipeline: + transforms: + - type: PyTransform + name: ReadFromTsv + input: {} + config: + constructor: apache_beam.io.ReadFromCsv + kwargs: + path: '/path/to/*.tsv' + sep: '\t' + skip_blank_lines: True + true_values: ['yes'] + false_values: ['no'] + comment: '#' + on_bad_lines: 'skip' + binary: False + splittable: False +``` + + +## Defining a transform inline using `__constructor__` + +If the desired transform does not exist, one can define it inline as well. +This is done with the special `__constructor__` keywords, +similar to how cross-language transforms are done. + +With the `__constuctor__` keyword, one defines a Python callable that, on +invocation, *returns* the desired transform. The first argument (or `source` +keyword argument, if there are no positional arguments) +is interpreted as the Python code. For example + +``` +- type: PyTransform + config: + constructor: __constructor__ + kwargs: + source: | + def create_my_transform(inc): + return beam.Map(lambda x: beam.Row(a=x.col2 + inc)) + + inc: 10 +``` + +will apply `beam.Map(lambda x: beam.Row(a=x.col2 + 10))` to the incoming +PCollection. + +As a class object can be invoked as its own constructor, this allows one to +define a `beam.PTransform` inline, e.g. + +``` +- type: PyTransform + config: + constructor: __constructor__ + kwargs: + source: | + class MyPTransform(beam.PTransform): + def __init__(self, inc): + self._inc = inc + def expand(self, pcoll): + return pcoll | beam.Map(lambda x: beam.Row(a=x.col2 + self._inc)) + + inc: 10 +``` + +which works exactly as one would expect. + + +## Defining a transform inline using `__callable__` + +The `__callable__` keyword works similarly, but instead of defining a +callable that returns an applicable `PTransform` one simply defines the +expansion to be performed as a callable. This is analogous to BeamPython's +`ptransform.ptransform_fn` decorator. + +In this case one can simply write + +``` +- type: PyTransform + config: + constructor: __callable__ + kwargs: + source: | + def my_ptransform(pcoll, inc): + return pcoll | beam.Map(lambda x: beam.Row(a=x.col2 + inc)) + + inc: 10 +``` + + +# External transforms + +One can also invoke PTransforms define elsewhere via a `python` provider, +for example + +``` +pipeline: + transforms: + - ... + - type: MyTransform + config: + kwarg: whatever + +providers: + - ... + - type: python + input: ... + config: + packages: + - 'some_pypi_package>=version' + transforms: + MyTransform: 'pkg.module.MyTransform' +``` + +These can be defined inline as well, with or without dependencies, e.g. + +``` +pipeline: + transforms: + - ... + - type: ToCase + input: ... + config: + upper: True + +providers: + - type: python + config: {} + transforms: + 'ToCase': | + @beam.ptransform_fn + def ToCase(pcoll, upper): + if upper: + return pcoll | beam.Map(lambda x: str(x).upper()) + else: + return pcoll | beam.Map(lambda x: str(x).lower()) +``` diff --git a/sdks/python/apache_beam/yaml/docs/yaml-join.md b/sdks/python/apache_beam/yaml/docs/yaml-join.md new file mode 100644 index 000000000000..6645d7a945a3 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-join.md @@ -0,0 +1,182 @@ +--- +type: languages +title: "Apache Beam YAML Join" +--- + + +# Beam YAML Join + +Beam YAML can join two or more inputs on specified columns. For example, the +following pipeline joins the First Input pcollection and Second Input +pcollection when col1 in First Input is equal to col2 in Second Input. + +``` +- type: Join + input: + input1: First Input + input2: Second Input + config: + equalities: + - input1: col1 + input2: col2 +``` + +When joining multiple inputs on one column that is named the same across all the +inputs, one can use the following shorthand syntax: + +``` +- type: Join + input: + input1: First Input + input2: Second Input + input3: Third Input + config: + equalities: col1 +``` + +## Join Types + +When using the Join transform, one can specify the type of join to perform on +the inputs. If no join type is specified, the inputs are all joined using an +inner join. The supported join types are: + +| Join Type | YAML Keyword | +| -------- | ------- | +| Inner Join | inner | +| Full Outer Join | left | +| Right Outer Join | right | + +The following example joins two inputs using an inner join on the specified +equalities: + +``` +- type: Join + input: + input1: First Input + input2: Second Input + config: + type: inner + equalities: + - input1: col1 + input2: col1 +``` + + +The following example joins two inputs using a left outer join on the specified +equalities. In this case, all rows from input1 will be kept because input1 is +the left input. Order of joins follows the sequence as specified in equalities. + +``` +- type: Join + input: + input1: First Input + input2: Second Input + config: + type: left + equalities: + - input1: col1 + input2: col1 +``` + +The following example joins three inputs using an full outer join on the +specified equalities: + +``` +- type: Join + input: + input1: First Input + input2: Second Input + input3: Third Input + config: + type: outer + equalities: + - input1: col1 + input2: col1 + - input2: col2 + input3: col2 +``` + +If you want a combination of join types, you can specify the inputs to be outer +joined. The following example joins input1 with input2 using a right outer join +since input2 is on the right side and will join input2 with input 3 using a left +outer join since input2 is on the left side. + +``` +- type: Join + input: + input1: First Input + input2: Second Input + input3: Third Input + config: + type: + outer: + - input2 + equalities: + - input1: col1 + input2: col1 + - input2: col2 + input3: col2 +``` + +## Fields +By default, the join transform includes all columns from all input tables. If +column names clash, it's best to rename them explicitly. Otherwise, the system +will deduplicate names by adding a numeric suffix + +To choose which columns to output, or to customize the output column names, use +the "fields" configuration. + +To specify which columns to output from an input, use the input reference as the +configuration key and a list of desired columns as the configuration value. The +following example outputs col1 from input1, col2 and col3 from input2, and all +the columns from input 3. If there is a name clash, it appends a numeric suffix +to avoid duplicate naming. + +``` +- type: Join + input: + input1: First Input + input2: Second Input + input3: Third Input + config: + equalities: col1 + fields: + input1: [col1] + input2: [col2, col3] +``` + +To rename a column in the output, create a mapping for the input with the key as +the new column name and the value as the original column name. The following +example maps col1 from input3 to the column name "renamed_col1": + +``` +- type: Join + input: + input1: First Input + input2: Second Input + input3: Third Input + config: + equalities: col1 + fields: + input1: [col1] + input2: [col2, col3] + input3: + renamed_col1: col1 +``` diff --git a/sdks/python/apache_beam/yaml/docs/yaml-providers.md b/sdks/python/apache_beam/yaml/docs/yaml-providers.md new file mode 100644 index 000000000000..51d4634f0e1c --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-providers.md @@ -0,0 +1,246 @@ +--- +type: languages +title: "Apache Beam YAML Providers" +--- + + +# Providers + +Though we aim to offer a large suite of built-in transforms, it is inevitable +that people will need to author their own. This is made possible +through the notion of Providers which leverage expansion services and +vend catalogues of schema transforms. + +## Java + +Exposing transform in Java that can be used in a YAML pipeline consists of +four main steps: + +1. Defining the transformation itself as a + [PTransform](https://beam.apache.org/documentation/programming-guide/#composite-transforms) + that consumes and produces zero or more [schema'd PCollections](https://beam.apache.org/documentation/programming-guide/#creating-schemas). +2. Exposing this transform via a + [SchemaTransformProvider](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/schemas/transforms/SchemaTransformProvider.html) + which provides an identifier used to refer to this transform later as well + as metadata like a human-readable description and its configuration parameters. +3. Building a Jar that contains these classes and vends them via the + [Service Loader](https://github.com/apache/beam-starter-java-provider/blob/main/src/main/java/org/example/ToUpperCaseTransformProvider.java#L47) + infrastructure. +4. Writing a [provider specification](https://beam.apache.org/documentation/sdks/yaml/#providers) + that tells Beam YAML where to find this jar and what it contains. + +If the transform is already exposed as a +[cross language transform](https://beam.apache.org/documentation/sdks/python-multi-language-pipelines/) +or [schema transform](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/schemas/transforms/SchemaTransformProvider.html) +then steps 1-3 have been done for you. One then uses this transform as follows: + +``` +pipeline: + type: chain + source: + type: ReadFromCsv + config: + path: /path/to/input*.csv + + transforms: + - type: MyCustomTransform + config: + arg: whatever + + sink: + type: WriteToJson + config: + path: /path/to/output.json + +providers: + - type: javaJar + config: + jar: /path/or/url/to/myExpansionService.jar + transforms: + MyCustomTransform: "urn:registered:in:expansion:service" +``` + +We provide a +[full cloneable example of how to build a java provider](https://github.com/apache/beam-starter-java-provider) +that can be used to get started. + +## Python + +Arbitrary Python transforms can be provided as well, using the syntax + +``` +providers: + - type: pythonPackage + config: + packages: + - my_pypi_package>=version + - /path/to/local/package.zip + transforms: + MyCustomTransform: "pkg.module.PTransformClassOrCallable" +``` + +which can then be used as + +``` +- type: MyCustomTransform + config: + num: 3 + arg: whatever +``` + +This will cause the dependencies to be installed before the transform is +imported (via its given fully qualified name) and instantiated +with the config values passed as keyword arguments (e.g. in this case +`pkg.module.PTransformClassOrCallable(num=3, arg="whatever")`). + +We offer a [python provider starter project](https://github.com/apache/beam-starter-python-provider) +that serves as a complete example for how to do this. + +## YAML + +New, re-usable transforms can be defined in YAML as well. +This type of provider simply has a mapping of names to their YAML definitions. +Jinja2 templatization of their string representations is used to parameterize +them. + +The `config_schema` section of the transform definition specifies what +parameters are required (with their types) and the `body` section gives +the implementation in terms of other YAML transforms. + +``` +- type: yaml + transforms: + # Define the first transform of type "RaiseElementToPower" + RaiseElementToPower: + config_schema: + properties: + n: {type: integer} + body: + type: chain + transforms: + - type: MapToFields + config: + language: python + append: true + fields: + power: "element ** {{n}}" + + # Define a second transform that produces consecutive integers. + Range: + config_schema: + properties: + end: {type: integer} + # Setting this parameter lets this transform type be used as a source. + requires_inputs: false + body: | + type: Create + config: + elements: + {% for ix in range(end) %} + - {{ix}} + {% endfor %} +``` + +Note that in this second example the `body` of Range is defined as a +[block string literal](https://yaml-multiline.info/) +to prevent any attempt by the system to parse the `{%` and `%}` pragmas used +for control statements before a specialization with a concrete value for `end` +is instantiated and the loop is expanded. + +These could then be used in a pipeline as + +``` +transforms: + - type: Range + config: + end: 10 + - type: RaiseElementToPower + input: Range + config: + n: 3 + ... +``` + +One can define composite transforms as well, e.g. in a provider listing one +could have + +``` +- type: yaml + transforms: + ConsecutivePowers: + # This takes two parameters. + config_schema: + properties: + end: {type: integer} + n: {type: integer} + + # It can be used as a source transform. + requires_inputs: false + + # The body uses the transforms defined above linked together in a chain. + body: | + type: chain + transforms: + - type: Range + config: + end: {{end}} + - type: RaiseElementToPower + config: + n: {{n}} +``` + +which allows one to use this whole fragment as + +``` +type: ConsecutivePowers +config: + end: 10 + n: 3 +``` + +Note that YAML-defined transforms work better in a listing file than directly +in the `providers` block of a pipeline file as pipeline files are always +pre-processed with Jinja2 themselves which would necessitate double escaping. + +## YAML Provider listing files + +One can reference an external listings of providers in the yaml pipeline file +via the syntax + +``` +providers: + - include: "file:///path/to/local/providers.yaml" + - include: "gs://path/to/remote/providers.yaml" + - include: "https://example.com/hosted/providers.yaml" + ... +``` + +where `providers.yaml` is simply a yaml file containing a list of providers +in the same format as those inlined in this providers block. +See, for example, the provider listing [here]( +https://github.com/apache/beam-starter-python-provider/blob/main/examples/provider_listing.yaml). + +In fact, this is how many of the the built in transforms are declared, +see for example the [builtin io listing file]( +https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/standard_io.yaml). + +Hosting these listing files (together with their required artifacts) allows +one to easily share catalogues of transforms that can be directly used +by others in their YAML pipelines. diff --git a/sdks/python/apache_beam/yaml/docs/yaml-schema.md b/sdks/python/apache_beam/yaml/docs/yaml-schema.md new file mode 100644 index 000000000000..a563bf486bec --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-schema.md @@ -0,0 +1,131 @@ +--- +type: languages +title: "Apache Beam YAML Schema" +--- + + +# Beam YAML Schema + +As pipelines grow in size and complexity, it becomes more common to encounter +data that is malformed, doesn't meet preconditions, or otherwise causes issues +during processing. + +Beam YAML helps the user detect and capture these issues by using the optional +`output_schema` configuration, which is available for any transform in the YAML +SDK. For example, the following code creates a few "good" records and specifies +that the output schema from the `Create` transform should have records that +follow the expected schema: `sdk` as a string and `year` as an integer. + +```yaml +pipeline: + type: chain + transforms: + - type: Create + config: + elements: + - {sdk: MapReduce, year: 2004} + - {sdk: MillWheel, year: 2008} + output_schema: + type: object + properties: + sdk: + type: string + year: + type: integer + - type: AssertEqual + config: + elements: + - {sdk: MapReduce, year: 2004} + - {sdk: MillWheel, year: 2008} +``` + +However, a user will more likely want to detect and handle schema errors. If a +transform has a built-in error_handling configuration, the user can specify that +error_handling configuration and any errors found will be appended to the +transform error_handling output. For example, the following code will +create a few "good" and "bad" records with a specified schema of `user` as a +string and `timestamp` as a boolean. The `alice` row will fail in the standard +way because of not being an integer for the AssignTimestamps transform, while +the `bob` row will fail because after the AssignTimestamp transformation, the +output row will have the timestamp as an integer when it should be a boolean. + + +```yaml +pipeline: + type: composite + transforms: + - type: Create + name: CreateVisits + config: + elements: + - {user: alice, timestamp: "not-valid"} + - {user: bob, timestamp: 3} + - type: AssignTimestamps + input: CreateVisits + config: + timestamp: timestamp + error_handling: + output: invalid_rows + output_schema: + type: object + properties: + user: + type: string + timestamp: + type: boolean + - type: MapToFields + name: ExtractInvalidTimestamp + input: AssignTimestamps.invalid_rows + config: + language: python + fields: + user: "element.user" + timestamp: "element.timestamp" + - type: AssertEqual + input: ExtractInvalidTimestamp + config: + elements: + - {user: "alice", timestamp: "not-valid"} + - {user: bob, timestamp: 3} + - type: AssertEqual + input: AssignTimestamps + config: + elements: [] +``` + +WARNING: If a transform doesn't have the error_handling configuration available +and a user chooses to use this optional output_schema feature, any failures +found will result in the entire pipeline failing. If the user would still like +to have some kind of output schema validation, please use the ValidateWithSchema +transform instead. + +NOTE: When using the output_schema config, the main output key to validate on +will be determined based on these criteria: + + 1. An output with the key 'output'. + 2. An output with the key 'good'. + 3. The single output if there is only one. + +Failures will result if the main output cannot be determined because there are +multiple outputs and none are named 'output' or 'good'. + + + +For more detailed information on error handling, see this [page](https://beam.apache.org/documentation/sdks/yaml-errors/). diff --git a/sdks/python/apache_beam/yaml/docs/yaml-testing.md b/sdks/python/apache_beam/yaml/docs/yaml-testing.md new file mode 100644 index 000000000000..7da2942bcd6d --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-testing.md @@ -0,0 +1,301 @@ +--- +type: languages +title: "Apache Beam YAML Testing" +--- + + +# Beam YAML Tests + +A robust testing story is an important part of any production setup. +Though the various built-in (and externally provided) transform in a Beam YAML +pipeline can be expected to be well tested, it can be important to have tests +that ensure the pipeline as a whole behaves as expected. This is particularly +true for transforms that contain non-trivial UDF logic. + +## Whole pipeline tests + +For example, consider the example word count pipeline. + +``` +pipeline: + transforms: + - type: ReadFromText + name: Read from GCS + config: + path: gs://dataflow-samples/shakespeare/kinglear.txt + - type: MapToFields + name: Split words + config: + language: python + fields: + word: + callable: | + import re + def all_words(row): + return re.findall(r'[a-z]+', row.line.lower()) + value: 1 + input: Read from GCS + - type: Explode + name: Explode word arrays + config: + fields: [word] + input: Split words + - type: Combine + name: Count words + config: + group_by: [word] + combine: + value: sum + input: Explode word arrays + - type: MapToFields + name: Format output + config: + language: python + fields: + output: "word + ': ' + str(value)" + input: Count words + - type: WriteToText + name: Write to GCS + config: + path: gs://bucket/counts.txt + input: Format output + +tests: [] +``` + +To write tests for this pipeline, one creates a `tests` section that enumerates +a number of tests, each of which provide example input and assert the expected +output is produced. An example test might be as follows + +``` +tests: +- name: MyRegressionTest + mock_outputs: + - name: Read from GCS + elements: + - line: "Nothing can come of nothing" + expected_inputs: + - name: Write to GCS + elements: + - output: 'nothing: 2' + - output: 'can: 1' + - output: 'come: 1' + - output: 'of: 1' +``` + +The `mock_outputs` section designates that the transform named `Read from GCS` +should produce the single row `{line: "Nothing can come of nothing"}` for the +purposes of this test, and the `expected_inputs` section indicates that the +transform `Write to GCS` should expect to receive exactly the given elements. +Neither the actual Read transform nor Write transform from the original +pipelines are executed when running the test, but all intermediate transforms +are. + +This test can then be executed by running + +``` +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=wordcount.yaml \ + --tests +``` + +Alternatively, the a `tests:` block may be placed in a separate file and be +validated by running + +``` +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=wordcount.yaml \ + --tests \ + --test_suite=test_file.yaml +``` + +For hermeticity, we require that all inputs (with the exception of +`Create`) that are needed to compute the expected outputs are explicitly mocked; +to explicitly allow a sources to be executed as part of a test their names or +types can be enumerated in an `allowed_sources` attribute of the test +specification. + + +## Pipeline fragment tests + +One can also test a portion of a pipeline using the `mock_inputs` and +`expected_outputs` section of a test, for example + +``` +tests: +- name: TestSplittingWithPunctuation + mock_inputs: + - name: Split words + elements: + - line: "lots-of-words" + - line: "...and more" + expected_outputs: + - name: Explode + elements: + - word: lots + value: 1 + - word: of + value: 1 + - word: words + value: 1 + - word: and + value: 1 + - word: more + value: 1 + +- name: TestCombineAndFormat + mock_inputs: + - name: Count words + elements: + - word: more + value: 1 + - word: and + value: 1 + - word: more + value: 1 + expected_outputs: + - name: Format output + elements: + - output: "more: 2" + - output: "and: 1" +``` + +As before, each test only executes the portion of the pipeline between the +mock inputs and expected outputs. Note that the named transform in a +`mock_inputs` specification *is* executed, while the named transform of a +`mock_outputs` specification is not. +Similarly, the named transform of a `expected_inputs` specification is *not* +executed, while the named transform of an `expected_outputs` necessarily is. + + +## Automatically generating tests. + +In an effort to make tests as easy to write and maintain as possible, +Beam YAML provides utilities to compute the expected outputs for your tests. + + +Running + +``` +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=wordcount.yaml \ + --tests \ + [--test_suite=...] \ + --create_test +``` + +will create an entirely new test by sampling all the sources and +constructing a test accordingly. + +One can also keep tests up to date by running + +``` +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=wordcount.yaml \ + --tests \ + [--test_suite=...] \ + --fix_tests +``` + +which will update any existing `expected_input` and `expected_output` blocks +of your pipeline to contain the actual values computed during the test. +This can be useful in authoring tests as well--one can simply specify a +nonsensical or empty elements block in the expectation and the `--fix_tests` +flag will populate it for you. +(Of course, it is on any user of these flags to verify that the produced values +are meaningful and as expected.) + + +## Branching pipelines + +For complex, branching pipelines, any number of `mock_inputs` and `mock_outputs` +may be enumerated to provide the input data, and any number of `expected_inputs` +and `expected_outputs` validations may be specified as well. +In both the `mock_outputs` and `expected_outputs` block, multiple outputs can +be disambiguated with the `TransformName.output_name` notation just as when +authoring a yaml pipeline. + +``` +pipeline: + transforms: + - type: Create + name: Abc + config: + elements: [a, b, ccc] + - type: Create + name: Xyz + config: + elements: [x, y, zzz] + - type: MapToFields + name: Upper + input: [Abc, Xyz] + config: + language: python + fields: + element: element.upper() + - type: Partition + input: Upper + config: + language: python + by: '"big" if len(element) > 1 else "small"' + outputs: ["big", "small"] + - type: MapToFields + name: MaybeHasErrors + input: Abc + config: + language: python + fields: + inverse_size: 1 / len(element) + error_handling: + output: errors + - type: StripErrorMetadata + input: MaybeHasErrors.errors + +tests: + - name: MockMultipleInputs + mock_outputs: + - name: Abc + elements: [element: a] + - name: Xyz + elements: [element: z] + expected_outputs: + - name: Upper + elements: [element: A, element: Z] + + - name: TestMultipelOuptuts + mock_inputs: + - name: Upper + elements: [element: m, element: nnn] + expected_outputs: + - name: Partition.big + elements: [element: NNN] + - name: Partition.small + elements: [element: M] + + - name: TestErrorHandling + mock_outputs: + - name: Abc + elements: [element: 'Aaaa', element: ''] + expected_outputs: + - name: MaybeHasErrors + elements: [inverse_size: 0.25] + - name: StripErrorMetadata + elements: [element: ''] +``` diff --git a/sdks/python/apache_beam/yaml/docs/yaml-udf.md b/sdks/python/apache_beam/yaml/docs/yaml-udf.md new file mode 100644 index 000000000000..69bdc77704d1 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml-udf.md @@ -0,0 +1,543 @@ +--- +type: languages +title: "Apache Beam YAML UDFs" +--- + + +# Beam YAML mappings + +Beam YAML has the ability to do simple transformations which can be used to +get data into the correct shape. The simplest of these is `MapToFields` +which creates records with new fields defined in terms of the input fields. + +## Field renames + +To rename fields one can write + +``` +- type: MapToFields + config: + fields: + new_col1: col1 + new_col2: col2 +``` + +will result in an output where each record has two fields, +`new_col1` and `new_col2`, whose values are those of `col1` and `col2` +respectively (which are the names of two fields from the input schema). + +One can specify the append parameter which indicates the original fields should +be retained similar to the use of `*` in an SQL select statement. For example + +``` +- type: MapToFields + config: + append: true + fields: + new_col1: col1 + new_col2: col2 +``` + +will output records that have `new_col1` and `new_col2` as *additional* +fields. When the append field is specified, one can drop fields as well, e.g. + +``` +- type: MapToFields + config: + append: true + drop: + - col3 + fields: + new_col1: col1 + new_col2: col2 +``` + +which includes all original fields *except* col3 in addition to outputting the +two new ones. + + +## Mapping functions + +Of course one may want to do transformations beyond just dropping and renaming +fields. Beam YAML has the ability to inline simple UDFs. +This requires a language specification. For example, we can provide a +Python expression referencing the input fields + +``` +- type: MapToFields + config: + language: python + fields: + new_col: "col1.upper()" + another_col: "col2 + col3" +``` + +In addition, one can provide a full Python callable that takes the row as an +argument to do more complex mappings +(see [PythonCallableSource](https://beam.apache.org/releases/pydoc/current/apache_beam.utils.python_callable.html#apache_beam.utils.python_callable.PythonCallableWithSource) +for acceptable formats). Thus, one can write + +``` +- type: MapToFields + config: + language: python + fields: + new_col: + callable: | + import re + def my_mapping(row): + if re.match("[0-9]+", row.col1) and row.col2 > 0: + return "good" + else: + return "bad" +``` + +Once one reaches a certain level of complexity, it may be preferable to package +this up as a dependency and simply refer to it by fully qualified name, e.g. + +``` +- type: MapToFields + config: + language: python + fields: + new_col: + callable: pkg.module.fn +``` + +It is also possible to store the function logic in a file and point to the function name, e.g. + +``` +- type: MapToFields + config: + language: python + fields: + new_col: + path: /path/to/some/udf.py + name: my_mapping +``` + +Currently, in addition to Python, Java, SQL, and JavaScript (experimental) +expressions are supported as well + +### Java + +When using Java mappings, the UDF type must be declared, even for simple expressions, e.g. + +``` +- type: MapToFields + config: + language: java + fields: + new_col: + expression: col1.toUpperCase() +``` + +For callable UDFs, Java requires that the function be declared as a class that implements +[`java.util.function.Function`](https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html), e.g. + +``` +- type: MapToFields + config: + language: java + fields: + new_col: + callable: | + import org.apache.beam.sdk.values.Row; + import java.util.function.Function; + public class MyFunction implements Function { + public String apply(Row row) { + return row.getString("col1").toUpperCase(); + } + } +``` + +### SQL + +When SQL is used for a `MapToFields` UDF, it is essentially the SQL `SELECT` statement. + +For example, the query `SELECT UPPER(col1) AS new_col, "col2 + col3" AS another_col FROM PCOLLECTION` would +look like: + +``` +- type: MapToFields + config: + language: sql + fields: + new_col: "UPPER(col1)" + another_col: "col2 + col3" +``` + +keeping in mind that any fields not intended to be included in the output should be added to the `drop` field. + +If one wanted to select a field that collides with a [reserved SQL keyword](https://calcite.apache.org/docs/reference.html#keywords), the field(s) must be surrounded in backticks. For example, say the incoming PCollection has a field "timestamp", one would have to write: + +``` +- type: MapToFields + config: + language: sql + fields: + new_col: "`timestamp`" +``` + +**Note**: the field mapping tags and fields defined in `drop` do not need to be escaped. Only the UDF itself +needs to be a valid SQL statement. + + +### Generic + +If a language is not specified the set of expressions is limited to pre-existing +fields and integer, floating point, or string literals. For example + +``` +- type: MapToFields + config: + fields: + new_col: col1 + int_literal: 389 + float_litera: 1.90216 + str_literal: '"example"' # note the double quoting +``` + +## FlatMap + +Sometimes it may be desirable to emit more (or less) than one record for each +input record. This can be accomplished by mapping to an iterable type and +following the mapping with an `Explode` operation, e.g. + +``` +- type: MapToFields + config: + language: python + fields: + new_col: "[col1.upper(), col1.lower(), col1.title()]" + another_col: "col2 + col3" +- type: Explode + config: + fields: new_col +``` + +will result in three output records for every input record. + +If more than one record is to be exploded, one must specify whether the cross +product over all fields should be taken. For example + +``` +- type: MapToFields + config: + language: python + fields: + new_col: "[col1.upper(), col1.lower(), col1.title()]" + another_col: "[col2 - 1, col2, col2 + 1]" +- type: Explode + config: + fields: [new_col, another_col] + cross_product: true +``` + +will emit nine records whereas + +``` +- type: MapToFields + config: + language: python + fields: + new_col: "[col1.upper(), col1.lower(), col1.title()]" + another_col: "[col2 - 1, col2, col2 + 1]" +- type: Explode + config: + fields: [new_col, another_col] + cross_product: false +``` + +will only emit three. + +The `Explode` operation can be used on its own if the field in question is +already an iterable type. + +``` +- type: Explode + config: + fields: [col1] +``` + +## Filtering + +Sometimes it can be desirable to only keep records that satisfy a certain +criteria. This can be accomplished with a `Filter` transform, e.g. + +``` +- type: Filter + config: + keep: "col2 > 0" +``` + +For anything more complicated than a simple comparison between existing +fields and numeric literals a `language` parameter must be provided, e.g. + +``` +- type: Filter + config: + language: python + keep: "col2 + col3 > 0" +``` + +For more complicated filtering functions, one can provide a full Python callable that takes the row as an +argument to do more complex mappings +(see [PythonCallableSource](https://beam.apache.org/releases/pydoc/current/apache_beam.utils.python_callable.html#apache_beam.utils.python_callable.PythonCallableWithSource) +for acceptable formats). Thus, one can write + +``` +- type: Filter + config: + language: python + keep: + callable: | + import re + def my_filter(row): + return re.match("[0-9]+", row.col1) and row.col2 > 0 +``` + +Once one reaches a certain level of complexity, it may be preferable to package +this up as a dependency and simply refer to it by fully qualified name, e.g. + +``` +- type: Filter + config: + language: python + keep: + callable: pkg.module.fn +``` + +It is also possible to store the function logic in a file and point to the function name, e.g. + +``` +- type: Filter + config: + language: python + keep: + path: /path/to/some/udf.py + name: my_filter +``` + +This allows the logic of the UDF itself to be more easily developed and tested +using standard software engineering practices. + +Currently, in addition to Python, Java, SQL, and JavaScript (experimental) +expressions are supported as well + +### Java + +When using Java filtering, the UDF type must be declared, even for simple expressions, e.g. + +``` +- type: Filter + config: + language: java + keep: + expression: col2 > 0 +``` + +For callable UDFs, Java requires that the function be declared as a class that implements +[`java.util.function.Function`](https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html), e.g. + +``` +- type: Filter + config: + language: java + keep: + callable: | + import org.apache.beam.sdk.values.Row; + import java.util.function.Function; + import java.util.regex.Pattern; + public class MyFunction implements Function { + public Boolean apply(Row row) { + Pattern pattern = Pattern.compile("[0-9]+"); + return pattern.matcher(row.getString("col1")).matches() && row.getInt64("col2") > 0; + } + } +``` + +### SQL + +Similar to [Mapping Functions](#mapping-functions), when SQL is used for a `MapToFields` UDF, it is essentially theSQL `WHERE` statement. + +For example, the query `SELECT * FROM PCOLLECTION WHERE col2 > 0` would +look like: + +``` +- type: Filter + config: + language: sql + keep: "col2 > 0" +``` + +If one wanted to filter on a field that collides with a +[reserved SQL keyword](https://calcite.apache.org/docs/reference.html#keywords), the field(s) must be surrounded in +backticks. For example, say the incoming PCollection has a field "timestamp", one would have to write: + +``` +- type: Filter + config: + language: sql + keep: "`timestamp` > 0" +``` + + +## Partitioning + +It can also be useful to send different elements to different places +(similar to what is done with side outputs in other SDKs). +While this can be done with a set of `Filter` operations, if every +element has a single destination it can be more natural to use a `Partition` +transform instead which sends every element to a unique output. +For example, this will send all elements where `col1` is equal to `"a"` to the +output `Partition.a`. + +``` +- type: Partition + input: input + config: + by: col1 + outputs: ['a', 'b', 'c'] + +- type: SomeTransform + input: Partition.a + config: + param: ... + +- type: AnotherTransform + input: Partition.b + config: + param: ... +``` + +One can also specify the destination as a function, e.g. + +``` +- type: Partition + input: input + config: + by: "'even' if col2 % 2 == 0 else 'odd'" + language: python + outputs: ['even', 'odd'] +``` + +One can optionally provide a catch-all output which will capture all elements +that are not in the named outputs (which would otherwise be an error): + +``` +- type: Partition + input: input + config: + by: col1 + outputs: ['a', 'b', 'c'] + unknown_output: 'other' +``` + +Sometimes one wants to split a PCollection into multiple PCollections +that aren't necessarily disjoint. To send elements to multiple (or no) outputs, +one could use an iterable column and precede the `Partition` with an `Explode`. + +``` +- type: Explode + input: input + config: + fields: col1 + +- type: Partition + input: Explode + config: + by: col1 + outputs: ['a', 'b', 'c'] +``` + +## Types + +Beam will try to infer the types involved in the mappings, but sometimes this +is not possible. In these cases one can explicitly denote the expected output +type, e.g. + +``` +- type: MapToFields + config: + language: python + fields: + new_col: + expression: "col1.upper()" + output_type: string +``` + +The expected type is given in json schema notation, with the addition that +a top-level basic types may be given as a literal string rather than requiring +a `{type: 'basic_type_name'}` nesting. + +``` +- type: MapToFields + config: + language: python + fields: + new_col: + expression: "col1.upper()" + output_type: string + another_col: + expression: "beam.Row(a=col1, b=[col2])" + output_type: + type: 'object' + properties: + a: + type: 'string' + b: + type: 'array' + items: + type: 'number' +``` + +This can be especially useful to resolve errors involving the inability to +handle the `beam:logical:pythonsdk_any:v1` type. + + +## Dependencies + +Often user defined functions need to rely on external dependencies. +These can be provided with a `dependencies` attribute in the transform +config. For example + +``` +- type: MapToFields + config: + language: python + dependencies: + - 'scipy>=1.15' + fields: + new_col: + callable: | + import scipy.special + + def func(t): + return scipy.special.zeta(complex(1/2, t)) +``` + +The dependencies are interpreted according to the language, e.g. +for Java one provides a list of maven identifiers and/or jars, +and for Python one provides a list of pypi package specifiers and/or sdist tarballs. +See also the full examples using +[java dependencies](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/examples/transforms/elementwise/map_to_fields_with_java_deps.yaml) +and +[python dependencies](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/examples/transforms/elementwise/map_to_fields_with_deps.yaml). diff --git a/sdks/python/apache_beam/yaml/docs/yaml.md b/sdks/python/apache_beam/yaml/docs/yaml.md new file mode 100644 index 000000000000..589679d3e502 --- /dev/null +++ b/sdks/python/apache_beam/yaml/docs/yaml.md @@ -0,0 +1,826 @@ +--- +type: languages +title: "Apache Beam YAML" +--- + + +# Beam YAML + +Beam YAML is a declarative syntax for describing Apache Beam pipelines by using +YAML files. You can use Beam YAML to author and run a Beam pipeline without +writing any code. + +For a full transform API reference, see https://beam.apache.org/releases/yamldoc/current/ + +## Overview + +Beam provides a powerful model for creating sophisticated data processing +pipelines. However, getting started with Beam programming can be challenging +because it requires writing code in one of the supported Beam SDK languages. +You need to understand the APIs, set up a project, manage dependencies, and +perform other programming tasks. + +Beam YAML makes it easier to get started with creating Beam pipelines. Instead +of writing code, you create a YAML file using any text editor. Then you submit +the YAML file to be executed by a runner. + +The Beam YAML syntax is designed to be human-readable but also suitable as an +intermediate representation for tools. For example, a pipeline authoring GUI +could output YAML, or a lineage analysis tool could consume the YAML pipeline +specifications. + +Beam YAML is still under development, but any features already included are +considered stable. Feedback is welcome at dev@apache.beam.org. + +## Prerequisites + +The Beam YAML parser is currently included as part of the +[Apache Beam Python SDK](../python/). You don't need to write Python code to use +Beam YAML, but you need the SDK to run pipelines locally. + +We recommend creating a +[virtual environment](../../../get-started/quickstart/python/#create-and-activate-a-virtual-environment) +so that all packages are installed in an isolated and self-contained +environment. After you set up your Python environment, install the SDK as +follows: + +``` +pip install apache_beam[yaml,gcp] +``` + +In addition, several of the provided transforms, such as the SQL transform, are +implemented in Java and require a working Java interpeter. When you a run a +pipeline with these transforms, the required artifacts are automatically +downloaded from the Apache Maven repositories. + +## Getting started + +Use a text editor to create a file named `pipeline.yaml`. Paste the following +text into the file and save: + +```yaml +pipeline: + transforms: + - type: Create + config: + elements: [1, 2, 3] + - type: LogForTesting + input: Create +``` + +This file defines a simple pipeline with two transforms: + +- The `Create` transform creates a collection. The value of `config` is a + dictionary of configuration settings. In this case, `elements` specifies the + members of the collection. Other transform types have other configuration + settings. +- The `LogForTesting` transform logs each input element. This transform doesn't + require a `config` setting. The `input` key specifies that `LogForTesting` + receives input from the `Create` transform. + +### Run the pipeline + +To execute the pipeline, run the following Python command: + +```sh +python -m apache_beam.yaml.main --yaml_pipeline_file=pipeline.yaml +``` + +The output should contain log statements similar to the following: + +```sh +INFO:root:{"element": 1} +INFO:root:{"element": 2} +INFO:root:{"element": 3} +``` + +### Run the pipeline in Dataflow + +You can submit a YAML pipeline to Dataflow by using the +[gcloud CLI](https://cloud.google.com/sdk/gcloud). To create a Dataflow job +from the YAML file, use the +[`gcloud dataflow yaml run`](https://cloud.google.com/sdk/gcloud/reference/dataflow/yaml/run) +command: + +``` +gcloud dataflow yaml run $JOB_NAME \ + --yaml-pipeline-file=pipeline.yaml \ + --region=$REGION +``` + +When you use the `gcloud` CLI, you don't need to install the Beam SDKs locally. + + +### Visualize the pipeline + +You can use the +[`apache_beam.runners.render`](https://beam.apache.org/releases/pydoc/current/apache_beam.runners.render.html) +module to render the pipeline execution graph as a PNG file, as follows: + +1. Install [Graphviz](https://graphviz.org/download/). +1. Run the following command: + + ``` + python -m apache_beam.yaml.main --yaml_pipeline_file=pipeline.yaml \ + --runner=apache_beam.runners.render.RenderRunner \ + --render_output=out.png + ``` + +## Example: Reading CSV data + +The following pipeline reads data from a set of CSV files and writes the data in +JSON format. This pipeline assumes the CSV files have a header row. The column +names become JSON field names. + +``` +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + - type: WriteToJson + config: + path: /path/to/output.json + input: ReadFromCsv +``` + +### Add a filter + +The [`Filter`](../yaml-udf/#filtering) transform filters records. It keeps input +records that satisfy a Boolean predicate and discards records that don't +satisify the predicate. The following example keeps records where the value of +`col3` is greater than 100: + +``` +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + - type: Filter + config: + language: python + keep: "col3 > 100" + input: ReadFromCsv + - type: WriteToJson + config: + path: /path/to/output.json + input: Filter +``` + +### Add a mapping function + +Beam YAML supports various [mapping functions](../yaml-udf/#mapping-functions). +The following example uses the `Sql` transform to group by `col1` and output the +counts for each key. + +``` +pipeline: + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + - type: Filter + config: + language: python + keep: "col3 > 100" + input: ReadFromCsv + - type: Sql + config: + query: "select col1, count(*) as cnt from PCOLLECTION group by col1" + input: Filter + - type: WriteToJson + config: + path: /path/to/output.json + input: Sql +``` + +## Patterns + +This section describes some common patterns in Beam YAML. + +### Named transforms + +You can name the transforms in your pipeline to help with monitoring and +debugging. Names are also used to disambiguate transforms if the pipeline +contains more than one transform of the same type. + +``` +pipeline: + transforms: + - type: ReadFromCsv + name: ReadMyData + config: + path: /path/to/input*.csv + - type: Filter + name: KeepBigRecords + config: + language: python + keep: "col3 > 100" + input: ReadMyData + - type: Sql + name: MySqlTransform + config: + query: "select col1, count(*) as cnt from PCOLLECTION group by col1" + input: KeepBigRecords + - type: WriteToJson + name: WriteTheOutput + config: + path: /path/to/output.json + input: MySqlTransform +``` + +### Chaining transforms + +If a pipeline is linear (no branching or merging), you can designate the +pipeline as a `chain` type. In a `chain`-type pipeline, you don't need to +specify the inputs. The inputs are implicit from the order they appear in the +YAML file: + +``` +pipeline: + type: chain + + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + - type: Filter + config: + language: python + keep: "col3 > 100" + - type: Sql + name: MySqlTransform + config: + query: "select col1, count(*) as cnt from PCOLLECTION group by col1" + - type: WriteToJson + config: + path: /path/to/output.json +``` + +If a `chain` pipeline has required error consumption or needs additional +transforms not supported in a typical `chain` context, use an +`extra_transforms` block. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromCsv + config: + path: /path/to/input*.csv + + - type: MapToFields + name: SomeStep + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + ratio: col2 / col3 + error_handling: + output: errors + + - type: MapToFields + name: AnotherStep + config: + language: python + fields: + col1: col1 + # This could raise a divide-by-zero error. + inverse_ratio: 1 / ratio + error_handling: + output: errors + + - type: WriteToJson + config: + path: /path/to/output.json + + extra_transforms: + - type: WriteToJson + name: WriteErrors + input: [SomeStep.errors, AnotherStep.errors] + config: + path: /path/to/errors.json +``` + +### Source and sink transforms + +As syntactic sugar, you can name the first and last transforms in your pipeline +as `source` and `sink`. This convention does not change the resulting pipeline, +but it signals the intent of the source and sink transforms. + +``` +pipeline: + type: chain + + source: + type: ReadFromCsv + config: + path: /path/to/input*.csv + + transforms: + - type: Filter + config: + language: python + keep: "col3 > 100" + + - type: Sql + name: MySqlTransform + config: + query: "select col1, count(*) as cnt from PCOLLECTION group by col1" + + sink: + type: WriteToJson + config: + path: /path/to/output.json +``` + +### Non-linear pipelines + +Beam YAML supports arbitrary non-linear pipelines. The following pipeline reads +two sources, joins them, and writes two outputs: + +``` +pipeline: + transforms: + - type: ReadFromCsv + name: ReadLeft + config: + path: /path/to/left*.csv + + - type: ReadFromCsv + name: ReadRight + config: + path: /path/to/right*.csv + + - type: Sql + config: + query: select A.col1, B.col2 from A join B using (col3) + input: + A: ReadLeft + B: ReadRight + + - type: WriteToJson + name: WriteAll + input: Sql + config: + path: /path/to/all.json + + - type: Filter + name: FilterToBig + input: Sql + config: + language: python + keep: "col2 > 100" + + - type: WriteToCsv + name: WriteBig + input: FilterToBig + config: + path: /path/to/big.csv +``` + +Because the pipeline is not linear, you must explicitly declare the inputs for +each transform. However, you can nest a `chain` within a non-linear pipeline. +The chain is a linear sub-path within the pipeline. + +The following example creates a chain named `ExtraProcessingForBigRows`. The +chain takes input from the `Sql` transform and applies several additional +filters plus a sink. Notice that within the chain, the inputs don't need to be +specified. + +``` +pipeline: + transforms: + - type: ReadFromCsv + name: ReadLeft + config: + path: /path/to/left*.csv + + - type: ReadFromCsv + name: ReadRight + config: + path: /path/to/right*.csv + + - type: Sql + config: + query: select A.col1, B.col2 from A join B using (col3) + input: + A: ReadLeft + B: ReadRight + + - type: WriteToJson + name: WriteAll + input: Sql + config: + path: /path/to/all.json + + - type: chain + name: ExtraProcessingForBigRows + input: Sql + transforms: + - type: Filter + config: + language: python + keep: "col2 > 100" + - type: Filter + config: + language: python + keep: "len(col1) > 10" + - type: Filter + config: + language: python + keep: "col1 > 'z'" + sink: + type: WriteToCsv + config: + path: /path/to/big.csv +``` + +## Windowing + +This API can be used to define both streaming and batch pipelines. +In order to meaningfully aggregate elements in a streaming pipeline, +some kind of windowing is typically required. Beam's +[windowing](https://beam.apache.org/documentation/programming-guide/#windowing) +and [triggering](https://beam.apache.org/documentation/programming-guide/#triggers) +can be declared using the same `WindowInto` transform available in all other +Beam SDKs. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: JSON + schema: + type: object + properties: + col1: {type: string} + col2: {type: integer} + col3: {type: number} + - type: WindowInto + windowing: + type: fixed + size: 60s + - type: SomeGroupingTransform + config: + arg: ... + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON +options: + streaming: true +``` + +Rather than using an explicit `WindowInto` operation, you can tag a transform +with a specified windowing, which causes its inputs (and hence the transform +itself) to be applied with that windowing. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + - type: SomeGroupingTransform + config: + arg: ... + windowing: + type: sliding + size: 60s + period: 10s + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON +options: + streaming: true +``` + +Note that the `Sql` operation itself is often a from of aggregation, and +applying a windowing (or consuming an already windowed input) causes all +grouping to be done per window. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + - type: Sql + config: + query: "select col1, count(*) as c from PCOLLECTION" + windowing: + type: sessions + gap: 60s + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON +options: + streaming: true +``` + +The specified windowing is applied to all inputs, in this case resulting in +a join per window. + +``` +pipeline: + transforms: + - type: ReadFromPubSub + name: ReadLeft + config: + topic: leftTopic + format: ... + schema: ... + + - type: ReadFromPubSub + name: ReadRight + config: + topic: rightTopic + format: ... + schema: ... + + - type: Sql + config: + query: select A.col1, B.col2 from A join B using (col3) + input: + A: ReadLeft + B: ReadRight + windowing: + type: fixed + size: 60s +options: + streaming: true +``` + +For a transform with no inputs, the specified windowing is instead applied to +its output(s). As per the Beam model, the windowing is then inherited by all +consuming operations. This is especially useful for root operations like Read. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + windowing: + type: fixed + size: 60s + - type: Sql + config: + query: "select col1, count(*) as c from PCOLLECTION" + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON +options: + streaming: true +``` + +One can also specify windowing at the top level of a pipeline (or composite), +which is a shorthand for applying this same windowing to all root +operations that don't otherwise specify their own windowing. This approach is +effective way to apply a window everywhere in the pipeline. + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + - type: Sql + config: + query: "select col1, count(*) as c from PCOLLECTION" + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON + windowing: + type: fixed + size: 60 +options: + streaming: true +``` + +Note that all these windowing specifications are compatible with the `source` +and `sink` syntax as well: + +``` +pipeline: + type: chain + + source: + type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + windowing: + type: fixed + size: 10s + + transforms: + - type: Sql + config: + query: "select col1, count(*) as c from PCOLLECTION" + + sink: + type: WriteToCsv + config: + path: /path/to/output.json + windowing: + type: fixed + size: 5m + +options: + streaming: true +``` + +## Pipeline options + +[Pipeline options](https://beam.apache.org/documentation/programming-guide/#configuring-pipeline-options) +are used to configure different aspects of your pipeline, such as the pipeline runner that will execute +your pipeline and any runner-specific configuration required by the chosen runner. To set pipeline options, +append an options block at the end of your yaml file. For example: + +``` +pipeline: + type: chain + transforms: + - type: ReadFromPubSub + config: + topic: myPubSubTopic + format: ... + schema: ... + windowing: + type: fixed + size: 60s + - type: Sql + config: + query: "select col1, count(*) as c from PCOLLECTION" + - type: WriteToPubSub + config: + topic: anotherPubSubTopic + format: JSON +options: + streaming: true +``` + +## Jinja Templatization + +It is a common to want to run a single Beam pipeline in different contexts +and/or with different configurations. +When running a YAML pipeline using `apache_beam.yaml.main` or via gcloud, +the yaml file can be parameterized with externally provided variables using +the [jinja variable syntax](https://jinja.palletsprojects.com/en/stable/templates/#variables). +The values are then passed via a `--jinja_variables` command line flag. + +For example, one could start a pipeline with: + +``` +pipeline: + transforms: + - type: ReadFromCsv + config: + path: {{input_pattern}} +``` + +and then run it with + +```sh +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=pipeline.yaml \ + --jinja_variables='{"input_pattern": "gs://path/to/this/runs/files*.csv"}' +``` + +Arbitrary [jinja control structures](https://jinja.palletsprojects.com/en/stable/templates/#list-of-control-structures), +such as looping and conditionals, can be used as well if desired as long as the +output results in a valid Beam YAML pipeline. + +We also expose the [`datetime`](https://docs.python.org/3/library/datetime.html) +module as a variable by default, which can be particularly useful in reading +or writing dated sources and sinks, e.g. + +``` +- type: WriteToJson + config: + path: "gs://path/to/{{ datetime.datetime.now().strftime('%Y/%m/%d') }}/dated-output.json" +``` + +would write to files like `gs://path/to/2016/08/04/dated-output*.json`. + +A user can also use the `% include` directive to pull in other common templates: + +/pipeline.yaml +```yaml +pipeline: + transforms: + - name: Read from GCS + type: ReadFromText + config: +# NOTE: For include, the indentation has to line up correctly for it to be +# parsed correctly. So in this example the included readFromText.yaml has +# already indented yaml lines to line up correctly when including into this +# pipeline here. +{% include '/submodules/readFromText.yaml' %} + - name: Write to GCS + type: WriteToText + input: Read from GCS + config: + path: "gs://MY-BUCKET/wordCounts/" +``` + +/submodules/readFromText.yaml +```yaml + path: {{readFromText.path}} +``` + +This pipeline can be run like this: + +```sh +python -m apache_beam.yaml.main \ + --yaml_pipeline_file=pipeline.yaml \ + --jinja_variables='{"readFromText": {"path": "gs://dataflow-samples/shakespeare/kinglear.txt"}}' +``` + +The `% import` jinja directive can also be used to pull in macros: + +/pipeline.yaml +```yaml +{% import '/macros.yaml' as macros %} + +pipeline: + type: chain + transforms: + +# Read in text file +{{ macros.readFromText(readFromText) | indent(4, true) }} + +# Write to text file on GCS, locally, etc + - name: Write to GCS + type: WriteToText + input: Read from GCS + config: + path: "gs://MY-BUCKET/wordCounts/" +``` + +/macros.yaml +```yaml +{%- macro readFromText(params) -%} +- name: Read from GCS + type: ReadFromText + config: + path: "{{ params.path }}" +{%- endmacro -%} +``` + +This pipeline can be run with the same command as in the `% include` example +above. + +There are many more ways to import and even use template inheritance using +Jinja as seen [here](https://jinja.palletsprojects.com/en/stable/templates/#import) +and [here](https://jinja.palletsprojects.com/en/stable/templates/#inheritance). +Note that for large chunks of functionality, we recommend packaging them up via +more reusable [yaml providers](../yaml-providers) rather than using textual `%includes`. + +Full jinja pipeline examples can be found [here](https://github.com/apache/beam/tree/master/sdks/python/apache_beam/yaml/examples/transforms/jinja). + +## Other Resources + +* [Example pipeline](https://github.com/apache/beam/tree/master/sdks/python/apache_beam/yaml/examples) +* [More examples](https://gist.github.com/robertwb/2cb26973f1b1203e8f5f8f88c5764da0)